A method and system for the structure, generation and dynamic rendering of multi-level data

By generating a multi-level data structure that combines index data units and application data units, and using a dynamic rendering method, the problem of inter-level data linkage is solved, enabling rapid loading and rendering of massive amounts of data and improving data analysis efficiency.

CN116204495BActive Publication Date: 2026-03-17武汉市蓝电电子股份有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-14
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

Existing technologies cannot achieve multi-level data linkage, resulting in low data analysis efficiency, inability to quickly browse global data, and excessive memory consumption, making it impossible to load millions or tens of millions of data points.

Method used

By combining index data units and application data units and linking them through address pointers, a multi-level data structure is generated, including a loop layer, a process step layer, and a record layer. Data is quickly extracted using the address pointers of the index data units and rendered using a dynamic rendering method.

Benefits of technology

It enables rapid loading and rendering of massive, multi-level data, reduces memory usage, improves data analysis efficiency, and allows for quick browsing of global data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116204495B_ABST
    Figure CN116204495B_ABST
Patent Text Reader

Abstract

The application discloses a kind of multi-level data structure, generation and dynamic rendering method and system, according to the size of estimated charge-discharge test data, the size of the storage space of the single index data unit of the index data of multi-level data is set;Test data generated in the charge-discharge test process is written in the application data in multi-level data, after writing each test data, its index information is written in the index data unit of multi-level data;According to the address pointer in each index data unit, the index record of all application data is extracted;According to vertical scroll offset and the height of each row data, the height of current rendering interface obtains the starting row and end row of rendering;According to the extracted index record, all row data between starting row and end row are obtained and rendered;The application only needs to load the index information of each level data, according to the index information, load and render charge-discharge test data, reduce memory occupation and CPU time, improve the efficiency of battery test.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of multi-level data display technology, specifically relating to a method and system for the structure, generation, and dynamic rendering of multi-level data. Background Technology

[0002] In the charge / discharge testing industry, charge / discharge test data mainly stores multiple data points during the charging / discharge process, containing multiple levels with corresponding hierarchical relationships. After the test is completed, multiple levels of data need to be rendered before the test data generated during the charging / discharge process can be viewed, such as the cumulative charging capacity and discharging capacity of a charge / discharge cycle, the capacity of each test step, and detailed recorded data. Because the data in each test is relatively large, current technologies generally only display each level separately to reduce loading time each time. The problem with this is that it is impossible to achieve linkage between levels, and therefore it is impossible to associate the relevant data from each test, making it impossible to quickly browse the global data, resulting in low data analysis efficiency. Moreover, for millions or tens of millions of data points, this method cannot be loaded due to excessive memory consumption. Summary of the Invention

[0003] In order to quickly load the massive multi-level data generated during charge and discharge testing, this invention proposes a system and method for displaying multi-level data.

[0004] One of the objectives of this invention is to provide a multi-level data structure, comprising: index data and application data. The index data includes one or more fixed-length index data units for storing the sequence number, parent sequence number, level, and position of each data item in the application data within the file. The application data includes one or more application data units for storing multi-level data generated during battery charging and discharging. The index data units are linked to each other using address pointers. Each index data unit corresponds one-to-one with an application data unit.

[0005] A method for generating multi-level data to achieve the second objective of this invention includes the following steps:

[0006] S1. Set the storage space size of a single index data unit of the multi-level data index data according to the estimated size of the charge and discharge test data; the starting storage position of the index data unit is the beginning of the file; the starting position of the application data storage space is after the index data unit; the index data is used to store the index information of each charge and discharge test data; the application data is used to save the multi-level test data during the charge and discharge test process.

[0007] S2. Write the test data generated during the charge and discharge test into the application data in the multi-level data, and write the index information of each test data into the index data unit of the multi-level data after writing it.

[0008] The application data in the multi-layered data includes a cycle layer, a step layer, and a recording layer; the layers are associated with each other through a sequence number. The data in the cycle layer is used to record the summary data of each charge-discharge cycle, such as charging capacity and discharging capacity. The step layer is a sub-level of the cycle layer, and its data is used to record the summary information of each charging or discharging step, such as charging or discharging capacity, starting voltage, and ending voltage. The recording layer is a sub-level of the step layer, and its data is used to record real-time test data, such as voltage, current, capacity, and energy.

[0009] Furthermore, it also includes the following steps:

[0010] S3. After the storage space of the current index data unit is full, a new storage space is allocated at the end of the file as a new index data unit, and the storage space of each index data unit is the same size.

[0011] Furthermore, each index data unit includes an address pointer for storing the storage address of the next index data unit, through which the position of the next index data unit in the file can be obtained.

[0012] Furthermore, the index data unit includes multiple index records, each index record including the sequence number, parent sequence number, level, and position of each charge / discharge test data in the file.

[0013] A dynamic rendering method for multi-level data to achieve the third objective of this invention involves extracting index records of all application data based on the address pointers in each index data unit. These index records include a sequence number, parent sequence number, level, and the position of each charge / discharge test data item in the file. The starting line RS for rendering is obtained based on the vertical scroll offset HO and the height RH of each line of data. The ending line RE for rendering is obtained based on the vertical scroll offset HO, the height H of the current rendering interface, and the height RH of each line of data. All lines between RS and RE are obtained from the extracted index records, and the obtained line data is rendered.

[0014] Furthermore, when rendering each column from left to right, the sum of the widths CT of the currently rendered columns is calculated in real time. When CT is less than the horizontal scroll offset WO of the interface scrollbar or when CT is greater than the vertical scroll offset WO and the width W of the currently rendered interface, the rendering of subsequent columns is stopped.

[0015] The multi-level data generation system for achieving the fourth objective of this invention includes an application data generation module and an index data generation module. The application data generation module is used to store multi-level test data during the charge-discharge test process; the index data generation module is used to store multiple index information for each level of test data in the multi-level test data.

[0016] Furthermore, the index data generation module includes one or more fixed-length index data units, each of which is linked to the next index data unit via an address pointer.

[0017] The dynamic rendering system for multi-level data, which achieves the fifth objective of this invention, includes an index data extraction module, a rendering start line calculation module, and a rendering end line calculation module. The index data extraction module is used to extract the index records of all application data based on the address pointers in each index data unit. The index records include the sequence number, parent sequence number, level, and the position of each charge / discharge test data in the file. The rendering start line calculation module is used to obtain the rendering start line RS based on the vertical scroll offset HO and the height RH of each line of data. The rendering end line calculation module is used to obtain the rendering end line RE based on the vertical scroll offset HO, the height H of the current rendering interface, and the height RH of each line of data.

[0018] Beneficial effects:

[0019] For multi-level data in the millions or tens of millions, this invention does not need to load all the data. It only needs to load the index information of each level of data. Based on the index information and the height and width of the current rendering interface, a portion of the charge and discharge test data is loaded, which reduces memory usage and CPU time. It can quickly extract the data generated during the charge and discharge process, greatly improving the efficiency of the battery testing process. Attached Figure Description

[0020] Figure 1 This is a schematic diagram of the multi-level data generation and rendering process;

[0021] Figure 2 This is a diagram showing the effect of multi-level data expansion. Detailed Implementation

[0022] The following detailed embodiments are provided to explain the technical solutions of the claims of this invention, so that those skilled in the art can understand the claims. The scope of protection of this invention is not limited to the following specific embodiments. Any modifications made by those skilled in the art that incorporate the technical solutions of the claims but differ from the following detailed embodiments are also within the scope of protection of this invention.

[0023] As shown in the table below, the file structure of the multi-level data consists of two parts: index data and application data. The index data contains the indexes of all application data, allowing the extraction of all hierarchical relationships within the application data. See Table 1 below:

[0024]

[0025]

[0026] Table 1 Index Data

[0027] The application data consists of multiple layers, each with a unique serial number, as shown in the table below. The application data includes three layers: the loop layer shown in Table 2, the process step layer shown in Table 3, and the record layer shown in Table 4. The hierarchical relationship is as follows: loop layer > process step layer > record layer. The process step layer is a child of the loop layer, and the record layer is a child of the process step layer. The layers are associated with each other through the serial number of each layer.

[0028] Cycle number Charging capacity Discharge capacity efficiency 1 3.66260 3.62110 98.87 2 3.57155 3.49054 97.73

[0029] Table 2

[0030] Work step number Cycle number capacity energy 1 1 3.1639 11.98 2 1 0.4986 2.16 3 1 0 0 4 2 3.6210 12.79

[0031] Table 3

[0032] Record number Work step number Voltage Current 1 1 2.7134 1.3529 2 1 2.7218 1.3528 3 1 2.7258 1.3529 4 2 2.7291 1.3528 5 2 2.7321 1.3529 6 2 2.7348 1.3531 7 3 2.7374 1.3529 8 3 2.7398 1.3528 9 3 2.7422 1.3528 10 4 2.7445 1.3529 11 4 2.7467 1.3530 12 4 2.7488 1.3529

[0033] Table 4

[0034] The index data contains one or more index data units, and each index data unit contains multiple index records. These index data units are linked together using a linked list; that is, each index data unit is assigned an address pointer pointing to the address of the next index data unit. This allows multiple index data units to be connected, enabling the rapid extraction of all index data. Each index record in each index data unit includes the sequence number, parent sequence number, level, and file location, as shown in Table 1.

[0035] Application data includes one or more application data units, used to store multi-level data generated during battery charging and discharging; the index data units are linked to the next index data unit through address pointers; as shown in Table 5 below, the index data units correspond one-to-one with the application data units, that is, the index data unit is a fixed-size storage space used to store the index information of the application data units that follow; when an index data unit is full, a new index data unit storage space is created at the end of the current application data unit, that is, at the end of the current file, and the application data to be written continues to be written after the storage space of the new index data unit.

[0036] Index Data Unit 1 Application Data Unit 1 Index Data Unit 2 Application Data Unit 2 Index Data Unit 3 Application Data Unit 3

[0037] Table 5

[0038] like Figure 1 As shown, the generation method of multi-level data files is to first write application data and then update the index data table. In this embodiment, the data level of the loop layer is 1, the data level of the process layer is 2, and the data level of the record layer is 3. The specific generation method is as follows:

[0039] S1. Set the storage space size of a single index data unit of the multi-level data index based on the estimated size of the charge and discharge test data;

[0040] For example, if a test has 100,000,000 data entries, then the same number of index records need to be stored. In this case, the storage space of a single index data unit, i.e., the fixed length, can be set to 10,000. Then, there are a total of 100,000,000 / 1000 = 1,000 index data units in the data file.

[0041] The fixed storage space should not be too large or too small. If it is too large, more file space will be wasted; if it is too small, a full file scan may be required when extracting the index. Therefore, it should be set according to the actual amount of data used in the application.

[0042] S2. Write the test data generated during the charge and discharge test into the application data in the multi-level data, and write the index information of each test data into the index data unit of the multi-level data after writing each test data.

[0043] When writing to a multi-level data file, index information is written and application data is stored simultaneously. Assuming that the size of an index record is set to 32 bytes, the 1000 index data units set as described above will occupy 32000 bytes. This 32000-byte space is the space occupied by one index data unit in the multi-level data, and this space should not be overwritten when writing application data.

[0044] Preferably, after the storage space of the current index data unit is full, that is, after 1000 index records are written, if the remaining (100000000-1000) application data index information still needs to be written, a new storage space is allocated from the end of the current file as the second index data unit to store the index data. The size of the newly allocated storage space is also 32000 bytes. When writing the remaining application data, this space is skipped and written to the beginning, and so on.

[0045] Next, we begin writing application data into the multi-level data structure. Assuming we write a line of loop-level data at file position 323, the data will be as shown in Table 6 below:

[0046] Cycle number Charging capacity Discharge capacity efficiency 1 3.66260 3.62110 98.87

[0047] Table 6

[0048] Then, in the index data, update one piece of data as shown in Table 7. Since the loop layer is level 1, the parent sequence number is 0.

[0049]

[0050] Table 7

[0051] Assuming a line of process layer data is written at file position 525, the data will be as shown in Table 8 below:

[0052] Work step number Cycle number capacity energy 1 1 3.1639 11.98

[0053] Table 8

[0054] Then, in the index table, update one piece of data as shown in Table 9:

[0055]

[0056] Table 9

[0057] Since the cycle number of this step data is 1, the parent sequence number in the index table is 1.

[0058] Suppose a line of process layer data is written at file position 642, as shown in Table 10 below:

[0059] Record number Work step number Voltage Current 1 1 2.7134 1.3529

[0060] Table 10

[0061] Then, in the index table, update one piece of data as shown in Table 11:

[0062]

[0063] Table 11

[0064] Since the step number of this record layer data is 1, and the parent of the record layer is the step layer, the parent number in the index table is 1.

[0065] Repeat the above process to write data to all multiple layers.

[0066] After writing multi-level data to a file, the next step is to parse the multi-level data. The specific steps are as follows:

[0067] 1. Static rendering

[0068] 1.1 Open the multi-level data file. Based on the address pointers in each index data unit, extract the index records of all application data in the index data unit. Arrange all index records into a new tree-like data structure according to the parent sequence number and level. This data structure table is stored in memory and named TR. Because the index data occupies little space and does not require full file reading, this process is very fast. Extract the index data table into memory, convert it into a TR structure, and then delete the index structure table data from memory.

[0069] 1.2 Determine the initial interface size, row height, and column width.

[0070] Let the width of the current rendering interface be W, the height be H, the height of each row of data be RH, the maximum sum of column widths for each layer (loop layer, step layer, and record layer) be MW, and the total number of data rows be RT. Each layer of data is in an expanded state. Therefore, the total number of rows that can be rendered in the current interface is RC = H / RH. Starting from row 1, the TR structure is traversed, and each column of data in each row is rendered. When data for each row needs to be extracted, it can be quickly read from the file based on the file location of the TR structure. Rendering stops when row RC is reached, because rendering further would prevent the interface from displaying its content. When rendering each column, rendering stops when the total width of the rendered columns exceeds W, because rendering further to the right would also prevent the interface from displaying its content.

[0071] The above describes the process of the interface rendering data for the first time. Of course, the interface may need to involve operations such as scrolling horizontal and vertical scrollbars, expanding and collapsing child nodes to load more data, so the following dynamic rendering is required.

[0072] 2. Dynamic rendering

[0073] Assuming the horizontal scroll offset of the interface scrollbar is WO and the vertical scroll offset is HO, then the starting row for rendering is RS = HO / RH, and the ending row for rendering is RE = (HO+H) / RH. Traverse the TR structure, find all rows between RS and RE, and begin rendering these rows. While rendering each column from left to right, calculate the sum of the widths of the currently rendered columns (CT) in real time. If CT is less than WO or greater than WO+W, skip rendering and only render the portion that can be displayed on the interface.

[0074] Each time the screen scrolls, collapses, or changes in size, the calculation and rendering need to be recalculated and re-rendered to achieve a real-time dynamic rendering effect.

[0075] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0076] This application embodiment also provides a multi-level data generation system, including an application data generation module and an index data generation module. The application data generation module is used to store multi-level test data during the charge-discharge test process; the index data generation module is used to store multiple index information of each level of test data in the multi-level test data.

[0077] Preferably, the index data generation module includes one or more fixed-length index data units, each of which is linked to the next index data unit via an address pointer.

[0078] This application embodiment also provides a multi-level data dynamic rendering system, including an index data extraction module, a rendering start line calculation module, and a rendering end line calculation module. The index data extraction module is used to extract the index records of all application data according to the address pointer in each index data unit. The index records include the sequence number, parent sequence number, level, and the position of each charge / discharge test data in the file. The rendering start line calculation module is used to obtain the rendering start line RS according to the vertical scroll offset HO and the height RH of each line of data. The rendering end line calculation module is used to obtain the rendering end line RE according to the vertical scroll offset HO, the height H of the current rendering interface, and the height RH of each line of data.

Claims

1. A method for generating multi-level data, characterized by, Comprising the following steps: S1. Setting the size of the storage space of the single index data unit of the index data of the multi-level data according to the estimated size of the charge and discharge test data; the starting storage position of the index data unit is the position at the beginning of the file; the starting position of the storage space of the application data is located behind the index data unit; the index data is used to store the index information of each piece of charge and discharge test data; the application data is used to save the multi-level test data in the charge and discharge test process; S2. Writing the test data generated in the charge and discharge test process into the application data in the multi-level data, and writing the index information of each piece of test data into the index data unit of the multi-level data after writing each piece of test data; The application data in the multi-level data comprises a cycle layer, a step layer and a record layer; the layers are associated through the serial numbers of each layer; The data of the cycle layer is used to record the summary data of each charge and discharge cycle; the step layer is the child layer of the cycle layer, and the data of the step layer is used to record the summary information of each charge or discharge step; The record layer is the child layer of the step layer, and the data of the record layer is used to record the real-time test data; The structure of the multi-level data comprises: index data and application data, the index data comprises one or more index data units of fixed length; The application data comprises one or more application data units; Each index data unit comprises an address pointer for storing the storage address of the next index data unit, through which the position of the next index data unit in the file can be obtained; The index data unit comprises a plurality of index records, each index record comprising the serial number, parent serial number, layer and position in the file of each piece of charge and discharge test data; The index data unit corresponds to the application data unit one by one; the index data unit is a fixed-size storage space, which is used to save the index information of the corresponding application data unit after the index data unit; when an index data unit is full, a new storage space of the index data unit is opened at the end of the current application data unit, and the application data to be written is continued to be written after the storage space of the new index data unit.

2. The method of claim 1, wherein, Further comprising the following steps: S3. After the storage space of the current index data unit is full, a new storage space is opened at the end of the file as a new index data unit, and the size of the storage space of each index data unit is the same.

3. A multi-level data generating system employing the multi-level data generating method according to claim 1, characterized by Comprising an application data generation module and an index data generation module, the application data generation module is used to save the multi-level test data in the charge and discharge test process; the index data generation module is used to save a plurality of index information of each layer of test data in the multi-level test data.

4. The system for generating multiple hierarchical data of claim 3, wherein, The index data generation module comprises one or more index data units of fixed length, and each index data unit is linked with the next index data unit through an address pointer.

5. A method for dynamic rendering of multi-level data, characterized in that, extracting index records of all application data according to address pointers in each index data unit, the index records including serial numbers, parent serial numbers, levels, and positions of each piece of charge and discharge test data in a file; obtaining a starting row RS of rendering according to a vertical scroll offset HO and a height RH of each row of data; obtaining an ending row RE of rendering according to the vertical scroll offset HO, a height H of a current rendering interface, and the height RH of each row of data; obtaining all rows between the RS and the RE according to the extracted index records, and rendering the obtained row data; the structure of the multi-level data includes: index data and application data, the index data including one or more index data units of fixed length, used for storing serial numbers, parent serial numbers, levels, and positions of each piece of data in the application data; the application data including one or more application data units, used for storing multi-level data generated in a battery charging and discharging process; the index data units being linked to a next index data unit through an address pointer method; the index data units and the application data units being in one-to-one correspondence; the application data in the multi-level data includes a cycle layer, a step layer, and a record layer; the layers being associated through serial numbers of each layer; data of the cycle layer being used for recording summary data of each charging and discharging cycle; the step layer being a child of the cycle layer, and data of the step layer being used for recording summary information of each charging or discharging step; the record layer being a child of the step layer, and data of the record layer being used for recording real-time test data; the dynamic rendering method further includes: only loading index data of each multi-level data, and loading part of the charge and discharge test data according to the index data and a height and a width of a current rendering interface.

6. The method of claim 5, wherein, when rendering each column from left to right, calculating a sum CT of widths of columns that have been rendered in real time, and stopping rendering of subsequent columns when the CT is less than a horizontal scroll offset WO of an interface scroll bar or the CT is greater than the vertical scroll offset WO and a width W of a current rendering interface.

7. A dynamic rendering system of multi-level data using the dynamic rendering method of multi-level data of claim 5, wherein, the system includes an index data extraction module, a rendering starting row calculation module, and a rendering ending row calculation module, the index data extraction module being used for extracting index records of all application data according to address pointers in each index data unit, the index records including serial numbers, parent serial numbers, levels, and positions of each piece of charge and discharge test data in a file; the rendering starting row calculation module being used for obtaining a starting row RS of rendering according to a vertical scroll offset HO and a height RH of each row of data; and the rendering ending row calculation module being used for obtaining an ending row RE of rendering according to the vertical scroll offset HO, a height H of a current rendering interface, and the height RH of each row of data.

Citation Information

Patent Citations

  • Battery test data compression and storage method

    CN113485646A

  • Data rendering method and device, terminal and storage medium

    CN114327222A