Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

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

Active Publication Date: 2017-02-08
TENCENT TECH (SHENZHEN) CO LTD
View PDF1 Cites 6 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] In order to solve the existing technical problems, the embodiment of the present invention provides an information processing method and system, which can control the access rate of a single machine and multiple processes, and can avoid the problems of low efficiency and control performance caused by access conflicts and token locking

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
  • Information processing method and system thereof
  • Information processing method and system thereof
  • Information processing method and system thereof

Examples

Experimental program
Comparison scheme
Effect test

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...

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

Embodiments of the invention disclose an information processing method and a system thereof. The method comprises the following steps of generating a token by a token bucket, and making the token be stored in a token-bucket shared memory; detecting that at least one process simultaneously requests for the token and determining that a token quantity in the token-bucket shared memory is greater than zero, and then through comparing and exchanging a (CAS) atom operation technology to make the at least one process update the token quantity in the token-bucket shared memory; and when a first process successfully updates the token quantity in the token-bucket shared memory, making the first process acquire a first token so that the first process carries out data transmission based on the first token, wherein the first process is any one process in the at least one process.

Description

technical field [0001] The present invention relates to information processing technology, in particular to an information processing method and system. Background technique [0002] The token bucket algorithm is the most commonly used algorithm in network traffic shaping (Traffic Shaping) and rate limiting (Rate Limiting), which can effectively and smoothly control the maximum number of accesses to an interface per unit time. The main principle of the token bucket algorithm is that the system will put tokens into the token bucket at a constant rate. If the number of tokens in the token bucket reaches the capacity limit of the token bucket, the overflow tokens will be discarded. And if there is data transmission, the token is consumed; when there is no token in the token bucket, the system rejects the service, indicating that the current rate reaches the highest threshold, and the data transmission is rejected. [0003] At present, this traditional token bucket algorithm ca...

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
IPC IPC(8): H04L12/819H04L47/21
CPCH04L47/215
Inventor 卓晓光林海林魏仁亮李鸿杰朱贤章
Owner TENCENT TECH (SHENZHEN) CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products