LLM-based energy data management analysis method and system, and medium
Through the LLM-based energy data management method, using multi-objective optimization algorithms and Web front-end visualization technology, the problems of traditional systems being unable to adapt to multi-dimensional data mining and valuable information not being utilized are solved. It achieves efficient identification of high-energy-consuming equipment and inefficient usage periods, provides personalized energy-saving suggestions, and improves energy management efficiency.
Patent Information
- Application Number
- CN202511220373.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-29
- Publication Date
- 2025-09-26
AI Technical Summary
Traditional energy data management systems are unable to adapt to the needs of multi-dimensional data mining, resulting in extended system iteration cycles. The valuable information contained in massive metering data is not effectively utilized, and it is impossible to provide abnormal energy consumption warnings and personalized energy-saving suggestions.
An LLM-based energy data management method is adopted to identify high-energy-consuming equipment and inefficient usage periods through multi-objective optimization algorithm prediction and user behavior clustering, and personalized energy-saving suggestions are generated in combination with Web front-end visualization technology.
It achieves efficient identification of high-energy-consuming equipment and inefficient usage periods, provides personalized energy-saving suggestions, improves the efficiency and accuracy of energy data management, and reduces energy waste.
Smart Images

Figure CN120705213A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data analysis and management technology, and in particular to an energy data management and analysis method, system, and medium based on LLM. Background Art
[0002] With the in-depth promotion of smart city construction, traditional energy data management systems are facing a double dilemma: first, the static query mode based on preset fields can no longer adapt to the needs of multi-dimensional data mining. Each new retrieval dimension requires customized secondary development, which causes the system iteration cycle to be extended by more than 45%; second, the valuable information such as energy consumption patterns and equipment degradation trends contained in massive metering data has been dormant for a long time, which can neither provide abnormal energy consumption warnings nor generate personalized energy-saving suggestions. Summary of the Invention
[0003] The purpose of the embodiments of the present application is to provide an energy data management and analysis method, system and medium based on LLM, which identifies high-energy-consuming equipment and inefficient usage periods through multi-objective optimization algorithm prediction and user behavior clustering, and helps users optimize their energy usage habits.
[0004] The present application also provides an LLM-based energy data management and analysis method, including: Collect multiple energy data, including water, electricity and gas, and cache the multiple energy data to obtain cached data; Preprocess the cached data, remove data noise, and analyze data anomaly information; Identify sudden peaks or abnormal zero values based on data anomaly information, and correct the abnormal data with sudden peaks or abnormal zero values to obtain normal data; Analyze normal data based on a multi-objective optimization algorithm to generate analysis results, including usage trends, energy usage habits, abnormal usage, and user intentions; The analysis results are displayed based on Web front-end visualization technology, optimized based on optimization algorithms, and personalized energy-saving suggestions are generated.
[0005] Optionally, in the LLM-based energy data management and analysis method described in the embodiment of the present application, multiple energy data are collected and cached to obtain cached data; specifically, the method includes: Create multiple database tables, each of which matches a type of energy data; Obtain a variety of energy data and analyze the energy parameters corresponding to each type of energy data; Design and adjust the structure of the matching database table based on energy parameters. The structure of the database table includes data collection time, energy type, and specific parameter values; Setting a cache strategy based on energy parameters of energy data, including timed caching; The energy data is backed up based on the cache strategy to obtain cache data.
[0006] Optionally, in the LLM-based energy data management and analysis method described in the embodiment of the present application, the cached data is preprocessed to remove data noise and analyze data anomaly information, specifically including: Acquire energy data and set a sliding window, wherein the sliding window is set to at least five sampling points; Calculate the average value of the energy data in the sliding window, and generate the data value of the center point of the sliding window based on the average value; Smoothing the data values of the center point to obtain noise-free energy data, calculating the mean and standard deviation of the noise-free energy data, and setting the analysis range based on the mean and standard deviation; Analyze whether the noise-free energy data is within the set analysis range; If it is, the data is determined to be normal; if it is not, the data is determined to be abnormal and data abnormality information is obtained.
[0007] Optionally, in the LLM-based energy data management and analysis method described in the embodiment of the present application, identifying sudden peaks or abnormal zero values based on data anomaly information, and correcting abnormal data with sudden peaks or abnormal zero values to obtain normal data specifically includes: Set the burst threshold based on the statistical characteristics of historical data; Obtain data anomaly information and analyze data anomaly values. If the data anomaly value is greater than the suddenness threshold, it is determined to be a sudden peak; Based on historical data, multiple energy data corresponding to the same moment with sudden peaks are obtained, and the average value of the multiple energy data is calculated as the corrected value. The sudden peaks are corrected to obtain normal data; Obtain energy data and analyze whether the zero value is reasonable. If not, determine it as an abnormal zero value; Obtain normal data points adjacent to abnormal zero values, obtain energy data corresponding to the normal data points, perform linear interpolation correction, and obtain normal data.
[0008] Optionally, in the LLM-based energy data management and analysis method described in the embodiment of the present application, normal data is analyzed based on a multi-objective optimization algorithm to generate analysis results, specifically including: Use machine learning algorithms to analyze historical data and forecast usage trends; Identify user behavior patterns based on cluster analysis algorithms and analyze energy usage habits of different users; Identify abnormal usage based on anomaly detection algorithms and generate warning information based on abnormal usage; Analyze user intent based on a large language model and resolve user query needs.
[0009] Optionally, in the LLM-based energy data management and analysis method described in the embodiment of the present application, the analysis results are displayed based on a Web front-end visualization technology, specifically including: Setting up a data monitoring interface based on Web front-end visualization technology, which includes a usage curve chart, a historical comparison chart, and an abnormality alarm chart; Customize display modes based on user needs and switch between multiple views, including daily, weekly, monthly, and yearly views; The analysis results are optimized based on the optimization algorithm to generate personalized energy-saving suggestions, and energy-saving suggestions and abnormal alerts are pushed via SMS, WeChat and email.
[0010] In a second aspect, an embodiment of the present application provides an LLM-based energy data management and analysis system, the system comprising: a memory and a processor, the memory comprising a program for an LLM-based energy data management and analysis method, the program for the LLM-based energy data management and analysis method, when executed by the processor, implementing the following steps: Collect multiple energy data, including water, electricity and gas, and cache the multiple energy data to obtain cached data; Preprocess the cached data, remove data noise, and analyze data anomaly information; Identify sudden peaks or abnormal zero values based on data anomaly information, and correct the abnormal data with sudden peaks or abnormal zero values to obtain normal data; Analyze normal data based on a multi-objective optimization algorithm to generate analysis results, including usage trends, energy usage habits, abnormal usage, and user intentions; The analysis results are displayed based on Web front-end visualization technology, optimized based on optimization algorithms, and personalized energy-saving suggestions are generated.
[0011] Optionally, in the LLM-based energy data management and analysis system described in the embodiment of the present application, multiple energy data are collected and cached to obtain cached data; specifically, the process includes: Create multiple database tables, each of which matches a type of energy data; Obtain a variety of energy data and analyze the energy parameters corresponding to each type of energy data; Design and adjust the structure of the matching database table based on energy parameters. The structure of the database table includes data collection time, energy type, and specific parameter values; Setting a cache strategy based on energy parameters of energy data, including timed caching; The energy data is backed up based on the cache strategy to obtain cache data.
[0012] Optionally, in the LLM-based energy data management and analysis system described in the embodiment of the present application, cached data is preprocessed to remove data noise and analyze data anomaly information, specifically including: Acquire energy data and set a sliding window, wherein the sliding window is set to at least five sampling points; Calculate the average value of the energy data in the sliding window, and generate the data value of the center point of the sliding window based on the average value; Smoothing the data values of the center point to obtain noise-free energy data, calculating the mean and standard deviation of the noise-free energy data, and setting the analysis range based on the mean and standard deviation; Analyze whether the noise-free energy data is within the set analysis range; If it is, the data is determined to be normal; if it is not, the data is determined to be abnormal and data abnormality information is obtained.
[0013] In a third aspect, an embodiment of the present application further provides a computer-readable storage medium, which includes an LLM-based energy data management and analysis method program. When the LLM-based energy data management and analysis method program is executed by a processor, the steps of the LLM-based energy data management and analysis method as described in any one of the above items are implemented.
[0014] As can be seen from the above, the embodiment of the present application provides an LLM-based energy data management and analysis method, system and medium, which collects multiple energy data, including water, electricity and gas, and caches the multiple energy data to obtain cached data; pre-processes the cached data to remove data noise, and analyzes data anomaly information; identifies sudden peaks or abnormal zero values based on data anomaly information, corrects abnormal data with sudden peaks or abnormal zero values, and obtains normal data; analyzes normal data based on a multi-objective optimization algorithm to generate analysis results, and the analysis results include usage trends, energy usage habits, abnormal usage and user intentions; displays the analysis results based on Web front-end visualization technology, optimizes the analysis results based on the optimization algorithm, and generates personalized energy-saving suggestions; identifies high-energy-consuming equipment and inefficient usage periods through multi-objective optimization algorithm prediction and user behavior clustering, and helps users optimize energy usage habits. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without creative work.
[0016] Figure 1 Flowchart of the energy data management and analysis method based on LLM provided in Example 1 of this application; Figure 2 A flow chart of the energy data caching method of the LLM-based energy data management and analysis method provided in Example 1 of the present application; Figure 3 A flowchart of data anomaly information analysis of the energy data management and analysis method based on LLM provided in Example 1 of the present application; Figure 4 A block diagram of an energy data management and analysis system based on LLM provided in Example 2 of this application; Figure 5 A schematic diagram of the system architecture provided in Example 3 of this application; Figure 6 A schematic diagram of the problem handling process provided in Example 3 of this application; Figure 7 This is an illustration of the MCP service tools and capabilities provided in Example 3 of this application. DETAILED DESCRIPTION
[0017] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work fall within the scope of protection of the present application.
[0018] It should be noted that similar reference numerals and letters represent similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and should not be understood as indicating or implying relative importance.
[0019] Example 1 Please refer to Figure 1 , Figure 1 The following is a flowchart of an LLM-based energy data management and analysis method in some embodiments of the present application. The LLM-based energy data management and analysis method is used in a terminal device and includes the following steps: S101, collecting multiple energy data, including water, electricity, and gas, and caching the multiple energy data to obtain cached data; S102, pre-processing the cached data, removing data noise, and analyzing data anomaly information; S103, identifying sudden peaks or abnormal zero values based on the data abnormality information, and correcting the abnormal data with sudden peaks or abnormal zero values to obtain normal data; S104: Analyze normal data based on a multi-objective optimization algorithm to generate analysis results, including usage trends, energy usage habits, abnormal usage, and user intentions; S105, the analysis results are displayed based on the Web front-end visualization technology, the analysis results are optimized based on the optimization algorithm, and personalized energy-saving suggestions are generated.
[0020] It should be noted that by connecting the data acquisition module to the energy equipment, wireless communication (such as LoRa, NB-IoT, Wi-Fi) or wired methods (such as RS485, Ethernet) are used to achieve remote real-time data collection.
[0021] It has a local cache storage function to ensure that data can still be stored in the event of network abnormalities and uploaded to the cloud after the network is restored.
[0022] It supports the collection of various energy data such as water, electricity, and gas, and is applicable to different types of energy equipment. Through modules such as data collection, preprocessing, analysis, display, and intelligent optimization, it achieves efficient and accurate energy data analysis and management.
[0023] Please refer to Figure 2 , Figure 2 This is a flow chart of an energy data caching method for an LLM-based energy data management and analysis method in some embodiments of the present application. According to an embodiment of the present invention, multiple energy data are collected and cached to obtain cached data; specifically, the following steps are included: S201, creating multiple database tables, each database table is matched with a type of energy data; S202, acquiring multiple energy data and analyzing energy parameters corresponding to each type of energy data; S203, designing and adjusting the structure of the matching database table based on the energy parameters, where the structure of the database table includes data collection time, energy type, and specific parameter values; S204, setting a cache strategy based on energy parameters of the energy data, the cache strategy including timed caching; S205: Back up the energy data based on the cache strategy to obtain cache data.
[0024] It is important to monitor the status of data acquisition devices and data updates in real time. When new data is collected or the device status changes, the cached data is updated in a timely manner. At the same time, the consistency of the cached data with the original collected data is ensured to avoid data errors or loss.
[0025] Please refer to Figure 3 , Figure 3 This is a flowchart of an LLM-based energy data management and analysis method for analyzing data anomaly information in some embodiments of the present application. According to an embodiment of the present invention, cached data is preprocessed to remove data noise and analyze data anomaly information, specifically including: S301, acquiring energy data and setting a sliding window, wherein the sliding window is set to at least five sampling points; S302, calculating the average value of energy data in the sliding window, and generating the data value of the center point of the sliding window based on the average value; S303: Smoothing the data value of the center point to obtain noise-free energy data, calculating the mean and standard deviation of the noise-free energy data, and setting the analysis range based on the mean and standard deviation; S304, analyzing whether the noise-free energy data is within a set analysis range; S305: If it is, the data is determined to be normal; if it is not, the data is determined to be abnormal, and data abnormality information is obtained.
[0026] It should be noted that denoising algorithms (such as wavelet transform and median filtering) are used to clean the data, remove noise and outliers during the acquisition process, perform anomaly detection, identify sudden peaks or abnormal zero values, and use statistical or machine learning methods for correction.
[0027] A data format conversion module is used to ensure that data from different types of smart meters are uniformly converted into standardized formats, such as JSON, CSV or database storage formats.
[0028] Combined with data processing techniques such as normalization (Min-Max Scaling) and standardization (Z-Score Normalization), the accuracy of subsequent data analysis can be improved.
[0029] According to an embodiment of the present invention, identifying sudden peaks or abnormal zero values based on data anomaly information and correcting abnormal data with sudden peaks or abnormal zero values to obtain normal data specifically includes: Set the burst threshold based on the statistical characteristics of historical data; Obtain data anomaly information and analyze data anomaly values. If the data anomaly value is greater than the suddenness threshold, it is determined to be a sudden peak; Based on historical data, multiple energy data corresponding to the same moment with sudden peaks are obtained, and the average value of the multiple energy data is calculated as the corrected value. The sudden peaks are corrected to obtain normal data; Obtain energy data and analyze whether the zero value is reasonable. If not, determine it as an abnormal zero value; Obtain normal data points adjacent to abnormal zero values, obtain energy data corresponding to the normal data points, perform linear interpolation correction, and obtain normal data.
[0030] It's important to note that if a sudden peak is determined to be caused by measurement error or brief interference, correction can be performed by referencing historical data under similar operating conditions. For example, within the same time period (such as the same time of day) or under similar load conditions, the corresponding normal data value in the historical data can be found and used to replace the sudden peak data. For example, a factory's power load is relatively stable around 10:00 AM every day. If a sudden peak occurs at that time one day, the load data from the previous few days at the same time can be found and the average value can be used as the correction value.
[0031] According to an embodiment of the present invention, normal data is analyzed based on a multi-objective optimization algorithm to generate analysis results, specifically including: Use machine learning algorithms to analyze historical data and forecast usage trends; Identify user behavior patterns based on cluster analysis algorithms and analyze energy usage habits of different users; Identify abnormal usage based on anomaly detection algorithms and generate warning information based on abnormal usage; Analyze user intent based on the Large Language Model (LLM) and resolve user query requirements.
[0032] It should be noted that through multi-model fusion prediction and user behavior clustering, high-energy consumption equipment and inefficient usage periods can be identified to help users optimize their energy usage habits.
[0033] Intelligent optimization recommendations: Based on a multi-objective optimization algorithm (NSGA-II) and reinforcement learning (DQN), it provides efficient energy usage solutions (such as peak-shifting electricity consumption and equipment upgrade recommendations), significantly reducing energy waste.
[0034] Timely handling of anomalies: Through the isolation forest algorithm and dynamic threshold adjustment, anomalies such as water leaks and equipment failures can be quickly detected to avoid continuous energy waste.
[0035] According to an embodiment of the present invention, the analysis results are displayed based on Web front-end visualization technology, specifically including: Set up a data monitoring interface based on Web front-end visualization technology, which includes usage curve charts, historical comparison charts, and abnormal alarm charts; Customize display modes based on user needs and switch between multiple views, including daily, weekly, monthly, and yearly views; The analysis results are optimized based on the optimization algorithm to generate personalized energy-saving suggestions, and energy-saving suggestions and abnormal alerts are pushed via SMS, WeChat and email.
[0036] It should be noted that dynamic interactive visualization: the analysis results are intuitively displayed through visual charts.
[0037] Natural language interaction: Based on LLM and knowledge graph, natural language query and efficient retrieval of massive data are realized, lowering the user operation threshold.
[0038] Personalized reports and recommendations: Generate customized reports containing usage trends, energy-saving recommendations, and policy adaptation information to meet different user needs.
[0039] According to an embodiment of the present invention, the analysis results are optimized based on an optimization algorithm to generate personalized energy-saving suggestions, specifically including: The intelligent optimization module combines algorithm analysis results to provide users with personalized energy-saving suggestions, such as optimizing electricity usage time and avoiding peak hours; Use genetic algorithms or reinforcement learning to optimize energy usage strategies and improve user energy efficiency; Combined with the step model, it intelligently reminds users how to reasonably plan energy consumption and avoid unnecessary expenses.
[0040] Example 2 Please refer to Figure 4 , Figure 4 This is a block diagram of an LLM-based energy data management and analysis system in some embodiments of the present application. In a second aspect, embodiments of the present application provide an LLM-based energy data management and analysis system, comprising: a memory and a processor, wherein the memory includes a program for an LLM-based energy data management and analysis method. When the LLM-based energy data management and analysis method program is executed by the processor, the following steps are implemented: Collect multiple energy data, including water, electricity and gas, and cache the multiple energy data to obtain cached data; Preprocess the cached data, remove data noise, and analyze data anomaly information; Identify sudden peaks or abnormal zero values based on data anomaly information, and correct the abnormal data with sudden peaks or abnormal zero values to obtain normal data; Analyze normal data based on a multi-objective optimization algorithm and generate analysis results, including usage trends, energy usage habits, abnormal usage, and user intentions; The analysis results are displayed based on Web front-end visualization technology, optimized based on optimization algorithms, and personalized energy-saving suggestions are generated.
[0041] It should be noted that by connecting the data acquisition module to the energy equipment, wireless communication (such as LoRa, NB-IoT, Wi-Fi) or wired methods (such as RS485, Ethernet) are used to achieve remote real-time data collection.
[0042] It has a local cache storage function to ensure that data can still be stored in the event of network abnormalities and uploaded to the cloud after the network is restored.
[0043] According to an embodiment of the present invention, multiple energy data are collected and cached to obtain cached data; specifically, the following steps are included: Create multiple database tables, each of which matches a type of energy data; Obtain a variety of energy data and analyze the energy parameters corresponding to each type of energy data; Design and adjust the structure of the matching database table based on energy parameters. The structure of the database table includes data collection time, energy type, and specific parameter values; Setting a cache strategy based on energy parameters of energy data, including timed caching; The energy data is backed up based on the cache strategy to obtain cache data.
[0044] It is important to monitor the status of data acquisition devices and data updates in real time. When new data is collected or the device status changes, the cached data is updated in a timely manner. At the same time, the consistency of the cached data with the original collected data is ensured to avoid data errors or loss.
[0045] According to an embodiment of the present invention, cached data is preprocessed to remove data noise and analyze data anomaly information, specifically including: Obtain energy data and set a sliding window with at least five sampling points; Calculate the average value of the energy data in the sliding window, and generate the data value of the center point of the sliding window based on the average value; Smoothing the data values of the center point to obtain noise-free energy data, calculating the mean and standard deviation of the noise-free energy data, and setting the analysis range based on the mean and standard deviation; Analyze whether the noise-free energy data is within the set analysis range; If it is, the data is determined to be normal; if it is not, the data is determined to be abnormal and data abnormality information is obtained.
[0046] It should be noted that denoising algorithms (such as wavelet transform and median filtering) are used to clean the data, remove noise and outliers during the acquisition process, perform anomaly detection, identify sudden peaks or abnormal zero values, and use statistical or machine learning methods for correction.
[0047] A data format conversion module is used to ensure that data from different types of smart meters are uniformly converted into standardized formats, such as JSON, CSV or database storage formats.
[0048] Combined with data processing techniques such as normalization (Min-Max Scaling) and standardization (Z-Score Normalization), the accuracy of subsequent data analysis can be improved.
[0049] According to an embodiment of the present invention, identifying sudden peaks or abnormal zero values based on data anomaly information and correcting abnormal data with sudden peaks or abnormal zero values to obtain normal data specifically includes: Set the burst threshold based on the statistical characteristics of historical data; Obtain data anomaly information and analyze data anomaly values. If the data anomaly value is greater than the suddenness threshold, it is determined to be a sudden peak; Based on historical data, multiple energy data corresponding to the same moment with sudden peaks are obtained, and the average value of the multiple energy data is calculated as the corrected value. The sudden peaks are corrected to obtain normal data; Obtain energy data and analyze whether the zero value is reasonable. If not, determine it as an abnormal zero value; Obtain normal data points adjacent to abnormal zero values, obtain energy data corresponding to the normal data points, perform linear interpolation correction, and obtain normal data.
[0050] It's important to note that if a sudden peak is determined to be caused by measurement error or brief interference, correction can be performed by referencing historical data under similar operating conditions. For example, within the same time period (such as the same time of day) or under similar load conditions, the corresponding normal data value in the historical data can be found and used to replace the sudden peak data. For example, a factory's power load is relatively stable around 10:00 AM every day. If a sudden peak occurs at that time one day, the load data from the previous few days at the same time can be found and the average value can be used as the correction value.
[0051] According to an embodiment of the present invention, normal data is analyzed based on a multi-objective optimization algorithm to generate analysis results, specifically including: Use machine learning algorithms to analyze historical data and forecast usage trends; Identify user behavior patterns based on cluster analysis algorithms and analyze energy usage habits of different users; Identify abnormal usage based on anomaly detection algorithms and generate warning information based on abnormal usage; Analyze user intent based on the Large Language Model (LLM) and resolve user query requirements.
[0052] It should be noted that through multi-model fusion prediction and user behavior clustering, high-energy consumption equipment and inefficient usage periods can be identified to help users optimize their energy usage habits.
[0053] Intelligent optimization recommendations: Based on a multi-objective optimization algorithm (NSGA-II) and reinforcement learning (DQN), it provides efficient energy usage solutions (such as peak-shifting electricity consumption and equipment upgrade recommendations), significantly reducing energy waste.
[0054] Timely handling of anomalies: Through the isolation forest algorithm and dynamic threshold adjustment, anomalies such as water leaks and equipment failures can be quickly detected to avoid continuous energy waste.
[0055] According to an embodiment of the present invention, the analysis results are displayed based on Web front-end visualization technology, specifically including: Set up a data monitoring interface based on Web front-end visualization technology, which includes usage curve charts, historical comparison charts, and abnormal alarm charts; Customize display modes based on user needs and switch between multiple views, including daily, weekly, monthly, and yearly views; The analysis results are optimized based on the optimization algorithm to generate personalized energy-saving suggestions, and energy-saving suggestions and abnormal alerts are pushed via SMS, WeChat and email.
[0056] It should be noted that dynamic interactive visualization: the analysis results are intuitively displayed through visual charts.
[0057] Natural language interaction: Based on LLM and knowledge graph, natural language query and efficient retrieval of massive data are realized, lowering the user operation threshold.
[0058] Personalized reports and recommendations: Generate customized reports containing usage trends, energy-saving recommendations, and policy adaptation information to meet different user needs.
[0059] According to an embodiment of the present invention, the analysis results are optimized based on an optimization algorithm to generate personalized energy-saving suggestions, specifically including: The intelligent optimization module combines algorithm analysis results to provide users with personalized energy-saving suggestions, such as optimizing electricity usage time and avoiding peak hours; Use genetic algorithms or reinforcement learning to optimize energy usage strategies and improve user energy efficiency; Combined with the step model, it intelligently reminds users how to reasonably plan energy consumption and avoid unnecessary expenses.
[0060] Example 3 like Figure 5-Figure 7 As shown in the figure, the LLM-based energy data management and analysis method includes: Get the user's questions; Process the user's question through LLM, generate an answer and return it to the user; The process comprises the following steps: Identify the intent of user questions and determine the target intent; According to the target intention, select at least one tool from the preset MCP tool set and determine the tool calling order; Tools are executed sequentially in the order they were called, processing user questions to generate target answers.
[0061] Among them, intent recognition includes: Perform semantic analysis on user questions; If the semantic analysis indicates that the question is complete, it is input into the intent recognition model to output the target intent; If semantic analysis indicates that the question is incomplete, then: Identify missing content items and return completion hints to the user; Based on the complete question supplemented by the user, the target intent is determined through the intent recognition model; Furthermore, intent recognition includes: Use multiple intent recognition models to process user questions separately and generate candidate intents for each model; Based on preset voting rules, the target intent is determined from the candidate intents.
[0062] like Figure 6 As shown, determining the tool calling sequence includes: Query the intent task table to obtain the subtask sequence and execution order associated with the target intent; Query the task tool table to determine the target tool corresponding to each subtask; The target tool calling order is consistent with the subtask execution order.
[0063] Among them, calling tools to handle user issues includes: Execute each target tool in sequence to process the corresponding subtasks and generate subtask results according to the tool calling order; Aggregate all subtask results to generate the target answer; According to an embodiment of the present invention, the method further includes: analyzing whether the data format of the target answer meets the visualization conditions; If the data format of the target answer meets the visualization conditions, or the user explicitly requests a visualization display, the data visualization tool is called to visualize the target answer.
[0064] According to an embodiment of the present invention, the subtask sequence includes at least one of: energy data cleaning, energy index calculation, and energy usage pattern analysis; In the task tool table, the tool corresponding to each subtask is a dedicated energy analysis tool, including: Load forecasting tools (for processing power load data); Power generation efficiency assessment tool (for processing renewable energy power generation data); Carbon intensity calculation tool (used to process carbon emission data).
[0065] According to an embodiment of the present invention, during the intent recognition phase, if the user's question involves cross-regional energy data comparison, the following tools are automatically invoked: Data unit standardization tool (unifying energy data measurement units across different regions); Climate factor correction tool (eliminating the interference of temperature on energy consumption data).
[0066] A third aspect of the present invention provides a computer-readable storage medium, which includes an LLM-based energy data management and analysis method program. When the LLM-based energy data management and analysis method program is executed by a processor, it implements the steps of any of the above-mentioned LLM-based energy data management and analysis methods.
[0067] The present invention discloses an energy data management and analysis method, system and medium based on LLM. The method collects multiple energy data, including water, electricity and gas, caches the multiple energy data to obtain cached data; pre-processes the cached data to remove data noise and analyzes data anomaly information; identifies sudden peaks or abnormal zero values based on the data anomaly information, corrects abnormal data with sudden peaks or abnormal zero values to obtain normal data; analyzes the normal data based on a multi-objective optimization algorithm to generate analysis results, which include usage trends, energy usage habits, abnormal usage and user intentions; displays the analysis results based on Web front-end visualization technology, optimizes the analysis results based on an optimization algorithm, and generates personalized energy-saving suggestions; identifies high-energy-consuming equipment and inefficient usage periods through multi-objective optimization algorithm prediction and user behavior clustering, and helps users optimize their energy usage habits.
[0068] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of units is merely a logical function division. In actual implementation, there may be other division methods, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0069] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed across multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the scheme of this embodiment.
[0070] In addition, all functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0071] Those skilled in the art will appreciate that all or part of the steps of the above-mentioned method embodiments may be implemented by hardware associated with program instructions, and the aforementioned program may be stored in a readable storage medium. When the program is executed, the program executes the steps of the above-mentioned method embodiments. The aforementioned storage medium includes various media that can store program codes, such as mobile storage devices, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical disks.
[0072] Alternatively, if the integrated units described above are implemented as software modules and sold or used as standalone products, they can also be stored on a readable storage medium. Based on this understanding, the technical solutions of the embodiments of the present invention, or the portion that contributes to the prior art, can be embodied in the form of a software product. This software product, stored on a storage medium, includes instructions for enabling a computer device (such as a personal computer, server, or network device) to execute all or part of the methods described in the various embodiments of the present invention. The aforementioned storage media include various media capable of storing program code, such as removable storage devices, ROM, RAM, magnetic disks, or optical disks.
Claims
1. An energy data management and analysis method based on LLM, characterized in that: include: Collect multiple energy data, including water, electricity and gas, and cache the multiple energy data to obtain cached data; Preprocess the cached data, remove data noise, and analyze data anomaly information; Identify sudden peaks or abnormal zero values based on data anomaly information, and correct the abnormal data with sudden peaks or abnormal zero values to obtain normal data; Analyze normal data based on a multi-objective optimization algorithm to generate analysis results, including usage trends, energy usage habits, abnormal usage, and user intentions; The analysis results are displayed based on Web front-end visualization technology, optimized based on optimization algorithms, and personalized energy-saving suggestions are generated.
2. The LLM-based energy data management and analysis method according to claim 1 is characterized in that: Collect multiple energy data, cache the multiple energy data, and obtain cached data; specifically including: Create multiple database tables, each of which matches a type of energy data; Obtain a variety of energy data and analyze the energy parameters corresponding to each type of energy data; Design and adjust the structure of the matching database table based on energy parameters. The structure of the database table includes data collection time, energy type, and specific parameter values; Setting a cache strategy based on energy parameters of energy data, including timed caching; The energy data is backed up based on the cache strategy to obtain cache data.
3. The LLM-based energy data management and analysis method according to claim 2 is characterized in that: Preprocess the cached data to remove data noise and analyze data anomaly information, including: Acquire energy data and set a sliding window, wherein the sliding window is set to at least five sampling points; Calculate the average value of the energy data in the sliding window, and generate the data value of the center point of the sliding window based on the average value; Smoothing the data values of the center point to obtain noise-free energy data, calculating the mean and standard deviation of the noise-free energy data, and setting the analysis range based on the mean and standard deviation; Analyze whether the noise-free energy data is within the set analysis range; If it is, the data is determined to be normal; if it is not, the data is determined to be abnormal and data abnormality information is obtained.
4. The LLM-based energy data management and analysis method according to claim 3 is characterized in that: Identify sudden peaks or abnormal zero values based on data anomaly information, and correct the abnormal data with sudden peaks or abnormal zero values to obtain normal data, specifically including: Set the burst threshold based on the statistical characteristics of historical data; Obtain data anomaly information and analyze data anomaly values. If the data anomaly value is greater than the suddenness threshold, it is determined to be a sudden peak; Based on historical data, multiple energy data corresponding to the same moment with sudden peaks are obtained, and the average value of the multiple energy data is calculated as the corrected value. The sudden peaks are corrected to obtain normal data; Obtain energy data and analyze whether the zero value is reasonable. If not, determine it as an abnormal zero value; Obtain normal data points adjacent to abnormal zero values, obtain energy data corresponding to the normal data points, perform linear interpolation correction, and obtain normal data.
5. The LLM-based energy data management and analysis method according to claim 4 is characterized in that: Analyze normal data based on multi-objective optimization algorithms and generate analysis results, including: Use machine learning algorithms to analyze historical data and forecast usage trends; Identify user behavior patterns based on cluster analysis algorithms and analyze energy usage habits of different users; Identify abnormal usage based on anomaly detection algorithms and generate warning information based on abnormal usage; Analyze user intent based on a large language model and resolve user query needs.
6. The LLM-based energy data management and analysis method according to claim 5 is characterized in that: The analysis results are displayed based on Web front-end visualization technology, including: Setting up a data monitoring interface based on Web front-end visualization technology, which includes a usage curve chart, a historical comparison chart, and an abnormality alarm chart; Customize display modes based on user needs and switch between multiple views, including daily, weekly, monthly, and yearly views; The analysis results are optimized based on the optimization algorithm to generate personalized energy-saving suggestions, and energy-saving suggestions and abnormal alerts are pushed via SMS, WeChat and email.
7. An energy data management and analysis system based on LLM, characterized in that: The system includes: a memory and a processor, wherein the memory includes a program of an energy data management and analysis method based on LLM, and when the program of the energy data management and analysis method based on LLM is executed by the processor, the following steps are implemented: Collect multiple energy data, including water, electricity and gas, and cache the multiple energy data to obtain cached data; Preprocess the cached data, remove data noise, and analyze data anomaly information; Identify sudden peaks or abnormal zero values based on data anomaly information, and correct the abnormal data with sudden peaks or abnormal zero values to obtain normal data; Analyze normal data based on a multi-objective optimization algorithm to generate analysis results, including usage trends, energy usage habits, abnormal usage, and user intentions; The analysis results are displayed based on Web front-end visualization technology, optimized based on optimization algorithms, and personalized energy-saving suggestions are generated.
8. The LLM-based energy data management and analysis system according to claim 7 is characterized in that: Collect multiple energy data, cache the multiple energy data, and obtain cached data; specifically including: Create multiple database tables, each of which matches a type of energy data; Obtain a variety of energy data and analyze the energy parameters corresponding to each type of energy data; Design and adjust the structure of the matching database table based on energy parameters. The structure of the database table includes data collection time, energy type, and specific parameter values; Setting a cache strategy based on energy parameters of energy data, including timed caching; The energy data is backed up based on the cache strategy to obtain cache data.
9. The LLM-based energy data management and analysis system according to claim 8, characterized in that: Preprocess the cached data to remove data noise and analyze data anomaly information, including: Acquire energy data and set a sliding window, wherein the sliding window is set to at least five sampling points; Calculate the average value of the energy data in the sliding window, and generate the data value of the center point of the sliding window based on the average value; Smoothing the data values of the center point to obtain noise-free energy data, calculating the mean and standard deviation of the noise-free energy data, and setting the analysis range based on the mean and standard deviation; Analyze whether the noise-free energy data is within the set analysis range; If it is, the data is determined to be normal; if it is not, the data is determined to be abnormal and data abnormality information is obtained.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium includes an LLM-based energy data management and analysis method program. When the LLM-based energy data management and analysis method program is executed by a processor, the steps of the LLM-based energy data management and analysis method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
AI-based energy consumption analysis system
CN119005578A
Power marketing data management method and system
CN119475142A
Smart home energy management optimization method in Internet of Things environment
CN119493378A
User behavior data mining and prediction analysis system in intelligent power grid environment
CN119599175A
Resident community energy metering device with multivariate data access and fusion
CN119938761A