CN106341497B - Digital ID generation method and device - Google Patents
Digital ID generation method and device Download PDFInfo
- Publication number
- CN106341497B CN106341497B CN201611018935.8A CN201611018935A CN106341497B CN 106341497 B CN106341497 B CN 106341497B CN 201611018935 A CN201611018935 A CN 201611018935A CN 106341497 B CN106341497 B CN 106341497B
- Authority
- CN
- China
- Prior art keywords
- digital
- allocated
- information
- server
- distribution
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/146—Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Transfer Between Computers (AREA)
Abstract
Number ID generation method provided by the present application and device, this method stores the digital ID distribution information of each project in the server, terminal device obtains the corresponding number ID distribution information of some project from the server, includes the latest digital ID for being allocation of items in number ID distribution information.Then, terminal device can currently distribute digital ID according to latest digital ID determination, and distribute to the object to be allocated of terminal device local, so that each object to be allocated has a unique number ID.Terminal device is after object to be allocated distributes digital ID, the digital id information of distribution is sent to server, the number id information includes the last one number ID for object to be allocated distribution, so that the corresponding latest digital ID of the project is updated to the last one number ID by server.In this way, other terminal devices are allocated since updated latest digital ID, the uniqueness of the digital ID of each developer's distribution ensure that.
Description
Technical field
This application involves field of computer technology, more particularly to a kind of number ID (Identification, body
Part mark) generation method and device.
Background technique
It will create many objects during general software project development, for example, model, special efficacy, role, article, technical ability
Deng each object can generally have a string name, be properly termed as character ID.But there may be references between object
Relationship requires a unique mark alternatively, some need the object stored into server database to indicate that this is right
As because the search efficiency of character string is too low, moreover, character string consuming flow is too many, institute if transmitted as network protocol
To need to distribute a binary number ID for object.
With the development of software project development technology, needs multiple people or project team while developing the feelings of a software project
Condition is more and more.Traditional approach distributes number ID using the object in project editor software for editing project and for these objects.
But when multiple people or multiple project team develop a project simultaneously, different developers or project team are utilized respectively local
Project editor be the object distribution number ID locallyd create, the project editor on different terminals, which not can guarantee, to be distributed
ID be it is unique, therefore, the phenomenon that this mode is likely to occur repetition ID, i.e., the corresponding ID phase of different objects in same project
Together, the object ID repetition and in project will lead to Project in Operation, and there are risks and hidden danger.
Summary of the invention
In view of this, the application provides a kind of number ID generation method and device, can not be to solve multiple terminal devices
The technical issues of different objects in same project distribute unique number ID.
In order to solve the above technical problems, the application provides the following technical solutions:
The application provides a kind of digital identity mark ID generation method, is applied in terminal device, comprising:
The corresponding number ID of current project is obtained from server and distributes information, and the number ID distribution information includes
The latest digital ID distributed for object in the current project;
Digital ID can currently be distributed according to latest digital ID determination, and distribute to terminal device creation to point
With object, so that each object to be allocated has a unique number ID;
The server will be sent to for the digital id information of the object to be allocated distribution so that the server according to
The number id information updates the number ID and distributes information, and the number id information includes distributing for the object to be allocated
The last one number ID so that the server by the number ID newest ID distributed in information be updated to it is described the last one
Digital ID;
When receiving after being updated successfully response message of the server return, the digital ID of the object to be allocated is determined
It is allocated successfully, it is described to be updated successfully response message the number ID is successfully updated according to the digital id information by the server
It is generated after distribution information.
The application also provides a kind of digital identity mark ID generation method, is applied in server, the version management clothes
The corresponding number ID distribution information of each project is stored in business device, the number ID distribution information is including being described each
The latest digital ID of allocation of items, which comprises
The server returns to digital ID corresponding to the current project that the premises equipment requests obtain to terminal device
Information is distributed, the number id information includes the latest digital ID for being the current project distribution, so that the terminal is set
It is standby currently to distribute digital ID according to latest digital ID determination, and distribute to the to be allocated right of the terminal device creation
As so that each object to be allocated has a unique number ID;
After receiving the digital id information that the terminal device is sent, the server according to the digital id information more
The new number ID distributes information, and the number id information includes that the terminal device is the last of the object distribution to be allocated
One number ID, so that the latest digital ID in the corresponding number ID distribution information of the project is updated to institute by the server
State the last one number ID;
After the server is successfully updated the number ID distribution information according to the digital id information, Xiang Suoshu terminal
Equipment return is updated successfully response message so that the terminal device receive it is described be updated successfully after response message determine described in
The digital ID of project is allocated successfully.
The application provides a kind of digital identity mark ID generating means, is applied in terminal device, comprising:
First obtains module, distributes information, the number for obtaining the corresponding number ID of current project from server
ID distribution information includes the latest digital ID for being object distribution in the current project;
ID distribution module for can currently distribute digital ID according to latest digital ID determination, and is distributed to described
The object to be allocated of terminal device creation, so that each object to be allocated has a unique number ID;
Sending module, the digital id information for that will be the object to be allocated distribution are sent to the server, so that
The server updates the number ID according to the digital id information and distributes information, the number id information include be described in
The last one number ID of distribution object distribution, so that the server updates the number ID newest ID distributed in information
For the last one number ID;
Determining module, for determining described wait divide when receiving after being updated successfully response message of the server return
Digital ID with object is allocated successfully, described to be updated successfully response message by the server according to the digital id information success
It is generated after updating the number ID distribution information.
The application also provides a kind of digital identity mark ID generating means, is applied in server, deposits in the server
The corresponding number ID distribution information of each project is contained, the number ID distribution information is including being right in each project
As the latest digital ID of distribution;Described device includes:
Sending module, for returning to number corresponding to the current project that the premises equipment requests obtain to terminal device
ID distributes information, and the number id information includes the latest digital ID for being the current project distribution, so that the terminal
Equipment can currently distribute digital ID according to latest digital ID determination, and distribute to the to be allocated right of the terminal device creation
As so that each object to be allocated has a unique number ID;
Update module, for being believed after receiving the digital id information that the terminal device is sent according to the number ID
Breath updates the number ID and distributes information, and the number id information includes that the terminal device is that the object to be allocated distributes
The last one number ID, so that the server updates the latest digital ID in the corresponding number ID distribution information of the project
For the last one number ID;
Return module, for distributing information when the server is successfully updated the number ID according to the digital id information
Afterwards, Xiang Suoshu terminal device return is updated successfully response message, so that the terminal device receives and described is updated successfully response
Determine that the digital ID of the project is allocated successfully after message.
The generation method of number ID provided by the present application stores the digital ID distribution information of each project in the server,
Each terminal device (that is, developer) can access the server, and obtain corresponding to current project from the server
Digital ID distributes information, and it has been allocation of items that number ID, which is distributed in information including (terminal device or other terminal devices),
Latest digital ID.Then, which can currently distribute digital ID according to latest digital ID determination, and distribute to the terminal
The object to be allocated of equipment creation, so that each object to be allocated has a unique number ID.The terminal device is local
After object to be allocated distributes digital ID, the digital id information of this sub-distribution is sent in server, wherein number ID letter
Breath includes the last one number ID for native object distribution, so that server updates the number ID according to the number id information
Information is distributed, and the number ID latest digital ID distributed in information is updated to the last one number ID, to protect
The latest digital ID that the project is currently distributed is stored in card server.In this way, other terminal devices can from it is updated most
New number ID starts to be allocated for the object of other terminal device locals, to guarantee that each terminal device is same item
The digital ID that different objects in mesh are distributed has uniqueness.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
The embodiment of application for those of ordinary skill in the art without creative efforts, can also basis
The attached drawing of offer obtains other attached drawings.
Fig. 1 is a kind of flow chart of number ID generation method of the embodiment of the present invention;
Fig. 2 is the flow chart of another number ID generation method of the embodiment of the present invention;
Fig. 3 is the flow chart of another number ID generation method of the embodiment of the present invention;
Fig. 4 is the flow chart of another number ID generation method of the embodiment of the present invention;
Fig. 5 is a kind of block diagram of number ID generating means of the embodiment of the present invention;
Fig. 6 is a kind of block diagram of ID distribution module of the embodiment of the present invention;
Fig. 7 is the block diagram of another ID distribution module of the embodiment of the present invention;
Fig. 8 is the block diagram of another ID distribution module of the embodiment of the present invention;
Fig. 9 is a kind of block diagram of the digital identity mark ID generating means of object of the embodiment of the present invention;
Figure 10 is a kind of block diagram of terminal device of the embodiment of the present invention;
Figure 11 is a kind of block diagram of server of the embodiment of the present invention.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of embodiments of the present application, instead of all the embodiments.It is based on
Embodiment in the application, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall in the protection scope of this application.
The mode of traditional software project object distribution number ID, when multiple developers (or project team) develop one simultaneously
When software project, each terminal device is that the object locallyd create voluntarily distributes number ID, and such different terminal equipment is difference
There may be repetitions by the digital ID of object distribution, because each terminal device only knows the ID distribution condition of oneself, it is not known that its
The ID distribution condition of its terminal device.Technical solution of the present invention is corresponding newest by storage software project in the server
Digital ID distributes information, number ID distribution information include currently be newest number that each object in software project is distributed
Word ID.Terminal device can obtain number ID distribution information from the server, be local pair since latest digital ID
As carrying out number ID distribution, and the digital id information of the last one number ID comprising this sub-distribution is sent to server, with
So that server is updated the digital ID in server according to the number id information and distribute information, server distributes information more to digital ID
After new success, this time ID distribution of terminal device is just effective.In such manner, it is possible to guarantee what each developer was distributed by native object
Digital ID is unique.Specific embodiment through the invention is described as to the method for object distribution number ID below.
Referring to Figure 1, a kind of flow chart of number ID generation method of the embodiment of the present invention is shown, this method is applied to eventually
In end equipment, which can be PC (Personal Computer, personal computer) machine, laptop etc..Such as figure
Shown in 1, this method be may comprise steps of:
S110, terminal device obtain the corresponding number ID distribution information of current project from server;
Wherein, it currently be latest digital ID that object in current project distributes that number ID, which distributes information and includes,.
S120, terminal device can currently distribute digital ID according to latest digital ID determination, and distribute to terminal device wound
The object to be allocated built, so that each object to be allocated has a unique number ID.
Terminal device distributes number from the object to be allocated of behavior local according to the latest digital ID obtained from server
ID。
In one possible implementation of the present invention, described can currently to distribute digital ID be a number ID range, should
Digital ID range includes local all object to be allocated digital ID to be distributed, and concrete implementation process is as follows:
Terminal device needs first to determine the destination number of local object to be allocated, then, according to the latest digital ID of acquisition
And the destination number determines number ID range to be allocated;Wherein, the digital ID within the scope of number ID to be allocated with preset step-length according to
It is secondary to be incremented by, and first digit ID is the digital ID that the latest digital ID is obtained with preset step-length from after increasing;It then, will be wait divide
Each object to be allocated is distributed to one by one with the digital ID within the scope of digital ID, guarantees that each object to be allocated is unique with one
Digital ID.
For example, the latest digital ID of the project A obtained from server is i, pair in the project A of terminal device X creation
As quantity is n, and preset step-length is 1, then is the corresponding number to be allocated of n object that terminal device X is created from i+1~i+n
ID range.It is then possible to which i+1~i+n is distributed to each object one by one.
In the alternatively possible implementation of the present invention, described can currently to distribute digital ID be current object pair to be allocated
The number ID answered, in such implementation, without predefining number ID range to be allocated, but directly by terminal device
Obtain an object to be allocated determine it is corresponding can currently distribute digital ID, concrete implementation process is as follows:
Newest ID is distributed to first object to be allocated from after increasing with preset step-length by terminal device;For other, non-
One object to be allocated, the digital ID distribution that the digital ID of a upper object to be allocated is obtained with preset step-length from after increasing should
Object to be allocated, and so on, until all objects to be allocated all distribute.
For example, the latest digital ID of the project A obtained from server is i, and preset step-length is 1 and distributes to i+1
The first object to be allocated of the project A of terminal device X creation;The digital ID of second object to be allocated is that i+1 increases default step
The numerical value (i.e. i+2) obtained after length;And so on, until local all objects to be allocated all distribute.
Wherein, preset step-length can sets itself according to actual needs, for example, can be set as 1, the present invention to this not
It limits.
Optionally, the digital ID for object to be allocated distribution is 32 or 64 bits, and the digit of number ID is remote
Much smaller than 128, so that the efficiency for searching object according to digital ID index is improved, so that program operation is more efficient.
S130, the digital id information distributed for object to be allocated is sent to server by terminal device, so that the service
Device updates the number ID distribution information according to the digital id information, wherein digital id information include for this sub-distribution most
The latter number ID, so that the latest digital ID is updated to the last one number ID by server.
In one possible implementation of the present invention, for example, the current latest digital ID of the project A stored in server
It is i, the last one number ID for the object distribution that terminal device X is the project A of creation is i+n and is sent to server, is serviced
The corresponding latest digital ID of project A is updated to i+n by i by device.
In other possible implementations of the invention, digital id information can also include: to send digital id information
User information (for example, user name or employee number of developer), and, all number ID of this sub-distribution, in order to track
The problems in software project development process.
S140, terminal device receives the response message that server returns, and judges the type of response message;Response message packet
It includes and is updated successfully response message and update failure response message.If it is response message is updated successfully, then S150 is executed;If it is
Failure response message is updated, then executes S160.
Current project is completed according to the digital id information that terminal device (for example, terminal device A) is sent when server to correspond to
Digital ID distribution information update operation after, to terminal device A return be updated successfully response message.
Before the digital id information that terminal device A submits oneself to distribute, if there is other terminal devices are (for example, terminal
Equipment B) it has had submitted and has distributed the digital id information that information is distributed according to number ID newest in version management server, this
When, the digital ID distribution information in server is updated according to the digital id information that terminal device B is uploaded, that is, service
Currently stored newest number ID distribution information is the id information that terminal device B is provided in device, and terminal device A is caused to upload
Digital id information is not based on the distribution that the currently stored latest digital ID of server is carried out, at this point, server is to terminal device A
It returns and updates failure response message.
Usually object can be identified with readable strong character string when creating the content of software project, construct software version
Originally number ID or when running the software project is distributed to object again, so the frequency of general number ID distribution is not high, therefore, together
The probability that the different developers of one project carry out digital ID distribution simultaneously is very low.
S150, terminal device determine that this ID is allocated successfully.
Only after the digital id information of terminal device distribution is successfully committed in server, this ID point of terminal device
It can just be used with result.
S160, terminal device determines this ID distribution failure, and returns to and execute S110.
If terminal device receives the update failure response message of server return, explanation may have other developers just
Distributing ID using current digital ID distribution information, terminal device this ID distribution it is invalid, need to abandon this sub-distribution
Digital id information returns to execution S110 and obtains newest number ID distribution information from server again, and newest based on this
Digital ID distribution information re-starts distribution.
Number ID generation method provided in this embodiment stores the digital ID distribution information of each project in the server,
Each terminal device (that is, developer) can access the server, and obtain corresponding to current project from the server
Digital ID distributes information, and it has been allocation of items that number ID, which is distributed in information including (terminal device or other terminal devices),
Latest digital ID.Then, which can currently distribute digital ID according to latest digital ID determination, and distribute to the terminal
The object to be allocated of equipment creation, so that each object to be allocated has a unique number ID.The terminal device is local
After object to be allocated distributes digital ID, the digital id information of this sub-distribution is sent in server, wherein number ID letter
Breath includes the last one number ID for native object distribution, so that server updates the number ID according to the number id information
Information is distributed, and the number ID latest digital ID distributed in information is updated to the last one number ID, to protect
The latest digital ID that the project is currently distributed is stored in card server.In this way, other terminal devices can from it is updated most
New number ID starts to be allocated for the object of other terminal device locals, to guarantee that each terminal device is same item
The digital ID that different objects in mesh are distributed has uniqueness.
Fig. 2 is referred to, the flow chart of another number ID generation method of the embodiment of the present invention is shown, this method is applied to
In terminal device, according to the ID section that object type different demarcation is different in the present embodiment, and remember in digital ID distribution information
Record the corresponding latest digital ID of each object type.As shown in Fig. 2, method includes the following steps:
S210, terminal device obtain the corresponding number ID distribution information of current project from server.
It includes the corresponding latest digital ID of each object type that number ID, which distributes information,.It is in advance different object types
Divide different ID sections, and the ID quantity object use of same type later enough that the ID section divided is included.
S220 determines the object type of current object to be allocated.
S230 judges whether the current object to be allocated is first object to be allocated in the object type;
If it is, executing S240;If it is not, then executing S250.
S240 obtains the corresponding latest digital ID of the object type from number ID distribution information, and by newest number
Word ID distributes to the current object to be allocated with the digital ID that preset step-length is obtained from after increasing.
S250, by the corresponding number ID of upper one of object to be allocated current in object type object to be allocated with pre-
If the digital ID that step-length is obtained from after increasing distributes to the current object to be allocated, and so on, until in the object type
All object to be allocated all distributes.
For example, current object to be allocated is x in the object type, current object x to be allocated in same target type
A upper object to be allocated is x-1, and the corresponding number ID of object x-1 to be allocated is i, and preset step-length is 1, then current to be allocated
The corresponding number ID of object x is i+1.
S260 judges that all object types of current project all distribute, if it is, executing S270;If it is not, then returning
Receipt row S220.
S270, the digital id information that this ID is distributed are sent to server, which includes for terminal device
Corresponding the last one number ID of each object type of the current project of creation, so that server is by each right of current project
It is updated to corresponding the last one number ID respectively as type corresponds to latest digital ID.
For example, current project includes tri- object types of A, B, C, wherein corresponding the last one number ID of object type A
It is i+n for i+m, the last one corresponding number ID of object type B, the last one corresponding number ID of object type C is i+o;
Then server needs the corresponding latest digital ID of object type A being updated to i+m, by the corresponding latest digital ID of object type B
It is updated to i+n, and, the corresponding latest digital ID of object type C is updated to i+o.In other possible realizations of the invention
In mode, the digital id information that terminal device is sent to server further includes the user information for sending the number id information, and,
The information of all number ID of this sub-distribution.
S280 receives the response message that server returns, and judges the type of response message, responds if it is being updated successfully
Message then executes S290;If it is failure response message is updated, then S2100 is executed.
S290 determines that this ID is allocated successfully.
Only after the digital id information that terminal device is submitted successfully is committed in server, this ID points of terminal device
It can just be used with result.
S2100 determines this ID distribution failure, and returns and execute S210.
If determining that this ID allocation result is invalid after terminal device receives the update failed message of server return,
It needs to obtain newest number ID distribution information from server again and is allocated based on the newest digital id information.
Number ID generation method provided in this embodiment, different ID sections, server are divided according to different object types
The corresponding number ID distribution information of the project of middle storage has recorded the corresponding latest digital ID of each object type.In this way, user
ID section where digital ID can quickly judge the type of object.When distributing number ID for object, to be allocated right
Start to continue to distribute backward as the latest digital ID of corresponding object type increases the numerical value obtained after preset step-length, until creation
Whole object types all distribute.Then, the digital id information of this sub-distribution is sent to server, so that server is corresponding
The digital ID for updating current project distributes information, and other developers are allocated backward from updated latest digital ID continuation,
To guarantee the uniqueness of the digital ID of each developer's distribution.
Fig. 3 is referred to, the flow chart of another number ID generation method of the embodiment of the present invention is shown, this method is applied to
In system comprising terminal device and server, as shown in figure 3, this method may comprise steps of:
S310, terminal device send ID request message to server;The ID request message carries the digital ID that request obtains
Distribute project number corresponding to information.
S320, server inquire local data base and obtain the corresponding number ID distribution information of the project number.
In one possible implementation of the present invention, server can be existing version management server, for example,
SVN (Subversion, version control system) server;SVN is a very versatile software management system, it is often used to
Management program source code, but version management server can also manage any kind of file, for example, text, video, picture etc.
Deng.In such application scenarios, into ID file, terminal device obtains the ID from SVN server for digital ID distribution information storage
Then file reads number ID from the ID file and distributes information.
In one possible implementation of the present invention, server can be one file of each establishment of item, this document
Middle storage project corresponding number ID distribute information;In other implementations, server can also only create a text
Part, the corresponding number ID distribution information of all items are stored in this document, and this document includes project information and corresponding ID
Data item, wherein project information can be project number;The corresponding number ID distribution of the project information is stored in the ID data item
Information.
In one possible implementation of the present invention, it has been currently the allocation of items that number ID, which distributes information to include,
Latest digital ID.In other possible implementations, different ID sections can be divided for different object types, and in number
The corresponding latest digital ID of each object type is recorded in word ID distribution information.In other possible implementations, number
It can also include that the user information for sending digital id information and this ID distribute details that ID, which distributes information, for example, number ID points
It include that " developer * * *, the digital ID of distribution are i~n " to the following contents, in this way convenient in retrospect project development process with information
Problem.
Digital ID distribution information is sent to terminal device by S330, server.
S340, terminal device obtain current object to be allocated, and judge whether current object to be allocated is first wait divide
With object, if it is, executing S350;If it is not, then executing S360.
S350, after terminal device increases the latest digital ID with preset step-length certainly, it is described current to be allocated right to distribute to
As;
S360, terminal device is by the digital ID of a upper object to be allocated for the current object to be allocated with preset step-length
The current object to be allocated is distributed to from after increasing, until the corresponding whole of project object to be allocated all distributes.
The digital id information of this sub-distribution is sent to server by S370, terminal device, which includes for eventually
The last one number ID of end equipment distribution.
S380, server distribute the project number respective items purpose number ID according to the digital id information received
Latest digital ID in information is updated to the last one number ID.
S390, if be updated successfully, server is updated successfully response message to terminal device return.
S3100, terminal device receives be updated successfully response message after, determine that this ID is allocated successfully.
S3110, if updating failure, server is returned to terminal device updates failure response message.
S3120 after terminal device receives update failure response message, determines this ID distribution failure, and return to execution
S310 re-starts ID distribution.
The generation method of number ID provided in this embodiment stores the digital ID distribution information of each project in server,
Each terminal device (that is, developer) can access the server, and obtain corresponding to current project from the server
Digital ID distributes information, and it has been allocation of items that number ID, which is distributed in information including (terminal device or other terminal devices),
Latest digital ID.Then, which can currently distribute digital ID according to latest digital ID determination, and distribute to the terminal
The object to be allocated of equipment creation, so that each object to be allocated has a unique number ID.The terminal device is local
After object to be allocated distributes digital ID, the digital id information of this sub-distribution is sent in server, wherein number ID letter
Breath includes the last one number ID for native object distribution, so that server updates the number ID according to the number id information
Information is distributed, and the number ID latest digital ID distributed in information is updated to the last one number ID, to protect
The latest digital ID that the project is currently distributed is stored in card server.In this way, other terminal devices can from it is updated most
New number ID starts to be allocated for the object of other terminal device locals, to guarantee that each terminal device is same item
The digital ID that different objects in mesh are distributed has uniqueness.
Refer to Fig. 4, show the flow chart of another number ID generation method of the embodiment of the present invention, the present embodiment with
It is illustrated for SVN server, some file (for example, file A) that SVN server can guarantee that client is submitted is to be based on
The file A of currently stored latest edition modifies in SVN server, in other words, client upload file A be
It modifies, could be successfully submitted in SVN server on the basis of the file A of currently stored latest edition in SVN server.
ID file Dou Youyige version number in SVN server, the version number are generated by SVN server.For example, for ID
For file A, any one client can obtain latest edition ID file A and be modified from SVN server, if repaired
ID file A after changing is ID file A (the current latest edition herein based on the current latest edition stored in SVN server
ID file A be not necessarily the latest edition that client is obtained from SVN server because passing on the client modified
Before ID file A, possible SVN server has updated the latest edition according to the ID file A that other clients upload
ID file A) modification that carries out, then the client can successfully submit the modified ID file A to SVN server, SVN service
The ID file A of the current latest edition is updated to the modified ID file A by device.
As shown in figure 4, this method may comprise steps of:
S410, terminal device send the request of ID file acquisition to SVN server;ID file acquisition request carries request and obtains
The project number of the ID file obtained.
Digital ID distribution information is stored in the form of ID file in SVN server, in fact, SVN server is not known
What is stored in ID file is any content, and terminal device can pull the corresponding ID file of some project from SVN server, and
Read the ID distribution information in the ID file.
In one possible implementation of the present invention, SVN server can be one ID file of each establishment of item, should
The corresponding number ID distribution information of the project is stored in ID file;In other implementations, SVN server can also be created only
A file is built, the corresponding number ID distribution information of all items is stored in the ID file, which includes project letter
Breath and corresponding ID data item, wherein project information can be project number;It is corresponding that the project information is stored in the ID data item
Digital ID distribute information.
The inquiry of S420, SVN server obtains the corresponding Target id file of the project number, and is sent to terminal device.
For same project, the ID file of whole old versions can be stored in SVN server.Target id file is the project
The ID file of latest edition in all versions.
S430, terminal device read the corresponding number ID distribution information of the project from the Target id file;The number
It include the newest ID for being currently the allocation of items in ID distribution information.
After terminal device receives the Target id file of SVN server transmission, number ID is read from the Target id file
Distribute information.
S440, terminal device obtain current object to be allocated, and judge whether current object to be allocated is first wait divide
With object, if it is, executing S450;If it is not, then executing S460.
S450, after terminal device increases the latest digital ID with preset step-length certainly, it is described current to be allocated right to distribute to
As;
S460, terminal device is by the digital ID of a upper object to be allocated for the current object to be allocated with preset step-length
The current object to be allocated is distributed to from after increasing, until the corresponding whole of project object to be allocated all distributes.
The digital id information of this sub-distribution is written in the Target id file, is obtained updated by S470, terminal device
Target id file cocurrent gives SVN server.Wherein, which includes the last one number for terminal device distribution
ID
S480, SVN server judge whether updated Target id file is based on the institute stored in the SVN server
State the modification that the ID file of the corresponding current latest edition of current project carries out;If it is, executing S490;If it is not, then
Execute S 4110.
The ID file for the current latest edition being locally stored is updated to the updated target by S490, SVN server
ID file, and response message is updated successfully to terminal device return.
S4100, terminal device receives be updated successfully response message after, determine that this ID is allocated successfully.
S4110, SVN server do not update the ID file of the current latest edition, and return to update to terminal device and lose
Lose response message.
S4120 after terminal device receives update failure response message, determines this ID distribution failure, and return to execution
S410 re-starts ID distribution.
The generation method of number ID provided in this embodiment submits characteristic using the file of SVN server itself, and storage is each
A project corresponding ID file includes number ID distribution information in the ID file.Terminal device all accesses the SVN server, and
The ID file of the corresponding latest edition of current project is obtained from the SVN server, and reads newest number from the ID file
ID distributes information.The number ID distribution information in include (terminal device or other terminal devices) be allocation of items most
New number ID.Then, which can currently distribute digital ID according to latest digital ID determination, and distribute to the terminal device
The object to be allocated of creation, so that each object to be allocated has a unique number ID.The terminal device is local wait divide
After distributing digital ID with object, SVN server, SVN clothes will be sent in the digital id information write-in ID file of this sub-distribution
Business device judge the ID file whether be the current latest edition stored in SVN server ID file basis on modify, such as
Fruit is the ID file for then updating the current latest edition in SVN server, at this point, the current latest edition stored in SVN server
This ID file is the ID file that the terminal device uploads, and at the same time, SVN server is updated successfully to terminal device return
Response message, terminal device determine that this ID is allocated successfully according to the message.Other terminal devices can be from SVN server update
Latest digital ID is obtained in the ID file of latest edition afterwards, and is allocated for the object of other terminal device locals,
To which the digital ID for guaranteeing that each terminal device is distributed by the different objects in same project has uniqueness.Moreover, version
Management server is existing server, is not server newly developed, therefore do not need additional development and maintenance cost.
For the various method embodiments described above, for simple description, therefore, it is stated as a series of action combinations, but
Be those skilled in the art should understand that, the application is not limited by the described action sequence because according to the application, certain
A little steps can be performed in other orders or simultaneously.Secondly, those skilled in the art should also know that, it is retouched in specification
The embodiment stated belongs to preferred embodiment, necessary to related actions and modules not necessarily the application.
Corresponding to above-mentioned digital ID generation method embodiment, present invention also provides digital ID generating means embodiments.
Fig. 5 is referred to, a kind of block diagram of number ID generating means of the embodiment of the present invention is shown, which is applied to terminal
In equipment, as shown in figure 5, the device includes: the first acquisition module 110, ID distribution module 120, sending module 130 and determines mould
Block 140.
First obtains module 110, distributes information for obtaining the corresponding number ID of current project from server;
The number ID distribution information includes the latest digital ID for being currently object distribution in the current project.
In one possible implementation of the present invention, if the server is SVN server, described first obtains mould
Block 110 may include: the first acquisition submodule, for obtaining the corresponding latest edition of the current project from SVN server
ID file, the corresponding newest number ID distribution information of the current project is stored in the ID file of the latest edition,
The newest number ID distribution information includes the latest digital ID;Reading submodule, for the ID from the latest edition
The corresponding ID distribution information of the current project is read in file;
ID distribution module 120 for can currently distribute digital ID according to latest digital ID determination, and is distributed in institute
The object to be allocated of terminal device creation is stated, so that each object to be allocated has a unique number ID.
Optionally, the digital ID for object to be allocated distribution is 32 or 64 bits, and the digit of digital ID is much
Less than 128, so that the efficiency for searching object according to digital ID index is improved, so that program operation is more efficient.
In one possible implementation of the present invention, ID distribution module does not need to determine number ID range to be allocated, directly
Connecing according to the latest digital ID obtained from server is that object to be allocated distributes number ID;
Fig. 6 is referred to, a kind of block diagram of ID distribution module of the embodiment of the present invention is shown, which includes:
First distribution sub module 1211 and the second distribution sub module 1212;
First distribution sub module 1211 will be newest for when current object to be allocated is first object to be allocated
Digital ID distributes to current object to be allocated with the digital ID that preset step-length is obtained from after increasing;
Second distribution sub module 1212, for when current object to be allocated is not first object to be allocated, by institute
The corresponding number ID of upper one of current object to be allocated object to be allocated is stated to divide with the digital ID that preset step-length is obtained from after increasing
Current object to be allocated described in dispensing, until the object to be allocated of terminal device creation all distributes.
In the alternatively possible implementation of the present invention, ID distribution module needs to predefine number ID model to be allocated
It encloses, and the digital ID within the scope of number ID to be allocated is distributed into local object to be allocated one by one.
Fig. 7 is referred to, the block diagram of another ID distribution module of the embodiment of the present invention is shown, the ID distribution module 120 packet
Include: first determines that submodule 1221, second determines submodule 1222 and third distribution sub module 1223.
First determines submodule 1221, the destination number of the object to be allocated for determining terminal device creation.
Second determines submodule 1222, for determining number ID model to be allocated according to destination number and latest digital ID
It encloses, the digital ID in the number ID range to be allocated is incremented by successively with preset step-length, and first digit ID is described newest
Digital ID of the ID with preset step-length from after increasing.
Third distribution sub module 1223, it is each described for distributing to the digital ID within the scope of number ID to be allocated one by one
Object to be allocated, so that each object to be allocated has a unique number ID.
For example, the number of objects to be allocated of some project of terminal device creation is n, what is obtained from server is newest
Digital ID is i, and preset step-length is 1, it is determined that i+1~i+n is number ID range to be allocated, and by this n number of i+1~i+n
Word ID distributes to n objects to be allocated one by one, so that each object to be allocated has a unique number ID.
In another possible implementation of the invention, a project generally includes the object of multiple types, Ke Yigen
Different ID sections is divided according to object type, the digital ID of the object of same target type is in the ID sections;Such application scenarios
In, the latest digital ID in digital ID distribution information stored in server includes newest ID corresponding to each object type.
Fig. 8 is referred to, the block diagram of another ID distribution module of the embodiment of the present invention is shown, as shown in figure 8, the ID is distributed
Module 120, comprising: third determines submodule 1231, the 4th distribution sub module 1232 and the 5th distribution sub module 1233;
Third determines submodule 1231, for determining the object type of current object to be allocated;For example, role, article, skill
Energy, model etc..
4th distribution sub module 1232, for being first object to be allocated in object type when current object to be allocated
When, the corresponding latest digital ID of the object type is obtained from digital ID distribution information, and by latest digital ID with default step
The long digital ID obtained from after increasing distributes to current object to be allocated.
5th distribution sub module 1233 is not first in the object type to be allocated for currently object to be allocated
Object when, by the corresponding number ID of upper one of object to be allocated current in object type object to be allocated with preset step-length
Digital ID is obtained from after increasing distributes to current object to be allocated.
The sending module 130, for will be that the digital id information that object to be allocated distributes is sent to server, so that institute
It states server and the number ID distribution information is updated according to the digital id information, the number id information is including being to be allocated right
As the last one number ID of distribution so that server the number ID newest ID distributed in information is updated to it is described last
One number ID;
After terminal device is that local object to be allocated distributes digital ID, the digital id information of this sub-distribution is sent
To server, so that the digital id information of server minute book sub-distribution, wherein in digital id information most including this sub-distribution
The latter number ID, so that the corresponding latest digital ID of the project is updated to the digital id information that terminal device is sent by server
In the last one number ID.
In one kind of the invention likely implementation, which includes: write-in submodule, is used for the number
The ID file of the latest edition is written in word id information, obtains modified ID file;Sending submodule is used for the modification
ID file afterwards is sent to the SVN server, so that the ID file of latest edition described in the SVN server update.
The determining module 140, for when receiving after being updated successfully response message of server return, determine it is described to
The digital ID of distribution object is allocated successfully.
When terminal device receive server return after being updated successfully response message, determine that this ID is allocated successfully.
Optionally, described device further includes returning to execution module 150, for when the update failure for receiving server return
After response message, controls the ID distribution module and re-execute to obtain the corresponding number ID of current project from server and distribute and believe
Breath, until receive that the server returns is updated successfully response message.
Number ID generating means provided in this embodiment store the digital ID distribution information of each project in the server,
Each developer can access the server, and obtain needs from the server by the first acquisition module and distribute number ID
Project corresponding to digital ID distribute information, in number ID distribution information including be allocation of items latest digital
ID;Then, digital ID can currently be distributed by being determined by ID distribution module according to latest digital ID, and distribute to terminal device local
Object to be allocated so that each object to be allocated have a unique number ID.After distributing digital ID for native object,
The digital id information of distribution is sent to server by sending module, wherein digital id information includes for the to be allocated right of local
As the last one number ID of distribution, so that the corresponding latest digital ID of the project is updated to last described number by server
Word ID, when terminal device receive server return after being updated successfully message, determine that this ID is allocated successfully.In this way, other
Developer is allocated backward from updated latest digital ID continuation, to guarantee the digital ID of each developer's distribution only
One property.
Present invention also provides the digital ID generating means embodiments being applied in server.
Fig. 9 is referred to, a kind of block diagram of the digital identity mark ID generating means of object of the embodiment of the present invention is shown, it should
Device is applied in server, and the corresponding number ID distribution information of each project, number ID distribution are stored in the server
Information includes the latest digital ID for being currently object distribution in the project;
As shown in figure 9, the device includes sending module 210, update module 220 and return module 230.
Sending module 210, for returning to number corresponding to the current project that premises equipment requests obtain to terminal device
ID distributes information;
The number id information includes the latest digital ID for being the current project distribution, so that the terminal device
Digital ID can be currently distributed according to latest digital ID determination, and distributes to the object to be allocated of the terminal device creation,
So that each object to be allocated has a unique number ID;In one possible implementation of the present invention, if institute
Stating server is version control system SVN server, then the sending module is specifically used for, described in the return of Xiang Suoshu terminal device
The ID file of the corresponding latest edition of current project includes the corresponding number of the current project in the ID file of the latest edition
Word ID distributes information, so that the terminal device reads the corresponding institute of the current project from the ID file of the latest edition
State digital ID distribution information.
Update module 220, for after receiving the digital id information of terminal device transmission, according to the digital id information
The number ID distribution information is updated, the number id information includes that the terminal device is that the object to be allocated distributes most
The latter number ID, so that the latest digital ID in the corresponding number ID distribution information of the project is updated to by the server
The last one number ID;In one possible implementation of the present invention, if the server is version control system SVN
Server, the then update module, comprising: judging submodule and update submodule;
The judging submodule, for judging whether the modified ID file that the terminal device is sent is based on described
The modification that the ID file of the corresponding current latest edition of the current project stored in SVN server carries out, after the modification
ID file by the terminal device be after the object to be allocated distributes digital ID, by the number comprising the last one number ID
Word id information is written obtained in the ID file of the latest edition;
The update submodule, for when determining that the modified ID file is based on storing in the SVN server
The modification that the ID file of the corresponding current latest edition of the current project carries out, then will be current newest in the SVN server
The ID file of version is updated to the modified ID file.
The number ID distribution information further includes sending the corresponding user information of terminal device of the digital id information, with
And all number ID of this sub-distribution of the terminal device of the digital id information are sent, so as in Trancking Software project development
Problem.
Return module 230, for being distributed when the server is successfully updated the number ID according to the digital id information
After information, the return of Xiang Suoshu terminal device is updated successfully response message, so that the terminal device receives described be updated successfully
Determine that the digital ID of the project is allocated successfully after response message.
As can be seen from the above description, those skilled in the art can be understood that the application can add by software must
The mode of the general hardware platform needed is realized.
Referring to Figure 10, a kind of block diagram of terminal device of the embodiment of the present invention is shown, which includes at least place
Manage device 410, and the memory 420, transmitter 430, the receiver 440 that connect with processor 410 by bus.
The instruction of 420 internal stored program of memory, the memory can be high speed RAM memory, it is also possible to non-volatile
Memory (non-volatile memory), for example, at least magnetic disk storage etc..
Processor 410, for calling the program instruction stored in memory 420, to execute following methods step:
The corresponding number ID of current project is obtained from server and distributes information, and the number ID distribution information includes
The latest digital ID distributed for object in the current project;
According to the latest digital ID determination can currently distribute digital ID, and distribute to the terminal device creation to
Distribution object, so that each object to be allocated has a unique number ID;
It triggers transmitter 430 and the digital id information distributed for object to be allocated is sent to the server, the number
Id information includes the last one number ID for the object to be allocated distribution, so that the server is by the current project pair
The latest digital ID answered is updated to the last one described number ID and generates be updated successfully response message;
When detect receiver 440 receive server return after being updated successfully response message, determine described to be allocated
The digital ID of object is allocated successfully.
Wherein, processor 410 calls the program instruction in memory 420 to be able to carry out above-mentioned Fig. 1-number shown in Fig. 4
ID generation method embodiment, no longer repeats one by one herein.
Wherein, which may be a central processor CPU or specific integrated circuit ASIC
(Application Specific Integrated Circuit), or be arranged to implement the one of the embodiment of the present invention
A or multiple integrated circuits.
Terminal device provided by the present application obtains number corresponding to the project for needing to distribute number ID from the server
ID distributes information, includes the latest digital ID for being allocation of items in number ID distribution information.Wherein, it is stored in server
The digital ID of each project distributes information, and each developer can access the server.Then, the terminal device according to this most
New number ID determination can currently distribute digital ID, and distribute to the object to be allocated of terminal device local, so that each of local
Object to be allocated has a unique number ID.The terminal device is after native object distributes digital ID, by the number of distribution
Word id information is sent to server, wherein digital id information includes the last one number ID for native object distribution, so that clothes
The corresponding latest digital ID of the project is updated to the last one number ID by business device, in this way, other developers are after update
Latest digital ID continuation be allocated backward, to guarantee the uniqueness of the digital ID of each developer distribution.
Referring to Figure 11, a kind of block diagram of server of the embodiment of the present invention is shown, which includes processor 510,
And transmitter 520, receiver 530 and the memory 540 being connect with processor 510 by bus.
Program instruction and data are stored in memory 540, wherein memory may include that program storage and data are deposited
Reservoir.Wherein, program storage can be high speed RAM memory, it is also possible to nonvolatile memory (non-volatile
Memory), for example, at least magnetic disk storage etc..For storing program instruction;Data storage is for storing each project
Corresponding number ID distributes information.
It in one possible implementation of the present invention, is one ID file of each establishment of item in data storage,
The digital ID distribution information of the project is stored in the corresponding ID file of the project.
In the alternatively possible implementation of the present invention, an ID file, the ID text are established in data storage
Part includes project and the corresponding ID data item of the project, the corresponding number ID distribution of the storage project in the ID data item
Information.
Receiver 530, for the ID request message that receiving terminal apparatus is sent, the ID request message carries request and obtains
The corresponding project number of digital ID distribution information.
Processor 510 calls the program instruction in memory, to execute the method and step of server side shown in Fig. 3.
Specifically, it is corresponding to obtain project number for inquiry from memory 540 after processor 510 obtains ID request message
Digital ID distributes information, and triggers transmitter 520 and number ID distribution information is sent to terminal device, so that terminal device root
Digital ID can be currently distributed according to latest digital ID determination, and distributes to the object to be allocated of the terminal device creation, with
Make each object to be allocated that there is a unique number ID;When detect receiver 530 receive terminal device send
Project in object distribution digital id information after, update storage the project stored in device 540 corresponding number ID distribution and believe
Breath, wherein distribute number ID to the last one number ID in the digital id information of latest digital ID update in information, and touch
It sends out transmitter 520 and returns to envelope letter success response message to terminal device, so that terminal device is updated successfully response message according to this
Determine that this is allocated successfully.
Server provided in this embodiment stores the digital ID distribution information of each project, each exploitation in the server
Person can access the server.When terminal device needs the object to be allocated for some local project to distribute number ID, clothes
Business device can provide corresponding number ID to terminal device and distribute information, and number ID distribution information is including being the project point
The latest digital ID matched so that terminal device can currently distribute digital ID according to latest digital ID determination, and distributes to terminal
The object to be allocated of equipment local, so that each object to be allocated has a unique number ID.When server receives end
After the digital id information of this sub-distribution that end equipment is sent, wherein the number id information includes last number of this sub-distribution
Latest digital ID in the corresponding number ID distribution information of the project is updated to the last one described number by word ID, server
ID.And it is updated successfully message to terminal device return, so that terminal device determines that this is updated successfully.In this way, other developers
It is allocated backward from updated latest digital ID continuation, to guarantee the uniqueness of the digital ID of each developer's distribution.
Moreover, server is existing server, it is not server newly developed, therefore do not need additional development and maintenance cost.
Each embodiment in this specification is described in a progressive manner, the highlights of each of the examples are with other
The difference of embodiment, the same or similar parts in each embodiment may refer to each other.For device disclosed in embodiment
For, since it is corresponded to the methods disclosed in the examples, so being described relatively simple, related place is said referring to method part
It is bright.
Finally, it is to be noted that, herein, relational terms such as first and second and the like be used merely to by
One entity or operation are distinguished with another entity or operation, without necessarily requiring or implying these entities or operation
Between there are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant meaning
Covering non-exclusive inclusion, so that the process, method, article or equipment for including a series of elements not only includes that
A little elements, but also including other elements that are not explicitly listed, or further include for this process, method, article or
The intrinsic element of equipment.In the absence of more restrictions, the element limited by sentence "including a ...", is not arranged
Except there is also other identical elements in the process, method, article or apparatus that includes the element.
For convenience of description, it is divided into various units when description apparatus above with function to describe respectively.Certainly, implementing this
The function of each unit can be realized in the same or multiple software and or hardware when application.
As seen through the above description of the embodiments, those skilled in the art can be understood that the application can
It realizes by means of software and necessary general hardware platform.Based on this understanding, the technical solution essence of the application
On in other words the part that contributes to existing technology can be embodied in the form of software products, the computer software product
It can store in storage medium, such as ROM/RAM, magnetic disk, CD, including some instructions are used so that a computer equipment
(can be personal computer, server or the network equipment etc.) executes the certain of each embodiment of the application or embodiment
Method described in part.
The foregoing description of the disclosed embodiments makes professional and technical personnel in the field can be realized or use the application.
Various modifications to these embodiments will be readily apparent to those skilled in the art, as defined herein
General Principle can be realized in other embodiments without departing from the spirit or scope of the application.Therefore, the application
It is not intended to be limited to the embodiments shown herein, and is to fit to and the principles and novel features disclosed herein phase one
The widest scope of cause.
Claims (20)
1. a kind of digital identity identifies ID generation method, it is applied in terminal device characterized by comprising
The corresponding number ID of current project is obtained from server and distributes information, and the number ID distribution information is including being institute
State the latest digital ID that object distributes in current project;
Digital ID can be currently distributed according to latest digital ID determination, and distributes to the to be allocated right of the terminal device creation
As so that each object to be allocated has a unique number ID;
It will be sent to the server for the digital id information of the object distribution to be allocated, so that the server is according to
Digital id information updates the number ID and distributes information, and the number id information includes for the last of the object distribution to be allocated
One number ID, so that the number ID newest ID distributed in information is updated to the last one described number by the server
ID;
When receiving after being updated successfully response message of the server return, the digital ID distribution of the object to be allocated is determined
Success, it is described to be updated successfully response message the number ID distribution is successfully updated according to the digital id information by the server
It is generated after information.
2. the method according to claim 1, wherein if the server be version control system SVN server,
Then the corresponding number ID of current project that obtains from server distributes information, comprising:
The ID file of the corresponding latest edition of the current project, the ID of the latest edition are obtained from the SVN server
The corresponding newest number ID distribution information of the current project is stored in file, the newest number ID distributes packet
Include the latest digital ID;
The corresponding number ID distribution information of the current project is read from the ID file of the latest edition;
It is described to be sent to the server for the digital id information of the object distribution to be allocated, comprising:
The ID file that the latest edition is written according to the digital id information, obtains modified ID file;
The modified ID file is sent to the SVN server;The modified ID file is for taking the SVN
Business device determines that the modified ID file is based on the corresponding current latest edition of current project described in the SVN server
ID file modification when, update the ID file of the latest edition.
3. method according to claim 1 or 2, which is characterized in that described according to the latest digital ID, determination currently may be used
Number ID is distributed, and distributes to the object to be allocated of the terminal device creation, so that each object to be allocated has one
A unique number ID, comprising:
If current object to be allocated is first object to be allocated, the latest digital ID is obtained from after increasing preset step-length
Digital ID distribute to the current object to be allocated;
If the current object to be allocated is not first object to be allocated, by the upper of the current object to be allocated
The corresponding number ID of one object to be allocated increase the digital ID obtained after the preset step-length distribute to it is described current to be allocated
Object, until the object to be allocated of terminal device creation all distributes.
4. method according to claim 1 or 2, which is characterized in that described according to the latest digital ID, determination currently may be used
Number ID is distributed, and distributes to the object to be allocated of the terminal device creation, so that each object to be allocated has one
A unique number ID, comprising:
Determine the destination number of the object to be allocated of the terminal device creation;
According to the destination number and the latest digital ID, number ID range to be allocated, the number ID to be allocated are determined
Digital ID in range is incremented by successively with preset step-length, and first digit ID is after the newest ID is increased certainly with preset step-length
Digital ID;
Digital ID within the scope of the number ID to be allocated is distributed into each object to be allocated one by one, so that each described
Object to be allocated has a unique number ID.
5. method according to claim 1 or 2, which is characterized in that if the latest digital in number ID distribution information
ID includes latest digital ID corresponding to each object type, then described according to the latest digital ID, determination can currently distribute
Digital ID, and distribute to the object to be allocated of terminal device creation so that each object to be allocated have one only
One digital ID, comprising:
Determine the object type of current object to be allocated;
If the current object to be allocated is first object to be allocated in the object type, distributed from the number ID
It obtains the corresponding latest digital ID of the object type in information, and the latest digital ID is increased and is obtained after preset step-length
Digital ID distributes to the current object to be allocated;
If the current object to be allocated is not first object to be allocated in the object type, by the object class
The corresponding number ID of upper one of current object to be allocated object to be allocated described in type obtains digital ID after increasing preset step-length
Distribute to the current object to be allocated.
6. method according to claim 1 or 2, which is characterized in that the method also includes:
After receiving the update failure response message that the server returns, returns and obtained from server described in re-executing
The step of corresponding number ID of current project distributes information disappears until receiving the response that is updated successfully that the server returns
Breath.
7. method according to claim 1 or 2, which is characterized in that the number ID is 32 or 64 bits.
8. a kind of digital identity identifies ID generation method, it is applied in server, which is characterized in that be stored in the server
The corresponding number ID of each project distributes information, the number ID distribute information and include be each allocation of items most
New number ID, which comprises
The server returns to digital ID distribution corresponding to the current project that the premises equipment requests obtain to terminal device
Information, the number id information includes the latest digital ID for being the current project distribution, so that the terminal device root
Digital ID can be currently distributed according to latest digital ID determination, and distributes to the object to be allocated of the terminal device creation, with
Make each object to be allocated that there is a unique number ID;
After receiving the digital id information that the terminal device is sent, the server updates institute according to the digital id information
Digital ID distribution information is stated, the number id information includes the last one that the terminal device is the object distribution to be allocated
Digital ID so that the server by the latest digital ID in the project corresponding number ID distribution information be updated to it is described most
The latter number ID;
After the server is successfully updated the number ID distribution information according to the digital id information, Xiang Suoshu terminal device
Return is updated successfully response message, so that the terminal device receives the determining project after being updated successfully response message
Digital ID be allocated successfully.
9. according to the method described in claim 8, it is characterized in that, if the server be version control system SVN server,
Then the server returns to digital ID distribution letter corresponding to the current project that the premises equipment requests obtain to terminal device
Breath, comprising:
The SVN server returns to the ID file of the corresponding latest edition of the current project to the terminal device, it is described most
Comprising the current project corresponding number ID distribution information in the ID file of new version so that the terminal device from it is described most
The number ID distribution information is read in the ID file of new version;
It is described after receiving the digital id information that the terminal device is sent, the server according to the digital id information more
The new number ID distributes information, comprising:
The SVN server judges whether the modified ID file that the terminal device is sent is based on the SVN server
The modification that the ID file of the corresponding current latest edition of the current project of middle storage carries out;The modified ID file by
The terminal device is to write the digital id information comprising the last one number ID after the object to be allocated distributes digital ID
Enter and is obtained in the ID file of the latest edition;
It is carried out if it is the ID file based on the corresponding current latest edition of the current project stored in the SVN server
Modification, then the ID file of the current latest edition in the SVN server is updated to the modified ID file.
10. method according to claim 8 or claim 9, which is characterized in that the number ID distribution information further includes described in transmission
The corresponding user information of the terminal device of digital id information, and, send this sub-distribution of the terminal device of the digital id information
All number ID.
11. a kind of digital identity identifies ID generating means, it is applied in terminal device characterized by comprising
First obtains module, distributes information for obtaining the corresponding number ID of current project from server, the number ID divides
It include the latest digital ID for being object distribution in the current project with information;
ID distribution module for can currently distribute digital ID according to latest digital ID determination, and is distributed in the terminal
The object to be allocated of equipment creation, so that each object to be allocated has a unique number ID;
Sending module, for will be that the digital id information that the object to be allocated distributes is sent to the server, so that described
Server updates the number ID according to the digital id information and distributes information, and the number id information is including being described to be allocated
The last one number ID of object distribution, so that the number ID newest ID distributed in information is updated to institute by the server
State the last one number ID;
Determining module, for when receiving after being updated successfully response message of the server return, it to be described to be allocated right to determine
The digital ID of elephant is allocated successfully, described to be updated successfully response message and be successfully updated by the server according to the digital id information
It is generated after the number ID distribution information.
12. device according to claim 11, which is characterized in that if the server is version control system SVN service
Device then described first obtains module, comprising:
First acquisition submodule, for obtaining the ID text of the corresponding latest edition of the current project from the SVN server
Part, is stored with the corresponding newest number ID distribution information of the current project in the ID file of the latest edition, it is described most
New digital ID distribution information includes the latest digital ID;
Reading submodule, for reading the corresponding number ID distribution letter of the current project from the ID file of the latest edition
Breath;
The sending module, comprising:
Submodule is written, for the digital id information to be written to the ID file of the latest edition, obtains modified ID text
Part;
Sending submodule, for the modified ID file to be sent to the SVN server;The modified ID file
For determining the SVN server, the modified ID file is based on the current project pair in the SVN server
When the ID file modification for the current latest edition answered, the ID file of the latest edition is updated.
13. device according to claim 11 or 12, which is characterized in that the ID distribution module, comprising:
First distribution sub module, for when current object to be allocated is first object to be allocated, by the latest digital
ID increases the digital ID obtained after preset step-length and distributes to the current object to be allocated;
Second distribution sub module, for working as by described in when the current object to be allocated is not first object to be allocated
The corresponding number ID of the object to be allocated of upper one of preceding object to be allocated increases the digital ID distribution obtained after the preset step-length
To the current object to be allocated, until the object to be allocated of terminal device creation all distributes.
14. device according to claim 11 or 12, which is characterized in that the ID distribution module, comprising:
First determines submodule, the destination number of the object to be allocated for determining the terminal device creation;
Second determines submodule, for determining number ID model to be allocated according to the destination number and the latest digital ID
It encloses, the digital ID in the number ID range to be allocated is incremented by successively with preset step-length, and first digit ID is described newest
Digital ID of the ID with preset step-length from after increasing;
Third distribution sub module, it is each described wait divide for distributing to the digital ID within the scope of the number ID to be allocated one by one
With object, so that each object to be allocated has a unique number ID.
15. device according to claim 11 or 12, which is characterized in that if the newest number in number ID distribution information
Word ID includes newest ID corresponding to each object type, then the ID distribution module, comprising:
Third determines submodule, for determining the object type of current object to be allocated;
4th distribution sub module, for being first object to be allocated in the object type when the current object to be allocated
When, the corresponding latest digital ID of the object type is obtained from number ID distribution information, and by the latest digital ID
Digital ID is obtained after increase preset step-length distributes to the current object to be allocated;
5th distribution sub module, for not being first in the object type to be allocated when the currently object to be allocated
When object, the corresponding number ID of upper one of current object to be allocated described in object type object to be allocated is increased pre-
If obtaining digital ID after step-length distributes to the current object to be allocated.
16. device according to claim 11 or 12, which is characterized in that described device further include:
Execution module is returned to, for controlling the ID points after receiving the update failure response message that the server returns
The described the step of corresponding number ID of acquisition current project distributes information from server is re-executed with module, until receiving
What the server returned is updated successfully response message.
17. device according to claim 11 or 12, which is characterized in that the number ID is 32 or 64 binary systems
Number.
18. a kind of digital identity identifies ID generating means, it is applied in server, which is characterized in that stored in the server
There is the corresponding number ID distribution information of each project, the number ID distribution information is including being object in each project
The latest digital ID of distribution;Described device includes:
Sending module, for returning to digital ID corresponding to the current project that the premises equipment requests obtain points to terminal device
With information, the number id information includes the latest digital ID for being the current project distribution, so that the terminal device
Digital ID can be currently distributed according to latest digital ID determination, and distributes to the object to be allocated of the terminal device creation,
So that each object to be allocated has a unique number ID;
Update module, for after receiving the digital id information that the terminal device is sent, more according to the digital id information
The new number ID distributes information, and the number id information includes that the terminal device is the last of the object distribution to be allocated
One number ID, so that the latest digital ID in the corresponding number ID distribution information of the project is updated to institute by the server
State the last one number ID;
Return module, for after the server is successfully updated the number ID according to the digital id information and distributes information,
It is updated successfully response message to terminal device return, so that the terminal device receives and described is updated successfully response message
Determine that the digital ID of the project is allocated successfully afterwards.
19. device according to claim 18, which is characterized in that if the server is version control system SVN service
Device, then,
The sending module, comprising: the first sending submodule, it is corresponding for returning to the current project to the terminal device
The ID file of latest edition, comprising the corresponding number ID distribution information of the current project in the ID file of the latest edition,
So that the terminal device reads the corresponding number ID distribution of the current project from the ID file of the latest edition
Information;
The update module, comprising:
Judging submodule, for judging whether the modified ID file that the terminal device is sent is to service based on the SVN
The modification that the ID file of the corresponding current latest edition of the current project stored in device carries out, the modified ID file
It is after the object to be allocated distributes digital ID, by the digital id information comprising the last one number ID by the terminal device
It is written obtained in the ID file of the latest edition;
Submodule is updated, for when determining that the modified ID file is based on working as described in storing in the SVN server
The modification that the ID file of the corresponding current latest edition of preceding project carries out, then will be described current newest in the SVN server
The ID file of version is updated to the modified ID file.
20. device described in 8 or 19 according to claim 1, which is characterized in that the number ID distribution information further includes sending institute
The corresponding user information of terminal device of digital id information is stated, and, send this point of the terminal device of the digital id information
The all number ID matched.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611018935.8A CN106341497B (en) | 2016-11-18 | 2016-11-18 | Digital ID generation method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611018935.8A CN106341497B (en) | 2016-11-18 | 2016-11-18 | Digital ID generation method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106341497A CN106341497A (en) | 2017-01-18 |
CN106341497B true CN106341497B (en) | 2019-08-30 |
Family
ID=57841391
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611018935.8A Active CN106341497B (en) | 2016-11-18 | 2016-11-18 | Digital ID generation method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106341497B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106911780B (en) * | 2017-02-28 | 2020-12-04 | 北京三快在线科技有限公司 | Service ID generation method, device and system |
CN108647193B (en) * | 2018-04-20 | 2021-11-19 | 河南中烟工业有限责任公司 | Unique identifier generation method and device applicable to distributed system |
CN112905585A (en) * | 2019-11-19 | 2021-06-04 | 北京沃东天骏信息技术有限公司 | Number generation method and device |
CN111787131B (en) * | 2020-06-24 | 2023-02-21 | 百度在线网络技术(北京)有限公司 | ID generation method and electronic device |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101043401A (en) * | 2006-03-23 | 2007-09-26 | 华为技术有限公司 | Method for distributing and updating network service flow identification |
CN101706894A (en) * | 2009-10-30 | 2010-05-12 | 深圳市科陆电子科技股份有限公司 | Data management method of electronic labels |
CN103034492A (en) * | 2012-12-06 | 2013-04-10 | 广东欧珀移动通信有限公司 | Method and system for carrying out segmentation and distribution on ID (Identity) for Android equipment resource |
CN103139255A (en) * | 2011-11-30 | 2013-06-05 | 腾讯科技(深圳)有限公司 | Method for allocating resource identification and identification section |
CN105812248A (en) * | 2016-05-09 | 2016-07-27 | 腾讯科技(深圳)有限公司 | Distribution method and device for identification value |
-
2016
- 2016-11-18 CN CN201611018935.8A patent/CN106341497B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101043401A (en) * | 2006-03-23 | 2007-09-26 | 华为技术有限公司 | Method for distributing and updating network service flow identification |
CN101706894A (en) * | 2009-10-30 | 2010-05-12 | 深圳市科陆电子科技股份有限公司 | Data management method of electronic labels |
CN103139255A (en) * | 2011-11-30 | 2013-06-05 | 腾讯科技(深圳)有限公司 | Method for allocating resource identification and identification section |
CN103034492A (en) * | 2012-12-06 | 2013-04-10 | 广东欧珀移动通信有限公司 | Method and system for carrying out segmentation and distribution on ID (Identity) for Android equipment resource |
CN105812248A (en) * | 2016-05-09 | 2016-07-27 | 腾讯科技(深圳)有限公司 | Distribution method and device for identification value |
Also Published As
Publication number | Publication date |
---|---|
CN106341497A (en) | 2017-01-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107577427B (en) | data migration method, device and storage medium for blockchain system | |
CN109145205B (en) | Cross-chain data operation method and device based on block chain | |
CN106341497B (en) | Digital ID generation method and device | |
CN101313495B (en) | Method, system and apparatus for data synchronization | |
US20150213100A1 (en) | Data synchronization method and system | |
CN109003078A (en) | Intelligent contract call method and device, electronic equipment based on block chain | |
CN109391509A (en) | A kind of method, system and the application server of more new application | |
CN106407430A (en) | Complex and intelligent contract state synchronization method based on phase buckets | |
CN105468707A (en) | Cache-based data processing method and device | |
CN104092555A (en) | Parameter value updating method, device and system | |
CN104268229A (en) | Resource obtaining method and device based on multi-process browser | |
CN110442307A (en) | Binding method, equipment and the storage medium of disk in a kind of linux system | |
CN105653209A (en) | Object storage data transmitting method and device | |
JP6903570B2 (en) | Information manipulation | |
CN105138649A (en) | Data search method and device and terminal | |
CN109491962A (en) | A kind of file directory tree management method and relevant apparatus | |
WO2016101759A1 (en) | Data routing method, data management device and distributed storage system | |
US20150280996A1 (en) | Cloud topology visualizations | |
CN117435569A (en) | Dynamic capacity expansion method, device, equipment, medium and program product for cache system | |
CN108255434A (en) | Label management method, managing device and computer readable storage medium | |
CN105653566B (en) | A kind of method and device for realizing database write access | |
CN109389271B (en) | Application performance management method and system | |
CN114493598A (en) | Computing resource management method, device, computer equipment and storage medium | |
CN114996955A (en) | Target range environment construction method and device for cloud-originated chaotic engineering experiment | |
CN113326059B (en) | Resource updating method, device and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |