A method, system, electronic device and storage medium for running data storage
By dynamically adjusting the data sampling rate and prediction period when the battery pack is powered on, and judging the operating status based on the changes in the battery data group, the problems of computing and storage burden in the battery management system are solved, and efficient data analysis and battery status monitoring are achieved.
Patent Information
- Application Number
- CN202411649997.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2044-11-19
AI Technical Summary
Existing battery management systems have difficulty accurately analyzing the cause of a battery pack failure, and the excessive amount of data stored in the memory increases the computing and storage burden.
By determining whether it is the first time the battery pack is powered on, dynamically adjusting the data sampling rate and prediction period, judging the operating status according to the changes in the battery data group, and adjusting the data storage method in different states, including the use of regular files and snapshot files.
It optimizes the computing and storage burden of the battery management system, improves the accuracy and efficiency of data analysis, and ensures fast access to critical data and safe operation of the battery.
Smart Images

Figure CN119597214B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of battery management technology, and in particular to a method and system for storing operating data, an electronic device, and a storage medium. Background Art
[0002] The battery management system is used to monitor the operating data of the battery. Generally, after the battery pack leaves the factory, if a fault occurs, the data is only saved at the moment the battery pack fails and is detected by the battery management system. The amount of saved data is difficult to use for analyzing the usage and evolution of the battery pack, making it difficult for technicians to determine whether the fault is caused by battery usage problems or quality problems of the battery itself.
[0003] To optimize the accuracy of data analysis after a battery pack failure, existing technologies typically record data from the moment the battery pack is powered on to ensure data integrity. However, due to the long battery pack operation time, the memory stores an excessive amount of battery pack data, which in turn increases the computational and storage burden of the battery management system during data analysis. Summary of the Invention
[0004] The problem solved by the present invention is how to reduce the computational burden and storage burden of a battery management system while ensuring the accuracy of analyzing key data of a battery pack.
[0005] To solve the above problems, the present invention provides a method and system for storing running data, an electronic device and a storage medium.
[0006] In a first aspect, the present invention provides an operation data storage method, which is applied to a battery management system. The operation data storage method includes:
[0007] When the battery pack is in a powered-on state, determining whether the battery pack is powered-on for the first time, and setting a data sampling rate and a data prediction period according to the determination result;
[0008] Continuously monitoring the battery pack according to the data sampling rate to obtain a battery data group of the battery pack and store it in a regular file;
[0009] executing a determination step, the determination step including, when the duration of monitoring the battery pack at the current data sampling rate reaches a data prediction period, predicting a change in the battery data group within a preset future time period based on a change in the battery data group within the data prediction period, to obtain a future change in the battery data group;
[0010] Determining the operating state of the battery pack according to the future changes of the battery data group within the preset future time period;
[0011] When the operating state of the battery pack is normal, adjusting the data sampling rate to a preset sampling rate, continuing to monitor the data of the battery pack according to the preset sampling rate, storing the monitored battery data group in the regular file, and returning to the determination step, while adjusting the data prediction period to the first time period;
[0012] When the operating state of the battery pack is a warning state, adjusting the data sampling rate to a first sampling rate, continuing to monitor the battery pack data at the first sampling rate, storing the monitored battery data group in a regular file, and returning to the determination step, while adjusting the data prediction period to a second time period;
[0013] When the operating state of the battery pack is an emergency state, adjusting the data sampling rate to a second sampling rate, continuing to monitor the battery pack data at the second sampling rate, storing the monitored battery data group as snapshot data in a snapshot file, returning to the determination step, and adjusting the data prediction period to a third time period;
[0014] Among them, the change amplitude and / or change frequency of the battery data groups corresponding to the normal state, the warning state and the emergency state increase successively, the preset sampling rate is less than the first sampling rate, the first sampling rate is less than the second sampling rate, the first time period is greater than the second time period, and the second time period is greater than the third time period.
[0015] Optionally, the determining whether the battery pack is powered on for the first time and setting the data sampling rate and the data prediction period according to the determination result includes:
[0016] When the battery pack is powered on, obtain the operating time of the battery management system hardware;
[0017] Determining whether the battery pack is powered on for the first time based on the hardware time;
[0018] If yes, initializing the data sampling rate to the preset sampling rate, and initializing the data prediction period to the first time period;
[0019] If not, the historical sampling rate and historical prediction period recorded last time are used as the data sampling rate and the data prediction period respectively.
[0020] Optionally, determining whether the battery pack is powered on for the first time and setting the data sampling rate according to the determination result includes:
[0021] When the battery pack is powered on, obtain the hardware operating time of the battery management system;
[0022] Determining whether the battery pack is powered on for the first time based on the hardware running time;
[0023] If so, initializing the data sampling rate to a preset sampling rate;
[0024] If not, the last recorded historical sampling rate is used as the data sampling rate.
[0025] Optionally, the continuously monitoring the battery pack data according to the data sampling rate to obtain the battery data group of the battery pack and storing it in a regular file includes:
[0026] Acquire parameter data of the battery pack according to the data sampling rate to obtain the battery data group of the battery pack;
[0027] Detecting whether the file name corresponding to the battery data group contains an identifier indicating the latest state;
[0028] If yes, open the regular file and write the battery data set to the end of the regular file;
[0029] If not, the file name of the regular file is updated according to the battery data set, and then the battery data set is written to the end of the regular file.
[0030] Optionally, the continuously monitoring the data of the battery pack according to the data sampling rate to obtain the battery data group of the battery pack and storing it in a regular file further includes:
[0031] Continuously monitoring and collecting data of the battery pack according to the data sampling rate, and continuously detecting whether the remaining storage space of the storage device where the regular file is located is less than the storage space required by the battery data group to be written;
[0032] If the detection result shows that the remaining storage space of the storage device where the regular file is located is less than the storage space required by the battery data group to be written, retrieving the timestamp associated with each battery data group in the regular file;
[0033] sorting the battery data group according to the timestamps to form a time series;
[0034] Starting from the earliest battery data set in the time series, the battery data sets are deleted one by one until the remaining storage space of the regular file is greater than or equal to the storage space required by the battery data set to be written.
[0035] Optionally, judging the operating state of the battery pack according to the future change of the battery data group within the preset future time period includes:
[0036] Acquire a plurality of battery data groups within the preset future time period, each battery data group including values of a plurality of parameters of the battery pack at a sampling moment;
[0037] When the value of each parameter of the battery pack in the preset future time period is within the normal threshold range corresponding to the parameter, determining that the operating state is a normal state;
[0038] When a value of any one of the parameters of the battery pack within the preset future time period is within a warning threshold range corresponding to the parameter, determining that the operating state is a warning state;
[0039] When a value of any one of the parameters of the battery pack within the preset future time period is within an emergency threshold range corresponding to the parameter, determining that the operating state is an emergency state;
[0040] Among them, for each of the parameters, the maximum value of the normal threshold range corresponding to the parameter is less than or equal to the minimum value of the warning threshold range corresponding to the parameter, and the maximum value of the warning threshold range corresponding to the parameter is less than or equal to the minimum value of the emergency threshold range corresponding to the parameter.
[0041] Optionally, when the operating state of the battery pack is an emergency state, adjusting the data sampling rate to a second sampling rate, continuing to monitor the battery pack data according to the second sampling rate, and storing the battery data group obtained by monitoring as snapshot data in a snapshot file, includes:
[0042] When the operating state of the battery pack is an emergency state, updating the file name of the battery data group of the battery pack according to the battery data group monitored according to the second sampling rate;
[0043] The battery data group monitored according to the second sampling rate is written to the end of the snapshot file in the form of the updated file name.
[0044] Optionally, the operation data storage method further includes:
[0045] When the battery pack is shut down or in standby mode in the normal operating state, the hardware operating time of the battery management system is reset.
[0046] In a second aspect, the present invention provides an operating data storage system, comprising:
[0047] a sampling rate setting unit, configured to determine, when the battery pack is in a powered-on state, whether the battery pack is powered-on for the first time, and to set a data sampling rate and a data prediction period according to the determination result;
[0048] a storage adjustment unit, configured to continuously monitor the data of the battery pack according to the data sampling rate, obtain a battery data group of the battery pack, and store the data in a regular file;
[0049] A judgment unit is configured to execute a judgment step, wherein when the duration of monitoring the battery pack at the current data sampling rate reaches a data prediction period, based on the changes of the battery data group within the data prediction period, a change of the battery data group within a preset future time period is predicted to obtain future changes of the battery data group;
[0050] Determining the operating state of the battery pack according to the future changes of the battery data group within the preset future time period;
[0051] When the operating state of the battery pack is normal, adjusting the data sampling rate to a preset sampling rate, continuing to monitor the data of the battery pack according to the preset sampling rate, storing the monitored battery data group in the regular file, and returning to the determination step, while adjusting the data prediction period to the first time period;
[0052] When the operating state of the battery pack is a warning state, adjusting the data sampling rate to a first sampling rate, continuing to monitor the battery pack data at the first sampling rate, storing the monitored battery data group in a regular file, and returning to the determination step, while adjusting the data prediction period to a second time period;
[0053] When the operating state of the battery pack is an emergency state, adjusting the data sampling rate to a second sampling rate, continuing to monitor the battery pack data at the second sampling rate, storing the monitored battery data group as snapshot data in a snapshot file, returning to the determination step, and adjusting the data prediction period to a third time period;
[0054] Among them, the change amplitude and / or change frequency of the battery data groups corresponding to the normal state, the warning state and the emergency state increase successively, the preset sampling rate is less than the first sampling rate, the first sampling rate is less than the second sampling rate, the first time period is greater than the second time period, and the second time period is greater than the third time period.
[0055] In a third aspect, the present invention provides an electronic device comprising a memory and a processor; the memory is used to store a computer program; and the processor is used to implement the above-mentioned method for storing running data when executing the computer program.
[0056] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-mentioned method for storing running data.
[0057] The operating data storage method, system, electronic device, and storage medium of the present invention initialize the data sampling rate and data prediction period by intelligently determining whether it is the first power-on when the battery pack is powered on, and predicting the battery data group within the data prediction period. Based on the predicted future changes of the battery data group, the battery data is continuously monitored and the sampling frequency is dynamically adjusted according to the trend of data changes in a preset future time period to optimize data acquisition. At the same time, the data prediction period of the battery data is adjusted according to the data changes, and then the prediction frequency of the battery data group is adjusted, thereby reducing the computing pressure of the system under normal circumstances and optimizing the use of storage resources. In warning and emergency states, the prediction period is successively reduced and the prediction frequency of the battery data group is increased, thereby more flexibly responding to different operating states and improving the response flexibility of the system. By dynamically adjusting the sampling rate according to the operating state of the battery pack, the amount of data stored during normal battery operation can be reduced to reduce unnecessary data storage and improve the efficiency of data management. At the same time, when the battery state changes significantly, data sampling is increased to capture key state changes, thereby ensuring the analysis accuracy of key data. Specifically, when the battery pack is operating normally, a preset lower sampling rate is used for data monitoring, reducing the amount of data in the memory and optimizing the use of storage resources. This helps reduce the storage burden, allowing the memory to be used more efficiently to store critical data. When the battery pack is in a warning or emergency state, increasing the sampling rate can more accurately capture changes in the battery status, which is crucial for subsequent data analysis and fault diagnosis. This allows technicians to more accurately determine the cause of the fault, whether it is due to battery usage issues or battery quality issues. In an emergency, the monitored data is stored as snapshot data in a snapshot file, and the file name is updated based on the fault information. The real-time update and snapshot storage mechanism ensures that battery status data can be quickly accessed and analyzed at critical moments, further ensuring safe battery operation and health management. Furthermore, since the amplitude and frequency of changes in the battery data groups corresponding to normal, warning, and emergency states increase in sequence, corresponding sampling frequencies are set to adapt to the data monitoring needs of the battery pack under different operating conditions, ensuring data continuity and integrity. The integrated intelligent data analysis tool of the present invention analyzes battery performance and health status in real time, predicts potential problems, reduces data processing requirements during low-variability periods, thereby reducing storage requirements, avoids oversampling when the battery status is stable, and increases the sampling rate when the battery status changes significantly. It can capture key data points more accurately, thereby improving the relevance and accuracy of data analysis, optimizing the use of storage resources, enhancing data analysis accuracy, and ensuring rapid access to and analysis of battery status data at critical moments; and through continuous monitoring and adaptive adjustment, the battery management system can better cope with various situations during the operation of the battery pack and improve the robustness and reliability of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 This is a flow chart of a method for storing running data according to an embodiment of the present invention;
[0059] Figure 2 A schematic diagram of a system for storing operating data according to another embodiment of the present invention;
[0060] Figure 3 This is a schematic structural diagram of an electronic device according to another embodiment of the present invention. DETAILED DESCRIPTION
[0061] To make the above-mentioned objects, features, and advantages of the present invention more clearly understood, specific embodiments of the present invention are described in detail below with reference to the accompanying drawings. Although certain embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be construed as being limited to the embodiments described herein. Instead, these embodiments are provided to provide a more thorough and complete understanding of the present invention. It should be understood that the drawings and embodiments of the present invention are for illustrative purposes only and are not intended to limit the scope of protection of the present invention.
[0062] It should be understood that the various steps described in the method embodiments of the present invention may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this respect.
[0063] The term "including" and its variations used in this document are open inclusions, that is, "including but not limited to"; the term "based on" means "based at least in part on"; the term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one other embodiment"; the term "some embodiments" means "at least some embodiments"; the term "optionally" means "optional embodiments". The relevant definitions of other terms will be given in the following description. It should be noted that the concepts of "first", "second", etc. mentioned in the present invention are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0064] It should be noted that the modifications of "one" and "multiple" mentioned in the present invention are illustrative rather than restrictive. Those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0065] The names of the messages or information exchanged between multiple devices in the embodiments of the present invention are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0066] In related technologies, although full-process recording can provide complete data, a large amount of data may contain a lot of redundant or less important information, which makes it more difficult to extract useful information from the data and conduct in-depth analysis. As the operating time of the battery pack increases, the amount of data accumulated in the memory continues to increase, which may lead to storage space exhaustion and inability to continue recording data. At the same time, continuous data collection and processing will increase the energy consumption of the BMS and affect the overall efficiency of the battery pack. The accumulation of a large amount of data causes the BMS to face a higher computing burden during data processing and analysis, which may affect the response speed and performance of the system.
[0067] In response to the problems existing in the above-mentioned related technologies, this embodiment provides a method, system and storage medium for storing running data.
[0068] Combine Figure 1 As shown, an embodiment of the present invention provides an operation data storage method, which is applied to a battery management system (BMS). The operation data storage method includes:
[0069] When the battery pack is in a powered-on state, it is determined whether the battery pack is powered-on for the first time, and the data sampling rate and the data prediction period are set according to the determination result.
[0070] Specifically, when the battery pack is powered on, the BMS first checks the battery pack's startup log or identification parameters to determine whether this is the first time the battery pack has been powered on. In a preferred embodiment of the present invention, if this is the first time the battery pack has been powered on, the BMS sets an initial data sampling rate and data prediction period based on pre-set initial parameters. If this is not the first time the battery pack has been powered on, the BMS resumes data collection at the sampling rate used before the last power outage, or re-evaluates and sets an appropriate sampling rate and data prediction period based on the battery's historical data and current status.
[0071] The battery pack is continuously monitored for data according to the data sampling rate to obtain a battery data group of the battery pack and store it in a regular file.
[0072] Specifically, the BMS continuously monitors key battery pack parameters at a set sampling rate. In a preferred embodiment of the present invention, this includes monitoring of the battery pack's voltage, current, temperature, and SOC (State of Charge). During data collection, the BMS records the values of these parameters in real time and performs preliminary processing and analysis as needed. The collected battery data sets are stored in the BMS's regular storage files. Within a preset time period, the BMS evaluates whether the sampling rate needs to be adjusted based on the changing trends and patterns of the battery data.
[0073] executing a determination step, the determination step including, when the duration of monitoring the battery pack at the current data sampling rate reaches a data prediction period, predicting a change in the battery data group within a preset future time period based on a change in the battery data group within the data prediction period, to obtain a future change in the battery data group;
[0074] Determining the operating state of the battery pack according to the future changes of the battery data group within the preset future time period;
[0075] When the operating state of the battery pack is normal, adjusting the data sampling rate to a preset sampling rate, continuing to monitor the data of the battery pack according to the preset sampling rate, storing the monitored battery data group in the regular file, and returning to the determination step, while adjusting the data prediction period to the first time period;
[0076] When the operating state of the battery pack is a warning state, adjusting the data sampling rate to a first sampling rate, continuing to monitor the battery pack data at the first sampling rate, storing the monitored battery data group in a regular file, and returning to the determination step, while adjusting the data prediction period to a second time period;
[0077] When the operating state of the battery pack is an emergency state, adjusting the data sampling rate to a second sampling rate, continuing to monitor the battery pack data at the second sampling rate, storing the monitored battery data group as snapshot data in a snapshot file, returning to the determination step, and adjusting the data prediction period to a third time period;
[0078] Among them, the change amplitude and / or change frequency of the battery data groups corresponding to the normal state, the warning state and the emergency state increase successively, the preset sampling rate is less than the first sampling rate, the first sampling rate is less than the second sampling rate, the first time period is greater than the second time period, and the second time period is greater than the third time period.
[0079] Specifically, the BMS first predicts changes in the battery data set within a preset future time period based on changes in the battery data set within the data prediction period. This prediction is typically performed using a deep learning network. The system then adjusts the data prediction period based on the predicted changes in the battery data set within the preset future time period. This allows the system to predict the future battery state based on current battery data changes. Under normal conditions, the prediction period can be extended because the battery state is relatively stable and frequent predictions are unnecessary. In warning or emergency conditions, shortening the prediction period allows for faster response to changes in battery state, allowing for timely action. The predicted battery data set for the future time period is analyzed to assess the battery pack's operating status, which includes normal, warning, and emergency conditions. When the battery pack is in normal condition, the BMS adjusts the data sampling rate to the preset sampling rate, which is a balanced sampling frequency sufficient to continuously monitor the battery pack's status without excessively consuming storage resources or energy. If the operating status is a warning, indicating that the battery pack may have some non-critical issues, such as a slight voltage deviation or temperature increase, the BMS will increase the data sampling rate to the first sampling rate to monitor the battery status more frequently, thereby enabling a quick response to possible faults. In emergency conditions, such as overheating, overcharging, or voltage abnormalities, the BMS will further increase the data sampling rate to the second sampling rate. The second sampling rate is the highest sampling frequency and is used to ensure that detailed data can be captured for fault analysis in critical situations. In a preferred embodiment of the present invention, when the voltage exceeds a preset threshold, the BMS adjusts the operating status from normal to warning and increases the sampling rate accordingly. As the voltage continues to rise, the system may further upgrade the status to emergency and record data at the highest sampling rate. By adjusting the sampling rate according to different operating conditions, the BMS can ensure that more detailed data is captured as the battery status changes, thereby improving the accuracy and usefulness of data analysis. At the same time, lowering the sampling rate when the battery status is stable can reduce unnecessary data storage and processing, thereby saving storage space and energy consumption.
[0080] Among them, regular files are used to store battery data groups monitored at a preset sampling rate or a first sampling rate. These data are used for daily battery status monitoring and analysis, and reflect the operation of the battery pack in normal or warning states. Snapshot files are used to store battery data groups monitored at a second sampling rate when the battery pack is in an emergency state. Snapshot files are equivalent to data backups in an emergency state, which can be quickly accessed and used for rapid response and fault diagnosis in emergency situations. The purpose of snapshot files is to quickly obtain detailed data when an emergency occurs in the battery pack, so that timely processing can be carried out. In the battery management system, snapshot files can provide detailed data in an emergency state, which helps to analyze the cause of the fault and take appropriate measures.
[0081] For example, assume that a battery pack is used in an electric vehicle. The battery management system (BMS) is responsible for monitoring the performance and state of this battery pack. When the battery pack is powered on, the BMS checks whether this is the first time the battery pack is powered on; if so, the BMS sets an initial data sampling rate and data prediction period, for example, sampling the battery's voltage, current, and temperature every 10 seconds; at the same time, continuously monitor the battery pack according to the initial sampling rate, and store the collected data (voltage, current, temperature, etc.) in a regular file; these data constitute a battery data group. And regularly (for example, every minute or every hour) predict the stored battery data group, for example, the battery data group within 1 minute predicts the future change of the battery data group in the future time period.
[0082] If the BMS finds that the change of battery parameters is very small through analysis (for example, the battery is running in a stable state), the BMS may reduce the sampling rate, while extending the prediction period of the battery data group, so as to reduce the prediction frequency, to reduce the demand of data storage. This may mean that the BMS will adjust the sampling rate to sample once every 30 seconds.
[0083] If the BMS detects rapid changes in battery parameters (for example, battery temperature rises sharply or current suddenly increases), the BMS may increase the sampling rate, while shortening the prediction period of the battery data group, so as to increase the prediction frequency, to more closely monitor the battery state. This may mean that the BMS will adjust the sampling rate to sample once every 5 seconds.
[0084] If the BMS detects that any parameter reaches an emergency threshold (for example, the battery temperature exceeds the set safety limit or the voltage suddenly drops to a dangerous level), the BMS will store the current battery data group as snapshot data to a snapshot file, and may trigger an alarm or take emergency measures such as cutting off power or starting the cooling system.
[0085] In this way, the BMS can intelligently adjust the data sampling rate according to the actual running state of the battery, both ensuring sufficient monitoring of the battery state and optimizing the efficiency of data storage and processing. This adaptive sampling strategy helps to prolong the battery life, improve the battery performance, and ensure the safety of battery use.
[0086] The operation data storage method of the application initializes the data sampling rate and the data prediction period by intelligently judging whether it is the first power-on when the battery pack is powered on, and predicts according to the battery data set within the data prediction period, and then continuously monitors the battery data and dynamically adjusts the sampling frequency according to the trend of data change in the preset future time period, to realize the optimization of data acquisition, and at the same time, the data prediction period of the battery data is adjusted according to the data change, and the prediction frequency of the battery data set is adjusted, so as to reduce the calculation pressure of the system under normal circumstances, and optimize the use of storage resources; in the warning state and the emergency state, the prediction period is reduced in turn, and the prediction frequency of the battery data set is increased, so as to more flexibly cope with different operating states and improve the response flexibility of the system; by dynamically adjusting the sampling rate according to the operating state of the battery pack, the data storage amount during normal operation of the battery can be reduced, and the data sampling can be increased when the state of the battery changes greatly, so as to capture key state changes, which not only reduces unnecessary data storage, but also improves the efficiency of data management. Specifically: when the battery pack is in a normal operating state, a preset lower sampling rate is used for data monitoring, which reduces the amount of data in the memory, thereby optimizing the use of storage resources; thereby helping to reduce the storage burden, so that the memory can be more effectively used for storing key data. When the battery pack is in a warning or emergency state, increasing the sampling rate can more accurately capture the changes in the state of the battery, which is crucial for subsequent data analysis and fault diagnosis; in this way, technicians can more accurately define the cause of the fault, whether it is due to battery usage problems or battery quality problems; and in the emergency state, the monitored data is stored as snapshot data in a snapshot file, and the file name is updated according to the fault information; through the real-time updating and snapshot storage mechanism, it ensures that the battery state data can be quickly accessed and analyzed at critical moments, further ensuring the safe operation and health management of the battery. At the same time, since the change amplitude and frequency of the battery data set corresponding to the normal state, the warning state and the emergency state increase in turn, the corresponding sampling frequency is set to adapt to the data monitoring needs of the battery pack under different operating states, ensuring the continuity and integrity of the data. The integrated intelligent data analysis tool of the application analyzes the battery performance and health status in real time, predicts potential problems, reduces data processing requirements during periods of low change, thereby reducing storage requirements, avoids over-sampling when the battery state is stable, and increases the sampling rate when the battery state changes significantly, which can more accurately capture key data points, thereby improving the relevance and accuracy of data analysis, optimizing the use of storage resources, enhancing data analysis accuracy, and ensuring that battery state data can be quickly accessed and analyzed at critical moments; and continuously monitoring and self-adapting, the battery management system can better cope with various situations during the operation of the battery pack, improving the robustness and reliability of the system.
[0087] Optionally, the determining whether the battery pack is powered on for the first time and setting the data sampling rate and the data prediction period according to the determination result includes:
[0088] When the battery pack is powered on, obtain the hardware operating time of the battery management system;
[0089] Determining whether the battery pack is powered on for the first time based on the hardware running time;
[0090] If yes, initializing the data sampling rate to the preset sampling rate, and initializing the data prediction period to the first time period;
[0091] If not, the historical sampling rate and historical prediction period recorded last time are used as the data sampling rate and the data prediction period respectively.
[0092] Specifically, when the battery pack is powered on, the BMS records the current timestamp by reading the hardware time. This timestamp is not only used to synchronize the BMS's internal clock, but also serves as a basis for determining whether the battery pack is powered on for the first time. If the BMS detects that this is the first time the battery pack is powered on, it initializes the data sampling rate and data prediction period according to preset parameters. The preset sampling rate is determined based on the battery chemical characteristics and historical data experience, which can ensure that comprehensive data is collected in the early stage of battery use for subsequent analysis. The data prediction period is a time period set based on the current battery data sampling rate. During this time period, the system will continuously monitor the battery data and use the collected data to predict the future battery status at the end of the period. If the BMS determines that this is not the first time it is powered on, it will retrieve the last historical sampling rate and historical prediction period saved in the memory and use them as the current sampling rate and prediction period to maintain the continuity of data sampling and avoid missing important battery status change information due to sudden changes in the sampling rate. In a preferred embodiment of the present invention, if the battery pack has been powered on before, the BMS will continue monitoring according to the last sampling rate and update the data to the same file, or store the snapshot data to the snapshot file in an emergency.
[0093] In embodiments of the present invention, the relevance and accuracy of data are improved, particularly when the battery pack is first powered on. Initializing the sampling rate and data prediction period enables the capture of the battery's critical initial state, providing important information for subsequent performance evaluation and fault diagnosis. Secondly, this approach optimizes the use of storage space because, in non-initial power-up scenarios, the BMS can select an appropriate sampling rate based on the battery's historical state, avoiding waste of storage space due to oversampling. This approach also reduces the data sampling rate and extends the prediction period to reduce the system's computational burden and storage requirements.
[0094] Optionally, the continuously monitoring the battery pack data according to the data sampling rate to obtain the battery data group of the battery pack and storing it in a regular file includes:
[0095] Acquire parameter data of the battery pack according to the data sampling rate to obtain the battery data group of the battery pack;
[0096] Detecting whether the file name corresponding to the battery data group contains an identifier indicating the latest state;
[0097] If yes, open the regular file and write the battery data set to the end of the regular file;
[0098] If not, the file name of the regular file is updated according to the battery data set, and then the battery data set is written to the end of the regular file.
[0099] Specifically, the BMS obtains key parameter data of the battery pack, such as voltage, current, temperature, etc., through integrated sensors based on a pre-set or dynamically adjusted data sampling rate. These data are summarized into battery data groups. The effective collection of these parameter data is the basis of BMS intelligent management. Next, the BMS will detect whether the regular file name storing these data already contains an identifier representing the latest status of the battery, such as a timestamp or serial number. If the file name already contains such an identifier, it indicates that the file is a data file used to record the current status, and the BMS will directly append the new battery data group to the end of this file. If there is no such identifier, the BMS will update the file name based on the current battery data group, create a new file, and write the battery data group to the end of this new file to ensure that the updated file name can reflect the latest status of the battery, which is convenient for data management and fault diagnosis.
[0100] In embodiments of the present invention, by continuously monitoring and appending data to existing files or creating new files, data continuity and integrity are ensured, providing rich information for battery performance analysis. By detecting whether the file name contains the identifier of the latest state, the BMS can efficiently manage data files, avoid data overwriting and loss, and simplify the data retrieval process.
[0101] Optionally, the continuously monitoring the data of the battery pack according to the data sampling rate to obtain the battery data group of the battery pack and storing it in a regular file further includes:
[0102] Continuously monitoring and collecting data of the battery pack according to the data sampling rate, and continuously detecting whether the remaining storage space of the storage device where the regular file is located is less than the storage space required by the battery data group to be written;
[0103] If the detection result shows that the remaining storage space of the storage device where the regular file is located is less than the storage space required by the battery data group to be written, retrieving the timestamp associated with each battery data group in the regular file;
[0104] sorting the battery data group according to the timestamps to form a time series;
[0105] Starting from the earliest battery data set in the time series, the battery data sets are deleted one by one until the remaining storage space of the regular file is greater than or equal to the storage space required by the battery data set to be written.
[0106] Specifically, to effectively manage battery data storage, the system continuously monitors and collects battery pack data based on a set data sampling rate and stores this data in regular files. During this process, the BMS not only focuses on data collection but also must manage storage space to ensure that the system does not fail due to insufficient storage space. To this end, the BMS continuously checks the remaining storage space on the storage device associated with the regular files to determine whether there is sufficient space to store new battery data sets. If insufficient remaining space is detected, the system retrieves the timestamp associated with each battery data set in the file. These timestamps are marked when the data was written to the file, ensuring data traceability. The BMS then sorts the battery data sets according to these timestamps to form a time series. Following the time series, the BMS will delete battery data sets one by one, starting with the oldest data, until the remaining storage space in the regular files can meet the storage requirements of the new data set, ensuring the retention of important data (i.e., the most recent data) while eliminating older data.
[0107] In an embodiment of the present invention, by dynamically managing storage space, the BMS ensures that key data of the battery pack can be continuously recorded, and the latest data will not be lost even when storage space is tight, ensuring that the storage space is effectively utilized while retaining the data that is most representative of the current battery status.
[0108] Optionally, judging the operating state of the battery pack according to the future change of the battery data group within the preset future time period includes:
[0109] Acquire a plurality of battery data groups within the preset future time period, each battery data group including values of a plurality of parameters of the battery pack at a sampling moment;
[0110] When the value of each parameter of the battery pack in the preset future time period is within the normal threshold range corresponding to the parameter, determining that the operating state is a normal state;
[0111] When a value of any one of the parameters of the battery pack within the preset future time period is within a warning threshold range corresponding to the parameter, determining that the operating state is a warning state;
[0112] When a value of any one of the parameters of the battery pack within the preset future time period is within an emergency threshold range corresponding to the parameter, determining that the operating state is an emergency state;
[0113] Among them, for each of the parameters, the maximum value of the normal threshold range corresponding to the parameter is less than or equal to the minimum value of the warning threshold range corresponding to the parameter, and the maximum value of the warning threshold range corresponding to the parameter is less than or equal to the minimum value of the emergency threshold range corresponding to the parameter.
[0114] Specifically, the BMS first analyzes battery data sets collected over a predetermined future time period to assess the battery pack's operating status, which may include normal, warning, and emergency. When the battery pack is in a normal state, the BMS adjusts the data sampling rate to a predetermined sampling rate. This rate is a balanced sampling frequency sufficient to continuously monitor the battery pack's status without excessively consuming storage resources or energy. If the operating status is a warning, indicating a potential non-critical issue with the battery pack, such as a slight voltage deviation or temperature increase, the BMS increases the data sampling rate to a first sampling rate to monitor the battery status more frequently, enabling a quick response to potential faults. In emergency situations, such as overheating, overcharging, or voltage anomalies, the BMS further increases the data sampling rate to a second sampling rate, the highest sampling rate, ensuring that detailed data is captured for fault analysis in critical situations. In a preferred embodiment of the present invention, when the voltage exceeds a predetermined threshold, the BMS adjusts the operating state from normal to a warning state and increases the sampling rate accordingly. As the voltage continues to rise, the system may further escalate the state to an emergency state and record data at the highest sampling rate.
[0115] Specifically, three threshold ranges are set for each parameter in the battery pack: Normal Threshold Range: This is the normal operating range for the parameter. If all parameter values are within this range, the battery pack is considered to be operating normally. Warning Threshold Range: When a parameter value exceeds the normal range but has not yet reached the critical state, the system will determine the battery pack's operating status to be a warning. This range indicates a possible abnormality. Emergency Threshold Range: When a parameter value exceeds the warning range and reaches or exceeds the critical threshold, the system will determine the battery pack's operating status to be an emergency, indicating that the battery pack may face serious safety risks or be about to fail. The status judgment logic includes three states: Normal State: If all parameter values remain within their normal threshold ranges within a preset future time period, the battery pack's operating status is determined to be normal. Warning State: If any parameter value exceeds the normal threshold range but remains within the warning threshold range within a preset future time period, the battery pack's operating status is determined to be a warning. Emergency State: If any parameter value exceeds the warning threshold range and reaches the critical threshold range within a preset future time period, the battery pack's operating status is determined to be an emergency. Furthermore, in this preferred embodiment, the threshold ranges are set continuously, meaning that the maximum value of each parameter's normal threshold range does not exceed the minimum value of the warning threshold range, and the maximum value of the warning threshold range does not exceed the minimum value of the emergency threshold range. This setting ensures the continuity and logic of status judgment and avoids ambiguity in status judgment. In this embodiment, the battery management system can monitor the battery pack's status in real time, adjust the sampling rate, and take appropriate measures based on parameter changes. This threshold-based judgment method is simple, easy to implement, and can effectively guide battery pack operation and maintenance.
[0116] In embodiments of the present invention, by adjusting the sampling rate under different operating conditions, the BMS can ensure that more detailed data is captured as the battery state changes, thereby improving the accuracy and usefulness of data analysis. Simultaneously, reducing the sampling rate when the battery state is stable can reduce unnecessary data storage and processing, thereby saving storage space and energy consumption.
[0117] Optionally, when the operating state of the battery pack is an emergency state, adjusting the data sampling rate to a second sampling rate, continuing to monitor the battery pack data according to the second sampling rate, and storing the battery data group obtained by monitoring as snapshot data in a snapshot file, includes:
[0118] When the operating state of the battery pack is an emergency state, updating the file name of the battery data group of the battery pack according to the battery data group monitored according to the second sampling rate;
[0119] The battery data group monitored according to the second sampling rate is written to the end of the snapshot file in the form of the updated file name.
[0120] Specifically, in an emergency, the battery data set contains critical fault information that is essential for subsequent analysis and diagnosis. In order to quickly identify and retrieve data sets related to specific faults, the system will update the file name based on the current battery data set. The file name update may include information such as timestamp, fault code, battery pack identifier, etc. to ensure the uniqueness and descriptiveness of the file name. For example, the file name may be "BatteryPack12_20240324_185500_OverTemperature.dat", which contains the battery pack number, the current date and time, and the possible fault type (such as "OverTemperature" indicates overtemperature).
[0121] Among them, a snapshot file is a special data file used to store data collected at a specific moment or under specific conditions; in the battery management system, the snapshot file is used to record detailed data of the battery pack in an emergency state for detailed analysis and fault diagnosis. The system will append the updated battery data group to the end of the snapshot file with a new file name; this append operation will not overwrite the existing data in the snapshot file, but will add a new data group to the end of the file to ensure the continuity and integrity of the data. The data written to the snapshot file includes the values of parameters such as voltage, current, temperature, SOC, SOH, and possible fault codes or status marks; these data are usually stored in a structured format, such as CSV, JSON or binary format, to facilitate subsequent reading and analysis. The data in the snapshot file can be accessed quickly because they are stored continuously and each data group has a clear identifier (i.e., file name).
[0122] In an embodiment of the present invention, by updating the file name and appending data to the snapshot file during an emergency, the system ensures that data collected at critical moments is not lost and can be distinguished from previous data analysis. The updated file name provides additional information about the data content, which helps technicians quickly locate problems during fault analysis. When the battery pack's operating status reaches an emergency, the system updates the file name based on the battery data group and appends this data to the end of the snapshot file with the new file name. This ensures the security, integrity, and accessibility of critical data, and also helps improve the reliability and fault response capabilities of the battery management system.
[0123] Optionally, the operation data storage method further includes:
[0124] When the battery pack is shut down or in standby mode in the normal operating state, the hardware operating time of the battery management system is reset.
[0125] Specifically, when the battery pack is shut down or in standby mode under normal operating conditions, the system will perform the steps of resetting the hardware time. This measure ensures that when the battery pack is powered on again, the BMS can accurately record and synchronize the battery usage time, providing an accurate time reference for subsequent data sampling and analysis. Resetting the hardware time helps to avoid time accumulation errors and ensures the coherence and consistency of timestamps in battery data records. In a preferred embodiment of the present invention, when the battery pack completes charging and enters standby mode, the BMS resets the hardware time to zero, providing a data recording starting point for starting the time from zero when the battery pack is powered on next time.
[0126] In the embodiment of the present invention, resetting the hardware time ensures that the BMS internal clock is synchronized with the actual usage time of the battery pack, providing an accurate time reference for data recording.
[0127] In summary, in the preferred embodiment of the present application, in the battery management system (BMS), there is a flowchart to guide the storage and processing of data. When the battery pack is powered on (woken up), the BMS first acquires the time of the real-time clock, which will be used to record and manage battery data. If it is the first power-on of the battery pack, the BMS will initialize the data sampling rate to the preset sampling rate to ensure that detailed data of the initial state is collected. As the battery pack starts running, the BMS continues to collect data at the preset sampling rate and writes it to a data storage called a regular file. This file initially does not contain any identifier representing the latest state. As data continues to be written, the BMS periodically detects the remaining storage space of the regular file to ensure that there is enough space to store new data. If at the end of a certain preset future period, the BMS detects that the parameters of the battery pack are within the normal range, the system will determine that the battery pack is in a normal state. In this case, the data sampling rate remains at the preset sampling rate. If the parameters exceed the normal range but do not reach the emergency state, the BMS will determine the state of the battery pack as a warning state and increase the data sampling rate to the first sampling rate to more closely monitor the battery state. During the running of the battery pack, if the BMS detects a fault, such as a single cell voltage undervoltage or CAN power failure, the system will enter an emergency state. At this time, the BMS will increase the data sampling rate to the second sampling rate and store the current battery data set as snapshot data to the snapshot file. The file name of the snapshot file will be updated according to the fault information, for example, adding a timestamp and a fault code, and then the data is written to the end of the file. When the battery pack is shut down or on standby in a normal state, the BMS resets the hardware time so that when the battery pack is powered on again, it can accurately record a new running period. Throughout the process, the BMS is also responsible for handling small single-chip related tasks, setting the analog front-end sleep flag, and writing to the internal FLASH in FLASH power failure mode to ensure persistent storage of data. Through this embodiment, the BMS can dynamically adjust the data sampling rate according to the actual running state of the battery pack, optimize the use of storage space, improve the usefulness of data, and provide detailed data support at critical moments, thereby ensuring the safe and efficient operation of the battery pack.
[0128] In combination Figure 2 The present application also provides a running data storage system, comprising:
[0129] a sampling rate setting unit for determining whether the battery pack is powered on for the first time when the battery pack is in a powered-on state, and setting a data sampling rate according to the determination result;
[0130] a storage adjusting unit for continuously monitoring the battery pack according to the data sampling rate, obtaining a battery data set of the battery pack, and storing it to a regular file;
[0131] A judgment unit is configured to execute a judgment step, wherein when the duration of monitoring the battery pack at the current data sampling rate reaches a data prediction period, based on the changes of the battery data group within the data prediction period, a change of the battery data group within a preset future time period is predicted to obtain future changes of the battery data group;
[0132] Determining the operating state of the battery pack according to the future changes of the battery data group within the preset future time period;
[0133] When the operating state of the battery pack is normal, adjusting the data sampling rate to a preset sampling rate, continuing to monitor the data of the battery pack according to the preset sampling rate, storing the battery data group obtained by monitoring in the regular file, and returning to execute the determination step;
[0134] When the operating state of the battery pack is a warning state, adjusting the data sampling rate to a first sampling rate, continuing to monitor the data of the battery pack at the first sampling rate, storing the monitored battery data group in a regular file, and returning to execute the determination step;
[0135] When the operating state of the battery pack is an emergency state, adjusting the data sampling rate to a second sampling rate, continuing to monitor the data of the battery pack according to the second sampling rate, storing the monitored battery data group as snapshot data in a snapshot file, and returning to execute the determination step;
[0136] Among them, the change amplitude and / or change frequency of the battery data groups corresponding to the normal state, the warning state and the emergency state increase successively, the preset sampling rate is less than the first sampling rate, and the first sampling rate is less than the second sampling rate.
[0137] The operation data storage system of the present invention initializes the data sampling rate and data prediction period by intelligently judging whether it is the first time to power on the battery pack when it is powered on, and makes predictions based on the battery data group within the data prediction period. Based on the future changes of the predicted battery data group, the system continuously monitors the battery data and dynamically adjusts the sampling frequency according to the trend of data changes in a preset future time period to optimize data acquisition. At the same time, the data prediction period of the battery data is adjusted according to the data changes, and then the prediction frequency of the battery data group is adjusted, thereby reducing the computing pressure of the system under normal circumstances and optimizing the use of storage resources. In the warning state and emergency state, the prediction period is reduced and the prediction frequency of the battery data group is increased, thereby more flexibly responding to different operating states and improving the response flexibility of the system. By dynamically adjusting the sampling rate according to the operating state of the battery pack, the amount of data stored during normal battery operation can be reduced, and data sampling is increased when the battery state changes significantly to capture key state changes, which not only reduces unnecessary data storage but also improves the efficiency of data management. Specifically, when the battery pack is operating normally, a preset lower sampling rate is used for data monitoring, reducing the amount of data in the memory and optimizing the use of storage resources. This helps reduce the storage burden, allowing the memory to be used more efficiently to store critical data. When the battery pack is in a warning or emergency state, increasing the sampling rate can more accurately capture changes in the battery status, which is crucial for subsequent data analysis and fault diagnosis. This allows technicians to more accurately determine the cause of the fault, whether it is due to battery usage issues or battery quality issues. In an emergency, the monitored data is stored as snapshot data in a snapshot file, and the file name is updated based on the fault information. The real-time update and snapshot storage mechanism ensures that battery status data can be quickly accessed and analyzed at critical moments, further ensuring safe battery operation and health management. Furthermore, since the amplitude and frequency of changes in the battery data groups corresponding to normal, warning, and emergency states increase in sequence, corresponding sampling frequencies are set to adapt to the data monitoring needs of the battery pack under different operating conditions, ensuring data continuity and integrity. The integrated intelligent data analysis tool of the present invention analyzes battery performance and health status in real time, predicts potential problems, reduces data processing requirements during low-variability periods, thereby reducing storage requirements, avoids oversampling when the battery status is stable, and increases the sampling rate when the battery status changes significantly. It can capture key data points more accurately, thereby improving the relevance and accuracy of data analysis, optimizing the use of storage resources, enhancing data analysis accuracy, and ensuring rapid access to and analysis of battery status data at critical moments; and through continuous monitoring and adaptive adjustment, the battery management system can better cope with various situations during the operation of the battery pack and improve the robustness and reliability of the system.
[0138] Combine Figure 3 As shown, an electronic device 300 provided by an embodiment of the present invention includes a memory 310 and a processor 320; the memory 310 is used to store computer programs; the processor 320 is used to implement the above-mentioned running data storage method when executing the computer program.
[0139] In other words, an electronic device 300 includes a memory 310 and a processor 320 coupled to the memory 310; the memory 310 is configured to store a computer program; and the processor 320 is configured to perform the following operations when executing the computer program:
[0140] When the battery pack is in a powered-on state, determining whether the battery pack is powered-on for the first time, and setting a data sampling rate according to the determination result;
[0141] Continuously monitoring the battery pack according to the data sampling rate to obtain a battery data group of the battery pack and store it in a regular file;
[0142] executing a determination step, the determination step comprising determining an operating state of the battery pack based on changes in the battery data group within the data prediction period when the duration of monitoring the battery pack at the current data sampling rate reaches a data prediction period;
[0143] When the operating state of the battery pack is normal, adjusting the data sampling rate to a preset sampling rate, continuing to monitor the data of the battery pack according to the preset sampling rate, storing the battery data group obtained by monitoring in the regular file, and returning to execute the determination step;
[0144] When the operating state of the battery pack is a warning state, adjusting the data sampling rate to a first sampling rate, continuing to monitor the data of the battery pack at the first sampling rate, storing the monitored battery data group in a regular file, and returning to execute the determination step;
[0145] When the operating state of the battery pack is an emergency state, adjusting the data sampling rate to a second sampling rate, continuing to monitor the data of the battery pack according to the second sampling rate, storing the monitored battery data group as snapshot data in a snapshot file, and returning to execute the determination step;
[0146] Among them, the change amplitude and / or change frequency of the battery data groups corresponding to the normal state, the warning state and the emergency state increase successively, the preset sampling rate is less than the first sampling rate, and the first sampling rate is less than the second sampling rate.
[0147] An electronic device 300 that can serve as a server or client of the present invention will now be described, which is an example of a hardware device that can be applied to various aspects of the present invention. The electronic device 300 is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device 300 can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0148] Electronic device 300 includes a computing unit that can perform various appropriate actions and processes based on a computer program stored in a read-only memory (ROM) or loaded from a storage unit into a random access memory (RAM). The RAM can also store various programs and data required for device operation. The computing unit, ROM, and RAM are interconnected via a bus. An input / output (I / O) interface is also connected to the bus.
[0149] The electronic device of the present application initializes the data sampling rate and the data prediction period by intelligently determining whether it is the first power-on when the battery pack is powered on, and predicts the battery data set within the data prediction period, and dynamically adjusts the sampling frequency according to the future change of the battery data set obtained by prediction, and continuously monitors the battery data and dynamically adjusts the sampling frequency according to the trend of data change in the preset future time period, to realize the optimization of data acquisition, and at the same time, the data prediction period of the battery data is adjusted by adjusting the data change, and the prediction frequency of the battery data set is adjusted, so that the calculation pressure of the system is reduced under normal circumstances, and the use of storage resources is optimized; in the warning state and the emergency state, the prediction period is reduced in turn, and the prediction frequency of the battery data set is increased, so that different operating states can be flexibly coped with, and the response flexibility of the system is improved; by dynamically adjusting the sampling rate according to the operating state of the battery pack, the data storage amount during normal operation of the battery can be reduced, and the data sampling can be increased when the state of the battery changes greatly, so as to capture key state changes, which not only reduces unnecessary data storage, but also improves the efficiency of data management. Specifically: when the battery pack is in a normal operating state, a preset lower sampling rate is used for data monitoring, which reduces the amount of data in the memory, thereby optimizing the use of storage resources; thereby helping to reduce the storage burden, so that the memory can be more effectively used for storing key data. When the battery pack is in a warning or emergency state, increasing the sampling rate can more accurately capture the changes in the battery state, which is crucial for subsequent data analysis and fault diagnosis; in this way, technicians can more accurately define the cause of the fault, whether it is due to battery usage problems or battery quality problems; and in the emergency state, the monitored data is stored as snapshot data in a snapshot file, and the file name is updated according to the fault information; through the real-time updating and snapshot storage mechanism, it ensures that the battery state data can be quickly accessed and analyzed at critical moments, further ensuring the safe operation and health management of the battery. At the same time, since the change amplitude and frequency of the battery data set corresponding to the normal state, the warning state and the emergency state increase in turn, the corresponding sampling frequency is set to adapt to the data monitoring needs of the battery pack under different operating states, ensuring the continuity and integrity of the data. The integrated intelligent data analysis tool of the present application analyzes the battery performance and health status in real time, predicts potential problems, reduces data processing requirements during periods of low change, thereby reducing storage requirements, avoids over-sampling when the battery state is stable, and increases the sampling rate when the battery state changes significantly, which can more accurately capture key data points, thereby improving the relevance and accuracy of data analysis, optimizing the use of storage resources, enhancing data analysis accuracy, and ensuring that battery state data can be quickly accessed and analyzed at critical moments; and continuously monitoring and self-adapting, the battery management system can better cope with various situations during the operation of the battery pack, improving the robustness and reliability of the system.
[0150] An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned method for storing running data is implemented.
[0151] In other words, a non-volatile computer-readable storage medium stores a computer program, which, when executed by a processor, causes the processor to perform the following operations:
[0152] When the battery pack is in a powered-on state, determining whether the battery pack is powered-on for the first time, and setting a data sampling rate according to the determination result;
[0153] Continuously monitoring the battery pack according to the data sampling rate to obtain a battery data group of the battery pack and store it in a regular file;
[0154] executing a determination step, the determination step comprising determining an operating state of the battery pack based on changes in the battery data group within the data prediction period when the duration of monitoring the battery pack at the current data sampling rate reaches a data prediction period;
[0155] When the operating state of the battery pack is normal, adjusting the data sampling rate to a preset sampling rate, continuing to monitor the data of the battery pack according to the preset sampling rate, storing the battery data group obtained by monitoring in the regular file, and returning to execute the determination step;
[0156] When the operating state of the battery pack is a warning state, adjusting the data sampling rate to a first sampling rate, continuing to monitor the data of the battery pack at the first sampling rate, storing the monitored battery data group in a regular file, and returning to execute the determination step;
[0157] When the operating state of the battery pack is an emergency state, adjusting the data sampling rate to a second sampling rate, continuing to monitor the data of the battery pack according to the second sampling rate, storing the monitored battery data group as snapshot data in a snapshot file, and returning to execute the determination step;
[0158] Among them, the change amplitude and / or change frequency of the battery data groups corresponding to the normal state, the warning state and the emergency state increase successively, the preset sampling rate is less than the first sampling rate, and the first sampling rate is less than the second sampling rate.
[0159] The computer readable storage medium of the application initializes the data sampling rate and the data prediction period by intelligently judging whether it is the first power-on when the battery pack is powered on, and predicts according to the battery data set in the data prediction period, and then continuously monitors the battery data and dynamically adjusts the sampling frequency according to the trend of data change in the preset future time period, so as to realize the optimization of data acquisition, and at the same time, the data prediction period of the battery data is adjusted, and the prediction frequency of the battery data set is adjusted, so as to reduce the calculation pressure of the system under normal circumstances, and optimize the use of storage resources; in the warning state and the emergency state, the prediction period is reduced in turn, and the prediction frequency of the battery data set is increased, so as to more flexibly cope with different running states and improve the response flexibility of the system; by dynamically adjusting the sampling rate according to the running state of the battery pack, the data storage amount during normal operation of the battery can be reduced, and the data sampling can be increased when the state of the battery changes greatly, so as to capture key state changes, which not only reduces unnecessary data storage, but also improves the efficiency of data management. Specifically: when the running state of the battery pack is normal, a preset lower sampling rate is used for data monitoring, which reduces the amount of data in the memory, thereby optimizing the use of storage resources; thereby helping to reduce the storage burden, so that the memory can be more effectively used for storing key data. When the running state of the battery pack is in a warning or emergency state, increasing the sampling rate can more accurately capture the changes in the state of the battery, which is crucial for subsequent data analysis and fault diagnosis; in this way, the technician can more accurately define the cause of the fault, whether it is due to battery usage problems or battery quality problems; and in the emergency state, the monitored data is stored as snapshot data in a snapshot file, and the file name is updated according to the fault information; through the real-time updating and snapshot storage mechanism, it ensures that the battery state data can be quickly accessed and analyzed at critical moments, further ensuring the safe operation and health management of the battery. At the same time, since the change amplitude and frequency of the battery data set corresponding to the normal state, the warning state and the emergency state increase in turn, the corresponding sampling frequency is set to adapt to the data monitoring needs of the battery pack under different running states, ensuring the continuity and integrity of the data. The integrated intelligent data analysis tool of the application analyzes the battery performance and health status in real time, predicts potential problems, reduces data processing requirements during low change periods, thereby reducing storage requirements, avoids over-sampling when the battery state is stable, and increases the sampling rate when the battery state changes significantly, which can more accurately capture key data points, thereby improving the relevance and accuracy of data analysis, optimizing the use of storage resources, enhancing data analysis accuracy, and ensuring that battery state data can be quickly accessed and analyzed at critical moments; and continuously monitoring and self-adapting, the battery management system can better cope with various situations during the operation of the battery pack, improving the robustness and reliability of the system.
[0160] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing the relevant hardware through a computer program. The program can be stored in a non-volatile computer-readable storage medium. When executed, the program can include the processes of the above-described method embodiments. Any reference to memory, storage, database, or other media used in the various embodiments provided herein may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct RAMbus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM).
[0161] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
[0162] The foregoing description is intended only to provide specific embodiments of the present invention, which will enable those skilled in the art to understand and implement the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not intended to be limited to the embodiments shown herein, but is intended to be accorded the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A method for storing running data, characterized in that: Applied to a battery management system, the operating data storage method includes: When the battery pack is in a powered-on state, determining whether the battery pack is powered-on for the first time, and setting a data sampling rate and a data prediction period according to the determination result; Continuously monitoring the battery pack according to the data sampling rate to obtain a battery data group of the battery pack and store it in a regular file; executing a determination step, the determination step including, when the duration of monitoring the battery pack at the current data sampling rate reaches the data prediction period, predicting a change in the battery data group within a preset future time period based on a change in the battery data group within the data prediction period, to obtain a future change in the battery data group; Determining the operating state of the battery pack according to the future changes of the battery data group within the preset future time period; When the operating state of the battery pack is normal, adjusting the data sampling rate to a preset sampling rate, continuing to monitor the data of the battery pack according to the preset sampling rate, storing the monitored battery data group in the regular file, and returning to the determination step, while adjusting the data prediction period to the first time period; When the operating state of the battery pack is a warning state, adjusting the data sampling rate to a first sampling rate, continuing to monitor the battery pack data at the first sampling rate, storing the monitored battery data group in a regular file, and returning to the determination step, while adjusting the data prediction period to a second time period; When the operating state of the battery pack is an emergency state, adjusting the data sampling rate to a second sampling rate, continuing to monitor the battery pack data at the second sampling rate, storing the monitored battery data group as snapshot data in a snapshot file, returning to the determination step, and adjusting the data prediction period to a third time period; Among them, the change amplitude and / or change frequency of the battery data groups corresponding to the normal state, the warning state and the emergency state increase successively, the preset sampling rate is less than the first sampling rate, the first sampling rate is less than the second sampling rate, the first time period is greater than the second time period, and the second time period is greater than the third time period.
2. The operation data storage method according to claim 1, characterized in that: The determining whether the battery pack is powered on for the first time and setting the data sampling rate and the data prediction period according to the determination result includes: When the battery pack is powered on, obtain the hardware operating time of the battery management system; Determining whether the battery pack is powered on for the first time based on the hardware running time; If yes, initializing the data sampling rate to the preset sampling rate, and initializing the data prediction period to the first time period; If not, the historical sampling rate and historical prediction period recorded last time are used as the data sampling rate and the data prediction period respectively.
3. The operation data storage method according to claim 1, characterized in that: The continuously monitoring the battery pack according to the data sampling rate to obtain the battery data group of the battery pack and storing it in a regular file includes: Acquire parameter data of the battery pack according to the data sampling rate to obtain the battery data group of the battery pack; Detecting whether the file name corresponding to the battery data group contains an identifier indicating the latest state; If yes, open the regular file and write the battery data set to the end of the regular file; If not, the file name of the regular file is updated according to the battery data set, and then the battery data set is written to the end of the regular file.
4. The operation data storage method according to claim 3, characterized in that: The method of continuously monitoring the battery pack data according to the data sampling rate, obtaining the battery data group of the battery pack and storing the data in a conventional file further includes: Continuously monitoring and collecting data of the battery pack according to the data sampling rate, and continuously detecting whether the remaining storage space of the storage device where the regular file is located is less than the storage space required by the battery data group to be written; If the detection result shows that the remaining storage space of the storage device where the regular file is located is less than the storage space required by the battery data group to be written, retrieving the timestamp associated with each battery data group in the regular file; sorting the battery data group according to the timestamps to form a time series; Starting from the earliest battery data set in the time series, the battery data sets are deleted one by one until the remaining storage space of the regular file is greater than or equal to the storage space required by the battery data set to be written.
5. The operation data storage method according to claim 1, characterized in that: The determining the operating state of the battery pack according to the future change of the battery data group within the preset future time period includes: Acquire a plurality of battery data groups within the preset future time period, each battery data group including values of a plurality of parameters of the battery pack at a sampling moment; When the value of each parameter of the battery pack in the preset future time period is within the normal threshold range corresponding to the parameter, determining that the operating state is a normal state; When a value of any one of the parameters of the battery pack within the preset future time period is within a warning threshold range corresponding to the parameter, determining that the operating state is a warning state; When a value of any one of the parameters of the battery pack within the preset future time period is within an emergency threshold range corresponding to the parameter, determining that the operating state is an emergency state; Among them, for each of the parameters, the maximum value of the normal threshold range corresponding to the parameter is less than or equal to the minimum value of the warning threshold range corresponding to the parameter, and the maximum value of the warning threshold range corresponding to the parameter is less than or equal to the minimum value of the emergency threshold range corresponding to the parameter.
6. The operation data storage method according to claim 5, characterized in that: When the operating state of the battery pack is an emergency state, adjusting the data sampling rate to a second sampling rate, continuing to monitor the data of the battery pack according to the second sampling rate, and storing the battery data group obtained by monitoring as snapshot data in a snapshot file, includes: When the operating state of the battery pack is an emergency state, updating the file name of the battery data group of the battery pack according to the battery data group monitored according to the second sampling rate; The battery data group monitored according to the second sampling rate is written to the end of the snapshot file in the form of the updated file name.
7. The operation data storage method according to claim 5, characterized in that: Also includes: When the battery pack is shut down or in standby mode in the normal operating state, the hardware operating time of the battery management system is reset.
8. A running data storage system, characterized in that: include: a sampling rate setting unit, configured to determine, when the battery pack is in a powered-on state, whether the battery pack is powered-on for the first time, and to set a data sampling rate and a data prediction period according to the determination result; a storage adjustment unit, configured to continuously monitor the data of the battery pack according to the data sampling rate, obtain a battery data group of the battery pack, and store the data in a regular file; A judgment unit is configured to execute a judgment step, wherein when the duration of monitoring the battery pack at the current data sampling rate reaches a data prediction period, based on the changes of the battery data group within the data prediction period, a prediction is made of the changes of the battery data group within a preset future time period to obtain future changes of the battery data group; Determining the operating state of the battery pack according to the future changes of the battery data group within the preset future time period; When the operating state of the battery pack is normal, adjusting the data sampling rate to a preset sampling rate, continuing to monitor the data of the battery pack according to the preset sampling rate, storing the monitored battery data group in the regular file, and returning to the determination step, while adjusting the data prediction period to the first time period; When the operating state of the battery pack is a warning state, adjusting the data sampling rate to a first sampling rate, continuing to monitor the battery pack data at the first sampling rate, storing the monitored battery data group in a regular file, and returning to the determination step, while adjusting the data prediction period to a second time period; When the operating state of the battery pack is an emergency state, adjusting the data sampling rate to a second sampling rate, continuing to monitor the battery pack data at the second sampling rate, storing the monitored battery data group as snapshot data in a snapshot file, returning to the determination step, and adjusting the data prediction period to a third time period; Among them, the change amplitude and / or change frequency of the battery data groups corresponding to the normal state, the warning state and the emergency state increase successively, the preset sampling rate is less than the first sampling rate, the first sampling rate is less than the second sampling rate, the first time period is greater than the second time period, and the second time period is greater than the third time period.
9. An electronic device, characterized in that: including memory and processor; The memory is used to store computer programs; The processor is configured to implement the operation data storage method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the operation data storage method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Fire fighting truck battery management system
CN118405025A
Battery management system data storage method and battery management system
CN118535365A