Serial number generation method and system

A technology for generating system and serial numbers, which is applied in the field of distributed systems, can solve problems such as business impact, difficulty in fully synchronizing time, duplication of serial numbers, etc., to achieve the effects of ensuring uniqueness, facilitating anti-solution, and solving time asynchrony

Active Publication Date: 2019-12-27
BEIJING MININGLAMP SOFTWARE SYST CO LTD
View PDF5 Cites 6 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

At present, a better way is to use the distributed system to generate the serial number, but in the prior art, when the distributed system is used to generate the serial number, due to the fluctuation of the clock oscillation frequency of the central processing unit (Central Processing Unit, CPU) of each service node Differences, the time between different service nodes is difficult to fully synchronize, resulting in the possibility of duplication of generated serial numbers, which has a serious impact on business
Moreover, the generated serial number lacks business information and is not easy to understand

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
  • Serial number generation method and system
  • Serial number generation method and system
  • Serial number generation method and system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0046] The inventors have found through research that the currently commonly used serial number generation methods mainly include the following:

[0047] One is to use the feature of Mysql database auto-increment ID, through field auto-increment and setting step size, use N service nodes to set up N instances (N tables with auto-increment ID fields) to achieve unique flow number effect. However, in this way, the service nodes are fixed and the step size is fixed, it is difficult to expand the service nodes, and it has a strong dependence on the database, and it also puts additional pressure on the database. In addition, the serial number generated by self-incrementing ID in this way has no business meaning, and it is impossible to use this serial number to reverse the business meaning, such as business type, creation time, etc.

[0048] The other is to use UUID (Universally Unique Identifier), that is, combine the network card of the machine, local time, a random number and o...

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 provides a serial number generation method and system, and the method comprises the steps: responding to a serial number generation request through gateway equipment, obtaining a business code, and generating a timestamp according to the system time when the serial number generation request is received; and enabling the service node to obtain the serial number of the serial number generation request under the timestamp, and generate the serial number corresponding to the serial number generation request according to the service code, the timestamp, the pre-generated node code and the serial number. In this way, the generation of the timestamp is carried out in advance to the gateway equipment, the gateway equipment uniformly generates the timestamp, and eachservice node generates the serial number based on the timestamp generated by the gateway equipment, so that the uniqueness of the time information source of each serial number is ensured, and the problem of time asynchronization of different service nodes is solved. Moreover, the generated serial number contains the service information, so that the inverse solution of the subsequent service information is facilitated.

Description

technical field [0001] The present application relates to the technical field of distributed systems, and in particular, to a serial number generation method and system. Background technique [0002] In many application scenarios, such as network transaction scenarios, it is necessary to generate a unique serial number for each transaction or business to record the business or transaction. Currently, there are many ways to generate the serial number, and the generated serial number also has many different forms. At present, a better way is to use the distributed system to generate the serial number, but in the prior art, when the distributed system is used to generate the serial number, due to the fluctuation of the clock oscillation frequency of the central processing unit (Central Processing Unit, CPU) of each service node It is difficult to fully synchronize the time between different service nodes, resulting in duplication of generated serial numbers, which has a seriou...

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): G06F17/22G06F16/22
CPCG06F16/22G06F16/2228
Inventor 贾卫林曹进辉
Owner BEIJING MININGLAMP SOFTWARE SYST 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