Supercharge Your Innovation With Domain-Expert AI Agents!

Distributed system globally unique id generation method, device, equipment and medium

A distributed system and global technology, applied in the computer field, can solve problems such as inflexibility, difficulty in meeting business needs, time stamp rollback, etc., and achieve the effect of solving ID duplication

Active Publication Date: 2021-10-26
HANGZHOU MOREDIAN TECH CO LTD
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

In order to generate a globally unique ID, the snowflake algorithm is usually used. However, the snowflake algorithm not only fixes the number of digits of the globally unique ID, but is not flexible enough to meet complex business requirements. Moreover, in reality, it is easy to cause time delays due to system time synchronization. Stamp rollback, which leads to the problem of duplication of generated IDs, for which no effective solution has been proposed in related technologies

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 system globally unique id generation method, device, equipment and medium
  • Distributed system globally unique id generation method, device, equipment and medium
  • Distributed system globally unique id generation method, device, equipment and medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0022] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be described and illustrated below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present application, and are not intended to limit the present application. Based on the embodiments provided in the present application, all other embodiments obtained by persons of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application. In addition, it can also be understood that although such development efforts may be complex and lengthy, for those of ordinary skill in the art relevant to the content disclosed in this application, the technology disclosed in this application Some design, manufacturing or production changes based on the content are just conventional technical means, and...

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

This application discloses a method, device, device and storage medium for generating a globally unique ID in a distributed system, which belongs to the field of computers. The method includes: according to the number of occupied digits at a time point, the occupied digits of a group ID, the occupied digits of a node ID in a group, and the sequence The format information of the globally unique ID is obtained from the digits occupied by the self-increment of the number, where the value of the time point is obtained by shifting the current millisecond timestamp to the right; when a request for generating a globally unique ID is received, the currently used time point and the current system Compare the time points, and update the current time point to a larger time point, where the request carries the information of the ID field and the number of generated globally unique IDs; for the ID field, the serial number is automatically incremented according to the number; The serial number is incremented from the value, the current time point, the preset group ID and the node ID in the group according to the format information to generate a globally unique ID. According to the embodiment of the present application, the problem of duplicate generated IDs can be effectively solved.

Description

technical field [0001] The present application relates to the field of computer technology, in particular to a method, device, device and storage medium for generating a globally unique ID in a distributed system. Background technique [0002] In the computer operating environment, the business requirement of generating a unique record identifier is particularly important. As far as the globally unique ID is concerned, it is just needed by almost all systems. The globally unique ID plays an important role in many aspects such as data search, storage, and retrieval speed. significance. In order to generate a globally unique ID, the snowflake algorithm is usually used. However, the snowflake algorithm not only fixes the number of digits of the globally unique ID, but is not flexible enough to meet complex business requirements. Moreover, in reality, it is easy to cause time delays due to system time synchronization. Stamp rollback, resulting in the problem of duplicate genera...

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
Patent Type & Authority Patents(China)
IPC IPC(8): G06F16/22
CPCG06F16/2291
Inventor 熊超
Owner HANGZHOU MOREDIAN TECH CO LTD
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More