Generation method and device of unique identifier in distributed environment and computer equipment

A distributed environment and identification technology, applied in the computer field, can solve problems affecting follow-up business, business impact, abnormal data storage, etc., to achieve the effect of improving business applicability, great convenience, and meeting business needs

Pending Publication Date: 2019-05-10
ONE CONNECT SMART TECH CO LTD SHENZHEN
View PDF0 Cites 23 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] However, the generation result of the unique identifier in the existing scheme is not ideal, at least there are the following problems:
[0004] First, the number of generated identification digits is too long, which often leads to abnormal data storage, etc., which cannot meet business needs;
[0005] Second, the generated logo cannot be associated with the business it belongs to, so it cannot meet business needs or affect subsequent business;
[0006] Third, when multiple threads in the same server apply to generate unique IDs at the same time, the unique IDs assigned by the server to multiple threads are likely to be duplicated, that is to say, the generated unique IDs are not unique. business impact
[0007] For the problem of unsatisfactory generation of unique identifiers in related technologies, no effective solution has been proposed so far

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
  • Generation method and device of unique identifier in distributed environment and computer equipment
  • Generation method and device of unique identifier in distributed environment and computer equipment
  • Generation method and device of unique identifier in distributed environment and computer equipment

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0072] The method for generating a unique identifier in a distributed environment provided by the present invention will be described below with reference to the accompanying drawings.

[0073] figure 1 It is an optional flow diagram of the method for generating a unique identifier in a distributed environment of the present invention, such as figure 1 As shown, the method may include the following steps:

[0074] S01. Generate a binary identifier based on the request for generating a unique identifier.

[0075] In this embodiment, this solution can be applied in a distributed environment, for example, one or more threads in the distributed system can issue a request to generate a unique identifier (ID). Taking the sending of short messages by existing systems related to loans, financial management and other businesses as an example, when the amount of short messages sent is large, it is usually necessary to use multiple threads to simultaneously perform short message sendin...

Embodiment 2

[0105] Based on the method for generating a unique identifier in a distributed environment provided in Embodiment 1 above, this embodiment provides a device for generating a unique identifier in a distributed environment. Specifically, Figures 2 to 4 Shows an optional structural block diagram of the device for generating a unique identifier in a distributed environment, where the device for generating a unique identifier in a distributed environment is divided into one or more program modules, and one or more program modules are stored in the storage medium, and executed by one or more processors to complete the present invention. The program module referred to in the present invention refers to a series of computer program instruction segments that can complete specific functions, and is more suitable than the program itself to describe the execution process of the unique identifier generation device in the distributed environment in the storage medium. The following descript...

Embodiment 3

[0135] This embodiment also provides a computer device, such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a rack server, a blade server, a tower server, or a cabinet server (including an independent server, or A server cluster composed of multiple servers), etc. Such as Figure 5 As shown, the computer device 50 of this embodiment at least includes but is not limited to: a memory 51 and a processor 52 that can communicate with each other through a system bus, such as Figure 5 shown. It should be pointed out that, Figure 5 Only computer device 50 is shown having components 51-52, but it should be understood that implementing all of the illustrated components is not a requirement and that more or fewer components may instead be implemented.

[0136]In this embodiment, the memory 51 (that is, a readable storage medium) includes a flash memory, a hard disk, a multimedia card, a card-type memory (for example, SD or DX memory, etc.), a random ac...

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 for generating a unique identifier in a distributed environment. The method comprises the following steps: generating a binary identifier based on a request for generating the unique identifier; converting the binary identifier into a decimal identifier; Replacing the value of the preset position in the decimal identifier with the value representing the preset service identifier to obtain a replacement result; and determining the replacement result as the unique identifier and writing the unique identifier into a cache and a database. According to the method, the problem that the generation effect of the unique identifier is not ideal in the prior art can be solved, and the unique identifier which is higher in service adaptability and closely associated with the service can be generated so as to better meet the service requirement.

Description

technical field [0001] The invention relates to the field of computer technology, in particular to a method, device and computer equipment for generating a unique identifier in a distributed environment. Background technique [0002] With the development of computer technology, the application of distributed system is more and more extensive. For example, in the existing systems related to loans, wealth management and other businesses, there are a large number of SMS sending needs. In the case of multiple SMS sending demanders and a large amount of SMS sending data, it is usually necessary to use distributed The system completes with multiple threads running simultaneously. Taking the above-mentioned system for sending text messages as an example, since the system usually needs to record the unique identification (ID) corresponding to each text message when it is sent, therefore, when multiple threads execute the text message sending operation at the same time, the multiple...

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/21H04W4/14
Inventor 艾明
Owner ONE CONNECT SMART TECH CO LTD SHENZHEN
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