Unlock instant, AI-driven research and patent intelligence for your innovation.

Distributed unique ID generation method

A distributed and unique technology, applied in the field of data processing, can solve problems such as cumbersome steps and waste of computer resources, and achieve the effect of increasing randomness and preventing duplicate IDs

Inactive Publication Date: 2017-04-19
东莞市大易产业链服务有限公司
View PDF4 Cites 5 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0002] Each server has a unique ID. In order to distinguish each different server, just like people's ID cards, it is necessary to generate different IDs to distinguish different servers. However, the current ID generation method has cumbersome steps and wastes computers. resources; and traditional ID generation methods are prone to generate two identical IDs

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Distributed unique ID generation method
  • Distributed unique ID generation method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0026] The present invention is further described in conjunction with the following examples.

[0027] Depend on figure 1 It can be seen that a distributed unique ID generation method described in this embodiment includes the following steps: S1: Set the total number of digits of the distributed unique ID, divide the distributed unique ID into several intervals; set each The number of digits in each interval; the distributed unique ID is formed by splicing all intervals; by dividing a multi-digit ID into multiple intervals, different methods are used to obtain the number strings of each interval, which can increase the number of acquisitions The randomness of the number string, and compared with the traditional ID generation method, which requires each byte to be generated one by one, the present invention can simplify the generation steps, and further prevent duplicate IDs due to the adoption of different generation methods.

[0028] S2: Obtain the node name of the server, u...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a distributed unique ID generation method comprising the following steps that S1: the total digits of a distributed unique ID are set, and the distributed unique ID is divided into multiple intervals; S2: the node name of a server is acquired, the node name is converted into a numeric string of the hexadecimal system by using a md5 encryption method, and one segment of the numeric string is taken as one interval of the distributed unique ID; S3: the current server time is acquired, and the current time is converted into the hexadecimal system to act as one interval of the distributed unique ID; S4: a four-digit random number is acquired from 0000-ffff of the hexadecimal system to act as one interval of the distributed unique ID; and S5: the intervals acquired from the steps S2-S4 are spliced to acquire one distributed unique ID. The multi-digit ID is divided into multiple intervals, and the numeric string of each interval is acquired by using different generation methods so as to effectively prevent the repeated ID.

Description

technical field [0001] The invention relates to the technical field of data processing, in particular to a method for generating a distributed unique ID. Background technique [0002] Each server has a unique ID. In order to distinguish each different server, just like people's ID cards, it is necessary to generate different IDs to distinguish different servers. However, the current ID generation method has cumbersome steps and wastes computers. resources; and traditional ID generation methods are prone to generate two identical IDs. Contents of the invention [0003] The object of the present invention is to provide a method for generating a distributed unique ID to address the above-mentioned deficiencies in the prior art. [0004] The object of the present invention is achieved through the following technical solutions: a distributed unique ID generation method, comprising the following steps: [0005] S1: Set the total number of digits of the distributed unique ID,...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): H04L12/24
CPCH04L41/00H04L41/08H04L41/0806
Inventor 阳建李实彭添才杨彪占海华
Owner 东莞市大易产业链服务有限公司