CN108234580A - A kind of unique mark generation method, apparatus and system - Google Patents

A kind of unique mark generation method, apparatus and system Download PDF

Info

Publication number
CN108234580A
CN108234580A CN201611199510.1A CN201611199510A CN108234580A CN 108234580 A CN108234580 A CN 108234580A CN 201611199510 A CN201611199510 A CN 201611199510A CN 108234580 A CN108234580 A CN 108234580A
Authority
CN
China
Prior art keywords
unique mark
data server
mark
generation
initial
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
CN201611199510.1A
Other languages
Chinese (zh)
Other versions
CN108234580B (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.)
Beijing Kingsoft Office Software Inc
Zhuhai Kingsoft Office Software Co Ltd
Guangzhou Kingsoft Mobile Technology Co Ltd
Guangzhou Jinshan Mobile Technology Co Ltd
Original Assignee
Beijing Kingsoft Office Software Inc
Zhuhai Kingsoft Office Software Co Ltd
Guangzhou Jinshan Mobile Technology 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 Beijing Kingsoft Office Software Inc, Zhuhai Kingsoft Office Software Co Ltd, Guangzhou Jinshan Mobile Technology Co Ltd filed Critical Beijing Kingsoft Office Software Inc
Priority to CN201611199510.1A priority Critical patent/CN108234580B/en
Publication of CN108234580A publication Critical patent/CN108234580A/en
Application granted granted Critical
Publication of CN108234580B publication Critical patent/CN108234580B/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

Abstract

An embodiment of the present invention provides a kind of unique mark generation method, apparatus and systems, the system comprises management servers and data server, each data server prestores the initial unique mark corresponding with data server itself and target step of management server generation, the target step of each data server is identical, for the default integral multiple of the total quantity of data server in the system, the difference of the initial unique mark of arbitrary two data servers is not the integral multiple of the total quantity;The method includes:Receive the mark generation instruction for being directed to target object;When receiving mark generation instruction for the first time, using the initial unique mark stored as the corresponding unique mark of target object;Otherwise, it determines the unique mark of last generation, and according to the unique mark of last time generation and the target step stored, the corresponding unique mark of generation target object.By implementing this programme, it is possible to reduce to the occupancy of Internet resources during generation unique mark.

Description

A kind of unique mark generation method, apparatus and system
Technical field
The present invention relates to mark generation technique field, more particularly to a kind of unique mark generation method, apparatus and system.
Background technology
Nowadays internet development is very swift and violent, and the development of industry causes various internet works softwares to possess ten million or even more than one hundred million User.Each user can generate object, for example, generate character object, event object, practical judgment etc., for above-mentioned object, Data server is needed to assign a unique mark for them to distinguish.In general, data server makees Arabic numerals For unique mark, to ensure the uniqueness of unique mark, the increments or decrements of Arabic numerals are used as mark by data server Know create-rule, generate unique mark.The problem of can not normally being generated to be identified caused by prevention data server failure, by more Platform data server generates unique mark jointly, and the unique mark of different data server generation may repeat.
To solve the above problems, in the prior art, each data server generates unique mark with like-identified create-rule, And after each data server every time one new unique mark of generation, the unique mark currently generated is sent to other Data server, so that other data servers are using received unique mark as initial value, and with identical create-rule Unique mark is generated, avoids the situation that different data server generates identical unique mark.Such as, it is specified that unique mark is just Integer, create-rule differ 1 for currently the only mark with next unique mark, then a certain number of units generates unique according to server A After identifying " 100 ", " 100 " are sent to other data servers, in this way, when a certain number of units in other data servers is according to clothes When device B generation unique marks of being engaged in, unique mark " 101 " is generated, without what is generated there may be data server A The marks such as " 99 ", " 98 " after data server B generate unique mark " 101 ", " 101 " are sent to and are existed including data server A Each data server of interior generation unique mark with this process, ensure that the uniqueness of unique mark.But with unique The huge increasing of generation quantity is identified, the number of unique mark is sent between different data server also to be increased, this can occupy Multi net voting Resource.
Invention content
The embodiment of the present invention is designed to provide a kind of unique mark generation method, apparatus and system, to ensure not Unique mark with data server generation is unduplicated simultaneously, reduces the occupancy to Internet resources.Specific technical solution is as follows:
In a first aspect, an embodiment of the present invention provides a kind of unique mark generation method, system is generated applied to unique mark Data server in system, the system comprises management server and at least two data servers, each data server are pre- First store initial unique mark that the management server is generated and issued, corresponding with data server itself and target step It is long, wherein, the initial unique mark of each data server is different but target step is identical, the target step for it is described at least The default integral multiple of the total quantity of two data servers, the difference of the initial unique mark of arbitrary two data servers is not institute The integral multiple of total quantity is stated, the method includes:
Receive the mark generation instruction for being directed to target object;
Determine whether to receive mark generation instruction for the first time;
When judging result is to be, using the initial unique mark stored as the corresponding unique mark of the target object Know;When judging result is no, determine the unique mark of last generation, and according to the unique mark of the last generation and The target step stored generates the corresponding unique mark of the target object.
Optionally, the unique mark and the target step stored according to the last generation, generates the mesh The step of marking object corresponding unique mark, including:
By the last time, the unique mark of generation is added with the target step, be will add up result and is determined as the target object Corresponding unique mark.
Optionally, the unique mark and the target step stored according to the last generation, generates the mesh The step of marking object corresponding unique mark, including:
By the last time, the unique mark of generation is subtracted each other with the target step, will be subtracted each other result and is determined as the target object Corresponding unique mark.
Second aspect, an embodiment of the present invention provides a kind of unique marks to generate system, including:Management server and at least Two data servers;
The management server is used for:It determines the total quantity of at least two data servers, the sum will be belonged to The numerical value of the default integral multiple of amount is determined as target step;The corresponding initial unique mark of each data server is generated, wherein, The initial unique mark of each data server is different and the difference of the initial unique mark of arbitrary two data servers is not The integral multiple of the total quantity;And send corresponding initial unique mark and the target step to each data server;
The data server is used for:Receive and store initial unique mark and the target step that the management server issues It is long;Also, when receiving the mark for being directed to target object generation instruction, determine whether that receiving mark generation for the first time refers to It enables;When judging result is to be, using the initial unique mark stored as the corresponding unique mark of the target object;When sentencing When disconnected result is no, the unique mark of last generation is determined, and according to the last unique mark generated and stored Target step, generate the corresponding unique mark of the target object.
Optionally, the management server generates the corresponding initial unique mark of each data server, specially:
Determine label of each data server in the unique mark generation system;
Based on preset least unit and the label, the corresponding initial value step-length of each data server is determined;
Using the corresponding initial value step-length of each data server as adjustment amount, the preset and unique mark is adjusted respectively and is given birth to Into unique corresponding first initial value of system, the corresponding initial unique mark of each data server is obtained.
Optionally, the management server determines mark of each data server in the unique mark generation system Number, specially:
Obtain the device identification of each data server in the unique mark generation system;
Each device identification is sorted according to preset rules;
According to ranking results, determine the label of each data server, wherein, each data server marked as pair Answer arrangement serial number of the device identification in ranking results.
Optionally, the management server is based on preset least unit and the label, determines each data server Corresponding initial value step-length, specially:
According to formula Pi=(ni- 1) * a determine the corresponding initial value step-length of each data server, wherein, PiIt is taken for data The corresponding initial value step-lengths of business device i, niFor the corresponding labels of data server i, a is the default least unit.
Optionally, the management server adjusts respectively using the corresponding initial value step-length of each data server as adjustment amount Preset unique corresponding first initial value of generation system with the unique mark, obtain each data server it is corresponding it is initial only One mark, specially:
According to formula Ai=A0+Pi, determine the corresponding initial unique mark of each data server, wherein, AiIt is taken for data The corresponding initial unique marks of business device i, A0To be preset unique corresponding first initial value of system, P are generated with the unique marki For the corresponding initial value step-lengths of data server i.
Optionally, the unique mark that the data server is generated according to the last time and the target step stored, The corresponding unique mark of the target object is generated, specially:
By the unique mark of last time generation and the target step numerical value after being added stored, it is determined as the target pair As corresponding unique mark.
Optionally, the management server adjusts respectively using the corresponding initial value step-length of each data server as adjustment amount Preset unique corresponding first initial value of generation system with the unique mark, obtain each data server it is corresponding it is initial only One mark, specially:
According to formula Ai=A0-Pi, determine the corresponding initial unique mark of each data server, wherein, AiIt is taken for data The corresponding initial unique marks of business device i, A0To be preset unique corresponding first initial value of system, P are generated with the unique marki For the corresponding initial value step-lengths of data server i.
Optionally, the unique mark that the data server is generated according to the last time and the target step stored, The corresponding unique mark of the target object is generated, specially:
Numerical value after the unique mark of last time generation and the target step stored are subtracted each other, is determined as the target pair As corresponding unique mark.
The third aspect, an embodiment of the present invention provides a kind of unique mark generating means, and system is generated applied to unique mark Data server in system, the system comprises management server and at least two data servers, each data server are pre- First store initial unique mark that the management server is generated and issued, corresponding with data server itself and target step It is long, wherein, the initial unique mark of each data server is different but target step is identical, the target step for it is described at least The default integral multiple of the total quantity of two data servers, the difference of the initial unique mark of arbitrary two data servers is not institute The integral multiple of total quantity is stated, described device includes:
Receiving module, for receiving the mark generation instruction for being directed to target object;
Judgment module, for determining whether to receive mark generation instruction for the first time, when judging result is when being, triggering the One computing module;When judging result is no, the second computing module is triggered;
First computing module, for corresponding unique using the initial unique mark stored as the target object Mark;
Second computing module, for determining the unique mark of last generation, and according to the last generation Unique mark and the target step stored, generate the corresponding unique mark of the target object.
Optionally, second computing module, is specifically used for:
By the last time, the unique mark of generation is added with the target step, be will add up result and is determined as the target object Corresponding unique mark.
Optionally, second computing module, is specifically used for:
By the last time, the unique mark of generation is subtracted each other with the target step, will be subtracted each other result and is determined as the target object Corresponding unique mark.
A kind of unique mark generation method provided in an embodiment of the present invention, apparatus and system, for number each in above system According to server, when receiving the mark generation instruction for target object for the first time, by pre-stored initial unique mark As generating mark, when it is non-receive the generation instruction of above-mentioned mark for the first time when, unique mark based on last time generation and Pre-stored target step generates unique mark, in the embodiment of the present invention, initial unique mark of arbitrary two data servers The difference known be that the integral multiple of the total quantity of data server in above system, above-mentioned target step are presetting for above-mentioned total quantity Integral multiple, and each data server only need to generate unique mark according to pre-stored data, ensure not therefore, it is possible to realize Unique mark with data server generation is unduplicated simultaneously, reduces the occupancy to Internet resources.
Description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, to embodiment or will show below There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention, for those of ordinary skill in the art, without creative efforts, can be with Other attached drawings are obtained according to these attached drawings.
Fig. 1 is a kind of flow diagram of unique mark generation method provided in an embodiment of the present invention;
Fig. 2 is the structure diagram that a kind of unique mark provided in an embodiment of the present invention generates system;
Fig. 3 is a kind of structure diagram of unique mark generating means provided in an embodiment of the present invention.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present invention, the technical solution in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, those of ordinary skill in the art are obtained every other without making creative work Embodiment shall fall within the protection scope of the present invention.
An embodiment of the present invention provides a kind of unique mark generation method, apparatus and system, to ensure different data clothes The unique mark that device generates of being engaged in is unduplicated simultaneously, reduces the occupancy to Internet resources.
It describes in detail first below to a kind of unique mark generation method provided in an embodiment of the present invention.
It should be noted that a kind of unique mark generation method provided in an embodiment of the present invention is generated applied to unique mark Data server in system, above-mentioned unique mark generation system include management server and at least two data servers, Each data server prestore it is that above-mentioned management server is generated and issued, corresponding with data server itself it is initial only One mark and target step, wherein, the initial unique mark of each data server is different but target step is identical, above-mentioned target Step-length is the default integral multiple of the total quantity of at least two data servers, the initial unique mark of arbitrary two data servers Difference be above-mentioned total quantity integral multiple.
As shown in Figure 1, a kind of unique mark generation method that the embodiment of the present invention is provided, includes the following steps:
S101:Receive the mark generation instruction for being directed to target object;
Wherein, above-mentioned target object can be any kind, any form of object, for example, character object, event pair As, practical judgment etc., certain above-mentioned target object may be the arbitrary combination in above-mentioned object.Specifically, character object can Think chat room members, group membership, number of users etc. are discussed;Event object can be order, action performs number, event is sent out Raw number etc.;Practical judgment can be quantity of virtual component of a certain virtual scene etc., be certainly not limited to this.
Above-mentioned mark generation instruction is specifically sent out by user, for example, when target object is order, mark generation instruction is To generate the instruction of O/No., when user needs to generate O/No., the data service into unique mark generation system Device sends out above-metioned instruction, to generate unique O/No..Certainly, above-mentioned mark generation instruction is not limited to be sent out by user Go out, can also automatically be sent out by system, such as:Can be that anonymous character object automatically generates when anonymous browse operation occurs Unique mark, at this point, system can send out the mark generation instruction for being directed to the anonymity character object automatically, wherein, the system Can be accessed server, and it can not also be data server that the accessed server, which can be data server,.
S102:Determine whether to receive mark generation instruction for the first time, when judging result is when being, performs step S103; When judging result is no, step S104 is performed;
For judgment method, the embodiment of the present invention does not limit herein, such as:It is instructed when receiving unique mark generation Afterwards, retrieval is with the presence or absence of the unique mark in addition to initial unique mark, and judging result is yes if being not present;Alternatively, may be used also Think:Setting variable receives the number of mark generation instruction to record, and 1 is identified as if receiving, and judging result is yes, etc..
S103:Using the initial unique mark stored as the corresponding unique mark of the target object;Wherein, it is described first The difference of beginning unique mark and the initial unique mark of other any data servers is not the total quantity of all data servers Integral multiple;
Wherein, the management in the unique mark generation system that above-mentioned initial unique mark is provided by the embodiment of the present invention takes Business device generates, and the initial unique mark of different data server (executive agent of the embodiment of the present invention) is different in above system.
Hereinafter, before step S104 is discussed in detail, a kind of realization side of initial unique mark is generated to management server Formula is described in detail.Specific management server generates the realization method of initial unique mark, can be as follows:
Determine label of each data server in unique mark generation system;Based on preset least unit and above-mentioned Label determines the corresponding initial value step-length of each data server;Using the corresponding initial value step-length of each data server as adjustment amount, Preset unique corresponding first initial value of generation system with the unique mark is adjusted respectively, is obtained each data server and is corresponded to Initial unique mark.
It is understood that initial value step-length therein is, the difference of the initial unique mark of different data server.It is above-mentioned pre- If least unit is specially 1 × 10-k, k can be arbitrary integer numerical value.Preferably, least unit is 1,0.1,0.01 etc., it can be with Reduce the spacing of the unique mark of different generations, help to improve the easy degree of unique mark.
For the determination process of above-mentioned label, can specifically include:Obtain each data in the unique mark generation system The device identification of server;Each device identification is sorted according to preset rules;According to ranking results, each data server is determined Label, wherein, the arrangement serial number marked as corresponding device identification in ranking results of each data server.It is above-mentioned pre- If rule can be acquisition sequence of above equipment mark etc..For the determination process of above-mentioned label, citing below carries out detailed It illustrates.Assuming that above system includes 4 data servers, device identification is respectively:A、B、C、D;It will be above-mentioned according to reception sequence Device identification is ranked up to obtain:A、B、C、D;According to ranking results it is found that the arrangement in ranking results of data server A Serial number 1, the arrangement serial number 2 in ranking results of data server B, data server C the row in ranking results Row serial number 3, the arrangement serial number 4 in ranking results of data server D, then the label of data server A, B, C, D Respectively 1,2,3,4.
Determining the detailed process of the corresponding initial value step-length of each data server can include:According to formula Pi=(ni-1)* A determines the corresponding initial value step-length of each data server, wherein, PiFor the corresponding initial value step-lengths of data server i, niFor data The corresponding labels of server i, a are the default least unit.Assuming that default least unit is 1, data server A, B, C, D's Label is respectively 1,2,3,4, then, the initial value of data server A, B, C, D in the above-mentioned example according to determined by above-mentioned formula Step-length is respectively:0、1、2、3.
Optionally, in one implementation, the tool of initial unique mark is determined according to initial value step-length the first initial value of adjustment Body step can include:According to formula Ai=A0+Pi, determine the corresponding initial unique mark of each data server, wherein, Ai For the corresponding initial unique marks of data server i, A0System unique corresponding the is generated with the unique mark to be preset One initial value, PiFor the corresponding initial value step-lengths of data server i.Assuming that above-mentioned first initial value is 1, data server A, B, C, D's Initial value step-length is respectively:0th, 1,2,3, then the initial unique mark of data server A determined according to above formula is 1+0=1, number According to the initial unique mark of server B for 1+1=2, and so on the initial unique mark of data server C, D be respectively:3、 4。
Optionally, in another implementation, the first initial value is adjusted according to initial value step-length and determines initial unique mark Specific steps can include:According to formula Ai=A0-Pi, determine the corresponding initial unique mark of each data server, wherein, AiFor the corresponding initial unique marks of data server i, A0System unique corresponding the is generated with the unique mark to be preset One initial value, PiFor the corresponding initial value step-lengths of data server i.Assuming that above-mentioned first initial value is 1, data server A, B, C, D's Initial value step-length is respectively:0th, 1,2,3, then initial unique mark of data server A according to determined by the formula of this paragragh Know for 1-0=1, and so on the initial unique mark of data server B, C, D be respectively:0、-1、-2.
It is emphasized that above-mentioned management server generates the specific implementation of initial unique mark as just showing Example, should not form the restriction to the embodiment of the present invention.That is, in the initial unique mark for ensureing each data server Know difference but target step is identical, which is the default integral multiple of the total quantity of at least two data servers, arbitrarily Under the premise of the difference of the initial unique mark of two data servers is not the integral multiple of above-mentioned total quantity, management server generation The mode of initial unique mark is varied, and the embodiment of the present invention does not generate the specific of initial unique mark to management server Realization method is defined.For example:It is 4 for generating the total quantity of the data server of unique mark, respectively:A、B、 C, D, then the initial unique mark of data server A can be 1, and the initial unique mark of data server B can be 3, number Initial unique mark according to server C can be 4, and the initial unique mark of data server D can be 6.
S104:It determines the unique mark of last generation, and according to the last unique mark generated and is stored Target step, generate the corresponding unique mark of the target object;Wherein, target step is the sum of all data servers The default integral multiple of amount.
Optionally, in one implementation, the unique mark according to the last generation and the mesh stored The step of marking step-length, generating the target object corresponding unique mark, can specifically include:By unique mark of last time generation Know the target step numerical value after being added with being stored, be determined as the corresponding unique mark of the target object.
Optionally, in another implementation, it the unique mark according to the last generation and is stored Target step, can specifically include the step of generating the target object corresponding unique mark:By the unique of last time generation The numerical value after subtracting each other with the target step stored is identified, is determined as the corresponding unique mark of the target object.
Wherein, above-mentioned target step and unique mark generation system are uniquely corresponding, by the pipe in unique mark generation system Reason server determines.The numerical value of above-mentioned target step is the default integral multiple of the total quantity of the data server in above system, For the numerical value of above-mentioned default integral multiple, can be set according to actual demand, the embodiment of the present invention does not limit.
A kind of unique mark generation method provided in an embodiment of the present invention, for each data service of responsible generation mark Device, when receiving the mark generation instruction for target object for the first time, using pre-stored initial unique mark as institute Generation mark, when it is non-receive the generation instruction of above-mentioned mark for the first time when, mark generation instruction based on last time generation and pre- The target step generation unique mark first stored, in the embodiment of the present invention, the initial unique mark of arbitrary two data servers Difference be not the integral multiple of total quantity of data server of being responsible for generation mark, above-mentioned target step is not above-mentioned total quantity Default integral multiple, and each data server only need to generate unique mark according to pre-stored data, protected therefore, it is possible to realize The unique mark for demonstrate,proving the generation of different data server is unduplicated simultaneously, reduces the occupancy to Internet resources.
As shown in Fig. 2, corresponding to above method embodiment, the embodiment of the present invention additionally provides a kind of unique mark generation system System, including:Management server 210 and at least two data servers 220;
The management server 210 is used for:The total quantity of at least two data servers 220 is determined, by belonging to The numerical value for stating the default integral multiple of total quantity is determined as target step;It is corresponding initial unique to generate each data server 220 Mark, wherein, the initial unique mark of each data server 220 is different and arbitrary two data servers 220 it is initial only The difference of one mark is not the integral multiple of the total quantity;And send corresponding initial unique mark to each data server 220 Know and the target step;
It is emphasized that above-mentioned target step and unique mark generation system are uniquely corresponding, above-mentioned default integral multiple Numerical value can be set according to actual demand, and the embodiment of the present invention does not limit.
The data server 220 is used for:Receive and store initial unique mark that the management server 210 issues and Target step;Also, when receiving the mark for being directed to target object generation instruction, determine whether to receive mark life for the first time Into instruction;When judging result is to be, using the initial unique mark stored as the corresponding unique mark of the target object; When judging result is no, the unique mark of last generation, and the unique mark according to the last generation and institute are determined The target step of storage generates the corresponding unique mark of the target object.
A kind of unique mark generation system provided in an embodiment of the present invention, for data server each in above system, when For the first time receive for target object mark generate instruction when, will pre-stored initial unique mark as generate mark Know, when it is non-receive the generation instruction of above-mentioned mark for the first time when, mark generation instruction based on last time generation and prestore Target step generation unique mark, in the embodiment of the present invention, the difference of the initial unique mark of arbitrary two data servers is not It is not the default integer of above-mentioned total quantity for the integral multiple of the total quantity of data server, above-mentioned target step in above system Times, and each data server only need to generate unique mark according to pre-stored data, ensure different numbers therefore, it is possible to realize The unique mark generated according to server is unduplicated simultaneously, reduces the occupancy to Internet resources.
For example:It is 4 for generating the total quantity of the data server 220 of unique mark, respectively:A, B, C, D, that What above-mentioned management server 210 was generated, the initial unique mark of data server A can be the first of 1, data server B Beginning unique mark can be that the initial unique mark of 3, data server C can be the initial unique mark of 4, data server D Can be 6, target step can be 4 (1 times of the total quantity of data server).In the case, data server A is multiple The unique mark generated after the mark generation instruction for target object is received to include:1、5、9、13、17、21、25、 29......;The unique mark that data server B is generated after multiple receive for the mark generation instruction of target object includes: 3、7、11、15、19、23、27、31......;Data server C is after multiple receive for the mark generation instruction of target object The unique mark of generation includes:4、8、12、16、20、24、28、32......;Data server D is received multiple for target The unique mark generated after the mark generation instruction of object includes:6th, 10,14,18,22,26,30,34......, is generated with this Unique mark will not repeat and each data server receives the unique mark transmitted of the prior art without transmission, reduce to network The occupancy of resource.
Firstly, it is necessary to explanation, the mark for target object that data server 220 is received generates instruction, In object can be any kind, any form of object, for example, character object, event object, practical judgment etc., certainly Above-mentioned target object may be the arbitrary combination in above-mentioned object.Specifically, character object can be chat room members, discuss Group membership, number of users etc.;Event object can be order, action execution number, event frequency etc.;Practical judgment It can be quantity of virtual component of a certain virtual scene etc., be certainly not limited to this.
It generates and instructs as above-mentioned mark, specifically sent out by user, for example, when target object is order, mark generation Instruction is to generate the instruction of O/No., when user needs to generate O/No., the number into unique mark generation system Above-metioned instruction is sent out according to server, to generate unique O/No..Certainly, above-mentioned mark generation instruction be not limited to by with Family is sent out, and can also automatically be sent out by system, such as:Can be that anonymous character object is automatic when anonymous browse operation occurs Unique mark is generated, at this point, system can send out the mark generation instruction for being directed to the anonymity character object automatically, wherein, it should System can be accessed server, and it can not also be data server that the accessed server, which can be data server,.
Secondly, explanation is needed further exist for, above-mentioned data server 220 is determined whether to receive mark life for the first time Into the judgment method of instruction, the embodiment of the present invention does not limit herein, such as:After unique mark generation instruction is received, inspection Rope is with the presence or absence of the unique mark in addition to initial unique mark, and judging result is yes if being not present;Alternatively, can also be: Setting variable receives the number of mark generation instruction to record, and 1 is identified as if receiving, and judging result is yes, etc..
Optionally, in a kind of specific implementation, it is right that the management server 210 generates each data server 220 The initial unique mark answered, specially:
Determine label of each data server 220 in the unique mark generation system;Based on preset minimum single Position and the label, determine each 220 corresponding initial value step-length of data server;It is corresponding just with each data server 220 Value step-length is adjustment amount, adjusts preset unique corresponding first initial value of generation system with the unique mark respectively, obtains respectively The corresponding initial unique mark of platform data server 220.
It is understood that initial value step-length therein is, the difference of the initial unique mark of different data server 220.On It is specially 1 × 10 to state default least unit-k, k can be arbitrary integer numerical value.Preferably, least unit is 1,0.1,0.01 etc., The spacing of the unique mark of different generations can be reduced, help to improve the easy degree of unique mark.
Optionally, in a kind of specific implementation, the management server 210 determines that each data server 220 exists Label in the unique mark generation system, specially:Obtain each data server 220 in the unique mark generation system Device identification;Each device identification is sorted according to preset rules;According to ranking results, each data server 220 is determined Label, wherein, the arrangement serial number marked as corresponding device identification in ranking results of each data server 220.It is above-mentioned Preset rules can be acquisition sequence of above equipment mark etc..For the determination process of above-mentioned label, citing below carries out detailed It is thin to illustrate.
Assuming that above system includes 4 data servers, device identification is respectively:A、B、C、D;It will be upper according to reception sequence Device identification is stated to be ranked up to obtain:A、B、C、D;According to ranking results it is found that the row in ranking results of data server A Row serial number 1, the arrangement serial number 2 in ranking results of data server B, data server C in ranking results Arrange serial number 3, the arrangement serial number 4 in ranking results of data server D, then the mark of data server A, B, C, D Number be respectively 1,2,3,4.
Optionally, in a kind of specific implementation, the management server 210 is based on preset least unit and described Label determines each 220 corresponding initial value step-length of data server, specially:According to formula Pi=(ni- 1) * a determine each 220 corresponding initial value step-length of data server, wherein, PiFor the corresponding initial value step-lengths of data server i, niFor data server i Corresponding label, a are the default least unit.Assuming that default least unit is 1, the label point of data server A, B, C, D It Wei 1,2,3,4, then, the initial value step-length point of data server A, B, C, D in the above-mentioned example according to determined by above-mentioned formula It is not:0、1、2、3.
Optionally, in a kind of specific implementation, the management server 210 is corresponded to each data server 220 Initial value step-length for adjustment amount, adjust preset unique corresponding first initial value with unique mark generation system respectively, obtain To the corresponding initial unique mark of each data server 220, specially:
According to formula Ai=A0+Pi, determine the corresponding initial unique mark of each data server 220, wherein, AiFor number According to the corresponding initial unique marks of server i220, A0To be preset system unique corresponding first is generated with the unique mark Initial value, PiFor the corresponding initial value step-lengths of data server i220.Assuming that above-mentioned first initial value is 1, data server A, B, C, D's Initial value step-length is respectively:0th, 1,2,3, then the initial unique mark of data server A determined according to above formula is 1+0=1, number According to the initial unique mark of server B for 1+1=2, and so on the initial unique mark of data server C, D be respectively:3、 4。
Optionally, in a kind of specific implementation, the management server 210 is corresponded to each data server 220 Initial value step-length for adjustment amount, adjust preset unique corresponding first initial value with unique mark generation system respectively, obtain To the corresponding initial unique mark of each data server 220, specially:
According to formula Ai=A0-Pi, determine the corresponding initial unique mark of each data server 220, wherein, AiFor number According to the corresponding initial unique marks of server i220, A0To be preset system unique corresponding first is generated with the unique mark Initial value, PiFor the corresponding initial value step-lengths of data server i220.Assuming that above-mentioned first initial value is 1, data server A, B, C, D's Initial value step-length is respectively:0th, 1,2,3, then initial unique mark of data server A according to determined by the formula of this paragragh Know for 1-0=1, and so on the initial unique mark of data server B, C, D be respectively:0、-1、-2.
Optionally, in a kind of specific implementation, the data server 220 is unique according to the last generation Mark and the target step stored, generate the corresponding unique mark of the target object, specially:By last time generation only One mark and the target step numerical value after being added stored, are determined as the corresponding unique mark of the target object.
Optionally, in a kind of specific implementation, the data server 220 is unique according to the last generation Mark and the target step stored, generate the corresponding unique mark of the target object, specially:By last time generation only One identifies the numerical value after subtracting each other with the target step stored, is determined as the corresponding unique mark of the target object.
Unique mark to introduce the embodiment of the present invention in further detail generates system, is done below with a kind of optional embodiment It is further described.Assuming that the data server quantity of this system is 3, respectively data server A, data server B, number According to server C, it is according to ranking results determined by the sequence for receiving above-mentioned data server:A, B, C, data server A rows First, therefore the label n of data server A1=1;Data server B comes second, the label n of data server B2=2; Data server C comes third, the label n of data server C3=3;Default least unit is a=1, and it is A to preset the first initial value0 =1, target step is 1 times of data server quantity, i.e., target step is 3.
So, according to formula Pi=(ni- 1) the initial value step-length for the data server A that * a are calculated is P1=0, data service The initial value step-length of device B is P2=1, the initial value step-length of data server C is P3=2, further according to formula Ai=A0+Pi, counted Initial unique mark according to server A is A1=1, the initial unique mark of data server B is A2=2, data server C Initial unique mark is A3=3.So data server A, B, C is respectively initial value with 1,2,3, generates unique mark.
The initial unique mark that data server A is stored is 1, target step 3.When data server A is received for the first time When generating instruction to the mark for target object, initial unique mark 1 is determined as unique mark;It is received when its 2nd time Above-metioned instruction by the unique mark 1 of last time generation and 3 numerical value 4 after being added of target step stored, is determined as the mesh Mark the corresponding unique mark of object;Above-metioned instruction is received when its 3rd time, by the unique mark 4 of last time generation with being stored 3 numerical value 7 after being added of target step, be determined as the corresponding unique mark of the target object.It is reciprocal with this, it is more when receiving During secondary above-metioned instruction, the unique mark of data server A generations includes:1、4、7、10、13......
Ibid principle, the unique mark of data server B generations include:2、5、8、11、14......
Ibid principle, the unique mark of data server C generations include:3、6、9、12、15......
As it can be seen that the scheme that this specific embodiment is provided, can realize in the unique mark for ensureing different server generation It is unduplicated simultaneously, reduce the occupancy to Internet resources.
As shown in figure 3, the embodiment of the present invention additionally provides a kind of unique mark generating means, generated applied to unique mark Data server in system, the system comprises management server and at least two data servers, each data server Prestore initial unique mark that the management server is generated and issued, corresponding with data server itself and target step It is long, wherein, the initial unique mark of each data server is different but target step is identical, the target step for it is described at least The default integral multiple of the total quantity of two data servers, the difference of the initial unique mark of arbitrary two data servers is not institute The integral multiple of total quantity is stated, described device includes:
Receiving module 310, for receiving the mark generation instruction for being directed to target object;
Judgment module 320, for determining whether to receive mark generation instruction for the first time, when judging result is when being, touches Send out the first computing module 330;When judging result is no, the second computing module 340 is triggered;
First computing module 330, for the initial unique mark stored is corresponding as the target object Unique mark;
Second computing module 340, for determining the unique mark of last generation, and according to the last generation Unique mark and the target step that is stored, generate the corresponding unique mark of the target object.
A kind of unique mark generating means provided in an embodiment of the present invention, for each data service of responsible generation mark Device, when receiving the mark generation instruction for target object for the first time, using pre-stored initial unique mark as institute Generation mark, when it is non-receive the generation instruction of above-mentioned mark for the first time when, unique mark based on last time generation and deposit in advance The target step generation unique mark of storage, in the embodiment of the present invention, the difference of the initial unique mark of arbitrary two data servers It is not the integral multiple of the total quantity of data server in above system, the default integer that above-mentioned target step is above-mentioned total quantity Times, and each data server only need to generate unique mark according to pre-stored data, ensure different numbers therefore, it is possible to realize The unique mark generated according to server is unduplicated simultaneously, reduces the occupancy to Internet resources.
Optionally, in a kind of specific implementation, second computing module 340 is specifically used for:
By the last time, the unique mark of generation is added with the target step, be will add up result and is determined as the target object Corresponding unique mark.
Optionally, in a kind of specific implementation, second computing module 340 is specifically used for:
By the last time, the unique mark of generation is subtracted each other with the target step, will be subtracted each other result and is determined as the target object Corresponding unique mark.
It should be noted that herein, relational terms such as first and second and the like are used merely to a reality Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation In any this practical relationship or sequence.Moreover, term " comprising ", "comprising" or its any other variant are intended to Non-exclusive inclusion, so that process, method, article or equipment including a series of elements not only will including those Element, but also including other elements that are not explicitly listed or further include as this process, method, article or equipment Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that Also there are other identical elements in process, method, article or equipment including the element.
Each embodiment in this specification is described using relevant mode, identical similar portion between each embodiment Point just to refer each other, and the highlights of each of the examples are difference from other examples.Especially for device reality For applying example, since it is substantially similar to embodiment of the method, so description is fairly simple, related part is referring to embodiment of the method Part explanation.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all Any modification, equivalent replacement, improvement and so within the spirit and principles in the present invention, are all contained in protection scope of the present invention It is interior.

Claims (12)

1. a kind of unique mark generation method, which is characterized in that applied to the data server in unique mark generation system, institute It states system and prestores the management server including management server and at least two data servers, each data server Initial unique mark generating and issue, corresponding with data server itself and target step, wherein, each data server Initial unique mark it is different but target step is identical, the target step is the total quantity of at least two data servers Default integral multiple, the difference of the initial unique mark of arbitrary two data servers is not the integral multiple of the total quantity, described Method includes:
Receive the mark generation instruction for being directed to target object;
Determine whether to receive mark generation instruction for the first time;
When judging result is to be, using the initial unique mark stored as the corresponding unique mark of the target object;When When judging result is no, the unique mark of last generation is determined, and according to the last unique mark generated and deposited The target step of storage generates the corresponding unique mark of the target object.
2. the according to the method described in claim 1, it is characterized in that, unique mark and institute according to the last generation The target step of storage, the step of generating the target object corresponding unique mark, including:
By the last time, the unique mark of generation is added with the target step, be will add up result and is determined as the target object correspondence Unique mark.
3. the according to the method described in claim 1, it is characterized in that, unique mark and institute according to the last generation The target step of storage, the step of generating the target object corresponding unique mark, including:
By the last time, the unique mark of generation is subtracted each other with the target step, will be subtracted each other result and is determined as the target object correspondence Unique mark.
4. a kind of unique mark generates system, which is characterized in that including:Management server and at least two data servers;
The management server is used for:It determines the total quantity of at least two data servers, the total quantity will be belonged to The numerical value of default integral multiple is determined as target step;The corresponding initial unique mark of each data server is generated, wherein, each The initial unique mark of data server is different and the difference of the initial unique mark of arbitrary two data servers is not described The integral multiple of total quantity;And send corresponding initial unique mark and the target step to each data server;
The data server is used for:Receive and store initial unique mark and target step that the management server issues; Also, when receiving the mark for being directed to target object generation instruction, determine whether to receive mark generation instruction for the first time;When Judging result is when being, using the initial unique mark stored as the corresponding unique mark of the target object;When judgement is tied When fruit is no, the unique mark of last generation is determined, and according to the last unique mark generated and the mesh stored Step-length is marked, generates the corresponding unique mark of the target object.
5. system according to claim 4, which is characterized in that the management server generates each data server and corresponds to Initial unique mark, specially:
Determine label of each data server in the unique mark generation system;
Based on preset least unit and the label, the corresponding initial value step-length of each data server is determined;
Using the corresponding initial value step-length of each data server as adjustment amount, adjusting preset generated with the unique mark respectively is Unique corresponding first initial value of system, obtains the corresponding initial unique mark of each data server.
6. system according to claim 5, which is characterized in that the management server determines each data server in institute The label in unique mark generation system is stated, specially:
Obtain the device identification of each data server in the unique mark generation system;
Each device identification is sorted according to preset rules;
According to ranking results, the label of each data server is determined, wherein, each data server is set marked as corresponding Arrangement serial number of the standby mark in ranking results.
7. system according to claim 5 or 6, which is characterized in that the management server is based on preset least unit With the label, the corresponding initial value step-length of each data server is determined, specially:
According to formula Pi=(ni- 1) * a determine the corresponding initial value step-length of each data server, wherein, PiFor data server i Corresponding initial value step-length, niFor the corresponding labels of data server i, a is the default least unit.
8. system according to claim 5, which is characterized in that the management server is corresponding with each data server Initial value step-length is adjustment amount, adjusts the preset generation system with the unique mark uniquely corresponding first initial value respectively, obtains The corresponding initial unique mark of each data server, specially:
According to formula Ai=A0+Pi, determine the corresponding initial unique mark of each data server, wherein, AiFor data server i Corresponding initial unique mark, A0To be preset unique corresponding first initial value of system, P are generated with the unique markiFor data The corresponding initial value step-lengths of server i.
9. system according to claim 8, which is characterized in that the data server generates only according to the last time One mark and the target step stored, generate the corresponding unique mark of the target object, specially:
By the unique mark of last time generation and the target step numerical value after being added stored, it is determined as the target object pair The unique mark answered.
10. system according to claim 5, which is characterized in that the management server is corresponded to each data server Initial value step-length for adjustment amount, adjust preset unique corresponding first initial value with unique mark generation system respectively, obtain To the corresponding initial unique mark of each data server, specially:
According to formula Ai=A0-Pi, determine the corresponding initial unique mark of each data server, wherein, AiFor data server i Corresponding initial unique mark, A0To be preset unique corresponding first initial value of system, P are generated with the unique markiFor data The corresponding initial value step-lengths of server i.
11. the system according to claim 8 or 10, which is characterized in that the data server is according to described last raw Into unique mark and the target step that is stored, generate the corresponding unique mark of the target object, specially:
Numerical value after the unique mark of last time generation and the target step stored are subtracted each other, is determined as the target object pair The unique mark answered.
12. a kind of unique mark generating means, which is characterized in that applied to the data server in unique mark generation system, The system comprises management server and at least two data servers, each data server prestore the management service Initial unique mark that device is generated and issued, corresponding with data server itself and target step, wherein, each data service The initial unique mark of device is different but target step is identical, and the target step is the sum of at least two data servers The default integral multiple of amount, the difference of the initial unique mark of arbitrary two data servers is not the integral multiple of the total quantity, institute Device is stated to include:
Receiving module, for receiving the mark generation instruction for being directed to target object;
Judgment module, for determining whether to receive mark generation instruction for the first time, when judging result is when being, triggers the first meter Calculate module;When judging result is no, the second computing module is triggered;
First computing module, for using the initial unique mark stored as the corresponding unique mark of the target object Know;
Second computing module, for determining the unique mark of last generation, and according to the unique of the last generation Mark and the target step stored, generate the corresponding unique mark of the target object.
CN201611199510.1A 2016-12-22 2016-12-22 Unique identifier generation method, device and system Active CN108234580B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611199510.1A CN108234580B (en) 2016-12-22 2016-12-22 Unique identifier generation method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611199510.1A CN108234580B (en) 2016-12-22 2016-12-22 Unique identifier generation method, device and system

Publications (2)

Publication Number Publication Date
CN108234580A true CN108234580A (en) 2018-06-29
CN108234580B CN108234580B (en) 2021-08-20

Family

ID=62656224

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611199510.1A Active CN108234580B (en) 2016-12-22 2016-12-22 Unique identifier generation method, device and system

Country Status (1)

Country Link
CN (1) CN108234580B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111985187A (en) * 2020-08-31 2020-11-24 卫宁健康科技集团股份有限公司 Distributed ID acquisition method, device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102769667A (en) * 2012-06-29 2012-11-07 北京奇虎科技有限公司 Method, equipment and system for generating ID
US20130333051A1 (en) * 2011-03-04 2013-12-12 Nec Corporation Random value identification device, random value identification system, and random value identification method
CN105447023A (en) * 2014-08-25 2016-03-30 阿里巴巴集团控股有限公司 Service identifier generation method and apparatus

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130333051A1 (en) * 2011-03-04 2013-12-12 Nec Corporation Random value identification device, random value identification system, and random value identification method
CN102769667A (en) * 2012-06-29 2012-11-07 北京奇虎科技有限公司 Method, equipment and system for generating ID
CN105447023A (en) * 2014-08-25 2016-03-30 阿里巴巴集团控股有限公司 Service identifier generation method and apparatus

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111985187A (en) * 2020-08-31 2020-11-24 卫宁健康科技集团股份有限公司 Distributed ID acquisition method, device, electronic equipment and storage medium
CN111985187B (en) * 2020-08-31 2021-06-08 卫宁健康科技集团股份有限公司 Distributed ID acquisition method, device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN108234580B (en) 2021-08-20

Similar Documents

Publication Publication Date Title
CN108427956B (en) A kind of clustering objects method and apparatus
CN104636437B (en) A kind of processing method and processing device of event notification method, monitor
CN106878193A (en) A kind of load sharing method and device
CN105049246B (en) A kind of group user management service method and system
CN105915369A (en) Configuration information management method and configuration information management device
CN109889550A (en) A kind of ddos attack determines method and device
CN106874076A (en) Distributed transaction processing method
CN110808839B (en) Processing method, device, equipment and medium for block chain abnormal data
CN105912612A (en) Distributed file system and data equilibrium distribution method orienting same
CN109558446A (en) Job request method, apparatus, electronic equipment and storage medium
CN109614403A (en) The data consistency verification method and device of cluster service node
CN108512914A (en) A kind of traffic ID generation method and device
CN105847893A (en) Method, device and system for advertisement delivery
CN107659948A (en) A kind of method and device of control AP accesses
CN104702703B (en) A kind of data-updating method and device
CN108234580A (en) A kind of unique mark generation method, apparatus and system
CN105354249B (en) More account relating method, apparatus and electronic equipment
CN104184603B (en) A kind of User Status statistical method, apparatus and system
CN103995901A (en) Method for determining data node failure
CN106533622A (en) Data frame data field verifying method and apparatus based on CAN FD bus
CN109302300A (en) Data distributing method and device, data processing method and server
CN106664232A (en) Control device
CN107294922A (en) A kind of network address dispatching method and device for tackling network attack
CN109981795A (en) Resource request dispatching method and device
CN106169979A (en) A kind of method for processing business and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant