Global unique distributed ID generation method

A distributed and unique technology, applied in the field of data processing, can solve problems such as unsatisfactory business, no deep integration, manual assignment, etc., to save storage space, improve performance, and solve the effect of ID duplication

Pending Publication Date: 2022-03-01
中企云链(北京)金融信息服务有限公司
View PDF6 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, when generating embedded IDs in a distributed system environment, if you do not rely on the central service, there will be situations where duplicate IDs will be generated. When assigning table IDs, you need to manually assign values, without deep integration, and at the same time lack necessary APIs, such as reverse Interpretation, translation time, etc., cannot meet business needs

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

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0022] The technical solution of the content of the present invention will be further described in detail below. Apparently, the described embodiments are only some of the embodiments of the present invention, rather than all of them. All other embodiments obtained by those skilled in the art without creative efforts are protected by the present invention. scope.

[0023] It should be understood that although the terms first, second, third etc. may be used herein to describe various elements, components and / or sections, these elements, components and / or sections should not be limited by these terms.

[0024] A globally unique distributed ID generation method, including:

[0025] Pre-configure the embedded publishing mode to obtain the local IP when the service instance starts;

[0026] Generate an instance list file locally to register the service instance, and return a machine serial number after registration;

[0027] performing a bit operation on the IP and the machine s...

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 globally unique distributed ID (Identity) generation method, which comprises the following steps of: pre-configuring an embedded publishing mode, and acquiring a local IP (Internet Protocol) when a service instance is started; an instance list file is generated in a local machine, and a machine serial number is returned after service instances are registered; performing bit operation on the IP and the machine serial number to obtain a globally unique machine bit; the method comprises the following steps: defining displacement digit information of each item and a maximum limit sequence of the digit when an ID is generated through idMeta, performing rightward digit operation on the generated ID, and performing AND operation on the generated ID and the maximum limit sequence of the digit to obtain a numerical value of the ID when the ID is generated; and performing leftward operation on the machine bit and the version number, the time type, the current time and the current machine serial number defined by the IdMeta to obtain a unique distributed ID. According to the method disclosed by the invention, the global uniqueness ID can be generated without relying on a central service during embedded use, the problem of ID repetition is solved, the storage space is saved, the performance is improved, and the requirement when the business growth speed is relatively high is met.

Description

technical field [0001] The content of the present invention relates to the technical field of data processing, in particular to a globally unique distributed ID generation method. Background technique [0002] As the information system becomes more and more complex, the system needs more and more services and middleware. It is necessary to uniquely identify a large amount of data and messages. When the amount of business data is not large, business can be generated in various ways. ID is mainly realized by auto-incrementing ID. The ID of the current business system uses the self-incrementing field of the database completely dependent on the database. However, in a large complex system, orders, products, and after-sales may be divided into databases and tables, and will be distributed in multiple tables and multiple databases, resulting in a large number of Duplicate IDs make business problematic. That is, for large-scale complex business and distributed high-concurrency ap...

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): G06F9/445G06F17/10
CPCG06F9/44505G06F17/10
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