CN103139255A - Method for allocating resource identification and identification section - Google Patents

Method for allocating resource identification and identification section Download PDF

Info

Publication number
CN103139255A
CN103139255A CN2011103901557A CN201110390155A CN103139255A CN 103139255 A CN103139255 A CN 103139255A CN 2011103901557 A CN2011103901557 A CN 2011103901557A CN 201110390155 A CN201110390155 A CN 201110390155A CN 103139255 A CN103139255 A CN 103139255A
Authority
CN
China
Prior art keywords
resource
section
type
resource type
unappropriated
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
CN2011103901557A
Other languages
Chinese (zh)
Other versions
CN103139255B (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201110390155.7A priority Critical patent/CN103139255B/en
Publication of CN103139255A publication Critical patent/CN103139255A/en
Application granted granted Critical
Publication of CN103139255B publication Critical patent/CN103139255B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a method for allocating resource identification and an identification section, and belongs to the field of internet communication. The method for allocating the resource identification comprises the steps of receiving new resource request information, wherein the new resource request information contains a resource type of a resource built by a user request, building a resource corresponding to the resource type, allocating unallocated resource identification (ID) for the resource according to a corresponding relation between the stored resource type and an ID section and the resource type, wherein the ID section comprises continuous unallocated resource ID, and sending new resource response information, wherein the new resource response information contains the resource ID of resource allocation. The method for allocating resource identification and the identification section are capable of enabling the allocated resource to be global and unique.

Description

The method of Resources allocation sign and identification section
Technical field
The present invention relates to field of Internet communication, particularly the method for Resources allocation sign and identification section.
Background technology
Continuous expansion along with network size makes distributed system be used widely.It is a unified integral body that a distributed system represents to the user, as the user during to the newly-built resource of distributed system request, distributed system is set up the resource of user's request, and is that this resource Resources allocation ID (Identity, sign) is in order to manage this resource.
There is a kind of Resources allocation ID method in prior art at present, distributed system can come to be newly-built resource Resources allocation ID with the method, be specially: as the user during to the newly-built resource of distributed system request, set up the resource of user's request, and obtain the current time, according to the current time of obtaining, and obtain an ID by Hash operation, the ID that will obtain by Hash operation is as the resource ID of the resource of setting up.
In realizing process of the present invention, the inventor finds that there is following problem at least in prior art:
During simultaneously to the newly-built resource of distributed system request, distributed system may be distributed identical resource ID for the resource that each user asks to set up according to the current time, therefore can't guarantee that the resource ID that distributes has global uniqueness as a plurality of users.
Summary of the invention
For the resource ID that makes distribution has global uniqueness, the invention provides a kind of method of Resources allocation sign and identification section.Described technical scheme is as follows:
A kind of method of Resources allocation sign, described method comprises:
Receive newly-built resource request message, described newly-built resource request message carries the resource type that resource is set up in user's request;
Setting up resource corresponding to described resource type, is that described resource is distributed unappropriated resource ID according to the resource type of having stored and the corresponding relation that identifies the ID section and described resource type, and described ID section comprises continuous unappropriated resource ID;
Send newly-built resource response message, described newly-built resource response message is carried the resource ID that distributes into described resource.
The corresponding relation of the resource type that described basis has been stored and ID section and described resource type are that described resource is distributed unappropriated resource ID, comprising:
According to described resource type, search the corresponding relation of described resource type of having stored and ID section;
If find out ID section corresponding to described resource type, the ID section corresponding according to described resource type is that described resource is distributed unappropriated resource ID.
Described method also comprises:
If do not find out ID section corresponding to described resource type, request mark section distribution server is that described resource type is distributed corresponding ID section, and ID section corresponding to described resource type comprises a continuous default value resource ID;
The ID section corresponding according to described resource type is that described resource is distributed unappropriated resource ID.
The ID section corresponding according to described resource type is that described resource is distributed unappropriated resource ID, comprising:
Comprise unappropriated resource ID from ID section corresponding to described resource type and select maximum or minimum resource ID, the resource ID of selecting is distributed to described resource and as the resource ID of described resource.
The ID section corresponding according to described resource type is after described resource is distributed unappropriated resource ID, also to comprise:
Remove the resource ID that distributes for described resource in ID section corresponding to the described resource type that described resource type of having stored and the corresponding relation of ID section comprise.
Described request identification section distribution server is that described resource type is distributed corresponding ID section, comprising:
Send ID section allocation request message to described identification section distribution server, and described ID section allocation request message carries described resource type, making described identification section distribution server is that described resource type is distributed the ID section;
Receive the ID section assignment response message that described identification section distribution server sends, and described ID section assignment response message is carried the ID section that described identification section distribution server is described resource type distribution.
The described ID section corresponding according to described resource type is after described resource is distributed unappropriated resource ID, also to comprise:
Remove the resource ID that distributes for described resource from ID section corresponding to described resource type, store the corresponding relation between the ID section after described resource type and described removal.
The method of the identification section that a kind of Resources allocation type is corresponding, described method comprises:
Receive the sign ID section allocation request message that application server sends, described ID section allocation request message is carried resource type;
According to the corresponding relation of the maximum resource ID of the resource type of having stored and distribution, be that described resource type is distributed the ID section, and described ID section comprise a continuous default value resource ID;
Send ID section assignment response message to described application server, described ID section assignment response message is carried the ID section of described distribution.
The corresponding relation of the maximum resource ID of the resource type that described basis has been stored and distribution distributes the ID section for described resource type, comprising:
According to described resource type, search the corresponding relation of the maximum resource ID of described resource type of having stored and distribution;
If find out corresponding maximum resource ID, determine unappropriated resource ID set according to the described maximum resource ID that searches, be that described resource type is distributed the ID section that comprises a continuous default value resource ID according to described unappropriated resource ID set.
Be after described resource type distribution comprises the ID section of a continuous default value resource ID, also to comprise according to described unappropriated resource ID set:
Obtain maximum resource ID from the ID section of described distribution, maximum resource ID in the corresponding relation of described resource type of having stored and ID section, that described resource type is corresponding is updated to the described maximum resource ID that obtains,
Described method also comprises:
If do not find out corresponding maximum resource ID, determine unappropriated resource ID set according to default resource ID initial value, be that described resource type is distributed the ID section that comprises a continuous default value resource ID according to described unappropriated resource ID set.
Be after described resource type distribution comprises the ID section of a continuous default value resource ID, also to comprise according to described unappropriated resource ID set:
Obtain maximum resource ID from the ID section of described distribution, store the corresponding relation of described resource type and described maximum resource ID.
In embodiments of the present invention, the newly-built resource request message of resource type is carried in reception, set up resource corresponding to this resource type, distribute unappropriated resource ID according to corresponding relation and this resource type of the resource type of having stored and ID section for this resource, so can make the resource ID that distributes for this resource have global uniqueness.
Description of drawings
Fig. 1 is the method flow diagram of a kind of Resources allocation sign that provides of the embodiment of the present invention 1;
Fig. 2 is a kind of distributed system architecture schematic diagram that the embodiment of the present invention 2 provides;
Fig. 3 is the method flow diagram of a kind of Resources allocation sign that provides of the embodiment of the present invention 2;
Fig. 4 is the method flow diagram of a kind of allocation identification section of providing of the embodiment of the present invention 3;
Fig. 5 is a kind of application server structural representation that the embodiment of the present invention 4 provides;
Fig. 6 is the structural representation of a kind of identification section distribution server of providing of the embodiment of the present invention 5.
Embodiment
For making the purpose, technical solutions and advantages of the present invention clearer, embodiment of the present invention is described further in detail below in conjunction with accompanying drawing.
Embodiment 1
As shown in Figure 1, the embodiment of the present invention provides a kind of method of Resources allocation sign, comprising:
Step 101: receive newly-built resource request message, this newly-built resource request message carries the resource type that resource is set up in user's request;
Step 102: set up resource corresponding to this resource type, distribute unappropriated resource ID according to corresponding relation and the described resource type of the resource type of having stored and ID section for this resource, the ID section comprises continuous unappropriated resource ID;
Step 103: send newly-built resource response message, this newly-built resource response message is carried the resource ID that distributes into this resource.
In embodiments of the present invention, the newly-built resource request message of resource type is carried in reception, set up resource corresponding to this resource type, distribute unappropriated resource ID according to corresponding relation and this resource type of the resource type of having stored and ID section for this resource, so can make the resource ID that distributes for this resource have global uniqueness.
Embodiment 2
The embodiment of the present invention provides a kind of method of Resources allocation sign.The present embodiment is applied to the network architecture as shown in Figure 2, the user sends newly-built resource request message to distributed system and sets up resource with the request distributed system, this newly-built resource request message is routed to certain application server in distributed system, this application server is set up this user's requested resource, and the resource Resources allocation ID of method for setting up that utilizes this enforcement to provide, referring to Fig. 3, the method comprises:
Step 201: application server receives the newly-built resource request message that the user sends, and this newly-built resource request message carries the resource type that resource is set up in user's request;
Wherein, referring to Fig. 2, distributed system comprises one or more application servers and an identification section distribution server; Each application server is used for setting up the user asks the resource set up and distributes the unique resource ID of the overall situation for the resource of setting up.
For example, certain application server in distributed system is assumed to be application server 1, and application server 1 receives the newly-built resource request message that first user sends, and this newly-built resource request message carries the resource type TypeA that resource is set up in the first user request.
Step 202: application server is set up resource corresponding to this resource type, search the resource type of having stored and the corresponding relation of ID section according to this resource type, if find out ID section corresponding to this resource type, execution in step 203, if do not find out ID section corresponding to this resource type, execution in step 204;
Wherein, the ID section comprises one or more continuous unappropriated resource IDs; If do not find out resource ID corresponding to this resource type from the corresponding relation of the resource type of having stored and ID section, application server is judged and self is received for the first time the newly-built resource request message that carries this resource type or ID section corresponding to this resource type for empty.
wherein, application server is according to this resource type, search the resource type of having stored and the corresponding relation of ID section, if do not find out the record that comprises this resource type, judge and receive for the first time the newly-built resource request message that carries this resource type, if find out the record that comprises this resource type, whether ID section corresponding to this resource type of storing in the record that further judgement is searched be empty, if be empty, judge ID section corresponding to this resource type and there is no unappropriated resource ID, namely the unappropriated resource ID that comprises of ID section corresponding to this resource type has been assigned with.
Wherein, in the corresponding relation of resource type and ID section, if ID section corresponding to resource type is not empty, show that ID section corresponding to this resource type comprises resource ID, and each resource ID that comprises is unappropriated resource ID; Each resource ID that ID section corresponding to resource type comprises is continuous, can represent this ID section with least resource ID and the maximum resource ID that the ID section comprises.For example, store resource type as shown in table 1 and the corresponding relation of ID section in application server 1, in the second line item of table 1, the ID section that resource type TypeA is corresponding is (TA1, TA5), and ID section (TA1, TA5) comprise that unappropriated resource ID is respectively TA1, TA2, TA3, TA4 and TA5, and TA1<TA2<TA3<TA4<TA5, therefore can be that TA1 and maximum resource ID are that TA5 represents the ID section (TA1, TA5) that resource type TypeA is corresponding with the resource ID of minimum; In the third line record of table 1, the ID section that resource type TypeC is corresponding is empty, shows that ID section corresponding to resource type TypeC do not have unappropriated resource ID.
Table 1
Resource type The ID section
TypeA (TA1,TA5)
TypeC Empty
...... ......
Wherein, after application server 1 receives the newly-built resource request message of first user transmission, set up resource A1 corresponding to resource type Type1, the resource type TypeA that resource request message newly-built according to this carries searches the corresponding relation of resource type as shown in table 1 and ID section, and find out and comprise resource type TypeA and ID section (TA1, TA5) record, and judge the ID section (TA1 that the record of searching comprises that resource type TypeA is corresponding, TA5) be not empty, namely judge ID section corresponding to resource type TypeA and also have unappropriated resource ID.
Step 203: the ID section that application server is corresponding according to this resource type is distributed unappropriated resource ID for this resource, send newly-built resource response message to the user, and this newly-built resource response message is carried the resource ID of distribution, end operation.
Particularly, application server comprises from ID section corresponding to this resource type selects minimum or maximum resource ID unappropriated resource ID, the resource ID of selecting is distributed to this resource, send newly-built resource response message to the user, and this newly-built resource response message is carried the resource ID of distribution.
Wherein, after the user received newly-built resource response message, the resource ID that resource response message newly-built according to this carried called corresponding resource.
Further, after application server is this resource Resources allocation ID, comprises at resource type and the corresponding relation of ID section and remove the resource ID that distributes in ID section corresponding to this resource type.
For example, application server 1 is from ID section (TA1 corresponding to resource type TypeA, TA5) comprise that selecting minimum resource ID in unappropriated resource ID (being respectively TA1, TA2, TA3, TA4 and TA5) is TA1, the TA1 that selects is distributed to resource A1 and as the resource ID of resource A1; And in the corresponding relation of resource type as shown in table 1 and ID section, remove the TA1 that selects and obtain ID section corresponding to resource type TypeA for (TA2, A5) from ID section (TA1, TA5) corresponding to resource type TypeA, namely as shown in table 2.
Table 2
Resource type The ID section
TypeA (TA2,TA5)
TypeC Empty
...... ......
Step 204: application server sends ID section allocation request message to the identification section distribution server, and this ID section allocation request message is carried this resource type;
Suppose, application server 1 also receives the newly-built resource request message that the second user sends, and the second user's request of carrying of this new resources request message to set up the resource type of resource be TypeB; According to resource type TypeB, search resource type as shown in table 2 and ID section corresponding relation, and do not find out the record that comprises resource type TypeB from resource type as shown in table 2 and ID section corresponding relation, judge and receive for the first time the newly-built resource request message that carries resource type TypeB, then send and distribute ID section request message to the identification section distribution server, and this ID section allocation request message is carried resource type TypeB.
Step 205: the identification section distribution server receives this ID section allocation request message, for the resource type that this ID section allocation request message is carried is distributed the ID section that is not assigned with;
Particularly, the identification section distribution server receives this ID section allocation request message, and the resource type of then carrying for this ID section allocation request message by the step of following (1)-(3) is distributed the ID section, comprising:
(1): the identification section distribution server is searched the corresponding relation of the maximum resource ID of the resource type of having stored and distribution according to this resource type, if find out the maximum resource ID that distributes into this resource type, carry out (2), if do not find out the maximum resource ID that distributes into this resource type, carry out (3);
Wherein, if find out the maximum resource ID that distributes into this resource type from the corresponding relation of the maximum resource ID of the resource type of having stored and distribution, the identification section distribution server can be judged and distribute the ID section for this resource type, and the maximum resource ID that searches is the maximum resource ID that comprises for ID section that this resource type was distributed; If do not find out the maximum resource ID that distributes into this resource type from the corresponding relation of the maximum resource ID of the resource type of having stored and distribution, do not judge and distributed the ID section for this resource type.
(2): the identification section distribution server is determined unappropriated resource ID set according to the resource ID of maximum, select to comprise continuously the ID section of a default value resource ID from determine unappropriated resource ID set, and the ID section of selecting is distributed to this resource type, then return.
Further, obtain maximum resource ID from the ID section of distributing for this resource type, will be updated to the maximum resource ID that obtains for the maximum resource ID of this resource type distribution in the corresponding relation of the maximum resource ID of resource type and distribution.
for example, the identification section distribution server receives application server 1 and sends the ID section allocation request message of carrying resource type TypeB, search the corresponding relation of the maximum resource ID of resource type as shown in table 3 and distribution according to resource type TypeB, and the maximum resource ID that finds out as resource type TypeB distribution is B7, and be that B7 determines unappropriated resource ID set according to maximum resource ID, the unappropriated resource ID set of determining comprises that resource ID is greater than the resource ID of B7, and determine the resource ID that unappropriated resource ID set comprises and be respectively B8, B9, B10, B11, B12, B13 suppose that default data value is 5, select to comprise continuously the ID section of 5 resource IDs from determine unappropriated resource ID set, suppose that the ID section of selecting comprises that continuously 5 resource IDs are respectively B8, B9, B10, B11 and B12, and the ID section of selecting can be expressed as (B8, B12), with the ID section (B8 that selects, B12) distribute to this resource type TypeB.
Table 3
Resource type The maximum resource ID that distributes
TypeA A5
TypeB B7
TypeC C5
...... ......
Further, from being the ID section (B8 that this resource type TypeB distributes, B12) obtaining maximum resource ID in is B12, in the corresponding relation of the maximum resource ID of resource type as shown in table 3 and distribution, the maximum resource ID that will distribute for resource type TypeB be B7 to be updated to the maximum resource ID that obtains be B12, obtain the corresponding relation of the maximum resource ID of resource type as shown in table 4 and distribution.
Table 4
Resource type The maximum resource ID that distributes
TypeA A5
TypeB B12
TypeC C5
...... ......
(3): the identification section distribution server is determined unappropriated resource ID set according to the initial value of default resource ID, select to comprise continuously the ID section of a default value resource ID from unappropriated resource ID set, and the ID section of selecting is distributed to this resource type, then return.
Further, the identification section distribution server is selected maximum resource ID from the ID section that is this resource type and distributes, and stores the corresponding relation of this resource type and the maximum resource ID that obtains.
Step 206: the identification section distribution server sends ID section assignment response message to application server, and this ID section assignment response message is carried the ID section of distributing into this resource type;
For example, the identification section distribution server sends ID section assignment response message to application server 1, and this ID section assignment response message is carried the ID section (B8, B12) of distributing into resource type TypeB.
Step 207: application server receives this ID section assignment response message, distribute unappropriated resource ID according to the ID section that this ID section assignment response message is carried for this resource, send newly-built resource response message to the user, and this newly-built resource response message is carried the resource ID of distribution, end operation.
Particularly, application server receives this ID section assignment response message, the ID section of carrying from this ID section assignment response message comprises selection minimum or maximum resource ID unappropriated resource ID, the resource ID of selecting is distributed to this resource, send newly-built resource response message to the user, and this newly-built resource response message is carried the resource ID of distribution.
Further, after application server is this resource Resources allocation ID, can also remove the resource ID that distributes in ID section corresponding to this resource type, store the corresponding relation of this resource type and the ID section of removing the resource ID that distributes.
Particularly, search the resource type of having stored and the corresponding relation of ID section according to this resource type, if find out the record that comprises this resource type, wherein, the ID section that this record comprises is stored in the ID section of removing the resource ID that distributes in this record for empty; If do not find out the record that comprises this resource type, the ID section of the resource ID that this resource type and removal is distributed is as a new record and be stored in resource type and the corresponding relation of ID section.
For example, application server 1 receives and carries ID section (B8 corresponding to resource type TypeB, B12) ID section assignment response message, ID section (the B8 that carries from this ID section assignment response message, B12) comprise that selecting minimum resource ID in unappropriated resource ID (being respectively B8, B9, B10, B11 and B12) is B8, be that B8 distributes to this resource with the resource ID of selecting, send newly-built resource response message to the second user, and the resource ID that this newly-built resource response message is carried distribution is B8; Further, application server 1 can also be at ID section (B8 corresponding to resource type TypeB, B12) removing the resource ID that distributes in is B8, the ID section that obtains is (B9, B12), resource type TypeB and ID section (B9, B12) are stored in the corresponding relation of resource type as shown in table 2 and ID section as a record, obtain the corresponding relation of resource type as shown in table 5 and ID section.
Table 5
Resource type The ID section
TypeA (TA2,A5)
TypeC Empty
TypeB (B9,B12)
...... ......
In embodiments of the present invention, the newly-built resource request message of resource type is carried in reception, set up resource corresponding to this resource type, distribute unappropriated resource ID according to corresponding relation and this resource type of the resource type of having stored and ID section for this resource, so can make the resource ID that distributes for this resource have global uniqueness.
Embodiment 3
As shown in Figure 4, the embodiment of the present invention provides the method for identification section corresponding to a kind of Resources allocation type, comprising:
Step 301: receive the ID allocation request message that application server sends, this ID allocation request message is carried resource type;
Step 302: according to the corresponding relation of the maximum resource ID of the resource type of having stored and distribution, be that this resource type is distributed the ID section, and the ID section comprises a continuous default value resource ID;
Step 303: send the ID assignment response message to application server, this ID assignment response message is carried the ID section of distribution.
Embodiment 4
As shown in Figure 5, the embodiment of the present invention provides a kind of application server, comprising:
The first receiver module 401 is used for receiving newly-built resource request message, and this newly-built resource request message carries the resource type that resource is set up in user's request;
The first distribution module 402 is used for setting up resource corresponding to this resource type, is the unappropriated resource ID of described resource distribution according to corresponding relation and this resource type of the resource type of having stored and ID section, and this ID section comprises continuous unappropriated resource ID;
The first sending module 403 is used for sending newly-built resource response message, and this newly-built resource response message is carried the resource ID that distributes into this resource.
Wherein, the first distribution module 402 comprises:
First searches the unit, is used for according to this resource type, searches the resource type of having stored and the corresponding relation of ID section;
The first allocation units, if be used for finding out ID section corresponding to this resource type, the ID section corresponding according to this resource type distributed unappropriated resource ID for this resource.
Further, the first distribution module 402 also comprises:
Request unit, if be used for not finding out ID section corresponding to this resource type, request mark section distribution server distributes corresponding ID section for this resource type, and ID section corresponding to this resource type comprises a continuous default value resource ID;
The first allocation units are used for the ID section corresponding according to this resource type and distribute unappropriated resource ID for this resource.
The first allocation units, concrete being used for comprises that from ID section corresponding to this resource type unappropriated resource ID selects maximum or minimum resource ID, the resource ID of selecting distributed to this resource and as the resource ID of this resource.
Further, application server also comprises:
Remove module, ID section corresponding to this resource type that is used for comprising at the resource type of having stored and the corresponding relation of ID section removed the resource ID that distributes for this resource.
Wherein, request unit comprises:
Send subelement, be used for sending ID section allocation request message to the identification section distribution server, and this ID section allocation request message carries this resource type, make this identification section distribution server be this resource type distribution ID section;
Receive subelement, be used for receiving the ID section assignment response message that this identification section distribution server sends, and this ID section assignment response message is carried this identification section distribution server and is this resource type distribution ID section.
This application server also comprises:
The first memory module is used for removing resource ID for this resource distribution from ID section corresponding to this resource type, stores the corresponding relation between the ID section after this resource type and this removal.
In embodiments of the present invention, the newly-built resource request message of resource type is carried in reception, set up resource corresponding to this resource type, distribute unappropriated resource ID according to corresponding relation and this resource type of the resource type of having stored and ID section for this resource, so can make the resource ID that distributes for this resource have global uniqueness.
Embodiment 5
As shown in Figure 6, the embodiment of the present invention provides a kind of identification section distribution server, comprising:
The second receiver module 501 is used for receiving the ID section allocation request message that application server sends, and this ID section allocation request message is carried resource type;
The second distribution module 502 is used for the corresponding relation according to the maximum resource ID of the resource type of having stored and distribution, and for this resource type is distributed the ID section, and this ID section comprises a continuous default value resource ID;
The second sending module 503 is used for sending ID section assignment response message to this application server, and this ID section assignment response message is carried the ID section of this distribution.
Wherein, this second distribution module 502 comprises:
Second searches the unit, is used for according to this resource type, searches the corresponding relation of the maximum resource ID of this resource type of having stored and distribution;
The second allocation units, if be used for finding out corresponding maximum resource ID, determine unappropriated resource ID set according to this maximum resource ID that searches, resource ID set unappropriated according to this distributes the ID section that comprises a continuous default value resource ID for this resource type.
Further, this identification section distribution server also comprises:
Update module is used for obtaining maximum resource ID from the ID section of this distribution, and maximum resource ID in the corresponding relation of this resource type of having stored and ID section, that this resource type is corresponding is updated to the maximum resource ID that this obtains,
Further, this second distribution module 502 also comprises:
The 3rd allocation units, if be used for not finding out corresponding maximum resource ID, determine unappropriated resource ID set according to default resource ID initial value, resource ID set unappropriated according to this distributes the ID section that comprises a continuous default value resource ID for this resource type.
This identification section distribution server also comprises:
The second memory module is used for obtaining maximum resource ID from the ID section of this distribution, stores the corresponding relation of this resource type and this maximum resource ID.
One of ordinary skill in the art will appreciate that all or part of step that realizes above-described embodiment can complete by hardware, also can come the relevant hardware of instruction to complete by program, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium of mentioning can be read-only memory, disk or CD etc.
The above is only preferred embodiment of the present invention, and is in order to limit the present invention, within the spirit and principles in the present invention not all, any modification of doing, is equal to replacement, improvement etc., within all should being included in protection scope of the present invention.

Claims (12)

1. the method for a Resources allocation sign, is characterized in that, described method comprises:
Receive newly-built resource request message, described newly-built resource request message carries the resource type that resource is set up in user's request;
Setting up resource corresponding to described resource type, is that described resource is distributed unappropriated resource ID according to the resource type of having stored and the corresponding relation that identifies the ID section and described resource type, and described ID section comprises continuous unappropriated resource ID;
Send newly-built resource response message, described newly-built resource response message is carried the resource ID that distributes into described resource.
2. the method for claim 1, is characterized in that, the corresponding relation of the resource type that described basis has been stored and ID section and described resource type are that described resource is distributed unappropriated resource ID, comprising:
According to described resource type, search the corresponding relation of described resource type of having stored and ID section;
If find out ID section corresponding to described resource type, the ID section corresponding according to described resource type is that described resource is distributed unappropriated resource ID.
3. method as claimed in claim 2, is characterized in that, described method also comprises:
If do not find out ID section corresponding to described resource type, request mark section distribution server is that described resource type is distributed corresponding ID section, and ID section corresponding to described resource type comprises a continuous default value resource ID;
The ID section corresponding according to described resource type is that described resource is distributed unappropriated resource ID.
4. method as claimed in claim 2 or claim 3, is characterized in that, the ID section corresponding according to described resource type is that described resource is distributed unappropriated resource ID, comprising:
Comprise unappropriated resource ID from ID section corresponding to described resource type and select maximum or minimum resource ID, the resource ID of selecting is distributed to described resource and as the resource ID of described resource.
5. method as claimed in claim 2, is characterized in that, the ID section corresponding according to described resource type is after described resource is distributed unappropriated resource ID, also to comprise:
Remove the resource ID that distributes for described resource in ID section corresponding to the described resource type that described resource type of having stored and the corresponding relation of ID section comprise.
6. method as claimed in claim 3, is characterized in that, described request identification section distribution server is that described resource type is distributed corresponding ID section, comprising:
Send ID section allocation request message to described identification section distribution server, and described ID section allocation request message carries described resource type, making described identification section distribution server is that described resource type is distributed the ID section;
Receive the ID section assignment response message that described identification section distribution server sends, and described ID section assignment response message is carried the ID section that described identification section distribution server is described resource type distribution.
7. method as described in claim 3 or 6, is characterized in that, the described ID section corresponding according to described resource type is after described resource is distributed unappropriated resource ID, also to comprise:
Remove the resource ID that distributes for described resource from ID section corresponding to described resource type, store the corresponding relation between the ID section after described resource type and described removal.
8. the method for identification section corresponding to a Resources allocation type, is characterized in that, described method comprises:
Receive the sign ID section allocation request message that application server sends, described ID section allocation request message is carried resource type;
According to the corresponding relation of the maximum resource ID of the resource type of having stored and distribution, be that described resource type is distributed the ID section, and described ID section comprise a continuous default value resource ID;
Send ID section assignment response message to described application server, described ID section assignment response message is carried the ID section of described distribution.
9. method as claimed in claim 8, is characterized in that, the corresponding relation of the maximum resource ID of the resource type that described basis has been stored and distribution distributes the ID section for described resource type, comprising:
According to described resource type, search the corresponding relation of the maximum resource ID of described resource type of having stored and distribution;
If find out corresponding maximum resource ID, determine unappropriated resource ID set according to the described maximum resource ID that searches, be that described resource type is distributed the ID section that comprises a continuous default value resource ID according to described unappropriated resource ID set.
10. method as claimed in claim 9, is characterized in that, is after described resource type distribution comprises the ID section of a continuous default value resource ID, also to comprise according to described unappropriated resource ID set:
Obtain maximum resource ID from the ID section of described distribution, maximum resource ID in the corresponding relation of described resource type of having stored and ID section, that described resource type is corresponding is updated to the described maximum resource ID that obtains.
11. method as claimed in claim 9 is characterized in that, described method also comprises:
If do not find out corresponding maximum resource ID, determine unappropriated resource ID set according to default resource ID initial value, be that described resource type is distributed the ID section that comprises a continuous default value resource ID according to described unappropriated resource ID set.
12. method as claimed in claim 11 is characterized in that, is after described resource type distribution comprises the ID section of a continuous default value resource ID, also to comprise according to described unappropriated resource ID set:
Obtain maximum resource ID from the ID section of described distribution, store the corresponding relation of described resource type and described maximum resource ID.
CN201110390155.7A 2011-11-30 2011-11-30 The method of Resources allocation mark and identification section Active CN103139255B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110390155.7A CN103139255B (en) 2011-11-30 2011-11-30 The method of Resources allocation mark and identification section

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110390155.7A CN103139255B (en) 2011-11-30 2011-11-30 The method of Resources allocation mark and identification section

Publications (2)

Publication Number Publication Date
CN103139255A true CN103139255A (en) 2013-06-05
CN103139255B CN103139255B (en) 2016-04-06

Family

ID=48498556

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110390155.7A Active CN103139255B (en) 2011-11-30 2011-11-30 The method of Resources allocation mark and identification section

Country Status (1)

Country Link
CN (1) CN103139255B (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104113435A (en) * 2014-07-04 2014-10-22 广州华多网络科技有限公司 Method and device for generating identifier
CN104301234A (en) * 2013-07-16 2015-01-21 腾讯科技(深圳)有限公司 Routing method and routing device
CN104618421A (en) * 2014-12-10 2015-05-13 深圳市腾讯计算机系统有限公司 Method and device for distributing storage resources
CN105183561A (en) * 2015-09-02 2015-12-23 浪潮(北京)电子信息产业有限公司 Resource distribution method and resource distribution system
CN105245367A (en) * 2015-10-08 2016-01-13 北京搜狗科技发展有限公司 Serial number generation method and electronic device
CN106341497A (en) * 2016-11-18 2017-01-18 腾讯科技(深圳)有限公司 Digital ID generating method and apparatus
CN106528294A (en) * 2016-11-04 2017-03-22 郑州云海信息技术有限公司 Resource pool management method and system
CN108509535A (en) * 2018-03-15 2018-09-07 烽火通信科技股份有限公司 Resource ID based on section manages system and method
CN110245017A (en) * 2019-05-29 2019-09-17 华为技术有限公司 The distribution method and equipment of resource identification
CN111385370A (en) * 2018-12-28 2020-07-07 广州市百果园信息技术有限公司 ID allocation method, device, storage medium and ID allocation system
CN111666147A (en) * 2019-03-07 2020-09-15 上海商汤智能科技有限公司 Resource scheduling method, equipment, system and central server
CN112115133A (en) * 2020-08-04 2020-12-22 北京健康之家科技有限公司 Distributed global unique ID generation method and system, storage medium and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009150499A1 (en) * 2008-06-09 2009-12-17 Telefonaktiebolaget L M Ericsson (Publ) A system and method of releasing resources in a telecommunications network
CN101843044A (en) * 2007-08-10 2010-09-22 泰克莱克公司 Be used to provide method, system and the computer program of universal uniform resource identifier symbol (UURI)

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101843044A (en) * 2007-08-10 2010-09-22 泰克莱克公司 Be used to provide method, system and the computer program of universal uniform resource identifier symbol (UURI)
WO2009150499A1 (en) * 2008-06-09 2009-12-17 Telefonaktiebolaget L M Ericsson (Publ) A system and method of releasing resources in a telecommunications network

Cited By (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104301234A (en) * 2013-07-16 2015-01-21 腾讯科技(深圳)有限公司 Routing method and routing device
CN104113435A (en) * 2014-07-04 2014-10-22 广州华多网络科技有限公司 Method and device for generating identifier
CN104113435B (en) * 2014-07-04 2017-11-07 广州华多网络科技有限公司 Generate the method and device of mark
CN104618421A (en) * 2014-12-10 2015-05-13 深圳市腾讯计算机系统有限公司 Method and device for distributing storage resources
CN104618421B (en) * 2014-12-10 2018-08-07 深圳市腾讯计算机系统有限公司 Storage resource distribution method and device
CN105183561B (en) * 2015-09-02 2018-09-14 浪潮(北京)电子信息产业有限公司 A kind of resource allocation methods and system
CN105183561A (en) * 2015-09-02 2015-12-23 浪潮(北京)电子信息产业有限公司 Resource distribution method and resource distribution system
CN105245367A (en) * 2015-10-08 2016-01-13 北京搜狗科技发展有限公司 Serial number generation method and electronic device
CN105245367B (en) * 2015-10-08 2018-11-13 北京搜狗科技发展有限公司 A kind of sequence number generation method and electronic equipment
CN106528294A (en) * 2016-11-04 2017-03-22 郑州云海信息技术有限公司 Resource pool management method and system
CN106341497A (en) * 2016-11-18 2017-01-18 腾讯科技(深圳)有限公司 Digital ID generating method and apparatus
CN106341497B (en) * 2016-11-18 2019-08-30 腾讯科技(深圳)有限公司 Digital ID generation method and device
CN108509535A (en) * 2018-03-15 2018-09-07 烽火通信科技股份有限公司 Resource ID based on section manages system and method
WO2019174196A1 (en) * 2018-03-15 2019-09-19 烽火通信科技股份有限公司 Interval-based resource id management system and method
CN108509535B (en) * 2018-03-15 2020-12-01 烽火通信科技股份有限公司 Resource ID management system and method based on interval
CN111385370A (en) * 2018-12-28 2020-07-07 广州市百果园信息技术有限公司 ID allocation method, device, storage medium and ID allocation system
CN111385370B (en) * 2018-12-28 2022-07-08 广州市百果园信息技术有限公司 ID allocation method, device, storage medium and ID allocation system
CN111666147A (en) * 2019-03-07 2020-09-15 上海商汤智能科技有限公司 Resource scheduling method, equipment, system and central server
CN111666147B (en) * 2019-03-07 2022-06-07 上海商汤智能科技有限公司 Resource scheduling method, equipment, system and central server
CN110245017A (en) * 2019-05-29 2019-09-17 华为技术有限公司 The distribution method and equipment of resource identification
CN110245017B (en) * 2019-05-29 2024-03-26 华为技术有限公司 Resource identifier allocation method and equipment
CN112115133A (en) * 2020-08-04 2020-12-22 北京健康之家科技有限公司 Distributed global unique ID generation method and system, storage medium and device

Also Published As

Publication number Publication date
CN103139255B (en) 2016-04-06

Similar Documents

Publication Publication Date Title
CN103139255B (en) The method of Resources allocation mark and identification section
US11586673B2 (en) Data writing and reading method and apparatus, and cloud storage system
CN102137145B (en) Method, device and system for managing distributed contents
CN104954468A (en) Resource allocation method and resource allocation device
CN107733957B (en) Distributed service configuration system and version number distribution method
KR20170068564A (en) Data processing method, apparatus and system
CN107066570A (en) Data managing method and device
CN102298633B (en) Method and system for investigating repeated data in distributed mass data
CN101741907A (en) Method and system for balancing server load and main server
CN105763595A (en) Method of improving data processing efficiency and server
CN110569302A (en) method and device for physical isolation of distributed cluster based on lucene
WO2019170011A1 (en) Task allocation method and device, and distributed storage system
CN102790784A (en) Distributed cache method and system and cache analyzing method and analyzing system
CN102868770A (en) Method, equipment and system for distributing interface
CN110798507B (en) Method and system for DHCP address allocation memory
CN103778120A (en) Global file identification generation method, generation device and corresponding distributed file system
CN108399175B (en) Data storage and query method and device
CN108616896B (en) Operator identification method and device and internet access system
CN113805816B (en) Disk space management method, device, equipment and storage medium
CN109787914B (en) Load sharing method, device and network equipment
CN102724301B (en) Cloud database system and method and equipment for reading and writing cloud data
CN110581784B (en) Node health check method, device and equipment
CN110688065A (en) Storage space management method, system, electronic equipment and storage medium
CN105260465A (en) Graph data processing service method and apparatus
CN109005071B (en) Decision deployment method and scheduling equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant