Identifier generation method and device, equipment and storage medium

A technology of identification and generator, applied in the computer field, can solve problems such as inability to guarantee uniqueness, low reliability, and repeated IDs

Pending Publication Date: 2020-11-10
深圳市腾讯网域计算机网络有限公司
View PDF0 Cites 9 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] When the clock is dialed back, the cumulative number of milliseconds and the self-increment sequence in the ID generated by the snowflake algorithm

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
  • Identifier generation method and device, equipment and storage medium
  • Identifier generation method and device, equipment and storage medium
  • Identifier generation method and device, equipment and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0051] In order to make the purpose, technical solution and advantages of the present application clearer, the implementation manners of the present application will be further described in detail below in conjunction with the accompanying drawings.

[0052] figure 1 It is a schematic structural diagram of a logo generation system provided by an exemplary embodiment of the present application. Such as figure 1 As shown, the logo generation system 100 includes a terminal 101 and servers 102a-102d (collectively referred to as servers 102). Servers 102a-102d form a distributed system for generating IDs (also called identifications). figure 1 The number of servers in the example is only for illustration, and is not intended to limit the identification generation system provided in this embodiment of the application.

[0053]Optionally, the server 102 is a server, or a server cluster composed of several servers, or a virtual server in a cloud computing service center, etc., whic...

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 an identifier generation method and device, equipment and a storage medium, and belongs to the technical field of computers. The method comprises the steps of obtaining a current timestamp in response to an identifier generation request; and determining a target identifier generator from the at least two identifier generators according to the time sequence relationship between the historical timestamp for generating the previous identifier and the current timestamp; based on the target identifier generator, generating an identifier according to the current timestamp, the generator serial number, the equipment identifier and the self-increasing serial number; when a clock callback condition occurs, enabling a identifier generation process to switch the target identifier generator for generating IDs until a clock returns to normal. The generator serial number is the serial number of the target identifier generator in the at least two identifier generators, and theserial numbers of the identifier generators are different. Uniqueness of the generated ID when the target identifier generator is switched is ensured. Reliability of ID generation is improved.

Description

technical field [0001] The present application relates to the field of computer technology, and in particular to a logo generation method, device, equipment and storage medium. Background technique [0002] Most of today's network services need to use ID (Identity document) to identify various data objects. For example, the account number of the user, the order number of online shopping, and the role number of online games. ID refers to a unique number or string. When a computer device generates an ID, it needs to ensure the uniqueness of the ID. [0003] Currently, computer devices generally use a snowflake algorithm to generate IDs. The ID generated by the snowflake algorithm has a length of 64 bits (binary digit, bit). Among them, the highest bit is always 0, indicating a positive integer; the next 41 bits indicate the cumulative number of milliseconds from the time when the ID is generated to the target time; the next 10 bits indicate the serial number of the device ...

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): H04L29/12G06F16/23
CPCH04L61/3015G06F16/2322
Inventor 谢亚晋
Owner 深圳市腾讯网域计算机网络有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products