Method and apparatus for generating global unique ID

A generation device and unique technology, applied in the computer field, can solve problems such as excessive external resources, inability to operate business, and non-reversible global unique ID, achieving high performance and guaranteed availability

Inactive Publication Date: 2019-02-05
BEIJING JINGDONG SHANGKE INFORMATION TECH CO LTD +1
View PDF6 Cites 5 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] In the process of realizing the present invention, the inventors have found that there are at least the following problems in the snowflake method based on bit operations in the prior art: 1. This method relies too much on external resources: it needs to deploy data center servers separately, relying on zookeeper (a distributed , Open sou

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
  • Method and apparatus for generating global unique ID
  • Method and apparatus for generating global unique ID
  • Method and apparatus for generating global unique ID

Examples

Experimental program
Comparison scheme
Effect test

Example Embodiment

[0037] The following describes exemplary embodiments of the present invention with reference to the accompanying drawings, which include various details of the embodiments of the present invention to facilitate understanding, and should be regarded as merely exemplary. Therefore, those of ordinary skill in the art should realize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present invention. Likewise, for clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0038] In the prior art, the use of a snowflake method based on bit operations to generate a global unique ID relies too much on external resources, and the generated global unique ID does not have fragmentation information, and related business operations cannot be directly performed based on the ID. According to the technical solution of the present invention, by usi...

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 method and apparatus for generating a global unique ID, and relates to the technical field of computers. A specific implementation manner of the method comprises the following steps: presetting a generation format of the global unique ID, wherein the generation format of the global unique ID comprises a timestamp difference and an application server unique identifier; configuring a corresponding reference timestamp and an application server unique identification value according to application server information for generating the global unique ID; and obtaining a request timestamp of a global unique ID generation request according to the received global unique ID generation request, performing difference value calculation on the request timestamp and the referencetimestamp to generate a timestamp difference value, and then generating the global unique ID according to the generation format of the global unique ID. By adoption of the embodiment, the global unique ID can be generated by using an application server, the technical problem of relying on additional resources to generate the ID is overcome, an effect of sharing an ID generation server and the application server is achieved, and the performance is relatively high.

Description

technical field [0001] The present invention relates to the field of computer technology, in particular to a method and device for generating a globally unique ID. Background technique [0002] In a high-concurrency distributed system, there is usually a globally unique requirement for messages and data, and each data or information needs to be identified with a globally unique ID. In addition, in addition to the uniqueness requirements of the global unique ID, there are usually some requirements such as the global ID has a certain chronological order, the high performance of the ID generation, and the high availability of the ID generation. [0003] At present, methods for generating globally unique IDs are mainly divided into: methods for generating globally unique IDs based on database characteristics, UUID algorithms, and methods for generating globally unique IDs based on bit operations. Since the method of generating a globally unique ID based on the characteristics 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
IPC IPC(8): H04L29/12
CPCH04L61/3025
Inventor 安宁
Owner BEIJING JINGDONG SHANGKE INFORMATION 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