Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Identification number generation method and device, computer equipment and storage medium

An identification number and identification technology, applied in the protection of internal/peripheral computer components, electrical digital data processing, instruments, etc., can solve the problems of repetition, server time rollback, etc., to ensure non-repetition and solve the problem of repeated identification numbers Effect

Active Publication Date: 2020-06-16
望海康信(北京)科技股份公司
View PDF13 Cites 9 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Due to the inconsistency of the machine time, the time of each server needs to be synchronized, which may cause the server time to roll back
If some IDs happen to be generated before the rollback, and after the time rolls back, the generated IDs may be duplicated

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

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0065] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention.

[0066] In some processes described in the specification and claims of the present invention and the above-mentioned drawings, a plurality of operations appearing in a specific order are contained, but it should be clearly understood that these operations may not be performed in the order in which they appear herein Execution or parallel execution, the serial numbers of the operations, such as 101, 102, etc., are only used to distinguish different operations, and the serial numbers themselves do not represent any execution order. Additionally, these processes can include more or fewer operations, and these operations can be performed sequentially or in parallel. It should be n...

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 embodiment of the invention discloses an identification number generation method and device, computer equipment and a storage medium, and the method comprises the following steps: obtaining historical queue information which is used for recording a timestamp code and a sequence code of a generated identification number; determining whether a preset first identification number meets a preset repetition condition according to the historical queue information, the first identification number being an identification number generated by time callback; and when the first identification number meets the repetition condition, generating a second identification number according to the historical queue information. A used timestamp and a used sequence code are recorded by setting historical queue information; whether the identification number is repeated or not is determined according to the historical queue when the identification number is generated by time callback, and when the identification number is repeated, the new identification number is generated by using the sequence code which is not used before according to the historical queue information, so that the generated identification number is effectively ensured not to be repeated.

Description

technical field [0001] The present invention relates to the field of computer application technology, in particular to a method, device, computer equipment and storage medium for generating an identification number. Background technique [0002] In a distributed system, it is often necessary to define corresponding data using a globally unique ID (GUID). In order to meet Twitter’s request for tens of thousands of messages per second, each message must be assigned a unique ID, and these IDs also need some approximate order (to facilitate client sorting), and the IDs generated by different machines in a distributed system must be Different, in this regard, Twitter has developed a snowflake ID generation scheme. The core idea is: generate a long ID, use 41 bits (bit) as the timestamp (unit: milliseconds), 10 bits as the machine number, and 12 bits as the serial code . Except that the highest bit (bit) is marked as unavailable, the other three groups of bit occupants can be fl...

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): G06F21/73
CPCG06F21/73G06F2221/2151
Inventor 史先澳娄景军
Owner 望海康信(北京)科技股份公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products