A TF card data storage parsing method, device, equipment and medium

By reading and parsing the rule data table of the TF card in the host computer, extended and full rule information is generated, which solves the problem of high manpower and time costs in the existing technology and realizes the real-time and flexibility of data parsing of battery energy storage system.

CN121116706BActive Publication Date: 2026-03-24HANGZHOU BMSER TECH
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-17
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

Existing technologies require significant manpower and time to analyze TF card storage data in battery energy storage systems, and it is difficult to update the data format in real time, leading to biased analysis results.

Method used

The host computer reads the rule data table of the target binary file in the TF card. After successful verification, it parses the data into text information in a preset encoding format, generates extended rule information, and performs data parsing based on the full set of rule information to generate the target data file.

Benefits of technology

It achieves real-time parsing of TF card stored data, saving manpower and time costs, improving parsing efficiency and flexibility, and adapting to parsing scenarios with different numbers of battery clusters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121116706B_ABST
    Figure CN121116706B_ABST
Patent Text Reader

Abstract

The application discloses a TF card storage data analysis method, device, equipment and medium, comprising: a host computer reads a target binary file stored in a TF card, and checks a rule data table located at a starting position of the target binary file; if the rule data table is successfully checked, the rule data table is parsed into text information in a preset encoding format, and extension rule information is generated according to an extension field in the rule data table; full-amount rule information is generated according to the text information and the extension rule information, and actual storage data in the target binary file is parsed to obtain a target data file according to the full-amount rule information. The technical scheme of the embodiment of the application can ensure the real-time performance of the TF card storage data analysis result, save the human cost and time cost consumed in the data analysis process, improve the analysis efficiency and the flexibility of the analysis mode.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, and in particular, to a TF card storage data analysis method, device, equipment and medium. BACKGROUND

[0002] At present, most of the battery energy storage systems store operation data in binary file format through T-Flash (TF) memory card at regular intervals. If you want to analyze the fault reason of the system or analyze and predict the energy storage efficiency, you need to convert the binary file into readable text or structured data format according to the data format and arrangement of the storage file in the TF card.

[0003] In the prior art, the binary file stored in the TF card is usually manually disassembled and converted by an analyst, and the processing result is stored as a readable file.

[0004] However, the existing file processing method needs to consume a large amount of labor cost and time cost, and has a very high real-time requirement for data. It is difficult for the analyst to find the updated data in the file in time, and the analyst may continue to use the outdated format to analyze the new data, thereby causing deviation of the analysis result and affecting the accuracy of the subsequent fault positioning result. SUMMARY

[0005] The present application provides a TF card storage data analysis method, device, equipment and medium, which can ensure the real-time of the TF card storage data analysis result, save the labor cost and time cost consumed in the data analysis process, improve the analysis efficiency and the flexibility of the analysis method.

[0006] According to an aspect of the present application, a TF card storage data analysis method is provided, which is applied to an upper computer, and includes:

[0007] reading a target binary file stored in a TF card, and checking a rule data table located at the starting position of the target binary file;

[0008] if the rule data table is checked successfully, parsing the rule data table into text information in a preset encoding format, and generating extended rule information according to an extended field in the rule data table;

[0009] generating full-amount rule information according to the text information and the extended rule information, and analyzing actual storage data in the target binary file according to the full-amount rule information to obtain a target data file.

[0010] Optionally, the checking of the rule data table located at the starting position of the target binary file includes:

[0011] extracting a data identifier in the rule data table, and judging whether the data identifier is a preset rule identifier;

[0012] If yes, performing a cyclic redundancy check on the rule data table.

[0013] Optionally, according to an extension field in the rule data table, extension rule information is generated, including:

[0014] According to a fixed data length and an extension data length in the rule data table, data rule information corresponding to a first battery cluster management unit in the battery energy storage system is extracted from the rule data table.

[0015] The fixed data length is used to represent the information length before each battery cluster management unit data; and the extension data length is used to represent the information length occupied by a single battery cluster management unit.

[0016] According to the extension number of the battery cluster management units in the rule data table and the data rule information corresponding to the first battery cluster management unit, a starting byte of each column data in the target binary file corresponding to different battery cluster management units is determined in sequence, and extension rule information is generated according to the starting byte.

[0017] Optionally, according to the full-amount rule information, actual storage data in the target binary file is parsed, including:

[0018] Each rule in the full-amount rule information is traversed to detect whether there is a variable rule in the full-amount rule information.

[0019] If yes, corresponding variable data in the target binary file is parsed according to the variable rule, and a variable parsing result is stored in a variable cache list.

[0020] Each rule is disassembled, a variable name in the rule is replaced with a variable value in the cache list according to a disassembly result, an operation expression in the rule is operated, and then the operation expression is replaced with an operation result.

[0021] According to the full-amount rule information, the remaining actual storage data in the target binary file is parsed.

[0022] Optionally, according to the full-amount rule information, the remaining actual storage data in the target binary file is parsed, including:

[0023] According to the fixed data length, the extension data length and the extension number in the full-amount rule information, a total byte length of a data record is determined.

[0024] According to a total byte length of the one data record, split remaining actual storage data in the target binary file, and store split results in an array indexed by row number;

[0025] Iterate through each row of data in the array, and parse each row of data according to the full-amount rule information.

[0026] Optionally, parse the actual storage data in the target binary file according to the full-amount rule information, including:

[0027] Determine whether the full-amount rule information is legal; if so, parse the actual storage data in the target binary file according to the full-amount rule information;

[0028] The method further includes:

[0029] If there is an illegal rule in the full-amount rule information, generate visual error information, and prompt the user that the target binary file parsing fails.

[0030] According to another aspect of the present application, a TF card storage data parsing device is provided, which is applied to an upper computer, and includes:

[0031] A data reading module, configured to read a target binary file stored in a TF card, and check a rule data table located at a starting position of the target binary file;

[0032] A rule table parsing module, configured to, if the rule data table passes the check, parse the rule data table into literal information in a preset encoding format, and generate extension rule information according to an extension field in the rule data table;

[0033] A full-amount rule generating module, configured to generate full-amount rule information according to the literal information and the extension rule information, and parse actual storage data in the target binary file according to the full-amount rule information, to obtain a target data file.

[0034] According to another aspect of the present application, an electronic device is provided, which includes:

[0035] At least one processor; and

[0036] A memory in communication connection with the at least one processor; wherein,

[0037] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the TF card storage data parsing method according to any one of the embodiments of the present application.

[0038] According to another aspect of the present application, there is provided a computer readable storage medium storing computer instructions for causing a processor to implement the TF card storage data parsing method according to any of the embodiments of the present application.

[0039] According to another aspect of the present application, there is provided a computer program product for implementing the TF card storage data parsing method according to any of the embodiments of the present application when executed by a processor.

[0040] The technical solution provided by the embodiments of the present application can ensure the real-time performance of the TF card storage data parsing result, save the human cost and time cost consumed in the data parsing process, adapt to the parsing scenarios of different battery cluster numbers, and improve the flexibility of the TF card storage data parsing method.

[0041] It should be understood that the content described in this section is not intended to identify key or important features of the embodiments of the present application, nor is it used to limit the scope of the present application. Other features of the present application will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS

[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0043] Figure 1 is a flowchart of a TF card storage data parsing method according to an embodiment of the present application;

[0044] Figure 2 is a flowchart of another TF card storage data parsing method according to an embodiment of the present application;

[0045] Figure 3 is a structural schematic diagram of a TF card storage data parsing device according to an embodiment of the present application;

[0046] Figure 4is a structural schematic diagram of an electronic device for implementing a TF card storage data analysis method according to an embodiment of the present application. DETAILED DESCRIPTION

[0047] In order to make the personnel in the technical field better understand the present application scheme, the technical scheme in the embodiment of the present application will be described clearly and completely below in combination with the drawings in the embodiment of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should belong to the scope of protection of the present application.

[0048] It should be noted that the terms "first", "second" and the like in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0049] Figure 1 A flowchart of a TF card storage data analysis method according to an embodiment of the present application is provided. The embodiment can be applicable to the case where the host computer analyzes the running data of the battery energy storage system stored in the TF card into a readable file. The method can be executed by a TF card storage data analysis device, which can be realized in the form of hardware and / or software and configured in the host computer. As shown in the figure, the method comprises: Figure 1

[0050] Step 110, reading the target binary file stored in the TF card, and checking the rule data table located at the starting position of the target binary file.

[0051] In the embodiment, the battery energy storage system can store the running data in the form of a binary file into the TF card in real time during the running process. The running data can include the running data of the battery system management unit (BAU) and the battery cluster management unit (RACK), such as summary information, detailed single voltage, detailed single temperature, single internal resistance, single state of charge (SOC), etc.

[0052] ​While storing the running data into the TF card, a 32k regular data table (used for assisting data parsing) can be constructed at the start position of the binary file to ensure the mapping relationship between the regular data table and the actual stored data is accurate, and to ensure the high precision and reliability of the subsequent data parsing process.

[0053] Optionally, the actual stored data format in the binary file can be as shown in Table 1. The regular data table at the start position of the binary file can be as shown in Table 2. In Table 1, the version number is the version number corresponding to the actual stored data of the binary file; TAG is the data identifier of the regular data table, when the TAG value is "AAAAAAAA", it can be determined that the binary file is self-contained with rules; the storage type value is 0, indicating single voltage data, 1 indicating battery temperature data, and 2 indicating summary information, which can be extended according to actual storage type requirements; the fixed data length is used to indicate the information length before each RACK data, such as the summary information length of BAU.

[0054] Table 1

[0055] The extension data length is used to indicate the information length occupied by a single RACK; the extension number is the number of RACKs in the current binary file; the content length is the actual effective length of the detailed rule content; the CRC32 is the cyclic redundancy check (CRC) code of the regular data table; the reserved column refers to the space reserved for subsequent extension format; the detailed rule content includes the related attribute description of each data name in the actual stored data in the binary file, for RACK data, only the attribute information of the first RACK is described in the rule content, and the attribute information of other RACKs can be extended according to the attribute information of the first RACK.

[0056] Table 2

[0057] In Table 2, the related attribute description format of each data name can be "# data name # data type # start byte # number # data rate # unit # data offset # extension rule file name # data classification", wherein the data classification indicates to which device this data belongs, such as BAU, RACK1, RACK2, etc.

[0058] Specifically, taking BAU operation data and RACK operation data as examples, the operation data can be blocked according to types (Block), one Block is occupied by single-body voltage per cluster, and one Block is occupied by summary information per cluster, then the operation data to be stored is respectively stuffed into the corresponding Block according to types, and the rule data table is generated according to the structure definition in the Block.

[0059] Taking summary information as an example, the BAU and RACK summary information to be stored can be changed according to project requirements, the BAU_SUMMARY_STRUCT and RACK_SUMMARY_STRUCT structures are changed, the two structures are traversed to generate rule content and stuffed into the "detailed rule content" in the file header in the code for generating a storage file, then the total character length of the rule content is calculated and stuffed into the "content length", the actual byte length of the two structures is calculated, the structure byte length of the BAU_SUMMARY_STRUCT is stuffed into the "fixed data length", the structure byte length of the RACK_SUMMARY_STRUCT is stuffed into the "extended data length", and the macro of the cluster number is stuffed into the "extension number". Finally, the version number, TAG, storage type, CRC32 and the like in the file header are filled up and written into the binary format storage file.

[0060] In this step, after the host computer reads the target binary file stored in the TF card, the rule data table located at the starting position of the target binary file can be checked, for example, the data identifier (TAG) in the rule data table can be extracted, and it is judged whether the data identifier is a preset rule identifier (for example, "AAAAAAAA"); if yes, the rule data table is subjected to CRC check.

[0061] Step 120, if the rule data table is successfully checked, the rule data table is parsed into text information in a preset encoding format, and the extended rule information is generated according to the extension field in the rule data table.

[0062] In this embodiment, if the rule data table fails the check, visual error information is generated, and the user is prompted that the target binary file fails the parsing.

[0063] If the rule data table in the target binary file is successfully checked, the rule data table can be parsed into text information in UTF-8 (Unicode Transformation Format-8-bit) encoding, then the attribute information of the RACK data in the detailed rule content is extended according to the extension data length and the extension number in the rule data table, and the extended rule information is obtained.

[0064] In step 130, full-amount rule information is generated according to the text information and the extension rule information, and actual storage data in the target binary file is parsed according to the full-amount rule information to obtain a target data file.

[0065] In this step, the host computer can read actual storage data (i.e., storage data other than the rule data table) of the target binary file, then parse the actual storage data row by row according to the full-amount rule information, and write the parsing result into a cell of the target data file. The format of the target data file can be Comma-Separated Values (CSV) or XLSX (Microsoft Excel Open XML Spreadsheet), which is not limited in the embodiment.

[0066] In one implementation of the embodiment, parsing the actual storage data in the target binary file according to the full-amount rule information includes: determining whether the full-amount rule information is legal; if yes, parsing the actual storage data in the target binary file according to the full-amount rule information. If there is an illegal rule in the full-amount rule information, visual error information is generated, and the user is prompted that the target binary file fails to be parsed.

[0067] In the embodiment, since the TF card stores data in a cyclic coverage manner, when the host computer reads the current target binary file, the storage data of the last cycle can be skipped during parsing in response to a data filtering operation triggered by the user.

[0068] Specifically, the host computer can provide a check box for filtering data to the user, and determine which data needs to be skipped in the parsing process according to the operation result of the user on the check box, thereby greatly simplifying the workflow of the data analyst and improving the convenience of the data filtering and parsing operation.

[0069] The technical scheme provided by the embodiment includes the following steps: the host computer reads a target binary file stored in a TF card, and checks a rule data table located at a starting position of the target binary file; if the rule data table passes the check, the rule data table is parsed into text information in a preset encoding format, extension rule information is generated according to an extension field in the rule data table, full-amount rule information is generated according to the text information and the extension rule information, and actual storage data in the target binary file is parsed according to the full-amount rule information to obtain a target data file. The technical scheme can ensure the real-time performance of the TF card storage data parsing result, save the human cost and time cost consumed in the data parsing process, adapt to different battery cluster number parsing scenarios, and improve the flexibility of the TF card storage data parsing method.

[0070] Figure 2 Another flowchart of the method for analyzing the data stored in the TF card is provided in the embodiments of the present application, which is applied to the upper computer, as shown in the figure, the method comprises the following steps: Figure 2

[0071] In step 210, the target binary file stored in the TF card is read, and the rule data table located at the starting position of the target binary file is checked.

[0072] In step 220, if the rule data table is checked successfully, the rule data table is analyzed into literal information in a preset encoding format.

[0073] In step 230, according to the fixed data length and the extended data length in the rule data table, the data rule information corresponding to the first battery cluster management unit in the battery energy storage system is extracted from the rule data table.

[0074] In step 240, according to the extended number of the battery cluster management units in the rule data table and the data rule information corresponding to the first battery cluster management unit, the starting byte of each column of data in the target binary file corresponding to different battery cluster management units is determined in sequence, and the extended rule information is generated according to the starting byte.

[0075] Specifically, the data rule information of all battery cluster management units can be extended according to the rule data table, and the starting byte corresponding to the data of each battery cluster management unit = the original starting byte in the rule data table + the extended length * (battery cluster ID-1).

[0076] In step 250, the full-amount rule information is generated according to the literal information and the extended rule information, each rule in the full-amount rule information is traversed, it is detected whether there is a variable rule in the full-amount rule information, if yes, step 260 is executed, and if no, the execution of the method is ended.

[0077] In a specific embodiment, taking the BAU running data and the RACK running data as examples, the format of each rule in the full-amount rule information can be as follows:

[0078] #Maximum allowed discharge current#ushort#76#1#0.1#A#0##BAU;

[0079] #Maximum current difference between clusters#ushort#78#1#0.1#A#0##BAU;

[0080] #Software item number#ushort#518#1#1##0##RACK1;

[0081] ​# Software major version number # ushort # 520 # 1 # 1 ## 0 ## RACK1;

[0082] # Software item number # ushort # 1030 # 1 # 1 ## 0 ## RACK2;

[0083] # Software major version number # ushort # 1032 # 1 # 1 ## 0 ## RACK2.

[0084] In this step, if the full rule information is legal, it can be traversed whether there is a rule starting with “{” and containing “}=” in each rule, if there is, it is determined that the rule is a variable rule.

[0085] Step 260, according to the variable rule, the corresponding variable data in the target binary file is parsed, and the variable parsing result is stored in the variable cache list.

[0086] In this step, the corresponding variable data can be parsed according to the data type, byte index, magnification, offset and other attribute information indicated in the variable rule, and then the parsing result is stored in the variable cache list.

[0087] Step 270, each rule is disassembled, the variable name in the rule is replaced with the variable value in the cache list according to the disassembly result, and the operation expression in the rule is operated, and then the operation expression is replaced with the operation result.

[0088] In this embodiment, after the full variable parsing of the binary file is completed, each rule can be disassembled, if the rule contains “{” and “}”, the variable name is extracted, and then the corresponding variable value is found from the variable cache list and replaced in the rule. If the starting byte and the number in the rule are operation expressions, that is, starting with “MATH(” and containing “)”, the operation expression can be operated, and then the operation result is replaced in the rule.

[0089] Step 280, according to the full rule information, the remaining actual storage data in the target binary file is parsed to obtain a target data file.

[0090] In one embodiment of this embodiment, according to the full rule information, the remaining actual storage data in the target binary file is parsed, including:

[0091] Step 281, according to the fixed data length, the extended data length and the number of extensions in the full rule information, the total byte length of a data record is determined;

[0092] Specifically, the total byte length of a data record = fixed data length + extension data length * extension number.

[0093] Step 282, according to the total byte length of the data record, the remaining actual storage data in the target binary file is split, and the split result is stored in the array indexed by the number of rows;

[0094] Step 283, each row of data in the array is traversed, and each row of data is parsed according to the full rule information.

[0095] In the embodiment, in the parsing process of the actual storage data of the target binary file, if it is identified that the column data belongs to the state class data or the fault class data, the data can be compared with the data of the last period, if the data changes compared with the data of the last period, the corresponding change event can be generated and written into the event record file, so that the data analysis personnel can quickly view the time node of the change of the fault class data and the state class data, thereby judging the running state of the battery energy storage system.

[0096] The technical scheme provided by the embodiment of the application comprises the following steps: a host computer reads a target binary file stored in a TF card, checks a rule data table located at a starting position of the target binary file, parses the rule data table into literal information in a preset encoding format if the checking is successful, extracts data rule information corresponding to a first battery cluster management unit according to a fixed data length and an extended data length in the rule data table, determines a starting byte corresponding to each column of data under different battery cluster management units in sequence according to the number of extensions and the data rule information corresponding to the first battery cluster management unit, generates extended rule information according to the starting byte, and then traverses each rule in the full rule information to detect whether there is a variable rule, if so, parses corresponding variable data according to the variable rule, disassembles each rule, replaces a variable name in the rule with a variable value, performs an operation on an operation expression in the rule, then replaces the operation expression with an operation result, and finally parses remaining actual storage data according to the full rule information to obtain a target data file.

[0097] Figure 3 The structure diagram of the TF card storage data analysis device provided by the embodiment of the application is applied to a host computer, as shown in the figure, Figure 3 The device comprises a data reading module 310, a rule table analysis module 320 and a full rule generation module 330.

[0098] The data reading module 310 is configured to read a target binary file stored in the TF card and check a rule data table located at a starting position of the target binary file.

[0099] The rule table analysis module 320 is configured to analyze the rule data table into literal information in a preset encoding format if the rule data table passes the check, and generate extended rule information according to an extension field in the rule data table.

[0100] The full-amount rule generation module 330 is configured to generate full-amount rule information according to the literal information and the extended rule information, and analyze actual storage data in the target binary file according to the full-amount rule information to obtain a target data file.

[0101] The technical scheme provided by the embodiment of the application can ensure the real-time performance of the TF card storage data analysis result, save the human cost and time cost consumed in the data analysis process, adapt to different battery cluster number analysis scenarios, and improve the flexibility of the TF card storage data analysis method.

[0102] On the basis of the above embodiment, the data reading module 310 comprises:

[0103] The identification judgment unit is configured to extract a data identification in the rule data table and judge whether the data identification is a preset rule identification.

[0104] The cyclic redundancy check unit is configured to perform cyclic redundancy check on the rule data table when the data identification is the preset rule identification.

[0105] The rule table analysis module 320 comprises:

[0106] The data rule extraction unit is configured to extract data rule information corresponding to a first battery cluster management unit in the battery energy storage system in the rule data table according to a fixed data length and an extension data length in the rule data table.

[0107] The fixed data length is used to represent the information length before each battery cluster management unit data, and the extension data length is used to represent the information length occupied by a single battery cluster management unit.

[0108] a data rule extension unit, configured to determine, according to an extension number of the battery cluster management units in the rule data table and data rule information corresponding to a first battery cluster management unit, a starting byte of each column of data in the target binary file corresponding to different battery cluster management units in sequence, and generate extension rule information according to the starting byte.

[0109] The full-amount rule generation module 330 includes:

[0110] a variable rule judgment unit, configured to traverse each rule in the full-amount rule information, detect whether there is a variable rule in the full-amount rule information, if yes, parse corresponding variable data in the target binary file according to the variable rule, and store a variable parsing result in a variable cache list;

[0111] a field replacement unit, configured to disassemble each rule, replace a variable name in the rule with a variable value in the cache list according to a disassembly result, perform an operation on an operation expression in the rule, and then replace the operation expression with an operation result;

[0112] a remaining data parsing unit, configured to parse remaining actual storage data in the target binary file according to the full-amount rule information;

[0113] a total length determination unit, configured to determine a total byte length of a data record according to a fixed data length, an extension data length and an extension number in the full-amount rule information;

[0114] a data splitting unit, configured to split the remaining actual storage data in the target binary file according to the total byte length of the data record, and store a splitting result in an array indexed by a row number;

[0115] an array traversal unit, configured to traverse each row of data in the array, and parse each row of data according to the full-amount rule information;

[0116] a legality judgment unit, configured to judge whether the full-amount rule information is legal, if yes, parse the actual storage data in the target binary file according to the full-amount rule information;

[0117] an error reporting unit, configured to generate visual error information and prompt a user that the target binary file fails to be parsed if there is an illegal rule in the full-amount rule information.

[0118] The apparatus can perform the method provided by all the foregoing embodiments of the present application, and has the corresponding function modules and beneficial effects of performing the foregoing method. Technical details not described in detail in the embodiments of the present application can be referred to the method provided by all the foregoing embodiments of the present application.

[0119] Figure 4 A structural diagram of an electronic device 10 that can be used to implement embodiments of the present application is shown. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular telephones, smart phones, wearable devices (e.g., headsets, glasses, watches, etc.), and other similar computing devices. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present application described and / or claimed in this document.

[0120] As shown in Figure 4 The electronic device 10 includes at least one processor 11, and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., connected in communication with the at least one processor 11, where the memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer programs stored in the read-only memory (ROM) 12 or loaded into the random access memory (RAM) 13 from the storage unit 18. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0121] A plurality of components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc., an output unit 17, such as various types of displays, a speaker, etc., a storage unit 18, such as a magnetic disk, an optical disk, etc., and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.

[0122] The processor 11 can be various general and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 performs various methods and processes described above, such as the TF card storage data parsing method.

[0123] In some embodiments, the TF card storage data parsing method can be implemented as a computer program tangibly embodied in a computer readable storage medium, such as storage unit 18. In some embodiments, portions or all of the computer program can be loaded onto and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded onto RAM 13 and executed by processor 11, one or more steps of the TF card storage data parsing method described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform the TF card storage data parsing method by any other suitable means, such as by means of firmware.

[0124] Various implementations of the systems and techniques described above can be realized in digital electronic circuitry, integrated circuitry, specially designed application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.

[0125] Computer programs used to implement the methods of the application can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the computer program, when executed by the processor of the machine, implements the functions / acts specified in the flowcharts and / or block diagrams. The computer program can be executed entirely on a machine, partially on a machine, partially on a machine and partially on a remote machine or entirely on a remote machine or server.

[0126] In the context of the present application, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer-readable storage medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. More specific examples of a machine-readable storage medium will include one or more lines of a program of instructions in a transitory signal, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0127] To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.

[0128] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0129] The computing system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system, to solve the defects of large management difficulty and weak business scalability in traditional physical host and VPS service.

[0130] It should be understood that the various forms of flow shown above can be reordered, added to, or have steps deleted. For example, the steps described in the present application can be performed in parallel, in series, or in a different order, as long as the desired results of the technical solutions of the present application can be achieved, which are not limited herein.

[0131] The above detailed description does not constitute a limitation on the protection scope of the present application. Those skilled in the art should understand that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method for parsing data stored on a TF card, characterized in that, The method is applied to a host computer and includes: Read the target binary file stored in the TF card and verify the rule data table located at the beginning of the target binary file; If the rule data table is successfully verified, the rule data table is parsed into text information in a preset encoding format, and extended rule information is generated based on the extended fields in the rule data table. Based on the text information and extended rule information, full rule information is generated, and the actual stored data in the target binary file is parsed according to the full rule information to obtain the target data file; The process of parsing the actual stored data in the target binary file according to the full set of rule information includes: traversing each rule in the full set of rule information and detecting whether there are variable rules; if so, parsing the corresponding variable data in the target binary file according to the variable rules and storing the variable parsing results in a variable cache list; disassembling each rule, replacing the variable names in the rule with the variable values ​​in the cache list according to the disassembly results, performing calculations on the calculation expressions in the rule, and then replacing the calculation expressions with the calculation results; determining the total byte length of a data record according to the fixed data length, extended data length, and number of extensions in the full set of rule information; splitting the remaining actual stored data in the target binary file according to the total byte length of a data record and storing the splitting results in an array indexed by the row number; traversing each row of data in the array and parsing each row of data according to the full set of rule information; The extended fields include extended data length and number of extensions; based on the extended fields in the rule data table, extended rule information is generated, including: extending the attribute information of the battery cluster management unit data according to the extended data length and number of extensions to obtain extended rule information.

2. The method according to claim 1, characterized in that, The rule data table located at the beginning of the target binary file is validated, including: Extract the data identifier from the rule data table and determine whether the data identifier is a preset rule identifier; If so, then perform cyclic redundancy check on the rule data table.

3. The method according to claim 1, characterized in that, Based on the extended fields in the rule data table, extended rule information is generated, including: Based on the fixed data length and extended data length in the rule data table, extract the data rule information corresponding to the first battery cluster management unit in the battery energy storage system from the rule data table. The fixed data length is used to represent the information length preceding the data of each battery cluster management unit; the extended data length is used to represent the information length occupied by a single battery cluster management unit. Based on the number of extended battery cluster management units in the rule data table and the data rule information corresponding to the first battery cluster management unit, the starting byte of each column of data in the target binary file under different battery cluster management units is determined sequentially, and extended rule information is generated based on the starting byte.

4. The method according to claim 1, characterized in that, According to the full set of rule information, the actual stored data in the target binary file is parsed, including: Determine whether the full set of rule information is valid; if so, parse the actual stored data in the target binary file according to the full set of rule information. The method further includes: If there are any invalid rules in the full set of rules information, a visual error message will be generated, and the user will be prompted that the target binary file failed to be parsed.

5. A TF card storage data parsing device, characterized in that, The device is applied to a host computer and includes: The data reading module is used to read the target binary file stored in the TF card and verify the rule data table located at the beginning of the target binary file; The rule table parsing module is used to parse the rule data table into text information in a preset encoding format if the rule data table is successfully verified, and to generate extended rule information based on the extended fields in the rule data table. The full rule generation module is used to generate full rule information based on the text information and extended rule information, and to parse the actual stored data in the target binary file according to the full rule information to obtain the target data file; The process of parsing the actual stored data in the target binary file according to the full set of rule information includes: traversing each rule in the full set of rule information and detecting whether there are variable rules; if so, parsing the corresponding variable data in the target binary file according to the variable rules and storing the variable parsing results in a variable cache list; disassembling each rule, replacing the variable names in the rule with the variable values ​​in the cache list according to the disassembly results, performing calculations on the calculation expressions in the rule, and then replacing the calculation expressions with the calculation results; determining the total byte length of a data record according to the fixed data length, extended data length, and number of extensions in the full set of rule information; splitting the remaining actual stored data in the target binary file according to the total byte length of a data record and storing the splitting results in an array indexed by the row number; traversing each row of data in the array and parsing each row of data according to the full set of rule information; The extended fields include extended data length and number of extensions; based on the extended fields in the rule data table, extended rule information is generated, including: extending the attribute information of the battery cluster management unit data according to the extended data length and number of extensions to obtain extended rule information.

6. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the TF card storage data parsing method according to any one of claims 1-4.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that are used to cause a processor to execute the TF card storage data parsing method according to any one of claims 1-4.

8. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the TF card storage data parsing method according to any one of claims 1-4.

Citation Information

Patent Citations

  • Method for implementing data file engine

    CN101819602A

  • Method for processing video in TF card

    CN113014965A

  • Data storage method based on TF card in BMS

    CN117406924A

  • Fault recording data storage method and device of energy storage system and storage medium

    CN119828968A