Production and consumption balancing method of energy storage equipment and electronic equipment
By monitoring the coefficient of variation and accumulation rate of energy storage devices and cloud in real time in the proxy server, push notification messages to adjust the push volume of energy storage devices, the proxy server OOM problem caused by abnormal energy storage devices and cloud is solved, and the system operation is improved Efficiency and resource utilization.
Patent Information
- Application Number
- CN202411577483.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2044-11-05
AI Technical Summary
Energy storage equipment and the cloud cause abnormality of proxy server memory overflow (OOM) and the existing technology only performs post-repair repairs, wasting operation and maintenance resources and affecting system efficiency.
The proxy server obtains the production variation coefficient and consumption variation coefficient of energy storage equipment and the cloud, calculates the accumulation rate and estimated consumption time, push notification messages when an abnormality occurs, adjusts the push volume of energy storage equipment, and achieves adaptive balance of production and consumption Rate, avoid OOM exceptions.
It effectively reduces the probability of OOM abnormality of proxy servers, reduces waste of operation and maintenance resources, and improves the operation efficiency of the entire system.
Smart Images

Figure CN119065862A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of energy storage technology, and in particular to a production and consumption balancing method for energy storage equipment and an electronic device. Background Art
[0002] At present, energy storage devices act as producers and the cloud acts as consumers. Energy storage devices and the cloud are generally connected based on a middleware, namely a proxy server. The energy storage device pushes messages to the proxy server, and the cloud obtains messages from the proxy server. In the related art, the energy storage device may have an unstable rate of pushing production messages and the cloud may have an unstable rate of consuming production messages.
[0003] The situation where the rate at which the energy storage device pushes production messages as a producer is unstable is as follows: the producer pushes production messages such as battery cell data to the proxy server mqtt broker, but when the producer network is unstable or directly disconnected from the network, the rate at which the producer pushes production messages is 0, but the producer will generate a large number of production messages locally. After the energy storage device is reconnected, it will push a large number of production messages that have not been pushed locally to the proxy server mqttbroker. At this time, the rate at which the producer pushes production messages will far exceed the original normal rate (for example, reaching 10 times the original rate). In these cases, there will be the following problems: Because the producer suddenly pushes a large amount of battery cell data, when the consumer rate remains unchanged, too many messages are accumulated in the proxy server mqtt broker. More seriously, it may even cause the proxy server mqtt broker to have an excessive memory load, resulting in a memory overflow (OOM, Out Of Memory) exception.
[0004] The situation when the cloud consumes production messages as a consumer and the rate is unstable is as follows: when the consumer consumes production messages such as battery cell data, due to the blockage of related components or network fluctuations, the rate at which the consumer consumes production messages will slow down (for example, the consumption rate is only 50% of the original). Long-term message accumulation may cause the cloud to display data untimely, and more seriously, it may even cause OOM abnormalities due to excessive memory load on the proxy server.
[0005] In the related technology, when an abnormality occurs in the energy storage device or the cloud, causing an OOM abnormality problem in the proxy server, the energy storage device will be notified to stop pushing data and the cloud will stop consuming data, so that the energy storage device and the cloud will be restarted after the abnormality is repaired. However, this method is only a post-repair of the OOM abnormality problem, which not only wastes operation and maintenance resources, but also affects the efficiency of the entire system operation. Summary of the invention
[0006] The purpose of the embodiments of the present application is to provide a production and consumption balancing method and electronic device for energy storage equipment, so as to adaptively balance the production and consumption rates when an abnormality occurs in the energy storage equipment or the cloud, reduce the probability of OOM abnormalities in the proxy server, reduce the waste of operation and maintenance resources, and improve the efficiency of the entire system operation.
[0007] To solve the above technical problems, an embodiment of the present application provides a production and consumption balancing method for an energy storage device, which is applied to a proxy server, wherein the proxy server is connected to an energy storage device and a cloud; the proxy server, the energy storage device, and the cloud are connected to each other based on the MQTT protocol; a business memory queue and an abnormal notification queue are arranged inside the proxy server; the energy storage device pushes production messages to the business memory queue, and the cloud consumes the production messages from the business memory queue; the method comprises: obtaining in real time the production variation coefficient of the production message pushed by the energy storage device and obtaining the consumption variation coefficient of the production message consumed by the cloud; when the production variation coefficient is greater than a first threshold value and / or the consumption variation coefficient is greater than a second threshold value, obtaining a target data volume A of the production message consumed by the cloud in the current unit time; calculating an accumulation rate D according to a preset length B of the business memory queue and a data volume C of the production message currently contained in the business memory queue, and / or, according to the The data volume C and the target data volume A are used to obtain the estimated consumption time E of the data volume C of the production message currently contained in the business memory queue that is estimated to be consumed by the cloud; when the accumulation rate D is greater than the preset accumulation rate or the estimated consumption time E is greater than the preset consumption time, an abnormal notification message is pushed to the abnormal notification queue, so that when the energy storage device monitors the update of the abnormal notification queue, the energy storage device determines the push amount of the production message pushed by the energy storage device in a preset manner, and the energy storage device pushes according to the push amount; after the energy storage device pushes according to the push amount, the proxy server re-executes the steps of obtaining the production variation coefficient of the production message pushed by the energy storage device and obtaining the consumption variation coefficient of the production message consumed by the cloud, until the production variation coefficient is less than or equal to the first threshold and the consumption variation coefficient is less than or equal to the second threshold, or, until D is less than or equal to the preset accumulation rate and / or E is less than or equal to the preset consumption time. An embodiment of the present application also provides a production and consumption balancing method for an energy storage device, which is applied to the energy storage device, the energy storage device is connected to a proxy server, and the proxy server is also connected to the cloud; the proxy server, the energy storage device, and the cloud are connected based on the MQTT protocol communication; a business memory queue and an exception notification queue are set inside the proxy server; the energy storage device pushes production messages to the business memory queue, and the cloud consumes the production messages from the business memory queue; the method comprises: monitoring the exception notification queue in real time; when the update of the exception notification queue is monitored, determining the push amount of the production message pushed by the energy storage device according to a preset method; wherein, when the accumulation rate D is greater than the preset accumulation rate or the estimated consumption time E is greater than the preset consumption time, the proxy server pushes the exception notification message to the exception notification queue, and the proxy server obtains the accumulation rate D and / or the estimated consumption time E in the following manner: the proxy server obtains the production variation coefficient of the production message pushed by the energy storage device and the consumption variation coefficient of the cloud consuming the production message in real time; When the production variation coefficient is greater than the first threshold and / or the consumption variation coefficient is greater than the second threshold, the target data volume A of the production message consumed by the cloud in the current unit time is obtained; the accumulation rate D is calculated according to the preset length B of the business memory queue and the data volume C of the production message currently contained in the business memory queue, and / or, the estimated consumption time E of the cloud estimated to consume the data volume C of the production message currently contained in the business memory queue is obtained according to the data volume C and the target data volume A; the production message is pushed to the business memory queue according to the push volume; wherein, after the energy storage device pushes according to the push volume, the proxy server re-executes the steps of obtaining the production variation coefficient of the production message pushed by the energy storage device and obtaining the consumption variation coefficient of the production message consumed by the cloud, until the production variation coefficient is less than or equal to the first threshold and the consumption variation coefficient is less than or equal to the second threshold, or, until the accumulation rate D is less than or equal to the preset accumulation rate and / or the estimated consumption time E is less than or equal to the preset consumption time.
[0008] An embodiment of the present application also provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the production and consumption balancing method of the energy storage device as described above.
[0009] In some embodiments, the proxy server is provided with a first sliding window calculation component and a rolling window calculation component; when the production variation coefficient is greater than a first threshold value and / or the consumption variation coefficient is greater than a second threshold value, the target data volume A of the production message consumed by the cloud in the current unit time is obtained, including: when the production variation coefficient is greater than the first threshold value, obtaining the target data volume A of the production message consumed by the cloud in the current unit time through the rolling window calculation component; when the consumption variation coefficient is greater than the second threshold value, obtaining the first data volume of the production message consumed by the cloud in each unit time within a first preset time range before the current moment through the first sliding window calculation component, averaging multiple first data volumes to obtain a first average data volume, and the first average data volume is the target data volume A of the production message consumed by the cloud in the current unit time.
[0010] In some embodiments, the proxy server is provided with a second sliding window calculation component; when the production variation coefficient is greater than a first threshold value and / or the consumption variation coefficient is greater than a second threshold value, the target data volume A of the production message consumed by the cloud in the current unit time is obtained, including: when the production variation coefficient is greater than the first threshold value and / or the consumption variation coefficient is greater than the second threshold value, the first data volume of the production message consumed by the cloud in each unit time within a first preset time range before the current moment is obtained through the second sliding window calculation component, and multiple first data volumes are averaged to obtain a first average data volume, and the first average data volume is the target data volume A of the production message consumed by the cloud in the current unit time.
[0011] In some embodiments, the real-time acquisition of the production variation coefficient of the production message pushed by the energy storage device includes: acquiring a second data volume of the production message pushed by the energy storage device at each unit time within a second preset time range before the current moment; averaging multiple second data volumes to obtain a second average data volume; taking the variance of multiple second data volumes to obtain a first standard deviation; and calculating the production variation coefficient based on the second average data volume and the first standard deviation.
[0012] In some embodiments, obtaining the consumption variation coefficient of the production message consumed by the cloud includes: obtaining a third data volume of the production message consumed by the cloud at each unit time within a third preset time range before the current moment; averaging multiple third data volumes to obtain a third average data volume; taking the variance of multiple third data volumes to obtain a second standard deviation; and calculating the consumption variation coefficient based on the third average data volume and the second standard deviation.
[0013] The technical solution provided by the embodiments of the present application has at least the following advantages: The production variation coefficient and the consumption variation coefficient are obtained through the proxy server. When one of the production variation coefficient and the consumption variation coefficient is greater than the corresponding threshold, the target data volume A consumed in the current unit time on the cloud is obtained. Since the preset length B of the business memory queue and the data volume C of the production message currently contained in the business memory queue are the attribute information of the queue, they can be directly obtained. Then, the accumulation rate D and / or the estimated consumption time E are calculated according to A, B, and C. If the accumulation rate D is greater than the preset accumulation rate or the estimated consumption time E is greater than the preset consumption time, it is determined that an abnormality has occurred, and the abnormal notification message is pushed to the abnormal notification queue. When the energy storage device monitors the abnormal notification queue to update the abnormal notification message, it determines the push amount according to the preset method, thereby continuously cycling to obtain a balanced state, achieving adaptive balancing of production and consumption rates, avoiding OOM abnormalities in the proxy server, reducing the waste of operation and maintenance resources, and improving the efficiency of the entire system operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0015] Figure 1 is a flow chart of a production and consumption balance method for energy storage equipment according to an embodiment of the present application; Figure 2 is a structural schematic diagram of a production and consumption balance system according to an embodiment of the present application; Figure 3 is a structural schematic diagram of a production and consumption balance system according to an embodiment of the present application; Figure 4 is a flow chart of a production and consumption balance method for energy storage equipment according to an embodiment of the present application; Figure 5 is a schematic diagram of a window of a first sliding window computing component sliding over time according to an embodiment of the present application; Figure 6 is a structural schematic diagram of a production and consumption balance system according to an embodiment of the present application; Figure 7 is a flow chart of a production and consumption balance method for energy storage equipment according to an embodiment of the present application; Figure 8 is a flow chart of a production and consumption balance method for energy storage equipment according to an embodiment of the present application; Fig. 9is a flow chart of a production and consumption balance method for energy storage equipment according to an embodiment of the present application; Fig.10 It is a structural schematic diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0016] As can be seen from the background technology, when the network of the energy storage device is unstable or off-grid, the messages produced by the energy storage device will be accumulated locally in the energy storage device. When the energy storage device is connected to the network normally, the locally accumulated data will be pushed to the proxy server in large quantities. When the cloud consumption rate remains unchanged, the memory load of the proxy server will be too large, resulting in OOM and abnormal problems. When the cloud-related components are blocked or the cloud network fluctuates, the energy storage device will continue to push messages to the proxy server. Long-term message accumulation will cause the memory load of the proxy server to be too large, resulting in OOM abnormal problems.
[0017] It can be seen that no matter whether the producer or the consumer has an abnormality, it will cause the proxy server to have an OOM abnormality problem. When an abnormality occurs in the energy storage device or the cloud, causing the proxy server to have an OOM abnormality problem, the energy storage device will be notified to stop pushing data and the cloud will stop consuming data, so that the energy storage device and the cloud can be restarted after the abnormality is repaired. However, this method is only a post-repair of the OOM abnormality problem, which not only wastes operation and maintenance resources, but also affects the efficiency of the entire system operation.
[0018] Therefore, this embodiment obtains the production variation coefficient and the consumption variation coefficient through the proxy server. When one of the production variation coefficient and the consumption variation coefficient is greater than the corresponding threshold value, the target data volume A consumed in the current unit time on the cloud is obtained, and then the accumulation rate D and / or the estimated consumption time E are calculated according to the target data volume A, the preset length B of the business memory queue, and the data volume C of the production messages currently contained in the business memory queue. When an abnormality occurs in the accumulation rate D and / or the estimated consumption time E, the abnormal notification message is pushed to the abnormal notification queue. When the energy storage device monitors the abnormal notification queue to update the abnormal notification message, it determines the push amount of the energy storage device according to the preset method, thereby continuously cycling to obtain a balanced state, achieving adaptive balancing of the production and consumption rates, avoiding OOM abnormalities in the proxy server, reducing the waste of operation and maintenance resources, and improving the efficiency of the entire system operation.
[0019] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the embodiments of the present application will be described in detail below in conjunction with the accompanying drawings. However, it will be appreciated by those skilled in the art that in the present application, many technical details are proposed in order to enable the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present application can also be implemented. The division of the following embodiments is for the convenience of description, and the specific implementation of the present application should not be construed as any limitation, and the various embodiments can be combined and referenced with each other under the premise of no contradiction.
[0020] An embodiment of the present application relates to a production and consumption balancing method for energy storage equipment, which is applied to a proxy server. The flowchart of the production and consumption balancing method for energy storage equipment is as follows: Figure 1 As shown, the following steps are included: Step 101, obtaining in real time the production variation coefficient of the production message pushed by the energy storage device and the consumption variation coefficient of the production message consumed by the cloud.
[0021] Specifically, the execution subject of this embodiment is a proxy server, which is connected to the energy storage device and the cloud. The proxy server, the energy storage device and the cloud together constitute a production and consumption balance system. Figure 2 As shown, it is a structural diagram of the production and consumption balance system corresponding to the present embodiment. The production and consumption balance system includes an energy storage device 10, a proxy server 20, and a cloud 30. The proxy server 20, the energy storage device 10, and the cloud 30 are connected in communication based on the MQTT (Message Queuing Telemetry Transport) protocol. A business memory queue 20a and an abnormal notification queue 20b are arranged inside the proxy server. The energy storage device 10 pushes production messages to the business memory queue 20a, and the cloud consumes production messages from the business memory queue 20a.
[0022] The energy storage device of this embodiment is a producer, and the cloud is a consumer. The energy storage device 10, the proxy server 20, and the cloud 30 communicate based on the MQTT protocol. MQTT is a client-server based message publishing / subscription transmission protocol, which is lightweight, simple, open, and easy to implement. In actual applications, the energy storage device 10, as a producer, continuously pushes production messages during operation, and pushes the production messages to the business memory queue 20a of the proxy server 20. The cloud 30, as a consumer, continuously consumes production messages from the business memory queue 20a. The production messages consumed by the cloud 30 will be removed from the business memory queue 20a.
[0023] Step 102, when the production variation coefficient is greater than the first threshold and / or the consumption variation coefficient is greater than the second threshold, obtain the target data volume A of the production messages consumed by the cloud in the current unit time.
[0024] Specifically, under normal circumstances, the rate at which producers push production messages and the rate at which consumers consume production messages are not much different, and a good balance can be achieved. At this time, the stability of producers pushing production messages, that is, the production variation coefficient is less than or equal to the first threshold, and the rate at which consumers consume production messages is stable, that is, the consumption variation coefficient is less than or equal to the second threshold; however, when the producer is abnormal, the rate at which producers push production messages will become unstable, that is, the production variation coefficient will be greater than the first threshold, and when the consumer is abnormal, the rate at which consumers consume production messages will become unstable, that is, the consumption variation coefficient will be greater than the second threshold. When any of the producer or consumer is abnormal, the target data volume A of production messages consumed by the cloud in the current unit time will be obtained.
[0025] Specifically, the production variation coefficient of the production message pushed by the energy storage device is obtained, and the specific implementation method is as follows: the proxy server obtains the second data volume of the production message pushed by the energy storage device per unit time within a second preset time range before the current moment; averages multiple second data volumes to obtain a second average data volume; takes the variance of multiple second data volumes to obtain a first standard deviation; and calculates the production variation coefficient based on the second average data volume and the first standard deviation.
[0026] In actual applications, the second preset time can be 1 minute, each unit time is 1 second, the second average data volume is the average value of production messages pushed by producers per second within 1 minute before the current moment (denoted as μ1), and the first standard deviation is the standard deviation of production messages pushed by producers per second within 1 minute before the current moment (denoted as σ1). The production coefficient of variation CV1 is calculated (CV1=σ1 / μ1). The first threshold can be set to 20%. If CV1>20%, it means that the producer fluctuates too much. At this time, enter step 102. If CV1≤20%, it means that the production coefficient of variation is normal at this time.
[0027] Specifically, the consumption variation coefficient of the cloud-based consumption production messages is obtained, and the specific implementation method is as follows: the proxy server obtains the third data volume of the cloud-based production messages consumed per unit time within a third preset time range before the current moment; averages multiple third data volumes to obtain a third average data volume; takes the variance of multiple third data volumes to obtain a second standard deviation; and calculates the consumption variation coefficient based on the third average data volume and the second standard deviation.
[0028] In actual applications, the third preset time can be 1 minute, each unit time is 1 second, the third average data volume is the average value of the production messages consumed by consumers per second within 1 minute before the current moment (denoted as μ2), and the second standard deviation is the standard deviation of the production messages pushed by consumers per second within 1 minute before the current moment (denoted as σ2). The consumption variation coefficient CV2 (CV2=σ2 / μ2) is calculated, and the second threshold value can be set to 20%. If CV2>20%, it means that the consumer fluctuation is too large. At this time, enter step 102. If CV2≤20%, it means that the consumption variation coefficient is normal at this time. The third preset time can be the same as or different from the second preset time, and the first threshold value can be the same as or different from the second threshold value. It is set according to actual needs and is not limited in this embodiment.
[0029] It should be noted that a list of production and consumption data is set up inside the proxy server, which records the amount of production messages pushed by the producer per unit time, such as per second, and the amount of production messages consumed by the consumer per unit time, such as per second. According to the list, the amount of production messages pushed by the energy storage device per unit time and the amount of production messages consumed by the cloud per unit time can be obtained, thereby calculating the production variation coefficient and the consumption variation coefficient.
[0030] Step 103, calculate the accumulation rate D based on the preset length B of the business memory queue and the data volume C of the production messages currently contained in the business memory queue, and / or, based on C and A, obtain the estimated consumption time E of the data volume C of the production messages currently contained in the cloud-based estimated consumption business memory queue.
[0031] Specifically, the preset length B of the business memory queue and the data volume C of the production messages currently contained in the business memory queue are the attribute information of the queue, which can be directly obtained by the proxy server for calculating the accumulation rate D and the estimated consumption time E; among which, the accumulation rate D=C / B, the estimated consumption time E=C / A, and the estimated consumption time E indicates how many seconds it will take to complete the consumption of all production messages in the business memory queue.
[0032] Step 104, when D is greater than the preset accumulation rate or E is greater than the preset consumption time, an abnormal notification message is pushed to the abnormal notification queue, so that when the energy storage device monitors the update of the abnormal notification queue, the energy storage device determines the push amount of production messages pushed by the energy storage device according to the preset method, and the energy storage device pushes according to the push amount.
[0033] Specifically, this embodiment can calculate only one of the stacking rate D and the estimated consumption time E, or can calculate both the stacking rate D and the estimated consumption time E. When only the stacking rate D is calculated, it is only necessary to determine whether the calculated stacking rate D meets the requirement, that is, the stacking rate D is less than or equal to the preset stacking rate. When it is determined that the stacking rate D is greater than the preset stacking rate, it is determined that an abnormality has occurred; when only the estimated consumption time E is calculated, it is only necessary to determine whether the estimated consumption time E meets the requirement, that is, the estimated consumption time E is less than or equal to the preset consumption time. When it is determined that the estimated consumption time E is greater than the preset consumption time, it is determined that an abnormality has occurred; when both the calculated stacking rate D and the estimated consumption time E are obtained, it is necessary to simultaneously determine whether the stacking rate D and the estimated consumption time E meet the preset conditions. When one of the stacking rate D and the estimated consumption time E does not meet the conditions, that is, when the stacking rate D is greater than the preset stacking rate or the estimated consumption time E is greater than the preset consumption time, it is determined that an abnormality has occurred.
[0034] Specifically, after the energy storage device pushes according to the push amount, the proxy server re-executes the steps of obtaining the production variation coefficient of the energy storage device pushing the production message and obtaining the consumption variation coefficient of the cloud consumption production message, that is, looping steps 101 to 104 until the production variation coefficient is less than or equal to the first threshold and the consumption variation coefficient is less than or equal to the second threshold, or until D is less than or equal to the preset stacking rate and / or E is less than or equal to the preset consumption time, that is, a new equilibrium state is reached at this time.
[0035] It should be noted that no matter only one of the accumulation rate D and the estimated consumption time E is calculated, or both the accumulation rate D and the estimated consumption time E are calculated, the new equilibrium state includes the case where the production variation coefficient is less than or equal to the first threshold value and the consumption variation coefficient is less than or equal to the second threshold value. When only the accumulation rate D is calculated, the new equilibrium state also includes the case where D is less than or equal to the preset accumulation rate; when only the estimated consumption time E is calculated, the new equilibrium state also includes the case where E is less than or equal to the preset consumption time; when both the accumulation rate D and the estimated consumption time E are calculated, the new equilibrium state also includes the case where D is less than or equal to the preset accumulation rate and E is less than or equal to the preset consumption time.
[0036] It should be noted that after reaching a new equilibrium state, other situations may occur that cause the production variation coefficient and the consumption variation coefficient to fail to meet the requirements. Therefore, the proxy server needs to monitor the production variation coefficient and the consumption variation coefficient in real time to balance the production process and the consumption process of the energy storage equipment.
[0037] Specifically, when D is greater than the preset accumulation rate or E is greater than the preset consumption time, an exception notification message is pushed to the exception notification queue. The exception notification message may include the target data volume A calculated by the proxy server in this round, the preset length B of the business memory queue, the data volume C of the production messages currently contained in the business memory queue, and the accumulation rate D and the estimated consumption time of E. It is set according to actual needs so that when the energy storage device monitors the update of the exception notification queue, it determines the push volume of the production messages pushed by the energy storage device according to the preset method, and the energy storage device pushes according to the push volume; the preset method can be to determine the push volume of the production messages currently pushed by the energy storage device through the preset reduction coefficient and the target data volume A. The preset reduction coefficient is a positive number less than 1, which can be set according to actual needs, such as 0.8, 0.7, 0.6.
[0038] It should be noted that the first threshold and the second threshold can be set according to actual needs. For example, the first threshold is 30% and the second threshold is 10. When D>30% or E>10, an exception is triggered and the proxy server pushes the exception notification message to the exception notification queue.
[0039] In this embodiment, the production variation coefficient and the consumption variation coefficient are obtained through the proxy server. When one of the production variation coefficient and the consumption variation coefficient is greater than the corresponding threshold value, the target data volume A consumed in the current unit time on the cloud is obtained. Since the preset length B of the business memory queue and the data volume C of the production message currently contained in the business memory queue are attribute information of the queue, they can be directly obtained. Then, the accumulation rate D and / or the estimated consumption time E are calculated according to A, B, and C. If the accumulation rate D is greater than the preset accumulation rate or the estimated consumption time E is greater than the preset consumption time, it is determined that an abnormality has occurred, and the abnormal notification message is pushed to the abnormal notification queue. When the energy storage device monitors the abnormal notification queue to update the abnormal notification message, it determines the push amount according to the preset method, thereby continuously cycling to obtain a balanced state, achieving adaptive balancing of production and consumption rates, avoiding OOM abnormalities in the proxy server, reducing the waste of operation and maintenance resources, and improving the efficiency of the entire system operation.
[0040] In practical applications, the energy storage device of this embodiment can be a battery cell device, and the corresponding production message is the battery cell data generated by the battery cell device. The battery cell device, the proxy server, and the cloud communicate based on the MQTT protocol. The battery cell device continuously generates battery cell data during operation, and when connected to the Internet, the battery cell data is pushed to the proxy server mqtt broker, specifically to the business memory queue in the proxy server mqtt broker. The cloud obtains the battery cell data from the business memory queue in the proxy server mqtt broker. The battery cell data obtained by the cloud will be removed from the business memory queue. After the cloud obtains the battery cell data, it displays the battery cell data in the background. When the production variation coefficient of the battery cell equipment and the consumption variation coefficient of the cloud are abnormal, the target data volume A of the battery cell data consumed by the cloud in the current unit time is obtained, and then the accumulation rate D of the battery cell data is calculated according to the preset length B of the business memory queue and the data volume C of the battery cell data currently contained in the business memory queue. According to C and A, the estimated consumption time E of the data volume C of the battery cell data currently contained in the cloud-based estimated consumption business memory queue is obtained. When D is greater than the preset accumulation rate or E is greater than the preset consumption time, an abnormal notification message is pushed to the abnormal notification queue in the proxy server mqtt broker. When the battery cell device monitors the update of the abnormal notification queue, it determines the push volume of the battery cell data pushed by the battery cell device according to the preset method, and the battery cell device pushes the battery cell data to the proxy server according to the push volume.
[0041] In other embodiments, the energy storage device may also be a battery stack, and the corresponding production message is the battery stack data, which includes the overall current, voltage, system on chip (SOC) and other data of the battery stack, and the battery stack pushes the battery stack data to the business memory queue in the proxy server mqtt broker; the energy storage device may also be a battery cluster, and the corresponding production message is the battery cluster data, which includes the overall current, voltage, SOC and other data of the battery cluster, and the battery cluster pushes the battery cluster data to the business memory queue in the proxy server mqtt broker.
[0042] Another embodiment of the present application relates to a production and consumption balancing method for energy storage equipment, which is applied to a proxy server, wherein the proxy server is provided with a first sliding window computing component and a rolling window computing component, such as Figure 3As shown, it is a structural diagram of the production and consumption balance system corresponding to the present embodiment. The production and consumption balance system includes an energy storage device 10, a proxy server 20, and a cloud 30. The proxy server 20, the energy storage device 10, and the cloud 30 are connected based on the MQTT protocol communication. The proxy server is internally provided with a business memory queue 20a and an abnormal notification queue 20b. The proxy server 20 is provided with a first sliding window computing component 20c and a rolling window computing component 20d. The energy storage device 10 pushes the production message to the business memory queue 20a, and the cloud consumes the production message from the business memory queue 20a.
[0043] The flow chart of the production and consumption balance method of the energy storage device in this embodiment is as follows: Figure 4 As shown, the following steps are included: Step 201, obtaining in real time the production variation coefficient of the production message pushed by the energy storage device and the consumption variation coefficient of the production message consumed by the cloud.
[0044] Step 202 and step 203 are specific implementations of step 102 in the previous embodiment. Step 202 and step 203 are specifically as follows: Step 202, when the production variation coefficient is greater than the first threshold, the target data volume A of the current unit time consumption production message of the cloud is obtained through the rolling window calculation component.
[0045] Specifically, a production and consumption data volume list is set inside the proxy server, and the list records the data volume of production messages pushed by the producer per unit time, such as per second, and the data volume of production messages consumed by the consumer per unit time, such as per second. In practical applications, the data volume of production messages consumed by the consumer per unit time, such as per second, can be recorded in the list in chronological order. The unit time of this embodiment can be set to 1 second, and the rolling window calculation component is used to monitor the data volume A of the consumer's consumption messages every 1 second in real time.
[0046] Step 203, when the consumption variation coefficient is greater than the second threshold, the first sliding window calculation component obtains the first data volume of production messages consumed by the cloud per unit time within a first preset time range before the current moment, and averages multiple first data volumes to obtain a first average data volume, which is the target data volume A of production messages consumed by the cloud in the current unit time.
[0047] Specifically, the proxy server is internally provided with a list of production and consumption data. In practical applications, the data volume of production messages consumed by consumers per unit time, such as per second, can be recorded in the list in chronological order, wherein the window size of the first sliding window calculation component is the first preset time range, and the end point of the window of the first sliding window calculation component is the current time, so the window of the first sliding window calculation component slides over time. Figure 5 As shown, it is a schematic diagram of the window of the first sliding window calculation component sliding over time. In the figure, the first preset time range is 5 seconds, that is, the window size of the first sliding window calculation component is 5 seconds, and the unit time is 1 second. At time t1, the window of the first sliding window calculation component corresponds to 1s~5s, at time t2, the window of the first sliding window calculation component corresponds to 2s~6s, at time t3, the window of the first sliding window calculation component corresponds to 3s~7s, and so on. Among them, after the first sliding window calculation component determines the first data volume of the production message consumed by the cloud per second in 5 seconds within the window according to the current time, the first average data volume is averaged for multiple first data volumes, that is, the target data volume A is obtained.
[0048] Step 204, calculate the accumulation rate D based on the preset length B of the business memory queue and the data volume C of the production messages currently contained in the business memory queue, and / or, based on C and A, obtain the estimated consumption time E of the cloud-based estimated consumption of the data volume C of the production messages currently contained in the business memory queue.
[0049] Step 205, when D is greater than the preset accumulation rate or E is greater than the preset consumption time, an abnormal notification message is pushed to the abnormal notification queue, so that when the energy storage device monitors the update of the abnormal notification queue, the energy storage device determines the push amount of production messages pushed by the energy storage device according to the preset method, and the energy storage device pushes according to the push amount.
[0050] The above steps 201 , 204 , and 205 are substantially the same as steps 101 , 103 , and 104 in the previous embodiment, and will not be described again to avoid repetition.
[0051] In this example, a first sliding window calculation component and a rolling window calculation component are set. When the consumption variation coefficient is greater than the second threshold, it indicates that the consumption rate of the cloud, i.e., the consumer, is unstable and may fluctuate. If the rolling window calculation component is used for calculation, the obtained consumer rate may be at a peak or a trough, resulting in inaccurate data of the target data volume A. Therefore, in this embodiment, when the consumption variation coefficient is greater than the second threshold, the first sliding window calculation component is used to obtain the first data volume of the production message consumed by the cloud per unit time within a first preset time range before the current moment, and the first average data volume is obtained by averaging multiple first data volumes. The first average data volume is the target data volume A of the production message consumed by the cloud in the current unit time, thereby ensuring the accuracy of the target data volume A when the consumer rate is unstable. At the same time, when the production variation coefficient is greater than the first threshold, the rolling window calculation component is used to obtain the target data volume A of the production message consumed by the cloud per unit time, thereby reducing the calculation pressure of each window calculation component.
[0052] It should be noted that when one of the production variation coefficient and the consumption variation coefficient is abnormal, the target data volume A can be obtained according to the corresponding rolling window calculation component and the first sliding window calculation component. When both the production variation coefficient and the consumption variation coefficient are abnormal, that is, when the production variation coefficient is greater than the first threshold and the consumption variation coefficient is greater than the second threshold, the target data volume A can be obtained only through the first sliding window calculation component, thereby ensuring the accuracy of the obtained target data volume A; specifically, it can be determined first whether the consumption variation coefficient is greater than the second threshold. When the consumption variation coefficient is greater than the second threshold, the target data volume A is directly obtained through the first sliding window calculation component, and there is no need to determine the size of the production variation coefficient and the first threshold. When the consumption variation coefficient is less than or equal to the second threshold, it is determined whether the production variation coefficient is greater than the first threshold. When it is determined that the production variation coefficient is greater than the first threshold, the target data volume A is obtained through the rolling window calculation component.
[0053] Another embodiment of the present application relates to a production and consumption balancing method for energy storage equipment, which is applied to a proxy server, wherein the proxy server is provided with a second sliding window computing component, such as Figure 6 As shown, it is a structural diagram of the production and consumption balance system corresponding to the present embodiment. The production and consumption balance system includes an energy storage device 10, a proxy server 20, and a cloud 30. The proxy server 20, the energy storage device 10, and the cloud 30 are connected in communication based on the MQTT protocol. A business memory queue 20a and an abnormal notification queue 20b are arranged inside the proxy server. The proxy server 20 is provided with a second sliding window computing component 20e. The energy storage device 10 pushes production messages to the business memory queue 20a, and the cloud consumes production messages from the business memory queue 20a.
[0054] The flow chart of the production and consumption balance method of the energy storage device in this embodiment is as follows: Figure 7 As shown, the following steps are included: Step 301, obtaining in real time the production variation coefficient of the production message pushed by the energy storage device and the consumption variation coefficient of the production message consumed by the cloud.
[0055] Step 302 is a specific implementation of step 102 in the previous embodiment. Step 302 is specifically as follows: Step 302, when the production variation coefficient is greater than the first threshold and / or the consumption variation coefficient is greater than the second threshold, the first data volume of production messages consumed by the cloud per unit time within a first preset time range before the current moment is obtained through the second sliding window calculation component, and the first average data volume is obtained by averaging multiple first data volumes, which is the target data volume A of production messages consumed by the cloud in the current unit time.
[0056] Specifically, a list of production and consumption data volumes is provided inside the proxy server, and the list records the data volume of production messages pushed by the producer per unit time, such as per second, and the data volume of production messages consumed by the consumer per unit time, such as per second. In practical applications, the data volume of production messages consumed by the consumer per unit time, such as per second, can be recorded in a list in chronological order, wherein the window size of the second sliding window calculation component is the second preset time range, and the end point of the window of the second sliding window calculation component is the current moment, so the window of the second sliding window calculation component slides over time. The implementation principle of the second sliding window calculation component is similar to that of the first sliding window calculation component, and will not be repeated here to avoid repetition.
[0057] Step 303, calculate the accumulation rate D based on the preset length B of the business memory queue and the data volume C of the production messages currently contained in the business memory queue, and / or, based on C and A, obtain the estimated consumption time E of the cloud-based estimated consumption of the data volume C of the production messages currently contained in the business memory queue.
[0058] Step 304, when D is greater than the preset accumulation rate or E is greater than the preset consumption time, an abnormal notification message is pushed to the abnormal notification queue, so that when the energy storage device monitors the update of the abnormal notification queue, the energy storage device determines the push amount of production messages pushed by the energy storage device according to the preset method, and the energy storage device pushes according to the push amount.
[0059] The above steps 301 , 303 , and 304 are substantially the same as steps 101 , 103 , and 104 in the previous embodiment, and will not be described again to avoid repetition.
[0060] This example sets a second sliding window calculation component. When the consumption variation coefficient is greater than the second threshold, it indicates that the consumption rate of the cloud, i.e., the consumer, is unstable and may fluctuate. If the rolling window calculation component is used for calculation, the obtained consumer rate may be at a peak or trough, resulting in inaccurate data of the target data volume A. Therefore, in this embodiment, when the consumption variation coefficient is greater than the second threshold, the second sliding window calculation component is used to obtain the first data volume of the production message consumed by the cloud per unit time within the first preset time range before the current moment, and the first average data volume is obtained by averaging multiple first data volumes. The first average data volume is the target data volume A of the production message consumed by the cloud in the current unit time, ensuring the accuracy of obtaining the target data volume A when the consumer rate is unstable. At the same time, when the production variation coefficient is greater than the first threshold, the second sliding window calculation component is used to obtain the target data volume A of the production message consumed by the cloud per unit time, also ensuring the accuracy of obtaining the target data volume A when the producer rate is unstable. Only one window calculation component can be set, reducing the investment cost of the proxy server.
[0061] An embodiment of the present application relates to a production and consumption balance method for energy storage equipment, which is applied to energy storage equipment, such as Figure 2 As shown, it is a structural diagram of the production and consumption balance system corresponding to the present embodiment. The production and consumption balance system includes an energy storage device 10, a proxy server 20, and a cloud 30. The proxy server 20, the energy storage device 10, and the cloud 30 are connected in communication based on the MQTT protocol. A business memory queue 20a and an abnormal notification queue 20b are arranged inside the proxy server. The energy storage device 10 pushes production messages to the business memory queue 20a, and the cloud consumes production messages from the business memory queue 20a.
[0062] The flow chart of the production and consumption balance method of the energy storage device in this embodiment is as follows: Figure 8 As shown, the specific steps include: Step 401, monitor the exception notification queue in real time.
[0063] Step 402: When an update of the abnormal notification queue is monitored, the push amount of the production message pushed by the energy storage device is determined according to a preset method.
[0064] Among them, when the accumulation rate D is greater than the preset accumulation rate or the estimated consumption time E is greater than the preset consumption time, the proxy server pushes an exception notification message to the exception notification queue, and the proxy server obtains D and / or E in the following way: the proxy server obtains the production variation coefficient of the production messages pushed by the energy storage device and the consumption variation coefficient of the production messages consumed by the cloud in real time; when the production variation coefficient is greater than the first threshold and / or the consumption variation coefficient is greater than the second threshold, the target data volume A of the production messages consumed by the cloud in the current unit time is obtained; the accumulation rate D is calculated according to the preset length B of the business memory queue and the data volume C of the production messages currently contained in the business memory queue, and / or, according to C and A, the estimated consumption time E of the data volume C of the production messages currently contained in the cloud-based estimated consumption business memory queue is obtained.
[0065] Step 403: Push the production message to the business memory queue according to the push quantity.
[0066] Among them, after the energy storage device pushes according to the push amount, the proxy server re-executes the steps of obtaining the production variation coefficient of the energy storage device pushing the production message and obtaining the consumption variation coefficient of the cloud consumption production message, until the production variation coefficient is less than or equal to the first threshold and the consumption variation coefficient is less than or equal to the second threshold, or, until D is less than or equal to the preset accumulation rate and / or E is less than or equal to the preset consumption time.
[0067] The energy storage device of this embodiment monitors in real time whether the exception notification queue is updated, and when the exception notification queue is updated, pushes the production message to the business memory queue according to the push quantity, thereby automatically adjusting the push quantity of the energy storage device, thereby continuously cycling to obtain a balanced state, achieving adaptive balancing of production and consumption rates, avoiding OOM exceptions in the proxy server, reducing the waste of operation and maintenance resources, and improving the efficiency of the entire system operation.
[0068] In practical applications, the energy storage device of this embodiment can be a battery cell device, and the corresponding production message is the battery cell data generated by the battery cell device. The battery cell device, the proxy server, and the cloud communicate based on the MQTT protocol. The proxy server is internally provided with a business memory queue and an exception notification queue. The battery cell device monitors the update of the exception notification queue in the proxy server in real time. When the exception notification queue is updated, the battery cell device determines the push amount of the battery cell data according to a preset method, and the battery cell device pushes the battery cell data to the proxy server according to the push amount.
[0069] In one example, after the energy storage device pushes the production message to the business memory queue according to the push amount, it also includes: when the total amount of the current production message of the energy storage device is greater than the push amount, the remaining production messages in the total amount of the current production message that exceed the push amount are stored locally in the energy storage device. This embodiment stores the remaining production messages locally in the energy storage device to ensure data integrity. At the same time, when the push amount of the energy storage device increases, the production messages stored locally in the energy storage device can be pushed out. Even if the amount of data pushed is large, it can be automatically adjusted through the production and consumption balance method of this embodiment to avoid OOM abnormalities in the proxy server, reduce the waste of operation and maintenance resources, and improve the efficiency of the entire system operation.
[0070] In actual applications, after the battery cell device pushes the production message to the business memory queue according to the push amount, when the total amount of current battery cell data of the battery cell device is greater than the push amount, the remaining battery cell data that exceeds the push amount is stored locally in the battery cell device. When the consumption capacity of the cloud is subsequently improved, the push amount of battery cell data pushed by the battery cell device is increased through the production and consumption balance method, thereby adaptively balancing the push rate and consumption rate between the battery cell device and the cloud, avoiding OOM anomalies of the proxy server when the push rate of the battery cell device or the consumption rate of the cloud is unstable, reducing the waste of operation and maintenance resources, and improving the efficiency of the entire system operation. In one example, the abnormal notification message includes a corresponding target data volume A; the push amount of the production message pushed by the energy storage device is determined according to a preset method, including: determining the push amount of the current production message pushed by the energy storage device through a preset reduction coefficient and the target data volume A, and the preset reduction coefficient is a positive number less than 1. The abnormal notification message of this embodiment at least includes the target data volume A calculated by the proxy server in this round. The abnormal notification message may also include the accumulation rate D and the estimated consumption time E, which are set according to actual needs. The preset reduction coefficient is also set according to actual needs, such as 0.8, 0.7, and 0.6. In this embodiment, when an abnormality occurs to a consumer or a producer, the current push volume of production messages pushed by the energy storage device is determined by the preset reduction coefficient and the target data volume A of production messages consumed by the cloud in the current unit time, thereby reducing the rate at which the current producer pushes production messages, ensuring that consumers can consume the remaining production messages in the business memory queue in sufficient time, reducing the pressure on the proxy server, avoiding OOM abnormalities in the proxy server, reducing the waste of operation and maintenance resources, and improving the efficiency of the entire system operation.
[0071] In actual applications, when the exception notification queue is monitored for updates, the push volume of the cell data pushed by the cell device is determined according to a preset method. When the cell device pushes the cell data to the proxy server according to the push volume, the cell device obtains the target data volume A from the updated exception notification message, and determines the current push volume of the cell data pushed by the cell device through the preset reduction coefficient and the target data volume A, thereby reducing the current rate at which the cell device pushes cell data, ensuring that the cloud can consume the remaining cell data in the business memory queue in sufficient time, reducing the pressure on the proxy server, avoiding OOM exceptions in the proxy server, reducing the waste of operation and maintenance resources, and improving the efficiency of the entire system operation.
[0072] In other embodiments, the energy storage device may also be a battery stack, and the corresponding production message is the battery stack data, which includes the overall current, voltage, SOC and other data of the battery stack; the energy storage device may also be a battery cluster, and the corresponding production message is the battery cluster data, which includes the overall current, voltage, SOC and other data of the battery cluster.
[0073] It is not difficult to find that this embodiment is an embodiment of the production and consumption balance method on the energy storage device side corresponding to the production and consumption balance method on the proxy server side. This embodiment can be implemented in conjunction with the embodiment on the proxy server side. The relevant technical details mentioned in the embodiment on the proxy server side are still valid in this embodiment. In order to reduce repetition, they are not repeated here. Accordingly, the relevant technical details mentioned in this embodiment can also be applied in the embodiment on the proxy server side.
[0074] Another embodiment of the present application relates to a production and consumption balance method for energy storage equipment, which is applied to energy storage equipment. The flow chart of the production and consumption balance method for specific energy storage equipment is as follows: Fig. 9 As shown, the following steps are included: Step 501, monitor the abnormal notification queue in real time; Step 502: When an update of the abnormal notification queue is monitored, the push amount of the production message pushed by the energy storage device is determined according to a preset method.
[0075] Step 503: Push the production message to the business memory queue according to the push quantity.
[0076] The above steps 501 , 502 , and 503 are substantially the same as steps 401 , 402 , and 403 in the previous embodiment, and will not be described again to avoid repetition.
[0077] Step 504: when it is detected that the abnormal notification queue is not updated, the target data volume A of the most recently updated abnormal notification queue is obtained.
[0078] Step 505: Push according to the target data volume A that was updated most recently.
[0079] The exception notification message of this embodiment includes the target data volume A calculated by the proxy server in this round, wherein the target data volume A calculated in this round will be placed in the exception notification queue only when the proxy server sends an exception notification message to the exception notification queue. When the proxy server does not send an exception notification message to the exception notification queue in this round, it indicates that the current round has reached a balanced state. Therefore, the target data volume A stored in the exception notification queue in the previous round is obtained, and the target data volume A is used as the push amount of the energy storage device.
[0080] It should be noted that the previous round of abnormal notification queue has a target data volume A, which means that the push volume adjusted by the energy storage device after the previous round is the product of the target data volume A of the previous round and the preset reduction coefficient. This round uses the target data volume A of the previous round as the push volume of the energy storage device. When this round reaches a balanced state, the push volume of the energy storage device is appropriately increased, which improves system efficiency and is conducive to maintaining a balanced state.
[0081] An embodiment of the present application relates to an electronic device, such as Fig.10 As shown, it includes: at least one processor 601; and a memory 602 that is communicatively connected to the at least one processor 601; wherein the memory stores instructions that can be executed by the at least one processor 601, and the instructions are executed by the at least one processor 601 so that the at least one processor 601 can execute the above method.
[0082] The memory 602 and the processor 601 are connected in a bus manner, and the bus may include any number of interconnected buses and bridges, and the bus connects various circuits of one or more processors 601 and the memory 602 together. The bus can also connect various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. The data processed by the processor 601 is transmitted on a wireless medium via an antenna, and further, the antenna also receives data and transmits the data to the processor 601.
[0083] The processor 601 is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management and other control functions. The memory 602 can be used to store data used by the processor when performing operations.
[0084] Those skilled in the art will appreciate that the above embodiments are specific embodiments for implementing the present application, and in actual applications, various changes may be made thereto in form and detail without departing from the spirit and scope of the present application.
Claims
1. A production and consumption balance method for energy storage equipment, applied to a proxy server, It is characterized in that The proxy server is connected to the energy storage device and the cloud; the proxy server, the energy storage device and the cloud are connected based on the MQTT protocol; the proxy server is internally provided with a business memory queue and an abnormal notification queue; The energy storage device pushes the production message to the business memory queue, and the cloud consumes the production message from the business memory queue; the method includes: Real-time acquisition of the production variation coefficient of the production message pushed by the energy storage device and the consumption variation coefficient of the production message consumed by the cloud; When the production variation coefficient is greater than a first threshold value and / or the consumption variation coefficient is greater than a second threshold value, obtaining a target data volume A of the production message consumed by the cloud in a current unit time; The accumulation rate D is calculated based on the preset length B of the business memory queue and the data volume C of the production message currently contained in the business memory queue, and / or, the estimated consumption time E of the cloud estimated consumption of the data volume C of the production message currently contained in the business memory queue is obtained based on the data volume C and the target data volume A; When the accumulation rate D is greater than the preset accumulation rate or the estimated consumption time E is greater than the preset consumption time, an abnormal notification message is pushed to the abnormal notification queue, so that when the energy storage device monitors the update of the abnormal notification queue, the energy storage device determines the push amount of the production message pushed by the energy storage device according to a preset method, and the energy storage device pushes according to the push amount; After the energy storage device pushes according to the push amount, the proxy server re-executes the steps of obtaining the production variation coefficient of the energy storage device pushing the production message and obtaining the consumption variation coefficient of the cloud consuming the production message, until the production variation coefficient is less than or equal to the first threshold and the consumption variation coefficient is less than or equal to the second threshold, or, until D is less than or equal to the preset stacking rate and / or E is less than or equal to the preset consumption time.
2. The production and consumption balance method of the energy storage device according to claim 1, It is characterized in that The proxy server is provided with a first sliding window computing component and a rolling window computing component; When the production variation coefficient is greater than a first threshold value and / or the consumption variation coefficient is greater than a second threshold value, obtaining a target data volume A of the production message consumed by the cloud in a current unit time includes: When the production variation coefficient is greater than the first threshold, the target data volume A of the production message consumed by the cloud in the current unit time is obtained through the rolling window calculation component; When the consumption variation coefficient is greater than the second threshold, the first sliding window calculation component obtains the first data volume of the production message consumed by the cloud at each unit time within a first preset time range before the current moment, and averages multiple first data volumes to obtain a first average data volume, which is the target data volume A of the production message consumed by the cloud in the current unit time.
3. The production and consumption balance method of the energy storage device according to claim 1, It is characterized in that The proxy server is provided with a second sliding window computing component; When the production variation coefficient is greater than a first threshold value and / or the consumption variation coefficient is greater than a second threshold value, obtaining a target data volume A of the production message consumed by the cloud in a current unit time includes: When the production variation coefficient is greater than the first threshold and / or the consumption variation coefficient is greater than the second threshold, the first data volume of the production message consumed by the cloud at each unit time within a first preset time range before the current moment is obtained through the second sliding window calculation component, and the first average data volume is obtained by averaging multiple first data volumes, and the first average data volume is the target data volume A of the production message consumed by the cloud in the current unit time.
4. The production and consumption balance method of the energy storage device according to claim 1, It is characterized in that The real-time acquisition of the production variation coefficient of the production message pushed by the energy storage device includes: Acquire a second data volume of the production message pushed by the energy storage device per unit time within a second preset time range before the current moment; averaging a plurality of the second data amounts to obtain a second average data amount; Taking variance of the plurality of the second data quantities to obtain a first standard deviation; The production variation coefficient is calculated based on the second average data volume and the first standard deviation.
5. The production and consumption balance method according to claim 1, It is characterized in that The obtaining of the consumption variation coefficient of the cloud consuming the production message includes: Acquire a third data volume of the production message consumed by the cloud at each unit time within a third preset time range before the current moment; Averaging a plurality of the third data amounts to obtain a third average data amount; Taking variance of the plurality of third data quantities to obtain a second standard deviation; The consumption variation coefficient is calculated based on the third average data volume and the second standard deviation.
6. A production and consumption balance method for energy storage equipment, applied to energy storage equipment, It is characterized in that The energy storage device is connected to a proxy server, and the proxy server is also connected to the cloud; the proxy server, the energy storage device, and the cloud are connected to each other based on the MQTT protocol; a business memory queue and an abnormal notification queue are set inside the proxy server; The energy storage device pushes the production message to the business memory queue, and the cloud consumes the production message from the business memory queue; the method includes: Monitoring the abnormal notification queue in real time; and determining the push amount of the production message pushed by the energy storage device according to a preset method when an update of the abnormal notification queue is monitored; Wherein, when the accumulation rate D is greater than the preset accumulation rate or the estimated consumption time E is greater than the preset consumption time, the proxy server pushes an abnormal notification message to the abnormal notification queue, and the proxy server obtains the accumulation rate D and / or the estimated consumption time E in the following manner: the proxy server obtains in real time the production variation coefficient of the production message pushed by the energy storage device and the consumption variation coefficient of the production message consumed by the cloud; when the production variation coefficient is greater than a first threshold and / or the consumption variation coefficient is greater than a second threshold, obtains the target data volume A of the production message consumed by the cloud in the current unit time; calculates the accumulation rate D according to the preset length B of the business memory queue and the data volume C of the production message currently contained in the business memory queue, and / or obtains the estimated consumption time E of the cloud estimated to consume the data volume C of the production message currently contained in the business memory queue according to the data volume C and the target data volume A; The production message is pushed to the business memory queue according to the push quantity; wherein, after the energy storage device pushes according to the push quantity, the proxy server re-executes the steps of obtaining the production variation coefficient of the energy storage device pushing the production message and obtaining the consumption variation coefficient of the cloud consuming the production message, until the production variation coefficient is less than or equal to the first threshold and the consumption variation coefficient is less than or equal to the second threshold, or, until the accumulation rate D is less than or equal to the preset accumulation rate and / or the estimated consumption time E is less than or equal to the preset consumption time.
7. The production and consumption balance method of the energy storage device according to claim 6, It is characterized in that The abnormal notification message includes the corresponding target data volume A; the determining the push volume of the production message pushed by the energy storage device according to a preset method includes: The current push amount of the production message pushed by the energy storage device is determined by a preset reduction coefficient and the target data amount A, and the preset reduction coefficient is a positive number less than 1.
8. The production and consumption balance method of energy storage equipment according to claim 6, It is characterized in that After pushing the production message to the business memory queue according to the push amount, the method further includes: In the case that the total amount of messages currently produced by the energy storage device is greater than the pushed amount, the remaining production messages in the total amount of messages currently produced that are greater than the pushed amount are stored locally in the energy storage device.
9. The production and consumption balance method of energy storage equipment according to claim 6, It is characterized in that The abnormal notification message includes the corresponding target data volume A; the method further includes: In the case where it is monitored that the abnormal notification queue is not updated, obtaining the target data volume A most recently updated in the abnormal notification queue; Push is performed according to the target data volume A that was updated most recently.
10. An electronic device, It is characterized in that include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the production and consumption balancing method of the energy storage device as described in any one of claims 1 to 5, or the production and consumption balancing method of the energy storage device as described in any one of claims 6 to 9.
Citation Information
Patent Citations
Message queue-based message consumption method and device, computer equipment and a medium
CN112667414A
Message processing method and device of message queue, electronic equipment and medium
CN114637615A
Service processing method and device based on message queue, computer equipment and medium
CN117499487A
Task queue consumption method and device, electronic equipment and storage medium
CN118227351A
Message Notification Method and Terminal
US20200007488A1
