Battery log storage method, device, equipment and storage medium

By performing segmented packaging and metadata generation of battery logs, combined with synchronous verification of transit devices and cloud servers and integrated log processing, the problem of the lack of breakpoint transfer capability of battery log storage system is solved, and the efficiency and automation of battery logs are achieved Storage and data integrity.

CN119088782BActive Publication Date: 2025-02-11SHENZHEN ZHIAN NEW ENERGY TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411580055.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-07
Publication Date
2025-02-11
Estimated Expiration
2044-11-07

AI Technical Summary

Technical Problem

The existing battery log storage system lacks the ability to continue the interruption, resulting in log loss due to line breakage or interruption during log transmission, affecting the integrity and reliability of data.

Method used

The log generation device performs segmented packaging of the target battery log data, generates a log file with unique incremental code, and generates metadata information. Synchronous verification of the transit device and cloud server based on metadata information is carried out to determine whether the device file of the target battery is established. After the synchronization verification is completed, the cloud server calculates the missing logs in the log subcontract and generates the integrated log. The transit device determines whether the integrated log forms a new complete log subcontract, and synchronizes it to the cloud server, and finally stores the complete log subcontract in the corresponding device archive.

Benefits of technology

It realizes efficient and automated storage of battery logs, ensures the integrity, real-time and security of log data, and avoids log loss caused by disconnection or interruption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119088782B_ABST
    Figure CN119088782B_ABST
Patent Text Reader

Abstract

The present invention provides a battery log storage method, device, equipment and storage medium, wherein the method comprises: using a log generating device to segment and package the log data generated by a target battery, obtain a log file with a unique incremental code, and generate corresponding metadata information. Based on the metadata information, a transfer device and a cloud server are synchronously verified to determine whether to establish a device file for the target battery. After the synchronization verification is completed, the cloud server calculates the number of missing logs between the log file and the log sub-package stored in the cloud, and generates an integrated log. The transfer device determines whether the integrated log forms a new complete log sub-package, and synchronizes it to the cloud server, and finally stores the complete log sub-package in the corresponding device file until the transfer device completes the log reading. This method efficiently and automatically handles the storage of battery logs by setting up a cloud server and a transfer device, thereby ensuring the integrity, real-time and security of the log data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of battery management, and in particular to a battery log storage method, device, equipment and storage medium. Background Art

[0002] With the development and widespread application of battery technology, batteries will generate a large amount of log data during use. This data is of great significance for analyzing the health status of batteries, optimizing usage strategies, and providing maintenance basis. However, existing battery log storage systems have many shortcomings in the management and transmission of log data. For example, the log reading process often relies on manual operation, which can easily lead to problems such as low data acquisition efficiency and high error rate. At the same time, logs usually require manual processing and aggregation after export, which makes it difficult to achieve automated management. In addition, existing log storage methods lack the ability to resume transmission from breakpoints, and logs are easily lost due to disconnection or transmission interruption during data transmission, affecting the integrity and reliability of the data. For battery devices with low communication rates, the log export speed is slow, which further affects the practicality of the system. Summary of the invention

[0003] The main purpose of the present invention is to solve the technical problem that the existing battery log storage lacks the ability to resume transmission from breakpoints, and the logs are easily lost due to disconnection or transmission interruption during data transmission, which affects the integrity and reliability of the data;

[0004] A first aspect of the present invention provides a battery log storage method, which is applied to a battery log storage system. The battery log storage system includes a log generating device, a transfer device, and a cloud server. The battery log storage method includes:

[0005] The log data generated by the target battery is processed by segmentation and packaging through the log generating device to obtain a log file with a unique incremental code, and generate metadata information of the target battery;

[0006] Performing synchronous verification on the transfer device and the cloud server according to the metadata information to obtain a synchronous verification result, and determining whether to establish a device file for the target battery according to the synchronous verification result;

[0007] After the synchronization verification between the transfer device and the cloud server is completed, the missing log sub-packages in the log sub-packages stored in the cloud server are calculated by the cloud server, and an integrated log is generated according to the missing log sub-packages and the log file;

[0008] Determining whether the integrated log forms a new complete log sub-package through the transfer device, and synchronizing the new complete log sub-package to the cloud server when the integrated log forms a new complete log sub-package;

[0009] The cloud server stores the new complete log sub-packet in the corresponding device archive until the transfer device finishes reading the log file.

[0010] Optionally, in a first implementation of the first aspect of the present invention, the log data generated by the target battery is segmented and packaged by the log generating device to obtain a log file with a unique incremental code, and the metadata information of the target battery is generated, including:

[0011] Counting the log data generated by the target battery by the log generating device to obtain the number of logs;

[0012] According to the number of logs and the preset number of log sub-packaging entries, the log data is grouped and processed to obtain a log set of a fixed number of logs;

[0013] Encoding each log in the log set to obtain a formatted log containing a unique incremental log code and corresponding log data;

[0014] The log set including the formatted log is packaged to obtain a log file, and a unique incremental file code is assigned to the log file and metadata information of the target battery is generated, wherein the unique incremental file code is included in the file name, and the metadata information includes a unique identification code of the target battery, the number of log sub-packaging entries, and a unique incremental file code of the latest log file.

[0015] Optionally, in a second implementation of the first aspect of the present invention, the synchronous verification of the transfer device and the cloud server according to the metadata information to obtain a synchronous verification result, and judging whether to establish a new device file for the target battery according to the synchronous verification result includes:

[0016] The transfer device queries and retrieves the device record in the local database of the transfer device according to the unique identification code of the target battery in the metadata information to obtain a local verification result, and creates a new device record when the local verification result shows that the target battery is not recorded;

[0017] Sending the unique identification code of the target battery to the cloud server through the transfer device, and determining through the cloud server whether the unique identification code of the target battery has been registered;

[0018] If not, a new device profile of the target battery is created through the cloud server.

[0019] Optionally, in a third implementation of the first aspect of the present invention, after the synchronization verification between the transfer device and the cloud server is completed, calculating the missing log sub-packages in the log sub-packages stored in the cloud server by the cloud server, and generating an integrated log according to the missing log sub-packages and the log file includes:

[0020] After the synchronization verification between the transfer device and the cloud server is completed, the last stored log sub-package name and the unique incremental log code of the last stored log data are read through the cloud server;

[0021] Calculate the number of log files that the cloud server should have according to the unique incremental log code and the number of log sub-packages, and traverse all log sub-packages stored in the cloud server according to the number of log files that should have, and determine that discontinuous log sub-packages among all log sub-packages are missing log sub-packages;

[0022] The cloud server integrates the last stored log sub-package name, the last stored unique incremental log code of the log data, and the sub-package number of the missing log sub-package to obtain integrated data, and sends the integrated data to the transfer device;

[0023] Comparing the integrated data with the unique incremental log code of the last log data in the log file by the transfer device to obtain a comparison result;

[0024] The log file is selectively read according to the comparison result to generate an integrated log.

[0025] Optionally, in a fourth implementation of the first aspect of the present invention, the determining by the transfer device whether the integrated log forms a new complete log subpackage, and when the integrated log forms a new complete log subpackage, synchronizing the new complete log subpackage to the cloud server includes:

[0026] Performing a quantitative statistical process on the integrated log through the transfer device to obtain the number of records in the integrated log, and performing a comparison process based on the number of records and a preset number of log sub-packaging entries to obtain a log sub-packaging judgment result;

[0027] According to the log sub-packaging judgment result, the integrated log is sub-packaged to obtain one or more complete log sub-packaging;

[0028] The one or more complete log sub-packets are subjected to transmission processing, and the complete log sub-packet data is transmitted to the cloud server for synchronous storage.

[0029] Optionally, in a fifth implementation of the first aspect of the present invention, when the transfer device is configured with a display device, after the new complete log sub-packaging is stored in the corresponding device archive by the cloud server, it also includes:

[0030] Obtaining a query request from a user, and searching and processing the log files of the target battery stored in the cloud server according to the query request to obtain a set of log files that meet the query conditions;

[0031] Performing statistical analysis on the log file set to obtain statistical analysis results of the target battery;

[0032] According to the statistical analysis results, trend prediction processing is performed on the historical operation data of the target battery to obtain battery performance change trend and estimated life data;

[0033] The log file collection, statistical analysis results and estimated life data are visualized and adaptively laid out, and displayed and output on a display device of the transfer device.

[0034] Optionally, in a sixth implementation of the first aspect of the present invention, performing trend prediction processing on the historical operating data of the target battery according to the statistical analysis result to obtain the battery performance change trend and estimated life data includes:

[0035] Performing time series decomposition processing on the key performance indicators in the statistical analysis results to obtain a decomposed data set containing trend, seasonal and random components;

[0036] According to the trend components in the decomposed data set, regression analysis is performed on the historical operation data of the target battery to obtain the battery performance change trend;

[0037] Performing extrapolation calculation on the battery performance change trend to obtain a performance indicator prediction value within a preset time range;

[0038] The remaining service life of the battery is estimated based on the performance indicator prediction value and the preset performance threshold value to obtain the battery estimated life data.

[0039] A second aspect of the present invention provides a battery log storage device, which is applied to a battery log storage system. The battery log storage system includes a log generating device, a transfer device and a cloud server. The battery log storage device includes:

[0040] A log packaging module, used to perform segmented packaging processing on the log data generated by the target battery through the log generating device, obtain a log file with a unique incremental code, and generate metadata information of the target battery;

[0041] A synchronization verification module, used to perform synchronization verification on the transfer device and the cloud server according to the metadata information, obtain a synchronization verification result, and determine whether to establish a device file for the target battery according to the synchronization verification result;

[0042] A missing calculation module, used to calculate the missing log sub-packages in the log sub-packages stored in the cloud server through the cloud server after the synchronization verification between the transfer device and the cloud server is completed, and generate an integrated log according to the missing log sub-packages and the log file;

[0043] A synchronous sending module, used for judging whether the integrated log forms a new complete log sub-package through the transfer device, and when the integrated log forms a new complete log sub-package, synchronizing the new complete log sub-package to the cloud server;

[0044] The storage module is used to store the new complete log sub-packet in the corresponding device archive through the cloud server until the transfer device finishes reading the log file.

[0045] A third aspect of the present invention provides a battery log storage device, comprising: a memory and at least one processor, wherein instructions are stored in the memory, and the memory and the at least one processor are interconnected via a line; the at least one processor calls the instructions in the memory so that the battery log storage device executes the steps of the above-mentioned battery log storage method.

[0046] A fourth aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the steps of the above-mentioned battery log storage method.

[0047] The above-mentioned battery log storage method, device, equipment and storage medium, through the log generating device, segments and packages the log data generated by the target battery, obtains a log file with a unique incremental code, and generates corresponding metadata information. Based on the metadata information, the transfer device and the cloud server are synchronized and verified to determine whether to establish a device file for the target battery. After the synchronization verification is completed, the cloud server calculates the number of missing logs between the log file and the log sub-package stored in the cloud, and generates an integrated log. The transfer device determines whether the integrated log forms a new complete log sub-package, and synchronizes it to the cloud server, and finally stores the complete log sub-package in the corresponding device file until the transfer device completes the log reading. This method efficiently and automatically handles the storage of battery logs by setting up a cloud server and a transfer device, thereby ensuring the integrity, real-time and security of the log data.

[0048] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.

[0049] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 This is a schematic diagram of a first embodiment of a battery log storage method according to an embodiment of the present invention;

[0051] Figure 2 A schematic diagram of an embodiment of a battery log storage device in an embodiment of the present invention;

[0052] Figure 3 FIG. 1 is a schematic diagram of an embodiment of a battery log storage device in an embodiment of the present invention. DETAILED DESCRIPTION

[0053] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0054] The terms "including" and "having" and any variations thereof mentioned in the embodiments of the present invention are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device end including a series of steps or units is not limited to the listed steps or units, but may optionally include other steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or device ends.

[0055] To facilitate understanding of this embodiment, a battery log storage method disclosed in an embodiment of the present invention is first described in detail. The battery log storage method is applied to a battery log storage system, and the battery log storage system includes a log generating device, a transfer device, and a cloud server. Figure 1 As shown, the method comprises the following steps:

[0056] 101. Perform segmented packaging processing on the log data generated by the target battery through the log generating device to obtain a log file with a unique incremental code, and generate metadata information of the target battery;

[0057] In one embodiment of the present invention, the log data generated by the target battery is segmented and packaged by the log generating device to obtain a log file with a unique incremental code, and the metadata information of the target battery is generated, including: counting the log data generated by the target battery by the log generating device to obtain the number of logs; grouping the log data according to the number of logs and a preset number of log sub-packaging items to obtain a log set of a fixed number of logs; encoding each log in the log set to obtain a formatted log containing a unique incremental log code and corresponding log data; file packaging the log set containing the formatted log to obtain a log file, assigning a unique incremental file code to the log file and generating the metadata information of the target battery, wherein the unique incremental file code is included in the file name, and the metadata information includes a unique identification code of the target battery, the number of log sub-packaging items, and a unique incremental file code of the latest log file.

[0058] Specifically, first, the log generating device will count the generated log data. This process involves traversing all newly generated log entries and accumulating counters to finally obtain the number of logs. For example, if the battery generates 500 log records in one operating cycle, the number of logs obtained after counting is 500. Subsequently, the system will perform group processing based on the number of logs obtained and the preset number of log sub-packaging items. This preset number of log sub-packaging items is a fixed parameter in the system, which may be set to 1000, for example. The group processing process is to divide the log data according to this fixed number to form several log sets. If the number of logs is less than a complete sub-packaging, then these log data will be retained until the next processing cycle. Next, the system will encode each log in each log set. This process assigns a unique incremental code to each log, and combines this code with the corresponding log data to form a formatted log. The structure of the formatted log may include fields such as log code, timestamp, log type, and log content. Then, the system will perform file packaging processing on the log set containing these formatted logs. This process will package a complete set of logs into a separate file, which is called a log file. At the same time, the system will assign a unique incremental file code to this log file. This file code will be included in the file name for subsequent identification and management. Finally, the system will generate metadata information for the target battery. This metadata information contains three key parts: the unique identification code of the target battery, the number of log sub-packages, and the unique incremental file code of the latest log file. The unique identification code of the target battery is an inherent property of the battery and is used to uniquely identify the battery in the system. The number of log sub-packages is the preset parameter mentioned earlier, and the unique incremental file code of the latest log file is the code of the log file just generated.

[0059] 102. Perform synchronous verification on the transfer device and the cloud server according to the metadata information to obtain a synchronous verification result, and determine whether to establish a device file for the target battery according to the synchronous verification result;

[0060] In one embodiment of the present invention, the synchronous verification of the transfer device and the cloud server according to the metadata information to obtain a synchronous verification result, and judging whether to establish a new device file for the target battery according to the synchronous verification result includes: querying and retrieving the device records in the local database of the transfer device according to the unique identification code of the target battery in the metadata information by the transfer device to obtain a local verification result, and when the local verification result is that the target battery has not been recorded, creating a new device record; sending the unique identification code of the target battery to the cloud server through the transfer device, and judging through the cloud server whether the unique identification code of the target battery has been registered; if not, establishing a new device file for the target battery through the cloud server.

[0061] Specifically, first, the transfer device extracts the unique identifier of the target battery from the metadata information. This extraction process involves parsing the data structure of the metadata information, locating the field of the unique identifier, and then reading the value of the field. The transfer device then uses the unique identifier as a keyword to query and retrieve its local database. During the query process, the transfer device accesses its locally stored device record database. This database may be a lightweight file-based database or an embedded database system. The transfer device traverses all records in the database and compares the battery identifier field in each record with the unique identifier of the target battery. If a matching record is found, the query process stops and returns detailed information about the record. If no match is found after traversing all records, a result indicating that it is not found is returned. When the local verification result shows that the target battery is not recorded, the transfer device immediately creates a new device record in the local database. This creation process includes adding a new record to the database, filling in the unique identifier of the battery, the first connection time (obtained by obtaining the current system time), the initial status (such as "new device"), and other information. If it is a file-based database, this process may involve opening the data file, appending a new record line to the end of the file, and then saving and closing the file. After creating the local record, the relay device sends the unique identifier of the target battery to the cloud server. This sending process first involves establishing a network connection with the cloud server, which may be through HTTP or other custom network protocols. The relay device constructs a data packet containing the battery unique identifier and possible other necessary information, such as the relay device's own identification information, timestamp, etc. The relay device then sends this data packet to the cloud server through the established network connection. After receiving the data packet, the cloud server first parses the data packet and extracts the battery unique identifier. The cloud server then queries its master database. This query process is similar to the local query of the relay device, but on a larger scale and may involve query operations on a distributed database. The cloud server traverses all battery records in its database to find out whether there is a matching unique identifier. If the cloud server's query results show that the battery has not been registered, the cloud server will start the process of creating a new device profile. This process first involves creating a new record in the cloud server's database. The cloud server will generate a new database entry, filling in the battery's unique identification code, registration time, initial status and other information. At the same time, the cloud server will also create the corresponding file storage structure, which usually involves creating a new directory in the server's file system to store all future log files for the battery. After completing these operations, the cloud server will generate a confirmation message indicating that the new device profile has been successfully created. This confirmation message will be sent back to the transfer device and transmitted in the form of data packets through the previously established network connection.After receiving this confirmation information, the transit device will update the status of the corresponding battery record in its local database and mark it as registered in the cloud, completing the entire synchronization verification and device profile creation process.

[0062] 103. After the synchronization verification between the transfer device and the cloud server is completed, the cloud server calculates the missing log sub-packages in the log sub-packages stored in the cloud server, and generates an integrated log according to the missing log sub-packages and the log files;

[0063] In one embodiment of the present invention, after the synchronization verification between the transfer device and the cloud server is completed, the missing log sub-packages in the log sub-packages stored in the cloud server are calculated by the cloud server, and the integrated log is generated according to the missing log sub-packages and the log file. The integrated log includes: after the synchronization verification between the transfer device and the cloud server is completed, the cloud server reads the last stored log sub-package name and the last stored unique incremental log code of the log data; calculates the number of log files that the cloud server should have according to the unique incremental log code and the number of log sub-packages, and generates an integrated log according to the number of log files that should have Traverse all log sub-packaging stored in the cloud server, determine that discontinuous log sub-packaging in all log sub-packaging is a missing log sub-packaging; integrate the last stored log sub-packaging name, the last stored unique incremental log code of the log data and the sub-packaging number of the missing log sub-packaging through the cloud server to obtain integrated data, and send the integrated data to the transfer device; compare the integrated data with the unique incremental log code of the last log data in the log file through the transfer device to obtain a comparison result; perform selective reading processing on the log file according to the comparison result to generate an integrated log.

[0064] Specifically, first, the cloud server accesses its storage system and reads the name of the last stored log package. This process involves querying metadata information in the database or file system to locate the latest log package file. Subsequently, the cloud server opens the latest log package file and reads the unique incremental log code of the last log data. This code is usually an integer that represents the position of the log in the entire log sequence. Next, the cloud server calculates the number of log files that should be based on the unique incremental log code of the last log read and the preset number of log packages. The calculation method is to divide the code of the last log by the number of log packages, and if there is a remainder, round up the quotient. For example, if the code of the last log is 10500, and each package contains 1000 logs, the number of log files that should be there is 11 (10500 ÷ 1000 = 10.5, rounded up to 11). After calculating the number of log files that should be there, the cloud server begins to traverse all log packages of the battery in its storage system. This process involves reading the metadata of each log package, especially the package number. The cloud server will check in the order of the sub-package numbers. If the numbers are found to be discontinuous, the missing numbers will be recorded. These discontinuous numbers are the missing log sub-packages. Then, the cloud server integrates the last stored log sub-package name, the unique incremental log code of the last stored log data, and the sub-package number of the missing log sub-package into a data structure. This data structure may be a JSON object or a custom data format, which contains all the information that needs to be transmitted to the transfer device. The cloud server then sends this integrated data to the transfer device through a network connection. After receiving the integrated data, the transfer device will extract the unique incremental log code of the last stored log data. At the same time, the transfer device will read the unique incremental log code of the last log data in the locally stored log file. The transfer device then compares the two codes to obtain the comparison result. If the local code is greater than the cloud server code, it means that the transfer device has new log data to be synchronized; if they are equal, it means that the data has been fully synchronized; if they are less than, there may be data inconsistency. Finally, according to the comparison result, the transfer device selectively reads the local log file. If there is new data locally, the transfer device will start from the encoding of the last log data stored by the cloud server and read all subsequent log data. If there are missing log packets, the transfer device will specifically read the data of these missing parts. Through this selective reading, the transfer device can efficiently read only the data required by the cloud server instead of transmitting all log files. After the reading is completed, the transfer device integrates the newly read data with the existing data of the cloud server to form a complete and up-to-date log data set, namely the integrated log.

[0065] 104. Determine whether the integrated logs form a new complete log sub-package through the transfer device, and when the integrated logs form a new complete log sub-package, synchronize the new complete log sub-package to the cloud server;

[0066] In one embodiment of the present invention, the determining by the transfer device whether the integrated log forms a new complete log sub-package, and when the integrated log forms a new complete log sub-package, synchronizing the new complete log sub-package to the cloud server includes: performing quantitative statistical processing on the integrated log by the transfer device to obtain the number of records in the integrated log, and performing comparison processing based on the number of records and a preset number of log sub-packages to obtain a log sub-package judgment result; based on the log sub-package judgment result, performing sub-package processing on the integrated log to obtain one or more complete log sub-packages; performing transmission processing on the one or more complete log sub-packages, and transmitting the complete log sub-package data to the cloud server for synchronous storage.

[0067] Specifically, first, the transfer device will perform a quantitative processing on the integrated log. This process involves traversing each record in the integrated log and using a counter to accumulate the number of records. The traversal can be achieved by reading the integrated log file line by line or traversing the data structure in memory. For example, if the integrated log is stored in an array, the transfer device will start from the first element of the array, access each element one by one, and increment the counter until it reaches the end of the array. In this way, the number of records in the integrated log is obtained. Next, the transfer device will compare the obtained number of records with the preset number of log sub-packaging items. The preset number of log sub-packaging items is a fixed value pre-defined in the system, such as 1000. The comparison process is to divide the number of records by the number of sub-packaging items to obtain the quotient and remainder. The quotient represents the number of complete sub-packaging items that can be formed, and the remainder represents the number of records that are less than a complete sub-packaging item. This calculation process can be implemented using integer division and modulus operations. According to the result of the comparison process, the transfer device will obtain the log sub-packaging judgment result. If the quotient is greater than zero, it means that at least one complete log sub-package can be formed; if the remainder is also greater than zero, it means that some records are not enough to form a complete sub-package. The transfer device will decide the subsequent processing method based on this judgment result. Then, the transfer device will perform sub-package processing on the integrated log according to the log sub-package judgment result. This process involves grouping the records in the integrated log according to the preset number of sub-packages. In specific implementation, the transfer device will create a new data structure (such as an array or list) to store the sub-packages. Then, it will take out a preset number of records from the beginning of the integrated log each time, form these records into a sub-package, and add them to the newly created data structure. This process will be repeated until all records that can form a complete sub-package are processed. If there are still remaining records (i.e., the remainder), the transfer device will retain these records and wait for the next time new log data arrives for processing. This ensures that each sub-package contains the preset number of records and maintains data consistency. After completing the sub-package processing, the transfer device will obtain one or more complete log sub-packages. Each sub-package is an independent data unit that contains a preset number of log records. Finally, the transit device will process the transmission of these complete log packets and transfer them to the cloud server for synchronous storage. The transmission process first involves establishing a network connection with the cloud server, which is usually achieved through HTTP or other network protocols. Then, the transit device converts each log packet into a format suitable for transmission, such as JSON or binary data. For each log packet, the transit device constructs a data packet containing the contents of the packet and necessary metadata, such as the packet sequence number, timestamp, etc. The transit device then sends these data packets one by one to the cloud server through the established network connection. During the transmission process, the transit device monitors the transmission status to ensure that each packet is sent successfully.If a transmission fails due to a network problem, the transit device will implement a retry mechanism to try to resend the failed packets. After receiving these packets, the cloud server will perform verification and storage processing. The verification process includes checking the integrity and correctness of the packets to ensure that no data is lost or damaged. Storage processing involves saving the received packets to the storage system of the cloud server, which is usually a large-scale distributed file system or database.

[0068] 105. The new complete log package is stored in the corresponding device archive through the cloud server until the transfer device finishes reading the log file.

[0069] In one embodiment of the present invention, the cloud server first parses the received data packet and extracts the content and related metadata of the log sub-packet, such as the unique identification code of the target battery, the sub-packet sequence number, etc. Subsequently, the cloud server locates the corresponding device archive in its storage system according to the unique identification code of the target battery. This device archive is usually a directory or database table dedicated to storing all relevant data of a specific battery. After locating the device archive, the cloud server creates a new storage unit in the archive, which may be a new file or database record, to save this log sub-packet. During the storage process, the cloud server writes the content of the log sub-packet to this new storage unit and updates the related index information for subsequent rapid retrieval. For example, if the file system is used for storage, the cloud server creates a new file with the file name containing the sub-packet sequence number and timestamp. After the storage is completed, the cloud server updates the metadata of the device archive and records the latest stored log sub-packet information, including the latest sub-packet sequence number, storage time, etc. This update process ensures that the device archive is always kept up to date. Then, the cloud server sends a confirmation message to the transfer device, indicating that the sub-packet has been successfully stored. The cloud server will continue this process, continuously receiving and storing new log sub-packaging, and updating the device archive until it receives the end signal sent by the transfer device, indicating that all log files have been read. After receiving the end signal, the cloud server will perform the final data sorting work, such as updating the total number of logs, generating storage reports, etc., to complete the entire log synchronization process.

[0070] Furthermore, when the transfer device is configured with a display device, after the new complete log package is stored in the corresponding device file through the cloud server, it also includes: obtaining a user's query request, and based on the query request, retrieving and processing the log file of the target battery stored in the cloud server to obtain a log file set that meets the query conditions; performing statistical analysis on the log file set to obtain a statistical analysis result of the target battery; based on the statistical analysis result, performing trend prediction processing on the historical operating data of the target battery to obtain a battery performance change trend and estimated life data; visualizing and adaptively laying out the log file set, statistical analysis results and estimated life data, and displaying and outputting them on the display device of the transfer device.

[0071] Specifically, after receiving the query conditions input by the user, the transfer device encapsulates these conditions into a query request data packet in a standard format. This data packet usually contains information such as the unique identification code of the target battery, the time range of the query, and the type of data to be queried. The transfer device then sends this query request to the cloud server through a network connection. After receiving the query request, the cloud server first parses the request data packet and extracts the query conditions. Then, the cloud server locates the device archive of the battery in its storage system based on the unique identification code of the target battery. The cloud server then traverses all log files in the device archive and matches the metadata of each file. The matching process includes comparing whether the timestamp of the file is within the time range of the query and whether the file contains the type of data requested by the user. All files that meet the conditions are added to a temporary list to form a set of log files that meet the query conditions. After obtaining the set of log files, the cloud server begins statistical analysis processing. This process first involves opening each log file and reading the data records in it. For each record, the cloud server extracts key data points such as battery voltage, current, temperature, and number of charge and discharge times. Then, the cloud server will perform statistical calculations on these data points, including calculating the average, standard deviation, maximum, minimum, etc. of each indicator. In addition, the cloud server will also perform time series analysis to identify periodic changes and long-term trends in the data. For example, calculate the rate of change of battery capacity over time, or identify the impact pattern of charge and discharge cycles on battery performance. The results of these calculations and analyses constitute the statistical analysis results of the target battery. Next, based on these statistical analysis results, the cloud server uses a preset algorithm model to perform trend prediction processing on the historical operating data of the target battery to obtain the battery performance change trend and estimated life data. This step involves complex mathematical models and machine learning algorithms, and the specific implementation can select an appropriate prediction method based on actual needs. After completing the analysis and prediction, the cloud server packages the log file collection, statistical analysis results, and estimated life data and sends them back to the transfer device. After receiving these data, the transfer device begins visualization and adaptive layout processing. The visualization process includes converting the original data into a graphical representation. For example, use a line chart to show the trend of battery capacity change over time, use a bar chart to show the distribution of charge and discharge times, or use a heat map to show battery temperature changes. Adaptive layout processing involves dynamically adjusting the size, position, and display of the chart according to the screen size and resolution of the transfer device. This process usually uses responsive design techniques to ensure good display effects on display devices of different sizes. Finally, the transfer device presents the processed visualization content on the display device. This step includes drawing charts on the screen, displaying text descriptions, and adding interactive elements (such as clickable legends, scalable timelines, etc.).At the same time, the transfer device will also provide a user interaction interface, allowing users to further explore the data, such as zooming in on the data of a certain time period, switching between different data views, etc. After the entire process is completed, the user can see intuitive and detailed battery performance analysis results and prediction data on the display screen of the transfer device, so as to better understand and manage the status of the target battery.

[0072] Furthermore, the process of performing trend forecasting on the historical operating data of the target battery based on the statistical analysis results to obtain battery performance change trends and estimated life data includes: performing time series decomposition processing on the key performance indicators in the statistical analysis results to obtain a decomposed data set containing trend, seasonal and random components; performing regression analysis processing on the historical operating data of the target battery based on the trend components in the decomposed data set to obtain battery performance change trends; performing extrapolation calculation processing on the battery performance change trends to obtain performance indicator prediction values ​​within a preset time range; and estimating the remaining service life of the battery based on the performance indicator prediction values ​​and preset performance thresholds to obtain battery estimated life data.

[0073] Specifically, first, the system extracts key performance indicators such as battery capacity, internal resistance, and charge and discharge efficiency from the statistical analysis results. For each indicator, the system uses a time series decomposition algorithm, such as the STL (Seasonal and Trend decomposition using Loess) method, to decompose the time series data into trend, seasonal, and random components. This process involves multiple iterative smoothing of the original data to separate long-term trends and cyclical changes, and the remaining parts are regarded as random components. For example, when decomposing the battery capacity data, a slowly decreasing trend component, a seasonal component related to the frequency of use, and some irregular fluctuations may be found as random components. Next, the system performs regression analysis on the historical operating data of the target battery based on the trend components in the decomposed data set. This step first selects an appropriate regression model, such as linear regression, polynomial regression, or exponential regression, depending on the characteristics of the trend component. The system then uses the least squares method or other optimization algorithms to fit the model parameters so that the model describes the changes in the trend component as accurately as possible. During the fitting process, the system calculates statistics such as the coefficient of determination (R²) to evaluate the degree of fit of the model. After the fitting is completed, the system obtains a mathematical expression, which represents the trend of battery performance. Then, the system performs extrapolation calculation on the obtained battery performance trend. This step involves using the trend model obtained earlier, extending it into the future on the time axis, and calculating the predicted value of the performance indicator within a preset time range. The preset time range may be a few months or years in the future, depending on the expected service life of the battery and the analysis requirements. The system will consider the prediction interval, that is, the possible range of the predicted value, in the prediction process to reflect the uncertainty of the prediction. This is usually achieved by calculating the confidence interval of the prediction, such as a 95% confidence interval, which means that there is a 95% probability that the actual value falls within this interval. Finally, the system estimates the remaining service life of the battery based on the predicted value of the performance indicator and the preset performance threshold. The preset performance threshold is usually provided by the battery manufacturer or determined based on actual usage experience. For example, when the battery capacity drops to 80% of the initial capacity, it is considered to have reached the end of life. The system compares the predicted performance indicator value with this threshold to find the time point when the performance indicator first falls below the threshold. The difference between this time point and the current time is the estimated remaining service life. In this process, the system will also consider the uncertainty of the prediction and may give a life range instead of a single value. For example, the system might report: "The battery is expected to reach end of life in 18 to 24 months with a 90% confidence level."

[0074] In this embodiment, the log data generated by the target battery is segmented and packaged by a log generating device to obtain a log file with a unique incremental code, and corresponding metadata information is generated. Based on the metadata information, the transfer device and the cloud server are synchronized and verified to determine whether to establish a device file for the target battery. After the synchronization verification is completed, the cloud server calculates the number of missing logs between the log file and the log sub-package stored in the cloud, and generates an integrated log. The transfer device determines whether the integrated log forms a new complete log sub-package, and synchronizes it to the cloud server, and finally stores the complete log sub-package in the corresponding device file until the transfer device completes the log reading. This method efficiently and automatically handles the storage of battery logs by setting up a cloud server and a transfer device, thereby ensuring the integrity, real-time and security of the log data.

[0075] The battery log storage method in the embodiment of the present invention is described above. The battery log storage device in the embodiment of the present invention is described below. The battery log storage device is applied to a battery log storage system. The battery log storage system includes a log generating device, a transfer device and a cloud server. Figure 2 , an embodiment of a battery log storage device in an embodiment of the present invention includes:

[0076] The log packaging module 201 is used to perform segmented packaging processing on the log data generated by the target battery through the log generating device to obtain a log file with a unique incremental code, and generate metadata information of the target battery;

[0077] A synchronization verification module 202 is used to perform synchronization verification on the transfer device and the cloud server according to the metadata information, obtain a synchronization verification result, and determine whether to establish a device file of the target battery according to the synchronization verification result;

[0078] A missing calculation module 203 is used to calculate the missing log sub-packages in the log sub-packages stored in the cloud server through the cloud server after the synchronization verification between the transfer device and the cloud server is completed, and generate an integrated log according to the missing log sub-packages and the log file;

[0079] The synchronous sending module 204 is used to determine whether the integrated log forms a new complete log sub-package through the transfer device, and when the integrated log forms a new complete log sub-package, synchronize the new complete log sub-package to the cloud server;

[0080] The storage module 205 is used to store the new complete log sub-package in the corresponding device archive through the cloud server until the transfer device finishes reading the log file.

[0081] In an embodiment of the present invention, the battery log storage device runs the above-mentioned battery log storage method, and the battery log storage device segments and packages the log data generated by the target battery through the log generating device, obtains a log file with a unique incremental code, and generates corresponding metadata information. Based on the metadata information, the transfer device and the cloud server are synchronously verified to determine whether to establish a device file for the target battery. After the synchronization verification is completed, the cloud server calculates the number of missing logs between the log file and the log sub-package stored in the cloud, and generates an integrated log. The transfer device determines whether the integrated log forms a new complete log sub-package, and synchronizes it to the cloud server, and finally stores the complete log sub-package in the corresponding device file until the transfer device completes the log reading. This method efficiently and automatically handles the storage of battery logs by setting up a cloud server and a transfer device, thereby ensuring the integrity, real-time and security of the log data.

[0082] above Figure 2 The battery log storage device in the embodiment of the present invention is described in detail from the perspective of modular functional entities. The battery log storage device in the embodiment of the present invention is described in detail from the perspective of hardware processing.

[0083] Figure 3 3 is a schematic diagram of the structure of a battery log storage device provided by an embodiment of the present invention. The battery log storage device 300 may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 310 (for example, one or more processors) and a memory 320, and one or more storage media 330 (for example, one or more mass storage device terminals) storing application programs 333 or data 332. Among them, the memory 320 and the storage medium 330 can be short-term storage or permanent storage. The program stored in the storage medium 330 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the battery log storage device 300. Furthermore, the processor 310 may be configured to communicate with the storage medium 330, and execute a series of instruction operations in the storage medium 330 on the battery log storage device 300 to implement the steps of the above-mentioned battery log storage method.

[0084] The battery log storage device 300 may also include one or more power supplies 340, one or more wired or wireless network interfaces 350, one or more input and output interfaces 360, and / or one or more operating systems 331, such as Windows Serve, Mac OS X, Unix, Linux, FreeBSD, etc. It will be appreciated by those skilled in the art that Figure 3The illustrated battery log storage device structure does not constitute a limitation on the battery log storage device provided by the present invention, and may include more or fewer components than illustrated, or a combination of certain components, or a different arrangement of components.

[0085] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are executed on a computer, the computer executes the steps of the battery log storage method.

[0086] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described system, device, or unit can refer to the corresponding process in the aforementioned method embodiment and will not be repeated here.

[0087] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the whole or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

[0088] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A battery log storage method, characterized in that: The battery log storage method is applied to a battery log storage system, the battery log storage system includes a log generating device, a transfer device and a cloud server, and the battery log storage method includes: The log data generated by the target battery is processed by the log generating device in segments and packages to obtain a log file with a unique incremental code, and metadata information of the target battery is generated; the log data generated by the target battery is processed by the log generating device in segments and packages to obtain a log file with a unique incremental code, and metadata information of the target battery is generated, including: the log data generated by the target battery is counted by the log generating device to obtain the number of logs; the log data is grouped according to the number of logs and the preset number of log sub-packaging items to obtain a log set of a fixed number of logs; each log in the log set is encoded to obtain a formatted log containing a unique incremental log code and corresponding log data; the log set containing the formatted log is packaged to obtain a log file, and a unique incremental file code is assigned to the log file and metadata information of the target battery is generated, wherein the unique incremental file code is contained in the file name, and the metadata information includes a unique identification code of the target battery, the number of log sub-packaging items, and a unique incremental file code of the latest log file; Performing synchronous verification on the transfer device and the cloud server according to the metadata information to obtain a synchronous verification result, and determining whether to establish a device file for the target battery according to the synchronous verification result; After the synchronization verification between the transfer device and the cloud server is completed, the missing log sub-packages in the log sub-packages stored in the cloud server are calculated by the cloud server, and an integrated log is generated according to the missing log sub-packages and the log file; after the synchronization verification between the transfer device and the cloud server is completed, the missing log sub-packages in the log sub-packages stored in the cloud server are calculated by the cloud server, and an integrated log is generated according to the missing log sub-packages and the log file, including: after the synchronization verification between the transfer device and the cloud server is completed, the last stored log sub-package name and the last stored unique incremental log code of the log data are read by the cloud server; according to the unique incremental log code and the log sub-package name, the integrated log is generated according to the missing log sub-package name and the log file. The method comprises: calculating the number of log files that the cloud server should have according to the number of packets, and traversing all log subpackets stored in the cloud server according to the number of log files that should have, and determining that the discontinuous log subpackets in all log subpackets are missing log subpackets; integrating the name of the last stored log subpacket, the unique incremental log code of the last stored log data, and the subpacket number of the missing log subpacket through the cloud server to obtain integrated data, and sending the integrated data to the transfer device; comparing the integrated data with the unique incremental log code of the last log data in the log file through the transfer device to obtain a comparison result; performing selective reading processing on the log file according to the comparison result to generate an integrated log; Determining whether the integrated log forms a new complete log sub-package through the transfer device, and synchronizing the new complete log sub-package to the cloud server when the integrated log forms a new complete log sub-package; The cloud server stores the new complete log sub-packet in the corresponding device archive until the transfer device finishes reading the log file.

2. The battery log storage method according to claim 1, characterized in that: The step of synchronously verifying the transfer device and the cloud server according to the metadata information to obtain a synchronous verification result, and determining whether to establish a new device file for the target battery according to the synchronous verification result includes: The transfer device searches and retrieves the device record in the local database of the transfer device according to the unique identification code of the target battery in the metadata information to obtain a local verification result, and creates a new device record when the local verification result shows that the target battery is not recorded. Sending the unique identification code of the target battery to the cloud server through the transfer device, and determining through the cloud server whether the unique identification code of the target battery has been registered; If not, a new device profile of the target battery is created through the cloud server.

3. The battery log storage method according to claim 1, characterized in that: The determining, by the transfer device, whether the integrated log forms a new complete log sub-package, and when the integrated log forms a new complete log sub-package, synchronizing the new complete log sub-package to the cloud server includes: Performing a quantitative statistical process on the integrated log through the transfer device to obtain the number of records in the integrated log, and performing a comparison process based on the number of records and a preset number of log sub-packaging entries to obtain a log sub-packaging judgment result; According to the log sub-packaging judgment result, the integrated log is sub-packaged to obtain one or more complete log sub-packaging; The one or more complete log sub-packets are subjected to transmission processing, and the complete log sub-packet data is transmitted to the cloud server for synchronous storage.

4. The battery log storage method according to claim 1, characterized in that: When the transfer device is configured with a display device, after the new complete log sub-packaging is stored in the corresponding device archive through the cloud server, it also includes: Obtaining a query request from a user, and searching and processing the log files of the target battery stored in the cloud server according to the query request to obtain a set of log files that meet the query conditions; Performing statistical analysis on the log file set to obtain statistical analysis results of the target battery; According to the statistical analysis results, trend prediction processing is performed on the historical operation data of the target battery to obtain battery performance change trend and estimated life data; The log file collection, statistical analysis results and estimated life data are visualized and adaptively laid out, and displayed and output on a display device of the transfer device.

5. The battery log storage method according to claim 4, characterized in that: The process of performing trend prediction processing on the historical operation data of the target battery according to the statistical analysis result to obtain the battery performance change trend and estimated life data includes: Performing time series decomposition processing on the key performance indicators in the statistical analysis results to obtain a decomposed data set containing trend, seasonal and random components; According to the trend components in the decomposed data set, regression analysis is performed on the historical operation data of the target battery to obtain the battery performance change trend; Performing extrapolation calculation on the battery performance change trend to obtain a performance indicator prediction value within a preset time range; The remaining service life of the battery is estimated based on the performance indicator prediction value and the preset performance threshold value to obtain the battery estimated life data.

6. A battery log storage device, characterized in that: The battery log storage device is applied to a battery log storage system, the battery log storage system includes a log generating device, a transfer device and a cloud server, and the battery log storage device includes: A log packaging module, used for performing segmented packaging processing on the log data generated by the target battery through the log generating device to obtain a log file with a unique incremental code, and generating metadata information of the target battery; the segmented packaging processing on the log data generated by the target battery through the log generating device to obtain a log file with a unique incremental code, and generating metadata information of the target battery includes: performing counting processing on the log data generated by the target battery through the log generating device to obtain the number of logs; grouping the log data according to the number of logs and the preset number of log sub-packaging items to obtain a log set of a fixed number of logs; encoding each log in the log set to obtain a formatted log containing a unique incremental log code and corresponding log data; performing file packaging processing on the log set containing the formatted log to obtain a log file, assigning a unique incremental file code to the log file and generating metadata information of the target battery, wherein the unique incremental file code is contained in the file name, and the metadata information includes a unique identification code of the target battery, the number of log sub-packaging items and a unique incremental file code of the latest log file; A synchronization verification module, used to perform synchronization verification on the transfer device and the cloud server according to the metadata information, obtain a synchronization verification result, and determine whether to establish a device file for the target battery according to the synchronization verification result; A missing calculation module is used to calculate the missing log sub-packages in the log sub-packages stored in the cloud server through the cloud server after the synchronization verification between the transfer device and the cloud server is completed, and generate an integrated log according to the missing log sub-packages and the log file; the missing log sub-packages in the log sub-packages stored in the cloud server are calculated through the cloud server after the synchronization verification between the transfer device and the cloud server is completed, and the integrated log is generated according to the missing log sub-packages and the log file. The missing calculation module includes: after the synchronization verification between the transfer device and the cloud server is completed, the name of the last stored log sub-package and the unique incremental log code of the last stored log data are read through the cloud server; according to the unique incremental log code and the The method further comprises: calculating the number of log files that the cloud server should have according to the number of log sub-packages, and traversing all log sub-packages stored in the cloud server according to the number of log files that should have, and determining that the discontinuous log sub-packages in all the log sub-packages are missing log sub-packages; integrating the name of the last stored log sub-package, the unique incremental log code of the last stored log data, and the sub-package number of the missing log sub-package through the cloud server to obtain integrated data, and sending the integrated data to the transfer device; comparing the integrated data with the unique incremental log code of the last log data in the log file through the transfer device to obtain a comparison result; performing selective reading processing on the log file according to the comparison result to generate an integrated log; A synchronous sending module, used for judging whether the integrated log forms a new complete log sub-package through the transfer device, and when the integrated log forms a new complete log sub-package, synchronizing the new complete log sub-package to the cloud server; The storage module is used to store the new complete log sub-packet in the corresponding device archive through the cloud server until the transfer device finishes reading the log file.

7. A battery log storage device, characterized in that: The battery log storage device comprises: a memory and at least one processor, wherein instructions are stored in the memory; The at least one processor calls the instruction in the memory to enable the battery log storage device to perform the steps of the battery log storage method according to any one of claims 1 to 5.

8. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by the processor, the steps of the battery log storage method as described in any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Log centralized storage method and device, electronic equipment and storage medium

    CN115114243A

  • Methods and systems for appending data to large data volumes in a multi-tenant store

    US20110258242A1