Method and device for generating historical operation curve of energy storage management system

By using dynamic SQL generation and modular architecture, the system solves the problems of flexibility and efficiency in data querying and display in energy storage management systems, and achieves efficient and intelligent generation of historical operating curves, thereby improving system performance and user experience.

CN121542319APending Publication Date: 2026-02-17XIAMEN LIANGDAO ENERGY DEVELOPMENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511654783.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-12
Publication Date
2026-02-17

AI Technical Summary

Technical Problem

Existing energy storage management systems suffer from insufficient flexibility in data querying and display, low query efficiency, lack of intelligent design, and poor scalability, resulting in inadequate data analysis efficiency and intelligence.

Method used

A dynamic SQL generation method is adopted to dynamically generate SQL query statements based on the data fields and time intervals selected by the front-end user. Combined with timestamp sorting and device identifier grouping, historical operation curves are generated, and efficient data processing and intelligent display are achieved through a modular architecture.

Benefits of technology

It improves the flexibility and targeting of data queries, optimizes data processing efficiency, enhances the system's usability and user experience, realizes the system's versatility and scalability, and reduces operation and maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121542319A_ABST
    Figure CN121542319A_ABST
Patent Text Reader

Abstract

The invention discloses a method and a device for efficiently and intelligently generating a historical operation curve of an energy storage management system. The method comprises the following steps: receiving a data field, a device identifier and a time interval selected by a front-end user; dynamically generating an SQL (Structured Query Language) query statement through a field mapping table and a triple check mechanism based on the data field and the time interval; when the time interval crosses the day, obtaining historical operation data by adopting a time slice and parallel query strategy; the data is efficiently organized through a one-time sorting and sequence grouping algorithm; and finally generating a historical operation curve supporting multi-field superposition and linkage analysis. According to the method, the accuracy and continuity of curve generation are ensured through an optimized data organization mode; parallel processing and comparative analysis of data of multiple devices are supported, and the efficiency of visualization of historical data of the energy storage management system and the user experience are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing, and in particular to a method and apparatus for generating historical operating curves of an energy storage management system. Background Technology

[0002] With the rapid development of new energy power generation and energy storage power stations, energy storage management systems are playing an increasingly important role in operation monitoring, energy dispatch, and safety management. The massive amounts of historical data generated during system operation, such as voltage, current, power, SOC, SOH, and temperature, have become crucial for equipment condition assessment, lifespan prediction, anomaly diagnosis, and operational strategy optimization. Currently, energy storage management systems generally use fixed-field queries and static report generation to display historical operating data, with the front end primarily presenting it in the form of graphs or tables.

[0003] However, as energy storage sites expand in scale and operational scenarios become more complex, this traditional approach has revealed numerous limitations: Existing technologies have fixed and rigid field configurations, failing to dynamically select and combine data fields based on front-end needs, resulting in insufficient query flexibility; when faced with large-scale data queries across devices and time periods, traditional methods require repeated database access and data filtering, leading to low query efficiency and difficulty in meeting real-time analysis requirements; simultaneously, existing solutions only provide basic data query and curve plotting functions, lacking intelligent interface design and dynamic adaptation mechanisms, failing to support accurate and efficient data display needs; furthermore, when the number of device types increases or application scenarios change, the system lacks good scalability, requiring reconstruction of field configurations and report templates, increasing system maintenance costs and limiting usability. These shortcomings severely restrict the efficiency and intelligence level of data analysis in energy storage management systems.

[0004] Therefore, how to improve the efficiency and intelligence level of data analysis in energy storage management systems is a problem that needs to be solved by those skilled in the art. Summary of the Invention

[0005] This invention provides a method and apparatus for generating historical operating curves of an energy storage management system, which can improve the efficiency and intelligence level of data analysis in the energy storage management system.

[0006] The first aspect of this invention provides a method for generating historical operating curves of an energy storage management system, comprising: Receive at least one data field selected by the front-end user, at least one device identifier, and at least one time interval; Dynamically generate SQL query statements based on data fields and time intervals; Execute an SQL query to retrieve the corresponding historical running data from the time interval; Historical operational data is sorted in ascending order by timestamp and grouped by device identifier; Historical operation curves are generated based on the grouped historical operation data.

[0007] Optionally, SQL query statements can be dynamically generated based on data fields and time intervals, including: The data fields are validated for legality and semantic consistency based on a pre-defined field mapping table. Map the validated data fields to the actual column names in the database; Construct an SQL query statement by combining the actual column names and time ranges.

[0008] Optionally, the data fields are subjected to validity and semantic consistency checks based on a preset field mapping table, including: The data fields are whitelisted based on the field mapping table. If a data field is included in the predefined set of allowed query fields, then the data field is determined to have passed the whitelist verification. Based on the field mapping table, perform type matching verification on the data fields that have passed the whitelist verification. If the semantic type of the data field that has passed the whitelist verification is compatible with the type of the requested SQL operation, then the data field is determined to have passed the type matching verification. Based on the field mapping table, perform operation constraint validation on the data fields that pass the type matching validation. If the data field that passes the type matching validation is authorized to participate in the construction of specific SQL functions, conditions, or expressions, then the data field is determined to be a valid data field.

[0009] Optionally, when the time interval spans multiple days, the executed SQL query retrieves the corresponding historical execution data from within the time interval, including: Divide the time interval into multiple time segments according to a preset time granularity; Generate multiple subquery statements corresponding to multiple time segments; Multiple subquery statements are executed in parallel to obtain corresponding portions of historical execution data, resulting in multiple portions of historical execution data. The historical running data is obtained by aggregating and sorting multiple parts of historical running data in memory.

[0010] Optionally, historical operational data can be sorted in ascending order by timestamp and grouped by device identifier, including: Sort the historical running data in ascending order based on the timestamp field to obtain a sorted list of data. The sorted data list is traversed sequentially. When two adjacent data items are found to have different device identifiers, the preceding data is divided into an independent data group. By sequentially traversing the sorted data and grouping it according to device identifiers, the historical operation data of the grouped data can be obtained.

[0011] Optionally, before generating historical operating curves based on the grouped historical operating data, the method further includes data optimization of the historical operating data, and the data optimization steps include at least one of the following: Fill or mark empty values ​​in historical operation data; Identify and remove outliers from historical operational data; Smooth historical operational data.

[0012] Optionally, historical operating curves are generated based on the grouped historical operating data, including: Based on the grouped historical running data, generate corresponding curves for the data fields in the same coordinate system; Overlay the curves corresponding to the data fields for display; Establish the linkage relationship between the curves corresponding to the data fields; Historical operating curves are generated by overlaying and linking data.

[0013] Optionally, the method further includes: The historical operating curves and their associated time intervals and device identifiers are stored in the database; Build an index to support the retrieval of historical operating curves based on time intervals and device identifiers.

[0014] A second aspect of the present invention provides an apparatus for generating historical operating curves of an energy storage management system, comprising: The front-end interaction unit is used to receive at least one data field, at least one device identifier, and at least one time interval selected by the front-end user. The dynamic SQL generation unit is used to dynamically generate SQL query statements based on data fields and time intervals. The data acquisition unit is used to execute SQL query statements and obtain the corresponding historical running data from the time interval. The data processing unit is used to sort historical operation data in ascending order by timestamp and group it by device identifier; The curve generation unit is used to generate historical running curves based on the grouped historical running data.

[0015] A third aspect of the present invention provides a device for generating historical operating curves of an energy storage management system, comprising: One or more processors; A memory on which one or more programs are stored; When the one or more programs are executed by the one or more processors, the one or more processors implement the method for generating historical operating curves of the energy storage management system as described in any of the above.

[0016] A fourth aspect of the present invention provides a computer storage medium for storing a program, which, when executed, is used to implement the method for generating historical operating curves of an energy storage management system as described in any of the preceding claims.

[0017] The method and system for generating historical operating curves for energy storage management systems provided by this invention, through the innovative use of dynamic SQL generation, efficient data organization, and intelligent curve generation mechanisms, brings the following significant benefits: This approach enhances the flexibility and targeting of data queries. By receiving user-selected data fields, device identifiers, and time ranges, and dynamically generating SQL query statements based on these selections, it achieves complete customization of query conditions. This method breaks the limitations of traditional fixed-field query patterns, allowing users to flexibly combine query conditions according to specific analytical needs, significantly improving the relevance and practicality of queries.

[0018] Data processing efficiency and system performance were optimized by sorting historical operational data in ascending order by timestamp and grouping it by device identifier, establishing a standardized data processing workflow. This data organization method not only ensured the accuracy and continuity of curve generation but also significantly improved data processing efficiency, laying a solid foundation for subsequent curve generation.

[0019] This method enhances the system's usability and user experience by generating operational curves based on grouped historical operating data, allowing users to intuitively understand the device's operating status and trend changes. It supports parallel processing and comparative analysis of multi-device data, providing users with more comprehensive and in-depth data insights, significantly improving user experience and decision-making efficiency.

[0020] The technical solution proposed in this invention achieves versatility and scalability. It does not depend on a specific hardware environment or database system, exhibiting excellent versatility and adaptability. Furthermore, the modular design makes the system easy to maintain and expand, enabling it to adapt to the needs of energy storage management systems of varying scales and complexities.

[0021] The system's response speed and resource utilization have been improved. By optimizing query generation and data processing flows, unnecessary data transmission and processing overhead have been reduced, thus increasing system response speed. The efficient data organization method also reduces system resource consumption, enabling the processing of larger datasets with limited hardware resources.

[0022] The combination of these beneficial effects makes this invention of significant application value in the field of energy storage management systems, effectively improving system performance, reducing operation and maintenance costs, and providing users with a better data service experience. Attached Figure Description

[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0024] Figure 1 A flowchart illustrating a method for generating historical operating curves of an energy storage management system, provided in an embodiment of the present invention. Figure 2 A schematic diagram of the structure of a device for generating historical operating curves of an energy storage management system provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of a device for generating historical operating curves of an energy storage management system, provided in an embodiment of the present invention. Detailed Implementation

[0025] This invention provides a method and apparatus for generating historical operating curves of an energy storage management system, which can improve the efficiency and intelligence level of data analysis in the energy storage management system.

[0026] See Figure 1 This figure is a schematic flowchart of a method for generating historical operating curves of an energy storage management system according to an embodiment of the present invention. The method for generating historical operating curves of an energy storage management system according to an embodiment of the present invention can be implemented, for example, through the following steps S101-105.

[0027] S101: Receive at least one data field, at least one device identifier, and at least one time interval selected by the front-end user.

[0028] In this embodiment of the invention, users can select one or more historical operating indicator fields (such as SOC, power, voltage, current, voltage difference, temperature difference, maximum / minimum voltage, maximum / minimum temperature, events, etc.) on the front-end interface; users can select any time period or multiple time intervals to query historical data; it supports selecting one or more devices by device identifier, flexibly controlling the data range.

[0029] S102: Dynamically generate SQL query statements based on data fields and time intervals.

[0030] In this embodiment of the invention, the data fields are validated for legality and semantic consistency according to a preset field mapping table; the validated data fields are mapped to real column names in the database; and SQL query statements are constructed by combining the real column names and time intervals.

[0031] The data fields are whitelisted based on the field mapping table. If a data field is included in the predefined set of allowed query fields, it is determined that the data field has passed the whitelist verification. The data fields that have passed the whitelist verification are then subjected to type matching verification based on the field mapping table. If the semantic type of the data field that has passed the whitelist verification is compatible with the requested SQL operation type, it is determined that the data field has passed the type matching verification. The data fields that have passed the type matching verification are then subjected to operation constraint verification based on the field mapping table. If the data field that has passed the type matching verification is authorized to participate in the construction of specific SQL functions, conditions, or expressions, it is determined that the data field has passed the verification.

[0032] Specifically, the backend receives the field list from the frontend and automatically adds timestamp and device identifier fields as the query basis. It dynamically generates query statements based on the fields selected by the frontend, supporting multi-table and multi-field joins; it automatically verifies whether the user-selected fields are included in the allowed query field set, ensuring data query security and integrity.

[0033] This invention achieves field-level security verification and semantic consistency guarantee throughout the entire process from field selection to SQL concatenation by introducing a field mapping table and a triple verification mechanism (whitelist verification, type matching verification, and operation matrix constraints) in the backend.

[0034] Specifically, after receiving the list of fields from the front end, the system first verifies the validity and permissions of the fields based on the field mapping table to ensure that the fields have been registered in the system and have access permissions. Secondly, it matches and verifies the semantic type and operation type (such as aggregation, grouping, filtering, etc.) of the fields to ensure that only fields that conform to the semantic rules are allowed to participate in the corresponding SQL operations. Finally, it uses an operation matrix constraint mechanism to prevent the fields from being used incorrectly in non-compliant functions, conditions, or expressions.

[0035] Fields that pass triple validation will be securely mapped to real column names in the database and populated with query conditions through parameterized binding, fundamentally preventing SQL injection risks while ensuring that the query logic is consistent with the semantics of the field definition.

[0036] To address the performance bottlenecks that may arise from multi-table joins and multi-day data queries during dynamic SQL generation, this invention proposes a high-performance dynamic query strategy based on time sharding and parallel execution. When the query time range spans multiple days, it automatically segments the query based on the time field, dividing the overall query interval into multiple independent time segments at the hourly granularity (e.g., 2-hour or 4-hour time windows). Each time segment corresponds to a subquery task, retrieving only data within that time range. Simultaneously, based on the table to which the field belongs and the characteristics of the data domain, complex multi-table join operations are broken down into several single-table or lightweight join queries. All time segment and sub-table query tasks are run in parallel through a thread pool or asynchronous execution framework, fully utilizing multi-core computing resources to achieve high-throughput query execution across time periods. After task execution, the result set is aggregated, sorted, and merged in memory based on a unified primary key (such as device number, BMS identifier, or sampling time), thereby achieving unified integration of multi-time period and multi-table data at the logical layer, avoiding large-scale JOIN operations at the database level, and significantly reducing database load and lock contention.

[0037] S103: Execute an SQL query statement to retrieve the corresponding historical running data from the time interval.

[0038] In this embodiment of the invention, when the time interval spans multiple days, the time interval is divided into multiple time segments according to a preset time granularity; multiple sub-query statements are generated for the multiple time segments; the multiple sub-query statements are executed in parallel to obtain the corresponding partial historical running data, thereby obtaining multiple partial historical running data; the multiple partial historical running data are aggregated and sorted in memory to obtain historical running data.

[0039] Specifically, based on the user-selected time range, the system automatically segments the target time period into time intervals with fixed time granularity (such as every 2 or 3 hours), thereby breaking down large-scale daily data into multiple independent sub-interval query tasks. Queries for each time period are executed in parallel on the backend, avoiding response delays caused by a single full scan.

[0040] S104: Sort historical operation data in ascending order by timestamp and group it by device identifier.

[0041] In this embodiment of the invention, the historical running data is sorted in ascending order according to the timestamp field to obtain a sorted data list; the sorted data list is traversed sequentially, and when two adjacent data are detected to have different device identifiers, the preceding data is divided into an independent data group; the sorted data is grouped according to the device identifier by sequential traversal to obtain the grouped historical running data.

[0042] Specifically, the system performs time interval grouping, grouping query results according to the time interval selected by the user to ensure that data from different time periods are processed independently; device grouping: data is grouped according to device to ensure that historical data from each device is generated into curves independently; and time ascending sorting: each group of data is sorted in ascending order by timestamp to ensure the continuity of curve generation and the consistency of time sequence.

[0043] During the data loading phase, the data is sorted in ascending order according to the timestamp field of the query results to ensure the continuity of data for the same device on the timeline. Subsequently, a sequential grouping strategy is adopted, which traverses the sorted results in the order in which records appear. When a change in device identifier is detected, the grouping boundary is switched immediately, so that the data grouping of all devices can be completed in a single linear traversal.

[0044] Compared with traditional grouping methods that involve item-by-item comparison and conditional judgment, this invention achieves embedded execution of grouping logic through a combination of sorting and sequential grouping, reducing the time complexity from the traditional O(n²) to O(nlogn), while avoiding the overhead of frequent conditional judgments and object creation.

[0045] In typical scenarios (approximately 8,640 samples per day per device, with multiple devices querying in parallel), this invention can complete data grouping and time sorting within hundreds of milliseconds. Compared to traditional methods of filtering one item at a time and scanning multiple times, the response time is reduced by approximately 70%, memory usage is reduced by approximately 50%, and the overall performance and scalability of real-time curve generation and multi-device comparative analysis are significantly improved.

[0046] S105: Generate historical operation curves based on the grouped historical operation data.

[0047] In this embodiment of the invention, based on the grouped historical running data, corresponding curves are generated for the data fields in the same coordinate system; the curves corresponding to the data fields are superimposed and displayed; the linkage relationship between the curves corresponding to the data fields is established; and historical running curves are generated through superimposed display and linkage relationship.

[0048] Specifically, a backend field mapping table is established to map database fields to business metrics, resulting in a field mapping table; dynamic data extraction is performed, extracting corresponding data from the query results based on the fields selected by the front end, forming a multidimensional data list that can be used for curve plotting; line charts are generated, producing multidimensional line charts of the extracted data according to time series, supporting single-dimensional or multi-dimensional overlay display; this invention supports the linkage analysis of different field curves, such as the synchronous display and trend comparison of SOC and power curves.

[0049] In one implementation of this invention, historical running data is optimized. The data optimization steps include at least one of the following: filling or marking null values ​​in the historical running data; identifying and removing outliers in the historical running data; and smoothing the historical running data.

[0050] Specifically, data optimization includes null value handling, data smoothing, and anomaly correction. Null value handling automatically sets certain devices to null or placeholder values ​​when there is no data in a selected time interval, ensuring the integrity of the data structure. Data smoothing and anomaly correction smooth historical operating data, remove outliers, and improve the readability of curves.

[0051] In the implementation of this invention, a modular, loosely coupled architecture supports cross-platform deployment. Each functional module (dynamic SQL concatenation, data grouping and sorting, curve generation, and storage module) is independent and communicates through a unified interface protocol, avoiding direct dependencies. This allows deployment on different operating systems, containers, or cloud environments. The dynamic SQL concatenation module receives query requests and returns structured results (JSON) via a RESTful API. The data grouping and sorting and curve generation modules obtain tasks and data through a RabbitMQ message queue, achieving asynchronous processing and module decoupling. The storage module provides a unified data access interface, compatible with various storage media, including relational databases (MySQL) and file storage (JSON). An adaptation layer allows for transparent switching between different backends, enabling seamless operation across cloud, local, or hybrid deployments. This ensures independent module expansion and replacement while maintaining cross-platform compatibility and efficient data access.

[0052] This invention addresses the shortcomings of existing technologies, such as low efficiency in generating historical operating curves, limited field selection, inflexible data processing, chaotic time series sorting, and difficulty in querying multiple devices and time periods. It proposes a highly efficient and intelligent method and system for generating historical operating curves for energy storage management systems, achieving significant advantages through the following improvements: 1. Dynamic field adaptive concatenation mechanism: The backend dynamically concatenates SQL statements based on the fields selected by the frontend, enabling flexible queries with any combination of fields; users can customize query indicators according to business needs without pre-defining fields, significantly reducing system maintenance costs and improving ease of use; at the same time, it avoids redundant data transmission and performance waste caused by traditional fixed field design.

[0053] 2. Multi-time interval and multi-device grouping processing: Data is grouped and sorted according to the user-selected time interval and device ID, ensuring that each group of data is independent and the time order is correct; achieving accurate historical curve generation, supporting parallel analysis of multiple devices and multiple time periods; improving system performance and data processing efficiency, while ensuring curve readability and data reliability.

[0054] 3. Field mapping and extraction optimization: Establish a field mapping table to extract specified fields as needed, while supporting null value handling and outlier removal; ensure the integrity and accuracy of generated curve data, avoid analysis errors caused by missing or abnormal fields, improve curve display quality, and reduce manual intervention and post-correction costs.

[0055] 4. Intelligent curve generation and visualization: Generates multi-dimensional line charts based on extracted data, supporting multi-field overlay, linked analysis, and data smoothing; enhances curve visualization and business analysis capabilities, enabling users to quickly understand equipment operating status and trends; simple to operate, providing a better user experience than traditional static curve display methods.

[0056] 5. Modular system architecture and efficient storage: The front-end selection module, dynamic splicing module, grouping and sorting module, curve generation module and storage module realize a loosely coupled architecture; the system structure is simple, easy to maintain and expand; efficient storage and fast retrieval mechanism reduce data processing latency and improve overall system performance; it is convenient for deployment in large-scale equipment and massive data application scenarios.

[0057] 6. Programmability and compatibility with storage media: The generated curve logic can be stored on computer-readable storage media for programmed execution; it supports cross-platform deployment and automated execution, improving production efficiency and usage flexibility, while facilitating technology upgrades and secondary development.

[0058] Through the above technical solutions, the present invention is significantly superior to the prior art in terms of efficiency, flexibility, data accuracy, visualization effect and system scalability. It reduces development and maintenance costs, improves ease of use and analytical decision-making capabilities, and realizes efficient and intelligent generation of historical operation curves for energy storage management systems.

[0059] Based on the methods provided in the above embodiments, this invention also provides a device for generating historical operating curves of an energy storage management system. The following description, in conjunction with the accompanying drawings, describes this device for generating historical operating curves of an energy storage management system. See Figure 2 The figure is a schematic diagram of the structure of a device for generating historical operating curves of an energy storage management system provided in an embodiment of the present invention.

[0060] The device 200 for generating historical operating curves of an energy storage management system provided in this embodiment of the invention includes: a front-end interaction unit 201, a dynamic SQL generation unit 202, a data acquisition unit 203, a data processing unit 204, and a curve generation unit 205.

[0061] The front-end interaction unit 201 is used to receive at least one data field, at least one device identifier, and at least one time interval selected by the front-end user. Dynamic SQL generation unit 202 is used to dynamically generate SQL query statements based on data fields and time intervals; Data acquisition unit 203 is used to execute SQL query statements to obtain corresponding historical running data from the time interval; The data processing unit 204 is used to sort historical operation data in ascending order by timestamp and group it by device identifier; The curve generation unit 205 is used to generate historical running curves based on the grouped historical running data.

[0062] In one possible implementation, the dynamic SQL generation unit 202 is specifically used for: The data fields are validated for legality and semantic consistency based on a pre-defined field mapping table. Map the validated data fields to the actual column names in the database; Construct an SQL query statement by combining the actual column names and time ranges.

[0063] In one possible implementation, a verification unit is also included, specifically for: The data fields are whitelisted based on the field mapping table. If a data field is included in the predefined set of allowed query fields, then the data field is determined to have passed the whitelist verification. Based on the field mapping table, perform type matching verification on the data fields that have passed the whitelist verification. If the semantic type of the data field that has passed the whitelist verification is compatible with the type of the requested SQL operation, then the data field is determined to have passed the type matching verification. Based on the field mapping table, perform operation constraint validation on the data fields that pass the type matching validation. If the data field that passes the type matching validation is authorized to participate in the construction of specific SQL functions, conditions, or expressions, then the data field is determined to be a valid data field.

[0064] In one possible implementation, the data acquisition unit 203 has the following functions: Divide the time interval into multiple time segments according to a preset time granularity; Generate multiple subquery statements corresponding to multiple time segments; Multiple subquery statements are executed in parallel to obtain corresponding portions of historical execution data, resulting in multiple portions of historical execution data. The historical running data is obtained by aggregating and sorting multiple parts of historical running data in memory.

[0065] In one possible implementation, the data processing unit 204 has functions for: Sort the historical running data in ascending order based on the timestamp field to obtain a sorted list of data. The sorted data list is traversed sequentially. When two adjacent data items are found to have different device identifiers, the preceding data is divided into an independent data group. By sequentially traversing the sorted data and grouping it according to device identifiers, the historical operation data of the grouped data can be obtained.

[0066] In one possible implementation, the data processing unit 204 is further configured to: Optimize historical operational data, and the data optimization steps include at least one of the following: Fill or mark empty values ​​in historical operation data; Identify and remove outliers from historical operational data; Smooth historical operational data.

[0067] In one possible implementation, the curve generation unit 205 is also used for: Based on the grouped historical running data, generate corresponding curves for the data fields in the same coordinate system; Overlay the curves corresponding to the data fields for display; Establish the linkage relationship between the curves corresponding to the data fields; Historical operating curves are generated by overlaying and linking data.

[0068] In one possible implementation, a storage unit is also included, which is further used for: The historical operating curves and their associated time intervals and device identifiers are stored in the database; Build an index to support the retrieval of historical operating curves based on time intervals and device identifiers.

[0069] Since the device 200 is the same as the method for generating historical operating curves of the energy storage management system provided in the above method embodiments, the specific implementation of each unit of the device 200 is based on the same concept as the above method embodiments. Therefore, for the specific implementation of each unit of the device 200, please refer to the description of the method for generating historical operating curves of the energy storage management system in the above method embodiments, and it will not be repeated here.

[0070] This invention also provides a device for generating historical operating curves of an energy storage management system, the device comprising: a processor and a memory; The memory is used to store instructions; The processor is used to execute the instructions in the memory to perform the method for generating historical operating curves of the energy storage management system mentioned in the above embodiments.

[0071] It should be noted that the hardware structure of the device for generating historical operating curves of the energy storage management system provided in the embodiments of the present invention can be as follows: Figure 3 The structure shown, Figure 3 This is a schematic diagram of the structure of a device for generating historical operating curves of an energy storage management system, provided in an embodiment of the present invention.

[0072] Please see Figure 3 As shown, device 300 includes: a processor 310, a communication interface 320, and a memory 330. The number of processors 310 in device 300 can be one or more. Figure 3 Taking a processor as an example, in this embodiment of the invention, the processor 310, communication interface 320, and memory 330 can be connected via a bus system or other means. Figure 3 Taking the connection between China and Israel via bus system 340 as an example.

[0073] Processor 310 may be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and an NP. Processor 310 may further include hardware chips. These hardware chips may be application-specific integrated circuits (ASICs), programmable logic devices (PLDs), or combinations thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), generic array logic (GAL), or any combination thereof.

[0074] The memory 330 may include volatile memory, such as random-access memory (RAM); the memory 330 may also include non-volatile memory, such as flash memory, hard disk drive (HDD) or solid-state drive (SSD); the memory 330 may also include a combination of the above types of memory.

[0075] Optionally, the memory 330 stores an operating system and programs, executable modules, or data structures, or subsets thereof, or extended sets thereof. The programs may include various operation instructions for implementing various operations. The operating system may include various system programs for implementing various basic services and handling hardware-based tasks. The processor 310 can read the programs in the memory 330 to implement the method for generating historical operating curves of the energy storage management system provided in this embodiment of the invention.

[0076] The bus system 340 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus system 340 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 3 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0077] This invention also provides a computer-readable storage medium including instructions that, when run on a computer, cause the computer to execute the method for generating historical operating curves of the energy storage management system mentioned in the above embodiments.

[0078] This invention also provides a computer program product containing instructions that, when run on a computer, causes the computer to execute the method for generating historical operating curves of the energy storage management system mentioned in the above embodiments.

[0079] Although the invention has been specifically shown and described in conjunction with preferred embodiments, those skilled in the art will understand that various changes in form and detail may be made to the invention without departing from the spirit and scope of the invention as defined in the appended claims, all of which shall be within the scope of protection of the invention.

Claims

1. A method for generating historical operating curves of an energy storage management system, characterized in that, The method comprises the following steps: receiving at least one data field, at least one device identifier and at least one time interval selected by a front-end user; dynamically generating an SQL query statement based on the data field and the time interval; executing the SQL query statement to obtain corresponding historical running data within the time interval; sorting the historical running data in ascending order according to timestamps and grouping the historical running data according to the device identifier; generating a historical running curve based on the grouped historical running data.

2. The method of claim 1, wherein, The step of dynamically generating an SQL query statement based on the data field and the time interval comprises the following steps: performing legality verification and semantic consistency verification on the data field according to a preset field mapping table; mapping the data field that passes the verification to a real column name of a database; constructing the SQL query statement in combination with the real column name and the time interval.

3. The method of claim 2, wherein, The step of performing legality verification and semantic consistency verification on the data field according to a preset field mapping table comprises the following steps: performing whitelist verification on the data field according to the field mapping table, and determining that the data field passes the whitelist verification if the data field is included in a predefined set of allowed query fields; performing type matching verification on the data field that passes the whitelist verification according to the field mapping table, and determining that the data field passes the type matching verification if the semantic type of the data field that passes the whitelist verification is compatible with a requested SQL operation type; performing operation constraint verification on the data field that passes the type matching verification according to the field mapping table, and determining that the data field is the data field that passes the verification if the data field that passes the type matching verification is authorized to participate in constructing a specific SQL function, condition or expression.

4. The method of claim 1, wherein, When the time interval spans multiple days, the step of executing the SQL query statement to obtain corresponding historical running data within the time interval comprises the following steps: splitting the time interval into multiple time segments according to a preset time granularity; generating a plurality of sub-query statements corresponding to the multiple time segments; parallelly executing the plurality of sub-query statements to respectively obtain corresponding partial historical running data, thereby obtaining a plurality of partial historical running data; aggregating and sorting the plurality of partial historical running data in memory to obtain the historical running data.

5. The method of claim 1, wherein, The step of sorting the historical running data in ascending order according to timestamps and grouping the historical running data according to the device identifier comprises the following steps: performing ascending order sorting on the historical running data according to a timestamp field to obtain a sorted data list; sequentially traversing the sorted data list, and dividing previous data into an independent data group when detecting that the device identifiers of adjacent two pieces of data are different; completing grouping of the sorted data according to the device identifier through the sequential traversal to obtain the grouped historical running data.

6. The method of claim 1, wherein, Before the step of generating a historical running curve based on the grouped historical running data, the method further comprises a data optimization step on the historical running data, and the data optimization step comprises at least one of the following: performing filling or marking processing on null values in the historical running data; identifying and eliminating abnormal values in the historical running data; Smooth the historical operation data.

7. The method of claim 1, wherein, The historical operation curve is generated based on the grouped historical operation data, comprising: Corresponding curves are generated for the data fields in the same coordinate system based on the grouped historical operation data; The corresponding curves of the data fields are superimposed and displayed; A linkage relationship is established between the corresponding curves of the data fields; The historical operation curve is generated through the superimposed display and the linkage relationship.

8. The method of claim 1, wherein, The method further comprises: The historical operation curve, the time interval and the equipment identifier associated therewith are stored in a database; An index is established to support retrieval of the historical operation curve based on the time interval and the equipment identifier.

9. A device for generating historical operating curves of an energy storage management system, characterized in that, Comprise: A front-end interaction unit for receiving at least one data field, at least one equipment identifier and at least one time interval selected by a front-end user; A dynamic SQL generation unit for dynamically generating a SQL query statement based on the data field and the time interval; A data acquisition unit for executing the SQL query statement to acquire corresponding historical operation data within the time interval; A data processing unit for sorting the historical operation data in ascending order according to the time stamp and grouping according to the equipment identifier; A curve generation unit for generating a historical operation curve based on the grouped historical operation data.

10. A computer-readable storage medium, characterized in that, The instructions, when executed on a computer, cause the computer to perform the method of any one of claims 1-8.