Unlock instant, AI-driven research and patent intelligence for your innovation.

Distributed id acquisition method, device, electronic device and storage medium

An acquisition method and distributed technology, applied in the medical field, can solve the problems of unavailable and limited number of user IDs, and achieve the effect of improving user experience and meeting individual needs

Active Publication Date: 2021-06-08
WINNING HEALTH TECHNOLOGY GROUP CO LTD
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] However, in the above methods of generating IDs, the number of IDs supported by each service per second is limited. If the number of IDs borrowed at the current moment exceeds the number of IDs supported by the service, the number of IDs required by the user cannot be provided.

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
  • Distributed id acquisition method, device, electronic device and storage medium
  • Distributed id acquisition method, device, electronic device and storage medium
  • Distributed id acquisition method, device, electronic device and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0028] figure 1 It is a flow chart of the distributed ID acquisition method provided by Embodiment 1 of the present invention. This embodiment is applicable to the situation where users can obtain the distributed IDs required by themselves. This method can be executed by a distributed ID acquisition device. The distribution The distributed ID obtaining device can be realized by software and / or hardware, and the distributed ID obtaining device can be configured on a computing device, specifically including the following steps:

[0029] S110. Obtain the first number of IDs to be generated by the service sequence at the current moment, and the second number of IDs that can be generated per second in the constructed ID pool.

[0030] Exemplarily, the service sequence may be a JVM internal service sequence.

[0031] The first number of IDs to be generated at the current moment may be the number of IDs expected to be generated at the current moment.

[0032] The second quantity ma...

Embodiment 2

[0074] figure 2 It is a flow chart of the distributed ID acquisition method provided by Embodiment 2 of the present invention. The embodiment of the present invention can be combined with various alternative solutions in the foregoing embodiments. In the embodiment of the present invention, optionally, the method further includes: constructing a time thread, so that the time thread distinguishes correspondingly IDs generated by each time node based on each time node.

[0075] Such as figure 2 As shown, the method of the embodiment of the present invention specifically includes the following steps:

[0076] S210. Obtain the first number of IDs to be generated by the service sequence at the current moment, and the second number of IDs that can be generated per second in the constructed ID pool.

[0077] S220. Based on the constructed time thread, control the IDs generated at each time node to be distinguished according to the corresponding time node.

[0078] Exemplarily, a...

Embodiment 3

[0086] image 3 A schematic structural diagram of a distributed ID acquisition device provided in Embodiment 3 of the present invention, as shown in image 3 As shown, the device includes: a quantity acquisition module 31 , a difference determination module 32 , an ID acquisition module 33 and a target distributed ID generation module 34 .

[0087] Wherein, the quantity obtaining module 31 is used to obtain the first quantity of IDs to be generated by the business sequence at the current moment, and the second quantity of IDs that can be generated per second in the constructed ID pool;

[0088] A difference determination module 32, configured to determine the difference between the first quantity and the second quantity if the first quantity is greater than the second quantity;

[0089] ID acquisition module 33, configured to acquire the unapplied service sequence IDs of the difference value generated in the preset time period before the current moment from the ID pool;

[0...

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 discloses a distributed ID acquisition method, device, electronic equipment and storage medium. The method includes: obtaining the first number of IDs to be generated by the service sequence at the current moment, and the second number of IDs that can be generated per second in the constructed ID pool; if the first number is greater than the second number, then determine The difference between the first quantity and the second quantity; acquire the unapplied service sequence IDs of the difference quantity generated within the preset time period before the current moment from the ID pool; based on the ID The second quantity of service sequence IDs generated by the pool and the difference quantity of unapplied service sequence IDs are used to generate a target distributed ID. In order to achieve the effect of providing the number of IDs required by the user and meeting the individual needs of the user.

Description

technical field [0001] Embodiments of the present invention relate to medical technology, and in particular to a distributed ID acquisition method, device, electronic equipment, and storage medium. Background technique [0002] As the amount of medical business data continues to increase, the large amount of data in a single table leads to a serious decline in the performance of medical databases. The common solution in the industry is to use the sub-database and sub-table technology to reduce the data volume of each table, thereby restoring the performance of a single table. In this case, a globally unique identification number (ID) needs to be generated. [0003] At present, the relatively mature distributed globally unique ID generator is realized by using Twitter's open-source Snowflake (SnowFlake) algorithm. In addition, it also uses the database to self-increase ID and redis to generate ID, etc. [0004] However, in the above methods of generating IDs, the number of I...

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): G06F40/126G06F16/33
CPCG06F16/3331G06F40/126
Inventor 惠鹏陈效华刘宁陈志峰孙前方黄克华范春黄智勇杨子亮
Owner WINNING HEALTH TECHNOLOGY GROUP CO LTD