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
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
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...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


