Building energy consumption analysis method and system based on large language model and event mining

CN123015210APending Publication Date: 2026-10-30HUADE SMART ENERGY MANAGEMENT (TIANJIN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611495776.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-24
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

这个过程耗费大量的人力成本和时间成本,并且如何解读这些文本并判断其对能耗的潜在影响,缺乏客观统一的标准,主观判断性强,难以保证分析的可靠性,导致归因结果存在较大的不确定性

Benefits of technology

1、本发明预设物理承受实体隔离、时间轴隔离、实质物理干预甄别三条免疫规则,强制大语言模型逐条判定,能够有效过滤干扰事件,从根本上解决了通用大语言模型在建筑能耗归因场景中“读不懂物理归属、分不清时间先后、辨不明虚实改造”的行业共性难题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123015210A_ABST
    Figure CN123015210A_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on big language model and event mining's building energy consumption analysis method and system.The method is by obtaining the attribute information and historical energy consumption data of target building, extracts meteorological characteristics and date characteristics to establish basic prediction model, calculates theoretical basic energy consumption value and extracts the energy consumption residual between actual energy consumption and theoretical value;At the same time, based on building geographic location and time cycle, candidate event text is obtained from the Internet, and the big language model of the preset multi-dimensional semantic immune rule is used to filter, remove duplication and determine the influence direction of event text;The determination result is converted into a quantitative feature score, and the residual fitting model is input to fit and train the energy consumption residual;After direction consistency verification and periodic event comparison, the key attribution event is locked, and finally a structured attribution analysis report is generated.The application realizes the automated and intelligent attribution analysis of building energy consumption abnormal fluctuation, significantly improves the efficiency and accuracy of energy consumption audit.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the intersection of building information technology and energy management, and in particular to a building energy consumption analysis method and system based on large language models and event mining. Background Technology

[0002] Currently, mainstream building energy conservation management solutions in the industry primarily rely on energy management systems deployed within buildings or energy consumption monitoring modules integrated into building automation systems. The basic working principle of these systems is to collect and transmit real-time energy consumption data, including electricity, water, gas, cooling capacity, and heating capacity, by installing metering devices such as smart meters, water meters, and heat meters, as well as various sensors, at various energy-consuming points in the building (such as air conditioning systems, power distribution, lighting, and water supply and drainage). After acquiring the data, the system processes and analyzes this structured time-series data, including: (1) Statistical analysis: Calculate basic statistical indicators such as total energy consumption, peak value, valley value, and average value within a specific time period.

[0003] (2) Comparative analysis: year-on-year (compared with the same period last year) and month-on-month (compared with the previous statistical period) analysis of energy consumption data, and comparison of actual energy consumption with historical baseline or preset energy consumption quota, etc., to observe its changing trend.

[0004] (3) Rule-based alarms: The system presets a series of logical rules and energy consumption thresholds. For example, the energy consumption per unit area during working hours must not exceed X, and the standby energy consumption at night must not exceed Y. Once the monitoring data triggers these rules, the system will automatically generate an anomaly alarm and notify the management personnel.

[0005] Through the aforementioned technical means, managers can basically achieve real-time perception of the building's operating status and promptly detect problems such as abnormal energy consumption exceeding standards.

[0006] Problems and shortcomings of existing technologies While existing technologies have made some progress in monitoring energy consumption data and detecting anomalies, there are still technical bottlenecks in the in-depth attribution analysis of abnormal events, resulting in low efficiency in the process from "identifying the problem" to "locating the cause." (1) The attribution analysis process relies on manual labor, and the information acquisition and processing are quite difficult: When the system alarms or data analysts discover non-periodic, non-equipment failures, such as energy consumption fluctuations where sensor readings are normal but total power consumption spikes abnormally, the diagnostic process enters an inefficient mode. Analysts need to rely on their personal experience to guess possible causes and then manually collect various information to corroborate them. For example, they need to check the weather records within the analysis period to rule out the impact of extreme weather, search the municipal website to confirm whether there are any notices of water outages, power outages, road construction, etc., find out whether large-scale events have been held inside the building, or check newly promulgated local energy-saving policies, etc. This process consumes a lot of manpower and time, and there is a lack of objective and unified standards for how to interpret these texts and judge their potential impact on energy consumption. Subjective judgment is strong, making it difficult to guarantee the reliability of the analysis, resulting in a large degree of uncertainty in the attribution results.

[0007] (2) In the existing technology system, there is a significant disconnect between the internal structured energy consumption time-series data and the external unstructured event text data. The system lacks an automated data fusion and analysis tool, making it impossible to establish an effective correlation model between the two. In particular, when the system cannot effectively separate the influence of regular periodic fluctuations, such as weekdays versus weekends and seasonal changes in air conditioning load, it is difficult to distinguish anomalies caused by accidental or sudden external events from the energy consumption curve. This results in a low signal-to-noise ratio in the analysis, often misjudging routine phenomena as anomalies and failing to pinpoint the true cause of the anomaly.

[0008] (3) After a manual attribution is completed, the analysis process and conclusions are usually in the form of non-standardized documents. This results in inconsistent report formats, depth and quality, making it difficult to form a reusable knowledge base. Summary of the Invention

[0009] Therefore, the purpose of this invention is to provide a building energy consumption analysis method and system based on large language model and event mining. Its core idea is to use the natural language understanding and reasoning capabilities of large language model (LLM) to automatically mine external event information related to buildings, judge its potential impact on energy consumption, and correlate and match it with changes in actual energy consumption data, thereby intelligently identifying the key causes of energy consumption anomalies and generating a structured attribution analysis report.

[0010] To achieve the above objectives, this invention provides a building energy consumption analysis method based on large language models and event mining, comprising the following steps: S1. Obtain multi-source building information of the target building, including the target building's attribute information and historical energy consumption data, and set the time period to be analyzed; S2. Extract the structured data within the time period, establish a basic prediction model based on multi-source building information and the structured data, calculate the theoretical basic energy consumption value of the target building within the time period, and calculate the difference between the actual energy consumption value and the theoretical basic energy consumption value as the energy consumption residual. S3. Based on the geographical location of the target building and the time period, construct a web search query and obtain candidate event text from the Internet; input the candidate event text into a large language model, apply a preset multidimensional semantic immunity rule to filter the candidate event text, and output the events that pass the immunity rule and their predicted directions of energy consumption impact. S4. Transform the events through the immune rules into structured quantitative feature scores, use the quantitative feature scores as intervention features, input them into the residual fitting model, perform fitting training on the energy consumption residuals, and output the residual prediction values. S5. Verify the consistency between the predicted direction of energy consumption impact output by the large language model and the actual energy consumption change trend, and retain events with consistent directions; compare the retained events with the preset knowledge base of regular periodic events, eliminate events that belong to regular periodic fluctuations, and lock in key attribution events. S6. Integrate the key attribution events and their impact analysis, and the energy consumption residual data to generate a structured attribution analysis report.

[0011] More preferably, in S2, the establishment of a basic prediction model based on the structured operational data, wherein the structured operational data includes meteorological data and temporal characteristic data; the establishment of the basic prediction model includes the following steps: S201: Obtain historical energy consumption data and corresponding structured operation data of the target building, and divide them into cooling scenario datasets and heating scenario datasets according to temperature conditions; S202: Extract feature variables from the cooling scenario dataset and the heating scenario dataset respectively. The feature variables include average temperature, temperature square term, interaction term between temperature and building usage days, and date feature of whether it is a holiday. S203: For the cooling scenario and the heating scenario respectively, using the feature variables as input and the corresponding historical energy consumption data as output target, a linear regression algorithm is used for training to fit the linear relationship weight coefficient between the feature variables and energy consumption, thereby obtaining the basic prediction sub-model for the cooling scenario and the basic prediction sub-model for the heating scenario. S204: Input the meteorological and date characteristics within the time period to be analyzed into the corresponding basic prediction sub-model, and output the theoretical basic energy consumption value of the target building within the time period.

[0012] More preferably, in S3, the multidimensional semantic immunity rule includes: (1) Physical entity isolation rule: guides the large language model to identify the real physical entity that bears the action in the event text. If the target building is only the action issuer in the event text but the actual physical construction occurs in a third party, then immunity is triggered, and it is determined that the event has no impact on the energy consumption of the target building. (2) Time axis isolation rule: guides the large language model to determine the actual occurrence time of the core event in the event text. If the actual occurrence time is not within the time period, then immunization is triggered. (3) Substantial physical intervention identification rules: guide the large language model to identify whether the event text contains substantive physical equipment modification or energy consumption-related administrative events. If there is no substantive physical intervention content, then immunization is triggered.

[0013] More preferably, in S3, the candidate event text is input into a large language model, and a preset multidimensional semantic immunity rule is applied to filter the candidate event text, outputting the events that pass the immunity rule and their predicted directions of energy consumption impact; specifically including the following steps: The candidate event text and the building identifier of the target building are input into the large language model, and the multidimensional semantic immunity rule is forcibly applied to make judgments one by one; For events retained after filtering through the above-mentioned immune rules, the large language model identifies the feature expressions related to energy consumption changes in the event based on a preset impact feature lexicon, and outputs the predicted impact direction of the event on the energy consumption of the target building and the corresponding judgment reason. The predicted impact direction includes at least energy consumption increase, energy consumption decrease, and no significant impact.

[0014] A further preferred embodiment includes deduplicating the events filtered by the multidimensional semantic immune rules: inputting the filtered events back into the large language model to identify multiple event texts describing the same physical event or the same renovation project, and merging them into a single entry.

[0015] Further preferably, the filtered events are input again into the large language model to identify multiple event texts describing the same physical event or the same renovation project, and then merge them into a single entry; specifically including: The large language model extracts physical entity identification information and spatiotemporal attribute information from the text of each event. The physical entity identification information includes the name of the renovation project, the name of the equipment, the location of the project, and the construction unit. The spatiotemporal attribute information includes the start time of the project, the end time of the project, and the geographical location of the event. The large language model performs semantic similarity comparison on the physical entity identification information and spatiotemporal attribute information of each event text. When the physical entity identification information of multiple event texts points to the same physical device or the same renovation project, and the spatiotemporal attribute information overlaps or is continuous within a preset tolerance range, the large language model determines that the multiple event texts describe the same physical event. The large language model merges multiple event texts that are determined to be the same physical event into a single entry, retains the event text with the highest information completeness as the content of the merged entry, and discards the remaining redundant event texts. The large language model outputs a single merged entry and marks the entry with a physical unique identifier to ensure that the physical event is assigned a single intervention weight in the subsequent residual fitting process.

[0016] Further preferably, S4 specifically includes the following steps: Quantification conversion step: After deduplication, each event item output is mapped to a numerical impact quantification feature score based on the predicted impact direction determined by the large language model. The impact quantification feature score includes an event increase factor score and an event decrease factor score. Feature concatenation step: The event rise factor score and the event fall factor score are used as external intervention features and concatenated with the basic features used by the basic prediction model to construct a residual fitting input feature vector containing external event variables; Fitting training steps: Establish an extreme gradient boosting tree model, use the residual fitting input feature vector as the input variable, use the energy consumption residual as the fitting target variable, and use the extreme gradient boosting tree algorithm to perform regression fitting training to learn the nonlinear mapping relationship between the event quantification features and the energy consumption residual; Residual prediction output steps: Using the trained extreme gradient boosting tree model, output the residual prediction value within the time period to be analyzed, and calculate the marginal contribution value of each event to the energy consumption residual by analyzing the feature importance score of the extreme gradient boosting tree model, so as to quantify the specific impact value of a single event on building energy consumption fluctuations. Benchmark correction step: Add the residual prediction value to the theoretical energy consumption value to obtain the final energy consumption correction benchmark value after introducing external emergency event variables.

[0017] Further preferably, in S5, the retained events are compared with a preset knowledge base of regular periodic events, events belonging to regular periodic fluctuations are eliminated, and key attribution events are identified, specifically including: The predicted impact direction of each event output by the large language model on the energy consumption of the target building is obtained. The predicted impact direction includes energy consumption increase, energy consumption decrease, and no significant impact. At the same time, the actual change direction of the energy consumption residual is obtained. The predicted impact direction of each event is compared with the actual change direction of the energy consumption residual on an event-by-event basis. Only when both the predicted impact direction and the actual change direction are energy consumption increase or energy consumption decrease, the event is determined to pass the direction consistency check and is retained. When the predicted impact direction is no significant impact or is opposite to the actual change direction, the event is determined to fail the direction consistency check and is discarded. A knowledge base of regular periodic events is pre-built and stored. The knowledge base of regular periodic events records known regular fluctuation factors, including statutory holidays, winter and summer vacations, seasonal transition periods, and alternation cycles of weekends and workdays, as well as historical energy consumption impact feature templates corresponding to each fluctuation factor. Each event retained after passing the directional consistency check is matched with the fluctuation factors recorded in the conventional periodic event knowledge base. If the feature of an event matches the feature of any fluctuation factor in the conventional periodic event knowledge base more than a preset threshold, the event is determined to be background noise caused by conventional periodic fluctuations and is removed. Events that have passed the directional consistency check and have not been eliminated are identified as key attribution events that cause abnormal energy consumption fluctuations in the target building during the analysis period. The key attribution events and their corresponding predicted impact directions are then output.

[0018] The present invention also provides a building energy consumption change analysis system based on large language model and public event mining, including: a data access and initialization module, used to acquire and store the attribute information and historical energy consumption time series data of the target building, and receive the analysis time period set by the user; The energy consumption trend analysis module extracts structured data within the time period, establishes a basic prediction model based on multi-source building information and the structured data, calculates the theoretical basic energy consumption value of the target building within the time period, and calculates the difference between the actual energy consumption value and the theoretical basic energy consumption value as the energy consumption residual. An external event parallel retrieval module is used to dynamically construct web retrieval instructions based on the geographical location of the target building and the time period, and to obtain candidate event texts from the Internet; The semantic parsing module of the large language model based on immune rules has pre-set multi-dimensional semantic immune rules. These rules are used to input the candidate event text into the large language model, filter the candidate event text using the pre-set multi-dimensional semantic immune rules, and output the events that pass the immune rules and their predicted directions of energy consumption impact. The events that pass the immune rules are transformed into structured quantitative feature scores, which are then used as intervention features and input into the residual fitting model to fit and train the energy consumption residuals, outputting the residual prediction values. The association filtering and key event identification module has an internal knowledge base of regular periodic events, which is used to verify the consistency between the direction of the event's impact and the actual energy consumption change trend, and compare it with the knowledge base of regular periodic events to eliminate regular periodic fluctuation events and lock in key attribution events. The automatic report generation module is used to extract the key attribution events and their impact analysis, as well as the energy consumption residual data, and fill them into a preset structured report template to output an attribution analysis report.

[0019] Preferably, the semantic parsing module of the large language model based on immune rules is further provided with a deduplication unit. The deduplication unit is used to re-input the events filtered by the multidimensional semantic immune rules into the large language model, identify multiple event texts describing the same physical event or the same renovation project, and merge them into a single entry.

[0020] The building energy consumption analysis method and system based on large language models and event mining disclosed in this application have at least the following advantages compared with the prior art: 1. This invention pre-sets three immune rules: physical entity isolation, time axis isolation, and identification of substantial physical intervention. It forces the large language model to judge each rule one by one, which can effectively filter out interference events and fundamentally solve the common industry problem of "not being able to understand physical attribution, not being able to distinguish the time sequence, and not being able to distinguish between virtual and real transformations" in the general large language model in the building energy consumption attribution scenario.

[0021] 2. This invention utilizes a large language model to identify and merge multiple reports describing the same physical modification project, ensuring that a single physical event is assigned only a single intervention weight in subsequent residual fitting, effectively avoiding the problem of feature weight superposition caused by repeated media reports. This mechanism, together with the immune rule, constitutes a complete quality assurance system for semantic parsing of the large language model.

[0022] 3. This invention transforms the event impact direction output by the large language model into a numerical quantitative feature score. By fitting the energy consumption residuals using the XGBoost model and combining it with feature importance analysis, the specific contribution of each event to energy consumption fluctuations can be accurately calculated. Through a hybrid modeling architecture that combines linear regression and XGBoost, linear regression is responsible for explaining conventional factors such as weather and holidays, while XGBoost is responsible for capturing the nonlinear impact of external emergencies. The two are superimposed to form the final energy consumption correction benchmark that incorporates external variables. This architecture, through a layered decoupling design of "basic model stripping away conventional factors + residual model capturing abnormal factors," allows the output of the large language model to be effectively integrated into the traditional physical modeling framework, achieving synergistic effects between artificial intelligence technology and building physics models. Attached Figure Description

[0023] Figure 1 This is a flowchart illustrating the building energy consumption analysis method based on large language models and event mining provided by the present invention.

[0024] Figure 2 The module structure diagram of the building energy consumption change analysis system based on large language model and public event mining provided by the present invention.

[0025] Figure 3 This is a logical schematic diagram of the hybrid modeling of energy consumption trends and the core algorithm architecture in an embodiment of the present invention.

[0026] Figure 4 This is a time-series curve comparison of the attribution results of abnormal energy consumption in a middle school based on the LLM hybrid model in an embodiment of the present invention. Detailed Implementation

[0027] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0028] like Figure 1 As shown, one embodiment of the present invention provides a building energy consumption analysis method based on large language models and event mining, which includes the following steps: S1. Obtain multi-source building information of the target building, including the target building's attribute information and historical energy consumption data, and set the time period to be analyzed; First, obtain detailed information about the target building from a database or external interface, including the building name, geographical location (province, city, administrative division), building type (office building, school, hospital, stadium, etc.), purpose, historical energy consumption data (electricity, water, gas, etc., usually time series data, hourly, daily, or monthly energy consumption data), and the specific time period to be analyzed. This information forms the basis for subsequent event queries and energy consumption change analysis.

[0029] S2. Extract the structured data within the time period, establish a basic prediction model based on multi-source building information and the structured data, calculate the theoretical basic energy consumption value of the target building within the time period, and calculate the difference between the actual energy consumption value and the theoretical basic energy consumption value as the energy consumption residual. The basic prediction model is established based on the structured operational data, wherein the structured operational data includes meteorological data and time feature data; Establishing a basic prediction model involves the following steps: S201: Obtain historical energy consumption data and corresponding structured operation data of the target building, and divide them into cooling scenario datasets and heating scenario datasets according to temperature conditions; S202: Extract feature variables from the cooling scenario dataset and the heating scenario dataset respectively. The feature variables include average temperature, temperature square term, interaction term between temperature and building usage days, and date feature of whether it is a holiday. S203: For the cooling scenario and the heating scenario respectively, using the feature variables as input and the corresponding historical energy consumption data as output target, a linear regression algorithm is used for training to fit the linear relationship weight coefficient between the feature variables and energy consumption, thereby obtaining the basic prediction sub-model for the cooling scenario and the basic prediction sub-model for the heating scenario. S204: Input the meteorological and date characteristics within the time period to be analyzed into the corresponding basic prediction sub-model, and output the theoretical basic energy consumption value of the target building within the time period.

[0030] The specific implementation of the basic prediction model and the calculation of energy consumption residuals is as follows: First, the system extracts structured data and multi-source building information within the specified time period and performs feature engineering. The multi-source building information includes the building area of ​​the target building. Square meters, building function and business type as well as Air conditioning system type; the structured data includes daily meteorological data and building operation data. The system calculates a daily cooling index reflecting climate intervention based on daily temperature data. Daily popularity index The calculation formulas are as follows: ,in The preset cooling reference temperature (e.g., 26°C); This is daily temperature data.

[0031] ,in The preset heating reference temperature (e.g., 18°C).

[0032] At the same time, work-rest patterns are constructed by combining building operation data, including the proportion of actual operating days. (The proportion of actual energy consumption days to the total number of calendar days within the cycle) and holiday masking (The value is 1 during winter and summer vacations or statutory holidays, and 0 during normal operating days).

[0033] Secondly, based on the historical energy consumption data of the target building as a baseline training set, a multivariate linear basic prediction model is constructed to eliminate the fundamental impact of drastic weather fluctuations and changes in regular work and rest schedules on energy consumption. This basic prediction model is then used to calculate the theoretical basic energy consumption value of the target building within the evaluation time period t. The calculation formula is: In the formula, The energy consumption coefficient per unit area is the benchmark energy consumption coefficient. The daily energy consumption sensitivity coefficient is the coefficient for cooling. The heat-sensitive coefficient is the daily energy consumption coefficient. The weighting coefficient for the number of operating days. This is a deduction factor for holiday energy consumption. The energy consumption term for the building foundation is fixed and maintained; the above undetermined coefficients are all obtained by fitting the historical baseline dataset using the least squares method combined with a regularization penalty term.

[0034] Finally, the system obtains the actual meter reading energy consumption value of the target building within the time period t. The actual energy consumption value is then compared with the theoretical energy consumption value calculated using the above formula. By subtracting the values, we obtain the energy consumption residual after removing the effects of meteorological factors and regular work and rest schedules. The calculation formula is: The resulting energy consumption residual This serves as an input in subsequent steps to characterize the marginal impact of non-meteorological, non-periodic sudden public events (such as renovation and expansion, sudden equipment start-up and shutdown) on energy consumption.

[0035] S3. Based on the geographical location of the target building and the time period, construct a web search query and obtain candidate event text from the Internet; input the candidate event text into a large language model, apply a preset multidimensional semantic immunity rule to filter the candidate event text, and output the events that pass the immunity rule and their predicted directions of energy consumption impact. The multidimensional semantic immunity rules specifically include: (1) Physical bearer entity isolation rule: guides the big language model to identify the real physical bearer entity of the action in the event text. If the target building is only the action issuer in the event text (such as external assistance, financial donation, visit and exchange, etc.) but the actual physical construction occurs in a third party, then immunity is triggered, and it is determined that the event has no impact on the energy consumption of the target building. (2) Time axis isolation rule: guides the large language model to determine the actual occurrence time of the core event in the event text. If the actual occurrence time is not within the time period, then immunization is triggered. (3) Substantive physical intervention identification rules: guide the large language model to identify whether the event text contains substantive physical equipment modification or energy consumption-related administrative events (such as simple meetings, plaques, awards, etc. without substantive physical equipment modification or administrative events). If there is no substantive physical intervention content, then immunization is triggered.

[0036] To avoid unordered retrieval, the system first performs regular expression processing and alias generation on the target building names: (1) Remove city prefixes using regular expressions; (2) Extract numerals through regular expression matching, for example: ([one two three four...0-9]+(middle school|school|hospital)) and automatically generate abbreviations and aliases (such as "a middle school in city A" which generates "a middle school", "a middle school", "1st middle school", etc.). (3) Mount industry-standard pronoun mapping dictionary (schools mount “our school”, “this school”; hospitals mount “this hospital”, “our hospital”, etc.).

[0037] Subsequently, based on the keyword database loaded in the construction industry: matching for schools ["new", "expansion", "renovation", "new campus", "smart campus", "photovoltaic", "contract energy management", etc.]; matching for hospitals ["new hospital area", "fever clinic", "CT", "MRI", "nuclear magnetic resonance", "photovoltaic", etc.].

[0038] Finally, the standard API query command is automatically generated, for example: Query="City A" AND("A Middle School in City A" OR "Middle School" OR "Middle School") AND("2026") AND("New Construction" OR "Renovation" OR "Photovoltaic" OR "Large Equipment").

[0039] In S3, candidate event texts are input into a large language model, and pre-defined multi-dimensional semantic immunity rules are applied to filter the candidate event texts. The output includes events that pass the immunity rules and their predicted directions of energy consumption impact. Specifically, the steps are as follows: The candidate event text and the building identifier of the target building are input into the large language model, and the multidimensional semantic immunity rule is forcibly applied to make judgments one by one; For events retained after filtering through the above-mentioned immune rules, the large language model identifies the feature expressions related to energy consumption changes in the event based on a preset impact feature lexicon, and outputs the predicted impact direction of the event on the energy consumption of the target building and the corresponding judgment reason. The predicted impact direction includes at least energy consumption increase, energy consumption decrease, and no significant impact.

[0040] Taking the "school" business as an example, the influence of the feature word library is partially as follows: It is divided into three weight levels: High-impact physical projects: new construction, expansion, renovation, new campuses, new research institutes, completion, relocation, mergers, photovoltaic projects, etc. Medium impact - Equipment level: Large equipment, procurement, introduction, commissioning, replacement, CT, MRI, data centers, etc.; Low Impact - Operational Level: Public health events, school closures, online teaching, etc.

[0041] For events not immune to the above rules, the large model outputs the predicted direction and reasons for the impact of each event on energy consumption based on preset feature words, such as the introduction of high-energy-consuming equipment being judged as an increase; the implementation of photovoltaic and energy-saving renovations being judged as a decrease.

[0042] For conditions deemed as an increase in energy consumption, the text must clearly state that the target building headquarters has undergone new construction, expansion, completion of a new campus, or commencement or commissioning of building renovation and expansion projects, resulting in an increase in the physical energy-consuming area; or the text must clearly state that the target building headquarters has introduced or commissioned large-scale high-energy-consuming equipment, such as newly built data centers, computer rooms, or large medical CT scanners, resulting in a sudden increase in power load. For conditions deemed as a decrease in energy consumption, the text must clearly state that the target building headquarters has implemented photovoltaic or solar energy installation and grid connection, energy performance contracting, or energy-saving renovation of high-efficiency equipment, lighting renovation, or building envelope renovation, resulting in an improvement in energy efficiency per unit area; or the text must clearly state that the target building headquarters has experienced long-term school closures, business shutdowns, or full online teaching, resulting in a precipitous drop in building energy demand. For candidate events that do not meet the above conditions for increase or decrease, or that trigger the aforementioned immunity rules, they are deemed to have no significant impact.

[0043] It should be noted that, preferably, the process also includes deduplicating the events filtered by the multidimensional semantic immune rules: the filtered events are input again into the large language model to identify multiple event texts describing the same physical event or the same renovation project, and these are merged into a single entry; the event set after the initial screening is input into the large language model a second time to perform deduplication logic. If multiple texts describe "the same physical event or renovation project," regardless of differences in their media source, title, or publication time, the system determines that they have physical identity, merges them into a single entry, and retains the record with the most detailed information.

[0044] Specifically, it includes: The large language model extracts physical entity identification information and spatiotemporal attribute information from the text of each event. The physical entity identification information includes the name of the renovation project, the name of the equipment, the location of the project, and the construction unit. The spatiotemporal attribute information includes the start time of the project, the end time of the project, and the geographical location of the event. The large language model performs semantic similarity comparison on the physical entity identification information and spatiotemporal attribute information of each event text. When the physical entity identification information of multiple event texts points to the same physical device or the same renovation project, and the spatiotemporal attribute information overlaps or is continuous within a preset tolerance range, the large language model determines that the multiple event texts describe the same physical event. The large language model merges multiple event texts that are determined to be the same physical event into a single entry, retains the event text with the highest information completeness as the content of the merged entry, and discards the remaining redundant event texts. The large language model outputs a single merged entry and marks the entry with a physical unique identifier to ensure that the physical event is assigned a single intervention weight in the subsequent residual fitting process.

[0045] S4. The events identified through the immunization rules are transformed into structured quantitative feature scores. These scores are then used as intervention features and input into the residual fitting model to train the energy consumption residuals, outputting predicted residual values, such as event escalation factor scores and event descent factor scores. Subsequently, the system uses these quantitative scores as intervention features and, combined with the Extreme Gradient Boosting Tree (XGBoost) algorithm, performs secondary training and fitting on the "energy consumption residuals" obtained in step two. Finally, the "base model predicted values" plus the "residual model predicted values" constitute the final energy consumption benchmark incorporating external sudden event variables.

[0046] Specifically, the following steps are included: Quantification conversion step: After deduplication, each event item output is mapped to a numerical impact quantification feature score based on the predicted impact direction determined by the large language model. The impact quantification feature score includes an event increase factor score and an event decrease factor score. Each event entry is input into the large language model, which outputs the event's classification impact score and confidence. The system then calculates the relevance weights based on alias matching and strong validation. The formula for calculating the quantitative intervention score for a single event is as follows: Score = impact_score × ×confidence This score is used as an intervention feature concatenation input into the XGBoost model to evaluate the energy consumption residual. Regression fitting training is performed to calculate the marginal contribution of a single event to energy consumption fluctuations.

[0047] The confidence level is used to characterize the degree of confidence that the large language model determines the predicted direction of the impact of the event; the impact level is determined by the large language model by matching the event text based on a preset impact feature lexicon. The impact feature lexicon is divided into three weight levels as described above: high impact - entity level, medium impact - device level, and low impact - operation level. The three weight levels correspond to different preset level weights. When the predicted impact direction is an increase in energy consumption, the event's level weight is multiplied by the confidence level to obtain the event's increase factor score, and the event's decrease factor score is set to zero; when the predicted impact direction is a decrease in energy consumption, the event's level weight is multiplied by the confidence level to obtain the event's decrease factor score, and the event's increase factor score is set to zero; when the predicted impact direction is no significant impact, both the event's increase factor score and the event's decrease factor score are set to zero. Feature concatenation step: The event rise factor score and the event fall factor score are used as external intervention features and concatenated with the basic features used by the basic prediction model to construct a residual fitting input feature vector containing external event variables; Fitting training steps: Establish an extreme gradient boosting tree model, use the residual fitting input feature vector as the input variable, use the energy consumption residual as the fitting target variable, and use the extreme gradient boosting tree algorithm to perform regression fitting training to learn the nonlinear mapping relationship between the event quantification features and the energy consumption residual; Residual prediction output steps: Using the trained extreme gradient boosting tree model, output the residual prediction value within the time period to be analyzed, and calculate the marginal contribution value of each event to the energy consumption residual by analyzing the feature importance score of the extreme gradient boosting tree model, so as to quantify the specific impact value of a single event on building energy consumption fluctuations. Benchmark correction step: Add the residual prediction value to the theoretical energy consumption value to obtain the final energy consumption correction benchmark value after introducing external emergency event variables.

[0048] like Figure 3As shown, the system inputs features such as structured building data into the "basic prediction model" to obtain the "basic energy consumption prediction value," which is then subtracted from the "actual energy consumption" to obtain the "energy consumption residual." Simultaneously, unstructured text is used to extract the "event quantitative score" through LLM semantic parsing. This score, along with the energy consumption residual, is input into the "XGBoost residual fitting model," which outputs the residual prediction value and feature importance. Finally, the sum of the two yields the predicted energy consumption baseline value, enabling energy consumption anomaly attribution analysis.

[0049] S5. Verify the consistency between the predicted direction of energy consumption impact output by the large language model and the actual energy consumption change trend, and retain events with consistent directions; compare the retained events with the preset knowledge base of regular periodic events, eliminate events that belong to regular periodic fluctuations, and lock in key attribution events. Specifically, it includes: The predicted impact direction of each event output by the large language model on the energy consumption of the target building is obtained. The predicted impact direction includes energy consumption increase, energy consumption decrease, and no significant impact. At the same time, the actual change direction of the energy consumption residual is obtained. The predicted impact direction of each event is compared with the actual change direction of the energy consumption residual on an event-by-event basis. Only when both the predicted impact direction and the actual change direction are energy consumption increase or energy consumption decrease, the event is determined to pass the direction consistency check and is retained. When the predicted impact direction is no significant impact or is opposite to the actual change direction, the event is determined to fail the direction consistency check and is discarded. A knowledge base of regular periodic events is pre-built and stored. The knowledge base of regular periodic events records known regular fluctuation factors, including statutory holidays, winter and summer vacations, seasonal transition periods, and alternation cycles of weekends and workdays, as well as historical energy consumption impact feature templates corresponding to each fluctuation factor. Each event retained after passing the directional consistency check is matched with the fluctuation factors recorded in the conventional periodic event knowledge base. If the feature of an event matches the feature of any fluctuation factor in the conventional periodic event knowledge base more than a preset threshold, the event is determined to be background noise caused by conventional periodic fluctuations and is removed. Events that have passed the directional consistency check and have not been eliminated are identified as key attribution events that cause abnormal energy consumption fluctuations in the target building during the analysis period. The key attribution events and their corresponding predicted impact directions are then output.

[0050] First, the system compares the predicted impact direction of the event from the large language model with the calculated actual energy consumption trend. Only when the two directions align—for example, if actual energy consumption increases and the model predicts the event will also lead to increased energy consumption—is the event retained as a valid candidate event. Then, to eliminate interference from routine changes, the system matches the retained candidate events with a built-in "routine periodic event knowledge base." This knowledge base pre-stores known regular fluctuations such as public holidays and seasonal transitions. If a candidate event falls within the normal range, it is judged as background noise and eliminated, ultimately identifying key attribution events with both suddenness and practical explanatory power.

[0051] Taking the "school" sector as an example, its specific structure and examples include: First, statutory holidays and regular long holidays, including nationally unified statutory holidays such as Spring Festival, National Day, and Labor Day, as well as the inherent winter and summer vacations of the school sector; Second, periodic teaching and operational activities, including regular school activities that recur annually, such as the start of the school year, final exam week, regular annual sports meets, open days, and graduation ceremonies; Third, seasonal energy system switching nodes, including routine equipment start-up and shutdown cycles based on climate patterns, such as the transition period between heating and cooling in central heating systems and the unified start-up and shutdown of air conditioning systems in summer. Other sectors also have periodic event databases following this pattern.

[0052] S6. Integrate the key attribution events and their impact analysis, and the energy consumption residual data to generate a structured attribution analysis report.

[0053] By integrating key events selected through multiple screening processes, the judgment and analysis process generated by the Large Language Model (LLM), and actual energy consumption fluctuation data, a comprehensive and standardized attribution analysis report is constructed using a pre-defined report template. This report clearly presents the quantitative indicators of anomalies, the descriptions of key disturbance factors, and, combined with the reasoning logic of the Large Language Model (LLM), elucidates the causal relationship between external events and energy consumption fluctuations. Its final output provides intuitive and efficient data support for energy consumption auditing and management decisions.

[0054] like Figure 2 As shown, the present invention also provides a building energy consumption change analysis system based on large language models and public event mining, including: The data access and initialization module is used to acquire and store the attribute information and historical energy consumption time series data of the target building, and to receive the analysis time period set by the user. The energy consumption trend analysis module extracts structured data within the time period, establishes a basic prediction model based on multi-source building information and the structured data, calculates the theoretical basic energy consumption value of the target building within the time period, and calculates the difference between the actual energy consumption value and the theoretical basic energy consumption value as the energy consumption residual. An external event parallel retrieval module is used to dynamically construct web retrieval instructions based on the geographical location of the target building and the time period, and to obtain candidate event texts from the Internet; The semantic parsing module of the large language model based on immune rules has pre-set multi-dimensional semantic immune rules. These rules are used to input the candidate event text into the large language model, filter the candidate event text using the pre-set multi-dimensional semantic immune rules, and output the events that pass the immune rules and their predicted directions of energy consumption impact. The events that pass the immune rules are transformed into structured quantitative feature scores, which are then used as intervention features and input into the residual fitting model to fit and train the energy consumption residuals, outputting the residual prediction values. Preferably, the module also includes a deduplication unit, which is used to re-input the events filtered by the multidimensional semantic immune rules into the large language model, identify multiple event texts describing the same physical event or the same renovation project, and merge them into a single entry.

[0055] The association filtering and key event identification module has an internal knowledge base of regular periodic events, which is used to verify the consistency between the direction of the event's impact and the actual energy consumption change trend, and compare it with the knowledge base of regular periodic events to eliminate regular periodic fluctuation events and lock in key attribution events. The automatic report generation module is used to extract the key attribution events and their impact analysis, as well as the energy consumption residual data, and fill them into a preset structured report template to output an attribution analysis report.

[0056] To more clearly illustrate the technical effects of this invention, the system execution process is demonstrated in detail using the energy consumption baseline anomaly attribution analysis of the target building "a key middle school in a certain city" in year X as an example: The system obtained the middle school's actual electricity consumption for year X as 1,871,700 yuan. The system first invoked the "basic prediction model," calculating a theoretical basic energy consumption value of 1,693,500 yuan. An "energy consumption residual" exists between the actual value and the basic prediction value. The system determined that this residual cannot be explained by factors such as regular weather, indicating an abnormal fluctuation, and triggered a large-scale model attribution analysis process based on external events.

[0057] The system retrieved candidate event texts from the internet via the Web search module, including the following four related news items about the middle school in year X: Event A: "Our school's newly built high-standard constant-temperature swimming pool officially went into use this month" (Published in March of year X); Event B: "Energy-Saving Campus: Our School Signs Rooftop Photovoltaic Installation Agreement with a Company" (Published in July of Year X); Event C: "Our school's teaching building rooftop photovoltaic panels are fully connected to the grid for power generation" (Published in August of year X).

[0058] Input the above 3 texts into a large language model module with multi-dimensional semantic immune rules: (1) For events B and C, the large model triggers the "physical event identity deduplication" logic, identifies that the two describe different stages of the same physical project, and merges them into a single entry "implementation of photovoltaic grid connection (decline event)".

[0059] (2) The large model outputs clear quantification factors: event A (rising score), and events BC combined (falling score).

[0060] Residual fitting and report generation: The aforementioned quantification factors were input into the XGBoost residual fitting model for calculation. The model, incorporating past weighting characteristics, calculated that event A (the heated swimming pool) contributed approximately +198,000 yuan in energy consumption increment residual, while the merged event BC (grid-connected photovoltaic system) resulted in approximately -85,600 yuan in energy consumption reduction residual. The final merged correction baseline value obtained by the system was: 1,693,500 yuan (baseline) + 198,000 yuan (swimming pool increment) - 85,600 yuan (photovoltaic reduction) = 1,805,900 yuan.

[0061] At the same time, a structured attribution report was generated, which clearly pointed out that the energy consumption anomaly this year was mainly caused by the "commissioning of the swimming pool" and pointed out that "grid connection of photovoltaics" played a part in reducing energy consumption, eliminating the interference of irrelevant news and realizing automated anomaly attribution.

[0062] like Figure 4 As shown in the figure, this graph illustrates the final fitting effect of the hybrid algorithm model of this invention in year X. The graph contains three time-series curves: the actual energy consumption curve (solid line), the traditional prediction baseline curve (dashed line), and the LLM hybrid correction baseline curve of this invention (dotted line). Combining the time nodes on the X-axis, it can be seen that: in March, the Large Language Model (LLM) successfully extracted the actual energy consumption increase event (the swimming pool being put into use), and the model applied a positive residual (+198,000 yuan); in July-August, LLM performed identity merging and deduplication on two events related to photovoltaic grid connection and applied a negative residual (-85,600 yuan); in October, facing an event containing the high-energy-consuming term "computer room," the model did not apply a residual because it triggered the entity isolation immunity rule of LLM. Finally, the system corrected the basic predicted value of 1,693,500 yuan to 1,805,900 yuan, demonstrating the technical effectiveness of the semantic denoising mechanism and residual fitting model of this invention in improving attribution accuracy.

[0063] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.

Claims

1. A building energy consumption analysis method based on large language models and event mining, characterized in that, Includes the following steps: S1. Obtain multi-source building information of the target building, including the target building's attribute information and historical energy consumption data, and set the time period to be analyzed; S2. Extract the structured data within the time period, establish a basic prediction model based on multi-source building information and the structured data, calculate the theoretical basic energy consumption value of the target building within the time period, and calculate the difference between the actual energy consumption value and the theoretical basic energy consumption value as the energy consumption residual. S3. Based on the geographical location of the target building and the time period, construct a web search query and obtain candidate event text from the Internet; The candidate event text is input into the large language model, and the candidate event text is filtered by a preset multidimensional semantic immune rule. The event that passes the immune rule and its predicted direction of energy consumption impact are output. S4. Transform the events through the immune rules into structured quantitative feature scores, use the quantitative feature scores as intervention features, input them into the residual fitting model, perform fitting training on the energy consumption residuals, and output the residual prediction values. S5. Verify the consistency between the predicted direction of energy consumption impact output by the large language model and the actual energy consumption change trend, and retain events with consistent directions. The retained events are compared with a pre-set knowledge base of regular periodic events, events that belong to regular periodic fluctuations are eliminated, and key attribution events are identified. S6. Integrate the key attribution events and their impact analysis, and the energy consumption residuals to generate a structured attribution analysis report.

2. The building energy consumption analysis method based on large language model and event mining according to claim 1, characterized in that: In S2, a basic prediction model is established based on multi-source building information and the structured data, wherein the structured data includes meteorological data and temporal characteristic data; establishing the basic prediction model includes the following steps: S201: Obtain historical energy consumption data and corresponding structured data of the target building, and divide it into cooling scenario dataset and heating scenario dataset according to temperature conditions; S202: Extract feature variables from the cooling scenario dataset and the heating scenario dataset respectively. The feature variables include average temperature, temperature square term, interaction term between temperature and building usage days, and date feature of whether it is a holiday. S203: For the cooling scenario and the heating scenario respectively, using the feature variables as input and the corresponding historical energy consumption data as output target, a linear regression algorithm is used for training to fit the linear relationship weight coefficient between the feature variables and energy consumption, thereby obtaining the basic prediction sub-model for the cooling scenario and the basic prediction sub-model for the heating scenario. S204: Input the meteorological and date characteristics within the time period to be analyzed into the corresponding basic prediction sub-model, and output the theoretical basic energy consumption value of the target building within the time period.

3. The building energy consumption analysis method based on large language model and event mining according to claim 1, characterized in that: In S3, the multidimensional semantic immunity rules include: (1) Physical entity isolation rule: guides the large language model to identify the real physical entity that bears the action in the event text. If the target building is only the action issuer in the event text but the actual physical construction occurs in a third party, then immunity is triggered, and it is determined that the event has no impact on the energy consumption of the target building. (2) Time axis isolation rule: guides the large language model to determine the actual occurrence time of the core event in the event text. If the actual occurrence time is not within the time period, then immunization is triggered. (3) Substantial physical intervention identification rules: guide the large language model to identify whether the event text contains substantive physical equipment modification or energy consumption-related administrative events. If there is no substantive physical intervention content, then immunization is triggered.

4. The building energy consumption analysis method based on large language model and event mining according to claim 3, characterized in that: S3 specifically includes the following steps: The candidate event text and the building identifier of the target building are input into the large language model, and the multidimensional semantic immunity rule is forcibly applied to make judgments one by one; For events retained after filtering through each immune rule, the large language model identifies the feature expressions related to energy consumption changes in the event based on a preset impact feature lexicon, and outputs the predicted impact direction of the event on the energy consumption of the target building and the corresponding judgment reason. The predicted impact direction includes at least energy consumption increase, energy consumption decrease, and no significant impact.

5. The building energy consumption analysis method based on large language model and event mining according to claim 4, characterized in that: It also includes deduplicating events filtered by the multidimensional semantic immune rules: inputting the filtered events back into the large language model to identify multiple event texts describing the same physical event or the same renovation project, and merging them into a single entry.

6. The building energy consumption analysis method based on large language model and event mining according to claim 5, characterized in that, The filtered events are then input back into the large language model to identify multiple event texts describing the same physical event or the same renovation project, and these are merged into a single entry; specifically including: The large language model extracts physical entity identification information and spatiotemporal attribute information from the text of each event. The physical entity identification information includes the name of the renovation project, the name of the equipment, the location of the project, and the construction unit. The spatiotemporal attribute information includes the start time of the project, the end time of the project, and the geographical location of the event. The large language model performs semantic similarity comparison on the physical entity identification information and spatiotemporal attribute information of each event text. When the physical entity identification information of multiple event texts points to the same physical device or the same renovation project, and the spatiotemporal attribute information overlaps or is continuous within a preset tolerance range, the large language model determines that the multiple event texts describe the same physical event. The large language model merges multiple event texts that are determined to be the same physical event into a single entry, retains the event text with the highest information completeness as the content of the merged entry, and discards the remaining redundant event texts. The large language model outputs a single merged entry and marks the entry with a physical unique identifier to ensure that the physical event is assigned a single intervention weight in the subsequent residual fitting process.

7. The building energy consumption analysis method based on large language model and event mining according to claim 5, characterized in that, S4 specifically includes the following steps: Quantification conversion step: After deduplication, each event item output is mapped to a numerical impact quantification feature score based on the predicted impact direction determined by the large language model. The impact quantification feature score includes an event increase factor score and an event decrease factor score. Feature concatenation step: The event rise factor score and the event fall factor score are used as external intervention features and concatenated with the basic features used by the basic prediction model to construct a residual fitting input feature vector containing external event variables; Fitting training steps: Establish an extreme gradient boosting tree model, use the residual fitting input feature vector as the input variable, use the energy consumption residual as the fitting target variable, and use the extreme gradient boosting tree algorithm to perform regression fitting training to learn the nonlinear mapping relationship between the event quantification features and the energy consumption residual; Residual prediction output steps: Using the trained extreme gradient boosting tree model, output the residual prediction value within the time period to be analyzed, and calculate the marginal contribution value of each event to the energy consumption residual by analyzing the feature importance score of the extreme gradient boosting tree model, so as to quantify the specific impact value of a single event on building energy consumption fluctuations. Benchmark correction step: Add the residual prediction value to the theoretical energy consumption value to obtain the final energy consumption correction benchmark value after introducing external emergency event variables.

8. The building energy consumption analysis method based on large language model and event mining according to claim 5, characterized in that, In S5, the retained events are compared with a pre-defined knowledge base of regular periodic events. Events belonging to regular periodic fluctuations are eliminated, and key attribution events are identified, including: The predicted impact direction of each event output by the large language model on the energy consumption of the target building is obtained. The predicted impact direction includes energy consumption increase, energy consumption decrease, and no significant impact. At the same time, the actual change direction of the energy consumption residual is obtained. The predicted impact direction of each event is compared with the actual change direction of the energy consumption residual on an event-by-event basis. Only when both the predicted impact direction and the actual change direction are energy consumption increase or energy consumption decrease, the event is determined to pass the direction consistency check and is retained. When the predicted impact direction is no significant impact or is opposite to the actual change direction, the event is determined to fail the direction consistency check and is discarded. A knowledge base of regular periodic events is pre-built and stored. The knowledge base of regular periodic events records known regular fluctuation factors, including statutory holidays, winter and summer vacations, seasonal transition periods, and alternation cycles of weekends and workdays, as well as historical energy consumption impact feature templates corresponding to each fluctuation factor. Each event retained after passing the directional consistency check is matched with the fluctuation factors recorded in the conventional periodic event knowledge base. If the feature of an event matches the feature of any fluctuation factor in the conventional periodic event knowledge base more than a preset threshold, the event is determined to be background noise caused by conventional periodic fluctuations and is removed. Events that have passed the directional consistency check and have not been eliminated are identified as key attribution events that cause abnormal energy consumption fluctuations in the target building during the analysis period. The key attribution events and their corresponding predicted impact directions are then output.

9. A building energy consumption analysis system based on large language models and event mining, characterized in that, include: The data access and initialization module is used to acquire and store the attribute information and historical energy consumption time series data of the target building, and to receive the analysis time period set by the user. The energy consumption trend analysis module extracts structured data within the time period, establishes a basic prediction model based on multi-source building information and the structured data, calculates the theoretical basic energy consumption value of the target building within the time period, and calculates the difference between the actual energy consumption value and the theoretical basic energy consumption value as the energy consumption residual. An external event parallel retrieval module is used to dynamically construct web retrieval instructions based on the geographical location of the target building and the time period, and to obtain candidate event texts from the Internet; The semantic parsing module of the large language model based on immune rules has pre-set multi-dimensional semantic immune rules. These rules are used to input the candidate event text into the large language model, filter the candidate event text using the pre-set multi-dimensional semantic immune rules, and output the events that pass the immune rules and their predicted directions of energy consumption impact. The events that pass the immune rules are transformed into structured quantitative feature scores, which are then used as intervention features and input into the residual fitting model to fit and train the energy consumption residuals, outputting the residual prediction values. The association filtering and key event identification module has an internal knowledge base of regular periodic events, which is used to verify the consistency between the direction of the event's impact and the actual energy consumption change trend, and compare it with the knowledge base of regular periodic events to eliminate regular periodic fluctuation events and lock in key attribution events. The automatic report generation module is used to extract the key attribution events and their impact analysis, as well as the energy consumption residual data, and fill them into a preset structured report template to output an attribution analysis report.

10. The building energy consumption analysis system based on large language model and event mining according to claim 9, characterized in that, The semantic parsing module of the large language model based on immune rules also includes a deduplication unit. The deduplication unit is used to re-input the events filtered by the multidimensional semantic immune rules into the large language model, identify multiple event texts describing the same physical event or the same renovation project, and merge them into a single entry.