CN114726798B - Lithium battery test channel current limiting method and system - Google Patents

Lithium battery test channel current limiting method and system Download PDF

Info

Publication number
CN114726798B
CN114726798B CN202210188694.0A CN202210188694A CN114726798B CN 114726798 B CN114726798 B CN 114726798B CN 202210188694 A CN202210188694 A CN 202210188694A CN 114726798 B CN114726798 B CN 114726798B
Authority
CN
China
Prior art keywords
token
request
thread
upper computer
rate
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210188694.0A
Other languages
Chinese (zh)
Other versions
CN114726798A (en
Inventor
李有财
陈震
杨柳
陈方平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujian Nebula Electronics Co Ltd
Original Assignee
Fujian Nebula Electronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujian Nebula Electronics Co Ltd filed Critical Fujian Nebula Electronics Co Ltd
Priority to CN202210188694.0A priority Critical patent/CN114726798B/en
Publication of CN114726798A publication Critical patent/CN114726798A/en
Application granted granted Critical
Publication of CN114726798B publication Critical patent/CN114726798B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/215Flow control; Congestion control using token-bucket
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R31/00Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
    • G01R31/36Arrangements for testing, measuring or monitoring the electrical condition of accumulators or electric batteries, e.g. capacity or state of charge [SoC]
    • G01R31/367Software therefor, e.g. for battery testing using modelling or look-up tables
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/29Flow control; Congestion control using a combination of thresholds
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q9/00Arrangements in telecontrol or telemetry systems for selectively calling a substation from a main station, in which substation desired apparatus is selected for applying a control signal thereto or for obtaining measured values therefrom
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02EREDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
    • Y02E60/00Enabling technologies; Technologies with a potential or indirect contribution to GHG emissions mitigation
    • Y02E60/10Energy storage using batteries

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Power Sources (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides a lithium battery test channel current limiting method and a system, belonging to the technical field of lithium battery test, wherein the method comprises the following steps: step S10, creating a token generation rate, a thread concurrency number, a token generation rule and a token bucket by the upper computer; step S20, the upper computer periodically generates request tokens based on the token generation rate and the thread concurrency number, and puts each request token into a token bucket; step S30, the upper computer monitors the occupancy rate of the CPU and the internal memory in real time, and further dynamically adjusts the token generation rate and the thread concurrency number by utilizing the token generation rule; and step S40, the upper computer interacts with the middle computer based on the request tokens in the token bucket. The invention has the advantages that: the running stability of the lithium battery test system is greatly improved.

Description

Lithium battery test channel current limiting method and system
Technical Field
The invention relates to the technical field of lithium battery testing, in particular to a method and a system for limiting current of a lithium battery testing channel.
Background
With the rising and development of new energy, the lithium battery is used as a green high-energy chemical power supply, has the advantages of high energy, high power, low cost and the like, and is widely applied to the new energy industry. In order to ensure the use safety of the lithium battery, a series of tests are required to be carried out on the lithium battery before delivery.
The lithium battery testing system adopts a three-layer architecture of an upper computer, a middle computer and a lower computer, and in order to improve the efficiency of lithium battery testing, multiple channels are adopted for testing simultaneously, namely, one upper computer is connected with a plurality of middle computers, and each middle computer tests the lithium battery through a lower computer. Because multichannel test is adopted, a large amount of test data can be generated every second, and the occupancy rate of a CPU (Central processing Unit), a network IO (input output) and a hard disk IO is high, so that an upper computer is blocked; if test data are transmitted at regular time, the occupancy rate of the CPU, the network IO and the hard disk IO will be in a wave crest and wave trough state, which is easy to cause the abnormality of an upper computer, even causes the chain reaction to cause the breakdown of the whole lithium battery test system, so that the test data are lost.
Therefore, how to provide a current limiting method and system for a lithium battery test channel to improve the operation stability of the lithium battery test system is a technical problem to be solved urgently.
Disclosure of Invention
The invention aims to solve the technical problem of providing a current limiting method and a current limiting system for a lithium battery test channel, which are used for improving the running stability of the lithium battery test system.
In a first aspect, the present invention provides a method for limiting current in a lithium battery test channel, comprising the steps of:
step S10, creating a token generation rate, a thread concurrency number, a token generation rule and a token bucket by the upper computer;
step S20, the upper computer periodically generates request tokens based on the token generation rate and the thread concurrency number, and puts each request token into a token bucket;
step S30, the upper computer monitors the occupancy rate of the CPU and the internal memory in real time, and further dynamically adjusts the token generation rate and the thread concurrency number by utilizing the token generation rule;
and step S40, the upper computer interacts with the middle computer based on the request tokens in the token bucket.
Further, in the step S10, the token generation rate is used to control the generation speed of the request token;
the thread concurrency number is used for adjusting the number of threads which can be started by the upper computer at the same time;
the token generation rule specifically comprises the following steps:
setting a first occupancy threshold, a second occupancy threshold, an adjustment coefficient a, an adjustment coefficient b and a quantity threshold; wherein the first occupancy threshold value is more than the second occupancy threshold value, 0 < a < 1, and b > 1;
when the occupancy rate of the CPU or the memory is larger than the first occupancy rate threshold, multiplying the token generation rate and the thread concurrency number by an adjustment coefficient a;
when the occupancy rate of the CPU or the memory is smaller than the second occupancy rate threshold and the number of the data interaction requests is larger than the number threshold, multiplying the token generation rate and the thread concurrency number by an adjustment coefficient b;
generating a request token based on the adjusted token generation rate and the thread concurrency number;
the token bucket is used for storing each request token according to the generation time of the request token.
Further, the step S20 specifically includes:
and periodically generating request tokens carrying the thread concurrency number by the upper computer based on the token generation rate, and sequentially storing each request token into a token bucket according to the generation time.
Further, the step S30 specifically includes:
the upper computer creates an independent monitoring thread, monitors the occupancy rate of a CPU and a memory of the upper computer and the number of data interaction requests in real time by using the independent thread, dynamically adjusts the token generation rate and the number of thread concurrency by using the token generation rule, the occupancy rate and the number of data interaction requests, and then homomorphically adjusts the speed of putting the request token into a token bucket and the number of thread concurrency carried by the request token.
Further, the step S40 specifically includes:
the upper computer receives the data interaction requests sent by each middle computer, sequentially inquires the request tokens from the token bucket through a multithreading technology based on the data interaction requests,
if the request token exists, adjusting the thread number of the upper computer based on the thread concurrency number carried by the request token, interacting with the middle computer through the request token, and deleting the corresponding request token from the token bucket after the interaction is completed;
and if the request token does not exist, when the new request token is stored in the token bucket, adjusting the thread number of the upper computer based on the thread concurrency number carried by the request token, interacting with the middle computer through the request token, and deleting the corresponding request token from the token bucket after the interaction is completed.
In a second aspect, the present invention provides a lithium battery test channel current limiting system, comprising:
the rule creation module is used for creating a token generation rate, a thread concurrency number, a token generation rule and a token bucket;
the request token generation module is used for periodically generating request tokens based on the token generation rate and the thread concurrency number, and placing each request token into a token bucket;
the request token adjusting module is used for monitoring the occupancy rate of the CPU and the memory in real time by the upper computer, and dynamically adjusting the token generating rate and the thread concurrency number by utilizing the token generating rule;
and the data interaction module is used for the upper computer to interact with the middle computer based on the request tokens in the token bucket.
Further, in the rule creation module, the token generation rate is used for controlling the generation speed of the request token;
the thread concurrency number is used for adjusting the number of threads which can be started by the upper computer at the same time;
the token generation rule specifically comprises the following steps:
setting a first occupancy threshold, a second occupancy threshold, an adjustment coefficient a, an adjustment coefficient b and a quantity threshold; wherein the first occupancy threshold value is more than the second occupancy threshold value, 0 < a < 1, and b > 1;
when the occupancy rate of the CPU or the memory is larger than the first occupancy rate threshold, multiplying the token generation rate and the thread concurrency number by an adjustment coefficient a;
when the occupancy rate of the CPU or the memory is smaller than the second occupancy rate threshold and the number of the data interaction requests is larger than the number threshold, multiplying the token generation rate and the thread concurrency number by an adjustment coefficient b;
generating a request token based on the adjusted token generation rate and the thread concurrency number;
the token bucket is used for storing each request token according to the generation time of the request token.
Further, the request token generation module specifically includes:
and periodically generating request tokens carrying the thread concurrency number by the upper computer based on the token generation rate, and sequentially storing each request token into a token bucket according to the generation time.
Further, the request token adjusting module specifically includes:
the upper computer creates an independent monitoring thread, monitors the occupancy rate of a CPU and a memory of the upper computer and the number of data interaction requests in real time by using the independent thread, dynamically adjusts the token generation rate and the number of thread concurrency by using the token generation rule, the occupancy rate and the number of data interaction requests, and then homomorphically adjusts the speed of putting the request token into a token bucket and the number of thread concurrency carried by the request token.
Further, the data interaction module specifically comprises:
the upper computer receives the data interaction requests sent by each middle computer, sequentially inquires the request tokens from the token bucket through a multithreading technology based on the data interaction requests,
if the request token exists, adjusting the thread number of the upper computer based on the thread concurrency number carried by the request token, interacting with the middle computer through the request token, and deleting the corresponding request token from the token bucket after the interaction is completed;
and if the request token does not exist, when the new request token is stored in the token bucket, adjusting the thread number of the upper computer based on the thread concurrency number carried by the request token, interacting with the middle computer through the request token, and deleting the corresponding request token from the token bucket after the interaction is completed.
The invention has the advantages that:
the method comprises the steps that a token generation rate, a thread concurrency number, a token generation rule and a token bucket are created by an upper computer, a request token is generated by the upper computer based on the initial token generation rate and the thread concurrency number and is stored in the token bucket, the token generation rate and the thread concurrency number are dynamically adjusted based on the token generation rule to generate a new request token, namely, the generation speed of the request token and the carried thread concurrency number are dynamically adjusted based on the occupancy rate of a CPU and a memory and the data interaction request number, the data interaction of the upper computer and a median computer is based on the request token, the generation speed of the request token and the carried thread concurrency number are adjusted to limit a lithium battery test channel, the resource occupancy rate of the upper computer is always in the median, the running stability of the lithium battery test system is improved, and the crash of the lithium battery test system and the loss of test data are avoided.
Drawings
The invention will be further described with reference to examples of embodiments with reference to the accompanying drawings.
Fig. 1 is a flow chart of a method for limiting current in a lithium battery test channel according to the present invention.
Fig. 2 is a schematic structural diagram of a current limiting system for a lithium battery test channel according to the present invention.
Fig. 3 is a hardware architecture diagram of the present invention.
Detailed Description
According to the technical scheme in the embodiment of the application, the overall thought is as follows: the generation speed of the request token and the concurrent number of the carried threads are dynamically adjusted by the pass token bucket algorithm, and the data interaction between the upper computer and the middle computer is based on the request token, so that the lithium battery test channel is limited, and the running stability of the lithium battery test system is improved.
Referring to fig. 1 to 3, a preferred embodiment of a current limiting method for a lithium battery test channel according to the present invention includes the following steps:
step S10, creating a token generation rate, a thread concurrency number, a token generation rule and a token bucket by the upper computer;
step S20, the upper computer periodically generates request tokens based on the token generation rate and the thread concurrency number, and puts each request token into a token bucket;
step S30, the upper computer monitors the occupancy rate of the CPU and the memory in real time, namely monitors the use condition of hardware resources of the upper computer at the moment, and further dynamically adjusts the token generation rate and the thread concurrency number by utilizing the token generation rule;
and step S40, the upper computer interacts with the middle computer based on the request tokens in the token bucket.
The token generation rate and the thread concurrency number of the request token are controlled through a token bucket algorithm, and then the lithium battery test channel is limited to ensure the operation stability.
In the step S10, the token generation rate is used to control the generation speed of the request token;
the thread concurrency number is used for adjusting the number of threads which can be started by the upper computer at the same time;
the token generation rule specifically comprises the following steps:
setting a first occupancy threshold, a second occupancy threshold, an adjustment coefficient a, an adjustment coefficient b and a quantity threshold; wherein the first occupancy threshold value is more than the second occupancy threshold value, 0 < a < 1, and b > 1; in specific implementation, the first occupancy rate threshold, the second occupancy rate threshold, the adjustment coefficient a, the adjustment coefficient b and the quantity threshold can be set as required;
when the occupancy rate of the CPU or the memory is larger than the first occupancy rate threshold, multiplying the token generation rate and the thread concurrency number by an adjustment coefficient a;
when the occupancy rate of the CPU or the memory is smaller than the second occupancy rate threshold and the number of the data interaction requests is larger than the number threshold, multiplying the token generation rate and the thread concurrency number by an adjustment coefficient b;
generating a request token based on the adjusted token generation rate and the thread concurrency number;
the token bucket is used for storing each request token according to the generation time of the request token.
The step S20 specifically includes:
and periodically generating request tokens carrying the thread concurrency number by the upper computer based on the token generation rate, and sequentially storing each request token into a token bucket according to the generation time. I.e. the request tokens are stored in the token bucket in the form of a message queue, first in first out, last in and last out.
The step S30 specifically includes:
an independent monitoring thread is established by the upper computer, the occupancy rate and the data interaction request quantity of a CPU and a memory of the upper computer are monitored in real time by the independent thread, the token generation rate and the thread concurrency quantity are dynamically adjusted by the token generation rule, the occupancy rate and the data interaction request quantity, and then the speed of putting the request token into a token bucket and the thread concurrency quantity carried by the request token are homomorphically adjusted; the occupancy rate is monitored through the independent monitoring thread, interference can be effectively avoided, the accuracy of occupancy rate statistics is guaranteed, and the running stability of the lithium battery test system is further improved.
Multiplying the token generation rate and the thread concurrency number by 0.7 when the occupancy rate of the CPU or the memory is greater than 80%; when the occupancy rate of the CPU or the memory is smaller than 30% and the number of data interaction requests is larger than 4000, multiplying the token generation rate and the thread concurrency number by 1.3; and generating new request tokens based on the adjusted token generation rate and the thread concurrency number, and storing the new request tokens into a token bucket.
The step S40 specifically includes:
the upper computer receives the data interaction requests sent by each middle computer, sequentially inquires the request tokens from the token bucket through a multithreading technology based on the data interaction requests,
if the request token exists, adjusting the thread number of the upper computer based on the thread concurrency number carried by the request token, interacting with the middle computer through the request token, and deleting the corresponding request token from the token bucket after the interaction is completed;
and if the request token does not exist, when the new request token is stored in the token bucket, adjusting the thread number of the upper computer based on the thread concurrency number carried by the request token, interacting with the middle computer through the request token, and deleting the corresponding request token from the token bucket after the interaction is completed. That is, interaction can be performed only when the token bucket has a request token, and the interaction frequency can be adjusted by adjusting the token generation rate.
The preferred embodiment of the current limiting system of the lithium battery test channel comprises the following modules:
the rule creation module is used for creating a token generation rate, a thread concurrency number, a token generation rule and a token bucket;
the request token generation module is used for periodically generating request tokens based on the token generation rate and the thread concurrency number, and placing each request token into a token bucket;
the request token adjusting module is used for monitoring the occupancy rate of the CPU and the memory in real time by the upper computer, namely monitoring the use condition of hardware resources of the upper computer at the moment, and further dynamically adjusting the token generating rate and the thread concurrency number by utilizing the token generating rule;
and the data interaction module is used for the upper computer to interact with the middle computer based on the request tokens in the token bucket.
The token generation rate and the thread concurrency number of the request token are controlled through a token bucket algorithm, and then the lithium battery test channel is limited to ensure the operation stability.
The rule creation module is used for controlling the generation speed of the request token by the token generation speed;
the thread concurrency number is used for adjusting the number of threads which can be started by the upper computer at the same time;
the token generation rule specifically comprises the following steps:
setting a first occupancy threshold, a second occupancy threshold, an adjustment coefficient a, an adjustment coefficient b and a quantity threshold; wherein the first occupancy threshold value is more than the second occupancy threshold value, 0 < a < 1, and b > 1; in specific implementation, the first occupancy rate threshold, the second occupancy rate threshold, the adjustment coefficient a, the adjustment coefficient b and the quantity threshold can be set as required;
when the occupancy rate of the CPU or the memory is larger than the first occupancy rate threshold, multiplying the token generation rate and the thread concurrency number by an adjustment coefficient a;
when the occupancy rate of the CPU or the memory is smaller than the second occupancy rate threshold and the number of the data interaction requests is larger than the number threshold, multiplying the token generation rate and the thread concurrency number by an adjustment coefficient b;
generating a request token based on the adjusted token generation rate and the thread concurrency number;
the token bucket is used for storing each request token according to the generation time of the request token.
The request token generation module specifically comprises:
and periodically generating request tokens carrying the thread concurrency number by the upper computer based on the token generation rate, and sequentially storing each request token into a token bucket according to the generation time. I.e. the request tokens are stored in the token bucket in the form of a message queue, first in first out, last in and last out.
The request token adjusting module specifically comprises:
an independent monitoring thread is established by the upper computer, the occupancy rate and the data interaction request quantity of a CPU and a memory of the upper computer are monitored in real time by the independent thread, the token generation rate and the thread concurrency quantity are dynamically adjusted by the token generation rule, the occupancy rate and the data interaction request quantity, and then the speed of putting the request token into a token bucket and the thread concurrency quantity carried by the request token are homomorphically adjusted; the occupancy rate is monitored through the independent monitoring thread, interference can be effectively avoided, the accuracy of occupancy rate statistics is guaranteed, and the running stability of the lithium battery test system is further improved.
Multiplying the token generation rate and the thread concurrency number by 0.7 when the occupancy rate of the CPU or the memory is greater than 80%; when the occupancy rate of the CPU or the memory is smaller than 30% and the number of data interaction requests is larger than 4000, multiplying the token generation rate and the thread concurrency number by 1.3; and generating new request tokens based on the adjusted token generation rate and the thread concurrency number, and storing the new request tokens into a token bucket.
The data interaction module specifically comprises:
the upper computer receives the data interaction requests sent by each middle computer, sequentially inquires the request tokens from the token bucket through a multithreading technology based on the data interaction requests,
if the request token exists, adjusting the thread number of the upper computer based on the thread concurrency number carried by the request token, interacting with the middle computer through the request token, and deleting the corresponding request token from the token bucket after the interaction is completed;
and if the request token does not exist, when the new request token is stored in the token bucket, adjusting the thread number of the upper computer based on the thread concurrency number carried by the request token, interacting with the middle computer through the request token, and deleting the corresponding request token from the token bucket after the interaction is completed. That is, interaction can be performed only when the token bucket has a request token, and the interaction frequency can be adjusted by adjusting the token generation rate.
In summary, the invention has the advantages that:
the method comprises the steps that a token generation rate, a thread concurrency number, a token generation rule and a token bucket are created by an upper computer, a request token is generated by the upper computer based on the initial token generation rate and the thread concurrency number and is stored in the token bucket, the token generation rate and the thread concurrency number are dynamically adjusted based on the token generation rule to generate a new request token, namely, the generation speed of the request token and the carried thread concurrency number are dynamically adjusted based on the occupancy rate of a CPU and a memory and the data interaction request number, the data interaction of the upper computer and a median computer is based on the request token, the generation speed of the request token and the carried thread concurrency number are adjusted to limit a lithium battery test channel, the resource occupancy rate of the upper computer is always in the median, the running stability of the lithium battery test system is improved, and the crash of the lithium battery test system and the loss of test data are avoided.
While specific embodiments of the invention have been described above, it will be appreciated by those skilled in the art that the specific embodiments described are illustrative only and not intended to limit the scope of the invention, and that equivalent modifications and variations of the invention in light of the spirit of the invention will be covered by the claims of the present invention.

Claims (6)

1. A lithium battery test channel current limiting method is characterized in that: the method comprises the following steps:
step S10, creating a token generation rate, a thread concurrency number, a token generation rule and a token bucket by the upper computer; the token generation rate is used for controlling the generation speed of the request token; the thread concurrency number is used for adjusting the number of threads which can be started by the upper computer at the same time;
step S20, the upper computer periodically generates request tokens carrying thread concurrency numbers based on the token generation rate, and sequentially stores each request token to a token bucket according to generation time;
step S30, the upper computer monitors the occupancy rate of the CPU and the internal memory in real time, and further dynamically adjusts the token generation rate and the thread concurrency number by utilizing the token generation rule;
step S40, the upper computer interacts with the middle computer based on the request tokens in the token bucket;
the token generation rule specifically comprises the following steps:
setting a first occupancy threshold, a second occupancy threshold, an adjustment coefficient a, an adjustment coefficient b and a quantity threshold; wherein the first occupancy threshold value is more than the second occupancy threshold value, 0 < a < 1, and b > 1;
when the occupancy rate of the CPU or the memory is larger than the first occupancy rate threshold, multiplying the token generation rate and the thread concurrency number by an adjustment coefficient a;
when the occupancy rate of the CPU or the memory is smaller than the second occupancy rate threshold and the number of the data interaction requests is larger than the number threshold, multiplying the token generation rate and the thread concurrency number by an adjustment coefficient b;
generating a request token based on the adjusted token generation rate and the thread concurrency number;
the token bucket is used for storing each request token according to the generation time of the request token.
2. The method for limiting current in a lithium battery test channel of claim 1, wherein: the step S30 specifically includes:
the upper computer creates an independent monitoring thread, monitors the occupancy rate of a CPU and a memory of the upper computer and the number of data interaction requests in real time by using the monitoring thread, dynamically adjusts the token generation rate and the number of thread concurrency by using the token generation rule, the occupancy rate and the number of data interaction requests, and then homomorphically adjusts the speed of putting the request token into a token bucket and the number of thread concurrency carried by the request token.
3. The method for limiting current in a lithium battery test channel of claim 1, wherein: the step S40 specifically includes:
the upper computer receives the data interaction requests sent by each middle computer, sequentially inquires the request tokens from the token bucket through a multithreading technology based on the data interaction requests,
if the request token exists, adjusting the thread number of the upper computer based on the thread concurrency number carried by the request token, interacting with the middle computer through the request token, and deleting the corresponding request token from the token bucket after the interaction is completed;
and if the request token does not exist, when the new request token is stored in the token bucket, adjusting the thread number of the upper computer based on the thread concurrency number carried by the request token, interacting with the middle computer through the request token, and deleting the corresponding request token from the token bucket after the interaction is completed.
4. A lithium battery test channel current limiting system is characterized in that: the device comprises the following modules:
the rule creation module is used for creating a token generation rate, a thread concurrency number, a token generation rule and a token bucket; the token generation rate is used for controlling the generation speed of the request token; the thread concurrency number is used for adjusting the number of threads which can be started by the upper computer at the same time;
the request token generation module is used for periodically generating request tokens carrying thread concurrency numbers based on the token generation rate by the upper computer, and sequentially storing each request token to a token bucket according to the generation time;
the request token adjusting module is used for monitoring the occupancy rate of the CPU and the memory in real time by the upper computer, and dynamically adjusting the token generating rate and the thread concurrency number by utilizing the token generating rule;
the data interaction module is used for the upper computer to interact with the middle computer based on the request tokens in the token bucket;
in the rule creation module, the token generation rule specifically includes:
setting a first occupancy threshold, a second occupancy threshold, an adjustment coefficient a, an adjustment coefficient b and a quantity threshold; wherein the first occupancy threshold value is more than the second occupancy threshold value, 0 < a < 1, and b > 1;
when the occupancy rate of the CPU or the memory is larger than the first occupancy rate threshold, multiplying the token generation rate and the thread concurrency number by an adjustment coefficient a;
when the occupancy rate of the CPU or the memory is smaller than the second occupancy rate threshold and the number of the data interaction requests is larger than the number threshold, multiplying the token generation rate and the thread concurrency number by an adjustment coefficient b;
generating a request token based on the adjusted token generation rate and the thread concurrency number;
the token bucket is used for storing each request token according to the generation time of the request token.
5. The lithium battery test channel current limiting system of claim 4, wherein: the request token adjusting module specifically comprises:
the upper computer creates an independent monitoring thread, monitors the occupancy rate of a CPU and a memory of the upper computer and the number of data interaction requests in real time by using the monitoring thread, dynamically adjusts the token generation rate and the number of thread concurrency by using the token generation rule, the occupancy rate and the number of data interaction requests, and then homomorphically adjusts the speed of putting the request token into a token bucket and the number of thread concurrency carried by the request token.
6. The lithium battery test channel current limiting system of claim 4, wherein: the data interaction module specifically comprises:
the upper computer receives the data interaction requests sent by each middle computer, sequentially inquires the request tokens from the token bucket through a multithreading technology based on the data interaction requests,
if the request token exists, adjusting the thread number of the upper computer based on the thread concurrency number carried by the request token, interacting with the middle computer through the request token, and deleting the corresponding request token from the token bucket after the interaction is completed;
and if the request token does not exist, when the new request token is stored in the token bucket, adjusting the thread number of the upper computer based on the thread concurrency number carried by the request token, interacting with the middle computer through the request token, and deleting the corresponding request token from the token bucket after the interaction is completed.
CN202210188694.0A 2022-02-28 2022-02-28 Lithium battery test channel current limiting method and system Active CN114726798B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210188694.0A CN114726798B (en) 2022-02-28 2022-02-28 Lithium battery test channel current limiting method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210188694.0A CN114726798B (en) 2022-02-28 2022-02-28 Lithium battery test channel current limiting method and system

Publications (2)

Publication Number Publication Date
CN114726798A CN114726798A (en) 2022-07-08
CN114726798B true CN114726798B (en) 2023-07-18

Family

ID=82235799

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210188694.0A Active CN114726798B (en) 2022-02-28 2022-02-28 Lithium battery test channel current limiting method and system

Country Status (1)

Country Link
CN (1) CN114726798B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0340034A (en) * 1989-07-06 1991-02-20 Fujitsu Ltd Control processing system for execution multiplicity of process
WO2015043528A1 (en) * 2013-09-30 2015-04-02 华为技术有限公司 Parallel multi-thread message processing method and device
CN110297743A (en) * 2018-03-21 2019-10-01 财付通支付科技有限公司 A kind of load test approach, device and storage medium
CN113467933A (en) * 2021-06-15 2021-10-01 济南浪潮数据技术有限公司 Thread pool optimization method, system, terminal and storage medium for distributed file system
CN113961338A (en) * 2021-09-17 2022-01-21 国网电力科学研究院有限公司 Management system and management method of dynamic thread pool and thread task processing method

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102984081A (en) * 2012-10-30 2013-03-20 盛科网络(苏州)有限公司 Method and system of message processing in network equipment
CN105791985B (en) * 2014-12-22 2019-08-16 深圳Tcl数字技术有限公司 Media stream data method for down loading and device
CN205901804U (en) * 2016-07-28 2017-01-18 重庆中科云丛科技有限公司 Big data file uploads system fast
CN106557369B (en) * 2016-11-25 2020-08-04 武汉斗鱼网络科技有限公司 Multithreading management method and system
CN109885470A (en) * 2019-03-04 2019-06-14 上海拉扎斯信息科技有限公司 Method of adjustment, device, storage medium and the electronic equipment of thread pool
CN110932994B (en) * 2019-12-31 2022-11-22 深圳云天励飞技术有限公司 Data traffic processing method and device, electronic equipment and storage medium
CN112003795B (en) * 2020-07-17 2022-12-20 苏州浪潮智能科技有限公司 Method, system, equipment and storage medium for dynamically preventing traffic attack
CN113381944B (en) * 2021-06-09 2022-08-12 中国工商银行股份有限公司 System current limiting method, apparatus, electronic device, medium, and program product
CN113835854A (en) * 2021-09-06 2021-12-24 中国银联股份有限公司 Task processing method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0340034A (en) * 1989-07-06 1991-02-20 Fujitsu Ltd Control processing system for execution multiplicity of process
WO2015043528A1 (en) * 2013-09-30 2015-04-02 华为技术有限公司 Parallel multi-thread message processing method and device
CN110297743A (en) * 2018-03-21 2019-10-01 财付通支付科技有限公司 A kind of load test approach, device and storage medium
CN113467933A (en) * 2021-06-15 2021-10-01 济南浪潮数据技术有限公司 Thread pool optimization method, system, terminal and storage medium for distributed file system
CN113961338A (en) * 2021-09-17 2022-01-21 国网电力科学研究院有限公司 Management system and management method of dynamic thread pool and thread task processing method

Also Published As

Publication number Publication date
CN114726798A (en) 2022-07-08

Similar Documents

Publication Publication Date Title
CN102004670B (en) Self-adaptive job scheduling method based on MapReduce
US20160378570A1 (en) Techniques for Offloading Computational Tasks between Nodes
US20090113440A1 (en) Multiple Queue Resource Manager
US20230244537A1 (en) Efficient gpu resource allocation optimization method and system
US8150994B2 (en) Providing flow control and moderation in a distributed message processing system
CN106528065B (en) A kind of thread acquisition methods and equipment
WO2016188282A1 (en) Message processing method, device and system
CN112685298A (en) Code coverage testing method and device for application program and electronic equipment
CN105824691A (en) Method and device for dynamically regulating threads
JP2023513399A (en) Method, apparatus, user equipment, electronic device, and medium for determining occasions for HARQ-ACK feedback
CN114726798B (en) Lithium battery test channel current limiting method and system
CN111148052A (en) State determination method, system, medium, and electronic device
CN107132903B (en) Energy-saving management implementation method, device and network equipment
CN104750546B (en) A kind of method and system for adjusting connection pool
US20210318737A1 (en) Battery heat balancing during peak power mode
Ji et al. Adaptive provisioning in-band network telemetry at computing power network
CN103942103A (en) Method and device for generating processor scheduling policy in multi-core system and scheduling system
CN108989442A (en) Data distributing method, system and control node
CN104503885A (en) Timing door watching device and system
CN111176847B (en) Method and device for optimizing performance of big data cluster on physical core ultra-multithreading server
KR101993916B1 (en) Controlling Processor Core Operations
CN110783952B (en) Wind power plant energy management system and method
CN109302723A (en) A kind of multinode real-time radio pyroelectric monitor control system Internet-based and control method
CN108012030A (en) A kind of mobile terminal downloading management method
CN107301114A (en) A kind of sea of clouds OS monitoring resources and its information adding method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant