Data exchange method for cloud-edge collaboration

By introducing real-time data transmission and historical data segment upload methods in the energy storage system, the problems of data timeliness and repeated reporting in the prior art are solved, and a more efficient and efficient data exchange method is achieved.

CN118972397BActive Publication Date: 2025-04-18ZHEJIANG LNXALL IOT TECHNOLOGY CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411431986.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-14
Publication Date
2025-04-18
Estimated Expiration
2044-10-14

AI Technical Summary

Technical Problem

The data exchange methods of existing energy storage systems and cloud servers cannot meet the high requirements for data timeliness in differentiated business scenarios, especially when the energy storage system is in a charge/discharge state, and there is a problem of repeated reporting in a stand-alone/standby state.

Method used

A cloud-edge collaborative data exchange method is proposed to determine whether real-time data reporting is needed through the energy storage system, and pass real-time data in direct transmission mode. When placed in stand or standby state, extract historical data and divide and upload them through table and segments to avoid repeated reporting and improve data timeliness.

Benefits of technology

It improves the data timeliness of the energy storage system in the charged/discharge state, reduces repeated reporting in the stand-alone/standby state, saves traffic and server resources, and improves data upload efficiency and timeliness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118972397B_ABST
    Figure CN118972397B_ABST
Patent Text Reader

Abstract

The present application relates to a cloud-edge collaborative data exchange method. First, the reporting time is divided into real-time data reporting and historical data reporting. When real-time data reporting is required, real-time data is reported, and when historical data reporting is required, historical data is reported. This avoids the problem of repeated reporting. Secondly, real-time data is reported in direct transmission mode to ensure the quality of uploaded real-time data and improve the timeliness of real-time data. Thirdly, choose to upload historical data in static or standby state, otherwise do not upload historical data. This allows the energy storage system to upload historical data when it is idle, improving upload efficiency. Finally, by uploading historical data in separate tables and time periods, traffic and server resources are saved, and the pressure of computing power requirements is reduced while meeting timeliness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of green and low-carbon industries, and in particular to a cloud-edge collaborative data exchange method. Background Art

[0002] Green and low-carbonization is an important transformation of the world economy and an important world economic revolution. Whether from a domestic or global perspective, green and low-carbon industries will become a strategic choice for the long-term economic development of all countries.

[0003] New energy storage systems are the cornerstone of the development of green and low-carbon industries. When analyzing the energy storage process, the part of the object or space range that is demarcated to determine the research object is called an energy storage system. It includes the input and output of energy and matter, and the conversion and storage equipment of energy. Energy storage systems often involve multiple energies, multiple devices, multiple materials, and multiple processes. They are complex energy systems that change over time and require multiple indicators to describe their performance. Common evaluation indicators include energy storage density, energy storage power, energy storage efficiency, energy storage price, and environmental impact. A common energy storage system is an energy storage distribution cabinet that includes an energy storage unit and an energy conversion unit.

[0004] In existing technologies, energy storage systems generally monitor and control various data of the energy storage system by exchanging data with cloud servers.

[0005] The existing data exchange method between energy storage systems and cloud servers is that the energy storage system stores the data collected by edge devices in real time, and then reports the data to the cloud server at a regular frequency. The cloud server stores the reported data in the cloud. Due to limited storage space and computing power, the local energy storage system will only save data within a certain time limit. Data that exceeds the time limit will be cleared. The cloud server will save all data reported regularly by the local energy storage system.

[0006] However, the existing data exchange method between energy storage systems and cloud servers has great shortcomings, and the fixed-frequency reporting method cannot meet the high requirements for data timeliness in differentiated business scenarios. This is because:

[0007] The operating states of the energy storage system are divided into charging, discharging, static and standby. The data changes very quickly in the charging and discharging states, while the data changes very slowly in the static and standby states. As a result, the cloud server does not store data in a timely manner when the energy storage system is in the charging / discharging state. In the static / standby state of the energy storage system, frequent reporting leads to repeated reporting of a lot of non-changing data (referring to reporting the same data multiple times, which is meaningless). Summary of the invention

[0008] Based on this, it is necessary to provide a cloud-edge collaborative data exchange method to address the problem that traditional cloud-edge collaborative data exchange methods cannot meet the high requirements for data timeliness in differentiated business scenarios.

[0009] The present application provides a cloud-edge collaborative data exchange method, the method comprising:

[0010] The energy storage system determines whether real-time data reporting is required;

[0011] If real-time data reporting is required, the energy storage system further determines whether the direct transmission mode of the energy storage system is turned on;

[0012] If the direct transmission mode of the energy storage system is turned on, the energy storage system will transparently transmit real-time data to the cloud server;

[0013] If real-time data reporting is not required, the energy storage system further determines whether the operating state of the energy storage system is in a static state or a standby state;

[0014] If the energy storage system is in a static or standby state, the energy storage system extracts historical data stored in the local database, divides the historical data into multiple segments by table segmentation, obtains multiple segmented data, and uploads the multiple segmented data to the cloud server; when dividing, the historical data of different devices are divided into different data tables, each segmented data is obtained by cutting the data in a data table, and each segmented data is data collected within a collection time period.

[0015] The present application relates to a cloud-edge collaborative data exchange method. First, the reporting time is divided into real-time data reporting and historical data reporting. When real-time data reporting is required, real-time data is reported, and when historical data reporting is required, historical data is reported. This avoids the problem of repeated reporting. Secondly, real-time data is reported in direct transmission mode to ensure the quality of uploaded real-time data and improve the timeliness of real-time data. Thirdly, choose to upload historical data in static or standby state, otherwise do not upload historical data. This allows the energy storage system to upload historical data when it is idle, improving upload efficiency. Finally, by uploading historical data in separate tables and time periods, traffic and server resources are saved, and the pressure of computing power requirements is reduced while meeting timeliness. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 A method flow chart of a cloud-edge collaborative data exchange method provided in one embodiment of the present application.

[0017] Figure 2 A method flow chart of a cloud-edge collaborative data exchange method provided in another embodiment of the present application. DETAILED DESCRIPTION

[0018] In order to make the purpose, technical solution and advantages of this application more clear, the following is a further detailed description of this application in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain this application and are not used to limit this application.

[0019] The present application provides a cloud-edge collaborative data exchange method. It should be noted that the cloud-edge collaborative data exchange method provided in the present application is applicable to any type of energy storage system.

[0020] like Figure 1 As shown, in one embodiment of the present application, the method includes:

[0021] S100: The energy storage system determines whether real-time data reporting is required.

[0022] S200: If real-time data reporting is required, the energy storage system further determines whether the direct transmission mode of the energy storage system is turned on.

[0023] S300: If the direct transmission mode of the energy storage system is turned on, the energy storage system will transparently transmit the real-time data to the cloud server.

[0024] S400: If real-time data reporting is not required, the energy storage system further determines whether the operating state of the energy storage system is in a static state or a standby state.

[0025] S500, if the energy storage system is in a static state or a standby state, the energy storage system extracts the historical data stored in the local database, divides the historical data into multiple segments by table segmentation, obtains multiple segmented data, and uploads the multiple segmented data to the cloud server. During segmentation, the historical data of different devices are divided into different data tables, each segmented data is obtained by cutting the data in a data table, and each segmented data is data collected within a collection time period.

[0026] Specifically, data transmission and storage between the energy storage system and the cloud server are key functions of the cloud-edge collaborative system. This application divides data types into real-time data and historical data according to timeliness, and real-time data and historical data use different transmission and storage methods. Real-time data uses different reporting methods according to the different modes in which the energy storage system is turned on. Historical data is compressed and uploaded by table and time period, and the data is divided into segmented data by table and time period, which is convenient for fragmented upload and breakpoint resumption. At the same time, combined with cloud-based dynamic resource allocation technology, the completeness and consistency of the data are effectively guaranteed. This application avoids reporting to the cloud platform for storage through traditional timed frequency methods. Due to the frequency of data, the cloud data does not store the collected data at a specific moment. When you need to view historical data with finer granularity, you must log in to the local energy storage system for query.

[0027] In this embodiment, the energy storage system has built-in two real-time data upload modes for special scenarios: direct transmission mode and silent mode. Optionally, both modes are not enabled in the initialization state, and the user can select which mode to enable.

[0028] The energy storage system will select different reporting modes according to the currently enabled mode. In S200-S300, if the current energy storage system is in direct transmission mode, the energy storage system will directly transmit data to the cloud server. If it is in direct transmission mode, as long as the gateway of the local energy storage device collects the device data, it will be directly reported to the cloud server. The cloud server is equivalent to synchronizing data with the local energy storage system in real time. This mode can support remote debugging and can be used as a host computer. However, this mode consumes a lot of traffic (generally, the data collection frequency is at the second and millisecond level), so there is a time limit for turning on the direct transmission mode. The system defaults to a maximum of 10 minutes at a time, and it will automatically shut down after 10 minutes. If you need to continue using this mode, you need to turn it on again. Therefore, the real-time data transmitted is generally data that frequently changes, such as current and voltage, while the historical data can be data that frequently changes, such as current and voltage, or other data. That is, historical data is data that includes all types of data, and it is full data without missing any time node data. The real-time data transmitted is the data of the time node or several time nodes that are closest to the current system time.

[0029] After S400, it also includes:

[0030] S600, if the running state of the energy storage system is not in the static state or the standby state, then return to the initial step S100, that is, return to the energy storage system to determine whether real-time data reporting is required and perform the next polling.

[0031] In this embodiment, first, the timing of reporting is divided into reporting of real-time data and reporting of historical data. When real-time data reporting is required, real-time data is reported, and when historical data reporting is required, historical data is reported. This avoids the problem of repeated reporting. Secondly, real-time data is reported in direct transmission mode to ensure the quality of uploaded real-time data and improve the timeliness of real-time data. Thirdly, choose to upload historical data in static or standby state, otherwise do not upload historical data. This allows the energy storage system to upload historical data when it is idle, thereby improving upload efficiency. Finally, by uploading historical data in separate tables and time periods, traffic and server resources are saved, and the pressure of computing power requirements is reduced while meeting timeliness.

[0032] In addition, real-time data and historical data can have different applications respectively: real-time data allows users to see dynamic and real-time changing timeliness data on the cloud platform of the cloud server, and historical data can be used for data analysis and retrospective statistics for subsequent users.

[0033] Optionally, in one embodiment, the reporting of real-time data and historical data does not conflict with each other, and the reporting process of real-time data and the reporting process of historical data occur in parallel without any order of precedence. Therefore, in this embodiment, no matter what the result of the step of determining whether to report real-time data is, the step of determining whether the operating state of the energy storage system is in a static state or a standby state is executed, that is, no matter what the result of the step of determining whether to report real-time data is, the historical data reporting process is entered.

[0034] like Figure 2 As shown, in one embodiment of the present application, after S200, that is, after the energy storage system further determines whether the direct transmission mode is turned on, the method further includes:

[0035] S210: If the direct transmission mode of the energy storage system is not turned on, the energy storage system determines whether the silent mode of the energy storage system is turned on.

[0036] S220, if the silent mode of the energy storage system is turned on, the energy storage system stops transparently transmitting real-time data to the cloud server.

[0037] Specifically, the above content mentioned that in S200-S300, if the current energy storage system has turned on the direct transmission mode, the energy storage system will directly transmit the data to the cloud server.

[0038] In this embodiment, if the energy storage system does not enable direct transmission mode but enables silent mode, it will stop reporting data to the cloud server until the silent mode is turned off or a new scene mode is enabled, and then it will continue to report data. It is generally used for local site maintenance to avoid reporting dirty data and save traffic. This is a variable frequency reporting method.

[0039] In this embodiment, data is transparently transmitted to the cloud server in direct transmission mode, and transparent transmission of data is stopped in silent mode, thereby achieving timely reporting of data and saving traffic.

[0040] like Figure 2 As shown, in one embodiment of the present application, after S210, that is, after the energy storage system determines whether the silent mode of the energy storage system is turned on, the method further includes:

[0041] S230: If the silent mode of the energy storage system is not turned on, the energy storage system obtains the operating status of the energy storage system.

[0042] S240, the energy storage system determines whether the operating state of the energy storage system is in a static state or a standby state.

[0043] S250, if the operating state of the energy storage system is in a static state or a standby state, the energy storage system transmits real-time data to the cloud server at a first preset transmission frequency.

[0044] S260: If the energy storage system is not in a static state or a standby state, the energy storage system transmits real-time data to the cloud server at a second preset transmission frequency. The first preset transmission frequency is less than the second preset transmission frequency.

[0045] Specifically, this embodiment introduces that when the user does not set the silent mode and the direct transmission mode at the same time, different reporting methods are adopted according to the different operating states of the energy storage system: that is, S250, when the operating state of the energy storage system is in a static state or a standby state, the real-time data is transmitted to the cloud server at the first preset transmission frequency, which belongs to low-frequency reporting. The data changes slowly to avoid repeated data reporting, so the low-frequency reporting method is adopted to save traffic.

[0046] In S260, when the energy storage system is not in a static state or a standby state, the energy storage system is in a charging state or a discharging state, and the real-time data is transmitted to the cloud server at a second preset transmission frequency, which is a high-frequency report. When the local energy storage system is in a charging / discharging state, the data changes in seconds or even milliseconds, and the timeliness of the data is high, so a high-frequency report is used.

[0047] The operating status of the energy storage system includes charging / discharging, static / standby mode, the start / end time of these modes, high / low frequency reporting, and change / full reporting, as shown in Table 1.

[0048] Table 1 Examples of system running time and enabled status in four status modes

[0049]

[0050] Optionally, the first preset frequency may be a frequency within a frequency range of uploading data once greater than or equal to 300 seconds and once less than or equal to 90 seconds.

[0051] The second preset frequency can be a frequency within a frequency range of uploading data once every 10 seconds or more and uploading data once every 3 seconds or less. It can be seen that the second preset frequency is significantly higher than the first preset frequency, the second preset frequency is a high frequency, and the first preset frequency is a low frequency.

[0052] Optionally, the high-frequency reporting frequency of data of devices such as inverters, battery stacks, battery clusters, battery cells, electric meters, and air conditioners is 3s. For specific setting values, please refer to Table 2. The collection frequency values ​​set in Table 2 are only examples and are not necessarily limited to these values.

[0053] Table 2 Example of reporting frequency setting values ​​for segmented data at high / low frequencies

[0054]

[0055] In one embodiment of the present application, when the energy storage system reports data at a low frequency, a combination of change reporting and full reporting is adopted. In this embodiment, specifically: a full reporting cycle parameter is set to 900s in the local energy storage system, and the local energy storage system will report full data every 900s, and at the same time, change reporting is performed within this cycle, so that data integrity can be guaranteed and repeated data reporting can be avoided.

[0056] In this embodiment, when the user does not set the silent mode and the direct transmission mode at the same time, the energy storage system is set to flexibly report the real-time data to the cloud server in different ways of low frequency or high frequency according to the operating status of the energy storage system, so that the energy storage system can report the real-time data at a higher reporting frequency when idle, and can report the real-time data at a lower reporting frequency when in the high-voltage working state of charging and discharging, thereby saving resources, improving the efficiency of reporting real-time data, and improving the effectiveness of real-time data.

[0057] like Figure 2 As shown, in one embodiment of the present application, the method further includes S700.

[0058] S700 includes:

[0059] S710: The energy storage system determines whether it has received a test call instruction sent by a cloud server.

[0060] S720: If the energy storage system receives a test call instruction sent by the cloud server, the energy storage system sends data collected within a preset time period closest to the current system time to the cloud server.

[0061] Specifically, this embodiment introduces another scenario: the cloud server actively calls for testing of the energy storage system. This embodiment adds that in some scenarios, the cloud server needs to view the instantaneous values ​​of certain devices, and the energy storage system is in a period of low reporting frequency. At this time, the cloud server has a large delay in obtaining real-time data. In this case, S710-S720 can be used to implement the cloud server to obtain real-time data using the call command.

[0062] S710 and later also include:

[0063] S730, if the energy storage system has not received the test call instruction sent by the cloud service, then return to S710, that is, return to the energy storage system to determine whether it has received the test call instruction sent by the cloud server.

[0064] S710 to S730 may be performed independently of other steps.

[0065] In this embodiment, the cloud server uses the call command to obtain real-time data, which is conducive to the cloud server to obtain the instantaneous data of the device at the fastest speed and minimize the delay in obtaining data. This embodiment uses three methods, namely silent, direct transmission, and active call, to obtain real-time data in multiple scales and multiple ways with increasingly smaller delay requirements. It has high flexibility and can seek the real-time data acquisition method required in various practical application scenarios, which greatly saves traffic and improves the upload quality of real-time data.

[0066] like Figure 2 As shown, in one embodiment of the present application, S500 includes, that is, the energy storage system extracts historical data stored in the local database, divides the historical data into segments by table segmentation, obtains multiple segmented data, and uploads the multiple segmented data to the cloud server, including:

[0067] S510, the energy storage system puts all data tables into a processing queue.

[0068] S520: The energy storage system randomly selects a data table in the processing queue, and determines whether the data table needs to be segmented into new data compression packages.

[0069] S530, if the data table needs to be divided into new data compression packages, the energy storage system divides the data in the data table according to collection time periods of equal time width to obtain data in different collection time periods, and regards the data in each collection time period as a segmented data.

[0070] S540, the energy storage system compresses each segmented data to obtain a data compression package corresponding to each segmented data.

[0071] S550: The energy storage system uploads all data compression packages to the cloud server one by one.

[0072] S560, return to S520 until the processing queue is cleared, that is, return to S520 until the processing queue is cleared.

[0073] S570, returning to the initial step S100, that is, returning to the energy storage system to determine whether real-time data reporting is required.

[0074] Specifically, if the data table needs to be segmented into new data compression packages in S520, it indicates that the data table has more data occupying storage space. At this time, the data should not be idle, but new segmented data should be segmented in time and compressed for subsequent upload, so S530 to S550 are executed. S530 is the segmentation step, S540 is the compression step, and S550 is the upload step. Each data table needs to execute S530, S540, and S550 in sequence. After the execution is completed, the next data table is polled to execute S530, S540, and S550.

[0075] Also note that S520 randomly selects a data table to execute S520 to S550, which ensures that the order of splitting each data table is completely random. This has the advantage of not causing some data tables to wait for splitting all the time, resulting in data redundancy.

[0076] It should be noted that the collection time periods of multiple segmented data segments within a group are the same to ensure the regularity of the segmented data, and the collection time periods of multiple segmented data segments between groups may be different. For example, after data table A is segmented, segmented data A1, segmented data A2 and segmented data A3 are generated. A1, A2 and A3 are all collected in a time period of 1 hour, and A1, A2 and A3 are all data with a time span of 1 hour. After data table B is segmented, segmented data B1, segmented data B2 and segmented data B3 are generated. B1, B2 and B3 are all collected in a time period of 2 hours, and B1, B2 and B3 are all data with a time span of 2 hours. The collection time period within group A is 1 hour, and the collection time period within group B is 2 hours. The same within the group, but different between groups because 1 hour is not equal to 2 hours, the difference between groups is because the data type and data characteristics of each device are different. Some devices have a large amount of data and occupy a large storage space, which is suitable for segmenting into segmented data with a shorter collection time period to ensure the real-time nature of the data, while the data segmentation of devices with a small amount of data is the opposite.

[0077] This embodiment processes data by dividing the data into tables and segments. This embodiment performs the table division operation first and then the segmentation operation.

[0078] Sub-table means that in the energy storage system, the collected device data is divided according to individual devices, and one device corresponds to one data table. Segmentation means that data is divided according to the collection time period, and the data within a collection time period is divided into continuous segmented data.

[0079] For example, if there are 2 inverters and 1 power cluster, you can generate sub-meters for inverter 1, inverter 2, and power cluster 1. For example, the data in the sub-meter for inverter 1 can be segmented according to the time span of each hour. At this time, each segmented data is the data of inverter 1 collected within 1 hour. Here, the collection time period in S530 is defined as 1 hour.

[0080] Moreover, the energy storage system uploads historical data only when it is in a static or standby state. At this time, the resources of the energy storage system are idle, and the data can be packaged, compressed, and uploaded efficiently by meter and time period.

[0081] The following is a brief description of how the data table is generated. As mentioned above, historical data is a full amount of data, so when the energy storage system collects data from its subordinate devices, it will first place the data collected at all time nodes in the energy storage system's MQ queue (MQ, Message Queue, MQ queue is a data that is well known in the communications and computer industries. It is difficult to have an appropriate translation into Chinese. Message queue is a more appropriate expression for the time being).

[0082] After each piece of data enters the MQ queue, the energy storage system consumes the data in the MQ queue. First, the data in the MQ queue is written or updated to the cache as real-time data; then the data in the MQ queue is stored in the data table of the corresponding device according to the device type as historical data. It should be noted that real-time data is stored in the cache, but it is not stored permanently. Each device only saves the last latest data as real-time data, and outdated real-time data will be deleted from the cache. Historical data is stored in the database, and each reported data will be written to the database.

[0083] In this embodiment, the purpose of saving traffic is achieved by dividing historical data into small data compression packages through the method of table segmentation and resuming data transmission at breakpoints. Moreover, through two-level judgment, the first level determines whether the segmentation generates new segmented data. If so, it is immediately segmented to form new segmented data to avoid data redundancy and loss of timeliness of segmented data. This is the first priority. The second level determines whether there is data that has been compressed but not reported. If there is data that has been compressed but not reported, then the data compression package should be reported to the cloud server first. This is the second priority. This ensures that the energy storage system works efficiently and effectively balances the resource allocation of the two important tasks of creating new segmented data and uploading data.

[0084] like Figure 2 As shown, in one embodiment of the present application, the S520 includes, that is, the energy storage system determines whether the data table needs to be split into a new data compression package, including:

[0085] S521, the energy storage system calculates the time difference between the current system time node and the time node of the most recent upload of the data compression package of the data table.

[0086] S522, the energy storage system determines whether the time difference is greater than or equal to the time span of the collection time period.

[0087] S523: If the time difference is greater than or equal to the time span of the acquisition time period, the energy storage system determines that the data table to be processed needs to be divided into new data compression packages.

[0088] Specifically, S520 also includes:

[0089] S524: If the time difference is less than the time span of the acquisition time period, the energy storage system determines that the data table to be processed does not need to be divided into new data compression packages.

[0090] S525, directly executing S550, that is, directly executing the energy storage system to upload all data compression packages to the cloud server one by one.

[0091] The specific judgment criteria for the energy storage system to judge whether the data table to be processed needs to be split into new data compression packages are:

[0092] Tjme_Now - Table[j]_Last_Report_Tjme>Tjme_Cycle

[0093] The fields in the above expression are described as follows:

[0094] Tjme_Now means: the current time of the system.

[0095] Table[j]_Last_Report_Tjme indicates: the upload time point of the last segmented data of data table j, which is the collection end time of the last segmented data reported corresponding to this data table. Wherein, sub-table j refers to a sub-table, such as inverter 1 sub-table, inverter 2 sub-table, power cluster 1 sub-table, etc. in the embodiment. The meaning of this parameter can be understood by referring to the content of Table 4.

[0096] Tjme_Cycle means: the time span of the collection period, which refers to the time span of a segmented data.

[0097] Tjme_Cycle = the end time of the segmented data collection - the start time of the segmented data collection. For example, referring to Example Table 4, Tjme_Cycle = (1723577400000 - 1723573800000) / 3600000 = 1 hour. This parameter is a parameter value set manually and can be adjusted according to the actual data volume. In this embodiment, the value is 1 hour, that is, the collection time period is 1 hour, which also means that the segmentation and compression of the segmented data are divided into small pieces of data based on 1 hour.

[0098] As long as the above conditions are met, it is necessary to create new segmented data, and then proceed to the next step to compress each segmented data and upload it to the cloud server.

[0099] In this embodiment, by setting the time difference between the current system time node and the time node of the most recent upload of the data compression package of the data table to be greater than the time span of the collection time period, it is ensured that M is at least greater than or equal to 1, thus ensuring that at least one segmented data can be cut out.

[0100] like Figure 2 As shown, in one embodiment of the present application, S530 includes, that is, the energy storage system divides the data in the data table according to collection time periods of equal time span to obtain data of different collection time periods, and uses the data of each collection time period as a segmented data, including:

[0101] S531, the energy storage system calculates the time difference between the current system time node and the time node of the most recent upload of the data compression package of the data table.

[0102] S532, the energy storage system divides the time difference by the time span of the acquisition time period to obtain a quotient, and uses the integer part of the quotient as the number M of new data compression packages that need to be split.

[0103] S533, the energy storage system uses the time node of the last upload of the data compression package from the to-be-processed data table as the starting time node for segmentation, and obtains M segmented data.

[0104] Specifically, this step is the process of creating new segmented data, in other words, the process of segmenting and forming segmented data. The calculation principle of steps S531 to S533 can be explained as the following formula:

[0105] M=(int) Math.floor((Time_Now - Table[j]_Last_Report_Time) / Time_Cycle)

[0106] The fields and meanings of the above expression are explained as follows:

[0107] M represents the number of new data compression packages that need to be split, that is, as of the current time, the historical data that needs to be uploaded by data table j needs to be divided into M segments, and then uploaded to the cloud server one by one according to the "compress->upload->decompress" steps.

[0108] This formula contains (int) Math.floor, which is the mathematical expression of the rounding function.

[0109] This rounding is rounded down (discarding the decimal part), which means that the segmented data are processed according to the integer multiples of the time span Time_Cycle of the collection time period. The data that is less than Time_Cycle will be processed in the next upload task. After completing this step, a new upload time node will be generated, that is, the upload time node of the last segmented data of data table j, that is, Table[j]_Last_Report_Time, which happens to be the start time of the next upload task.

[0110] Here, M data segments need to be generated to generate M data compression packages. The data are queried one by one according to the data table j and the start / end time, and then compressed into gzip file format and stored in the temporary file directory of the local energy storage system. Then, the step of sending an upload request to the cloud server is entered.

[0111] In this embodiment, the time difference between the current system time node and the time node of the most recent data compression package uploaded to the data table is divided by the time span of the collection time period, and the quotient is rounded to the integer to obtain the number M of new data compression packages that need to be split. This can ensure the continuity of the uploaded data to the greatest extent and ensure the integrity of the data. After rounding, the remaining part can also be uploaded next time through the time node without being lost.

[0112] like Figure 2 As shown, in one embodiment of the present application, S550 includes, that is, the energy storage system uploads all data compression packages to the cloud server one by one, including:

[0113] S551, the energy storage system determines whether any of the data tables has a compressed but unreported data compression package.

[0114] S552a, if there is any compressed but unreported data compression package in the data table, the energy storage system sends an upload request to the cloud server.

[0115] S552b, the cloud server receives the upload request of the energy storage system and calculates the upload priority of the energy storage system.

[0116] S552c, the cloud server determines whether the upload priority of the energy storage system is a high priority.

[0117] S552d1, if the upload priority of the energy storage system is high priority, the cloud server obtains the number of all energy storage systems in the uploading state.

[0118] S552d2, the cloud server determines whether the number of all energy storage systems in the uploading state is less than a first threshold.

[0119] In S552d3, if the number of energy storage systems in the upload state is less than the first threshold, the cloud server returns a message indicating that the energy storage system agrees to upload data, and marks the state of the energy storage system as the upload state.

[0120] In S552d4, the energy storage system uploads all the compressed data packets that have been compressed but not reported to the cloud server one by one in sequence.

[0121] In S552d5, if the number of energy storage systems in the upload state is greater than or equal to the first threshold, the cloud server returns a message indicating that the energy storage system refuses to upload data.

[0122] Specifically, this embodiment introduces the dynamic resource allocation strategy of the cloud server.

[0123] The previous embodiment introduced that the energy storage system uploads historical data only in a low-load state such as the static state or the standby state, and the cloud server also has a high-load state, and it is also necessary to control the timing of the energy storage system to upload historical data. All the steps of this embodiment introduce in detail how the server uploads under normal resource load.

[0124] The upload priority of the energy storage system is divided into high priority and normal priority. Of course, it can also be divided into multiple priorities. This embodiment takes the example of being divided into two priorities for illustration first.

[0125] In an embodiment of the present application, the method for determining whether the upload priority of the energy storage system is high priority may include, that is, S552c may include the following steps:

[0126] a. When Time_Site[i]_Last_Report_Time >= Time_Site[i]_First_Refuse_Time, the priority is reduced to normal.

[0127] b. When Time_Site[i]_Last_Report_Time < Time_Site[i]_First_Refuse_Time, it is divided into two cases:

[0128] b1: When Time_Site[i]_First_Refuse_Time - Time_Site[i]_Last_Report_Time <= the first preset time value, the priority is normal.

[0129] b2: When Time_Site[i]_First_Refuse_Time - Time_Site[i]_Last_Report_Time > the first preset time value, the priority is upgraded to high.

[0130] c. When Time_Now-Time_Site[i]_Last_Refuse_Time>the second preset time value, it means that the local energy storage system is inactive and may have been shut down. The priority of this type of local energy storage system needs to be forcibly set to normal to avoid occupying high-priority resources. Of course, a third priority can be set, named low priority, to mark the energy storage system in situation c as a low-priority energy storage system.

[0131] The first preset time value may be 2 days, and the second preset time value may be 3 days.

[0132] The fields in the above expression are described as follows:

[0133] Time_Site[i]_Last_Report_Time indicates the time when the energy storage system i last reported the compressed data package (referring to the time when the cloud server agreed to report and finally reported the compressed data package successfully), which is registered and recorded on the cloud server.

[0134] Time_Site[i]_First_Refuse_Time indicates the time when the first data compression package reported by energy storage system i is rejected, which is registered and recorded on the cloud server.

[0135] Time_Site[i]_Last_Refuse_Time indicates the time when the last data compression package reported by energy storage system i was rejected, which is registered on the cloud platform.

[0136] Time_Now means: current system time.

[0137] This setting helps to avoid the situation where frequently rejected energy storage systems cannot fairly upload data compression packages. It can be understood that the more frequently rejected energy storage systems are, the more likely they are to become high-priority energy storage systems.

[0138] After S520, that is, after the energy storage system randomly selects a data table in the processing queue and the energy storage system determines whether the data table needs to be segmented into new data compression packages, the following further includes:

[0139] If the energy storage system determines that the data table does not need to be divided into new data compression packages, S551 is directly executed.

[0140] In this embodiment, a priority judgment is added on the cloud server side, and the effect of efficient use of cloud server resources is achieved by giving priority to high-priority energy storage systems for uploading historical data.

[0141] like Figure 2As shown, in one embodiment of the present application, after S552c, that is, after the cloud server determines whether the upload priority of the energy storage system is a high priority, the method further includes:

[0142] S552e, if the upload priority of the energy storage system is not a high priority, the cloud server further determines whether the upload priority of the energy storage system is a normal priority.

[0143] S552f1, if the upload priority of the energy storage system is normal priority, the cloud server obtains the number of all energy storage systems in the uploading state.

[0144] S552f2, the cloud server determines whether the number of all energy storage systems in the uploading state is less than the second threshold.

[0145] S552f3, if the number of all energy storage systems in the uploading state is less than the second threshold, the cloud server returns a message to the energy storage system agreeing to upload data, and marks the state of the energy storage system as the uploading state.

[0146] S552f4, the energy storage system uploads all compressed but unreported data packages to the cloud server one by one.

[0147] S552f5, if the number of all energy storage systems in the uploading state is greater than or equal to a second threshold, the cloud server returns a message to the energy storage system rejecting data upload. The first threshold is greater than the second threshold.

[0148] Specifically, the first threshold value may be set based on the second threshold value, and the second threshold value may be increased by 30%. For example, if the second threshold value is 10, the first threshold value may be 13.

[0149] The cloud server will mark the status of each energy storage system to form a real-time dynamic priority table of local energy storage systems, which is used to register the reporting time and rejection time of historical data and dynamically update the priority of local energy storage systems, as shown in Table 3:

[0150] Table 3 Example of dynamic priority table of local energy storage system registered on cloud platform

[0151]

[0152] In one embodiment of the present application, in S552d3, if the number of all energy storage systems in the uploading state is less than the first threshold, the cloud server returns a message to the energy storage system agreeing to upload data, and marks the state of the energy storage system as the uploading state.

[0153] or

[0154] In S552f3, if the number of all energy storage systems in the uploading state is less than the second threshold, the cloud server returns a message to the energy storage system agreeing to upload data, and after marking the state of the energy storage system as the uploading state, it also includes:

[0155] S561, the energy storage system creates an upload task and executes the upload task, and the server adds 1 to the number of energy storage systems in the uploading state based on the original number.

[0156] Optionally, before S560, a step of determining whether the operating state of the energy storage system is in a static state or a standby state is performed once, and the upload task is performed only when it is in a static state or a standby state. On the contrary, if it is not in a static state or a standby state, data upload is automatically rejected, and the cloud server is notified to reject the upload task.

[0157] S562, the cloud server determines whether the upload task is completed. After the energy storage system has completed the upload, it will notify the cloud server that the upload task has been completed. The cloud server records and registers the data reporting time, which will become the last reporting time in Table 3 and overwrite the original last reporting time.

[0158] S563a, if the cloud server determines that the upload task is completed, the server will reduce the number of energy storage systems in the upload state by 1 based on the original number. This can release the resources of the cloud server.

[0159] SS63b, after the upload task is completed, the energy storage system deletes the uploaded data compression package of the energy storage hard disk, and the original segmented data corresponding to the data compression package is also deleted locally. Therefore, all segmented data will not have the "compressed and reported" status, because once the data compression package is successfully reported, the original segmented data corresponding to the data compression package will also be deleted. Of course, as another embodiment, the data compression package can be deleted, but the original segmented data is not deleted, and the status of the segmented data is only updated to "reported", as shown in the first two columns of data in Table 4.

[0160] S563c, return to the S400.

[0161] like Figure 2 As shown, in one embodiment of the present application, in S552d5, if the number of all energy storage systems in the uploading state is greater than or equal to the first threshold, then after returning a message that the energy storage system refuses to upload data

[0162] or

[0163] S552f4: If the number of all energy storage systems in the uploading state is greater than or equal to the second threshold, a message is returned indicating that the energy storage system refuses to upload data.

[0164] or

[0165] After the cloud server refuses to perform the upload task for other reasons,

[0166] Also includes:

[0167] S571, the energy storage system updates the status of the segmented data whose upload is rejected into the segmented data status statistics table, specifically, updates the status of the segmented data whose upload is rejected to compressed and not reported, see Table 4.

[0168] S572, the cloud server records the rejection time of the energy storage system to cover the last reported rejection time, that is, this rejection time is used as the latest last reported rejection time of the energy storage system, please refer to Table 3.

[0169] S573, return to the S400.

[0170] In this embodiment, by setting the first threshold and the second threshold, differentiated resource allocation of high priority and normal priority is achieved through these two thresholds of different levels.

[0171] In one embodiment of the present application, after S551, that is, after determining whether any data table has a compressed data compression package that has been compressed but not reported, the method further includes:

[0172] S553a, if the data table does not contain any data table of compressed but unreported data compression packages, then return to S100, that is, return to the energy storage system to determine whether real-time data reporting is required.

[0173] Specifically, the energy storage system can generate a segment data status statistics table for registering the segment data status (uncompressed and not reported, compressed and not reported, reported), as shown in Table 4:

[0174] Table 4 Segment data status statistics

[0175]

[0176] The energy storage system can read Table 4 in real time to know whether there is a data table without compressed but unreported data compression packages.

[0177] In this embodiment, if the data table does not contain any data table of compressed but unreported data compression packages, it is determined that all data compression packages of the data table have been uploaded, and the process returns to the initial step to start a new polling.

[0178] The technical features of the above-described embodiments may be arbitrarily combined, and the execution order of the method steps is not limited. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0179] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A cloud-edge collaborative data exchange method, characterized in that: The method comprises: The energy storage system determines whether real-time data reporting is required; If real-time data reporting is required, the energy storage system further determines whether the direct transmission mode of the energy storage system is turned on; If the direct transmission mode of the energy storage system is turned on, the energy storage system will transparently transmit real-time data to the cloud server; If real-time data reporting is not required, the energy storage system further determines whether the operating state of the energy storage system is in a static state or a standby state; If the energy storage system is in a static state or a standby state, the energy storage system extracts the historical data stored in the local database, divides the historical data into multiple segments by table segmentation, and uploads the multiple segments to the cloud server; when dividing, the historical data of different devices are divided into different data tables, and each segment data is obtained by cutting the data in a data table, and each segment data is the data collected within a collection time period; If the direct transmission mode of the energy storage system is not turned on, the energy storage system determines whether the silent mode of the energy storage system is turned on; If the silent mode of the energy storage system is not turned on, the energy storage system obtains the operating status of the energy storage system; The energy storage system determines whether the operating state of the energy storage system is in a static state or a standby state; If the operating state of the energy storage system is in a static state or a standby state, the energy storage system transmits real-time data to the cloud server at a first preset transmission frequency; If the operating state of the energy storage system is not in a static state or a standby state, the energy storage system transmits real-time data to the cloud server at a second preset transmission frequency; the first preset transmission frequency is less than the second preset transmission frequency; The energy storage system extracts historical data stored in a local database, divides the historical data into segments by table division, obtains multiple segmented data, and uploads the multiple segmented data to a cloud server, including: The energy storage system puts all data tables into the processing queue; The energy storage system randomly selects a data table in the processing queue, and determines whether the data table needs to be split into a new data compression package; If the data table needs to be divided into new data compression packages, the energy storage system divides the data in the data table according to collection time periods of equal time span to obtain data in different collection time periods, and regards the data in each collection time period as a segmented data; The energy storage system compresses each segmented data to obtain a data compression package corresponding to each segmented data; The energy storage system uploads all data compression packages to the cloud server one by one; The energy storage system removes the data table from the processing queue; Returning to the energy storage system, randomly selecting a data table in the processing queue, the energy storage system determines whether the data table needs to be segmented into new data compression packages until the processing queue is cleared; Returning to the energy storage system to determine whether real-time data reporting is required; The energy storage system uploads all data compression packages to the cloud server one by one, including: The energy storage system determines whether any of the data tables has a compressed but unreported data compression package; If there is any compressed but unreported data package in the data table, the energy storage system sends an upload request to the cloud server; The cloud server receives the upload request from the energy storage system and calculates the upload priority of the energy storage system; The cloud server determines whether the upload priority of the energy storage system is a high priority; If the upload priority of the energy storage system is a high priority, the cloud server obtains the number of all energy storage systems in the upload state; The cloud server determines whether the number of all energy storage systems in the upload state is less than the first threshold; If the number of all energy storage systems in the upload state is less than the first threshold, the cloud server returns a message agreeing to data upload for the energy storage system and marks the state of the energy storage system as the upload state; The energy storage system uploads all the compressed data packets that have been compressed but not reported to the cloud server one by one in sequence; Determining whether the upload priority of the energy storage system is a high priority includes: a. When Time_Site[i]_Last_Report_Time >= Time_Site[i]_First_Refuse_Time, the priority is reduced to normal; b. When Time_Site[i]_Last_Report_Time < Time_Site[i]_First_Refuse_Time, it is divided into two cases: b1: When Time_Site[i]_First_Refuse_Time - Time_Site[i]_Last_Report_Time <= the first preset time value, the priority is normal; b2: When Time_Site[i]_First_Refuse_Time - Time_Site[i]_Last_Report_Time > the first preset time value, the priority is upgraded to high; c. When Time_Now - Time_Site[i]_Last_Refuse_Time > the second preset time value, the priority of this type of local energy storage system is forcibly set to normal; Time_Site[i]_Last_Report_Time represents: the time of the last reported data compression packet of energy storage system i (referring to the time when the cloud server agrees to report and finally successfully reports the data compression packet), Time_Site[i]_First_Refuse_Time represents: the time when the first reported data compression packet of energy storage system i is rejected, Time_Site[i]_Last_Refuse_Time represents: the time when the last reported data compression packet of energy storage system i is rejected, and Time_Now represents: the current system time.

2. The cloud-edge collaborative data exchange method according to claim 1 is characterized in that: After the energy storage system determines whether the silent mode of the energy storage system is enabled, the method further includes: If the silent mode of the energy storage system is enabled, the energy storage system stops transmitting real-time data to the cloud server.

3. The cloud-edge collaborative data exchange method according to claim 2 is characterized in that: The method further includes: The energy storage system determines whether it has received a polling command sent by the cloud server; If the energy storage system receives a polling command sent by the cloud server, the energy storage system sends the data collected within a preset time period closest to the current system time to the cloud server.

4. The cloud-edge collaborative data exchange method according to claim 3 is characterized in that: The energy storage system determines whether the data table needs to be segmented into new data compression packages, including: The energy storage system calculates the time difference between the current system time node and the time node of the most recent data compression package upload of the data table; The energy storage system determines whether the time difference is greater than or equal to the time span of the acquisition time period; If the time difference is greater than or equal to the time span of the acquisition time period, the energy storage system determines that the data table to be processed needs to be split into new data compression packages.

5. The cloud-edge collaborative data exchange method according to claim 4 is characterized in that: The energy storage system divides the data in the data table according to collection time periods of equal time span to obtain data in different collection time periods, and regards the data in each collection time period as segmented data, including: The energy storage system calculates the time difference between the current system time node and the time node of the most recent data compression package upload of the data table; The energy storage system divides the time difference by the time span of the acquisition period to obtain a quotient, and uses the integer part of the quotient as the number M of new data compression packages that need to be split; The energy storage system uses the time node of the most recent data compression package uploaded to the data table to be processed as the starting time node for segmentation, and obtains M segmented data.

6. The cloud-edge collaborative data exchange method according to claim 5, characterized in that: The energy storage system uploads all data compression packages to the cloud server one by one, and also includes: If the number of all energy storage systems in the uploading state is greater than or equal to the first threshold, the cloud server returns a message to the energy storage system rejecting data upload.

7. The cloud-edge collaborative data exchange method according to claim 6, characterized in that: After the cloud server determines whether the upload priority of the energy storage system is a high priority, the method further includes: If the upload priority of the energy storage system is not a high priority, the cloud server further determines whether the upload priority of the energy storage system is a normal priority; If the upload priority of the energy storage system is normal priority, the cloud server obtains the number of all energy storage systems in the uploading state; The cloud server determines whether the number of all energy storage systems in the uploading state is less than a second threshold; If the number of all energy storage systems in the uploading state is less than the second threshold, the cloud server returns a message to the energy storage system agreeing to upload data, and marks the state of the energy storage system as the uploading state; The energy storage system uploads all compressed but unreported data packages to the cloud server one by one; If the number of all energy storage systems in the uploading state is greater than or equal to a second threshold, the cloud server returns a message to the energy storage system rejecting data upload; the first threshold is greater than the second threshold.

8. The cloud-edge collaborative data exchange method according to claim 7, characterized in that: After the cloud server determines whether there is any compressed but unreported data compression package in the data table, the method further includes: If the data table does not contain any compressed but unreported data compression package, it returns to the energy storage system to determine whether real-time data reporting is required.

Citation Information

Patent Citations

  • Charging pile operation method and system and cloud server

    CN111192410A

  • Method and device for determining data transmission mode

    CN115134043A

  • Energy internet of things cloud edge collaboration method based on MQTT protocol and storage medium

    CN118353895A