CN103560979B - A kind of resource allocation methods and equipment - Google Patents

A kind of resource allocation methods and equipment Download PDF

Info

Publication number
CN103560979B
CN103560979B CN201310595049.1A CN201310595049A CN103560979B CN 103560979 B CN103560979 B CN 103560979B CN 201310595049 A CN201310595049 A CN 201310595049A CN 103560979 B CN103560979 B CN 103560979B
Authority
CN
China
Prior art keywords
port block
distribution
resource
user equipment
port
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.)
Active
Application number
CN201310595049.1A
Other languages
Chinese (zh)
Other versions
CN103560979A (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

Landscapes

  • Information Transfer Between Computers (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

Embodiments of the invention provide a kind of resource allocation methods and equipment, are related to the communications field, it is possible to increase the utilization rate of the port resource of CGN equipment, including:CGN equipment obtains the stock number of default port block, obtain the current distribution number of times of user equipment, obtain the corresponding optimized coefficients of the current distribution number of times, further according to the optimized coefficients and the stock number of the default port block, it is determined that need to currently distribute to the stock number of the port block of the user equipment.The resource allocation methods and equipment application that embodiments of the invention are provided distribute in space resources.

Description

A kind of resource allocation methods and equipment
Technical field
The present invention relates to the communications field, more particularly to a kind of resource allocation methods and equipment.
Background technology
As working application innovation emerges in an endless stream, userbase rapid growth, the intellectuality of terminal, mobile bring shifting The great development of dynamic the Internet, while Telecom Carriers face IPv4(Internet Protocol version4, internet association View edition 4)The problem of Address Run Short.
In prior art, it is to solve the problems, such as that IPv4 Address Run Shorts adopt NAT(Network Address Translation, Network address translation)Scheme, the program are to continue to use IPv4 development services, by using privately owned(Retain)Address is converted into conjunction Method IP(Internet Protocol, Internet protocol)The switch technology of address carrys out scale deployment IPv4 private address, to reach The utilization rate of the public network IP v4 address after mapping is improved, such that it is able to IPv4 address problems be solved within considerable time.For The access for realizing user and the utilization rate for improving the public network IP v4 address after mapping, CGN(Carrier grade Network Address Translation, carrier class networks address conversion)Equipment is that multiple users distribute same translated addresses Different port block, the stock number of the port block are the summations of the port resource of the fixed number for pre-setting.Example, according to There are port requirements at family, CGN equipment to user equipment the first sub-distribution port resource block, if the port block of the first sub-distribution is finished Afterwards, port requirements of the stock number sum of all of the port block of CGN equipment distribution less than user, same asset of can reallocating amount Port block, until CGN equipment distribution port block be no longer less than user port requirements.
Generally, the port resource amount of user equipment demand is successively decreased with the increase of distribution number of times, and per sub-distribution Stock number to the port block of user equipment is identical, then if the setting of the stock number of port block is too big, in fact it could happen that The port resource amount for distributing to user equipment every time is far longer than the port resource amount of user equipment needs, then can cause a large amount of ends The waste of mouth resource, affects the ability of CGN equipment;If the setting of the stock number of port block is too little, in fact it could happen that divide every time The port resource amount of provisioned user equipment cannot meet the port resource amount demand of user equipment, then CGN equipment can be caused to repeat Frequently port block batch operation and the decline of CGN capacities of equipment.Therefore the method for prior art result in the port of CGN equipment The utilization rate of resource is relatively low.
The content of the invention
Embodiments of the invention provide a kind of resource allocation methods and equipment, it is possible to increase the port resource of CGN equipment Utilization rate.
To reach above-mentioned purpose, embodiments of the invention are adopted the following technical scheme that:
On the one hand, there is provided a kind of resource allocation methods, CGN equipment is applied to, including:
Obtain the stock number of default port block;
Obtain the current distribution number of times of user equipment;
Obtain the corresponding optimized coefficients of the current distribution number of times;
According to the optimized coefficients and the stock number of the default port block, it is determined that need to currently distribute to the user setting The stock number of standby port block.
On the other hand, there is provided a kind of CGN equipment, including:
First acquisition unit, for obtaining the stock number of default port block;
Second acquisition unit, for obtaining the current distribution number of times of user equipment;
3rd acquiring unit, for obtaining the corresponding optimized coefficients of the current distribution number of times;
Determining unit, for the stock number according to the optimized coefficients and the default port block, it is determined that need to currently divide The stock number of the port block of user equipment described in dispensing.
Resource allocation methods provided in an embodiment of the present invention, CGN equipment can be according to optimized coefficients and default port blocks Stock number, it is determined that need to currently distribute to the stock number of the port block of user equipment, CGN equipment can be by suitable port block point Provisioned user equipment.So, it is to avoid the waste of stock number, repetitive operation is reduced, reduce to CGN capacities of equipment Affect, therefore improve the utilization rate of the port resource of CGN equipment.
Description of the drawings
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing Accompanying drawing to be used needed for having technology description is briefly described, it should be apparent that, drawings in the following description are only this Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can be with Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is a kind of flow chart of resource allocation methods provided in an embodiment of the present invention;
Fig. 2 is the flow chart of another kind of resource allocation methods provided in an embodiment of the present invention;
Fig. 3 is a kind of structural representation of CGN equipment provided in an embodiment of the present invention;
Fig. 4 is the structural representation of another kind of CGN equipment provided in an embodiment of the present invention;
Fig. 5 is the structural representation of another CGN equipment provided in an embodiment of the present invention.
Specific 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 carried out clear, complete Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than the embodiment of whole.It is based on Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under the premise of creative work is not made Embodiment, belongs 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, including:
Step 101, the stock number for obtaining default port block.
The stock number of the default port block is the most suitable stock number for rule of thumb selecting.
Step 102, the current distribution number of times for obtaining user equipment.
Step 103, obtain the current distribution corresponding optimized coefficients of number of times.
Example, the corresponding optimized coefficients of every sub-distribution in front P sub-distribution can be set before step 101, in step Per the corresponding optimized coefficients of sub-distribution in P sub-distribution before inquiring about according to current distribution number of times in 103, the current distribution time is obtained The corresponding optimized coefficients of number.It is common, according to selection and the experience of port block resource allocation of the stock number of default port block, The value of suitable P is pre-set, the resource requirement of most of user equipmenies is met.The value of P described in practical application is 3.
Step 104, according to the optimized coefficients and the stock number of the default port block, it is determined that need to currently distribute to institute State the stock number of the port block of user equipment.
CGN equipment adjusts formula by resource true according to the optimized coefficients and the stock number of the default port block The stock number of the fixed current port block that need to distribute to the user equipment, the resource adjust formula and are:
Wherein, the S0For the stock number of the default port block, the ShCurrent the user need to be distributed to for described The stock number of the port block of equipment, the M are the optimized coefficients, and the h is the current distribution number of times of the user equipment.
So, CGN equipment can be according to optimized coefficients and the stock number of default port block, it is determined that currently needing distribution To the stock number of the port block of user equipment, suitable port block can be distributed to user equipment by CGN equipment, it is to avoid resource The waste of amount, reduces repetitive operation, reduces the impact to CGN capacities of equipment, therefore improves the port resource of CGN equipment Utilization rate.
The embodiment of the present invention provides a kind of resource allocation methods, is applied to CGN equipment, as shown in Fig. 2 including:
Step 201, setting CGN equipment optimization coefficients, execution step 202.
CGN equipment arranges the corresponding optimized coefficients of every sub-distribution in front P sub-distribution.It is common, according to port block resource point The experience matched somebody with somebody, pre-sets the value of suitable P, meets the resource requirement of most of user equipmenies.P described in practical application Value is 3.For example, only it is provided with and 3 times distributes corresponding optimized coefficients, when resource allocation is carried out, if distribution number of times exceedes 3, no longer it is the user equipment allocation port block.Specifically, CGN equipment gives the resource of the port block of user equipment allocation every time Amount is not quite similar, and according to many factors such as in the past different user equipment features, applied environment features, is that user equipment is advance The corresponding optimized coefficients of different distribution number of times are set.
Example, it is assumed that P=3, then the corresponding optimized coefficients of every sub-distribution in 3 times distribution are set, the embodiment of the present invention is false If the corresponding optimized coefficients of the first sub-distribution are 1, the corresponding optimized coefficients of the second sub-distribution are 4, distribute corresponding excellent for the third time It is 8 to change coefficient, and the optimized coefficients are set to what is be gradually incremented by embodiments of the present invention, ensureing, in subsequent process, to be The stock number of the port block of user equipment allocation is gradually successively decreased, i.e., the stock number of the port block of the first sub-distribution is more than second point The stock number of the port block matched somebody with somebody, the stock number of the port block of the second sub-distribution are more than the stock number of the port block of third time distribution.
Step 202, be user equipment in the reserved first port resource of same translated addresses and second port resource, perform Step 203.
It is common, CGN equipment be the port block of same user equipment allocation in same translated addresses, in order to ensure this The availability of the application of user equipment.The port resource that translated addresses are reserved can be divided into two parts by the CGN equipment, Used as first port resource, another part is used as second port resource, the generally money of the first port resource for one part Source amount is more than the second port resource.The first port resource is used for CGN equipment in first time to user equipment allocation Port resource is provided during port block;The second port resource is used for CGN equipment at second and later to user equipment allocation Port block when port resource is provided.So, CGN equipment is user equipment in the reserved first port of same translated addresses Resource and second port resource, can avoid first time to user equipment allocation port block rear port resource use up and cause after The situation that continuous distribution cannot be carried out.It should be noted that the second port resource can also be divided into finer port Resource, provides port resource in port block of the corresponding number of times to user equipment allocation in order to CGN equipment.
What deserves to be explained is, first port resource and second port resource are only not only a user equipment service, and It is all user equipment services to need the translated addresses.
Step 203, the stock number for obtaining default port block, execution step 204.
The stock number of the default port block is the most suitable stock number for rule of thumb selecting.The default port When the stock number of block is initialized, the stock number of the port block for pre-setting.In practical application, the stock number of default port block For 2000.
Whether step 204, the current distribution of judgement are the first sub-distribution.If so, execution step 205, if it is not, execution step 210。
Step 205, the current distribution number of times for obtaining user equipment, execution step 206.
Resource mapping table is the information table of the user equipment that system is arranged in resource allocation process, and the content of record can be with Source address, conversion address, conversion rear end slogan, agreement and distribution number of times including user equipment, resource mapping table such as table 1, table 2 It is shown.
Table 1
Source address Conversion address Conversion rear end slogan Agreement
Table 2
Source address Conversion address Conversion rear end slogan Agreement Distribution number of times
CGN equipment can obtain user from resource mapping table and currently distribute number of times, but esource impact in prior art The corresponding list item of number of times is not distributed in table, as shown in table 1.Obtain when then CGN equipment distributes first less than current distribution number of times, Then the current distribution number of times of CGN equipment acquiescence is 1.
Step 206, the corresponding optimized coefficients of the current distribution number of times of acquisition, execution step 207.
It is 1 that the embodiment of the present invention gives tacit consent to the corresponding optimized coefficients of the first sub-distribution.
Step 207, according to optimized coefficients and the stock number of default port block, it is determined that need to currently distribute to the user setting The stock number of standby port block, execution step 208.
According to the optimized coefficients and the stock number of the default port block, formula is adjusted by resource and determines described working as The stock number of the front port block that need to distribute to the user equipment, the resource adjust formula and are:
Wherein, the S0For the stock number of the default port block, the ShCurrent the user need to be distributed to for described The stock number of the port block of equipment, the M are the optimized coefficients, and the h is the current distribution number of times of the user equipment.
Current distribution number of times h=1, the corresponding optimized coefficients of the first sub-distribution are 1, can be calculated by resource adjustment formula CGN equipment gives stock number S of the port block of user equipment allocation for the first time1=S0/1=S0, S1For the stock number of default port block S0
Step 208, the stock number from first port resource according to the current port block that need to distribute to user equipment To the user equipment allocation port block, execution step 209.
What deserves to be explained is, in the first sub-distribution, CGN equipment can not need execution step 205, step 206 and step Rapid 207, direct execution step 208, it is default port block that acquiescence need to currently distribute to the stock number of the port block of user equipment Stock number.
The distribution number of times recorded in step 209, renewal resource mapping table.
Increase distribution number of times list item in resource mapping table newly, resource mapping table as shown in table 2, uses current distribution number of times 1 more The content on the new distribution number of times hurdle, obtains distribution number of times by the resource mapping table in order to resource allocation process next time.
Step 210, the current distribution number of times for obtaining user equipment, execution step 211.
CGN equipment obtains the distribution number of times k of esource impact table record, using h=k+1 as current distribution number of times.Example, Distribution number of times such as the distribution number of times list item record of resource mapping table is 1, and due to the list item record is last distribution correspondence Distribution number of times, then currently distribute number of times be 2.
Step 211, the corresponding optimized coefficients of the current distribution number of times of acquisition, execution step 212.
Inquired about in the front P sub-distribution per the corresponding optimized coefficients of sub-distribution according to current distribution number of times h, obtain described working as It is front to distribute number of times corresponding optimized coefficients, wherein, current distribution number of times is h=k+1.Example, it is assumed that arrange in 3 times distributing Optimized coefficients are corresponded to per sub-distribution all, the embodiment of the present invention assumes that the corresponding optimized coefficients of the first sub-distribution are 1, the second sub-distribution Corresponding optimized coefficients are 4, distribute corresponding optimized coefficients for the third time for 8.If the distribution number of times obtained from resource mapping table is 1, then it is 2 currently to distribute number of times, and it is 4 to inquire the corresponding optimized coefficients of the second sub-distribution;If the distribution of esource impact table record Number of times is 2, then it is 3 currently to distribute number of times, and inquire third time to distribute corresponding optimized coefficients is 8.
Step 212, according to optimized coefficients and the stock number of default port block, it is determined that need to currently distribute to the user setting The stock number of standby port block, execution step 213.
According to the optimized coefficients and the stock number of the default port block, formula is adjusted by resource and determines described working as The stock number of the front port block that need to distribute to the user equipment, the resource adjust formula and are:
Wherein, the S0For the stock number of the default port block, the ShCurrent the user need to be distributed to for described The stock number of the port block of equipment, the M are the optimized coefficients, and the h is the current distribution number of times of the user equipment.
Example, stock number S of default port block0For 2000, current distribution number of times h is 2, and optimized coefficients M is 4, Stock number S of the port block that formula obtains currently distributing to the user equipment is adjusted by resource2
The stock number that then CGN equipment distributes to the port block of the user equipment is 500.
Step 213, from second port resource according to the stock number of the port block that need to currently distribute to user equipment to institute State user equipment allocation port block, execution step 214.
Specifically, it is assumed that the stock number of the reserved port resource of translated addresses has 2000, wherein first port Resource includes 1300 stock numbers, and second port resource includes 700 stock numbers, and user equipment needs to carry out three sub-distribution, CGN Equipment carries out three sub-distribution port blocks to user equipment, and the stock number of the port block is followed successively by 200,50 and 25.CGN Equipment second and the port block of third time distribution, i.e. stock number are the port block of 50 and port block that stock number is 25, are It is allocated by the port resource of second port resource.
So, CGN equipment is that the port block of same user equipment allocation can be in same conversion address, it is to avoid The situation that cause follow-up distribution cannot carry out is used up to the port block rear port resource of user equipment allocation in first time.
The distribution number of times recorded in step 214, renewal resource mapping table.
The distribution number of times obtained from resource mapping table is added 1 and is currently distributed number of times, with the current distribution number of times The distribution number of times recorded in updating the resource mapping table.
It should be noted that the sequencing of resource allocation methods step provided in an embodiment of the present invention can be carried out suitably Adjustment, step according to circumstances accordingly can also be increased and decreased, any those familiar with the art the invention discloses Technical scope in, the method that can readily occur in change should all be included within the scope of the present invention, therefore no longer go to live in the household of one's in-laws on getting married State.Meanwhile, the acquisition methods for distributing number of times can also have various, example, in initialization procedure, directly can reflect in resource Distribution number of times list item is set in firing table, and the list item is recorded for 0, then the current distribution number of times for obtaining during the first sub-distribution is 0+1= 1, the acquiescence optimized coefficients of acquisition are 1.CGN equipment can also 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 block, CGN equipment judges whether to proceed Distribution, CGN equipment can pass through the port that the summation of the stock number of the port block for judging to be fitted on is needed with user equipment Stock number size is judging whether to proceed distribution.If current h sub-distribution to the stock number summation of port block be more than or wait The stock number of the port needed in user equipment, is no longer allocated;If the stock number summation of the port block that current h sub-distribution is arrived The stock number of the port needed less than user equipment, proceeds distribution, and wherein h represents current distribution number of times.
Example, it is assumed that user equipment PC(Personal computer, personal computer)1 needs 1500 port moneys Source, PC2 need 2100 port resources and PC3 to need 2510 port resources, the source address of user equipment PC1, PC2 and PC3 Respectively 192.168.0.1,192.168.0.2 and 192.168.0.3, translated addresses are 202.103.0.20, after conversion The stock number of the port of location has 12000, and the stock number of first port resource is 8000, from 1 to 8000, second port resource Stock number be 4000, port numbers are 8001 to 12000, and the stock number of default port block is 2000, the second sub-distribution Optimized coefficients be 4, third time distribution optimized coefficients be 5, PC1, PC2 and PC3 distribution port block stock number and port Number as shown in table 3.
When PC1 needs CGN equipment distribution port block, the corresponding translated addresses of PC1 source addresses are 202.103.0.20, CGN equipment first determines whether whether current distribution is the first sub-distribution, and it is the first sub-distribution to obtain current distribution, from resource mapping table Middle acquisition user currently distributes number of times, does not distribute the corresponding list item of number of times in resource mapping table, obtains less than current distribution time Number, the current distribution number of times of acquiescence are 1, CGN equipment directly from first port resource acquisition port block, and the stock number of the port block is The port block is distributed to PC1 by the stock number of default port block 2000, the port numbers of the port block from 1 to 2000, Meanwhile, increase distribution number of times hurdle in resource mapping table newly, the content on the distribution number of times hurdle, institute are updated with current distribution number of times 1 2000 stock numbers 1500 more than PC1 demands of stock number of port block are stated, CGN equipment is no longer allocated.
When PC2 needs CGN equipment distribution port block, the corresponding translated addresses of PC2 source addresses are 202.103.0.20, CGN equipment obtains the stock number of default port block, judges whether current distribution is the first sub-distribution, and it is the to obtain current distribution Primary distribution, from resource mapping table obtains user and currently distributes number of times, do not distribute the respective table of number of times in resource mapping table , obtaining less than current distribution number of times, the current distribution number of times of acquiescence is 1, CGN equipment directly from first port resource acquisition port Block, the stock number of the port block is the stock number 2000 of default port block, and the port block is distributed to PC2, the end The port numbers of buccal mass from 2001 to 4000, meanwhile, increase distribution number of times hurdle in resource mapping table newly, with current distribution number of times 1 more The content on the new distribution number of times hurdle, 2000 stock numbers 2100 less than PC2 demands of stock number of the port block, CGN Equipment proceeds distribution;CGN equipment judges whether current distribution is the first sub-distribution, and it is not to divide for the first time currently to be distributed Match somebody with somebody, obtain distribution number of times from resource mapping table, the distribution number of times is the distribution number of times of last distribution, the distribution number of times For 1, current distribution number of times is 2, inquires corresponding optimized coefficients for 4 with the second sub-distribution, adjusts formula by resource and calculate The stock number of exit port block is 500, and port block described in CGN equipment from second port resource acquisition distributes to PC2, the end The port numbers of buccal mass from 8001 to 8500, meanwhile, the distribution number of times 1 obtained from resource mapping table Jia 1 and is currently distributed Number of times 2, updates the distribution number of times recorded in the resource mapping table, the money of the port block being assigned to for the first time and for the second time with 2 Source amount is 2500 stock numbers 2100 more than the port required for PC2, and CGN equipment is no longer allocated.
When PC3 needs CGN equipment distribution port block, the corresponding translated addresses of PC3 source addresses are 202.103.0.20, CGN equipment obtains the stock number of default port block, judges whether current distribution is the first sub-distribution, and it is the to obtain current distribution Primary distribution, from resource mapping table obtains user and currently distributes number of times, do not distribute the respective table of number of times in resource mapping table , obtaining less than current distribution number of times, the current distribution number of times of acquiescence is 1, CGN equipment directly from first port resource acquisition port Block, the stock number of the port block is the stock number 2000 of default port block, and the port block is distributed to PC3, the end The port numbers of buccal mass from 4001 to 6000, meanwhile, increase distribution number of times hurdle in resource mapping table newly, with current distribution number of times 1 more The content on the new distribution number of times hurdle, 2000 stock numbers 2510 less than PC3 demands of stock number of the port block, CGN Equipment proceeds distribution;CGN equipment judges whether current distribution is the first sub-distribution, and it is not to divide for the first time currently to be distributed Match somebody with somebody, obtain distribution number of times from resource mapping table, the distribution number of times is the distribution number of times of last distribution, the distribution number of times For 1, then it is 2 currently to distribute number of times, inquires corresponding optimized coefficients for 4 with the second sub-distribution, adjusts formula meter by resource The stock number for calculating port block is 500, and port block described in CGN equipment from second port resource acquisition distributes to PC3, described The port numbers of port block from 8501 to 9000, meanwhile, the distribution number of times 1 obtained from resource mapping table Jia 1 and is obtained currently Distribution number of times 2, updates the distribution number of times recorded in the resource mapping table, the port block being assigned to for the first time and for the second time with 2 Stock number be 2500 stock numbers 2510 less than the ports required for PC3, CGN equipment proceeds distribution;CGN equipment Judge whether current distribution is the first sub-distribution, and it is not the first sub-distribution currently to be distributed, obtain from resource mapping table and divide With number of times, the distribution number of times is the distribution number of times of last distribution, and the distribution number of times is 2, and current distribution number of times is 3, is used Third time distribution inquires corresponding optimized coefficients 5, and the stock number that port block is calculated by resource adjustment formula is 400, Port block described in CGN equipment from second port resource acquisition, distributes to PC3, the port numbers of the port block from 9001 to 9400, Meanwhile, the distribution number of times 2 obtained from resource mapping table Jia 1 and is currently distributed number of times 3, updates the esource impact with 3 The distribution number of times recorded in table, the stock number of the port block being assigned to for the first time, for the second time and for the third time are 2900 and are more than PC3 The stock number of required port 2510, CGN equipment is no longer allocated.
Table 3
Resource allocation methods provided in an embodiment of the present invention, CGN equipment can be according to optimized coefficients and default port blocks Stock number, it is determined that need to currently distribute to the stock number of the port block of user equipment, CGN equipment can be by suitable port block point Provisioned user equipment, it is to avoid the waste of stock number, reduces repetitive operation, reduces the impact to CGN capacities of equipment, therefore Improve the utilization rate 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, including:
First acquisition unit 301, for obtaining the stock number of default port block;
Second acquisition unit 302, for obtaining the current distribution number of times of user equipment;
3rd acquiring unit 303, for obtaining the corresponding optimized coefficients of the current distribution number of times;
Determining unit 304, for the stock number according to the optimized coefficients and the default port block, it is determined that currently needing Distribute to the stock number of the port block of the user equipment.
So, the determining unit of CGN equipment can according to optimized coefficients and the stock number of default port block, it is determined that The stock number of the port block of user equipment need to be currently distributed to, suitable port block can be distributed to user equipment by CGN equipment, The waste of stock number is avoided, repetitive operation is reduced, the impact to CGN capacities of equipment is reduced, therefore is improve CGN equipment Port resource utilization rate.
The second acquisition unit 302 specifically for:
Obtain the distribution number of times of esource impact table record;
The distribution number of times is added 1 and obtains the current distribution number of times.
3rd acquiring unit 303 specifically for:
Inquired about in the front P sub-distribution per the corresponding optimized coefficients of sub-distribution according to the current distribution number of times, obtain institute State the corresponding optimized coefficients of current distribution number of times.
The determining unit 304 specifically for:
According to the optimized coefficients and the stock number of the default port block, formula is adjusted by resource and determines described working as The stock number of the front port block that need to distribute to the user equipment, the resource adjust formula and are:
Wherein, the S0For the stock number of the default port block, the ShCurrent the user need to be distributed to for described The stock number of the port block of equipment, the M are the optimized coefficients, and the h is the current distribution number of times of the user equipment.
The CGN equipment 30, as shown in figure 4, also including:
Updating block 305, for updating the distribution number of times recorded in the resource mapping table with the current distribution number of times.
Setting unit 306, for arranging per sub-distribution corresponding optimized coefficients in front P sub-distribution, the P be less than or wait In 3 positive integer;
The CGN equipment 30, as shown in figure 5, also including:
Prearranged elements 307, for being the user equipment in the reserved first port resource and second of same translated addresses Port resource;
First allocation unit 308, for it is described it is current distribution number of times be 1 when, from the first port resource according to The stock number of the current port block that need to distribute to the user equipment is to the user equipment allocation port block;
Second allocation unit 309, for when the current distribution number of times is not 1, pressing from the second port resource According to the current port block that need to distribute to the user equipment stock number to the user equipment allocation port block.
One of ordinary skill in the art will appreciate that:Realize that all or part of step of said method embodiment can pass through Completing, aforesaid program can be stored in a computer read/write memory medium the related hardware of programmed instruction, the program Upon execution, perform the step of including said method embodiment;And aforesaid storage medium includes:ROM, RAM, magnetic disc or light Disk etc. is various can be with the medium of store program codes.
The above, the only specific embodiment of the present invention, but protection scope of the present invention is not limited thereto, any Those familiar with the art the invention discloses technical scope in, change or replacement can be readily occurred in, should all be contained Cover within protection scope of the present invention.Therefore, protection scope of the present invention should be defined by the scope of the claims.

Claims (8)

1. a kind of resource allocation methods, it is characterised in that be applied to carrier class networks address conversion CGN equipment, including:
Obtain the stock number of default port block;
Obtain the current distribution number of times of user equipment;
The corresponding optimized coefficients of the current distribution number of times are obtained, wherein, the optimized coefficients are with the current distribution number of times Increase and increase;
According to the optimized coefficients and the stock number of the default port block, formula is adjusted by resource and determines the current need The stock number of the port block of the user equipment is distributed to, the resource adjustment formula is:
S h = S 0 M ;
Wherein, the S0For the stock number of the default port block, the ShCurrent the user equipment need to be distributed to for described Port block stock number, the M be the optimized coefficients, the h is the current distribution number of times of the user equipment.
2. method according to claim 1, it is characterised in that
The current distribution number of times for obtaining user equipment includes:
Obtain the distribution number of times of esource impact table record;
The distribution number of times is added 1 and obtains the current distribution number of times;
After the current distribution number of times for obtaining user equipment, methods described also includes:
The distribution number of times recorded in the resource mapping table is updated with the current distribution number of times.
3. method according to claim 1, it is characterised in that before the stock number of default port block is obtained, described Method also includes:
Per the corresponding optimized coefficients of sub-distribution in P sub-distribution before arranging;
The corresponding optimized coefficients of the current distribution number of times that obtain include:
Inquired about in the front P sub-distribution per the corresponding optimized coefficients of sub-distribution according to the current distribution number of times, obtain described working as It is front to distribute number of times corresponding optimized coefficients.
4. the method according to claims 1 to 3 any one claim, it is characterised in that
Before the stock number for obtaining default port block, methods described also includes:
It is that the user equipment reserves first port resource and second port resource in same translated addresses;
Described according to the optimized coefficients and the stock number of the default port block, it is determined that need to currently distribute to the user After the stock number of the port block of equipment, methods described also includes:
When the current distribution number of times is 1, current the user need to be distributed to according to described from the first port resource The stock number of the port block of equipment is to the user equipment allocation port block;
When the current distribution number of times is not 1, current the use need to be distributed to according to described from the second port resource The stock number of the port block of family equipment is to the user equipment allocation port block.
5. a kind of carrier class networks address conversion CGN equipment, it is characterised in that include:
First acquisition unit, for obtaining the stock number of default port block;
Second acquisition unit, for obtaining the current distribution number of times of user equipment;
3rd acquiring unit, for obtaining the current distribution corresponding optimized coefficients of number of times, wherein, the optimized coefficients with It is described it is current distribution number of times increase and increase;
Determining unit, for the stock number according to the optimized coefficients and the default port block, adjusts formula by resource Determine the stock number of the current port block that need to distribute to the user equipment, the resource adjustment formula is:
S h = S 0 M ;
Wherein, the S0For the stock number of the default port block, the ShCurrent the user equipment need to be distributed to for described Port block stock number, the M be the optimized coefficients, the h is the current distribution number of times of the user equipment.
6. CGN equipment according to claim 5, it is characterised in that
The second acquisition unit specifically for:
Obtain the distribution number of times of esource impact table record;
The distribution number of times is added 1 and obtains the current distribution number of times;
The CGN equipment also includes:
Updating block, for updating the distribution number of times recorded in the resource mapping table with the current distribution number of times.
7. CGN equipment according to claim 5, it is characterised in that the CGN equipment also includes:
Setting unit, for arranging in front P sub-distribution per the corresponding optimized coefficients of sub-distribution;
3rd acquiring unit specifically for:
Inquired about in the front P sub-distribution per the corresponding optimized coefficients of sub-distribution according to the current distribution number of times, obtain described working as It is front to distribute number of times corresponding optimized coefficients.
8. the CGN equipment according to claim 5 to 7 any one claim, it is characterised in that the CGN equipment is also Including:
Prearranged elements, for being the user equipment in the reserved first port resource of same translated addresses and second port money Source;
First allocation unit, for when the current distribution number of times is 1, according to described current from the first port resource The stock number of port block of the user equipment need to be distributed to the user equipment allocation port block;
Second allocation unit, for when the current distribution number of times is not 1, working as according to described from the second port resource The stock number of the front port block that need to distribute to the user equipment is to the user equipment allocation port block.
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 CN103560979A (en) 2014-02-05
CN103560979B true 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)

Families Citing this family (2)

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

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7668939B2 (en) * 2003-12-19 2010-02-23 Microsoft Corporation Routing of resource information in a network

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Also Published As

Publication number Publication date
CN103560979A (en) 2014-02-05

Similar Documents

Publication Publication Date Title
CN102791032B (en) Internet wide band distribution and terminal
CN102217256B (en) Queue scheduling method and apparatus
CN102387222B (en) Address distribution method, apparatus and system thereof
CN102075425B (en) Business allocation method and load balancer
CN110502321A (en) A kind of resource regulating method and system
CN104702710A (en) Port allocation method and device
CN103560979B (en) A kind of resource allocation methods and equipment
CN104484233A (en) Method of allocating resources
Xie et al. Network virtualization with dynamic resource pooling and trading mechanism
CN101854637A (en) Method and device for applying and allocating frequency spectrum resources
CN102148654A (en) System and method based on network side compiling
Ahmed et al. A stackelberg game-based dynamic resource allocation in edge federated 5g network
CN105530202A (en) Bandwidth allocation method and server
CN103260196B (en) A kind of control method of transmission bandwidth, Apparatus and system
CN104486453A (en) Ageing-time adjusting method and device
CN102316176B (en) Packet processing and tracing methods, apparatuses thereof and systems thereof
CN109995890A (en) A kind of method and server managing network address translation NAT gateway
CN110113376A (en) A kind of Multipath Transmission load balance optimization algorithm based on mobile edge calculations
CN106507488B (en) A kind of method, apparatus and system of the priority configuring stream medium data
Kim Fog radio access network system control scheme based on the embedded game model
CN104333612A (en) Network address translation method and device
CN103051544B (en) Realize method and the access device of IPv4 private network access IPv6 network
CN116361006B (en) Method and system for collaborative scheduling of computing network resources oriented to memory computing separation
CN104125646B (en) A kind of processing method and processing device of data
CN106936733B (en) Bandwidth resource allocation method and device

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