Distributed ID generation method
A distributed, parameter-generating technology, applied in the computer field, can solve problems such as inability to meet requirements, and achieve the effect of convenient linear expansion
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0033] Please refer to the attached Figure 1~3 , a distributed ID generation method, comprising the following steps:
[0034] S1. Read the service type identifiers of multiple services stored in the MySQL database and the ID generation parameters of the multiple services.
[0035] S2. Loading and caching the service type identifiers of multiple services and the ID generation parameters of multiple services, wherein the caching service is provided by Redis, and the ID generation parameters include the ID initial allocation value, the length of the application ID number segment, and the latest application ID No. segment time and loading scale factor etc.
[0036] S3. The service type identifier maintains a corresponding relationship with the ID generation parameter. Determine the current ID value of each service according to the ID generation parameters, the current ID value is equal to the initial ID allocation value of the ID generation parameters by default, and cache the ...
Embodiment 2
[0042] A distributed ID generation device, comprising:
[0043] The data parameter reading module is used to read the ID generation parameters of multiple services and realize interaction with the cache module.
[0044] The cache module is configured to cache service type identifiers of multiple services and ID generation parameters of multiple services, and the service type identifiers maintain a corresponding relationship with the ID generation parameters.
[0045] The ID generation request receiving module is configured to receive an ID generation request, and the ID generation request carries a service type identifier.
[0046] The ID generation module is used to search data in the cache according to the service type identifier. If it is determined that there is a current ID value corresponding to the service type identifier in the cache, the ID current value plus one is set as a new ID current value to obtain a new ID. The current value.
[0047] A cache update module, ...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com