Information processing method and system thereof
An information processing method and a technology for responding to messages, which are applied in the field of information processing methods and systems, can solve the problems of token locking efficiency and low control performance, and achieve the effect of solving low efficiency and control performance and realizing access rate control
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0039] An embodiment of the present invention provides an information processing method. figure 1 It is a schematic flow diagram of the information processing method in Embodiment 1 of the present invention; figure 1 As shown, the method includes:
[0040] Step 101: the token bucket generates a token, and controls the token to be stored in the shared memory of the token bucket.
[0041] Here, the token bucket generates tokens, and controls the tokens to be stored in the token bucket shared memory, including: the token bucket generates tokens according to a preset generation rate and a preset generation cycle, and the generated tokens Stored in the token bucket shared memory.
[0042] In this embodiment, the generation rate rate and the generation period period are pre-configured in the token bucket; then the number of tokens generated by each period of the token bucket N=rate×period; the generated tokens are stored in the token bucket shared memory; wherein, when the token ...
Embodiment approach
[0045]In this embodiment, the atomic operation indicates that the current step or at least two steps are inseparable, and the order cannot be disturbed. During the execution, other operations cannot intervene until the current step or at least two steps steps are executed. Based on this, after the token bucket generates tokens, the tokens are stored in the token bucket shared memory, and the number of tokens in the token bucket shared memory is updated. As an implementation, the code example of storing the tokens generated based on the CAS atomic operation technology in the shared memory of the token bucket and updating the number of tokens is as follows. In this example, tokens indicates the tokens in the current token bucket The number of tokens, that is, the number of tokens in the shared memory of the token bucket:
[0046]
[0047] Specifically, the capacity of the token bucket is preconfigured, and the capacity of the token bucket is the maximum data burst flow allow...
Embodiment 2
[0075] The embodiment of the present invention also provides an information processing system. image 3 It is a schematic diagram of the composition and structure of the information processing system in Embodiment 2 of the present invention, such as image 3 As shown, the system includes: a token production unit 31, a token bucket shared memory 32 and a token consumption unit 33; wherein,
[0076] The token production unit 31 is configured to generate a token, and control the token to be stored in the token bucket shared memory 32;
[0077] The shared memory 32 of the token bucket is used to store tokens and the number of tokens;
[0078] The token consumption unit 33 is configured to detect that at least one process requests a token at the same time, and send the token request of the at least one process to the shared memory; obtain the token based on the token request of the at least one process The number of tokens in the card bucket shared memory 32; when determining tha...
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