Data storage method and device of energy storage power station and data storage equipment

By using millisecond periodic reception and analysis of data packets in energy storage power stations and selecting storage methods based on alarm flag bits, the error clearing problem caused by large amount of battery data in energy storage power stations is solved, and high-resolution data storage and accurate fault location are achieved.

CN119829579APending Publication Date: 2025-04-15HANGZHOU GOLD ELECTRONICS EQUIP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411891960.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-20
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

The amount of battery data in energy storage power plants is large. When existing ESEDR devices meet the storage volume of large data, they may lead to the error clearing of key fault data, which will lead to the problem of being unable to accurately locate the cause of the fault of the energy storage power plant.

Method used

A data storage method for energy storage power stations is adopted. By receiving data packets sent by the battery management system in a preset millisecond period, analyzing the data packets to obtain equipment data information, and determining the target storage method based on the alarm flag bits, and selecting ring storage or external medium storage to ensure the accuracy and reliability of the data.

Benefits of technology

It realizes the storage of high-resolution data, avoids the loss of key data, can accurately trace back-locate the cause of the power station accident, solves the problem of accidentally clearing data, and improves the accurate positioning ability of the cause of failure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119829579A_ABST
    Figure CN119829579A_ABST
Patent Text Reader

Abstract

The invention provides a data storage method and device of an energy storage power station and data storage equipment, and relates to the technical field of data processing. The method comprises the following steps: receiving a data packet sent by a battery management system in the energy storage power station according to a preset millisecond-level period; analyzing the data packet to obtain data information of each device in the energy storage power station; determining a target storage mode of the data information of each device according to an alarm flag bit in the data information of each device; and storing the data information of each device according to the target storage mode of the data information of each device. According to the scheme, the data change when a certain device in the energy storage power station breaks down can be comprehensively recorded, the situation that key data are lost is avoided, therefore, accurate backtracking and positioning of power station accident reasons are achieved, the situation that in the prior art, key fault data are possibly removed mistakenly is solved, and the power station accident locating accuracy is improved. Therefore, the fault reason of the energy storage power station cannot be accurately positioned.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data storage, and in particular to a data storage method, device and data storage equipment for an energy storage power station. Background Art

[0002] Generally, during the operation of an energy storage power station, it is necessary to periodically collect and monitor battery data and power parameters to ensure the normal operation of the power station.

[0003] In the prior art, the collected data is received and stored by a data security and traceability device (Electric Storage Event Data Recorder, ESEDR). Specifically, the operating data generated by each device in the energy storage power station during each collection cycle is sent to the data security and traceability device for storage.

[0004] However, energy storage power stations contain a large number of batteries, and the amount of data that needs to be collected is extremely large. In order to meet the storage needs of large amounts of data, data security and traceability devices often need to clear the stored data regularly. There is a possibility that key fault data may be mistakenly cleared, which may make it impossible to accurately locate the cause of the failure of the energy storage power station. Summary of the invention

[0005] The purpose of the present invention is to provide a data storage method, device and data storage equipment for an energy storage power station in order to solve the technical problems existing in the prior art.

[0006] To achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:

[0007] In a first aspect, an embodiment of the present application provides a data storage method for an energy storage power station, the method comprising:

[0008] Receive data packets sent by the battery management system in the energy storage power station according to a preset millisecond period;

[0009] Parsing the data packet to obtain data information of each device in the energy storage power station, the data information including: device identification, data type, timestamp, operation data and alarm flag;

[0010] Determine the target storage mode of the data information of each device according to the alarm flag in the data information of each device, the target storage mode includes: ring storage or external medium storage;

[0011] The data information of each of the devices is stored according to the target storage mode of the data information of each of the devices.

[0012] Optionally, determining a target storage mode of the data information of each device according to an alarm flag in the data information of each device includes:

[0013] If the alarm flag in the data information of the device is a first preset value, determining that the target storage mode of the data information of the device is an external medium storage mode;

[0014] If the alarm flag in the data information of the device is a second preset value, it is determined that the target storage mode of the data information of the device is a ring storage mode, and the first preset value and the second preset value are different from each other.

[0015] Optionally, storing the data information of each device according to a target storage mode of the data information of each device includes:

[0016] If the target storage mode is external medium storage, determining the start timestamp and end timestamp of the data to be stored according to the timestamp and the preset duration in the data information of the device;

[0017] At least one target data information to be stored is determined according to the start timestamp and the end timestamp, and the at least one target data information to be stored is stored; wherein the time indicated by the timestamp in the target data information is between the start timestamp and the end timestamp.

[0018] Optionally, storing the at least one target data information to be stored includes:

[0019] Determine the file information corresponding to each target data information according to the data type in each target data information, wherein the file information includes: a file path and a file name;

[0020] Using a preset data compression algorithm to compress the timestamp and the running data in each of the target data information to generate compressed data corresponding to each of the target data information;

[0021] According to the file information corresponding to each of the target data information, the compressed data corresponding to each of the target data information is stored.

[0022] Optionally, storing the compressed data corresponding to each target data information according to the file information corresponding to each target data information includes:

[0023] Determine whether the file path in the file information exists;

[0024] If it exists, and according to the file name in the file information, it is determined that the target storage file indicated by the file name has been created, then the target storage file is opened, and the compressed data is written to the target storage file, and the file name of the target storage file is updated after the writing is completed.

[0025] Optionally, it also includes:

[0026] If the file path does not exist, create and open the file path;

[0027] Determining, according to the file name in the file information, whether the target storage file indicated by the file name has been created;

[0028] If it has been created, the target storage file is opened, and the compressed data is written into the target storage file, and the file name of the target storage file is updated after the writing is completed.

[0029] Optionally, storing the data information of each device according to a target storage mode of the data information of each device includes:

[0030] If the target storage mode is a ring storage mode, the data information of the device is stored in the ring storage mode;

[0031] If the current cache space is insufficient, the data information of the device is overwritten to the head of the circular queue.

[0032] Optionally, parsing the data packet includes:

[0033] Performing a cyclic redundancy check on the data packet;

[0034] If the cyclic redundancy check passes, the data packet is parsed.

[0035] In a second aspect, an embodiment of the present application provides a data storage device for an energy storage power station, the device comprising:

[0036] A receiving module, used to receive data packets sent by a battery management system in an energy storage power station according to a preset millisecond period;

[0037] A parsing module, used to parse the data packet to obtain data information of each device in the energy storage power station, wherein the data information includes: device identification, data type, timestamp, operation data and alarm flag;

[0038] A determination module, used to determine a target storage mode of the data information of each device according to an alarm flag in the data information of each device, wherein the target storage mode includes: ring storage or external medium storage;

[0039] The storage module is used to store the data information of each device according to the target storage mode of the data information of each device.

[0040] Optionally, the determining module is specifically configured to:

[0041] If the alarm flag in the data information of the device is a first preset value, determining that the target storage mode of the data information of the device is an external medium storage mode;

[0042] If the alarm flag in the data information of the device is a second preset value, it is determined that the target storage mode of the data information of the device is a ring storage mode, and the first preset value and the second preset value are different from each other.

[0043] Optionally, the storage module is specifically used to:

[0044] If the target storage mode is external medium storage, determining the start timestamp and end timestamp of the data to be stored according to the timestamp and the preset duration in the data information of the device;

[0045] At least one target data information to be stored is determined according to the start timestamp and the end timestamp, and the at least one target data information to be stored is stored; wherein the time indicated by the timestamp in the target data information is between the start timestamp and the end timestamp.

[0046] Optionally, the storage module is specifically used to:

[0047] Determine the file information corresponding to each target data information according to the data type in each target data information, wherein the file information includes: a file path and a file name;

[0048] Using a preset data compression algorithm to compress the timestamp and the running data in each of the target data information to generate compressed data corresponding to each of the target data information;

[0049] According to the file information corresponding to each of the target data information, the compressed data corresponding to each of the target data information is stored.

[0050] Optionally, the storage module is specifically used to:

[0051] Determine whether there is a file path in the storage information;

[0052] If it exists, and according to the file name in the file information, it is determined that the target storage file indicated by the file name has been created, then the target storage file is opened, and the compressed data is written to the target storage file, and the file name of the target storage file is updated after the writing is completed.

[0053] Optionally, the storage module is specifically used to:

[0054] If the file path does not exist, create and open the file path;

[0055] Determining, according to the file name in the file information, whether the target storage file indicated by the file name has been created;

[0056] If it has been created, the target storage file is opened, and the compressed data is written into the target storage file, and the file name of the target storage file is updated after the writing is completed.

[0057] Optionally, the storage module is specifically used to:

[0058] If the target storage mode is a ring storage mode, the data information of the device is stored in the ring storage mode;

[0059] If the current cache space is insufficient, the data information of the device is overwritten to the head of the circular queue.

[0060] Optionally, the parsing module is specifically used to:

[0061] Performing a cyclic redundancy check on the data packet;

[0062] If the cyclic redundancy check passes, the data packet is parsed.

[0063] In a third aspect, an embodiment of the present application further provides a data storage device, which electronic device includes: a processor, a storage medium and a bus, the storage medium stores machine-readable instructions executable by the processor, and when the data storage device is running, the processor and the storage medium communicate through the bus, and the processor executes the machine-readable instructions to perform the steps of the data storage device method provided in the first aspect.

[0064] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the data storage device method provided in the first aspect are executed.

[0065] The beneficial effects of this application are:

[0066] The present application provides a data storage method, device and data storage device for an energy storage power station. In this scheme, the scheme proposes that a data packet sent by a battery management system in an energy storage power station can be received according to a preset millisecond period, that is, the data generated by each device in the energy storage power station during operation is obtained at a millisecond frequency, so that the real-time and accuracy of the obtained data can be guaranteed, and the problem that the existing ESEDR device has low data resolution, that is, large data granularity, resulting in the inability to accurately trace back the changes in battery data during a fault, thereby causing the inability to accurately locate the cause of the fault; at the same time, according to the alarm flag bit in the data information of each device, the data information is classified and stored, so that the data changes when a certain device in the energy storage power station fails can be fully recorded, avoiding the loss of key data, thereby realizing accurate traceability and positioning of the cause of the power station accident, and solving the problem that the key fault data may be mistakenly cleared in the prior art, thereby causing the inability to accurately locate the cause of the energy storage power station. BRIEF DESCRIPTION OF THE DRAWINGS

[0067] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0068] Figure 1 A schematic diagram of a flow chart of a data storage method for an energy storage power station provided in an embodiment of the present application;

[0069] Figure 2 A schematic flow chart of another data storage method for an energy storage power station provided in an embodiment of the present application;

[0070] Figure 3 A schematic diagram of a flow chart of another data storage method of an energy storage power station provided in an embodiment of the present application;

[0071] Figure 4 A schematic flow chart of another data storage method for an energy storage power station provided in an embodiment of the present application;

[0072] Figure 5 A schematic diagram of a flow chart of another data storage method of an energy storage power station provided in an embodiment of the present application;

[0073] Figure 6 A schematic diagram of a flow chart of a data storage method for an energy storage power station provided in an embodiment of the present application;

[0074] Figure 7 A schematic diagram of a flow chart of a data storage method for an energy storage power station provided in an embodiment of the present application;

[0075] Figure 8 A schematic diagram of the overall process of a data storage method for an energy storage power station provided in an embodiment of the present application;

[0076] Fig. 9 A structural schematic diagram of a data storage device of an energy storage power station provided in an embodiment of the present application;

[0077] Fig.10 A schematic diagram of the structure of a data storage device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0078] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.

[0079] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0080] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.

[0081] First, the background technology involved in this application is introduced.

[0082] In the prior art, the collected data is received and stored through a data security and traceability device (Energy Storage Event Data Recorder, referred to as ESEDR). Specifically, the operating data generated by each device in the energy storage power station during each collection cycle is sent to the data security and traceability device for storage.

[0083] However, energy storage power stations contain a large number of batteries, and the amount of data that needs to be collected is extremely large. The storage medium size of existing ESEDR devices is limited. In order to meet the storage of large amounts of data, it is often necessary to clear the stored data regularly. There is a possibility that key fault data may be mistakenly cleared, which may make it impossible to accurately locate the cause of the failure of the energy storage power station.

[0084] In addition, the data of each device stored on the existing ESEDR device is at the minute level. When a storage power station fails, such as battery leakage or short circuit causing explosion and combustion, the battery properties change within a few seconds or hundreds of milliseconds. The existing ESEDR device has the problem of low data resolution, which makes it impossible to accurately trace back the changes in battery data at the time of the failure, and thus makes it impossible to accurately locate the cause of the failure.

[0085] The embodiment of the present application is based on the above-mentioned problem. The present application provides a data storage method for an energy storage power station. The data packet sent by the battery management system can be received according to a preset millisecond period. The data packet is obtained based on the data information generated by each device during operation. The data packet includes: device identification, data type, timestamp, operation data and alarm flag, that is, the data generated by the operation of each device in the energy storage power station is obtained at a frequency of milliseconds, which solves the problem that the existing ESEDR device has low data resolution, that is, large data granularity, which makes it impossible to accurately trace back the changes in battery data during a fault, and thus the cause of the fault cannot be accurately located; then, according to the alarm flag in the data information of each device, the target storage mode of the data information of each device is determined, and the data information of each device is stored according to the target storage mode of the data information of each device, that is, the data information can be classified and stored according to the alarm flag in the data information of each device, so that the data changes when a certain device in the energy storage power station fails can be fully recorded, avoiding the loss of key data, thereby realizing accurate traceback and positioning of the cause of the power station accident, and solving the problem that the key fault data may be mistakenly cleared in the prior art, thereby causing the cause of the energy storage power station to be unable to be accurately located.

[0086] Optionally, the data storage method for the energy storage power station provided in the present application has the characteristics of high-resolution data, high reliability and long fault backtracking time, and can accurately trace back and locate the cause of the power station accident.

[0087] The implementation principle and corresponding beneficial effects of the data storage method steps of the energy storage power station provided by the present application will be explained through multiple specific embodiments as follows.

[0088] In one embodiment, reference Figure 1As shown, a data storage method for an energy storage power station is provided. Optionally, the execution subject of the method can be a data storage device of the energy storage power station. The data storage device has a data processing function, and the data storage device should also have the ability to receive millisecond-level data and store it.

[0089] It should be understood that in other embodiments, the order of some steps in the data storage method of the energy storage power station can be interchanged according to actual needs, or some steps can be omitted or deleted. Figure 1 As shown, the method includes:

[0090] S101. Receive a data packet sent by a battery management system in an energy storage power station according to a preset millisecond period.

[0091] The millisecond cycle refers to the duration of the cycle in milliseconds, for example, 1ms, 10ms, etc. It can also be a microsecond cycle to obtain the data generated by each device in the energy storage power station during operation.

[0092] The battery management system is used to manage various devices in the energy storage power station.

[0093] Optionally, in this embodiment, in order to solve the problem that the existing ESEDR device has low data resolution, which makes it impossible to accurately trace back the changes in battery data during a fault, and thus makes it impossible to accurately locate the cause of the fault, this solution proposes that data packets sent by the battery management system in the energy storage power station can be received according to a preset millisecond period (for example, 1ms), that is, the data generated by the operation of each device in the energy storage power station is obtained at a millisecond frequency, which can ensure the real-time and accuracy of the acquired data.

[0094] S102: Parse the data packet to obtain data information of each device in the energy storage power station.

[0095] The data information includes: device identification, data type, timestamp, operation data and alarm flag.

[0096] Optionally, a preset data parsing method (such as JSON parsing) can be used to parse and process the data packet to obtain data information of each device in the energy storage power station. For example, the data generated by device 1 during operation includes: device identification ID1, data type current, timestamp 11:30:25:000, operation data 1.3mA, alarm flag 0; for another example, the data generated by device 2 during operation includes: device identification ID2, data type voltage, timestamp 11:00:30:000, operation data 5V, alarm flag 1.

[0097] S103: Determine the target storage mode of the data information of each device according to the alarm flag in the data information of each device.

[0098] The target storage method includes: circular storage method or external media storage method. (1) The circular storage method refers to storing data in a circular queue, that is, when the data reaches the end of the array, it will automatically return to the beginning of the array, thus forming a loop. (2) The external media storage method refers to storing data on a physical medium that is independent of the computer's internal storage device, such as a USB flash drive (U disk), an external hard drive (External Hard Drive), an SD card, and a MicroSD card.

[0099] S104. Store the data information of each device according to the target storage method of the data information of each device.

[0100] In this embodiment, in order to improve the storage efficiency of data and avoid the loss of key data, it is proposed that the target storage mode of the data information of each device can be determined according to the alarm flag in the data information of each device. For example, the alarm flag in the data information of device 2 is 1, that is, it can be determined that the data information of device 2 currently collected has alarm information, therefore, it is necessary to focus on storing the data information of device 2 currently collected, that is, to determine that the target storage mode of the data information of device 2 is the external medium storage mode; and store the data information of device 2 according to the external medium storage mode. Therefore, in this embodiment, it is proposed that the data information of the failed device and the data information of the non-failed device can be classified and stored according to the alarm flag in the data information of each device, so that the data changes when a certain device in the energy storage power station fails can be fully recorded, avoiding the loss of key data, thereby realizing the accurate retrospective positioning of the cause of the power station accident, solving the problem that the key fault data may be mistakenly cleared in the prior art, thereby causing the failure cause of the energy storage power station to be unable to be accurately located.

[0101] In summary, the embodiment of the present application provides a data storage method for an energy storage power station. In this scheme, the scheme proposes that a data packet sent by a battery management system in an energy storage power station can be received according to a preset millisecond period, that is, the data generated by each device in the energy storage power station during operation is obtained at a millisecond frequency, so that the real-time and accuracy of the acquired data can be guaranteed, and the problem that the existing ESEDR device has low data resolution, that is, large data granularity, resulting in the inability to accurately trace back the changes in battery data during a fault, thereby causing the inability to accurately locate the cause of the fault and the fault chain; at the same time, according to the alarm flag bit in the data information of each device, the data information of the faulty device and the data information of the non-faulty device are classified and stored, so that the data changes when a certain device in the energy storage power station fails can be fully recorded, avoiding the loss of key data, thereby realizing accurate traceback and positioning of the cause of the power station accident, and solving the problem that the key fault data may be mistakenly cleared in the prior art, thereby causing the inability to accurately locate the cause of the energy storage power station.

[0102] Optionally, refer to Figure 2 As shown, the above step S103 includes:

[0103] S201: If the alarm flag in the data information of the device is a first preset value, determine that the target storage mode of the data information of the device is an external medium storage mode.

[0104] In one feasible method, for example, the first preset value is 1. When the received data information of device 1 is: device identification is ID1, data type is current, timestamp is 11:30:25:000, operation data is 1.6A, and alarm flag is 1, it can be determined that the data of device 1 currently collected is abnormal. Therefore, it is necessary to use an external medium storage method to store all data of device 1 (such as current, voltage, temperature, humidity, etc.). For example, if all data of device 1 is stored in an SD card in a data storage device, it is possible to maintain normal data storage in extreme environments, ensuring that key data can still be recorded in emergency situations such as power station explosions or fires, that is, to avoid the loss of key data, thereby facilitating the location of the cause of the fault and fault analysis.

[0105] S202: If the alarm flag in the data information of the device is a second preset value, determine that the target storage mode of the data information of the device is a ring storage mode.

[0106] The first preset value and the second preset value are different from each other. For example, when the first preset value is 1, the second preset value may be 0, that is, the second preset value is different from the first preset value.

[0107] In another achievable manner, for example, the second preset value is 0; when the received data information of device 1 includes: device identification ID1, timestamp 10:30:40:000, data type voltage, operating data 3A, alarm flag 0, and data type current, operating data 2A, alarm flag also 0, it can be determined that the data information of device 1 currently collected does not have any abnormality, that is, it is operating data generated during normal operation. Therefore, a circular storage method can be used to store the data of device 1 in the cache area of ​​the data storage device. Among them, when the stored data in the cache area is cleared regularly, there is no situation where key data will be accidentally deleted, which improves the reliability of data storage.

[0108] Optionally, refer to Figure 3 As shown, the above step S104 includes:

[0109] S301: If the target storage mode is an external medium storage mode, determine the start timestamp and the end timestamp of the data to be stored according to the timestamp in the data information of the device and the preset duration.

[0110] Exemplarily, for example, the timestamp in the data information of device 1 is 11:30:25:000, and the preset duration is 5 minutes. That is, when a failure occurs, all data of device 1 within 5 minutes before and after is obtained. Therefore, it can be determined that the start timestamp is 11:25:25:000 and the end timestamp is 11:35:25:000.

[0111] S302: Determine at least one target data information to be stored according to the start timestamp and the end timestamp, and store the at least one target data information to be stored.

[0112] The time indicated by the timestamp in the target data information is between the start timestamp and the end timestamp.

[0113] Optionally, based on the above embodiment, at least one target data information to be stored can be determined according to the start timestamp and the end timestamp, such as the timestamp in the first target data information is 11:29:00:000, that is, the timestamp in the first target data information is greater than the start timestamp and less than the end timestamp, and the time indicated by the timestamp in the first target data information is between the start timestamp and the end timestamp. In other words, only the data information between the start timestamp and the end timestamp needs to be obtained, avoiding the storage of a large amount of useless data information, which makes it difficult or impossible to quickly and accurately locate and trace the cause of the fault, and further makes it impossible to confirm the fault sequence causal relationship and fault chain.

[0114] Optionally, in the solution provided in the present application, millisecond-level data is stored, up to 1ms data, that is, the changes in power station battery data when a fault occurs can be accurately recorded in real time, thereby accurately locating the cause of the fault.

[0115] Optionally, refer to Figure 4 As shown, the above step S303 includes:

[0116] S401. Determine file information corresponding to each target data information according to the data type in each target data information.

[0117] The file information includes: file path and file name.

[0118] Exemplarily, for example, if the data types in the multiple data information collected from device 1 are all current, it can be determined that the file path in the storage information corresponding to the multiple data information of device 1 is C:\Program Files\Current Data and the file name is 11:25:25-11:35:25 current abnormal data.

[0119] For another example, if the data types in the multiple data information of device 2 are all voltage, it can be determined that the file path in the storage information corresponding to the multiple data information of device 2 is C:\Program Files\voltage data and the file name is 11:25:25-11:35:25 voltage abnormal data.

[0120] S402: Use a preset data compression algorithm to compress the timestamp and running data in each target data information to generate compressed data corresponding to each target data information.

[0121] Exemplarily, for example, the data compression algorithm may be: a lossless data compression algorithm (Lempel-Ziv-Oberhumer, LZO for short).

[0122] In this example, for example, the LZO compression algorithm can be used to perform real-time compression processing on the operating data in each target data information. For example, the start timestamp is 11:25:30:000, the end timestamp is 11:35:30:000, and the current operating data in multiple data information of device 1 obtained from the start timestamp to the end timestamp are: 1.6A, 1.5A, 1.3A, 1.1A, ... 2.9A, etc., and the size of multiple data information of device 1 is 1.9M. Therefore, a lossless data compression algorithm can be used to compress the collected multiple data information of device 1 to obtain the compressed data corresponding to each target data information, that is, the compressed data, and the compressed size is 300kb.

[0123] Therefore, this solution proposes to use large-capacity storage media (i.e., external storage media) and real-time compression algorithms to store tens of thousands of fault entries, that is, the storage time is long, and the alarm data of the energy storage power station several months ago can be recorded, which is convenient for operation and maintenance personnel to locate the cause of the fault.

[0124] It should be noted that, for multiple data messages from the same device, and when the data types in each data message are the same, it is only necessary to compress the timestamps and running data in each data message in the order of timestamps, that is, to save them in the form of ms-level timestamps and running data during storage, which can accurately record data changes and ensure data reliability from multiple dimensions, thus achieving high reliability in storing critical data when a failure occurs.

[0125] Optionally, in order to achieve the storage of tens of thousands of fault data and to make the traceback time up to several months, the present application proposes the use of large-capacity storage media and real-time compression algorithms to store tens of thousands of fault entries and record the alarm data of the energy storage power station several months ago, so as to facilitate operation and maintenance personnel to locate the cause of the fault.

[0126] S403: Store the compressed data corresponding to each target data information according to the file information corresponding to each target data information.

[0127] Optionally, based on the above embodiment, the file paths and file names corresponding to the multiple target data information of the device 1 determined above can be directly used to store the compressed data, thereby realizing the storage of multiple key data of different devices when a failure occurs.

[0128] Optionally, refer to Figure 5 As shown, according to the file information corresponding to each target data group, the compressed data corresponding to each target data information is stored, including:

[0129] S501: Determine whether the file path in the file information exists.

[0130] For example, the file path in the file information corresponding to the multiple data information of device 1 is C:\Program Files\current data. Therefore, with the file path as the query condition, it is determined whether the file path of the multiple data information of device 1 exists. If not, the file path of the multiple data information of device 1 is created; if it exists, it is determined whether the target storage file indicated by the file name has been created according to the file name in the file information, that is, whether the file named "current abnormality data" is created.

[0131] S502: If it exists, and according to the file name in the file information, it is determined that the target storage file indicated by the file name has been created, then the target storage file is opened, and the compressed data is written to the target storage file, and the file name of the target storage file is updated after the writing is completed.

[0132] Optionally, based on the above embodiment, if it has been created, the compressed data is directly written to the target storage file to realize the storage of multiple data generated by device 1 when a failure occurs in the energy storage power station, so that the cause of the failure can be quickly located directly from the target storage file later; if the file named "current abnormality data" is not created, a file named "current abnormality data" is created.

[0133] Secondly, after all the data generated by device 1 when the fault occurs are written to the target storage file, the file name of the target storage file can also be updated, such as using the device identifier, data type, start timestamp and end timestamp of device 1 to generate the updated file name of the target storage file, such as the updated file name is device 1+current+11:25:25+11:35:25. In this way, the operation and maintenance personnel can quickly obtain multiple key data when the fault occurs through the updated file name, and quickly locate the cause of the fault based on multiple key data.

[0134] Optionally, it also includes:

[0135] If the file path does not exist, create and open the file path; determine whether the target storage file indicated by the file name has been created based on the file name in the file information; if not created, create and open the target storage file, write the compressed data to the target storage file, and update the file name of the target storage file after writing is completed.

[0136] In another achievable method, for example, if the file path C:\Program Files\Current Data in the file information corresponding to the multiple data information of device 1 does not exist, then create and open the file path C:\Program Files\Current Data; then, determine whether the "Current Abnormal Data" file has been created; if not, create and open the "Current Abnormal Data" file, and write all the data generated by device 1 when the fault occurs into the "Current Abnormal Data" file.

[0137] Optionally, refer to Figure 6 As shown, the above step S104 includes:

[0138] S601: If the target storage mode is a ring storage mode, the data information of the device is stored in the ring storage mode.

[0139] S602: If the current cache space is insufficient, the data information of the device is overwritten to the head of the circular queue.

[0140] In another achievable manner, for example, if the target storage mode of the data information of the device 3 currently collected is a ring storage mode, the data information of the device 3 is stored in a ring queue mode in sequence using the ring storage mode; when storing data up to a certain timestamp, if it is found that the current cache space is insufficient, the multiple unstored data information of the device 3 is directly overwritten with the oldest data, that is, the data stored at the head of the ring queue is cleared, and since all the data stored in the ring queue are not critical data, the critical data will not be accidentally deleted. In this way, the reliability of data storage is guaranteed.

[0141] Optionally, refer to Figure 7 As shown, the above step S102 includes:

[0142] S701: Perform a cyclic redundancy check on the data packet.

[0143] S702: If the cyclic redundancy check passes, the data packet is parsed.

[0144] Optionally, in order to improve the reliability of data storage, the present solution also requires a cyclic redundancy check (CRC) to be performed on each received millisecond-level period data packet to detect or verify the correctness or integrity of the data packet during transmission. If a data packet of a millisecond-level period passes the CRC check, the data packet of the millisecond-level period is parsed; for example, if the data packet of the millisecond-level period passes the CRC check, the data packet of the millisecond-level period is discarded, and the data packet of the next millisecond-level period of the millisecond-level period is continued to pass the CRC check. Therefore, in the present solution, the CRC check method is used during communication to ensure the reliability of data transmission.

[0145] Optionally, refer to Figure 8 As shown, it is a schematic diagram of the overall process of the data storage method of the energy storage power station provided by the present application, and the method includes:

[0146] S801, receiving a data packet sent by a battery management system in an energy storage power station according to a preset millisecond period;

[0147] S802: Perform CRC check on the data packet.

[0148] Optionally, if the verification passes, the data packet is parsed to obtain data information of the device, wherein the data information includes: device identification, data type, timestamp, operation data and alarm flag; if not, it is discarded.

[0149] S803: Determine a target storage method for the data information of the device according to the alarm flag in the data information of the device.

[0150] Exemplarily, if the alarm flag in the device's data information is 1, that is, there is alarm information in the device's data information, then the target storage method of the device's data information is determined to be the external media storage method; if the alarm flag in the device's data information is 0, that is, there is no alarm information in the device's data information, then the target storage method of the device's data information is determined to be the ring storage method.

[0151] S804: If the target storage mode is external medium storage, determine the start timestamp and end timestamp of the data to be stored according to the timestamp in the data information of the device and the preset duration.

[0152] S805: Determine at least one target data information to be stored according to the start timestamp and the end timestamp.

[0153] S806: Use a preset data compression algorithm to compress the timestamp and operation data in each target data information to generate compressed data corresponding to each target data information.

[0154] S807. According to the file path and file name corresponding to each target data information, the compressed data corresponding to each target data information is stored, and the target data information corresponding to this alarm information is written completely.

[0155] Optionally, determine whether the file path in the file information exists; if it exists, and based on the file name in the file information, determine that the target storage file indicated by the file name has been created, then open the target storage file, write the compressed data to the target storage file, and update the file name of the target storage file after writing is completed.

[0156] In another achievable manner, if the target storage mode is a ring storage mode, the data information of the device is stored in a ring storage mode; if the current cache space is insufficient, the data information of the device is overwritten to the head of the ring queue.

[0157] Based on the same inventive concept, an embodiment of the present application also provides a data storage device for an energy storage power station corresponding to the data storage method for the energy storage power station. Since the principle of solving the problem by the device in the embodiment of the present application is similar to the data storage method for the energy storage power station in the embodiment of the present application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0158] Fig. 9 A schematic diagram of the structure of a data storage method and device provided in an embodiment of the present application is shown in FIG. Fig. 9 As shown, the device comprises:

[0159] The receiving module 901 is used to receive the data packet sent by the battery management system in the energy storage power station according to a preset millisecond period;

[0160] The parsing module 902 is used to parse the data packet to obtain data information of each device in the energy storage power station, wherein the data information includes: device identification, data type, timestamp, operation data and alarm flag;

[0161] The determination module 903 is used to determine the target storage mode of the data information of each device according to the alarm flag in the data information of each device, and the target storage mode includes: ring storage or external medium storage;

[0162] The storage module 904 is used to store the data information of each device according to the target storage mode of the data information of each device.

[0163] Optionally, the determining module 903 is specifically configured to:

[0164] If the alarm flag in the data information of the device is a first preset value, determining that the target storage mode of the data information of the device is an external medium storage mode;

[0165] If the alarm flag in the data information of the device is a second preset value, it is determined that the target storage mode of the data information of the device is a ring storage mode, and the first preset value and the second preset value are different from each other.

[0166] Optionally, the storage module 904 is specifically configured to:

[0167] If the target storage mode is external medium storage, determining the start timestamp and end timestamp of the data to be stored according to the timestamp and the preset duration in the data information of the device;

[0168] At least one target data information to be stored is determined according to the start timestamp and the end timestamp, and the at least one target data information to be stored is stored; wherein the time indicated by the timestamp in the target data information is between the start timestamp and the end timestamp.

[0169] Optionally, the storage module 904 is specifically configured to:

[0170] Determine the file information corresponding to each target data information according to the data type in each target data information, wherein the file information includes: a file path and a file name;

[0171] Using a preset data compression algorithm to compress the timestamp and the running data in each of the target data information to generate compressed data corresponding to each of the target data information;

[0172] According to the file information corresponding to each of the target data information, the compressed data corresponding to each of the target data information is stored.

[0173] Optionally, the storage module 904 is specifically configured to:

[0174] Determine whether the file path in the file information exists;

[0175] If it exists, and according to the file name in the storage information, it is determined that the target storage file indicated by the file name has been created, then the target storage file is opened, and the compressed data is written to the target storage file, and the file name of the target storage file is updated after the writing is completed.

[0176] Optionally, the storage module 904 is specifically configured to:

[0177] If the file path does not exist, create and open the file path;

[0178] According to the file name in the file information, determining whether the target storage file indicated by the file name has been created;

[0179] If not created, create and open the target storage file, write the compressed data to the target storage file, and update the file name of the target storage file after writing is completed.

[0180] Optionally, the storage module 904 is specifically configured to:

[0181] If the target storage mode is a ring storage mode, the data information of the device is stored in the ring storage mode;

[0182] If the current cache space is insufficient, the data information of the device is overwritten to the head of the circular queue.

[0183] Optionally, the parsing module 902 is specifically configured to:

[0184] Performing a cyclic redundancy check on the data packet;

[0185] If the cyclic redundancy check passes, the data packet is parsed.

[0186] The above-mentioned device is used to execute the method provided by the aforementioned embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.

[0187] The above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more digital singnal processors (DSP), or one or more field programmable gate arrays (FPGA). For another example, when a module is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0188] Fig.10 This is a schematic diagram of a data storage device provided in an embodiment of the present application. The data storage device can be installed at the bottom of an energy storage power station container and is a computing device with data processing capabilities.

[0189] The data storage device includes: a processor 1001 and a memory 1002 .

[0190] The memory 1002 is used to store programs, and the processor 1001 calls the programs stored in the memory 1002 to execute the above method embodiment. The specific implementation method and technical effect are similar and will not be repeated here.

[0191] Optionally, the present invention also provides a program product, such as a computer-readable storage medium, comprising a program, which is used to execute the above method embodiment when executed by a processor.

[0192] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0193] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0194] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0195] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to perform some steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (English: Read-Only Memory, abbreviated: ROM), random access memory (English: Random Access Memory, abbreviated: RAM), disk or optical disk and other media that can store program codes.

Claims

1. A data storage method for an energy storage power station, characterized in that: The method comprises: Receive data packets sent by the battery management system in the energy storage power station according to a preset millisecond period; Parsing the data packet to obtain data information of each device in the energy storage power station, the data information including: device identification, data type, timestamp, operation data and alarm flag; Determine the target storage mode of the data information of each device according to the alarm flag in the data information of each device, the target storage mode includes: ring storage or external medium storage; The data information of each of the devices is stored according to the target storage mode of the data information of each of the devices.

2. The method according to claim 1, characterized in that Determining the target storage mode of the data information of each device according to the alarm flag in the data information of each device includes: If the alarm flag in the data information of the device is a first preset value, determining that the target storage mode of the data information of the device is an external medium storage mode; If the alarm flag in the data information of the device is a second preset value, it is determined that the target storage mode of the data information of the device is a ring storage mode, and the first preset value and the second preset value are different from each other.

3. The method according to claim 1, characterized in that The storing of the data information of each device according to the target storage mode of the data information of each device includes: If the target storage mode is external medium storage, determining the start timestamp and end timestamp of the data to be stored according to the timestamp and the preset duration in the data information of the device; At least one target data information to be stored is determined according to the start timestamp and the end timestamp, and the at least one target data information to be stored is stored; wherein the time indicated by the timestamp in the target data information is between the start timestamp and the end timestamp.

4. The method according to claim 3, characterized in that The storing of the at least one target data information to be stored comprises: Determine the file information corresponding to each target data information according to the data type in each target data information, wherein the file information includes: a file path and a file name; Using a preset data compression algorithm to compress the timestamp and the running data in each of the target data information to generate compressed data corresponding to each of the target data information; According to the file information corresponding to each of the target data information, the compressed data corresponding to each of the target data information is stored.

5. The method according to claim 4, characterized in that The storing of compressed data corresponding to each target data information according to the file information corresponding to each target data information includes: Determine whether the file path in the file information exists; If it exists, and according to the file name in the file information, it is determined that the target storage file indicated by the file name has been created, then the target storage file is opened, and the compressed data is written to the target storage file, and the file name of the target storage file is updated after the writing is completed.

6. The method according to claim 4, characterized in that Also includes: If the file path does not exist, create and open the file path; Determining, according to the file name in the file information, whether the target storage file indicated by the file name has been created; If not created, the target storage file is created and opened, and the compressed data is written to the target storage file, and the file name of the target storage file is updated after the writing is completed.

7. The method according to claim 1, characterized in that The storing of the data information of each device according to the target storage mode of the data information of each device includes: If the target storage mode is a ring storage mode, the data information of the device is stored in the ring storage mode; If the current cache space is insufficient, the data information of the device is overwritten to the head of the circular queue.

8. The method according to claim 1, characterized in that The parsing of the data packet includes: Performing a cyclic redundancy check on the data packet; If the cyclic redundancy check passes, the data packet is parsed.

9. A data storage device, characterized in that: The device comprises: A receiving module, used to receive data packets sent by a battery management system in an energy storage power station according to a preset millisecond period; A parsing module, used to parse the data packet to obtain data information of each device in the energy storage power station, wherein the data information includes: device identification, data type, timestamp, operation data and alarm flag; A determination module, used to determine a target storage mode of the data information of each device according to an alarm flag in the data information of each device, wherein the target storage mode includes: ring storage or external medium storage; The storage module is used to store the data information of each device according to the target storage mode of the data information of each device.

10. A data storage device, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the data storage device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of any method as described in claims 1-8.