CN103560979A - Resource distribution method and device - Google Patents

Resource distribution method and device Download PDF

Info

Publication number
CN103560979A
CN103560979A CN201310595049.1A CN201310595049A CN103560979A CN 103560979 A CN103560979 A CN 103560979A CN 201310595049 A CN201310595049 A CN 201310595049A CN 103560979 A CN103560979 A CN 103560979A
Authority
CN
China
Prior art keywords
port
port piece
resource
stock number
subscriber equipment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201310595049.1A
Other languages
Chinese (zh)
Other versions
CN103560979B (en
Inventor
王泽林
王明会
王健全
王光全
夏俊杰
张文钺
杨艳松
谢梦楠
华一强
郭晓琳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China United Network Communications Group Co Ltd
Original Assignee
China United Network Communications Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China United Network Communications Group Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN201310595049.1A priority Critical patent/CN103560979B/en
Publication of CN103560979A publication Critical patent/CN103560979A/en
Application granted granted Critical
Publication of CN103560979B publication Critical patent/CN103560979B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The embodiment of the invention provides a resource distribution method and device, and relates to the field of communication. The utilization rate of resources of a port in a CGN device can be improved, and the method comprises the steps that the CGN device obtains the quantity of resources of a preset port block, obtains the current distribution times of a user device, obtains optimal coefficients corresponding to the current distribution times, and then determines the quantity of resources, required to be distributed to the user device at present, of the port block according to the optimal coefficients and the quantity of the resources of the preset port block. The resource distribution method and device can be applied to space resource distribution.

Description

A kind of resource allocation methods and equipment
Technical field
The present invention relates to the communications field, relate in particular to a kind of resource allocation methods and equipment.
Background technology
Along with working application innovation emerges in an endless stream, userbase rapid growth, the intellectuality of terminal, mobile have brought the great development of mobile Internet, and simultaneously Telecom Carriers faces IPv4(Internet Protocol version4, Internet Protocol Version 4) problem of Address Run Short.
In prior art; for solving IPv4 Address Run Short problem, adopt NAT(Network Address Translation; network address translation) scheme; this scheme is that IPv4 development service is used in continuity; privately owned by utilizing (reservation) address spaces is legal IP(Internet Protocol; Internet protocol) switch technology of address comes scale to dispose IPv4 private address; to reach the utilance that improves the public network IP v4 address after mapping, thereby can within considerable time, solve IPv4 address problem.In order to realize user's access and to improve the utilance of the public network IP v4 address after mapping, CGN(Carrier grade Network Address Translation, carrier class networks address transition) equipment is the different port piece of address after the same conversion of a plurality of user assignments, and the stock number of this port piece is the summation of the port resource of the fixed number that sets in advance.Example, according to user's ports having demand, CGN equipment distributes port Resource Block for the first time to subscriber equipment, after if the port piece distributing is for the first time finished, the stock number sum of all of the port piece of CGN devices allocation is less than user's port demand, the port piece of the same asset of can reallocating amount, until the port piece of CGN devices allocation is no longer less than user's port demand.
Conventionally, the port resource amount of subscriber equipment demand is along with distributing the increase of number of times to successively decrease, and the stock number of distributing to the port piece of subscriber equipment is identical at every turn, if the setting of the stock number of port piece is too large so, the port resource amount that may occur at every turn distributing to subscriber equipment is far longer than the port resource amount of subscriber equipment needs, can cause the waste of a large amount of port resources, affect the ability of CGN equipment; If the setting of the stock number of port piece is too little, the port resource amount that may occur at every turn distributing to subscriber equipment cannot meet the port resource amount demand of subscriber equipment, can cause CGN equipment to repeat the decline of port piece batch operation frequently and CGN capacity of equipment.Therefore the method for prior art has caused the utilance of port resource of CGN equipment lower.
Summary of the invention
Embodiments of the invention provide a kind of resource allocation methods and equipment, can improve the utilance of the port resource of CGN equipment.
For achieving the above object, embodiments of the invention adopt following technical scheme:
On the one hand, provide a kind of resource allocation methods, be applied to CGN equipment, comprising:
Obtain the stock number of default port piece;
Obtain the current distribution number of times of subscriber equipment;
Obtain optimized coefficients corresponding to described current distribution number of times;
According to the stock number of described optimized coefficients and described default port piece, determine that current need distribute to the stock number of the port piece of described subscriber equipment.
On the other hand, provide a kind of CGN equipment, comprising:
The first acquiring unit, for obtaining the stock number of default port piece;
Second acquisition unit, for obtaining the current distribution number of times of subscriber equipment;
The 3rd acquiring unit, for obtaining optimized coefficients corresponding to described current distribution number of times;
Determining unit, for according to the stock number of described optimized coefficients and described default port piece, determines that current need distribute to the stock number of the port piece of described subscriber equipment.
The resource allocation methods that the embodiment of the present invention provides, CGN equipment can be according to the stock number of optimized coefficients and default port piece, determines that current need distribute to the stock number of the port piece of subscriber equipment, and CGN equipment can be distributed to subscriber equipment by suitable port piece.So, avoid the waste of stock number, reduced repetitive operation, reduced the impact on CGN capacity of equipment, therefore improved the utilance of the port resource of CGN equipment.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, to the accompanying drawing of required use in embodiment or description of the Prior Art be briefly described below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skills, do not paying under the prerequisite of creative work, can also obtain according to these accompanying drawings other accompanying drawing.
The flow chart of a kind of resource allocation methods that Fig. 1 provides for the embodiment of the present invention;
The flow chart of the another kind of resource allocation methods that Fig. 2 provides for the embodiment of the present invention;
The structural representation of a kind of CGN equipment that Fig. 3 provides for the embodiment of the present invention;
The structural representation of the another kind of CGN equipment that Fig. 4 provides for the embodiment of the present invention;
The structural representation of another the CGN equipment that Fig. 5 provides for the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, rather than whole embodiment.Embodiment based in the present invention, those of ordinary skills, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
The embodiment of the present invention provides a kind of resource allocation methods, is applied to CGN equipment, as shown in Figure 1, comprising:
Step 101, obtain the stock number of default port piece.
The stock number of described default port piece is the most suitable stock number of rule of thumb selecting.
Step 102, obtain the current distribution number of times of subscriber equipment.
Step 103, obtain optimized coefficients corresponding to described current distribution number of times.
Example, optimized coefficients corresponding to every sub-distribution in P sub-distribution before can arranging before step 101, in step 103, according to optimized coefficients corresponding to every sub-distribution in P sub-distribution before current distribution number of times inquiry, obtain optimized coefficients corresponding to described current distribution number of times.Common, according to the experience of the selection of the stock number of default port piece and the distribution of port piece resource, set in advance the value of suitable P, meet the resource requirement of most of subscriber equipmenies.The value of P described in practical application is 3.
Step 104, according to the stock number of described optimized coefficients and described default port piece, determine that current need distribute to the stock number of the port piece of described subscriber equipment.
CGN equipment is according to the stock number of described optimized coefficients and described default port piece, by resource adjustment formula, determines that described current need distribute to the stock number of the port piece of described subscriber equipment, and described resource adjustment formula is:
S h = S 0 M ;
Wherein, described S 0for the stock number of described default port piece, described S hfor described current need, distribute to the stock number of the port piece of described subscriber equipment, described M is described optimized coefficients, the current distribution number of times that described h is described subscriber equipment.
So, CGN equipment can be according to the stock number of optimized coefficients and default port piece, determine that current need distribute to the stock number of the port piece of subscriber equipment, CGN equipment can be distributed to subscriber equipment by suitable port piece, avoided the waste of stock number, reduce repetitive operation, reduced the impact on CGN capacity of equipment, therefore improved the utilance of the port resource of CGN equipment.
The embodiment of the present invention provides a kind of resource allocation methods, is applied to CGN equipment, as shown in Figure 2, comprising:
Step 201, CGN equipment optimization coefficient is set, performs step 202.
CGN equipment arranges optimized coefficients corresponding to every sub-distribution in front P sub-distribution.Common, according to the experience of port piece resource distribution, set in advance the value of suitable P, meet the resource requirement of most of subscriber equipmenies.The value of P described in practical application is 3.For example, being only provided with and 3 times distributing corresponding optimized coefficients, divide timing carrying out resource, if distribute number of times to surpass 3, is no longer this user equipment allocation port piece.Concrete, CGN equipment is not quite similar to the stock number of the port piece of user equipment allocation at every turn, according to many factors such as in the past different subscriber equipment features, applied environment features, for subscriber equipment sets in advance different optimized coefficients corresponding to number of times that distribute.
Example, suppose P=3, optimized coefficients corresponding to every sub-distribution in 3 times distribution is set, it is 1 that the invention process example assumes is distributed corresponding optimized coefficients for the first time, distributing for the second time corresponding optimized coefficients is 4, distributing for the third time corresponding optimized coefficients is 8, described optimized coefficients is set to successively to increase progressively in embodiments of the present invention, to guarantee in subsequent process, for the stock number of the port piece of user equipment allocation is successively successively decreased, the stock number of the port piece distributing is for the first time greater than the stock number of the port piece distributing for the second time, the stock number of the port piece distributing is for the second time greater than the stock number of the port piece distributing for the third time.
Step 202, be reserved the first port resource in subscriber equipment address after same conversion and the second port resource, perform step 203.
Common, the port piece that CGN equipment is same user equipment allocation address after same conversion, so that guarantee the availability of the application of this subscriber equipment.Described CGN equipment can be divided into two parts by the reserved port resource in address after conversion, and a part is as the first port resource, and another part is as the second port resource, and the stock number of described the first port resource is greater than described the second port resource conventionally.Described the first port resource provides port resource when giving for the first time the port piece of user equipment allocation for CGN equipment; Described the second port resource provides port resource when for the second time and later giving the port piece of user equipment allocation for CGN equipment.So, CGN equipment is reserved the first port resource in subscriber equipment address after same conversion and the second port resource, can avoid the situation that causes follow-up distribution to carry out to the port piece rear port runs out of resource sets of user equipment allocation for the first time.It should be noted that, described the second port resource can also be divided into finer port resource, so that CGN equipment provides port resource during to the port piece of user equipment allocation at corresponding number of times.
What deserves to be explained is, the first port resource and the second port resource are only not only a subscriber equipment service, but for needing all subscriber equipment services of address after this conversion.
Step 203, obtain the stock number of default port piece, perform step 204.
The stock number of described default port piece is the most suitable stock number of rule of thumb selecting.When the stock number of described default port piece is initialization, the stock number of the port piece setting in advance.In practical application, the stock number of default port piece is 2000.
Step 204, judge that whether current distribution is for distributing for the first time.If so, perform step 205, if not, perform step 210.
Step 205, obtain the current distribution number of times of subscriber equipment, perform step 206.
Resource mapping table is the information table of the subscriber equipment that arranges in resource allocation process of system, and the content of record can comprise source address, reference address, conversion rear end slogan, agreement and the distribution number of times of subscriber equipment, and resource mapping table is as shown in table 1, table 2.
Table 1
Source address Reference address Conversion rear end slogan Agreement
Table 2
Source address Reference address Conversion rear end slogan Agreement Distribute number of times
CGN equipment can obtain the current distribution number of times of user from resource mapping table, but in prior art, in resource mapping table, does not distribute the corresponding list item of number of times, as shown in table 1.CGN device first divides timing to obtain less than current distribution number of times, and to give tacit consent to current distribution number of times be 1 to CGN equipment.
Step 206, obtain optimized coefficients corresponding to current distribution number of times, perform step 207.
It is 1 that embodiment of the present invention acquiescence is distributed corresponding optimized coefficients for the first time.
Step 207, according to the stock number of optimized coefficients and default port piece, determine that current need distribute to the stock number of the port piece of described subscriber equipment, perform step 208.
According to the stock number of described optimized coefficients and described default port piece, by resource adjustment formula, determine that described current need distribute to the stock number of the port piece of described subscriber equipment, described resource adjustment formula is:
S h = S 0 M ;
Wherein, described S 0for the stock number of described default port piece, described S hfor described current need, distribute to the stock number of the port piece of described subscriber equipment, described M is described optimized coefficients, the current distribution number of times that described h is described subscriber equipment.
Current distribution number of times h=1, distributing for the first time corresponding optimized coefficients is 1, by resource adjustment formula, can calculate the stock number S that CGN equipment is given the port piece of user equipment allocation for the first time 1=S 0/ 1=S 0, S 1stock number S for default port piece 0.
Step 208, from the first port resource, according to described current need, distribute to subscriber equipment the stock number of port piece to described user equipment allocation port piece, perform step 209.
What deserves to be explained is, in distributing for the first time, CGN equipment can not need to perform step 205, step 206 and step 207, directly performs step 208, gives tacit consent to current need and distributes to the stock number that the stock number of the port piece of subscriber equipment is default port piece.
The distribution number of times recording in step 209, renewal resource mapping table.
The newly-increased number of times list item that distributes in resource mapping table, resource mapping table is as shown in table 2, upgrades the content on described distribution number of times hurdle, so that resource allocation process obtains distribution number of times by this resource mapping table next time with current distribution number of times 1.
Step 210, obtain the current distribution number of times of subscriber equipment, perform step 211.
The distribution number of times k of CGN equipment Gains resources mapping table record, using h=k+1 as current distribution number of times.Example, if the distribution number of times of the distribution number of times list item record of resource mapping table is 1, due to this list item record be the last corresponding distribution number of times that distributes, current distribution number of times is 2.
Step 211, obtain optimized coefficients corresponding to current distribution number of times, perform step 212.
According to optimized coefficients corresponding to every sub-distribution in the described front P sub-distribution of current distribution number of times h inquiry, obtain optimized coefficients corresponding to described current distribution number of times, wherein, current distribution number of times is h=k+1.Example, suppose to arrange 3 times distribute in every sub-distribution corresponding optimized coefficients all, it is 1 that the invention process example assumes is distributed corresponding optimized coefficients for the first time, distributing for the second time corresponding optimized coefficients is 4, distributing for the third time corresponding optimized coefficients is 8.If the distribution number of times obtaining from resource mapping table is 1, current distribution number of times is 2, inquires that to distribute for the second time corresponding optimized coefficients be 4; If the distribution number of times of resource mapping table record is 2, current distribution number of times is 3, inquires that to distribute for the third time corresponding optimized coefficients be 8.
Step 212, according to the stock number of optimized coefficients and default port piece, determine that current need distribute to the stock number of the port piece of described subscriber equipment, perform step 213.
According to the stock number of described optimized coefficients and described default port piece, by resource adjustment formula, determine that described current need distribute to the stock number of the port piece of described subscriber equipment, described resource adjustment formula is:
S h = S 0 M ;
Wherein, described S 0for the stock number of described default port piece, described S hfor described current need, distribute to the stock number of the port piece of described subscriber equipment, described M is described optimized coefficients, the current distribution number of times that described h is described subscriber equipment.
Example, the stock number S of default port piece 0be 2000, current distribution number of times h is 2, and optimized coefficients M is 4, by resource adjustment formula, obtains the stock number S that current need are distributed to the port piece of described subscriber equipment 2:
S 2 = 2000 4 = 500 ,
CGN devices allocation is 500 to the stock number of the port piece of described subscriber equipment.
Step 213, from the second port resource, according to current need, distribute to subscriber equipment the stock number of port piece to described user equipment allocation port piece, perform step 214.
Concrete, the stock number of supposing the port resource that address after a conversion is reserved has 2000, wherein the first port resource comprises 1300 stock numbers, the second port resource comprises 700 stock numbers, subscriber equipment need to carry out three sub-distribution, CGN equipment carries out three sub-distribution port pieces to subscriber equipment, and the stock number of described port piece is followed successively by 200,50 and 25.CGN equipment second and the port piece distributing for the third time, stock number is the port piece that the port piece of 50 and stock number are 25, is that the port resource by the second port resource distributes.
So, the port piece that CGN equipment is same user equipment allocation can be in same reference address, avoids the situation that causes follow-up distribution to carry out to the port piece rear port runs out of resource sets of user equipment allocation for the first time.
The distribution number of times recording in step 214, renewal resource mapping table.
The distribution number of times obtaining from resource mapping table is added to 1 and obtain current distribution number of times, with described current distribution number of times, upgrade the distribution number of times recording in described resource mapping table.
It should be noted that; the sequencing of the resource allocation methods step that the embodiment of the present invention provides can suitably be adjusted; step also can according to circumstances be carried out corresponding increase and decrease; anyly be familiar with those skilled in the art in the technical scope that the present invention discloses; can expect easily the method changing; within all should being encompassed in protection scope of the present invention, therefore repeat no more.Meanwhile, the acquisition methods of distribution number of times also can have multiple, example, in initialization procedure, can directly in resource mapping table, arrange and distribute number of times list item, and to record this list item be 0, dividing for the first time the current distribution number of times that timing obtains is 0+1=1, and the acquiescence optimized coefficients obtaining is 1.CGN equipment also can arrange special statistic unit, for recording current distribution number of times.
What deserves to be explained is, after CGN equipment is to user equipment allocation port piece, CGN equipment judges whether to proceed to distribute, and the stock number size of the port that the summation of the stock number of the port piece that CGN equipment can be fitted on by judgement and subscriber equipment need judges whether to proceed to distribute.If current h sub-distribution to the stock number summation of port piece be more than or equal to the stock number of the port that subscriber equipment needs, no longer distribute; If current h sub-distribution to the stock number summation of port piece be less than the stock number of the port that subscriber equipment needs, proceed to distribute, wherein h represents current distribution number of times.
Example, suppose subscriber equipment PC(personal computer, personal computer) 1 needs 1500 port resources, PC2 needs 2100 port resources and PC3 to need 2510 port resources, subscriber equipment PC1, the source address of PC2 and PC3 is respectively 192.168.0.1, 192.168.0.2 and 192.168.0.3, after changing, address is 202.103.0.20, after conversion, the stock number of the port of address has 12000, the stock number of the first port resource is 8000, from 1 to 8000, the stock number of the second port resource is 4000, port numbers is 8001 to 12000, the stock number of default port piece is 2000, the optimized coefficients distributing is for the second time 4, the optimized coefficients distributing is for the third time 5, PC1, stock number and the port numbers of the port piece that PC2 and PC3 distribute are as shown in table 3.
When PC1 needs CGN devices allocation port piece, after conversion corresponding to PC1 source address, address is 202.103.0.20, first CGN equipment judge that whether current distribution is for distributing for the first time, obtaining current distribution is to distribute for the first time, from resource mapping table, obtain the current distribution number of times of user, the corresponding list item that does not distribute number of times in resource mapping table, obtain less than current distribution number of times, giving tacit consent to current distribution number of times is 1, CGN equipment is directly from the first port resource acquisition port piece, the stock number of this port piece is 2000 of the stock numbers of default port piece, described port piece is distributed to PC1, the port numbers of described port piece from 1 to 2000, simultaneously, the newly-increased number of times hurdle that distributes in resource mapping table, with current distribution number of times 1, upgrade the content on described distribution number of times hurdle, 2000 of the stock numbers of described port piece are greater than 1500 of the stock numbers of PC1 demand, CGN equipment no longer distributes.
When PC2 needs CGN devices allocation port piece, after conversion corresponding to PC2 source address, address is 202.103.0.20, CGN equipment obtains the stock number of default port piece, judge that whether current distribution is for distributing for the first time, obtaining current distribution is to distribute for the first time, from resource mapping table, obtain the current distribution number of times of user, the corresponding list item that does not distribute number of times in resource mapping table, obtain less than current distribution number of times, giving tacit consent to current distribution number of times is 1, CGN equipment is directly from the first port resource acquisition port piece, the stock number of this port piece is 2000 of the stock numbers of default port piece, described port piece is distributed to PC2, the port numbers of described port piece from 2001 to 4000, simultaneously, the newly-increased number of times hurdle that distributes in resource mapping table, with current distribution number of times 1, upgrade the content on described distribution number of times hurdle, 2000 of the stock numbers of described port piece are less than 2100 of the stock numbers of PC2 demand, CGN equipment is proceeded to distribute, CGN equipment judges that whether current distribution is for distributing for the first time, obtaining current distribution is not to distribute for the first time, from resource mapping table, obtain distribution number of times, described distribution number of times is the last distribution number of times distributing, described distribution number of times is 1, current distribution number of times is 2, with distribution for the second time, inquiring corresponding optimized coefficients is 4, the stock number that calculates port piece by resource adjustment formula is 500, CGN equipment obtains described port piece from the second port resource, distribute to PC2, the port numbers of described port piece from 8001 to 8500, simultaneously, the described distribution number of times 1 obtaining from resource mapping table adds 1 and obtains current distribution number of times 2, with the distribution number of times recording in the described resource mapping table of 2 renewal, for the first time and the stock number of the port piece being assigned to be for the second time 2100 of 2500 stock numbers that are greater than the needed port of PC2, CGN equipment no longer distributes.
When PC3 needs CGN devices allocation port piece, after conversion corresponding to PC3 source address, address is 202.103.0.20, CGN equipment obtains the stock number of default port piece, judge that whether current distribution is for distributing for the first time, obtaining current distribution is to distribute for the first time, from resource mapping table, obtain the current distribution number of times of user, the corresponding list item that does not distribute number of times in resource mapping table, obtain less than current distribution number of times, giving tacit consent to current distribution number of times is 1, CGN equipment is directly from the first port resource acquisition port piece, the stock number of this port piece is 2000 of the stock numbers of default port piece, described port piece is distributed to PC3, the port numbers of described port piece from 4001 to 6000, simultaneously, the newly-increased number of times hurdle that distributes in resource mapping table, with current distribution number of times 1, upgrade the content on described distribution number of times hurdle, 2000 of the stock numbers of described port piece are less than 2510 of the stock numbers of PC3 demand, CGN equipment is proceeded to distribute, CGN equipment judges that whether current distribution is for distributing for the first time, obtaining current distribution is not to distribute for the first time, from resource mapping table, obtain distribution number of times, described distribution number of times is the last distribution number of times distributing, described distribution number of times is 1, current distribution number of times is 2, with distribution for the second time, inquiring corresponding optimized coefficients is 4, the stock number that calculates port piece by resource adjustment formula is 500, CGN equipment obtains described port piece from the second port resource, distribute to PC3, the port numbers of described port piece from 8501 to 9000, simultaneously, the described distribution number of times 1 obtaining from resource mapping table is added to 1 and obtain current distribution number of times 2, with the distribution number of times recording in the described resource mapping table of 2 renewal, for the first time and the stock number of the port piece being assigned to be for the second time 2510 of 2500 stock numbers that are less than the needed port of PC3, CGN equipment is proceeded to distribute, CGN equipment judges that whether current distribution is for distributing for the first time, obtaining current distribution is not to distribute for the first time, from resource mapping table, obtain distribution number of times, described distribution number of times is the last distribution number of times distributing, described distribution number of times is 2, current distribution number of times is 3, with distributing and inquire corresponding optimized coefficients 5 for the third time, the stock number that calculates port piece by resource adjustment formula is 400, CGN equipment obtains described port piece from the second port resource, distribute to PC3, the port numbers of described port piece from 9001 to 9400, simultaneously, the described distribution number of times 2 obtaining from resource mapping table adds 1 and obtains current distribution number of times 3, with the distribution number of times recording in the described resource mapping table of 3 renewal, for the first time, for the second time and the stock number of the port piece being assigned to be for the third time 2510 of 2900 stock numbers that are greater than the needed port of PC3, CGN equipment no longer distributes.
Table 3
Figure BDA0000419285000000101
Figure BDA0000419285000000111
The resource allocation methods that the embodiment of the present invention provides, CGN equipment can be according to the stock number of optimized coefficients and default port piece, determine that current need distribute to the stock number of the port piece of subscriber equipment, CGN equipment can be distributed to subscriber equipment by suitable port piece, avoided the waste of stock number, reduce repetitive operation, reduced the impact on CGN capacity of equipment, therefore improved the utilance of the port resource of CGN equipment.
The embodiment of the present invention provides a kind of CGN equipment 30, as shown in Figure 3, comprising:
The first acquiring unit 301, for obtaining the stock number of default port piece;
Second acquisition unit 302, for obtaining the current distribution number of times of subscriber equipment;
The 3rd acquiring unit 303, for obtaining optimized coefficients corresponding to described current distribution number of times;
Determining unit 304, for according to the stock number of described optimized coefficients and described default port piece, determines that current need distribute to the stock number of the port piece of described subscriber equipment.
So, the determining unit of CGN equipment can be according to the stock number of optimized coefficients and default port piece, determine that current need distribute to the stock number of the port piece of subscriber equipment, CGN equipment can be distributed to subscriber equipment by suitable port piece, avoided the waste of stock number, reduce repetitive operation, reduced the impact on CGN capacity of equipment, therefore improved the utilance of the port resource of CGN equipment.
Described second acquisition unit 302 specifically for:
The distribution number of times of Gains resources mapping table record;
Described distribution number of times is added to 1 and obtain described current distribution number of times.
Described the 3rd acquiring unit 303 specifically for:
According to optimized coefficients corresponding to every sub-distribution in the described front P sub-distribution of described current distribution number of times inquiry, obtain optimized coefficients corresponding to described current distribution number of times.
Described determining unit 304 specifically for:
According to the stock number of described optimized coefficients and described default port piece, by resource adjustment formula, determine that described current need distribute to the stock number of the port piece of described subscriber equipment, described resource adjustment formula is:
S h = S 0 M ;
Wherein, described S 0for the stock number of described default port piece, described S hfor described current need, distribute to the stock number of the port piece of described subscriber equipment, described M is described optimized coefficients, the current distribution number of times that described h is described subscriber equipment.
Described CGN equipment 30, as shown in Figure 4, also comprises:
Updating block 305, for upgrading with described current distribution number of times the distribution number of times that described resource mapping table records.
Setting unit 306, for optimized coefficients corresponding to the every sub-distribution of front P sub-distribution is set, described P is less than or equal to 3 positive integer;
Described CGN equipment 30, as shown in Figure 5, also comprises:
Reserved unit 307, is used to reserved the first port resource in described subscriber equipment address after same conversion and the second port resource;
The first allocation units 308, for being 1 o'clock at described current distribution number of times, the stock number of port piece of distributing to described subscriber equipment according to described current need from described the first port resource is to described user equipment allocation port piece;
The second allocation units 309, for not being 1 o'clock at described current distribution number of times, the stock number of port piece of distributing to described subscriber equipment according to described current need from described the second port resource is to described user equipment allocation port piece.
One of ordinary skill in the art will appreciate that: all or part of step that realizes said method embodiment can complete by the relevant hardware of program command, aforesaid program can be stored in a computer read/write memory medium, this program, when carrying out, is carried out the step that comprises said method embodiment; And aforesaid storage medium comprises: various media that can be program code stored such as ROM, RAM, magnetic disc or CDs.
The above; be only the specific embodiment of the present invention, but protection scope of the present invention is not limited to this, is anyly familiar with those skilled in the art in the technical scope that the present invention discloses; can expect easily changing or replacing, within all should being encompassed in protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection range of described claim.

Claims (10)

1. a resource allocation methods, is characterized in that, is applied to carrier class networks address transition CGN equipment, comprising:
Obtain the stock number of default port piece;
Obtain the current distribution number of times of subscriber equipment;
Obtain optimized coefficients corresponding to described current distribution number of times;
According to the stock number of described optimized coefficients and described default port piece, determine that current need distribute to the stock number of the port piece of described subscriber equipment.
2. method according to claim 1, is characterized in that,
Describedly obtain current distribution number of times and comprise:
The distribution number of times of Gains resources mapping table record;
Described distribution number of times is added to 1 and obtain described current distribution number of times;
Described described obtain current distribution number of times after, described method also comprises:
With described current distribution number of times, upgrade the distribution number of times recording in described resource mapping table.
3. method according to claim 1, is characterized in that, before obtaining the stock number of default port piece, described method also comprises:
Optimized coefficients corresponding to every sub-distribution in front P sub-distribution is set;
Described optimized coefficients corresponding to described current distribution number of times that obtain comprises:
According to optimized coefficients corresponding to every sub-distribution in the described front P sub-distribution of described current distribution number of times inquiry, obtain optimized coefficients corresponding to described current distribution number of times.
4. method according to claim 1, is characterized in that, described according to the stock number of described optimized coefficients and described default port piece, determines that the current stock number of the port piece of distribution that needs comprises:
According to the stock number of described optimized coefficients and described default port piece, by resource adjustment formula, determine that described current need distribute to the stock number of the port piece of described subscriber equipment, described resource adjustment formula is:
S h = S 0 M ;
Wherein, described S 0for the stock number of described default port piece, described S hfor described current need, distribute to the stock number of the port piece of described subscriber equipment, described M is described optimized coefficients, the current distribution number of times that described h is described subscriber equipment.
5. according to the method described in claim 1 to 4 any one claim, it is characterized in that,
Described before obtaining the stock number of default port piece, described method also comprises:
For reserved the first port resource in described subscriber equipment address after same conversion and the second port resource;
Described, according to the stock number of described optimized coefficients and described default port piece, after determining that current need are distributed to the stock number of port piece of described subscriber equipment, described method also comprises:
When described current distribution number of times is 1, the stock number of port piece of distributing to described subscriber equipment according to described current need from described the first port resource is to described user equipment allocation port piece;
When described current distribution number of times is not 1, the stock number of port piece of distributing to described subscriber equipment according to described current need from described the second port resource is to described user equipment allocation port piece.
6. a CGN equipment, is characterized in that, comprising:
The first acquiring unit, for obtaining the stock number of default port piece;
Second acquisition unit, for obtaining the current distribution number of times of subscriber equipment;
The 3rd acquiring unit, for obtaining optimized coefficients corresponding to described current distribution number of times;
Determining unit, for according to the stock number of described optimized coefficients and described default port piece, determines that current need distribute to the stock number of the port piece of described subscriber equipment.
7. CGN equipment according to claim 6, is characterized in that,
Described second acquisition unit specifically for:
The distribution number of times of Gains resources mapping table record;
Described distribution number of times is added to 1 and obtain described current distribution number of times;
Described CGN equipment also comprises:
Updating block, for upgrading with described current distribution number of times the distribution number of times that described resource mapping table records.
8. CGN equipment according to claim 6, is characterized in that, described CGN equipment also comprises:
Setting unit, for arranging optimized coefficients corresponding to the every sub-distribution of front P sub-distribution;
Described the 3rd acquiring unit specifically for:
According to optimized coefficients corresponding to every sub-distribution in the described front P sub-distribution of described current distribution number of times inquiry, obtain optimized coefficients corresponding to described current distribution number of times.
9. CGN equipment according to claim 6, is characterized in that, described determining unit specifically for:
According to the stock number of described optimized coefficients and described default port piece, by resource adjustment formula, determine that described current need distribute to the stock number of the port piece of described subscriber equipment, described resource adjustment formula is:
S h = S 0 M ;
Wherein, described S 0for the stock number of described default port piece, described S hfor described current need, distribute to the stock number of the port piece of described subscriber equipment, described M is described optimized coefficients, the current distribution number of times that described h is described subscriber equipment.
10. according to the CGN equipment described in claim 6 to 9 any one claim, it is characterized in that, described CGN equipment also comprises:
Reserved unit, is used to reserved the first port resource in described subscriber equipment address after same conversion and the second port resource;
The first allocation units, for being 1 o'clock at described current distribution number of times, the stock number of port piece of distributing to described subscriber equipment according to described current need from described the first port resource is to described user equipment allocation port piece;
The second allocation units, for not being 1 o'clock at described current distribution number of times, the stock number of port piece of distributing to described subscriber equipment according to described current need from described the second port resource is to described user equipment allocation port piece.
CN201310595049.1A 2013-11-21 2013-11-21 A kind of resource allocation methods and equipment Active CN103560979B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310595049.1A CN103560979B (en) 2013-11-21 2013-11-21 A kind of resource allocation methods and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310595049.1A CN103560979B (en) 2013-11-21 2013-11-21 A kind of resource allocation methods and equipment

Publications (2)

Publication Number Publication Date
CN103560979A true CN103560979A (en) 2014-02-05
CN103560979B CN103560979B (en) 2017-03-29

Family

ID=50015131

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310595049.1A Active CN103560979B (en) 2013-11-21 2013-11-21 A kind of resource allocation methods and equipment

Country Status (1)

Country Link
CN (1) CN103560979B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105939404A (en) * 2016-05-04 2016-09-14 杭州迪普科技有限公司 NAT (Network Address Translation) resource obtaining method and device
CN112688886A (en) * 2020-12-21 2021-04-20 中国联合网络通信集团有限公司 Determination method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050138193A1 (en) * 2003-12-19 2005-06-23 Microsoft Corporation Routing of resource information in a network
CN101262506A (en) * 2008-04-21 2008-09-10 杭州华三通信技术有限公司 Allocation method and system for network address conversion port resource under distributed architecture
CN101350732A (en) * 2007-07-18 2009-01-21 中国移动通信集团公司 Method and apparatus for analysis processing and testing network resource utilization situation of transmission network
CN102404236A (en) * 2011-12-30 2012-04-04 苏州山石网络有限公司 Method for allocating NAT (network address translation) port resources in distributed system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050138193A1 (en) * 2003-12-19 2005-06-23 Microsoft Corporation Routing of resource information in a network
CN101350732A (en) * 2007-07-18 2009-01-21 中国移动通信集团公司 Method and apparatus for analysis processing and testing network resource utilization situation of transmission network
CN101262506A (en) * 2008-04-21 2008-09-10 杭州华三通信技术有限公司 Allocation method and system for network address conversion port resource under distributed architecture
CN102404236A (en) * 2011-12-30 2012-04-04 苏州山石网络有限公司 Method for allocating NAT (network address translation) port resources in distributed system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105939404A (en) * 2016-05-04 2016-09-14 杭州迪普科技有限公司 NAT (Network Address Translation) resource obtaining method and device
CN105939404B (en) * 2016-05-04 2019-02-19 杭州迪普科技股份有限公司 The acquisition methods and device of NAT resource
CN112688886A (en) * 2020-12-21 2021-04-20 中国联合网络通信集团有限公司 Determination method and device

Also Published As

Publication number Publication date
CN103560979B (en) 2017-03-29

Similar Documents

Publication Publication Date Title
CN101986665B (en) Internet protocol version 6 (IPV6) address allocating method and system
CN110351375B (en) Data processing method and device, computer device and readable storage medium
CN104954468A (en) Resource allocation method and resource allocation device
WO2010054395A3 (en) Dynamic frequency assignment in a multi-beam system
CN102932777A (en) Method for updating terminal application and user terminal
CN103440202A (en) RDMA-based (Remote Direct Memory Access-based) communication method, RDMA-based communication system and communication device
CN101799788B (en) Level-to-level administration method and system of storage resources
CN104077239A (en) IP hard disk, and memory system and data operation method thereof
CN104333610A (en) IPv6 address allocation method and device
CN104202305B (en) A kind of trans-coding treatment method, device and server
CN105812505A (en) Method and device for renewing lease of IP address of terminal equipment
CN102148654A (en) System and method based on network side compiling
CN102831000B (en) The method and system of system upgrade
CN103560979A (en) Resource distribution method and device
CN103336670A (en) Method and device for automatic distribution of data blocks based on data temperature
CN104426794A (en) A message forwarding method and device
CN103260196B (en) A kind of control method of transmission bandwidth, Apparatus and system
CN102316176B (en) Packet processing and tracing methods, apparatuses thereof and systems thereof
CN104144490A (en) Method, terminal, network server and system for opening account of user card
CN101848056B (en) Method and device for transmitting packets
CN105553714A (en) Service configuration method and system
CN103051544B (en) Realize method and the access device of IPv4 private network access IPv6 network
CN103974224A (en) Credit control method and equipment
CN105389212A (en) Job assigning method and apparatus
CN110996325B (en) AP network resource allocation method, device, equipment, system and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant