Method for generating ultra-large document through test big data of battery management system for electric energy storage and storage medium

By employing multi-threading and dynamic routing technologies, and utilizing COM components and the OpenXML engine to collaboratively process battery management system test data, the problems of low report generation efficiency and high resource consumption in the field of power energy storage have been solved, achieving efficient and compatible report generation.

CN120822504APending Publication Date: 2025-10-21XUCHANG KETOP DETECTION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510919738.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-04
Publication Date
2025-10-21

AI Technical Summary

Technical Problem

Existing battery management systems for power energy storage suffer from low efficiency, high resource consumption, and difficulty in format control in their data storage and report generation methods, especially when dealing with big data and complex formats.

Method used

Using multi-threading and dynamic routing technology, the battery management system test data is divided into different parts, which are then processed collaboratively by a heterogeneous engine based on COM components and OpenXML to generate reports with complex formats and large data volumes, respectively.

Benefits of technology

It achieves efficient generation of complex formats and big data, improving report generation efficiency by approximately 35 times, with minimal resource consumption, meeting actual work needs, and offering high compatibility and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120822504A_ABST
    Figure CN120822504A_ABST
Patent Text Reader

Abstract

The invention discloses a method for generating a super-large document through test big data of a battery management system for electric energy storage and a storage medium, and relates to the field of electric energy storage. Analyzing the energy storage battery test data, and converting the energy storage battery test data into a data model of detection product basic information, a detection item summary sheet, item content, attachment data, a test equipment list and a picture file set; selecting a report template, starting multiple threads, and dividing a data model into two parts: the first part comprises basic information, an inspection item summary sheet, item content, a test equipment list and a picture file set, and the second part comprises attachment data and a picture file set; through dynamic routing selection, the first part of data is submitted to an engine 1 based on a COM component to generate a document, and the second part of data is submitted to an engine 2 based on OpenXML to generate a document; and synthesizing the document content, and returning a complete report. Contents with complex formats and small data volume are processed by the COM component, a large amount of chart data is processed by the OpenXML, and rapid generation of complex formats and big data is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of electric energy storage technology, and in particular to a data processing technology based on heterogeneous engine collaboration and dynamic routing, and specifically to a method and storage medium for generating ultra-large documents for battery management system test big data for electric energy storage. Background Art

[0002] With the advancement of energy transformation and the dual-carbon strategy, the scale of renewable energy power generation continues to expand, and the market demand for power storage systems is rapidly growing. As a core component of power storage systems, the safety, stability, and efficiency of battery management systems (BMS) are crucial. The new national standard GB / T34131-2023, which came into effect on October 1, 2023, imposes higher requirements on BMS test data collection, including stricter regulations on current, voltage, and temperature collection errors and sampling periods, resulting in a large amount of sampled data during testing.

[0003] Currently, mainstream data storage and report generation methods have obvious defects. For example, CN117277554A discloses an energy management system and method suitable for energy storage integrated devices, including: a model configuration file generation module: This module generates a model configuration file based on the communication protocols of the PCS, BMS, cooling system, fire protection system and other equipment in the energy storage integrated device and saves it to the sqlite3 database for subsequent data collection, edge computing, IoT cloud platform interaction and other steps. The generated model configuration file specifically includes: device model file dev_model_totalInfo.csv, remote control configuration file dev_model_yk.csv, remote adjustment configuration file dev_model_yt.csv, telemetry configuration file dev_model_yc.csv, remote signaling configuration file dev_model_yx.csv, all of which are character separated value files (CSV files). This energy storage management method stores data in csv files. If the data is converted to Word table format, the workload is huge and the automated report generation tool takes too long.

[0004] The two main existing methods for automatically generating Word documents also have shortcomings. Calling COM component interfaces to simulate Word operations relies on the Office application, resulting in high performance overhead, long processing time, and high system resource consumption when processing large amounts of data. Using third-party libraries to directly manipulate Word's underlying data structures is expensive, and open source libraries lack support for complex document operations and advanced features. This leads to high resource consumption and slow performance when processing large data charts.

[0005] Therefore, there is an urgent need for a report generation method that can efficiently process big data and take into account complex formats. Summary of the Invention

[0006] The present invention aims to overcome the shortcomings of existing technologies by providing a method and storage medium for generating very large documents from large data sets collected from battery management system tests for power storage. By parsing and converting test data, utilizing pre-set report templates, and employing multithreading and dynamic routing techniques, the data model is divided into distinct components, which are then collaboratively processed by heterogeneous engines based on COM components and OpenXML, achieving efficient generation of complex formats and large data sets. This method addresses existing issues such as low report generation efficiency, high resource consumption, and difficulty in format control, making it suitable for large data processing and report generation for battery management system tests in the power storage field.

[0007] The above-mentioned purpose of the present invention is achieved by the following technical means:

[0008] A method for generating a large document from large test data of a battery management system for electric energy storage comprises the following steps:

[0009] Parse the energy storage battery test data and convert it into a data model that contains at least one of the following: basic information of the tested product, a summary table of inspection items, item content, attachment data, a list of test equipment, and a set of image files;

[0010] Select the report template, enable multi-threading, and divide the data model into two parts:

[0011] The first part shall include at least one of the following: basic information, inspection item summary table, project content, test equipment list, and picture file set.

[0012] The second part includes at least one of the attachment data and the image file set;

[0013] Through dynamic routing, the first part of the data is handed over to the COM component-based engine 1 to generate a document, and the second part of the data is handed over to the OpenXML-based engine 2 to generate a document;

[0014] Combines the document contents generated by Engine 1 and Engine 2 and returns a complete report.

[0015] Furthermore, the steps of generating a document by the engine 1 include: calling Application to open the Word application, loading the template file, locating through the Bookmarks tag, inserting basic information and sample pictures, drawing a project summary table and a test equipment table, and controlling the dynamic numbering, title, paragraph, graphics and table drawing of the report body.

[0016] Furthermore, the step of generating a document by the engine 2 includes: calling WordprocessingDocument to open a Word document, obtaining the document body, and writing paragraphs, tables, and pictures;

[0017] When writing a paragraph, construct the Paragraph and Run structures and set the corresponding properties;

[0018] When drawing a table, build the Table structure, set TableProperties, dynamically calculate the table width and height, and build TableGrid, TableRow, and TableCell;

[0019] When writing an image, check the image validity, write the ImagePart, create a Drawing element and set the properties.

[0020] Furthermore, the basis for the dynamic routing selection is: the amount of data and the complexity of the format;

[0021] Route content with small data volume and complex format to Engine 1, and content with large data volume and fixed format to Engine 2.

[0022] Preferably, the dynamic numbering of the report body and the reference to the attachments are dynamically calculated according to the test items and generated content, and support the drawing of irregular tables and nested tables.

[0023] Preferably, the Paragraph structure includes ParagraphProperties for setting paragraph style; the Run structure includes RunProperties for setting text style.

[0024] Preferably, the Table structure includes TableProperties, TableGrid, TableRow and TableCell, TableGrid sets the table header, and TableRow and TableCell set the row and cell styles.

[0025] Preferably, the dynamic process is recorded during the document generation process and returned to the user, so that the user can understand the generation progress.

[0026] Preferably, the picture file set in the data model includes sample pictures and test-related pictures, and Engine 1 and Engine 2 insert pictures in their respective ways.

[0027] The present invention also discloses a computer-readable storage medium storing a computer program, which implements the method when executed by a processor.

[0028] The beneficial effects of adopting the above technical solution are:

[0029] 1. Through dynamic routing selection, content with complex formats and small amounts of data is handled by COM components that support fine control, and large amounts of chart data are processed by efficient OpenXML, achieving rapid generation of complex formats and large amounts of data, and efficient processing of complex formats and large amounts of data.

[0030] 2. The OpenXML method does not rely on Office applications, supports high concurrency, and can process data charts of about 500 pages at a speed about 35 times faster than existing technologies. It also takes up very few resources and is fast.

[0031] 3. COM components can accurately control complex formats, ensuring that the report style meets the template requirements, has good compatibility and high accuracy, and meets the document completeness requirements in actual work.

[0032] 4. Dynamic routing and heterogeneous engines work together to greatly improve the efficiency of automatic generation of energy storage battery test reports, reduce manual workload and improve work efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 It is a flowchart of the steps of the method for generating a very large document from big data of the battery management system test for power energy storage;

[0034] Figure 2 This is a schematic diagram of the document generation process of engine 1;

[0035] Figure 3 This is a schematic diagram of the document generation process of Engine 2;

[0036] Figure 4 It is a schematic diagram for generating the report body;

[0037] Figure 5 It is a schematic diagram of the process of generating documents by dynamic routing;

[0038] Figure 6 It is a dataset of the Open XML data structure commonly used in Word documents;

[0039] Figure 7 This is a complex table data set on page 3 / 571 in an exemplary very large document;

[0040] Figure 8 It is a big data dataset among exemplary very large documents. DETAILED DESCRIPTION

[0041] The following is a clear and complete description of the technical solutions in the embodiments of the present invention, in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts are within the scope of protection of the present invention.

[0042] Explanation of terms:

[0043] Electrochemical energy storage: electrochemical energy storage, a form of energy storage that uses electrochemical cells as energy storage carriers to store and release electrical energy through electrical energy conversion.

[0044] Battery management system: BMS, a device that monitors the battery's electrical, thermal and other parameters and has corresponding control, protection and communication functions.

[0045] COM: Microsoft Component Object Model, which defines a binary interoperability standard that can be used to create reusable software libraries that interact at run time.

[0046] OOXML: Office Open XML is an open, efficient and widely interoperable document format based on XML and ZIP compression technology. It was developed by Microsoft and is intended for the creation, editing, management and sharing of electronic documents. It was jointly approved by the International Organization for Standardization (ISO) and the International Electrotechnical Commission (IEC) as the ISO / IEC 29500 standard in 2008.

[0047] XML: Extensible Markup Language, used to store and transmit complex data structures, enables seamless data exchange between different systems and applications, clearly represents the hierarchy and relationships of data, intuitively expresses the meaning of data, and facilitates human reading and understanding.

[0048] Example 1. This example is an overall method example. Figure 1 and Figure 4 A method for generating a large document from large test data of a battery management system for electric energy storage is shown, comprising the following steps:

[0049] Parse the energy storage battery test data and convert it into a data model that contains at least one of the following: basic information of the tested product, a summary table of inspection items, item content, attachment data, a list of test equipment, and a set of image files;

[0050] Select the report template, enable multi-threading, and divide the data model into two parts:

[0051] The first part shall include at least one of the following: basic information, inspection item summary table, project content, test equipment list, and picture file set.

[0052] The second part includes at least one of the attachment data and the image file set;

[0053] Through dynamic routing, the first part of the data is handed over to the COM component-based engine 1 to generate a document, and the second part of the data is handed over to the OpenXML-based engine 2 to generate a document;

[0054] Combines the document contents generated by Engine 1 and Engine 2 and returns a complete report.

[0055] For example, the test data of a battery management system for power energy storage is analyzed using the method and steps of Example 1:

[0056] Step 1: Extract basic information about the test product, such as the product model BAU20C-BCU60M-BMU104P, as well as relevant data and attachments for each test item, such as a large amount of battery voltage test data, a test equipment list, and a collection of image files. Convert this data into a data model that includes basic information about the test product, a summary table of test items, item content, attachments, a list of test equipment, and a collection of image files.

[0057] Step 2: Select a report template and split the data model

[0058] Select the registered standard report template and enable multi-threading. Based on the characteristics of each part of the data model, the data model is divided into two parts: the first part is basic information, a summary table of inspection items, item content, a list of test equipment, and a collection of image files. This part includes basic information such as the product model, a summary and specific content of the inspection items, a list of equipment required for the test, and related images, such as product appearance images. The second part is the attachment data and image file collection. The attachment data includes a large amount of battery voltage inspection data, etc. The image file collection is the same as the first part, and contains relevant images taken during the test.

[0059] Step 3: Generate documents by different engines through dynamic routing

[0060] Through dynamic routing, the first portion of data is passed to Engine 1, a COM component, for document generation, while the second portion of data is passed to Engine 2, an OpenXML-based engine. Specifically, Engine 1 processes the first portion of data, which includes basic information and a summary of inspection items, while Engine 2 handles the second portion of data, which contains a large amount of attachments.

[0061] Step 4: Synthesize document content and return a complete report

[0062] After Engine 1 and Engine 2 complete their respective data processing and generate the corresponding document content, they synthesize the two parts of the document content and ultimately return a complete report containing 571 pages. The report covers all relevant information about the tested product and is formatted in accordance with the requirements of the selected report template.

[0063] In this embodiment, through the above steps, the entire process from energy storage battery test data analysis to ultra-large document generation is automated. By utilizing the advantages of multi-threading and different engines, and through dynamic routing and heterogeneous engine collaboration, the efficiency of complex format processing and big data generation is effectively balanced. The generated report meets the template requirements, and the overall generation time is significantly shortened compared with the existing technology.

[0064] The heterogeneous engine collaborative architecture of this embodiment combines the refined control capabilities of COM components with the efficient data processing capabilities of OpenXML. It solves the dual technical bottlenecks of "low efficiency of complex formats" and "insufficient big data resources" through dynamic routing, breaking through the performance shortcomings of existing single-engine solutions such as CSV energy storage management.

[0065] Example 2. This example is an example of engine 1 generating a document. Figure 2 and Figure 4 As shown, the steps of generating a document by the engine 1 include: calling Application to open the Word application, loading the template file, locating through the Bookmarks tag, inserting basic information and sample pictures, drawing a project summary table and a test equipment table, and controlling the dynamic numbering, title, paragraph, graphics and table drawing of the report body.

[0066] When generating the complex body of a report, Engine 1 calls the Word application instance to load the report template;

[0067] Use Bookmarks to locate the basic information area of ​​the report and insert basic information such as product model, working power supply (e.g. 24V), rated supply voltage (e.g. BCU is DC24V, BAU is DC24V), and a picture of the sample's appearance.

[0068] Locate the project summary table and test equipment table, draw the table row by row according to the inspection items and equipment list in the data model and the table style and format required by the template, and set the table's borders, alignment, font and other properties;

[0069] For the dynamic numbering of the report body, such as Appendix I: High Temperature Inspection, the numbers are dynamically calculated according to the order of the test items and the generated content; when drawing irregular tables, ensure that the table meets the requirements of the inspection items by adjusting the merging and splitting of cells, and at the same time control the title font, paragraph indentation and line spacing, etc.

[0070] This embodiment can precisely control the format of complex documents, ensuring the aesthetics and standardization of reports, meeting the strict requirements of filing templates. The handling of dynamic numbering and irregular tables ensures the logic and accuracy of report content, and the document has good compatibility and consistent display across different devices and software environments.

[0071] Example 3. This example is an example of engine 2 generating a document. Figure 3-4 As shown, the steps of generating a document by the engine 2 include: calling WordprocessingDocument to open a Word document, obtaining the document body, and writing paragraphs, tables, and pictures;

[0072] When writing a paragraph, construct the Paragraph and Run structures and set the corresponding properties;

[0073] When drawing a table, build the Table structure, set TableProperties, dynamically calculate the table width and height, and build TableGrid, TableRow, and TableCell;

[0074] When writing an image, check the image validity, write the ImagePart, create a Drawing element and set the properties.

[0075] When processing the large amount of data from Appendix A: Battery Voltage Test, Engine 2 calls WordprocessingDocument to open a blank Word document and obtain the MainDocumentPart.Document.Body element.

[0076] When writing a paragraph, construct the Paragraph structure, set the ParagraphProperties to Fangsong font, normal paragraph spacing and other properties, construct the Run structure, set the RunProperties to bold, and write the text "Appendix A: Battery Voltage Test";

[0077] Draw a table of battery voltage test data, build a Table structure, set TableProperties to fixed column widths, and dynamically calculate the table's width and height to accommodate the data content; build a TableGrid, set the width ratio of each column; build a TableRow, set the row height and alignment, write TableCells row by row, set the cell borders and background colors, and arrange data from multiple tests neatly by column;

[0078] When writing an image, check the validity of the image file, write the image of the voltage test equipment taken during the experiment into the ImagePart, create a Drawing element, set the image's width, height, wrapping mode and other properties, and write descriptive text below the image.

[0079] like Figure 6 Shows a set of commonly used Open XML data structures for Word documents;

[0080] The following is an example of the Paragraph data structure:

[0081] <w:p

[0082] w:rsidR="00882366"w:rsidRDefault="00882366"w14:paraId="6157F713"w14:textId="77777777"xmlns:w14="http: / / schemas.microsof

[0083] t.com / office / word / 2010 / wordml"xmlns:w="http: / / schemas.openxmlformats.org / wordprocessingml / 2006 / main">

[0084] <w:r>

[0085] <w:rpr>

[0086] <w:rFonts w:ascii="FangSong" w:hAnsi="FangSong" w:eastAsia="FangSong" / >

[0087] <w:b / >

[0088] < / w:rpr>

[0089] <w:t> Appendix I: High Temperature Inspection< / w:t>

[0090] < / w:r>

[0091] .

[0092] The following is an example of the Table data structure:

[0093] <w:tbl

[0094] xmlns:w="http: / / schemas.openxmlformats.org / wordprocessingml / 2006 / main">

[0095] <w:tblpr>

[0096] <w:tblW w:w="0"w:type="auto" / >

[0097] <w:tblborders>

[0098] <w:tblLayout w:type="fixed" / >

[0099] <w:tblLook w:val="04A0"w:firstRow="1"w:lastRow="0"w:firstColumn="1"w:lastColumn="0"w:noHBand="0"w:noVBand="1" / >

[0100] < / w:tblborders> < / w:tblpr>

[0101] <w:tblgrid>

[0102] <w:gridCol w:w="1196" / >

[0103] <w:gridCol w:w="986" / >

[0104] <w:gridCol w:w="952" / >

[0105] <w:gridCol w:w="952" / >

[0106] <w:gridCol w:w="986" / >

[0107] <w:gridCol w:w="952" / >

[0108] <w:gridCol w:w="952" / >

[0109] <w:gridCol w:w="986" / >

[0110] <w:gridCol w:w="952" / >

[0111] <w:gridCol w:w="952" / >

[0112] < / w:tblgrid>

[0113] <w:tr

[0114] w:rsidR="00882366" w14:paraId="5830114A" w14:textid="77777777" xmlns:w14="http: / / schemas.microsoft.com / office / word / 2010 /

[0115] wordml">

[0116] <w:tr

[0117] w:rsidR="00882366" w14:paraId="1481E0D6" wl4:textId="77777777" xmlns:wl4="http: / / schemas.microsoft.com / office / word / 2010 /

[0118] wordml">

[0119] <w:tr

[0120] w:rsidR="00882366" w14:paraId="47C0F2FB" w14:textid="77777777" xmlns:w14="http: / / schemas.microsoft.com / office / word / 2010 /

[0121] wordml">

[0122] <w:tr

[0123] w:rsidR="00882366" w14:paraId="0DBB6892" w14:textid="77777777" xmlns:w14="http: / / schemas.microsoft.com / office / word / 2010 /

[0124] wordml">

[0125]

[0126] The example of the Run data structure is as follows:

[0127] <w:r>

[0128] <w:rpr>

[0129] <w:rFonts w:ascii="FangSong" w:hAnsi="FangSong" w:eastAsia="FangSong" / >

[0130] <w:b / >

[0131] < / w:rpr>

[0132] <w:t> Appendix I: High Temperature Inspection< / w:t>

[0133] < / w:r> 。

[0134] This embodiment does not rely on Office applications and is extremely fast when processing large data tables. Taking the generation of a 16-page table containing a large amount of voltage test data as an example, the time consumption is greatly reduced and the resource usage is small compared with the existing third-party library method. It can still maintain stable and efficient generation capabilities in high-concurrency scenarios, and the generated table has a clear structure and accurate data.

[0135] Example 4. This example is a dynamic routing example. Figure 4-5 As shown, the basis for the dynamic routing selection is: data volume and format complexity;

[0136] Route content with small data volumes and complex formats to Engine 1, and content with large data volumes and fixed formats to Engine 2;

[0137] In a certain report generation task, the data model includes the first part, which includes basic product information, such as a 500-word text, three images, and a summary table of inspection items, such as a complex table containing 10 items; and the second part, which includes attachment data, such as a table containing 1,000 sets of voltage test data, approximately 500 pages.

[0138] The system uses a preset dynamic routing algorithm to analyze the volume and format complexity of each part of the data;

[0139] The first part has less content data, but contains complex formatting requirements such as picture insertion, complex table drawing, and dynamic numbering;

[0140] The second part contains a large amount of data, but the table format is fixed, mainly consisting of repeated arrangements of data;

[0141] Based on the analysis results, the first part is routed to Engine 1, which uses the fine control capabilities of COM components to process complex formats; the second part is routed to Engine 2, which uses the efficiency of OpenXML to process large amounts of data.

[0142] For example, according to the method steps of this embodiment, the following can be generated: Figure 7 The complex table in the large document shown is the data set content on page 3 / 571, such as Figure 8 The content of the big data dataset on page 16 / 571 in the very large document shown.

[0143] This embodiment achieves a rational allocation of heterogeneous engines, leveraging the strengths of each. Engine 1, while slower when processing complex formats, ensures format accuracy; Engine 2, faster when processing large data volumes, uses fewer resources. Working together, these two engines reduce report generation time by approximately 70% compared to a single-engine approach, while also ensuring document quality.

[0144] Example 5. This example is an example of dynamic numbering and table drawing of the report text. Figure 4 As shown, the dynamic numbering of the report body and the reference to the attachments are dynamically calculated according to the test items and generated content, and support the drawing of irregular tables and nested tables.

[0145] For example, in the report body, there are multiple inspection items, such as the sensor probe test temperature range, the number of battery cell voltage acquisition channels, etc. For each inspection item, a number needs to be dynamically generated, such as "1. Sensor probe test temperature range (°C)", "2. Battery cell voltage acquisition channels", etc. The number is automatically generated according to the order of the items in the data model;

[0146] When drawing tables containing inspection items and requirements, measurement or observation results, and judgments, irregular table structures may exist, such as when some rows require merging cells to represent item groupings. Engine 1 uses the COM component's object model to control the merging and splitting of tables on a row-by-row and cell-by-cell basis, setting the vertical alignment and border style of cells to ensure that the table meets the template requirements.

[0147] In this embodiment, dynamic numbering ensures that the report content is clear and easy to consult and reference. The precise drawing of irregular tables meets the display requirements of complex inspection items, enabling the report to intuitively present test data and results, thereby improving the readability and professionalism of the report.

[0148] Example 6. This example is a Paragraph structure setting example. The Paragraph structure includes ParagraphProperties, which is used to set the paragraph style; the Run structure includes RunProperties, which is used to set the text style.

[0149] For example, when Engine 2 generates paragraphs in the report body, for the title "Product Information", a Paragraph structure is constructed, and ParagraphProperties is set to center alignment, 12 points of spacing before paragraphs, and 6 points of spacing after paragraphs; a Run structure is constructed, and RunProperties is set to bold, size 2 font, and bold, and the "Product Information" text is written; for the body content "The battery management system for electric energy storage with model BAU20C-BCU60M-BMU104P consists of the following components:", a Paragraph structure is constructed, and ParagraphProperties is set to first line indent 2 characters and line spacing 1.5 times; a Run structure is constructed, and RunProperties is set to Fangsong, size 4 font, and the body text is written.

[0150] In this embodiment, by setting the properties of the Paragraph and Run structures, fine control over paragraph and text styles is achieved, so that the title and content of the report body are clearly structured, complying with the requirements of official document format, and improving the standardization and aesthetics of the report.

[0151] Example 7. This example is a Table structure setting example. The Table structure includes TableProperties, TableGrid, TableRow and TableCell. TableGrid sets the table header, and TableRow and TableCell set the row and cell styles.

[0152] Consider the commonly used Open XML data structure tables in Word documents described in Example 2. For example, when rendering a battery voltage test data table, Engine 2 constructs a Table structure, sets TableProperties to allow row breaks across pages and center the table; constructs a TableGrid, sets six GridColumns based on the number of data columns, and sets column widths to 10%, 15%, 15%, 15%, 15%, and 30%, respectively; constructs a TableRow, and sets TableRowProperties to a fixed row height of 15 points; for each data row, constructs a TableCell, sets TableCellProperties to vertically and horizontally center, and writes data such as the applied value, displayed value, and error. For error data rows that need to be highlighted, set the TableCell background color to light yellow.

[0153] In this embodiment, the detailed Table structure setting makes the generated big data table neat and orderly, and the data is easy to view and compare. By controlling the row height, column width and cell style, the reasonable layout of the table on the page is ensured, and good readability and visual effects can be maintained even when containing a large amount of data.

[0154] Example 8. This example is a dynamic process recording example. During the document generation process, the dynamic process is recorded and returned to the user, so that the user can understand the generation progress.

[0155] During the document generation process, the system records the status and progress of each stage in real time, such as the completion of data parsing, successful template loading, the number of pages when engine 1 starts processing the first part of data, and the number of pages when engine 2 processes the second part of data.

[0156] These dynamic process information are returned to the user in real time through the user interface, and the user can see the current generation progress percentage, the amount of data processed, error prompt information, etc. on the interface.

[0157] In this embodiment, users can grasp the entire process of document generation in real time, which enhances the user's controllability and confidence in system operation. When generation anomalies occur, users can quickly locate the problem based on the recorded dynamic process, improving the system's usability and reliability.

[0158] Example 9. This example is an example of processing a picture file set. The picture file set in the data model includes sample pictures and test-related pictures. Engine 1 and Engine 2 insert pictures in their respective ways.

[0159] The image file set in the data model includes front, side, and back images of the battery management system sample, as well as device connection images taken during the test;

[0160] for example,

[0161] When processing the sample image, Engine 1 inserts the image into the specified position of the report through the InsertPicture method of the COM component, sets the image zoom ratio to 80%, and the wrapping mode to four-way wrapping to ensure that the image and text content are properly matched;

[0162] When processing the test equipment picture, Engine 2 writes the picture into ImagePart, creates a Drawing element, sets the picture width to 10 cm and height to 8 cm, aligns it in the center, and writes the description text "Figure Test Equipment Connection Diagram" below the picture.

[0163] In this embodiment, the image processing methods of different engines meet their respective functional requirements. Engine 1 can flexibly control the layout and style of images in complex format documents, and Engine 2 can efficiently process a large number of images in batches, ensuring the accurate insertion and display of images in big data documents, thereby enhancing the intuitiveness and persuasiveness of the report.

[0164] Embodiment 10. This embodiment shows a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the method described in embodiments 1-9 is implemented.

[0165] for example,

[0166] Compile a computer program that implements the method of the present invention into an executable file and store it in a computer-readable storage medium such as a USB flash drive, a hard disk, or a CD;

[0167] When the user needs to generate a report, the storage medium is inserted into the computer, and the program is installed and run. The program executes the method steps described in Examples 1-9 through the processor to complete operations such as analysis of the test data, document generation and synthesis.

[0168] In this embodiment, the computer-readable storage medium enables the method of the present invention to be easily deployed and used on different computer devices, or to log into cloud services, thereby improving the method's portability and versatility. Users can quickly access or log into a cloud service account and use the program through the storage medium, eliminating the need for redevelopment, thus reducing usage costs and technical barriers.

[0169] The above disclosure is only the preferred embodiment of the present invention, which certainly cannot be used to limit the scope of the present invention. Therefore, equivalent changes made according to the scope of the patent application of the present invention are still within the scope of the present invention.

Claims

1. A method for generating a large document from large test data of a battery management system for electric energy storage, characterized in that: The following steps are involved: Parse the energy storage battery test data and convert it into a data model that contains at least one of the following: basic information of the tested product, a summary table of inspection items, item content, attachment data, a list of test equipment, and a set of image files; Select the report template, enable multi-threading, and divide the data model into two parts: The first part shall include at least one of the following: basic information, inspection item summary table, project content, test equipment list, and picture file set. The second part includes at least one of the attachment data and the image file set; Through dynamic routing, the first part of the data is handed over to the COM component-based engine 1 to generate a document, and the second part of the data is handed over to the OpenXML-based engine 2 to generate a document; Combines the document contents generated by Engine 1 and Engine 2 and returns a complete report.

2. The method according to claim 1, characterized in that The steps of the engine 1 generating a document include: calling Application to open the Word application, loading the template file, locating through the Bookmarks tag, inserting basic information and sample pictures, drawing a project summary table and a test equipment table, and controlling the dynamic numbering, title, paragraph, graphics and table drawing of the report body.

3. The method according to claim 1, characterized in that The steps of generating a document by the engine 2 include: calling WordprocessingDocument to open a Word document, obtaining the document body, and writing paragraphs, tables, and pictures; When writing a paragraph, construct the Paragraph and Run structures and set the corresponding properties; When drawing a table, build the Table structure, set TableProperties, dynamically calculate the table width and height, and build TableGrid, TableRow, and TableCell; When writing an image, check the image validity, write the ImagePart, create a Drawing element and set the properties.

4. The method according to claim 1, wherein The basis for the dynamic routing selection is: data volume and format complexity; Route content with small data volume and complex format to Engine 1, and content with large data volume and fixed format to Engine 2.

5. The method according to claim 2, characterized in that The dynamic numbering of the report body and the reference to the attachments are dynamically calculated according to the test items and generated content, and support the drawing of irregular tables and nested tables.

6. The method according to claim 3, characterized in that The Paragraph structure includes ParagraphProperties, which is used to set the paragraph style; the Run structure includes RunProperties, which is used to set the text style.

7. The method according to claim 3, characterized in that The Table structure includes TableProperties, TableGrid, TableRow and TableCell. TableGrid sets the table header, and TableRow and TableCell set the row and cell styles.

8. The method according to claim 1, characterized in that During the document generation process, the dynamic process is recorded and returned to the user, so that the user can understand the generation progress.

9. The method according to claim 1, characterized in that The image file set in the data model includes sample images and test-related images, and Engine 1 and Engine 2 insert images in their respective ways.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • Energy management system and method suitable for energy storage all-in-one machine

    CN117277554A