Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

A distributed primary key generation method and device

A distributed, primary key technology, applied in the direction of database distribution/replication, database model, database index, etc., can solve the problems of unable to meet special application requirements, difficult to support high concurrency system, too large primary key, etc., to reduce the size and performance of the primary key requirements, meet special application requirements, improve the effect of usability

Active Publication Date: 2019-08-30
BEIJING VRV SOFTWARE CO LTD
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Its disadvantage is that all inserts need to access the table, so the table can easily become a system performance bottleneck; at the same time, it also has a single point problem, once the table database fails, the entire application will not work
[0005] In the process of realizing the present invention, the inventor concluded that the existing technology has at least the following problems: the primary key is too large; the high performance requirements when building an index and querying based on the index; the access pressure with a read-write ratio of 1:1 is too high, Difficult to support high-concurrency systems; generated IDs are discontinuous and cannot meet special application requirements; low availability, once the generated policy server fails, the entire application cannot work
[0006] For the above problems in the prior art, there is no effective solution yet

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
  • A distributed primary key generation method and device
  • A distributed primary key generation method and device
  • A distributed primary key generation method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0029] In order to make the object, technical solution and advantages of the present invention clearer, the embodiments of the present invention will be further described in detail below in conjunction with specific embodiments and with reference to the accompanying drawings.

[0030] It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are to distinguish two entities with the same name but different parameters or parameters that are not the same, see "first" and "second" It is only for the convenience of expression, and should not be construed as a limitation on the embodiments of the present invention, which will not be described one by one in the subsequent embodiments.

[0031] Based on the above purpose, the first aspect of the embodiments of the present invention proposes a first embodiment of a distributed primary key generation method capable of performing distributed primary key generation for different users or...

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 primary key generation method and a distributed primary key generation device. The method includes: generating a sequence table in a primary key generation server, and acquiring an available strategy from a strategy server; allowing an application that requires distribution of a primary key to access an SQL (structured query language) router, acquiring IP (internet protocol) address of the primary key generation server, and accessing the primary key generation server according to the IP address; allowing the primary key generation server accessed by the application to self-check whether the current available strategy is valid or not; allowing the primary key generation server accessed by the application to allocate a primary key to the application according to the current sequence table and update the current sequence table. The distributed primary key generation method and the device can provide lowered requirements on the size and performance of the primary key, support a high-concurrent system, meet special application demands and provide improved availability.

Description

technical field [0001] The present invention relates to the technical field of computer data processing, and more specifically, to a method and device for generating a distributed primary key. Background technique [0002] There are two common global primary key generation strategies as follows. [0003] One solution is to use UUID (Universally Unique Identifier, Universally Unique Identifier) ​​as the primary key. The disadvantage is that because the UUID is too long, it takes up a lot of storage space, and consumes a lot of computing resources when building an index and querying based on the index. [0004] Another solution is to maintain a Sequence table in combination with the database, that is, create a Sequence table in the database. The attributes include: tablename, nextid, and the nextid will be incremented by 1 each time the primary key is obtained. Its disadvantage is that all inserts need to access the table, so the table can easily become a system performance ...

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 Patents(China)
IPC IPC(8): G06F16/22G06F16/27G06F16/28
Inventor 王刚党艳平赵文兴
Owner BEIJING VRV SOFTWARE CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products