CN106341497A - Digital ID generating method and apparatus - Google Patents

Digital ID generating method and apparatus Download PDF

Info

Publication number
CN106341497A
CN106341497A CN201611018935.8A CN201611018935A CN106341497A CN 106341497 A CN106341497 A CN 106341497A CN 201611018935 A CN201611018935 A CN 201611018935A CN 106341497 A CN106341497 A CN 106341497A
Authority
CN
China
Prior art keywords
digital
allocated
numeral
server
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201611018935.8A
Other languages
Chinese (zh)
Other versions
CN106341497B (en
Inventor
刘安健
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201611018935.8A priority Critical patent/CN106341497B/en
Publication of CN106341497A publication Critical patent/CN106341497A/en
Application granted granted Critical
Publication of CN106341497B publication Critical patent/CN106341497B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/146Markers 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

The application provides a digital ID generating method and apparatus. According to the method, digital ID distribution information of all items is stored in a server and terminal equipment obtains the digital ID distribution information corresponding to a certain item from the server, wherein the digital ID distribution information includes a latest digital ID distributed to the item; the terminal equipment determines a currently distributable digital ID based on the latest digital ID and distributes the currently distributable digital ID to a local to-be-distributed object of the terminal equipment, so that each to-be-distributed object has a unique digital ID; and after distributing the digital ID to the to-be-distributed object, the terminal equipment sends the distributed digital ID information including a last digital ID distributed to the to-be-distributed object to the server, so that the server updates the latest digital ID corresponding to the item to be the last digital ID. Therefore, other terminal equipment starts to carry out distribution by starting with the updated latest digital ID, thereby guaranteeing uniqueness of the digital ID distributed to each developer.

Description

Digital id generation method and device
Technical field
The application is related to field of computer technology, more particularly to a kind of numeral id (identification, body Part mark) generation method and device.
Background technology
A lot of objects, for example, model, specially good effect, role, article, technical ability can be created during general software project development Deng each object typically can have a string name, is properly termed as character id.But, there may be between object and quote Relation, or, some need the object in server database for the storage, are required for a unique mark right to represent this As, because the search efficiency of character string is too low, and, if as procotol transmission, character string expends flow too much, institute To need to distribute a binary numeral id for object.
With the development of software project development technology, need many individuals or project team to develop the feelings of a software project simultaneously Condition gets more and more.Traditional approach distributes digital id using the object in project editor software for editing project and for these objects. But, when how personal or multiple project team develop a project simultaneously, different developers or project team are utilized respectively locally Project editor be the digital id of locally created object distribution, the project editor on different terminals cannot ensure to be distributed Id is unique, and therefore, this mode is likely to occur the phenomenon of repetition id, i.e. different object corresponding id phases in same project With, and the object id in project repeats Project in Operation will to be led to there is risk and hidden danger.
Content of the invention
In view of this, the application provides a kind of numeral id generation method and device, to solve multiple terminal devices cannot be Different objects in same project distribute the technical problem of uniquely digital id.
For solving above-mentioned technical problem, the application following technical scheme of offer:
The application provides a kind of digital identity to identify id generation method, is applied in terminal unit, comprising:
Obtain current project corresponding numeral id distribution information from server, described numeral id distribution information is included Latest digital id for object distribution in described current project;
Determined according to described latest digital id and currently can distribute digital id, and treating point of distributing to that described terminal unit creates Pairing is as so that each described object to be allocated has a uniquely digital id;
The digital id information distributed for described object to be allocated is sent to described server so that described server according to Digital id distribution information described in the id information updating of described numeral, described numeral id information is included for described object distribution to be allocated Last digital id so that described server by the up-to-date id in described numeral id distribution information be updated to described last Digital id;
When receiving after being updated successfully response message of described server return, determine the digital id of described object to be allocated It is allocated successfully, the described response message that is updated successfully is successfully updated described numeral id by described server according to described numeral id information Produce after distribution information.
The application also provides a kind of digital identity mark id generation method, is applied in server, described version management clothes Business device in be stored with each project corresponding numeral id distribution information, described numeral id distribution information include be described each Latest digital id of allocation of items, methods described includes:
Described server returns the digital id corresponding to the current project that described premises equipment requests obtain to terminal unit Distribution information, described numeral id information includes being latest digital id of described current project distribution, so that described terminal sets Digital id currently can be distributed for determining according to described latest digital id, and distribute to the to be allocated right of described terminal unit establishment As so that each described object to be allocated has a uniquely digital id;
After receiving the digital id information that described terminal unit sends, described server is according to described numeral id information more Newly described numeral id distribution information, it is the last of described object distribution to be allocated that described numeral id information includes described terminal unit One digital id, so that latest digital id in corresponding for described project numeral id distribution information is updated to institute by described server State last digital id;
After described server is successfully updated described numeral id distribution information according to described numeral id information, to described terminal Equipment returns and is updated successfully response message so that described terminal unit receive described in be updated successfully after response message determine described The digital id of project is allocated successfully.
The application provides a kind of digital identity to identify id generating means, is applied in terminal unit, comprising:
First acquisition module, for obtaining current project corresponding numeral id distribution information, described numeral from server Id distributes information and includes being latest digital id of object distribution in described current project;
Id distribute module, currently can distribute digital id for determining according to described latest digital id, and distribute to described The object to be allocated that terminal unit creates, so that each described object to be allocated has a uniquely digital id;
Sending module, for the digital id information distributed for described object to be allocated is sent to described server, so that Described server digital id distribution information according to the id information updating of described numeral, described numeral id information includes treating for described Last digital id of distribution object distribution, so that the up-to-date id in described numeral id distribution information is updated by described server For last digital id described;
Determining module, for when receiving that described server returns after being updated successfully response message, treating described in determination point The digital id of pairing elephant is allocated successfully, and described is updated successfully response message by described server according to described numeral id information successfully Produce after updating described numeral id distribution information.
The application also provides a kind of digital identity mark id generating means, is applied in server, deposits in described server Contain each project corresponding numeral id distribution information, described numeral id distribution information includes being right in each project described Latest digital id as distribution;Described device includes:
Sending module, for returning the numeral corresponding to the current project that described premises equipment requests obtain to terminal unit Id distributes information, and described numeral id information includes being latest digital id of described current project distribution, so that described terminal Equipment currently can distribute digital id according to the determination of described latest digital id, and distributes to the to be allocated right of described terminal unit establishment As so that each described object to be allocated has a uniquely digital id;
Update module, for, after receiving the digital id information that described terminal unit sends, believing according to described numeral id Breath updates described numeral id distribution information, and it is described object distribution to be allocated that described numeral id information includes described terminal unit Last digital id, so that latest digital id in corresponding for described project numeral id distribution information is updated by described server For last digital id described;
Return module, for described numeral id distribution information being successfully updated according to described numeral id information when described server Afterwards, to described terminal unit return be updated successfully response message so that described terminal unit receive described in be updated successfully response Determine after message that the digital id of described project is allocated successfully.
The generation method of the digital id that the application provides, stores the digital id distribution information of each project in the server, Each terminal unit (that is, developer) can access this server, and obtains corresponding to current project from this server Digital id distributes information, and it has been allocation of items that this digital id distribution information includes (this terminal unit or other terminal unit) Latest digital id.Then, this terminal unit currently can distribute digital id according to the determination of latest digital id, and distributes to this terminal The object to be allocated that equipment creates, so that each object to be allocated has a uniquely digital id.This terminal unit is local After object to be allocated distributes digital id, the digital id information of this sub-distribution is sent to server, wherein, this digital id letter Breath includes last the digital id for native object distribution, so that server digital id according to this digital id information updating Distribution information, and latest digital id in described numeral id distribution information is updated to last digital id described, thus protecting Latest digital id of the current distribution of this project that is stored with card server.So, other terminal units can after updating Newly digital id starts to be allocated for the local object of described other terminal unit, thus ensureing that each terminal unit is same item The digital id that different objects in mesh are distributed has uniqueness.
Brief description
In order to be illustrated more clearly that the embodiment of the present application or technical scheme of the prior art, below will be to embodiment or existing Have technology description in required use accompanying drawing be briefly described it should be apparent that, drawings in the following description be only this The embodiment of application, for those of ordinary skill in the art, on the premise of not paying creative work, can also basis The accompanying drawing providing obtains other accompanying drawings.
Fig. 1 is a kind of flow chart of embodiment of the present invention numeral id generation method;
Fig. 2 is the flow chart of the embodiment of the present invention another kind of numeral id generation method;
Fig. 3 is the flow chart of another digital id generation method of the embodiment of the present invention;
Fig. 4 is the flow chart of another digital id generation method of the embodiment of the present invention;
Fig. 5 is a kind of block diagram of embodiment of the present invention numeral id generating means;
Fig. 6 is a kind of block diagram of embodiment of the present invention id distribute module;
Fig. 7 is the block diagram of another id distribute module of the embodiment of the present invention;
Fig. 8 is the block diagram of another id distribute 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 unit 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 accompanying drawing in the embodiment of the present application, the technical scheme in the embodiment of the present application is carried out clear, complete Site preparation describes it is clear that described embodiment is only some embodiments of the present application, rather than whole embodiments.It is based on Embodiment in the application, it is every other that those of ordinary skill in the art are obtained under the premise of not making creative work Embodiment, broadly falls into the scope of the application protection.
The mode of traditional digital id of software project object distribution, when multiple developers (or project team) develop one simultaneously During software project, each terminal unit is that locally created object voluntarily distributes digital id, and such different terminal equipment is difference Object distribution digital id there may be repetition because each terminal unit only know oneself id distribution condition it is not known that its The id distribution condition of its terminal unit.It is corresponding up-to-date that technical scheme passes through storage software project in the server Digital id distributes information, and this digital id distributes information and includes being currently the up-to-date number of each object distribution in software project Word id.Terminal unit can obtain this digital id from this server and distribute information, start as local right from latest digital id As carrying out digital id distribution, and the digital id information of last the digital id comprising this sub-distribution is sent to server, with Make server according to the digital id distribution information in this digital id information updating server, server is to digital id distribution information more Newly after success, this time id distribution of terminal unit is just effective.In such manner, it is possible to ensure what each developer was distributed by native object Digital id is unique.The method that the digital id of object distribution will be described as by the specific embodiment of the present invention below.
Refer to Fig. 1, the flow chart showing a kind of embodiment of the present invention numeral id generation method, the method is applied to end In end equipment, this terminal unit can be pc (personal computer, personal computer) machine, notebook computer etc..As figure Shown in 1, the method may comprise steps of:
S110, terminal unit obtains current project corresponding numeral id distribution information from server;
Wherein, this digital id distributes information and includes being currently latest digital id of the object distribution in current project.
S120, terminal unit currently can distribute digital id according to the determination of this latest digital id, and distributes to terminal unit wound The object to be allocated built, so that each object to be allocated has a uniquely digital id.
Terminal unit is according to latest digital id obtaining from server from the local object distribution numeral to be allocated of behavior id.
In a kind of possible implementation of the present invention, described currently can to distribute digital id be a digital id scope, should Digital id scope comprises locally all objects to be allocated digital id to be dispensed, and concrete implementation process is as follows:
Terminal unit needs first to determine the destination number of locally object to be allocated, then, according to latest digital id obtaining And this destination number determines numeral id scope to be allocated;Wherein, to be allocated numeral id in the range of digital id with preset step-length according to Secondary incremental, and first digit id is the digital id that described latest digital id is obtained from after increase with default step-length;Then, will treat point Join the digital id in the range of digital id and distribute to each object to be allocated one by one it is ensured that each object to be allocated has one uniquely Digital id.
For example, latest digital id of project a obtaining from server is i, right in project a that terminal unit x creates As quantity is n, and default step-length is 1, then be the corresponding numeral to be allocated of n object of terminal unit x establishment from i+1~i+n Id scope.It is then possible to i+1~i+n be distributed to one by one each object.
In the alternatively possible implementation of the present invention, described currently can to distribute digital id be current object pair to be allocated The digital id answering, in this kind of implementation, need not predefine numeral id scope to be allocated, but directly by terminal unit Obtain object to be allocated determine corresponding currently can distribute digital id, concrete implementation process is as follows:
Up-to-date id is distributed to first object to be allocated with default step-length from after increase by terminal unit;For other, non- The object to be allocated of one, the digital id distribution that the digital id of a upper object to be allocated is obtained from after increase with default step-length should Object to be allocated, the like, until all of object to be allocated all distributes.
For example, latest digital id of project a obtaining from server is i, and default step-length is 1 and distributes to i+1 First object to be allocated of project a that terminal unit x creates;The digital id of second object to be allocated increases default step for i+1 The numerical value (i.e. i+2) obtaining after length;The like, till locally all objects to be allocated all distribute.
Wherein, default step-length can sets itself according to actual needs, for example, it is possible to be set as 1, the present invention is to this not Limit.
Alternatively, be the digital id of object to be allocated distribution be 32 or 64 bits, the digit of this digital id is remote Much smaller than 128, thus improve the efficiency according to digital id index search object, and then it is more efficient so that calling program is run.
S130, the digital id information distributed for object to be allocated is sent to server by terminal unit, so that described service Device digital id distribution information according to the id information updating of described numeral, wherein, digital id information is included for this sub-distribution A digital id afterwards, so that described latest digital id is updated to last digital id described by server.
In a kind of possible implementation of the present invention, for example, current latest digital id of project a storing in server It is i, terminal unit x is that last digital id of the object distribution of project a creating is i+n and is sent to server, service Corresponding for project a latest digital id is updated to i+n by i by device.
In the possible implementation of other of the present invention, digital id information can also include: sends digital id information User profile (for example, the user name of developer or employee number), and, whole numeral id of this sub-distribution, in order to follow the trail of Problem during software project development.
S140, the response message that terminal unit the reception server returns, and judge the type of response message;Response message bag Include and be updated successfully response message and update failure response message.If being updated successfully response message, then execute s150;If Update failure response message, then execute s160.
When server, according to terminal unit, (the digital id information that for example, terminal unit a) sends completes current project and corresponds to Digital id distribute the renewal operation of information after, return to terminal unit a and be updated successfully response message.
Before terminal unit a submits the digital id information of oneself distribution to, if there are other terminal units (for example, terminal Equipment b) have submitted and distributed, according to up-to-date digital id in version management server, the digital id information that information is distributed, this When, the digital id in server distributes information and is updated according to the digital id information that terminal unit b uploads, i.e. service In device, currently stored up-to-date digital id distributes the id information that information is that terminal unit b provides, and leads to terminal unit a to upload Digital id information is not based on the distribution that currently stored latest digital id of server is carried out, and now, server is to terminal unit a Return and update failure response message.
Software version can be built with readable strong character string come identification object generally when creating the content of software project This or run during this software project and to distribute digital id to object again, so the frequency of typically digital id distribution is not high, therefore, with The probability that the different developers of one project carry out digital id distribution simultaneously is very low.
S150, terminal unit determines that this id is allocated successfully.
Only after the digital id information of terminal unit distribution is successfully committed in server, this id of terminal unit divides Join result just can be used.
S160, terminal unit determines that this id distributes unsuccessfully, and returns to execution s110.
If terminal unit receives the renewal failure response message of server return, explanation just may have other developers Using current digital id distribution information distribution id, it is invalid that this id of terminal unit distributes, and needs to abandon this sub-distribution Digital id information, returns execution s110 and again obtains up-to-date digital id distribution information from server, and up-to-date based on this Digital id distribution information re-starts distribution.
The digital id generation method that the present embodiment provides, stores the digital id distribution information of each project in the server, Each terminal unit (that is, developer) can access this server, and obtains corresponding to current project from this server Digital id distributes information, and it has been allocation of items that this digital id distribution information includes (this terminal unit or other terminal unit) Latest digital id.Then, this terminal unit currently can distribute digital id according to the determination of latest digital id, and distributes to this terminal The object to be allocated that equipment creates, so that each object to be allocated has a uniquely digital id.This terminal unit is local After object to be allocated distributes digital id, the digital id information of this sub-distribution is sent to server, wherein, this digital id letter Breath includes last the digital id for native object distribution, so that server digital id according to this digital id information updating Distribution information, and latest digital id in described numeral id distribution information is updated to last digital id described, thus protecting Latest digital id of the current distribution of this project that is stored with card server.So, other terminal units can after updating Newly digital id starts to be allocated for the local object of described other terminal unit, thus ensureing that each terminal unit is same item The digital id that different objects in mesh are distributed has uniqueness.
Refer to Fig. 2, the flow chart showing the embodiment of the present invention another kind of numeral id generation method, the method is applied to In terminal unit, in the present embodiment according to object type different demarcation different id sections, and remember in the digital id distribution information Record corresponding latest digital id of each object type.As shown in Fig. 2 the method comprises the following steps:
S210, terminal unit obtains current project corresponding numeral id distribution information from server.
This digital id distribution information includes corresponding latest digital id of each object type.It is different object types in advance Divide different id sections, and the id quantity that comprised of the id section dividing enough after the object of same type use.
S220, determines the object type of currently object to be allocated.
S230, judges that whether described object currently to be allocated is first object to be allocated in described object type; If it is, execution s240;If it is not, then execution s250.
S240, obtains corresponding latest digital id of this object type from described numeral id distribution information, and by up-to-date number The digital id that word id is obtained from after increase with default step-length distributes to described object currently to be allocated.
S250, by described object type currently upper one of object to be allocated object to be allocated corresponding numeral id with pre- If the digital id that step-length obtains from after increase distributes to described object currently to be allocated, the like, in this object type All object to be allocated all distributes.
For example, in described object type, currently object to be allocated is x, current object x to be allocated in same target type Upper one to be allocated to as if x-1, object x-1 to be allocated corresponding numeral id is i, and default step-length is 1, then currently to be allocated Object x corresponding numeral id is i+1.
S260, judges that all object types of current project all distribute, if it is, execution s270;If it is not, then returning Receipt row s220.
S270, the digital id information of this id distribution is sent to server, this digital id information is included for terminal unit Each object type last the digital id corresponding of the current project creating so that server by current project each is right As corresponding latest digital id of type is updated to last digital id corresponding respectively.
For example, current project includes tri- object types of a, b, c, wherein, object type a last digital id corresponding For i+m, object type b last digital id corresponding is i+n, and object type c last digital id corresponding is i+o; Then server needs for corresponding for object type a latest digital id to be updated to i+m, by corresponding for object type b latest digital id It is updated to i+n, and, corresponding for object type c latest digital id is updated to i+o.In the possible realization of other of the present invention In mode, the digital id information that terminal unit is sent to server also includes sending the user profile of this digital id information, and, The information of whole numeral id of this sub-distribution.
S280, the response message that the reception server returns, and judge the type of response message, if being updated successfully response Message, then execute s290;If updating failure response message, then execute s2100.
S290, determines that this id is allocated successfully.
Only after the digital id information that terminal unit is submitted to is successfully committed in server, this id of terminal unit divides Join result just can be used.
S2100, determines that this id distributes unsuccessfully, and returns execution s210.
If after terminal unit receives the renewal failed message of server return, determining that this id allocation result is invalid, Need from server, again to obtain up-to-date digital id distribution information and be allocated based on this up-to-date digital id information.
The digital id generation method that the present embodiment provides, divides different id sections, server according to different object types The project corresponding numeral id of middle storage distributes information record corresponding latest digital id of each object type.So, user Just can quickly judge the type of object according to the id section that digital id is located.When distributing digital id for object, to be allocated right Start to continue to distribute backward as latest digital id of corresponding object type increases the numerical value obtaining after default step-length, until creating Whole object types all distribute.Then, the digital id information of this sub-distribution is sent to server, so that server corresponds to Update the digital id distribution information of current project, latest digital id after updating for other developers continues to be allocated backward, Thus ensureing the uniqueness of the digital id of each developer distribution.
Refer to Fig. 3, the flow chart showing another digital id generation method of the embodiment of the present invention, the method is applied to Comprise in the system of terminal unit server, as shown in figure 3, the method may comprise steps of:
S310, terminal unit sends id request message to server;This id request message carries the digital id that request obtains Bullets corresponding to distribution information.
S320, server lookup local data base obtains described bullets corresponding numeral id distribution information.
In a kind of 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 general software management system, and it is often used to Management program source code, but version management server can also manage any kind of file, for example, and text, video, picture etc. Deng.In this kind of application scenarios, in id file, terminal unit obtains this id from svn server to digital id distribution information Store File, then, reads digital id distribution information from this id file.
In a kind of possible implementation of the present invention, server can be one file of each establishment of item, this document Middle this project of storage corresponding numeral id distribution information;In other implementations, server can also only create a literary composition Part, all items corresponding numeral id distribution information is stored in this document, and this document includes project information and corresponding id Data item, wherein, project information can be bullets;The corresponding numeral id distribution of this id this project information of data item memory storage Information.
In a kind of possible implementation of the present invention, this digital id distribution information includes being currently this allocation of items Latest digital id.In other possible implementations, different id sections can be divided for different object types, and count Corresponding latest digital id of each object type is recorded in word id distribution information.In other possible implementations, numeral Id distribution information can also include sending the user profile of digital id information, and this id distribution details, and for example, digital id divides Join information and include herein below " developer * * *, the digital id of distribution is i~n ", be so easy to review in project development process Problem.
S330, digital id distribution information is sent to terminal unit by server.
S340, terminal unit obtains current object to be allocated, and judges that currently whether object to be allocated is first and treats point Pairing is as if it is, execute s350;If it is not, then execution s360.
S350, after described latest digital id is certainly increased by terminal unit with default step-length, it is described currently to be allocated right to distribute to As;
S360, terminal unit is by the digital id of a upper object to be allocated of described object currently to be allocated to preset step-length Distribute to described object currently to be allocated from after increase, until the corresponding object all to be allocated of described project all distributes.
S370, terminal unit sends the digital id information of this sub-distribution to server, and this digital id information was included for end Last digital id of end equipment distribution.
S380, server, according to the digital id information receiving, described bullets respective items purpose numeral id is distributed Latest digital id in information is updated to last digital id described.
S390, if be updated successfully, server returns to terminal unit and is updated successfully response message.
S3100, terminal unit receives after being updated successfully response message, determines that this id is allocated successfully.
S3110, if updating unsuccessfully, server returns to terminal unit and updates failure response message.
S3120, after terminal unit receives renewal failure response message, determines that this id distributes unsuccessfully, and returns execution S310 re-starts id distribution.
The generation method of the digital id that the present embodiment provides, stores the digital id distribution information of each project in server, Each terminal unit (that is, developer) can access this server, and obtains corresponding to current project from this server Digital id distributes information, and it has been allocation of items that this digital id distribution information includes (this terminal unit or other terminal unit) Latest digital id.Then, this terminal unit currently can distribute digital id according to the determination of latest digital id, and distributes to this terminal The object to be allocated that equipment creates, so that each object to be allocated has a uniquely digital id.This terminal unit is local After object to be allocated distributes digital id, the digital id information of this sub-distribution is sent to server, wherein, this digital id letter Breath includes last the digital id for native object distribution, so that server digital id according to this digital id information updating Distribution information, and latest digital id in described numeral id distribution information is updated to last digital id described, thus protecting Latest digital id of the current distribution of this project that is stored with card server.So, other terminal units can after updating Newly digital id starts to be allocated for the local object of described other terminal unit, thus ensureing that each terminal unit is same item The digital id that different objects in mesh are distributed has uniqueness.
Refer to Fig. 4, the flow chart showing another digital id generation method of the embodiment of the present invention, the present embodiment with Illustrate as a example svn server, svn server ensure that client submit to certain file (for example, file a) is to be based on In svn server, the file a of currently stored latest edition modifies, in other words, the file a of client upload be On the basis of the file a of currently stored latest edition in svn server, modification, could successfully be submitted in svn server.
Id file Dou Youyige version number in svn server, this version number is generated by svn server.For example, for id For file a, any one client can obtain latest edition id file a from svn server and modify, if repaiied Id file a after changing is id file a (the current latest edition herein based on the current latest edition of storage in svn server Id file a be not necessarily the latest edition that client obtains from svn server, because passing amended on the client Before id file a, possible svn server have updated described latest edition according to the id file a of other client upload The modification that id file a) is carried out, then this client can successfully submit this amended id file a to svn server, svn services The id file a of described current latest edition is updated to described amended id file a by device.
As shown in figure 4, the method may comprise steps of:
S410, terminal unit sends the request of id file acquisition to svn server;The request of this id file acquisition carries request and obtains The bullets of the id file obtaining.
Digital id distribution information is stored, in fact, svn server is not known in svn server in the form of id file In id file, storage is any content, and terminal unit can pull certain project corresponding id file from svn server, and Read the id distribution information in this id file.
In a kind of possible implementation of the present invention, svn server can be one id file of each establishment of item, should This project corresponding numeral id distribution information is stored in id file;In other implementations, svn server can also only be created Build a file, all items corresponding numeral id distribution information is stored in this id file, this id file includes project letter Breath and corresponding id data item, wherein, project information can be bullets;This id this project information of data item memory storage corresponds to Digital id distribution information.
S420, svn server lookup obtains described bullets corresponding target id file, and is sent to terminal unit.
For same project, the id file of whole old versions in svn server, can be stored.Target id file is this project The id file of latest edition in all versions.
S430, terminal unit reads described project corresponding numeral id distribution information from this target id file;This numeral Comprising in id distribution information has been currently the up-to-date id of this allocation of items.
After terminal unit receives the target id file of svn server transmission, read digital id from this target id file Distribution information.
S440, terminal unit obtains current object to be allocated, and judges that currently whether object to be allocated is first and treats point Pairing is as if it is, execute s450;If it is not, then execution s460.
S450, after described latest digital id is certainly increased by terminal unit with default step-length, it is described currently to be allocated right to distribute to As;
S460, terminal unit is by the digital id of a upper object to be allocated of described object currently to be allocated to preset step-length Distribute to described object currently to be allocated from after increase, until the corresponding object all to be allocated of described project all distributes.
S470, the digital id information of this sub-distribution is write in described target id file by terminal unit, after being updated Target id file cocurrent gives svn server.Wherein, this digital id information includes last numeral for terminal unit distribution id
Whether the target id file after s480, svn server judges to update is based on the institute storing in described svn server State the modification that the id file of the corresponding current latest edition of current project is carried out;If it is, execution s490;If it is not, then Execution s 4110.
The id file of locally stored current latest edition is updated to the target after described renewal by s490, svn server Id file, and it is updated successfully response message to terminal unit return.
S4100, terminal unit receives after being updated successfully response message, determines that this id is allocated successfully.
S4110, svn server does not update the id file of described current latest edition, and returns renewal mistake to terminal unit Lose response message.
S4120, after terminal unit receives renewal failure response message, determines that this id distributes unsuccessfully, and returns execution S410 re-starts id distribution.
The generation method of the digital id that the present embodiment provides, submits characteristic to using the file of svn server itself, and storage is each The corresponding id file of individual project, comprises digital id distribution information in this id file.Terminal unit all accesses this svn server, and Obtain the id file of the corresponding latest edition of current project from this svn server, and read up-to-date numeral from this id file Id distributes information.This digital id distribution information include (this terminal unit or other terminal unit) be allocation of items Newly digital id.Then, this terminal unit currently can distribute digital id according to the determination of latest digital id, and distributes to this terminal unit The object to be allocated creating, so that each object to be allocated has a uniquely digital id.This terminal unit is locally to treat point Pairing, as distributing after digital id, will be sent to svn server in the digital id information write id file of this sub-distribution, svn takes Business device judges whether this id file is modification in the id file basis of current latest edition of storage in svn server, such as Fruit is then to update the id file of the current latest edition in svn server, now, the current latest edition of storage in svn server This id file is the id file that this terminal unit uploads, and meanwhile, svn server returns to this terminal unit and is updated successfully Response message, according to this message, terminal unit determines that this id is allocated successfully.Other terminal units can be from svn server update Obtain latest digital id in the id file of latest edition afterwards, and be allocated for the local object of described other terminal unit, Thus ensureing that the digital id that each terminal unit is distributed by the different objects in same project has uniqueness.And, version Management server is existing server, is not server newly developed, does not therefore need extra development and maintenance cost.
For aforesaid each method embodiment, in order to be briefly described, therefore it is all expressed as a series of combination of actions, but It is that those skilled in the art should know, the application is not limited by described sequence of movement, because according to the application, certain A little steps can be carried out using other orders or simultaneously.Secondly, those skilled in the art also should know, is retouched in description The embodiment stated belongs to preferred embodiment, necessary to involved action and module not necessarily the application.
Corresponding to above-mentioned digital id generation method embodiment, present invention also provides digital id generating means embodiment.
Refer to Fig. 5, show a kind of block diagram of embodiment of the present invention numeral id generating means, this device is applied to terminal In equipment, as shown in figure 5, this device includes: the first acquisition module 110, id distribute module 120, sending module 130 and determination mould Block 140.
First acquisition module 110, for obtaining current project corresponding numeral id distribution information from server;
Described numeral id distributes information and includes being currently latest digital id of object distribution in described current project.
In a kind of possible implementation of the present invention, if described server is svn server, described first acquisition mould Block 110 may include that the first acquisition submodule, for obtaining the corresponding latest edition of described current project from svn server Id file, the corresponding up-to-date digital id distribution information of the described current project that is stored with the id file of described latest edition, Described up-to-date digital id distribution information includes described latest digital id;Reading submodule, for the id from described latest edition Described current project corresponding id distribution information is read in file;
Id distribute module 120, currently can distribute digital id for determining according to described latest digital id, and distribute in institute State the object to be allocated of terminal unit establishment, so that each described object to be allocated has a uniquely digital id.
Alternatively, be the digital id of object to be allocated distribution be 32 or 64 bits, the digit of digital id is much Less than 128, thus improve the efficiency according to digital id index search object, and then it is more efficient so that calling program is run.
In a kind of possible implementation of the present invention, id distribute module not it needs to be determined that to be allocated numeral id scope, directly Connecing according to latest digital id obtaining from server is the digital id of object distribution to be allocated;
Refer to Fig. 6, show a kind of block diagram of embodiment of the present invention id distribute module, this id distribute module 120 includes: First distribution sub module 1211 and the second distribution sub module 1212;
First distribution sub module 1211, for when currently to be allocated to as if during first object to be allocated, will be up-to-date The digital id that digital id is obtained from after increase with default step-length distributes to currently object to be allocated;
Second distribution sub module 1212, for when currently object to be allocated is not first object to be allocated, by institute Upper one object to be allocated corresponding numeral id stating currently object to be allocated is divided with the digital id obtaining after default step-length certainly increasing Current object to be allocated described in dispensing, until the object to be allocated that described terminal unit creates all distributes.
In the alternatively possible implementation of the present invention, id distribute module needs predetermined numeral id model to be allocated Enclose, and the digital id in the range of numeral id to be allocated is distributed to local object to be allocated one by one.
Refer to Fig. 7, show the block diagram of another id distribute module of the embodiment of the present invention, this id distribute module 120 is wrapped Include: the first determination sub-module 1221, the second determination sub-module 1222 and the 3rd distribution sub module 1223.
First determination sub-module 1221, for determining the destination number of the object to be allocated of terminal unit establishment.
Second determination sub-module 1222, for according to destination number and latest digital id, determining numeral id model to be allocated Enclose, the digital id in described numeral id scope to be allocated is to preset step-length incremented by successively, and first digit id is described up-to-date Id digital id from after increase with default step-length.
3rd distribution sub module 1223, for distributing to the digital id in the range of numeral id to be allocated described in each one by one Object to be allocated, so that each described object to be allocated has a uniquely digital id.
For example, the number of objects to be allocated of certain project that terminal unit creates is n, and obtain from server is up-to-date Digital id is i, and default step-length is 1 it is determined that i+1~i+n is numeral id scope to be allocated, and by this n number of i+1~i+n Word id distributes to n object to be allocated one by one, so that each object to be allocated has a uniquely digital id.
In another possible implementation in the present invention, a project generally includes the object of multiple types, Ke Yigen Divide different id sections according to object type, the digital id of the object of same target type is in this id section;This kind of application scenarios In, latest digital id in the digital id distribution information of storage in server includes the up-to-date id corresponding to each object type.
Refer to Fig. 8, show the block diagram of another id distribute module of the embodiment of the present invention, as shown in figure 8, this id distribution Module 120, comprising: the 3rd determination sub-module 1231, the 4th distribution sub module 1232 and the 5th distribution sub module 1233;
3rd determination sub-module 1231, for determining the object type of currently object to be allocated;For example, role, article, skill Energy, model etc..
4th distribution sub module 1232, for ought currently to be allocated to as if object type in first object to be allocated When, obtain corresponding latest digital id of this object type from digital id distribution information, and by this latest digital id with default step The long digital id obtaining from after increase distributes to currently object to be allocated.
5th distribution sub module 1233, for ought object to be allocated not be currently that in this object type first is to be allocated Object when, by this object type currently upper one of object to be allocated object to be allocated corresponding numeral id to preset step-length Obtain digital id from after increase and distribute to currently object to be allocated.
Described sending module 130, for the digital id information distributed for object to be allocated is sent to server, so that institute State server digital id distribution information according to the id information updating of described numeral, described numeral id information includes for be allocated right As last digital id of distribution so that server the up-to-date id in described numeral id distribution information is updated to described last One digital id;
After the object to be allocated that terminal unit is local distributes digital id, the digital id information of this sub-distribution is sent To server, so that the digital id information of this sub-distribution of server record, wherein, digital id information includes this sub-distribution A digital id afterwards, so that corresponding for this project latest digital id is updated to the digital id information of terminal unit transmission by server In last digital id.
In one kind of the present invention likely implementation, this sending module includes: write submodule, for by described number Word id information writes the id file of described latest edition, obtains amended id file;Sending submodule, for by described modification Id file afterwards is sent to described svn server, so that the id file of latest edition described in described svn server update.
Described determining module 140, for when receiving after being updated successfully response message of server return, treating described in determination The digital id of distribution object is allocated successfully.
When terminal unit receives after being updated successfully response message of server return, determine that this id is allocated successfully.
Alternatively, described device also includes returning performing module 150, for when the renewal failure receiving server return After response message, control described id distribute module to re-execute from server and obtain current project corresponding numeral id distribution letter Breath, is updated successfully response message until receive that described server returns.
The digital id generating means that the present embodiment provides, store the digital id distribution information of each project in the server, Each developer can access this server, and obtains the digital id of needs distribution from this server by the first acquisition module The digital id distribution information corresponding to project, this digital id distribution information includes being the latest digital of allocation of items id;Then, determined according to this latest digital id by id distribute module and currently can distribute digital id, and it is local to distribute to terminal unit Object to be allocated so that each object to be allocated has a uniquely digital id.Distribute after digital id for native object, By sending module, the digital id information distributed is sent to server, wherein, digital id information includes for local to be allocated right As last digital id of distribution, so that corresponding for this project latest digital id is updated to last number described by server Word id, when terminal unit receives after being updated successfully message of server return, determines that this id is allocated successfully.So, other Latest digital id after updating for the developer continues to be allocated backward, thus ensureing the digital id of each developer distribution only One property.
Present invention also provides being applied to the digital id generating means embodiment in server.
Refer to Fig. 9, show that a kind of digital identity of object of the embodiment of the present invention identifies the block diagram of id generating means, should Device is applied in server, each project that is stored with this server corresponding numeral id distribution information, this digital id distribution Information includes being currently latest digital id of object distribution in this project;
As shown in figure 9, this device includes sending module 210, update module 220 and returns module 230.
Sending module 210, for returning the numeral corresponding to the current project that premises equipment requests obtain to terminal unit Id distributes information;
Described numeral id information includes being latest digital id of described current project distribution, so that described terminal unit Determined according to described latest digital id and currently can distribute digital id, and distribute to the object to be allocated that described terminal unit creates, So that each described object to be allocated has a uniquely digital id;In a kind of possible implementation of the present invention, if institute Stating server is version control system svn server, then described sending module specifically for returning described to described terminal unit The id file of the corresponding latest edition of current project, comprises the corresponding number of described current project in the id file of described latest edition Word id distributes information, so that described terminal unit reads the corresponding institute of described current project from the id file of described latest edition State digital id distribution information.
Update module 220, for after receiving the digital id information of terminal unit transmission, according to described numeral id information Update described numeral id distribution information, it is that described object to be allocated distributes that described numeral id information includes described terminal unit A digital id afterwards, so that latest digital id in corresponding for described project numeral id distribution information is updated to by described server Last digital id described;In a kind of possible implementation of the present invention, if described server is version control system svn Server, then described update module, comprising: judging submodule and renewal submodule;
This judging submodule, for judging whether the amended id file that described terminal unit sends is based on described The modification that in svn server, the id file of the corresponding current latest edition of described current project of storage is carried out, after described modification Id file distributed after digital id for described object to be allocated by described terminal unit, the number of last digital id will be comprised Obtain in the id file of the word id information described latest edition of write;
This renewal submodule, for being to store based in described svn server when the described amended id file of determination The modification that the id file of the corresponding current latest edition of described current project is carried out, then will be currently up-to-date in described svn server The id file of version is updated to described amended id file.
Described numeral id distributes information and also includes sending the corresponding user profile of terminal unit of described numeral id information, with And, send whole numeral id of this sub-distribution of terminal unit of described numeral id information, so that in Trancking Software project development Problem.
Return module 230, for described numeral id distribution being successfully updated according to described numeral id information when described server After information, to described terminal unit return be updated successfully response message so that described terminal unit receive described in be updated successfully Determine after response message that the digital id of described project is allocated successfully.
By above description, those skilled in the art can be understood that the application can be by software plus must The mode of the general hardware platform needing is realizing.
Refer to Figure 10, show a kind of block diagram of terminal unit of the embodiment of the present invention, this terminal unit at least includes locating Reason device 410, and be connected by bus with processor 410 memorizer 420, transmitter 430, receptor 440.
Memorizer 420 internal stored program instructs, and this memorizer can be high speed ram memorizer it is also possible to non-volatile Memorizer (non-volatile memory), for example, at least disk memory etc..
Processor 410, for calling the programmed instruction of memorizer 420 memory storage, to execute following methods step:
Obtain current project corresponding numeral id distribution information from server, described numeral id distribution information is included Latest digital id for object distribution in described current project;
Determined according to described latest digital id and currently can distribute digital id, and distribute in treating that described terminal unit creates Distribution object, so that each described object to be allocated has a uniquely digital id;
The digital id information distributed for object to be allocated is sent to described server, described numeral by triggering transmitter 430 Id information includes last the digital id distributing for described object to be allocated, so that described server is by described current project pair Described latest digital id answered is updated to last digital id described and produces and be updated successfully response message;
Receive after being updated successfully response message of server return when receptor 440 is detected, determine described to be allocated The digital id of object is allocated successfully.
Wherein, processor 410 calls the programmed instruction in memorizer 420 to be able to carry out the numeral shown in above-mentioned Fig. 1-Fig. 4 Id generation method embodiment, no longer repeats herein one by one.
Wherein, this processor 410 is probably a central processing unit cpu, or specific integrated circuit asic (application specific integrated circuit), or be arranged to implement the one of the embodiment of the present invention Individual or multiple integrated circuits.
The terminal unit that the application provides, obtains the numeral corresponding to project needing the digital id of distribution from this server Id distributes information, and this digital id distribution information includes being latest digital id of allocation of items.Wherein, store in server The digital id distribution information of each project, each developer can access this server.Then, this terminal unit is according to this Newly digital id determination currently can distribute digital id, and distributes to the local object to be allocated of terminal unit, so that local each Object to be allocated has a uniquely digital id.This terminal unit distributes after digital id for native object, by the number of distribution Word id information sends to server, and wherein, digital id information includes last the digital id for native object distribution, so that clothes Corresponding for this project latest digital id is updated to last digital id described by business device, and so, other developers are after updating Latest digital id continue be allocated backward, thus ensure each developer distribution digital id uniqueness.
Refer to Figure 11, show a kind of block diagram of server of the embodiment of the present invention, this server includes processor 510, And transmitter 520, receptor 530 and the memorizer 540 being connected by bus with processor 510.
Have program stored therein in memorizer 540 instruction and data, and wherein, memorizer can include program storage data and deposit Reservoir.Wherein, program storage can be high speed ram memorizer it is also possible to nonvolatile memory (non-volatile Memory), for example, at least disk memory etc..For storage program instruction;Data storage is used for storing each project Corresponding numeral id distribution information.
In a kind of possible implementation of the present invention, it is one id file of each establishment of item in data storage, By the digital id distribution information Store of described project in described project corresponding id file.
In the alternatively possible implementation of the present invention, data storage is set up an id file, described id literary composition Part includes project and described project corresponding id data item, the corresponding numeral id distribution of project described in described id data item memory storage Information.
Receptor 530, the id request message sending for receiving terminal apparatus, described id request message carries request and obtains The digital id distribution corresponding bullets of information.
Processor 510 calls the programmed instruction in memorizer, to execute the method and step of the server side shown in Fig. 3.
Specifically, after processor 510 obtains id request message, from memorizer 540, to obtain bullets corresponding for inquiry Digital id distributes information, and triggers transmitter 520 this digital id distribution information is sent to terminal unit, so that terminal unit root Determine according to described latest digital id and currently can distribute digital id, and distribute to the object to be allocated that described terminal unit creates, with Each described object to be allocated is made to have a uniquely digital id;Receive terminal unit transmission when receptor 530 is detected Project in object distribution digital id information after, in more new memory 540 storage this project corresponding numeral id distribution believe Breath, wherein, latest digital id in this digital id distribution information is updated last the digital id in digital id information, and touches Send out transmitter 520 and return envelope letter success response message to terminal unit, so that terminal unit is updated successfully response message according to this Determine that this is allocated successfully.
The server that the present embodiment provides, stores the digital id distribution information of each project, each exploitation in the server Person can access this server.When terminal unit needs the digital id of object distribution to be allocated for certain project local, clothes Business device can provide digital id distribution information accordingly to terminal unit, and this digital id distribution information includes dividing for this project Latest digital id joined, so that terminal unit determines according to this latest digital id currently can distribute digital id, and distributes to terminal The local object to be allocated of equipment, so that each object to be allocated has a uniquely digital id.When server receives end After the digital id information of this sub-distribution that end equipment sends, wherein, this digital id information includes last number of this distribution Word id, latest digital id in corresponding for this project numeral id distribution information is updated to last numeral described by server id.And it is updated successfully message to terminal unit return, so that terminal unit determines that this is updated successfully.So, other developers Latest digital id after updating continues to be allocated backward, thus ensureing the uniqueness of the digital id of each developer distribution. And, server is existing server, is not server newly developed, does not therefore need extra development and maintenance cost.
In this specification, each embodiment is described by the way of going forward one by one, and what each embodiment stressed is and other The difference of embodiment, between each embodiment identical similar portion mutually referring to.For device disclosed in embodiment For, because it corresponds to the method disclosed in Example, so description is fairly simple, say referring to method part in place of correlation Bright.
Last in addition it is also necessary to explanation, herein, such as first and second or the like relational terms be used merely to by One entity or operation are made a distinction with another entity or operation, and not necessarily require or imply these entities or operation Between there is any this actual relation or order.And, term " inclusion ", "comprising" or its any other variant meaning Covering comprising of nonexcludability, so that including a series of process of key elements, method, article or equipment not only include that A little key elements, but also include other key elements being not expressly set out, or also include for this process, method, article or The intrinsic key element of equipment.In the absence of more restrictions, the key element being limited by sentence "including a ...", does not arrange Remove and also there is other identical element in the process including described key element, method, article or equipment.
For convenience of description, it is divided into various units to be respectively described with function when describing apparatus above.Certainly, implementing this The function of each unit can be realized in same or multiple softwares and/or hardware during application.
As seen through the above description of the embodiments, those skilled in the art can be understood that the application can Mode by software plus necessary general hardware platform to be realized.Based on such understanding, the technical scheme essence of the application On in other words prior art is contributed partly can be embodied in the form of software product, this computer software product Can be stored in storage medium, such as rom/ram, magnetic disc, CD etc., include some instructions use so that a computer equipment (can be personal computer, server, or network equipment etc.) executes some of each embodiment of the application or embodiment Partly described method.
Described above to the disclosed embodiments, makes professional and technical personnel in the field be capable of or uses the application. Multiple modifications to these embodiments will be apparent from for those skilled in the art, as defined herein General Principle can be realized in the case of without departing from spirit herein or scope in other embodiments.Therefore, the application It is not intended to be limited to the embodiments shown herein, and be to fit to and principles disclosed herein and features of novelty phase one The scope the widest causing.

Claims (20)

1. a kind of digital identity identifies id generation method, is applied in terminal unit it is characterised in that including:
Obtain current project corresponding numeral id distribution information from server, described numeral id distribution information is included for institute State latest digital id of object distribution in current project;
Determined according to described latest digital id and currently can distribute digital id, and distribute to the to be allocated right of described terminal unit establishment As so that each described object to be allocated has a uniquely digital id;
The digital id information distributed for described object to be allocated is sent to described server, so that described server is according to described Digital id distribution information described in digital id information updating, described numeral id information includes last for described object distribution to be allocated One digital id, so that the up-to-date id in described numeral id distribution information is updated to last numeral described by described server id;
When receiving after being updated successfully response message of described server return, determine the digital id distribution of described object to be allocated Success, the described response message that is updated successfully is successfully updated described numeral id distribution by described server according to described numeral id information Produce after information.
If 2. method according to claim 1 is it is characterised in that described server is version control system svn server, Then the described current project corresponding numeral id that obtains from server distributes information, comprising:
The id file of the corresponding latest edition of described current project, the id of described latest edition is obtained from described svn server The corresponding up-to-date digital id distribution information of the described current project that is stored with file, described up-to-date digital id distribution packet Include described latest digital id;
Described current project corresponding numeral id distribution information is read from the id file of described latest edition;
Described the digital id information distributed for described object to be allocated is sent to described server, comprising:
Write the id file of described latest edition according to described numeral id information, obtain amended id file;
Described amended id file is sent to described svn server;Described amended id file is used for making described svn clothes Business device determines that described amended id file is based on the corresponding current latest edition of current project described in described svn server Id file modification when, update described latest edition id file.
3. method according to claim 1 and 2 it is characterised in that described according to described latest digital id, determine and currently may be used The digital id of distribution, and distribute to the object to be allocated that described terminal unit creates, so that each described object to be allocated has one Individual unique numeral id, comprising:
If currently to be allocated to as if first object to be allocated, described latest digital id is obtained after default step-length from increasing Digital id distribute to described object currently to be allocated;
If described object currently to be allocated is not described first object to be allocated, and described object currently to be allocated is upper The digital id that one object to be allocated corresponding numeral id obtains after increasing described default step-length distributes to described currently to be allocated Object, until the object to be allocated that described terminal unit creates all distributes.
4. method according to claim 1 and 2 it is characterised in that described according to described latest digital id, determine and currently may be used The digital id of distribution, and distribute to the object to be allocated that described terminal unit creates, so that each described object to be allocated has one Individual unique numeral id, comprising:
Determine the destination number of the object to be allocated that described terminal unit creates;
According to described destination number and described latest digital id, determine numeral id scope to be allocated, described numeral id to be allocated Digital id in scope is to preset step-length incremented by successively, and first digit id is after described up-to-date id is increased certainly with default step-length Digital id;
Digital id in the range of described numeral id to be allocated is distributed to each described object to be allocated one by one, so that described in each Object to be allocated has a uniquely digital id.
If method according to claim 1 and 2 it is characterised in that described numeral id distribution information in latest digital Id includes latest digital id corresponding to each object type, then described according to described latest digital id, determine and currently can distribute Digital id, and distribute to the object to be allocated that described terminal unit creates, so that each described object to be allocated has one only One digital id, comprising:
Determine the object type of currently object to be allocated;
If described currently to be allocated to as if described object type in first object to be allocated, from described numeral id distribute Obtain corresponding latest digital id of described object type in information, and described latest digital id increased obtain after default step-length Digital id distributes to described object currently to be allocated;
If described object currently to be allocated is not first object to be allocated in described object type, by described object class Described in type, currently upper one of object to be allocated object to be allocated corresponding numeral id obtains digital id after increasing default step-length Distribute to described object currently to be allocated.
6. method according to claim 1 and 2 is it is characterised in that methods described also includes:
After receiving the renewal failure response message that described server returns, return and re-execute described acquisition from server The step that current project corresponding numeral id distributes information, the response that is updated successfully returning until receiving described server disappears Breath.
7. method according to claim 1 and 2 is it is characterised in that described numeral id is 32 or 64 bits.
8. a kind of digital identity identifies id generation method, is applied in server it is characterised in that described version management server In be stored with each project corresponding numeral id distribution information, described numeral id distribution information include being each project described Latest digital id of distribution, methods described includes:
Described server returns the digital id distribution corresponding to the current project that described premises equipment requests obtain to terminal unit Information, described numeral id information includes being latest digital id of described current project distribution, so that described terminal unit root Determine according to described latest digital id and currently can distribute digital id, and distribute to the object to be allocated that described terminal unit creates, with Each described object to be allocated is made to have a uniquely digital id;
After receiving the digital id information that described terminal unit sends, described server is according to described numeral id information updating institute State digital id distribution information, described numeral id information includes last that described terminal unit is described object distribution to be allocated Digital id so that described server by corresponding for described project numeral id distribution information in latest digital id be updated to described in A digital id afterwards;
After described server is successfully updated described numeral id distribution information according to described numeral id information, to described terminal unit Return is updated successfully response message so that described terminal unit receive described in be updated successfully response message after determine described project Digital id be allocated successfully.
If 9. method according to claim 8 is it is characterised in that described server is version control system svn server, Then described server returns the digital id distribution letter corresponding to the current project that described premises equipment requests obtain to terminal unit Breath, comprising:
Described svn server to described terminal unit return the corresponding latest edition of described current project id file, described Comprise in the id file of redaction described current project corresponding numeral id distribution information so that described terminal unit from described Described numeral id distribution information is read in the id file of redaction;
Described after receiving the digital id information that described terminal unit sends, described server is according to described digital id information more Newly described numeral id distribution information, comprising:
Described svn server judges whether the amended id file that described terminal unit sends is based on described svn server The modification that the id file of the corresponding current latest edition of described current project of middle storage is carried out;Described amended id file by Described terminal unit is to write, after described object to be allocated distributes digital id, the digital id information comprising last digital id Obtain in the id file entering described latest edition;
If being carried out based on the id file of the corresponding current latest edition of described current project of storage in described svn server Modification, then the id file of the current latest edition in described svn server is updated to described amended id file.
10. method according to claim 8 or claim 9 is it is characterised in that described numeral id distribution information is also included described in transmission The corresponding user profile of terminal unit of digital id information, and, send this sub-distribution of terminal unit of described numeral id information Whole numeral id.
A kind of 11. digital identities identify id generating means, are applied in terminal unit it is characterised in that including:
First acquisition module, for obtaining current project corresponding numeral id distribution information from server, described numeral id divides Join information and include being latest digital id of object distribution in described current project;
Id distribute module, currently can distribute digital id for determining according to described latest digital id, and distribute in described terminal The object to be allocated that equipment creates, so that each described object to be allocated has a uniquely digital id;
Sending module, for the digital id information distributed for described object to be allocated is sent to described server, so that described Server digital id distribution information according to the id information updating of described numeral, described numeral id information includes for described to be allocated Last digital id of object distribution, so that the up-to-date id in described numeral id distribution information is updated to institute by described server State last digital id;
Determining module, for when receiving after being updated successfully response message of described server return, it is described to be allocated right to determine The digital id of elephant is allocated successfully, and the described response message that is updated successfully is successfully updated according to described numeral id information by described server Produce after described numeral id distribution information.
If 12. devices according to claim 11 are it is characterised in that described server services for version control system svn Device, then described first acquisition module, comprising:
First acquisition submodule, for obtaining the id literary composition of the corresponding latest edition of described current project from described svn server Part, the corresponding up-to-date digital id distribution information of the described current project that is stored with the id file of described latest edition, described New digital id distribution information includes described latest digital id;
Reading submodule, for reading described current project corresponding numeral id distribution letter from the id file of described latest edition Breath;
Described sending module, comprising:
Write submodule, for described numeral id information writes the id file of described latest edition, obtains amended id literary composition Part;
Sending submodule, for being sent to described svn server by described amended id file;Described amended id file For making described svn server determine, described amended id file is based on described current project pair in described svn server During the id file modification of the current latest edition answered, update the id file of described latest edition.
13. devices according to claim 11 or 12 are it is characterised in that described id distribute module, comprising:
First distribution sub module, for when currently to be allocated to as if during first object to be allocated, by described latest digital The digital id that id obtains after increasing default step-length distributes to described object currently to be allocated;
Second distribution sub module, for when described object currently to be allocated is not first object to be allocated, working as described The digital id distribution that upper one object to be allocated corresponding numeral id of front object to be allocated obtains after increasing described default step-length To described object currently to be allocated, until the object to be allocated that described terminal unit creates all distributes.
14. devices according to claim 11 or 12 are it is characterised in that described id distribute module, comprising:
First determination sub-module, for determining the destination number of the object to be allocated of described terminal unit establishment;
Second determination sub-module, for according to described destination number and described latest digital id, determining numeral id model to be allocated Enclose, the digital id in described numeral id scope to be allocated is to preset step-length incremented by successively, and first digit id is described up-to-date Id digital id from after increase with default step-length;
3rd distribution sub module, treats described in each point for distributing to the digital id in the range of described numeral id to be allocated one by one Pairing is as so that each described object to be allocated has a uniquely digital id.
15. if devices according to claim 11 or 12 are it is characterised in that up-to-date number in described numeral id distribution information Word id includes the up-to-date id corresponding to each object type, then described id distribute module, comprising:
3rd determination sub-module, for determining the object type of currently object to be allocated;
4th distribution sub module, for when described currently to be allocated to as if described object type in first object to be allocated When, obtain corresponding latest digital id of described object type from described numeral id distribution information, and by described latest digital id Obtain digital id after increasing default step-length and distribute to described object currently to be allocated;
5th distribution sub module, for not being that in described object type first is to be allocated when described object currently to be allocated During object, by described in described object type currently upper one of object to be allocated object to be allocated corresponding numeral id increase pre- If obtaining digital id after step-length to distribute to described object currently to be allocated.
16. devices according to claim 11 or 12 are it is characterised in that described device also includes:
Return performing module, for after receiving the renewal failure response message that described server returns, controlling described id to divide Join module and re-execute the described step obtaining current project corresponding numeral id distribution information from server, until receiving What described server returned is updated successfully response message.
17. devices according to claim 11 or 12 are it is characterised in that described numeral id is 32 or 64 binary systems Number.
A kind of 18. digital identities identify id generating means, are applied in server it is characterised in that storing in described server There is each project corresponding numeral id distribution information, described numeral id distribution information includes being object in each project described Latest digital id of distribution;Described device includes:
Sending module, the digital id for returning to terminal unit corresponding to the current project that described premises equipment requests obtain divides Join information, described numeral id information includes being latest digital id of described current project distribution, so that described terminal unit Determined according to described latest digital id and currently can distribute digital id, and distribute to the object to be allocated that described terminal unit creates, So that each described object to be allocated has a uniquely digital id;
Update module, for after receiving the digital id information that described terminal unit sends, according to described digital id information more Newly described numeral id distribution information, it is the last of described object distribution to be allocated that described numeral id information includes described terminal unit One digital id, so that latest digital id in corresponding for described project numeral id distribution information is updated to institute by described server State last digital id;
Return module, for when described server according to described numeral id information be successfully updated described numeral id distribution information after, To described terminal unit return be updated successfully response message so that described terminal unit receive described in be updated successfully response message Determine that the digital id of described project is allocated successfully afterwards.
If 19. devices according to claim 18 are it is characterised in that described server services for version control system svn Device, then,
Described sending module, comprising: the first sending submodule, corresponding for returning described current project to described terminal unit The id file of latest edition, comprises described current project corresponding numeral id distribution information in the id file of described latest edition, So that described terminal unit reads the corresponding described numeral id distribution of described current project from the id file of described latest edition Information;
Described update module, comprising:
Judging submodule, for judging whether the amended id file that described terminal unit sends is based on described svn service The modification that in device, the id file of the corresponding current latest edition of described current project of storage is carried out, described amended id file Distributed after digital id for described object to be allocated by described terminal unit, the digital id information of last digital id will be comprised Obtain in the id file writing described latest edition;
Update submodule, for working as based on described in storage in described svn server when the described amended id file of determination The modification that the id file of the corresponding current latest edition of front project is carried out, then will be described currently up-to-date in described svn server The id file of version is updated to described amended id file.
20. devices according to claim 18 or 19 are it is characterised in that described numeral id distribution information also includes sending institute State the corresponding user profile of terminal unit of digital id information, and, send this point of terminal unit of described numeral id information The whole numeral id joining.
CN201611018935.8A 2016-11-18 2016-11-18 Digital ID generation method and device Active CN106341497B (en)

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 true CN106341497A (en) 2017-01-18
CN106341497B 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)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106911780A (en) * 2017-02-28 2017-06-30 北京三快在线科技有限公司 Traffic ID generation method, apparatus and system
CN108647193A (en) * 2018-04-20 2018-10-12 河南中烟工业有限责任公司 A kind of unique identifier generation method can be applied to distributed system and device
CN111787131A (en) * 2020-06-24 2020-10-16 百度在线网络技术(北京)有限公司 ID generation method and electronic device
CN112905585A (en) * 2019-11-19 2021-06-04 北京沃东天骏信息技术有限公司 Number generation method and device

Citations (5)

* Cited by examiner, † Cited by third party
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

Patent Citations (5)

* Cited by examiner, † Cited by third party
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

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106911780A (en) * 2017-02-28 2017-06-30 北京三快在线科技有限公司 Traffic ID generation method, apparatus and system
CN106911780B (en) * 2017-02-28 2020-12-04 北京三快在线科技有限公司 Service ID generation method, device and system
CN108647193A (en) * 2018-04-20 2018-10-12 河南中烟工业有限责任公司 A kind of unique identifier generation method can be applied to distributed system and device
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
CN111787131A (en) * 2020-06-24 2020-10-16 百度在线网络技术(北京)有限公司 ID generation method and electronic device

Also Published As

Publication number Publication date
CN106341497B (en) 2019-08-30

Similar Documents

Publication Publication Date Title
CN107577427B (en) data migration method, device and storage medium for blockchain system
CN103765423B (en) Gathering transaction data associated with locally stored data files
CN109003078A (en) Intelligent contract call method and device, electronic equipment based on block chain
CN107395665A (en) A kind of block chain service handling and business common recognition method and device
CN106341497A (en) Digital ID generating method and apparatus
CN106407430A (en) Complex and intelligent contract state synchronization method based on phase buckets
CN110113393B (en) Message pushing method and device, electronic equipment and medium
CN111079101B (en) Method and device for obtaining evidence of infringement based on block chain, electronic equipment and storage medium
CN103631937B (en) Build method, the apparatus and system of row storage index
CN109302495A (en) A kind of date storage method and device
CN108898368B (en) Resource transfer method and device, storage medium and electronic device
CN104636437A (en) Event notification method and device and monitor processing method
CN110442307A (en) Binding method, equipment and the storage medium of disk in a kind of linux system
CN114281893A (en) Processing method, device and equipment for block chain transaction
CN111597567A (en) Data processing method, data processing device, node equipment and storage medium
JP6903570B2 (en) Information manipulation
CN109491962A (en) A kind of file directory tree management method and relevant apparatus
CN108710658B (en) Data record storage method and device
CN107527228B (en) Method and device for sending electronic ticket
CN107357691A (en) The processing method and processing device of image file
CN114493598A (en) Computing resource management method, device, computer equipment and storage medium
CN109815047A (en) A kind of method and relevant apparatus of data processing
CN113326059B (en) Resource updating method, device and storage medium
CN106572128A (en) Method and device used for deploying applications in integrated development environment (IDE)
CN110704451A (en) Ownership registration and evidence-providing method and device based on block chain

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