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

Method, equipment and system for generating ID

A technology for generating units and corresponding relationships, applied in the field of data processing, can solve problems such as inability to effectively generate globally unique IDs, and achieve high reliability, simple and convenient call interface, and easy-to-use effects

Active Publication Date: 2012-11-07
北京鸿享技术服务有限公司
View PDF4 Cites 57 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0010] The present invention provides an ID generation method, device and system to solve the problem that the prior art cannot effectively generate a globally unique ID

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, equipment and system for generating ID
  • Method, equipment and system for generating ID
  • Method, equipment and system for generating ID

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0053] The embodiment of the present invention provides an ID generation method, such as figure 1 Shown, including:

[0054] Step S101: The first server receives an ID acquisition instruction initiated by the calling end;

[0055] In this step, the first server is configured with a Get interface for sending and receiving information with each of the calling terminals; the calling terminal is configured with a calling interface for sending and receiving information with the first server .

[0056] Preferably, the memcache protocol is used for communication between the first server end and the calling end. When the memcache protocol is used for communication, the memcache client can be directly used as the caller, which reduces the workload of caller deployment and facilitates maintenance.

[0057] Step S102: According to the ID acquisition instruction, the first server generates an ID value based on the server identification number and self-increment sequence, or generates an ID value...

Embodiment 2

[0069] The embodiment of the present invention provides an ID generating device, which is preferably a server, such as figure 2 As shown, it includes: an instruction receiving unit 210, an ID generating unit 220, and an ID sending unit 230, where:

[0070] The instruction receiving unit 210 is configured to receive an ID acquisition instruction initiated by the calling terminal;

[0071] The ID generating unit 220 is configured to generate an ID value based on the device identification number and self-increment sequence according to the ID acquisition instruction, or generate an ID value based on the current time stamp, the device identification number and the self-increment sequence;

[0072] The ID sending unit 230 is configured to send the ID generated by the ID generating unit 220 to the calling end.

[0073] Wherein, the instruction receiving unit 210 and the ID sending unit 230 communicate with each caller through the Get interface configured by the device. Preferably, the prot...

Embodiment 3

[0083] The embodiment of the present invention provides an ID generation system, such as image 3 As shown, it includes: a first server 310 and one or more calling terminals 320;

[0084] The calling terminal 320 is configured to initiate an ID acquisition instruction to the first server 310 under the trigger of the service, and receive the ID value fed back by the first server 320;

[0085] The first server 310 is configured to generate an ID value based on the server identification number and self-increment sequence according to the received ID acquisition instruction, or generate an ID value based on the current timestamp, server identification number and self-increment sequence, and The generated ID value is sent to the calling end 320.

[0086] Among them, the first server 310 is configured with a Get interface responsible for sending and receiving information with each calling terminal 320; the calling terminal 320 is configured with a calling interface for sending and receivin...

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, equipment and a system for generating an ID. The method comprises the following steps: a first service terminal receives an ID acquisition instruction initiated by calling terminals; according to the ID acquisition instruction, generating an ID value based on a service end identification number and a self-increasing sequence, or generating an ID value based on the current time stamp, a service end identification number and a self-increasing sequence; and transmitting the generated ID value to the calling terminals. According to the technical scheme provided by the invention, an overall unique ID is generated in a service-oriented manner, which is good in extendibility and high in serviceability and reliability; and besides, generated IDs are ensured to be sequential and incremental, the IDs are smaller than a UUID (Universally Unique Identifier) in occupied space, and the application is convenient and quick.

Description

Technical field [0001] The present invention relates to the field of data processing technology, in particular to an ID generation method, device and system. Background technique [0002] In the use of the database, when insert, update, delete and other operations are performed on each piece of data, the primary key is usually used for the operation. The primary key of each piece of data must be unique, otherwise the operation will fail due to primary key conflicts. [0003] Regarding the generation of the primary key, there are currently the following solutions: [0004] Solution 1: The database itself provides the function of auto_increment to provide self-incrementing ID. When using the database, specify that the primary key is auto_increment. When writing data, set the primary key to a null value, and the database will automatically generate an incremental ID as the primary key. For single-table operations, this solution is relatively simple and easy to deploy. [0005] However...

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): H04L29/08
Inventor 桂勇哲陈斌陈超
Owner 北京鸿享技术服务有限公司
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