CN114726798A - 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
CN114726798A
CN114726798A CN202210188694.0A CN202210188694A CN114726798A CN 114726798 A CN114726798 A CN 114726798A CN 202210188694 A CN202210188694 A CN 202210188694A CN 114726798 A CN114726798 A CN 114726798A
Authority
CN
China
Prior art keywords
token
request
upper computer
thread
threshold value
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.)
Granted
Application number
CN202210188694.0A
Other languages
Chinese (zh)
Other versions
CN114726798B (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

Images

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 in the technical field of lithium battery test, wherein the method comprises the following steps: step S10, establishing 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 rates 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 on the basis of the request token in the token bucket. The invention has the advantages that: the stability of lithium battery test system operation has greatly been promoted.

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 current limiting method and system for a lithium battery testing channel.
Background
With the rise and development of new energy, the lithium battery 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 safety of the lithium battery, a series of tests are required to be carried out on the lithium battery before the lithium battery is delivered from a factory.
The lithium battery testing system adopts a three-layer framework of an upper computer, a middle computer and a lower computer, and adopts multiple channels to test simultaneously in order to improve the efficiency of lithium battery testing, namely, one upper computer is connected with a plurality of middle computers, and each middle computer tests the lithium battery through one lower computer. Due to the adoption of multi-channel testing, a large amount of test data can be generated every second, the occupancy rates of a CPU, a network IO and a hard disk IO are high due to the large amount of test data, and an upper computer is blocked; if the test data are transmitted at regular time, the occupancy rates of the CPU, the network IO and the hard disk IO present a wave crest and a wave trough state, which easily causes the abnormality of the upper computer, and even causes a chain reaction to cause the crash 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 a lithium battery test system becomes a technical problem to be solved urgently.
Disclosure of Invention
The invention aims to solve the technical problem of providing a lithium battery test channel current limiting method and system to improve the operation stability of a lithium battery test system.
In a first aspect, the present invention provides a current limiting method for a lithium battery test channel, including the following steps:
step S10, establishing 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 rates of the CPU and the 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 on the basis of the request token 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 is specifically as follows:
setting a first occupancy rate threshold value, a second occupancy rate threshold value, an adjustment coefficient a, an adjustment coefficient b and a quantity threshold value; wherein the first occupancy rate threshold value is larger than the second occupancy rate threshold value, a is larger than 0 and smaller than 1, and b is larger than 1;
when the occupancy rate of a CPU or a memory is greater than the first occupancy rate threshold value, 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 value and the number of the data interaction requests is larger than the number threshold value, 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 is specifically:
and the upper computer periodically generates request tokens carrying thread concurrency numbers based on the token generation rate, and sequentially stores each request token in a token bucket according to the generation time.
Further, the step S30 is specifically:
the method comprises the steps that an independent monitoring thread is established by an upper computer, the occupancy rates of a CPU and a memory of the upper computer and the number of data interaction requests are monitored in real time by the aid of the independent thread, the token generation rate and the thread concurrency number are dynamically adjusted by the aid of token generation rules, the occupancy rates and the number of the data interaction requests, and then the speed of the request tokens put into a token bucket and the thread concurrency number carried by the request tokens are homomorphically adjusted.
Further, the step S40 is specifically:
the upper computer receives data interaction requests sent by the middle computers, requests tokens are sequentially inquired from the token bucket through a multithreading technology based on the data interaction requests,
if the request token exists, adjusting the number of threads of the upper computer based on the threads 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;
if the request token does not exist, when waiting for the token bucket to store a new request token, adjusting the thread quantity 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 current limiting system for a lithium battery test channel, including the following modules:
the rule creating module is used for creating a token generating rate, a thread concurrency number, a token generating rule and a token bucket on the upper computer;
the request token generation module is used for periodically generating request tokens by the upper computer based on the token generation rate and the thread concurrency number and putting each request token into a token bucket;
the request token adjusting module is used for monitoring the occupancy rates of the CPU and the memory in real time by the upper computer and further dynamically adjusting the token generation rate and the thread concurrency number by utilizing the token generation rule;
and the data interaction module is used for the upper computer to interact with the middle computer based on the request token in the token bucket.
Further, in the rule creating 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 is specifically as follows:
setting a first occupancy rate threshold value, a second occupancy rate threshold value, an adjustment coefficient a, an adjustment coefficient b and a quantity threshold value; wherein the first occupancy rate threshold value is larger than the second occupancy rate threshold value, a is larger than 0 and smaller than 1, and b is larger than 1;
when the occupancy rate of a CPU or a memory is greater than the first occupancy rate threshold value, 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 value and the number of the data interaction requests is larger than the number threshold value, 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 is specifically:
and the upper computer periodically generates request tokens carrying thread concurrency numbers based on the token generation rate, and sequentially stores each request token in a token bucket according to the generation time.
Further, the request token adjusting module specifically includes:
the method comprises the steps that an independent monitoring thread is established by an upper computer, the occupancy rates of a CPU and a memory of the upper computer and the number of data interaction requests are monitored in real time by the aid of the independent thread, the token generation rate and the thread concurrency number are dynamically adjusted by the aid of token generation rules, the occupancy rates and the number of the data interaction requests, and then the speed of the request tokens put into a token bucket and the thread concurrency number carried by the request tokens are homomorphically adjusted.
Further, the data interaction module specifically includes:
the upper computer receives data interaction requests sent by the middle computers, requests tokens are sequentially inquired from the token bucket through a multithreading technology based on the data interaction requests,
if the request token exists, adjusting the number of threads of the upper computer based on the threads 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;
if the request token does not exist, when waiting for the token bucket to store a new request token, adjusting the thread quantity 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 upper computer creates a token generation rate, a thread concurrency number, a token generation rule and a token bucket, generates a request token based on the initial token generation rate and the thread concurrency number and stores the request token into the token bucket, and then dynamically adjusting the token generation rate and the thread concurrency number based on the token generation rule to generate a new request token, namely, the generation speed of the request token and the number of the thread concurrency carried by the request token are dynamically adjusted based on the occupancy rates of the CPU and the memory and the number of data interaction requests, the data interaction of the upper computer and the middle computer is based on the request token, the current of the lithium battery test channel is limited by adjusting the generation speed of the request token and the number of the thread concurrency carried by the request token, so that the resource occupancy rate of the upper computer is in a constant median, the stability of the operation of the lithium battery test system is improved, and the collapse of the lithium battery test system and the loss of test data are avoided.
Drawings
The invention will be further described with reference to the following examples with reference to the accompanying drawings.
FIG. 1 is a flow chart of a method for limiting current in a test channel of a lithium battery according to the present invention.
Fig. 2 is a schematic structural diagram of a current limiting system of a lithium battery test channel according to the present invention.
Fig. 3 is a hardware architecture diagram of the present invention.
Detailed Description
The technical scheme in the embodiment of the application has the following general idea: the generation speed of the request token and the thread concurrency number carried by the request token are dynamically adjusted through the general token bucket algorithm, and the data interaction of the upper computer and the middle computer is based on the request token, so that the current limitation is performed on the lithium battery test channel, 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, establishing 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 rates of the CPU and the memory in real time, monitors the use condition of hardware resources of the upper computer 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 on the basis of the request token in the token bucket.
The token generation rate and the thread concurrency number of the request tokens are controlled through the token bucket algorithm, and then the current limitation is carried out on the lithium battery test channel, so that the operation stability is guaranteed.
In 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 is specifically as follows:
setting a first occupancy rate threshold value, a second occupancy rate threshold value, an adjustment coefficient a, an adjustment coefficient b and a quantity threshold value; wherein the first occupancy rate threshold value is larger than the second occupancy rate threshold value, a is larger than 0 and smaller than 1, and b is larger than 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 a CPU or a memory is greater than the first occupancy rate threshold value, 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 value and the number of the data interaction requests is larger than the number threshold value, 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 the upper computer periodically generates request tokens carrying thread concurrency numbers based on the token generation rate, and sequentially stores each request token in a token bucket according to the generation time. Namely, the request token is stored in a token bucket in a message queue mode, and the first-in first-out, the last-in last-out and the last-out are carried out.
The step S30 specifically includes:
the method comprises the steps that an independent monitoring thread is established by an upper computer, the occupancy rates of a CPU and a memory of the upper computer and the number of data interaction requests are monitored in real time by the aid of the independent thread, the generation rate of tokens and the thread concurrency number are dynamically adjusted by the aid of token generation rules, the occupancy rates and the number of the data interaction requests, and the speed of the request tokens put into a token bucket and the thread concurrency number carried by the request tokens are further adjusted in a homomorphic mode; 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 testing system is further improved.
For example, when the occupancy rate of the CPU or the memory is more than 80%, the token generation rate and the thread concurrency number are multiplied by 0.7; when the occupancy rate of a CPU or a memory is less than 30% and the number of data interaction requests is more than 4000, multiplying the token generation rate and the thread concurrency number by 1.3; and generating a new request token based on the adjusted token generation rate and the thread concurrency number and storing the new request token into a token bucket.
The step S40 specifically includes:
the upper computer receives data interaction requests sent by the middle computers, requests tokens are sequentially inquired from the token bucket through a multithreading technology based on the data interaction requests,
if the request token exists, adjusting the number of threads of the upper computer based on the threads 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;
if the request token does not exist, when waiting for the token bucket to store a new request token, adjusting the thread quantity 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 the request token, and the interaction frequency can be adjusted by adjusting the token generation rate.
The invention discloses a preferred embodiment of a lithium battery test channel current limiting system, which comprises the following modules:
the rule creating module is used for creating a token generating rate, a thread concurrency number, a token generating rule and a token bucket on the upper computer;
the request token generation module is used for periodically generating request tokens by the upper computer based on the token generation rate and the thread concurrency number and putting each request token into a token bucket;
the request token adjusting module is used for monitoring the occupancy rates of the CPU and the memory in real time by the upper computer, immediately monitoring the hardware resource use condition of the upper computer, and further dynamically adjusting the token generation rate and the thread concurrency number by utilizing the token generation rule;
and the data interaction module is used for the upper computer to interact with the middle computer based on the request token in the token bucket.
The token generation rate and the thread concurrency number of the request tokens are controlled through a token bucket algorithm, and then the current limitation is carried out on the lithium battery test channel, so that the operation stability is guaranteed.
In the rule creating 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 is specifically as follows:
setting a first occupancy rate threshold value, a second occupancy rate threshold value, an adjustment coefficient a, an adjustment coefficient b and a quantity threshold value; wherein the first occupancy rate threshold value is larger than the second occupancy rate threshold value, a is larger than 0 and smaller than 1, and b is larger than 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 a CPU or a memory is greater than the first occupancy rate threshold value, 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 value and the number of the data interaction requests is larger than the number threshold value, 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 is specifically:
and the upper computer periodically generates request tokens carrying thread concurrency numbers based on the token generation rate, and sequentially stores each request token in a token bucket according to the generation time. Namely, the request token is stored in a token bucket in a message queue mode, and the first-in first-out, the last-in last-out and the last-out are carried out.
The request token adjusting module is specifically:
the method comprises the steps that an independent monitoring thread is established by an upper computer, the occupancy rates of a CPU and a memory of the upper computer and the number of data interaction requests are monitored in real time by the aid of the independent thread, the generation rate of tokens and the thread concurrency number are dynamically adjusted by the aid of token generation rules, the occupancy rates and the number of the data interaction requests, and the speed of the request tokens put into a token bucket and the thread concurrency number carried by the request tokens are further adjusted in a homomorphic mode; 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 testing system is further improved.
For example, when the occupancy rate of the CPU or the memory is more than 80%, the token generation rate and the thread concurrency number are multiplied by 0.7; when the occupancy rate of a CPU or a memory is less than 30% and the number of data interaction requests is more than 4000, multiplying the token generation rate and the thread concurrency number by 1.3; and generating a new request token based on the adjusted token generation rate and the thread concurrency number and storing the new request token into a token bucket.
The data interaction module is specifically as follows:
the upper computer receives data interaction requests sent by the middle computers, requests tokens are sequentially inquired from the token bucket through a multithreading technology based on the data interaction requests,
if the request token exists, adjusting the number of threads of the upper computer based on the threads 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;
if the request token does not exist, waiting for the token bucket to store a new request token, adjusting the thread quantity of the upper computer based on the thread carried by the request token and the thread quantity of the upper computer, 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 the request token, and the interaction frequency can be adjusted by adjusting the token generation rate.
In summary, the invention has the advantages that:
the upper computer creates a token generation rate, a thread concurrency number, a token generation rule and a token bucket, generates a request token based on the initial token generation rate and the thread concurrency number and stores the request token into the token bucket, and then dynamically adjusting the token generation rate and the thread concurrency number based on the token generation rule to generate a new request token, namely, the generation speed of the request token and the number of the thread concurrency carried by the request token are dynamically adjusted based on the occupancy rates of the CPU and the memory and the number of data interaction requests, the data interaction of the upper computer and the middle computer is based on the request token, the current of the lithium battery test channel is limited by adjusting the generation speed of the request token and the number of the thread concurrency carried by the request token, so that the resource occupancy rate of the upper computer is in a constant median, the stability of the operation of the lithium battery test system is improved, and the collapse of the lithium battery test system and the loss of test data are avoided.
Although specific embodiments of the invention have been described above, it will be understood by those skilled in the art that the specific embodiments described are illustrative only and are not limiting upon the scope of the invention, and that equivalent modifications and variations can be made by those skilled in the art without departing from the spirit of the invention, which is to be limited only by the appended claims.

Claims (10)

1. A lithium battery test channel current limiting method is characterized in that: the method comprises the following steps:
step S10, establishing 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 rates 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 token in the token bucket.
2. The current-limiting method of a lithium battery test channel as recited in claim 1, wherein: in 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 is specifically as follows:
setting a first occupancy rate threshold value, a second occupancy rate threshold value, an adjustment coefficient a, an adjustment coefficient b and a quantity threshold value; wherein the first occupancy rate threshold value is larger than the second occupancy rate threshold value, a is larger than 0 and smaller than 1, and b is larger than 1;
when the occupancy rate of a CPU or a memory is greater than the first occupancy rate threshold value, 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 value and the number of the data interaction requests is larger than the number threshold value, 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.
3. The current-limiting method of a lithium battery test channel as recited in claim 1, wherein: the step S20 specifically includes:
and the upper computer periodically generates request tokens carrying concurrent threads based on the token generation rate, and sequentially stores each request token to a token bucket according to the generation time.
4. The current-limiting method of a lithium battery test channel as recited in claim 1, wherein: the step S30 specifically includes:
the method comprises the steps that an independent monitoring thread is established by an upper computer, the occupancy rates of a CPU and a memory of the upper computer and the number of data interaction requests are monitored in real time by the aid of the independent thread, the token generation rate and the thread concurrency number are dynamically adjusted by the aid of token generation rules, the occupancy rates and the number of the data interaction requests, and then the speed of the request tokens put into a token bucket and the thread concurrency number carried by the request tokens are homomorphically adjusted.
5. The current-limiting method of a lithium battery test channel as recited in claim 1, wherein: the step S40 specifically includes:
the upper computer receives data interaction requests sent by the middle computers, requests tokens are sequentially inquired from the token bucket through a multithreading technology based on the data interaction requests,
if the request token exists, adjusting the number of threads of the upper computer based on the threads 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;
if the request token does not exist, when waiting for the token bucket to store a new request token, adjusting the thread quantity 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.
6. The utility model provides a lithium cell test channel current limiting system which characterized in that: the system comprises the following modules:
the rule creating module is used for creating a token generating rate, a thread concurrency number, a token generating rule and a token bucket on the upper computer;
the request token generation module is used for periodically generating request tokens by the upper computer based on the token generation rate and the thread concurrency number and putting each request token into a token bucket;
the request token adjusting module is used for monitoring the occupancy rates of the CPU and the memory in real time by the upper computer and further dynamically adjusting the token generation rate and the thread concurrency number by utilizing the token generation rule;
and the data interaction module is used for the upper computer to interact with the middle computer based on the request token in the token bucket.
7. The lithium battery test channel current limiting system of claim 6, wherein: in the rule creating 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 is specifically as follows:
setting a first occupancy rate threshold value, a second occupancy rate threshold value, an adjustment coefficient a, an adjustment coefficient b and a quantity threshold value; wherein the first occupancy rate threshold value is larger than the second occupancy rate threshold value, a is larger than 0 and smaller than 1, and b is larger than 1;
when the occupancy rate of a CPU or a memory is greater than the first occupancy rate threshold value, 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 value and the number of the data interaction requests is larger than the number threshold value, 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.
8. The lithium battery test channel current limiting system of claim 6, wherein: the request token generation module is specifically:
and the upper computer periodically generates request tokens carrying thread concurrency numbers based on the token generation rate, and sequentially stores each request token in a token bucket according to the generation time.
9. The lithium battery test channel current limiting system of claim 6, wherein: the request token adjusting module is specifically:
the method comprises the steps that an independent monitoring thread is established by an upper computer, the occupancy rates of a CPU and a memory of the upper computer and the number of data interaction requests are monitored in real time by the aid of the independent thread, the token generation rate and the thread concurrency number are dynamically adjusted by the aid of token generation rules, the occupancy rates and the number of the data interaction requests, and then the speed of the request tokens put into a token bucket and the thread concurrency number carried by the request tokens are homomorphically adjusted.
10. The lithium battery test channel current limiting system of claim 6, wherein: the data interaction module specifically comprises:
the upper computer receives data interaction requests sent by the middle computers, requests tokens are sequentially inquired from the token bucket through a multithreading technology based on the data interaction requests,
if the request token exists, adjusting the number of threads of the upper computer based on the threads 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;
if the request token does not exist, waiting for the token bucket to store a new request token, adjusting the thread quantity of the upper computer based on the thread carried by the request token and the thread quantity of the upper computer, 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 true CN114726798A (en) 2022-07-08
CN114726798B 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 (14)

* 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
CN102984081A (en) * 2012-10-30 2013-03-20 盛科网络(苏州)有限公司 Method and system of message processing in network equipment
WO2015043528A1 (en) * 2013-09-30 2015-04-02 华为技术有限公司 Parallel multi-thread message processing method and device
CN105791985A (en) * 2014-12-22 2016-07-20 深圳Tcl数字技术有限公司 Method and device for downloading media stream data
CN205901804U (en) * 2016-07-28 2017-01-18 重庆中科云丛科技有限公司 Big data file uploads system fast
CN106557369A (en) * 2016-11-25 2017-04-05 武汉斗鱼网络科技有限公司 A kind of management method and system of multithreading
CN109885470A (en) * 2019-03-04 2019-06-14 上海拉扎斯信息科技有限公司 Method of adjustment, device, storage medium and the electronic equipment of thread pool
CN110297743A (en) * 2018-03-21 2019-10-01 财付通支付科技有限公司 A kind of load test approach, device and storage medium
CN110932994A (en) * 2019-12-31 2020-03-27 深圳云天励飞技术有限公司 Data traffic processing method and device, electronic equipment and storage medium
CN113381944A (en) * 2021-06-09 2021-09-10 中国工商银行股份有限公司 System current limiting method, apparatus, electronic device, medium, and program product
CN113467933A (en) * 2021-06-15 2021-10-01 济南浪潮数据技术有限公司 Thread pool optimization method, system, terminal and storage medium for distributed file system
CN113835854A (en) * 2021-09-06 2021-12-24 ***股份有限公司 Task processing method and device
WO2022012054A1 (en) * 2020-07-17 2022-01-20 苏州浪潮智能科技有限公司 Method, system and device for dynamically preventing traffic attacks, and storage medium
CN113961338A (en) * 2021-09-17 2022-01-21 国网电力科学研究院有限公司 Management system and management method of dynamic thread pool and thread task processing method

Patent Citations (14)

* 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
CN102984081A (en) * 2012-10-30 2013-03-20 盛科网络(苏州)有限公司 Method and system of message processing in network equipment
WO2015043528A1 (en) * 2013-09-30 2015-04-02 华为技术有限公司 Parallel multi-thread message processing method and device
CN105791985A (en) * 2014-12-22 2016-07-20 深圳Tcl数字技术有限公司 Method and device for downloading media stream data
CN205901804U (en) * 2016-07-28 2017-01-18 重庆中科云丛科技有限公司 Big data file uploads system fast
CN106557369A (en) * 2016-11-25 2017-04-05 武汉斗鱼网络科技有限公司 A kind of management method and system of multithreading
CN110297743A (en) * 2018-03-21 2019-10-01 财付通支付科技有限公司 A kind of load test approach, device and storage medium
CN109885470A (en) * 2019-03-04 2019-06-14 上海拉扎斯信息科技有限公司 Method of adjustment, device, storage medium and the electronic equipment of thread pool
CN110932994A (en) * 2019-12-31 2020-03-27 深圳云天励飞技术有限公司 Data traffic processing method and device, electronic equipment and storage medium
WO2022012054A1 (en) * 2020-07-17 2022-01-20 苏州浪潮智能科技有限公司 Method, system and device for dynamically preventing traffic attacks, and storage medium
CN113381944A (en) * 2021-06-09 2021-09-10 中国工商银行股份有限公司 System current limiting method, apparatus, electronic device, medium, and program product
CN113467933A (en) * 2021-06-15 2021-10-01 济南浪潮数据技术有限公司 Thread pool optimization method, system, terminal and storage medium for distributed file system
CN113835854A (en) * 2021-09-06 2021-12-24 ***股份有限公司 Task processing method and device
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
CN114726798B (en) 2023-07-18

Similar Documents

Publication Publication Date Title
CN102004670B (en) Self-adaptive job scheduling method based on MapReduce
CN108632365A (en) Service Source method of adjustment, relevant apparatus and equipment
US7441240B2 (en) Process scheduling apparatus, process scheduling method, program for process scheduling, and storage medium recording a program for process scheduling
US20160378570A1 (en) Techniques for Offloading Computational Tasks between Nodes
CN104978232A (en) Computation resource capacity expansion method for real-time stream-oriented computation, computation resource release method for real-time stream-oriented computation, computation resource capacity expansion device for real-time stream-oriented computation and computation resource release device for real-time stream-oriented computation
US20230244537A1 (en) Efficient gpu resource allocation optimization method and system
CN106528065B (en) A kind of thread acquisition methods and equipment
CN107193649B (en) Task scheduling method and device based on NUMA system
US20090113440A1 (en) Multiple Queue Resource Manager
US20060277317A1 (en) Providing flow control and moderation in a distributed message processing system
CN106201443A (en) A kind of method and system based on the Storm how concurrent written document of streaming Computational frame
CN105760459A (en) Distributed data processing system and method
CN102768637A (en) Method and device for controlling test execution
CN112685298A (en) Code coverage testing method and device for application program and electronic equipment
CN112231098A (en) Task processing method, device, equipment and storage medium
CN105100500A (en) Mobile cloud computing based critical data offloading method
CN111148052B (en) State determination method, system, medium, and electronic device
CN104750546B (en) A kind of method and system for adjusting connection pool
CN114726798B (en) Lithium battery test channel current limiting method and system
CN104503885A (en) Timing door watching device and system
CN111580950A (en) Self-adaptive feedback resource scheduling method for improving cloud reliability
CN111176847B (en) Method and device for optimizing performance of big data cluster on physical core ultra-multithreading server
CN117112121A (en) Distributed task processing system, method, apparatus and computer program product
CN111930304B (en) Data acquisition speed control method, equipment and storage medium
CN109302723A (en) A kind of multinode real-time radio pyroelectric monitor control system Internet-based and control method

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