Distributed node ID generation method and device, equipment and storage medium

A distributed node and memory technology, applied in the field of distributed systems, can solve problems such as ID collisions and abnormal operation of distributed clusters

Active Publication Date: 2021-11-26
HUNAN NEW CLOUDNET TECH CO LTD
View PDF9 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

When using the snowflake algorithm to generate a globally unique ID, it is necessary to add the ID of the working machine, and the ID of the working machine needs to be manually configured. Once there is a mistake in the process of manually configuring the ID of the working machine, it may lead to the problem of ID collision, which will lead to distribution An abnormality occurs in the operation of the cluster

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

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0040] In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments It is only a part of the embodiments of the present application, but not all the embodiments. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the scope of protection of this application.

[0041] Please refer to figure 1 , figure 1 It is a flow chart of a method for generating a distributed node ID provided in the embodiment of this application. The method includes:

[0042] S101: If it is detected that the service is started, determine the first length corresponding to the machine ID and the second length cor...

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 node ID generation method and device, electronic equipment and a computer readable storage medium, and the method comprises the steps: determining a first length corresponding to a machine ID and a second length corresponding to a machine room ID if detecting that a service is started; communicating with the data pool through the central stack to obtain a target ID cardinal number provided by the data pool, wherein the target ID cardinal number is a unique ID cardinal number; generating a machine ID and a machine room ID by using the target ID cardinal number, the first length and the second length; using the machine ID and the machine room ID to generate a distributed node ID corresponding to the service; according to the method, the machine ID and the machine room ID are automatically generated, manual configuration is not needed, the target ID cardinal number for generating the machine ID and the machine room ID is the unique ID cardinal number, the nodes are different, and the first length and the second length of each node are the same, so that the generated distributed node IDs are inevitably different, and the problem of ID collision does not occur.

Description

technical field [0001] The present application relates to the technical field of distributed systems, and in particular to a method for generating a distributed node ID, a device for generating a distributed node ID, electronic equipment, and a computer-readable storage medium. Background technique [0002] In a distributed environment, each node needs to have a globally unique ID (Identity document) in order to use it to represent its own identity, for example, the snowflake algorithm is used to generate a globally unique ID. When using the snowflake algorithm to generate a globally unique ID, it is necessary to add the ID of the working machine, and the ID of the working machine needs to be manually configured. Once there is a mistake in the process of manually configuring the ID of the working machine, it may lead to the problem of ID collision, which will lead to distribution An exception occurs when the cluster is running. Contents of the invention [0003] In view o...

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 Applications(China)
IPC IPC(8): H04L12/24
CPCH04L41/0806
Inventor 李政军陈娅芳
Owner HUNAN NEW CLOUDNET TECH CO LTD
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