CN103139255B - The method of Resources allocation mark and identification section - Google Patents

The method of Resources allocation mark and identification section Download PDF

Info

Publication number
CN103139255B
CN103139255B CN201110390155.7A CN201110390155A CN103139255B CN 103139255 B CN103139255 B CN 103139255B CN 201110390155 A CN201110390155 A CN 201110390155A CN 103139255 B CN103139255 B CN 103139255B
Authority
CN
China
Prior art keywords
resource
section
resource type
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.)
Active
Application number
CN201110390155.7A
Other languages
Chinese (zh)
Other versions
CN103139255A (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

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses the method for Resources allocation mark and identification section, belong to field of Internet communication.The method of described Resources allocation mark comprises: receive newly-built resource request message, and described newly-built resource request message carries the resource type that resource is set up in user's request; Set up the resource that described resource type is corresponding, be the unappropriated resource ID of described Resourse Distribute according to the corresponding relation of the resource type stored and mark ID section and described resource type, described ID section comprises continuous unappropriated resource ID; Send newly-built resource response message, described newly-built resource response message carries the resource ID into described Resourse Distribute.The present invention can make the resource of distribution have global uniqueness.

Description

The method of Resources allocation mark and identification section
Technical field
The present invention relates to field of Internet communication, particularly the method for Resources allocation mark and identification section.
Background technology
Along with the continuous expansion of network size, distributed system is used widely.It is a unified entirety that distributed system is presented to user, when user's resource newly-built to distributed system request, distributed system sets up the resource of user's request, and is that this Resourse Distribute resource ID (Identity, mark) is to manage this resource.
There is a kind of Resources allocation ID method in currently available technology, distributed system can use the method to come for newly-built Resourse Distribute resource ID, be specially: when user's resource newly-built to distributed system request, set up the resource of user's request, and obtain current time, according to the current time obtained, and obtain an ID by Hash operation, using the ID that obtained by the Hash operation resource ID as the resource set up.
Realizing in process of the present invention, inventor finds that prior art at least exists following problem:
When multiple user while during resource newly-built to distributed system request, distributed system may ask for each user the resource ID that the Resourse Distribute of foundation is identical according to current time, therefore cannot ensure that the resource ID distributed has global uniqueness.
Summary of the invention
In order to make the resource ID of distribution have global uniqueness, the invention provides the method for a kind of Resources allocation mark and identification section.Described technical scheme is as follows:
A method for Resources allocation mark in a distributed system, 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;
Set up the resource that described resource type is corresponding, be the unappropriated resource ID of described Resourse Distribute according to the corresponding relation of the resource type stored and mark (ID) section and described resource type, described ID section comprises continuous unappropriated resource ID;
Send newly-built resource response message, described newly-built resource response message carries the resource ID into described Resourse Distribute.
The corresponding relation of the resource type that described basis has stored and ID section and described resource type are the unappropriated resource ID of described Resourse Distribute, comprising:
According to described resource type, the corresponding relation of the resource type stored described in searching and ID section;
If find out the ID section that described resource type is corresponding, then corresponding according to described resource type ID section is the unappropriated resource ID of described Resourse Distribute.
Described method also comprises:
If do not find out the ID section that described resource type is corresponding, then ask identification section distribution server to be that described resource type distributes corresponding ID section, and ID section corresponding to described resource type comprise a continuous default value resource ID;
The ID section corresponding according to described resource type is the unappropriated resource ID of described Resourse Distribute.
The ID section corresponding according to described resource type is the unappropriated resource ID of described Resourse Distribute, comprising:
Comprise unappropriated resource ID from the ID section that described resource type is corresponding and select maximum or minimum resource ID, the resource ID of selection is distributed to described resource and as the resource ID of described resource.
The ID section corresponding according to described resource type also comprises after being the unappropriated resource ID of described Resourse Distribute:
The resource ID for described Resourse Distribute is removed in the ID section that the described resource type stored is corresponding with the described resource type that the corresponding relation of ID section comprises.
Described request identification section distribution server is that described resource type distributes 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, make described identification section distribution server be that described resource type distributes ID section;
Receive the ID section assignment response message that described identification section distribution server sends, and described ID section assignment response message carries the ID section that described identification section distribution server is the distribution of described resource type.
The described ID section corresponding according to described resource type also comprises after being the unappropriated resource ID of described Resourse Distribute:
From the ID section that described resource type is corresponding, remove the resource ID for described Resourse Distribute, store the corresponding relation between described resource type with the ID section after described removal.
A method for the identification section that Resources allocation type is corresponding in a distributed system, described method comprises:
Receive mark (ID) the section allocation request message that application server sends, described ID section allocation request message carries resource type;
According to the corresponding relation of the maximum resource ID of the resource type stored and distribution, be that described resource type distributes 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 carries the ID section of described distribution.
The corresponding relation of the maximum resource ID of the resource type that described basis has stored and distribution, for described resource type distributes ID section, comprising:
According to described resource type, the corresponding relation of the maximum resource ID of the resource type stored described in searching and distribution;
If find out corresponding maximum resource ID, then the maximum resource ID searched described in basis determines unappropriated resource ID set, is that described resource type distributes the ID section comprising a continuous default value resource ID according to described unappropriated resource ID set.
According to described unappropriated resource ID set be described resource type distribute comprise the ID section of a continuous default value resource ID after, also comprise:
Maximum resource ID is obtained from the ID section of described distribution, at the described resource type stored and the maximum resource ID in the corresponding relation of ID section, maximum resource ID corresponding for described resource type being updated to described acquisition,
Described method also comprises:
If do not find out corresponding maximum resource ID, the resource ID initial value according to presetting determines unappropriated resource ID set, is that described resource type distributes the ID section comprising a continuous default value resource ID according to described unappropriated resource ID set.
According to described unappropriated resource ID set be described resource type distribute comprise the ID section of a continuous default value resource ID after, also comprise:
From the ID section of described distribution, obtain maximum resource ID, store the corresponding relation of described resource type and described maximum resource ID.
In embodiments of the present invention, receive the newly-built resource request message carrying resource type, set up the resource that this resource type is corresponding, be the unappropriated resource ID of this Resourse Distribute according to the corresponding relation of the resource type stored and ID section and this resource type, the resource ID for this Resourse Distribute so can be made to have global uniqueness.
Accompanying drawing explanation
Fig. 1 is the method flow diagram of a kind of Resources allocation mark that the embodiment of the present invention 1 provides;
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 mark that the embodiment of the present invention 2 provides;
Fig. 4 is the method flow diagram of a kind of allocation identification section that the embodiment of the present invention 3 provides;
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 that the embodiment of the present invention 5 provides.
Embodiment
For making the object, technical solutions and advantages of the present invention clearly, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail.
Embodiment 1
As shown in Figure 1, embodiments provide the method for a kind of Resources allocation mark, 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 the resource that this resource type is corresponding, be the unappropriated resource ID of this Resourse Distribute according to the corresponding relation of the resource type stored and ID section and described resource type, ID section comprises continuous unappropriated resource ID;
Step 103: send newly-built resource response message, this newly-built resource response message carries the resource ID into this Resourse Distribute.
In embodiments of the present invention, receive the newly-built resource request message carrying resource type, set up the resource that this resource type is corresponding, be the unappropriated resource ID of this Resourse Distribute according to the corresponding relation of the resource type stored and ID section and this resource type, the resource ID for this Resourse Distribute so can be made to have global uniqueness.
Embodiment 2
Embodiments provide the method for a kind of Resources allocation mark.The present embodiment is applied to the network architecture as shown in Figure 2, user sends newly-built resource request message to distributed system and sets up resource to ask distributed system, this newly-built resource request message is routed to certain application server in distributed system, this user's requested resource set up by this application server, and the Resourse Distribute resource ID of the method utilizing this enforcement to provide for setting up, see Fig. 3, the method comprises:
Step 201: application server receives the newly-built resource request message that user sends, and this newly-built resource request message carries the resource type that resource is set up in user's request;
Wherein, see Fig. 2, distributed system comprises one or more application server and an identification section distribution server; The overall unique resource ID of Resourse Distribute that each application server asks the resource of foundation also for setting up for setting up user.
Such as, 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 first user request.
Step 202: resource corresponding to this resource type set up by application server, the corresponding relation of resource type and the ID section stored is searched according to this resource type, if find out the ID section that this resource type is corresponding, perform step 203, if do not find out the ID section that this resource type is corresponding, then perform step 204;
Wherein, ID section comprises one or more continuous unappropriated resource ID; If do not find out resource ID corresponding to this resource type from the resource type stored with the corresponding relation of ID section, then application server judges that self first time receives 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 corresponding relation of resource type and the ID section stored, if do not find out the record comprising this resource type, then judge that first time receives the newly-built resource request message carrying this resource type, if find out the record comprising this resource type, whether ID section corresponding to this resource type stored in the record that further judgement is searched be empty, if be empty, then judge that ID section corresponding to this resource type does not have unappropriated resource ID, namely the unappropriated resource ID that the ID section that this resource type is corresponding comprises 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, then show that ID section corresponding to this resource type comprises resource ID, and each resource ID comprised is unappropriated resource ID; Each resource ID that ID section corresponding to resource type comprises is continuous print, and the least resource ID that ID section can be used to comprise and maximum resource ID is to represent this ID section.Such as, the corresponding relation of resource type as shown in table 1 and ID section is stored 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 unappropriated resource ID and be respectively TA1, TA2, TA3, TA4 and TA5, and TA1<TA2<TA3<TA4LE ssT.LTssT.LTTA5, therefore can represent with minimum resource ID and TA1 and maximum resource ID and TA5 the ID section (TA1 that resource type TypeA is corresponding, TA5), in the third line record of table 1, the ID section that resource type TypeC is corresponding is empty, then show that the ID section that resource type TypeC is corresponding does not have unappropriated resource ID.
Table 1
Resource type 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 the resource A1 that resource type Type1 is corresponding, the resource type TypeA carried according to this newly-built resource request message 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 that the record searched comprises ID section (TA1 corresponding to resource type TypeA, TA5) be not empty, namely judge that the ID section that resource type TypeA is corresponding also exists unappropriated resource ID.
Step 203: the ID section that application server is corresponding according to this resource type is the unappropriated resource ID of this Resourse Distribute, sends newly-built resource response message to user, and this newly-built resource response message carries the resource ID of distribution, end operation.
Particularly, application server comprises unappropriated resource ID from the ID section that this resource type is corresponding selects minimum or maximum resource ID, the resource ID of selection is distributed to this resource, sends newly-built resource response message to user, and this newly-built resource response message carries the resource ID of distribution.
Wherein, after user receives newly-built resource response message, call corresponding resource according to the resource ID that this newly-built resource response message is carried.
Further, application server is after this Resourse Distribute resource ID, comprises the resource ID removing distribution in ID section corresponding to this resource type at resource type and the corresponding relation of ID section.
Such as, application server 1 is from ID section (TA1 corresponding to resource type TypeA, TA5) comprise in unappropriated resource ID (being respectively TA1, TA2, TA3, TA4 and TA5) and select minimum resource ID and TA1, the TA1 of selection 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, from the ID section (TA1, TA5) that resource type TypeA is corresponding, remove the TA1 selected obtain ID section corresponding to resource type TypeA for (TA2, A5), namely as shown in table 2.
Table 2
Resource type ID section
TypeA (TA2,TA5)
TypeC Empty
…… ……
Step 204: application server sends ID section allocation request message to identification section distribution server, and this ID section allocation request message carries this resource type;
Suppose, application server 1 also receives the newly-built resource request message that the second user sends, and the resource type that resource is set up in the second user's request of carrying of this new resources request message is TypeB; According to resource type TypeB, search resource type as shown in table 2 and ID section corresponding relation, and the record comprising resource type TypeB is not found out from resource type as shown in table 2 and ID section corresponding relation, then judge that first time receives the newly-built resource request message carrying resource type TypeB, then send and distribute ID section request message to identification section distribution server, and this ID section allocation request message carries resource type TypeB.
Step 205: identification section distribution server receives this ID section allocation request message, the resource type of carrying for this ID section allocation request message distributes the ID section be not assigned with;
Particularly, identification section distribution server receives this ID section allocation request message, is then that the resource type that this ID section allocation request message is carried distributes ID section by the step of following (1)-(3), comprises:
(1): identification section distribution server searches the corresponding relation of the maximum resource ID of resource type and the distribution stored according to this resource type, if find out the maximum resource ID distributed for this resource type, then perform (2), if do not find out the maximum resource ID distributed for this resource type, then perform (3);
Wherein, if find out the maximum resource ID distributed for this resource type from the corresponding relation of the maximum resource ID of the resource type stored and distribution, then identification section distribution server can be judged for this resource type distributed ID section, and the maximum resource ID searched is the maximum resource ID that the ID section of distributing for this resource type comprises; If do not find out the maximum resource ID distributed for this resource type from the corresponding relation of the maximum resource ID of the resource type stored and distribution, then judge not for this resource type distributed ID section.
(2): identification section distribution server determines unappropriated resource ID set according to maximum resource ID, from determining the ID section selecting to comprise continuously a default value resource ID unappropriated resource ID set, and the ID section of selection is distributed to this resource type, then return.
Further, from the ID section of distributing for this resource type, obtain maximum resource ID, the maximum resource ID distributed is updated to the maximum resource ID of acquisition in the corresponding relation of the maximum resource ID of resource type and distribution for this resource type.
Such as, identification section distribution server receives application server 1 and sends the ID section allocation request message of carrying resource type TypeB, the corresponding relation of the maximum resource ID of resource type as shown in table 3 and distribution is searched according to resource type TypeB, and the maximum resource ID found 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 determined comprises the resource ID that resource ID is greater than B7, and determine that the resource ID that unappropriated resource ID set comprises is respectively B8, B9, B10, B11, B12, B13 suppose that the data value preset is 5, then from determining the ID section selecting to comprise continuously 5 resource IDs unappropriated resource ID set, suppose that the ID section selected comprises 5 resource IDs continuously and is respectively B8, B9, B10, B11 and B12, and the ID section selected can be expressed as (B8, B12), by the ID section (B8 selected, B12) this resource type TypeB is distributed to.
Table 3
Resource type The maximum resource ID distributed
TypeA A5
TypeB B7
TypeC C5
…… ……
Further, from the ID section (B8 distributed for this resource type TypeB, 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, maximum resource ID and B7 distributed for resource type TypeB is updated to maximum resource ID and B12 of acquisition, obtains 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 distributed
TypeA A5
TypeB B12
TypeC C5
…… ……
(3): identification section distribution server determines unappropriated resource ID set according to the initial value of the resource ID preset, the ID section comprising a default value resource ID is continuously selected from unappropriated resource ID set, and the ID section of selection is distributed to this resource type, then return.
Further, identification section distribution server selects maximum resource ID from the ID section of distributing for this resource type, and stores the corresponding relation of the maximum resource ID of this resource type and acquisition.
Step 206: identification section distribution server sends ID section assignment response message to application server, and this ID section assignment response message carries the ID section of distributing for this resource type;
Such as, identification section distribution server sends ID section assignment response message to application server 1, and this ID section assignment response message carries the ID section (B8, B12) into resource type TypeB distributes.
Step 207: application server receives this ID section assignment response message, the ID section of carrying according to this ID section assignment response message is the unappropriated resource ID of this Resourse Distribute, send newly-built resource response message to user, and this newly-built resource response message carries 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 unappropriated resource ID selects minimum or maximum resource ID, the resource ID of selection is distributed to this resource, send newly-built resource response message to user, and this newly-built resource response message carries the resource ID of distribution.
Further, application server is after this Resourse Distribute resource ID, can also remove the resource ID of distribution in the ID section that this resource type is corresponding, stores the corresponding relation of the ID section of the resource ID that this resource type is distributed with removal.
Particularly, search the corresponding relation of resource type and the ID section stored according to this resource type, if find out the record comprising this resource type, wherein, the ID section removing the resource ID distributed, for empty, is stored in this record by the ID section that this record comprises; If do not find out the record comprising this resource type, then using this resource type with remove the ID section of resource ID of distributing as a new record and be stored in the corresponding relation of resource type and ID section.
Such as, application server 1 receives and carries ID section (B8 corresponding to resource type TypeB, B12) ID section assignment response message, from the ID section (B8 that this ID section assignment response message is carried, B12) comprising in unappropriated resource ID (being respectively B8, B9, B10, B11 and B12) selects minimum resource ID to be B8, the resource ID of selection and B8 are distributed to this resource, send newly-built resource response message to the second user, and this newly-built resource response message carries resource ID and the B8 of distribution; Further, application server 1 can also at ID section (B8 corresponding to resource type TypeB, B12) resource ID distributed and B8 is removed in, the ID section obtained 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 ID section
TypeA (TA2,A5)
TypeC Empty
TypeB (B9,B12)
…… ……
In embodiments of the present invention, receive the newly-built resource request message carrying resource type, set up the resource that this resource type is corresponding, be the unappropriated resource ID of this Resourse Distribute according to the corresponding relation of the resource type stored and ID section and this resource type, the resource ID for this Resourse Distribute so can be made to have global uniqueness.
Embodiment 3
As shown in Figure 4, embodiments provide 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 carries resource type;
Step 302: according to the corresponding relation of the maximum resource ID of the resource type stored and distribution be that this resource type distributes ID section, and ID section comprises a continuous default value resource ID;
Step 303: send ID assignment response message to application server, this ID assignment response message carries the ID section of distribution.
Embodiment 4
As shown in Figure 5, embodiments provide a kind of application server, comprising:
First receiver module 401, for receiving newly-built resource request message, this newly-built resource request message carries the resource type that resource is set up in user's request;
First distribution module 402, for setting up resource corresponding to this resource type, be the unappropriated resource ID of described Resourse Distribute according to the corresponding relation of the resource type stored and ID section and this resource type, this ID section comprises continuous unappropriated resource ID;
First sending module 403, for sending newly-built resource response message, this newly-built resource response message carries the resource ID into this Resourse Distribute.
Wherein, the first distribution module 402 comprises:
First searches unit, for according to this resource type, searches the corresponding relation of resource type and the ID section stored;
First allocation units, if for finding out ID section corresponding to this resource type, then corresponding according to this resource type ID section is the unappropriated resource ID of this Resourse Distribute.
Further, the first distribution module 402 also comprises:
Request unit, if for not finding out ID section corresponding to this resource type, then asks identification section distribution server to be that this resource type distributes corresponding ID section, and ID section corresponding to this resource type comprises a continuous default value resource ID;
First allocation units are the unappropriated resource ID of this Resourse Distribute for the ID section corresponding according to this resource type.
First allocation units, comprise in unappropriated resource ID specifically for the ID section corresponding from this resource type and select maximum or minimum resource ID, the resource ID of selection are distributed to this resource and as the resource ID of this resource.
Further, application server also comprises:
Remove module, for removing the resource ID for this Resourse Distribute in the ID section that the resource type stored is corresponding with this resource type that the corresponding relation of ID section comprises.
Wherein, request unit comprises:
Send subelement, for sending ID section allocation request message to identification section distribution server, and this ID section allocation request message carries this resource type, makes this identification section distribution server for this resource type distribution ID section;
Receive subelement, for receiving the ID section assignment response message that this identification section distribution server sends, and this ID section assignment response message carries this identification section distribution server for this resource type distribution ID section.
This application server also comprises:
First memory module, for removing the resource ID for this Resourse Distribute from ID section corresponding to this resource type, stores the corresponding relation between this resource type with the ID section after this removal.
In embodiments of the present invention, receive the newly-built resource request message carrying resource type, set up the resource that this resource type is corresponding, be the unappropriated resource ID of this Resourse Distribute according to the corresponding relation of the resource type stored and ID section and this resource type, the resource ID for this Resourse Distribute so can be made to have global uniqueness.
Embodiment 5
As shown in Figure 6, embodiments provide a kind of identification section distribution server, comprising:
Second receiver module 501, for receiving the ID section allocation request message that application server sends, this ID section allocation request message carries resource type;
Second distribution module 502, for the corresponding relation of the maximum resource ID according to the resource type stored and distribution, for this resource type distributes ID section, and this ID section comprises a continuous default value resource ID;
Second sending module 503, for sending ID section assignment response message to this application server, this ID section assignment response message carries the ID section of this distribution.
Wherein, this second distribution module 502 comprises:
Second searches unit, for according to this resource type, searches the corresponding relation of the maximum resource ID of this resource type stored and distribution;
Second allocation units, if for finding out corresponding maximum resource ID, the maximum resource ID then searched according to this determines unappropriated resource ID set, is that this resource type distributes the ID section comprising a continuous default value resource ID according to this unappropriated resource ID set.
Further, this identification section distribution server also comprises:
Update module, for obtaining maximum resource ID from the ID section of this distribution, at this resource type stored and the maximum resource ID in the corresponding relation of ID section, maximum resource ID corresponding for this resource type being updated to this acquisition,
Further, this second distribution module 502 also comprises:
3rd allocation units, if for not finding out corresponding maximum resource ID, resource ID initial value according to presetting determines unappropriated resource ID set, is that this resource type distributes the ID section comprising a continuous default value resource ID according to this unappropriated resource ID set.
This identification section distribution server also comprises:
Second memory module, 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 realizing above-described embodiment can have been come by hardware, the hardware that also can carry out instruction relevant by program completes, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium mentioned can be read-only memory, disk or CD etc.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (12)

1. in a distributed system Resources allocation mark a method, it 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;
Set up the resource that described resource type is corresponding, be the unappropriated resource ID of described Resourse Distribute according to the corresponding relation of the resource type stored and mark (ID) section and described resource type, described ID section comprises continuous unappropriated resource ID;
Send newly-built resource response message, described newly-built resource response message carries the resource ID into described Resourse Distribute.
2. the method for claim 1, is characterized in that, the corresponding relation of the resource type that described basis has stored and ID section and described resource type are the unappropriated resource ID of described Resourse Distribute, comprising:
According to described resource type, the corresponding relation of the resource type stored described in searching and ID section;
If find out the ID section that described resource type is corresponding, then corresponding according to described resource type ID section is the unappropriated resource ID of described Resourse Distribute.
3. method as claimed in claim 2, it is characterized in that, described method also comprises:
If do not find out the ID section that described resource type is corresponding, then ask identification section distribution server to be that described resource type distributes corresponding ID section, and ID section corresponding to described resource type comprise a continuous default value resource ID;
The ID section corresponding according to described resource type is the unappropriated resource ID of described Resourse Distribute.
4. method as claimed in claim 2 or claim 3, it is characterized in that, the ID section corresponding according to described resource type is the unappropriated resource ID of described Resourse Distribute, comprising:
Comprise unappropriated resource ID from the ID section that described resource type is corresponding and select maximum or minimum resource ID, the resource ID of selection is distributed to described resource and as the resource ID of described resource.
5. method as claimed in claim 2, it is characterized in that, the ID section corresponding according to described resource type also comprises after being the unappropriated resource ID of described Resourse Distribute:
The resource ID for described Resourse Distribute is removed in the ID section that the described resource type stored is corresponding with the described resource type that the corresponding relation of ID section comprises.
6. method as claimed in claim 3, is characterized in that, described request identification section distribution server is that described resource type distributes 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, make described identification section distribution server be that described resource type distributes ID section;
Receive the ID section assignment response message that described identification section distribution server sends, and described ID section assignment response message carries the ID section that described identification section distribution server is the distribution of described resource type.
7. the method as described in claim 3 or 6, is characterized in that, the described ID section corresponding according to described resource type also comprises after being the unappropriated resource ID of described Resourse Distribute:
From the ID section that described resource type is corresponding, remove the resource ID for described Resourse Distribute, store the corresponding relation between described resource type with the ID section after described removal.
8. a method for the identification section that Resources allocation type is corresponding in a distributed system, it is characterized in that, described method comprises:
Receive mark (ID) the section allocation request message that application server sends, described ID section allocation request message carries resource type;
According to the corresponding relation of the maximum resource ID of the resource type stored and distribution, be that described resource type distributes 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 carries 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 stored and distribution, for described resource type distributes ID section, comprising:
According to described resource type, the corresponding relation of the maximum resource ID of the resource type stored described in searching and distribution;
If find out corresponding maximum resource ID, then the maximum resource ID searched described in basis determines unappropriated resource ID set, is that described resource type distributes the ID section comprising 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 the distribution of described resource type comprises the ID section of a continuous default value resource ID, also comprise according to described unappropriated resource ID set:
Maximum resource ID is obtained from the ID section of described distribution, at the described resource type stored and the maximum resource ID in the corresponding relation of ID section, maximum resource ID corresponding for described resource type being updated to described acquisition,
11. methods as claimed in claim 9, it is characterized in that, described method also comprises:
If do not find out corresponding maximum resource ID, the resource ID initial value according to presetting determines unappropriated resource ID set, is that described resource type distributes the ID section comprising a continuous default value resource ID according to described unappropriated resource ID set.
12. methods as claimed in claim 11, is characterized in that, are, after the distribution of described resource type comprises the ID section of a continuous default value resource ID, also comprise according to described unappropriated resource ID set:
From the ID section of described distribution, obtain maximum resource ID, 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 CN103139255A (en) 2013-06-05
CN103139255B true 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)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104301234B (en) * 2013-07-16 2019-02-05 腾讯科技(深圳)有限公司 A kind of method for routing and device
CN104113435B (en) * 2014-07-04 2017-11-07 广州华多网络科技有限公司 Generate the method and device of mark
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
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
CN106341497B (en) * 2016-11-18 2019-08-30 腾讯科技(深圳)有限公司 Digital ID generation method and device
CN108509535B (en) * 2018-03-15 2020-12-01 烽火通信科技股份有限公司 Resource ID management system and method based on interval
CN111385370B (en) * 2018-12-28 2022-07-08 广州市百果园信息技术有限公司 ID allocation method, device, storage medium and ID allocation system
CN111666147B (en) * 2019-03-07 2022-06-07 上海商汤智能科技有限公司 Resource scheduling method, equipment, system and central server
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

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

Also Published As

Publication number Publication date
CN103139255A (en) 2013-06-05

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
US8069224B2 (en) Method, equipment and system for resource acquisition
CN109117275B (en) Account checking method and device based on data slicing, computer equipment and storage medium
CN104954468A (en) Resource allocation method and resource allocation device
CN102033882B (en) Method and system for storing performance data
CN104702625A (en) Method and device for scheduling access request in CDN (Content Delivery Network)
CN106331148A (en) Cache management method and cache management device for data reading by clients
CN106681995B (en) Data caching method, data query method and device
CN104469392A (en) Video file storage method and device
CN105763595A (en) Method of improving data processing efficiency and server
CN105095495B (en) A kind of distributed file system buffer memory management method and system
CN109254981B (en) Data management method and device of distributed cache system
CN101170522A (en) A method and system for distributing history events
CN104301990A (en) Data synchronizing method and device
CN102724301B (en) Cloud database system and method and equipment for reading and writing cloud data
CN109002260B (en) Processing method and processing system for cache data
CN113377817A (en) Data processing method, system, device and storage medium
US10025859B2 (en) Method and system for second-degree friend query
CN109101608A (en) A kind of date storage method, data query method and device
CN106815334A (en) A kind of data query method and device for terminal
CN101873232A (en) Judgment method of equipment uniqueness and IP network discovery server
CN103441865A (en) Method and system for managing IP addresses, BRASes and Portal server
CN101572884B (en) Method and device for finding IMSI data

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