Database-based inter-service integral log ID generation method

A database and multi-service technology, applied in the computer field, can solve problems such as system congestion, high pressure of database reading and writing, and difficulty in database expansion, and achieve the effects of reducing pressure, improving system throughput, and improving system response performance

Pending Publication Date: 2021-10-26
厦门南讯股份有限公司
View PDF0 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, as the amount of data grows, the number of databases will inevitably increase, and it is difficult to expand the database in this solution. After the database and step size have been defined, if a new database needs to be added, the step size of the database needs to be readjusted. And every time a new ID is obtained, a database read and write is required. When the number of requests to generate integral log IDs increases, the pressure of database read and write is high, which is likely to cause system blockage

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
  • Database-based inter-service integral log ID generation method
  • Database-based inter-service integral log ID generation method
  • Database-based inter-service integral log ID generation method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment

[0028] A database-based method for generating integral log IDs between multiple services, the method comprising:

[0029] S1. Unify the generation configuration of the integral log ID in the ID database;

[0030] Such as figure 1 As shown, the generation configuration includes business identifier, maximum ID value, ID number segment length and version number;

[0031] The business identifier (BizType) is used for business differentiation;

[0032] The maximum ID value (MaxId) represents the maximum value of the batch ID to which the current service identifier is assigned;

[0033] The ID number section length (Step) represents the number of IDs allocated each time. The commonly used method in the prior art is to read and write the database every time the ID is obtained. After the ID number section length is set in this embodiment, only when the entire ID section Read and write the database once when it is almost consumed, which can effectively reduce the frequency of databa...

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 database-based inter-service integral log ID generation method, and the method comprises the steps: S1, unifying the generation configuration of integral log IDs in an ID database, and enabling the generation configuration to comprise a business identifier, a maximum ID value, an ID number segment length and a version number; S2, distributing a corresponding service identifier and an ID number segment for each service in each service system according to the generation configuration; and S3, enabling the service system to read the currently available ID value from the distributed ID number segment, and if the currently distributed ID number segment consumes to a set threshold value, automatically loading the next ID number segment to the memory of the service system from the ID database. According to the method, system service congestion caused by database reading and writing in each ID generation process can be effectively reduced, and the system response performance is improved.

Description

technical field [0001] The invention relates to the field of computer technology, in particular to a method for generating integral log IDs between multiple services based on a database. Background technique [0002] Generating a unique ID for the integral log data of multiple databases and multiple data tables is the basic function of the integral system. It is based on the premise of database read-write separation and sub-database sub-table architecture design, using the database to achieve unique ID generation . [0003] The existing commonly used point log ID generation scheme is: jointly maintain a data table for ID generation in each database, and set the ID generation of each point log database to a different step length, thereby avoiding point log IDs from appearing in different systems Duplicate situation. However, as the amount of data grows, the number of databases will inevitably increase, and it is difficult to expand the database in this solution. After the d...

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): G06F16/22G06F16/2458G06F16/27
CPCG06F16/2264G06F16/2282G06F16/27G06F16/2474
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