Intelligent energy consumption model construction system and method based on artificial intelligence

By building a dynamic energy consumption relationship graph system based on Transformer and graph neural network, the problem of insufficient multi-source data integration and real-time response capabilities of existing energy consumption management systems is solved, the deep integration and real-time response of multi-source data are achieved, and the stability and security of the system are improved.

CN120781648AActive Publication Date: 2025-10-14EXANDS INFORMATION TECH CO LTD

Patent Information

Application Number
CN202510716166.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-30
Publication Date
2025-10-14
Estimated Expiration
2045-05-30

AI Technical Summary

Technical Problem

The existing energy consumption management system has significant deficiencies in multi-source data integration and semantic fusion. It is unable to respond in real time to dynamic events such as equipment failures and regional function changes. The layered collaboration capability is insufficient, and the fragmentation and real-time defects of the communication protocol limit the system performance.

Method used

A multi-head self-attention mechanism based on the Transformer neural network and a graph neural network are used to construct a dynamic energy consumption relationship diagram. Combined with the edge-cloud collaborative deployment module, deep fusion and real-time response of multi-source data are achieved. Local decision-making is made at the edge layer through a lightweight model, and cross-regional collaborative strategies are generated at the cloud layer.

Benefits of technology

It achieves deep integration and real-time response of multi-source data, improves the semantic expression ability of data features, ensures that the energy consumption model reflects the real scene in real time, and guarantees the stability and security of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120781648A_ABST
    Figure CN120781648A_ABST
Patent Text Reader

Abstract

The invention discloses an energy consumption model intelligent construction system and method based on artificial intelligence, and relates to the technical field of artificial intelligence, and the system comprises an Internet of Things multi-source data collection module, a data cleaning and space-time calibration module, a multi-source data semantic fusion module, a dynamic energy consumption relation graph construction module, an intelligent decision engine module and an edge-cloud collaborative deployment module. According to the method, multi-source data are fused through a Transform multi-head self-attention mechanism, a dynamic energy consumption relation graph is constructed by using a graph neural network, and dynamic modeling and intelligent regulation and control of energy consumption are realized in combination with an edge-cloud hierarchical decision architecture; the method comprises the steps of data acquisition and standardization, cleaning calibration, semantic fusion, graph modeling, hierarchical decision making and collaborative execution. According to the method, the problems of insufficient data integration and model staticization of a traditional system are solved, the accuracy, real-time performance and global optimization capability of energy consumption management are improved, the method is suitable for scenes such as intelligent buildings, the energy efficiency is remarkably improved, and the data security is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to an artificial intelligence-based energy consumption model intelligent construction system and method. Background Art

[0002] Existing energy consumption management systems have significant deficiencies in multi-source data integration and semantic fusion. On the one hand, the lack of unified sensor and device interface protocols (such as the coexistence of Modbus and MQTT) leads to prominent data silos and requires a large amount of resources for pre-processing. On the other hand, traditional data splicing or rule engines cannot capture the nonlinear correlations between weather, human activities, and equipment status. Manually designed feature engineering is difficult to mine cross-domain dependencies such as "environmental parameters-equipment energy consumption", and the ability to express features is limited. In addition, most systems use physical models or historical statistical models with fixed topology, which cannot respond to dynamic events such as equipment failures and regional function changes in real time. The global retraining mechanism is time-consuming and wastes computing resources, making it difficult to quantify the real-time correlation strength between equipment and regions.

[0003] In terms of decision-making mechanisms and model deployment, traditional systems face the challenge of insufficient hierarchical coordination capabilities. The local control mode lacks a global perspective and may cause cross-regional energy consumption imbalances (such as temperature adjustment in a single area causing overall load fluctuations), while centralized cloud-based decision-making has significant delays (such as the generation of cross-floor coordination strategies requires a response in minutes), and cannot cope with real-time scenarios such as personnel flow and sudden equipment failures. At the same time, the lack of lightweight model compression technology makes it difficult for edge devices to run complex AI models. Centralized training requires uploading raw data, which poses the risk of leaking sensitive information such as personnel activity trajectories and equipment operation details. In addition, cross-building scenarios (such as from office buildings to shopping malls) require retraining of models, resulting in high migration costs and poor versatility.

[0004] The fragmentation of communication protocols and real-time deficiencies further hinder system performance. Proprietary protocols across different vendors complicate system integration, resulting in insufficient data transmission reliability. Network fluctuations in industrial scenarios can lead to command loss. Real-time control commands (such as emergency shutdowns due to equipment failures) can trigger cascading energy consumption anomalies due to communication delays, making them unable to meet the stringent real-time and stability requirements of building energy management.

[0005] Based on the above problems, the present invention proposes an energy consumption model intelligent construction system and method based on artificial intelligence. Summary of the Invention

[0006] The purpose of the present invention is to provide an artificial intelligence-based energy consumption model intelligent construction system and method to solve the problems raised in the prior art.

[0007] To achieve the above object, the present invention provides the following technical solutions:

[0008] An intelligent construction system for energy consumption models based on artificial intelligence includes an Internet of Things multi-source data acquisition module, a data cleaning and spatiotemporal calibration module, a multi-source data semantic fusion module, a dynamic energy consumption relationship graph construction module, an intelligent decision engine module and an edge-cloud collaborative deployment module; the Internet of Things multi-source data acquisition module collects weather data, indoor environmental parameters, equipment operating status and historical energy consumption data in real time through sensors, smart meters and device API interfaces, and provides original input for the data cleaning and spatiotemporal calibration module; the data cleaning and spatiotemporal calibration module is responsible for detecting outliers in the original data, calibrating cross-device timestamps and repairing missing values, and then processing the original data into structured time series data; the multi-source data semantic fusion module generates a data structure containing spatiotemporal features, design features and the like based on the multi-head self-attention mechanism of the Transformer neural network. The fused feature vector of the device coupling relationship and the environmental impact weight is used as the node initial attribute of the dynamic energy consumption relationship graph construction module; the dynamic energy consumption relationship graph construction module is based on the graph neural network, abstracts the equipment and physical areas into nodes, calculates the edge weights between nodes through graph convolution, integrates the time-aware incremental update algorithm, and locally reconstructs the associated subgraph when the equipment fails and the regional function changes; the intelligent decision engine module is based on the dynamic graph structure to construct a two-layer decision-making mechanism. The edge layer adjusts the operating parameters of a single area or equipment in real time based on the subgraph features, and the cloud layer generates cross-regional collaborative strategies through the model predictive control algorithm; the edge-cloud collaborative deployment module is used to build a layered computing architecture. The edge layer deploys a lightweight graph neural network model to process local data and execute edge layer instructions. The cloud layer runs the complete model to integrate the data of the entire building and generate a global strategy.

[0009] The Internet of Things multi-source data acquisition module includes a data acquisition unit and a protocol adaptation unit;

[0010] The data acquisition unit deploys temperature and humidity sensors, light sensors, CO2 concentration sensors, smart meters, and cameras to collect weather data, indoor environmental parameters, equipment operating status, and historical energy consumption data in each area of ​​the building in real time, covering three types of data sources: environment, equipment, and energy consumption.

[0011] The protocol adapter unit develops a protocol parser and, for the Modbus protocol, uses serial communication and Ethernet interfaces to parse data frames and extract numerical data corresponding to register addresses. For the MQTT protocol, it obtains messages by subscribing to specified topics, parses message bodies in JSON format, and uniformly converts the two types of protocol data into XML format data containing timestamps, device identifiers, parameter names, and parameter values. The timestamp adopts the ISO 8601 standard format, and the parameter values ​​are uniformly floating-point types, so that the original data is output to the multi-source data cleaning and spatiotemporal calibration module in a standardized form with a fixed field structure and consistent data type.

[0012] The data cleaning and spatiotemporal calibration module includes an anomaly detection unit, a time calibration unit, and a missing value repair unit;

[0013] The anomaly detection unit uses a two-layer detection mechanism to divide the original data into univariate data and multivariate data. First, the univariate data is preliminarily screened based on the 3σ rule, the mean and standard deviation of each parameter are calculated, and data that deviates from the mean by more than 3 times the standard deviation is marked as a suspected outlier. For multivariate correlation data, the isolation forest algorithm is used to build an anomaly detection model. Nonlinear anomaly patterns are identified by calculating the path length of data points in the random forest. Ultimately, a data set containing normal / abnormal labels is generated to provide a basis for subsequent data repair.

[0014] The time calibration unit, based on the NTP service, obtains standard timestamps from the unified time server within the building and synchronizes and calibrates the timestamps of each device in the raw data. Specifically, it first identifies the original format of the data timestamp and converts it to the ISO 8601 standard format through a format conversion function. It then performs minute-level alignment on the data across devices, normalizing the timestamps of all data points within the same minute to the start of that minute.

[0015] The missing value repair unit uses a bidirectional LSTM neural network to construct a missing value repair model for the data set after anomaly detection. Specifically: the data is divided into independent sequences according to device and parameter type, and 5 valid data points before and after the missing point are used as the input sequence. The forward and backward features are extracted through the bidirectional LSTM network, and the predicted value of the missing point is output through the fully connected layer. For the missing points at the beginning or end of the sequence, forward filling and backward filling are respectively used. The repaired data set forms a two-dimensional table with timestamp as the index and device identification and parameter name as columns, which is associated with the spatial area through field mapping rules and output to the multi-source data semantic fusion module as time series feature input.

[0016] The multi-source data semantic fusion module includes a feature encoding unit, a multi-head attention unit and a fusion output unit;

[0017] The feature encoding unit converts structured time series data into numerical embedding vectors suitable for Transformer processing, while giving the data spatiotemporal location information;

[0018] Specifically: Feature coding is divided into time coding, device and parameter feature coding, and location information coding; for time feature coding, the timestamp is decomposed into periodic features through Fourier transform and converted into a time embedding vector E with dimension T t , where each element corresponds to the sine / cosine function value of different time granularity, the formula is as follows:

[0019]

[0020] Where i is the embedding vector dimension index, and timestamp is the normalized timestamp value;

[0021] For device and parameter feature coding, a dictionary mapping is established for device identification and parameter name respectively, and the embedding matrix and Converted to a device embedding vector E of dimension D d and parameter embedding vector E p ; Among them, V d is the total number of device types, V p is the total number of parameter types; W d The embedding matrix representing the device type maps the discrete device identity to a continuous vector representation; W p The embedding matrix representing the parameter type maps the discrete parameter name to a continuous vector representation; D represents the dimension of the target embedding vector;

[0022] For position information encoding, the spatial position embedding vector E is generated by the regional coordinates (x, y) of the building floor plan s , use linear mapping to convert the coordinate value into a vector of dimension D;

[0023] Finally, the time, device, parameter, and space embedding vectors are added element-wise to obtain the final input vector X, which is input to the multi-head attention unit. The formula is as follows:

[0024] X=E t +E d +E p +E s ;

[0025] The multi-head attention unit uses the Transformer's multi-head self-attention mechanism to calculate the dynamic weights of multi-source data such as weather data, personnel activity data, and equipment status data, and mine cross-domain dependencies;

[0026] Specifically: First, the input vector X is decomposed into h parallel subspaces, hereinafter referred to as heads, and each head independently calculates the attention weight; for the kth head, the query vector is generated by linear transformation Key Vector Value vector in, are all learnable weight matrices; then in each head, the similarity between the query and the key is calculated by dot product, and the attention weight α is obtained after scaling and normalization k , the calculation formula is as follows:

[0027]

[0028] Among them, dk is the vector dimension of a single head, is the scaling factor to stabilize the gradient, T represents the transpose operation of the matrix;

[0029] Finally, the value vector is weighted and summed according to the attention weight to obtain the single-head output Z k , the calculation formula is as follows:

[0030] Z k =α k V k ;

[0031] Then concatenate the outputs of the h heads into the multi-head attention result Z, which is calculated as follows:

[0032] Z=Concat(Z1,Z2,...,Z h );

[0033] The fusion output unit integrates the multi-head attention results to generate a fusion feature vector containing spatiotemporal features, device coupling relationships, and environmental impact weights, which serves as the initial attributes of the nodes in the dynamic energy consumption relationship graph construction module;

[0034] Specifically: First, the multi-head attention result Z is input into the two-layer fully connected feedforward network FFN, and the high-level semantic features are extracted through the nonlinear activation function ReLU. The calculation formula is as follows:

[0035] F=FFN(Z)=σ(ZW1+b1)W2+b2;

[0036] Where W1 and W2 are weight matrices, b1 and b2 are bias vectors, and o' is the activation function;

[0037] Then, the output dimension is adjusted to the node attribute dimension N required by the dynamic energy consumption relationship graph construction module through linear transformation to generate the final fusion feature vector F final ∈R N , each element corresponds to an attribute of the node.

[0038] The dynamic energy consumption relationship graph construction module includes a graph architecture initialization unit, a graph convolution calculation unit, and a dynamic update unit;

[0039] The graph architecture initialization unit is used to abstract the physical entities in the building into nodes of the graph structure, initialize the edges between the nodes based on the spatial position and physical connection, and form the basic frame of the energy consumption relationship graph;

[0040] Specifically: The physical entities in the building are abstracted into nodes of the graph structure, which are divided into device nodes and area nodes; the device nodes correspond to specific equipment in the building, including but not limited to air conditioners, lighting, and elevators, and the node attributes are the fusion feature vectors F output by the multi-source data semantic fusion module.final , including information such as device type, real-time power, and historical energy consumption pattern; the regional nodes correspond to physical areas in the building, including but not limited to floors, rooms, and corridors. Node attributes include spatial coordinates (x, y), area, and functional type, which are obtained through building information models and IoT device deployment locations; then, edges are established based on the installation relationship between devices and regions, and the edge weight is initialized to 1, indicating the basic energy consumption impact; then, edges are established for adjacent regional nodes, and the edge weight is initialized according to the inverse of the spatial distance to characterize the conduction effect of environmental parameters between regions; finally, the output graph structure G0 = (V, E0); where V is the node set and E0 is the initialized edge set;

[0041] The graph convolution calculation unit uses the graph convolution operation of the graph neural network to update node attributes and calculate edge weights using fusion features to quantify the energy consumption correlation strength between devices and regions;

[0042] Specifically: First, the graph convolutional network algorithm is used to achieve iterative updates of node features through neighborhood information aggregation and nonlinear transformation. The formula is as follows:

[0043]

[0044] Among them, H (l) is the node feature matrix of the lth layer, and the initial feature matrix is ​​the fusion feature matrix F final ; is the normalized adjacency matrix, A is the original adjacency matrix, D is the degree matrix; W (l) is the learnable weight matrix of layer l, which is optimized by back propagation; o' is the activation function used to introduce nonlinearity;

[0045] Then the edge weight e is calculated based on the feature similarity of adjacent nodes. ij , the formula is as follows:

[0046]

[0047] where h i ,h j is the feature vector of node i, j, and the edge weight reflects the correlation between the energy consumption patterns of the two;

[0048] Finally, the updated graph structure G = (V, E) is output, where E represents the edge set containing dynamic weights;

[0049] The dynamic update unit is used to monitor equipment failures and regional function change events in real time, trigger a time-series-aware incremental update algorithm, and locally reconstruct node attributes and edge weights of associated subgraphs;

[0050] Specifically: first, real-time event monitoring is performed, for equipment failure, the state data of the equipment is acquired through the multi-source data acquisition module of the Internet of Things, and when the equipment failure is detected, the corresponding node is marked as a failure state; for area change, the area purpose adjustment instruction is received through the building management system, and the function attribute of the area node is updated; then an incremental updating algorithm is used, the affected node set is determined according to the event type, and the corresponding subgraph is extracted For the fault equipment node, the missing value is filled by using historical data and similar equipment characteristics; for the function change area node, the edge weight of the node and the adjacent node is recalculated; then only the affected subgraph G' is executed graph convolution operation, the node feature and the edge weight are updated; finally, the updated dynamic graph structure G is output updated , synchronized to the intelligent decision engine module as the latest state space.

[0051] The intelligent decision engine module includes an edge decision unit, a cloud optimization unit and a policy output unit;

[0052] The edge decision unit is responsible for deploying a lightweight reinforcement learning model, and generates device operation parameter adjustment instructions in real time based on the subgraph features in the dynamic graph structure;

[0053] Specifically: for the model architecture, a Q-Learning model is used, the state space is the subgraph node feature vector h i , and the action space is the adjustable parameters of the device; then the current subgraph is obtained from the dynamic energy consumption relationship graph construction module extracts the target node feature h i as the state s t ; then the action a t is predicted through the model, and the calculation formula is as follows:

[0054] a t =arg max a Q(s t , a; theta);

[0055] Where Q is the action value function, and theta is the model parameter;

[0056] Finally, the result is output to the control parameter corresponding to the policy output unit;

[0057] The cloud optimization unit is used to run a complete reinforcement learning model, combined with a model predictive control algorithm, to generate a cross-regional collaborative strategy based on the global graph structure G updated ;

[0058] Specifically: first, the whole building graph structure is encoded into a state vector S=(h1, h2,..., h n ); wherein h iAs a device / region node feature, it contains spatio-temporal features and energy consumption correlation weights. Then, through a prediction model, the state evolution of the future T steps is predicted based on a graph neural network, as follows:

[0059] S t+1:T = GNN(S t , A);

[0060] where A is an adjacency matrix;

[0061] Then, the target optimization is performed by minimizing the weighted sum of energy consumption cost and comfort deviation, as follows:

[0062]

[0063] where is the control sequence of the future T steps; E k is the predicted energy consumption value, calculated by aggregating the edge weights in the graph structure; ComfDeviation i (k) is the comfort deviation of region i; is the weight coefficient, which can be configured through the cloud interface;

[0064] The policy output unit is responsible for converting the decision results of the edge layer and the cloud layer into device executable protocol instructions and issuing them to the edge-cloud collaborative deployment module.

[0065] Specifically: first, the action output by the lightweight model is converted into a Modbus protocol register write instruction, then the control sequence optimized by MPC is converted into a JSON format policy file, which is pushed to the edge node through the MQTT protocol; Finally, a unified instruction format specification is defined, including but not limited to device identification, parameter name, target value, execution time window, and ensures that the device identification in the instruction corresponds one-to-one with the node ID in the dynamic energy consumption relationship graph.

[0066] The edge-cloud collaborative deployment module includes an edge computing unit, a cloud hub unit, and a communication interaction unit.

[0067] The edge computing unit is responsible for deploying the lightweight graph neural network model compressed by knowledge distillation technology to complete local data preprocessing, subgraph feature extraction, and edge layer decision execution on the edge node.

[0068] Specifically: first, the knowledge distillation technology is used to migrate the core knowledge of the combined model of the Transformer and the graph neural network to the edge lightweight model, and then the original data collected by the Internet of Things is normalized by calculating the mean and standard deviation of the data to convert the original value into a standard scale feature value; then, based on the local subgraph structure output by the dynamic energy consumption relationship graph construction module, the associated features of the device and regional nodes in the subgraph are extracted through the convolution operation of the graph neural network to form a subgraph feature vector for edge layer decision-making; finally, the edge layer instructions of the intelligent decision engine module are received, and the instructions are converted into device recognizable control signals through the device driver interface to execute real-time local device regulation and control;

[0069] The cloud brain unit is used to run the complete Transformer and graph neural network model, integrate all building and multi-site data, and realize global model training and cross-scene migration through federated learning technology;

[0070] Specifically: the global data integration collects the subgraph feature vectors uploaded by each edge node, and integrates the building information model and historical energy consumption data to construct a global energy consumption relationship graph covering the whole building device and regional association, thereby enhancing the model's learning ability for the overall energy consumption pattern; the federated learning initializes the global model by the cloud, and then each edge node independently trains the model based on local data, only uploads the gradient update information of the model training to the cloud without transmitting the original data, and the cloud updates the global model parameters by aggregating the gradient information of all edge nodes, and distributes the updated model to the edge nodes; the cross-scene migration adjusts the parameters related to regional functions and device types in the model to adapt to new scenes for different building types;

[0071] The communication interaction unit establishes a bidirectional communication channel between the edge node and the cloud server based on the MQTT protocol to realize real-time interaction of subgraph feature uploading and global strategy distribution;

[0072] Specifically: the MQTT protocol is used to define the topic for data interaction; then the JSON format of data interaction is unified, the subgraph feature message includes edge node ID, subgraph ID and feature vector data; the global strategy message includes strategy ID, device identification, regulation and control parameters and target value; finally, the real-time interaction of subgraph feature uploading and global strategy distribution is realized according to the bidirectional channel.

[0073] An artificial intelligence-based energy consumption model intelligent construction method, comprising the following steps:

[0074] S1, real-time collection of weather data, indoor environment parameters, device running status and historical energy consumption data through sensors, smart meters, device API interfaces, unified conversion to standardized XML format data containing timestamp, device identification, parameter name and parameter value after Modbus and MQTT protocol analysis;

[0075] S2, adopt 3o' rule and isolated forest algorithm to detect original data outliers, calibrate cross-device timestamps based on NTP protocol and normalize, use bidirectional LSTM neural network to interpolate missing values, generate time-aligned, spatially-related structured time series data;

[0076] S3, through Fourier transform, embedding matrix mapping and linear transformation, the structured time series data is encoded into embedding vectors containing time, device, parameter and spatial features, and then the multi-head self-attention mechanism of the Transformer neural network is used to generate feature vectors that fuse spatio-temporal features, device coupling relationships and environmental influence weights;

[0077] S4, abstract devices and physical areas as graph nodes, initialize edge weights based on spatial location and physical connection, update node attributes and calculate edge weights through graph convolution operation, integrate time series perception incremental update algorithm, and locally reconstruct the associated subgraph when device failure or area function changes;

[0078] S5, the edge layer adjusts the running parameters of individual areas or devices in real time based on dynamic graph subgraph features through a lightweight reinforcement learning model; the cloud layer generates cross-area collaborative strategies based on the global graph structure through model predictive control algorithm, and constructs a two-layer decision mechanism;

[0079] S6, the edge node converts the decision instructions into Modbus protocol instructions for execution and uploads the subgraph features to the cloud; the cloud integrates all building data optimization model parameters through federated learning, and issues updated models to the edge nodes to realize a collaborative closed loop.

[0080] Compared with the prior art, the beneficial effects of the present application are:

[0081] 1. Deep fusion of multi-source data: through the unified protocol analysis module, heterogeneous data such as Modbus and MQTT are converted into standardized format, multi-dimensional data sources such as weather, environment and device status are integrated, the multi-head self-attention mechanism of the Transformer neural network is used to deeply mine the spatio-temporal correlation and cross-domain dependency between data, eliminate the data island problem, and improve the semantic expression ability of data features, providing structured and semantic high-quality input for subsequent energy consumption modeling;

[0082] 2. Dynamic graph modeling real-time response: based on graph neural network to construct dynamic energy consumption relationship graph, abstract devices and physical areas as nodes, quantify the energy consumption correlation strength between nodes through graph convolution operation, and integrate time sequence perception incremental updating algorithm; when the device fails or the area function changes, only the affected local subgraph is updated for node attribute and edge weight reconstruction, rather than global retraining, which significantly improves the response speed and calculation efficiency of the model to the dynamic changes of the building environment, ensuring that the energy consumption model reflects the real scene in real time;

[0083] 3. Hierarchical decision and communication security: build a hierarchical decision architecture with edge-cloud collaboration, deploy lightweight models on the edge layer to adjust individual device or area parameters based on subgraph features in real time, achieve millisecond-level local response; the cloud layer generates cross-area collaborative strategies through global graph structure and model predictive control algorithm, balancing overall energy consumption and comfort. Combined with knowledge distillation to compress edge models and federated learning to realize global training on the cloud, data privacy is protected while supporting cross-scenario model migration; the communication interaction unit establishes a reliable channel based on the MQTT protocol to ensure real-time issuance of decision instructions and data feedback, improving system stability and security. BRIEF DESCRIPTION OF DRAWINGS

[0084] Fig. 1 The organization structure diagram of the energy consumption model intelligent construction system based on artificial intelligence provided by the application;

[0085] Fig. 2 The working flowchart of the energy consumption model intelligent construction system based on artificial intelligence provided by the application. DETAILED DESCRIPTION

[0086] The technical solutions in the embodiments of the application will be described clearly and completely below with reference to the drawings in the embodiments of the application. Obviously, the described embodiments are only part of the embodiments of the application, rather than all the embodiments of the application. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the application.

[0087] Embodiment: as shown in the figure, the application provides a technical solution, Figs. 1-2

[0088] ​An intelligent construction system for energy consumption models based on artificial intelligence includes an Internet of Things multi-source data acquisition module, a data cleaning and spatiotemporal calibration module, a multi-source data semantic fusion module, a dynamic energy consumption relationship graph construction module, an intelligent decision engine module and an edge-cloud collaborative deployment module; the Internet of Things multi-source data acquisition module collects weather data, indoor environmental parameters, equipment operating status and historical energy consumption data in real time through sensors, smart meters and device API interfaces, and provides original input for the data cleaning and spatiotemporal calibration module; the data cleaning and spatiotemporal calibration module is responsible for detecting outliers in the original data, calibrating cross-device timestamps and repairing missing values, and then processing the original data into structured time series data; the multi-source data semantic fusion module generates a data structure containing spatiotemporal features, design features and the like based on the multi-head self-attention mechanism of the Transformer neural network. The fused feature vector of the device coupling relationship and the environmental impact weight is used as the node initial attribute of the dynamic energy consumption relationship graph construction module; the dynamic energy consumption relationship graph construction module is based on the graph neural network, abstracts the equipment and physical areas into nodes, calculates the edge weights between nodes through graph convolution, integrates the time-aware incremental update algorithm, and locally reconstructs the associated subgraph when the equipment fails and the regional function changes; the intelligent decision engine module is based on the dynamic graph structure to construct a two-layer decision-making mechanism. The edge layer adjusts the operating parameters of a single area or equipment in real time based on the subgraph features, and the cloud layer generates cross-regional collaborative strategies through the model predictive control algorithm; the edge-cloud collaborative deployment module is used to build a layered computing architecture. The edge layer deploys a lightweight graph neural network model to process local data and execute edge layer instructions. The cloud layer runs the complete model to integrate the data of the entire building and generate a global strategy.

[0089] The Internet of Things multi-source data acquisition module includes a data acquisition unit and a protocol adaptation unit;

[0090] The data acquisition unit deploys temperature and humidity sensors, light sensors, CO2 concentration sensors, smart meters, and cameras to collect weather data, indoor environmental parameters, equipment operating status, and historical energy consumption data in each area of ​​the building in real time, covering three types of data sources: environment, equipment, and energy consumption.

[0091] The protocol adapter unit develops a protocol parser and, for the Modbus protocol, uses serial communication and Ethernet interfaces to parse data frames and extract numerical data corresponding to register addresses. For the MQTT protocol, it obtains messages by subscribing to specified topics, parses message bodies in JSON format, and uniformly converts the two types of protocol data into XML format data containing timestamps, device identifiers, parameter names, and parameter values. The timestamp adopts the ISO 8601 standard format, and the parameter values ​​are uniformly floating-point types, so that the original data is output to the multi-source data cleaning and spatiotemporal calibration module in a standardized form with a fixed field structure and consistent data type.

[0092] The data cleaning and spatiotemporal calibration module includes an anomaly detection unit, a time calibration unit, and a missing value repair unit;

[0093] The anomaly detection unit uses a two-layer detection mechanism to divide the original data into univariate data and multivariate data. First, the univariate data is preliminarily screened based on the 3σ rule, the mean and standard deviation of each parameter are calculated, and data that deviates from the mean by more than 3 times the standard deviation is marked as a suspected outlier. For multivariate correlation data, the isolation forest algorithm is used to build an anomaly detection model. Nonlinear anomaly patterns are identified by calculating the path length of data points in the random forest. Ultimately, a data set containing normal / abnormal labels is generated to provide a basis for subsequent data repair.

[0094] The time calibration unit, based on the NTP service, obtains standard timestamps from the unified time server within the building and synchronizes and calibrates the timestamps of each device in the raw data. Specifically, it first identifies the original format of the data timestamp and converts it to the ISO 8601 standard format through a format conversion function. It then performs minute-level alignment on the data across devices, normalizing the timestamps of all data points within the same minute to the start of that minute.

[0095] The missing value repair unit uses a bidirectional LSTM neural network to construct a missing value repair model for the data set after anomaly detection. Specifically: the data is divided into independent sequences according to device and parameter type, and 5 valid data points before and after the missing point are used as the input sequence. The forward and backward features are extracted through the bidirectional LSTM network, and the predicted value of the missing point is output through the fully connected layer. For the missing points at the beginning or end of the sequence, forward filling and backward filling are respectively used. The repaired data set forms a two-dimensional table with timestamp as the index and device identification and parameter name as columns, which is associated with the spatial area through field mapping rules and output to the multi-source data semantic fusion module as time series feature input.

[0096] The multi-source data semantic fusion module includes a feature encoding unit, a multi-head attention unit and a fusion output unit;

[0097] The feature encoding unit converts structured time series data into numerical embedding vectors suitable for Transformer processing, while giving the data spatiotemporal location information;

[0098] Specifically: Feature coding is divided into time coding, device and parameter feature coding, and location information coding; for time feature coding, the timestamp is decomposed into periodic features through Fourier transform and converted into a time embedding vector E with dimension T t , where each element corresponds to the sine / cosine function value of different time granularity, the formula is as follows:

[0099]

[0100] where i is the embedding vector dimension index, and timestamp is the normalized timestamp value;

[0101] For device and parameter feature encoding, dictionaries are established for device identification and parameter name, and embedding matrix and is converted into a device embedding vector E of dimension D d and parameter embedding vector E p ; where V d is the total number of device types, V p is the total number of parameter types; W d represents the embedding matrix of device type, which maps discrete device identification to continuous vector representation; W p represents the embedding matrix of parameter type, which maps discrete parameter name to continuous vector representation; D represents the dimension of the target embedding vector;

[0102] For location information encoding, spatial location embedding vector E s is generated by the area coordinates (x, y) of the building plan, and linear mapping is used to convert the coordinate values into a vector of dimension D.

[0103] Finally, the time, device, parameter, and spatial embedding vectors are added element by element to obtain the final input vector X, which is input into the multi-head attention unit, as follows:

[0104] X = E t + E d + E p + E s ;

[0105] The multi-head attention unit calculates the dynamic weights of weather data, personnel activity data, and device status data through the multi-head self-attention mechanism of Transformer, and excavates cross-domain dependency relationships.

[0106] Specifically: first, the input vector X is decomposed into h parallel subspaces, hereinafter referred to as heads, and each head independently calculates the attention weight; for the kth head, the query vector key vector value vector where are all learnable weight matrices; then, within each head, the similarity between the query and the key is calculated by dot product, and after scaling and normalization, the attention weight α k is obtained, and the calculation formula is as follows:

[0107]

[0108] where dk is the vector dimension of a single head, is the scaling factor to stabilize the gradient, T represents the transpose operation of the matrix;

[0109] Finally, the value vector is weighted and summed according to the attention weight to obtain the single-head output Z k , the calculation formula is as follows:

[0110] Z k =α k V k ;

[0111] Then concatenate the outputs of the h heads into the multi-head attention result Z, which is calculated as follows:

[0112] Z=Concat(Z1,Z2,...,Z h );

[0113] The fusion output unit integrates the multi-head attention results to generate a fusion feature vector containing spatiotemporal features, device coupling relationships, and environmental impact weights, which serves as the initial attributes of the nodes in the dynamic energy consumption relationship graph construction module;

[0114] Specifically: First, the multi-head attention result Z is input into the two-layer fully connected feedforward network FFN, and the high-level semantic features are extracted through the nonlinear activation function ReLU. The calculation formula is as follows:

[0115] F=FFN(Z)=σ(ZW1+b1)W2+b2;

[0116] Where W1 and W2 are weight matrices, b1 and b2 are bias vectors, and o' is the activation function;

[0117] Then, the output dimension is adjusted to the node attribute dimension N required by the dynamic energy consumption relationship graph construction module through linear transformation to generate the final fusion feature vector F final ∈R N , each element corresponds to an attribute of the node.

[0118] The dynamic energy consumption relationship graph construction module includes a graph architecture initialization unit, a graph convolution calculation unit, and a dynamic update unit;

[0119] The graph architecture initialization unit is used to abstract the physical entities in the building into nodes of the graph structure, initialize the edges between the nodes based on the spatial position and physical connection, and form the basic frame of the energy consumption relationship graph;

[0120] Specifically: The physical entities in the building are abstracted into nodes of the graph structure, which are divided into device nodes and area nodes; the device nodes correspond to specific equipment in the building, including but not limited to air conditioners, lighting, and elevators, and the node attributes are the fusion feature vectors F output by the multi-source data semantic fusion module.final , including information such as device type, real-time power, and historical energy consumption pattern; the regional nodes correspond to physical areas in the building, including but not limited to floors, rooms, and corridors. Node attributes include spatial coordinates (x, y), area, and functional type, which are obtained through building information models and IoT device deployment locations; then, edges are established based on the installation relationship between devices and regions, and the edge weight is initialized to 1, indicating the basic energy consumption impact; then, edges are established for adjacent regional nodes, and the edge weight is initialized according to the inverse of the spatial distance to characterize the conduction effect of environmental parameters between regions; finally, the output graph structure G0 = (V, E0); where V is the node set and E0 is the initialized edge set;

[0121] The graph convolution calculation unit uses the graph convolution operation of the graph neural network to update node attributes and calculate edge weights using fusion features to quantify the energy consumption correlation strength between devices and regions;

[0122] Specifically: First, the graph convolutional network algorithm is used to achieve iterative updates of node features through neighborhood information aggregation and nonlinear transformation. The formula is as follows:

[0123]

[0124] Among them, H (l) is the node feature matrix of the lth layer, and the initial feature matrix is ​​the fusion feature matrix F final ; is the normalized adjacency matrix, A is the original adjacency matrix, D is the degree matrix; W (l) is the learnable weight matrix of layer l, which is optimized by back propagation; o' is the activation function used to introduce nonlinearity;

[0125] Then the edge weight e is calculated based on the feature similarity of adjacent nodes. ij , the formula is as follows:

[0126]

[0127] where h i ,h j is the feature vector of node i, j, and the edge weight reflects the correlation between the energy consumption patterns of the two;

[0128] Finally, the updated graph structure G = (V, E) is output, where E represents the edge set containing dynamic weights;

[0129] The dynamic update unit is used to monitor equipment failures and regional function change events in real time, trigger a time-series-aware incremental update algorithm, and locally reconstruct node attributes and edge weights of associated subgraphs;

[0130] Specifically: First, real-time event monitoring is performed. For equipment failures, the device status data is obtained through the IoT multi-source data acquisition module. When a device failure is detected, the corresponding node is marked as a failure state. For area changes, the area use adjustment instruction is received through the building management system and the functional attributes of the area nodes are updated. Then, an incremental update algorithm is used to determine the affected node set according to the event type and extract the corresponding subgraph. For the faulty device nodes, the missing values ​​are filled using historical data and features of similar devices; for the nodes in the function-changed area, the edge weights between them and the adjacent nodes are recalculated; then the graph convolution operation is performed only on the affected subgraph G′ to update the node features and edge weights; finally, the updated dynamic graph structure G is output. updated , synchronized to the intelligent decision engine module as the latest state space.

[0131] The intelligent decision engine module includes an edge decision unit, a cloud optimization unit and a strategy output unit;

[0132] The edge decision unit is responsible for deploying a lightweight reinforcement learning model and generating device operating parameter adjustment instructions in real time based on the subgraph features in the dynamic graph structure;

[0133] Specifically: For the model architecture, the Q-Learning model is used, and the state space is the subgraph node feature vector h i , the action space is the device adjustable parameter; then the current subgraph is obtained from the dynamic energy consumption relationship graph construction module Extract target node feature h i As state s t ; Then use the model to predict action a t , the calculation formula is as follows:

[0134] a t =arg max a Q(s t , a;θ);

[0135] Where Q is the action value function and θ is the model parameter;

[0136] Finally, the control parameters corresponding to the result output action are sent to the strategy output unit;

[0137] The cloud optimization unit is used to run the complete reinforcement learning model, combined with the model predictive control algorithm, based on the global graph structure G updated Generate cross-regional coordination strategies;

[0138] Specifically: First, the entire building graph structure is encoded into a state vector S = (h1,h2,...,h n ); where h iis the device / region node feature, including spatiotemporal features and energy consumption association weights. Then, through the prediction model, the state evolution of the next T steps is predicted based on the graph neural network. The formula is as follows:

[0139] S t+1:T =GNN(S t , A);

[0140] Where A is the adjacency matrix;

[0141] Then, the target optimization is performed by minimizing the weighted sum of energy consumption cost and comfort deviation. The formula is as follows:

[0142]

[0143] Among them, is the control sequence of the next T steps; E k To predict the energy consumption value, the edge weight aggregation calculation in the graph structure is performed; ComfDeviation i (k) is the comfort deviation of area i; (k) is the weight coefficient, which can be configured through the cloud interface;

[0144] The policy output unit is responsible for converting the decision results of the edge layer and the cloud layer into device-executable protocol instructions and sending them to the edge-cloud collaborative deployment module;

[0145] Specifically: First, the actions output by the lightweight model are converted into register write instructions of the Modbus protocol. Then, the control sequence optimized by MPC is converted into a policy file in JSON format and pushed to the edge node through the MQTT protocol. Finally, a unified instruction format specification is defined, including but not limited to fields such as device identification, parameter name, target value, and execution time window, and it is ensured that the device identification in the instruction corresponds to the node ID of the dynamic energy consumption relationship diagram.

[0146] The edge-cloud collaborative deployment module includes an edge computing unit, a cloud hub unit, and a communication interaction unit;

[0147] The edge computing unit is responsible for deploying a lightweight graph neural network model compressed by knowledge distillation technology, completing local data preprocessing, subgraph feature extraction, and edge layer decision execution at the edge node;

[0148] Specifically: First, knowledge distillation technology is used to migrate the core knowledge of the Transformer and graph neural network combination model to a lightweight model at the edge. The raw data collected by the Internet of Things is then normalized and the raw values ​​are converted into standard-scale feature values ​​by calculating the data mean and standard deviation. Then, based on the local subgraph structure output by the dynamic energy consumption relationship graph construction module, the convolution operation of the graph neural network is used to extract the association features between devices and regional nodes in the subgraph, forming a subgraph feature vector for edge-layer decision-making. Finally, the edge-layer instructions of the intelligent decision engine module are received and converted into control signals that can be recognized by the device through the device driver interface, executing local device control in real time.

[0149] The cloud-based central unit is used to run the complete Transformer and graph neural network model, integrate data from the entire building and multiple locations, and achieve global model training and cross-scenario migration through federated learning technology;

[0150] Specifically: Global data integration collects subgraph feature vectors uploaded by each edge node, and integrates building information models and historical energy consumption data to build a global energy consumption relationship diagram covering all building equipment and regional associations, thereby strengthening the model's ability to learn the overall energy consumption pattern; Federated learning first initializes the global model on the cloud, and then each edge node independently conducts model training based on local data, only uploading the gradient update information of the model training to the cloud without transmitting the original data. The cloud completes the update of the global model parameters by aggregating the gradient information of all edge nodes and sends the updated model to the edge nodes; Cross-scenario migration targets different building types. The cloud adapts to the new scenario by adjusting the parameters related to regional functions and equipment types in the model;

[0151] The communication interaction unit establishes a two-way communication channel between the edge node and the cloud server based on the MQTT protocol, realizing real-time interaction between subgraph feature uploading and global strategy issuance;

[0152] Specifically: MQTT protocol is used to define topics for data interaction. Then, the JSON format of data interaction is unified. Subgraph feature messages contain edge node ID, subgraph ID, and feature vector data. Global policy messages contain policy ID, device ID, control parameters, and target values. Finally, real-time interaction between subgraph feature upload and global policy delivery is achieved through a bidirectional channel.

[0153] An intelligent construction method of an energy consumption model based on artificial intelligence includes the following steps:

[0154] S1, real-time collection of weather data, indoor environment parameters, device running state and historical energy consumption data through sensors, smart meters, device API interfaces, unified conversion to standardized XML format data containing timestamp, device identification, parameter name and parameter value after Modbus and MQTT protocol analysis;

[0155] S2, adopt 3o' rule and isolated forest algorithm to detect original data outliers, calibrate cross-device timestamps based on NTP protocol and normalize, use bidirectional LSTM neural network to interpolate missing values, generate time-aligned, spatially correlated structured time series data;

[0156] S3, through Fourier transform, embedding matrix mapping and linear transformation, the structured time series data is encoded into embedding vectors containing time, device, parameter and spatial features, and then the multi-head self-attention mechanism of the Transformer neural network is used to generate feature vectors that fuse spatio-temporal features, device coupling relationships and environmental influence weights;

[0157] S4, abstract devices and physical areas as graph nodes, initialize edge weights based on spatial position and physical connection, update node attributes and calculate edge weights through graph convolution operation, integrate time series perception incremental update algorithm, and locally reconstruct the associated subgraph when the device fails or the area function changes;

[0158] S5, the edge layer adjusts the running parameters of a single area or device in real time based on the dynamic graph subgraph features through a lightweight reinforcement learning model; the cloud layer generates a cross-area collaborative strategy based on the global graph structure through a model predictive control algorithm, and constructs a two-layer decision-making mechanism;

[0159] S6, the edge node converts the decision instruction into a Modbus protocol instruction for execution and uploads the subgraph features to the cloud; the cloud integrates all building data optimization model parameters through federated learning, and issues the updated model to the edge node, realizing a collaborative closed loop.

[0160] Take a three-story office area of an intelligent office building as an example to illustrate the specific implementation process of the present application:

[0161] I. Data acquisition and preprocessing

[0162] Temperature and humidity sensors (Modbus protocol), smart meters (MQTT protocol), and cameras are deployed in the third-floor office area to collect data in real time. The temperature and humidity sensors upload data every 10 seconds, such as the temperature of 26.5°C at 10:05:32 (device ID: SENSOR-01, parameter: temperature). The smart meters record the air conditioning power every minute, such as 8.2 kW at 10:05:00 (device ID: AC-03, parameter: power). The cameras use image recognition to count occupancy density, such as the occupancy density of 0.8 people / m2 in room 302 detected at 10:05 (device ID: CAM-02, parameter: occupancy density).

[0163] The protocol adapter unit parses the Modbus data frame into numerical data, converts the MQTT message into JSON format, and uniformly outputs it as XML data, including the timestamp (ISO 8601 format, such as 2025-05-19T10:05:00), device ID, parameter name and value.

[0164] 2. Data Cleaning and Semantic Fusion

[0165] Anomaly detection: For univariate data (such as temperature), the mean was calculated as 24°C and the standard deviation was 1.2°C. A value of 26.5°C was labeled normal (within 3σ, or 27.6°C). For multivariate data (such as population density and air conditioning power), the isolation forest algorithm was used to identify nonlinear anomalies, but no abnormal patterns were found.

[0166] Time calibration: Normalize the timestamps 10:05:32 and 10:05:48 to 10:05:00 to ensure minute-level alignment.

[0167] Missing value correction: Assume that the illumination data at 10:06 is missing. Use the five valid data points before and after (10:01-10:05 and 10:07-10:10) to predict the value of 350 Lux through bidirectional LSTM.

[0168] Time encoding: Convert 10:05 into a periodic vector after Fourier transformation;

[0169] Equipment code: Air conditioner (ID: AC-03) is mapped to the vector [0.2, 0.5, 0.8, 1.1] through the embedding matrix;

[0170] Spatial encoding: The room coordinate (3,5) is linearly mapped to the vector [0.3,0.5];

[0171] Fusion vector: The time + device + parameter + space vectors are added and input into the Transformer multi-head attention unit to calculate the fusion vector containing spatiotemporal features. For example, the coupling weight between the air conditioner and the room is 0.75.

[0172] 3. Dynamic Graph Modeling and Intelligent Decision-making

[0173] Graph initialization: Abstract air conditioner AC-03 and lighting L-05 are device nodes, room 302 is an area node, and initial edge weights: the edge weight between AC-03 and room 302 is 1 (physical connection), and the edge weight between room 302 and adjacent room 301 is 0.8 (distance 5 meters, weight = 1 / 5 = 0.2, here we assume the example value is 0.8).

[0174] Graph convolution update: By calculating node features through neighborhood aggregation, the features of air conditioner AC-03 are updated to [0.3, 0.6, 0.9, 1.2], the cosine similarity with room 302 is 0.92, and the edge weight is updated to 0.92.

[0175] Dynamic update: If a fault is detected on AC-03 at 14:00, the node is marked as faulty, the historical data of the similar device AC-01 is used to populate the features, and the edge weight with room 302 is recalculated to 0.4 (the impact is weakened after the fault).

[0176] Edge layer: Detects that the occupant density in room 302 has dropped to 0. The Q-Learning model generates an instruction to turn off lighting L-05 within 10 seconds (Modbus instruction: write 0 to register 0x0001).

[0177] Cloud layer: At 5:00 PM, based on the global graph structure, the overall energy consumption during the off-get off work period is predicted. The MPC algorithm generates a strategy: adjust the set temperature of the air conditioners on the third floor from 24°C to 26°C, which is expected to reduce energy consumption by 12% and control the comfort deviation within ±1°C.

[0178] 4. Edge-Cloud Collaborative Execution

[0179] After receiving the command, the edge node executed the shutdown operation for L-05 at 10:05:10 and uploaded subgraph features (such as the subgraph structure after the AC-03 failure) to the cloud. The cloud aggregated the gradients of each edge node through federated learning, updated the global model parameters, and distributed the lightweight model to the edge to optimize subsequent decision-making. The entire process forms a closed loop from data collection to intelligent control, improving office energy efficiency by over 30% and keeping response latency within seconds.

[0180] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above and that the invention can be embodied in other specific forms without departing from the spirit or essential characteristics of the invention. Therefore, the embodiments should be considered in all respects as illustrative and non-restrictive, and the scope of the invention is defined by the appended claims, not the foregoing description, and all variations within the meaning and range of equivalents of the claims are intended to be included therein. Any reference sign in a claim should not be construed as limiting the claim to which it relates.

Claims

1. An artificial intelligence-based energy consumption model intelligent construction system, characterized by: It includes an IoT multi-source data acquisition module, a data cleaning and spatiotemporal calibration module, a multi-source data semantic fusion module, a dynamic energy consumption relationship graph construction module, an intelligent decision engine module and an edge-cloud collaborative deployment module; the IoT multi-source data acquisition module collects weather data, indoor environmental parameters, equipment operating status and historical energy consumption data in real time through sensors, smart meters and device API interfaces, and provides original input for the data cleaning and spatiotemporal calibration module; the data cleaning and spatiotemporal calibration module is responsible for detecting abnormal values ​​in the original data, calibrating cross-device timestamps and repairing missing values, and then processing the original data into structured time series data; the multi-source data semantic fusion module generates a data structure containing spatiotemporal features, device coupling relationships, and environmental impacts based on the multi-head self-attention mechanism of the Transformer neural network. The fused feature vector of the weights is used as the initial attribute of the nodes in the dynamic energy consumption relationship graph construction module; the dynamic energy consumption relationship graph construction module is based on a graph neural network, abstracts devices and physical areas into nodes, calculates the edge weights between nodes through graph convolution, integrates a time-aware incremental update algorithm, and locally reconstructs the associated subgraph when equipment fails and regional functions change; the intelligent decision engine module is based on a dynamic graph structure to construct a two-layer decision-making mechanism. The edge layer adjusts the operating parameters of a single area or device in real time based on subgraph features, and the cloud layer generates cross-regional collaborative strategies through a model predictive control algorithm; the edge-cloud collaborative deployment module is used to build a layered computing architecture. The edge layer deploys a lightweight graph neural network model to process local data and execute edge layer instructions. The cloud layer runs a complete model to integrate full-building data and generate a global strategy.

2. The energy consumption model intelligent construction system based on artificial intelligence according to claim 1, characterized in that: The Internet of Things multi-source data acquisition module includes a data acquisition unit and a protocol adaptation unit; The data acquisition unit deploys temperature and humidity sensors, light sensors, CO2 concentration sensors, smart meters, and cameras to collect weather data, indoor environmental parameters, equipment operating status, and historical energy consumption data in each area of ​​the building in real time, covering three types of data sources: environment, equipment, and energy consumption. The protocol adapter unit develops a protocol analyzer, uses serial communication and Ethernet interface to parse data frames for the Modbus protocol, and extracts numerical data corresponding to register addresses; For the MQTT protocol, messages are obtained by subscribing to specified topics, and the message body in JSON format is parsed. The two types of protocol data are uniformly converted into XML format data containing timestamps, device identifiers, parameter names, and parameter values. The timestamp adopts the ISO 8601 standard format, and the parameter values ​​are unified as floating-point types. This allows the original data to be output to the multi-source data cleaning and spatiotemporal calibration module in a standardized form with a fixed field structure and consistent data type.

3. The energy consumption model intelligent construction system based on artificial intelligence according to claim 1, characterized in that: The data cleaning and spatiotemporal calibration module includes an anomaly detection unit, a time calibration unit, and a missing value repair unit; The anomaly detection unit uses a two-layer detection mechanism to divide the original data into univariate data and multivariate data. First, the univariate data is preliminarily screened based on the 30' rule, the mean and standard deviation of each parameter are calculated, and data that deviates from the mean by more than 3 times the standard deviation is marked as a suspected outlier. For multivariate correlation data, the isolation forest algorithm is used to build an anomaly detection model. Nonlinear anomaly patterns are identified by calculating the path length of data points in the random forest. Finally, a data set containing normal / abnormal labels is generated to provide a basis for subsequent data repair. The time calibration unit, based on the NTP service, obtains standard timestamps from the unified time server within the building and synchronizes and calibrates the timestamps of each device in the raw data. Specifically, it first identifies the original format of the data timestamp and converts it to the ISO 8601 standard format through a format conversion function. It then performs minute-level alignment on the data across devices, normalizing the timestamps of all data points within the same minute to the start of that minute. The missing value repair unit uses a bidirectional LSTM neural network to construct a missing value repair model for the data set after anomaly detection. Specifically: the data is divided into independent sequences according to device and parameter type, and 5 valid data points before and after the missing point are used as the input sequence. The forward and backward features are extracted through the bidirectional LSTM network, and the predicted value of the missing point is output through the fully connected layer. For the missing points at the beginning or end of the sequence, forward filling and backward filling are respectively used. The repaired data set forms a two-dimensional table with timestamp as the index and device identification and parameter name as columns, which is associated with the spatial area through field mapping rules and output to the multi-source data semantic fusion module as time series feature input.

4. The energy consumption model intelligent construction system based on artificial intelligence according to claim 1, characterized in that: The multi-source data semantic fusion module includes a feature encoding unit, a multi-head attention unit and a fusion output unit; The feature encoding unit converts structured time series data into numerical embedding vectors suitable for Transformer processing, while giving the data spatiotemporal location information; Specifically: Feature coding is divided into time coding, device and parameter feature coding, and location information coding; for time feature coding, the timestamp is decomposed into periodic features through Fourier transform and converted into a time embedding vector E with dimension T t , where each element corresponds to the sine / cosine function value of different time granularity, the formula is as follows: Where i is the embedding vector dimension index, and timestamp is the normalized timestamp value; For device and parameter feature coding, a dictionary mapping is established for device identification and parameter name respectively, and the embedding matrix and Converted to a device embedding vector E of dimension D d and parameter embedding vector E p ; Among them, V d is the total number of device types, V p is the total number of parameter types; W d The embedding matrix representing the device type maps the discrete device identity to a continuous vector representation; W p The embedding matrix representing the parameter type maps the discrete parameter name to a continuous vector representation; D represents the dimension of the target embedding vector; For position information encoding, the spatial position embedding vector E is generated by the regional coordinates (x, y) of the building floor plan s , use linear mapping to convert the coordinate value into a vector of dimension D; Finally, the time, device, parameter, and space embedding vectors are added element-wise to obtain the final input vector X, which is input to the multi-head attention unit. The formula is as follows: X=E t +E d +E p +E s ; The multi-head attention unit uses the Transformer's multi-head self-attention mechanism to calculate the dynamic weights of multi-source data such as weather data, personnel activity data, and equipment status data, and mine cross-domain dependencies; Specifically: First, the input vector X is decomposed into h parallel subspaces, hereinafter referred to as heads, and each head independently calculates the attention weight; for the kth head, the query vector is generated by linear transformation Key Vector Value vector in, are all learnable weight matrices; then in each head, the similarity between the query and the key is calculated by dot product, and the attention weight α is obtained after scaling and normalization k , the calculation formula is as follows: Among them, d k is the vector dimension of a single head, is the scaling factor to stabilize the gradient, T represents the transpose operation of the matrix; Finally, the value vector is weighted and summed according to the attention weight to obtain the single-head output Z k , the calculation formula is as follows: Z k =α k V k ; Then concatenate the outputs of the h heads into the multi-head attention result Z, which is calculated as follows: Z=Concat(Z1,Z2,...,Z h ); The fusion output unit integrates the multi-head attention results to generate a fusion feature vector containing spatiotemporal features, device coupling relationships, and environmental impact weights, which serves as the initial attributes of the nodes in the dynamic energy consumption relationship graph construction module; Specifically: First, the multi-head attention result Z is input into the two-layer fully connected feedforward network FFN, and the high-level semantic features are extracted through the nonlinear activation function ReLU. The calculation formula is as follows: F=FFN(Z)=σ(ZW1+b1)W2+b2; Where W1 and W2 are weight matrices, b1 and b2 are bias vectors, and o' is the activation function; Then, the output dimension is adjusted to the node attribute dimension N required by the dynamic energy consumption relationship graph construction module through linear transformation to generate the final fusion feature vector F final ∈R N , each element corresponds to an attribute of the node.

5. The energy consumption model intelligent construction system based on artificial intelligence according to claim 1 is characterized by: The dynamic energy consumption relationship graph construction module includes a graph architecture initialization unit, a graph convolution calculation unit, and a dynamic update unit; The graph architecture initialization unit is used to abstract the physical entities in the building into nodes of the graph structure, initialize the edges between the nodes based on the spatial position and physical connection, and form the basic frame of the energy consumption relationship graph; Specifically: The physical entities in the building are abstracted into nodes of the graph structure, which are divided into device nodes and area nodes; the device nodes correspond to specific equipment in the building, including but not limited to air conditioners, lighting, and elevators, and the node attributes are the fusion feature vectors F output by the multi-source data semantic fusion module. final , including information such as device type, real-time power, and historical energy consumption pattern; the regional nodes correspond to physical areas in the building, including but not limited to floors, rooms, and corridors. Node attributes include spatial coordinates (x, y), area, and functional type, which are obtained through building information models and IoT device deployment locations; then, edges are established based on the installation relationship between devices and regions, and the edge weight is initialized to 1, indicating the basic energy consumption impact; then, edges are established for adjacent regional nodes, and the edge weight is initialized according to the inverse of the spatial distance to characterize the conduction effect of environmental parameters between regions; finally, the output graph structure G0 = (V, E0); where V is the node set and E0 is the initialized edge set; The graph convolution calculation unit uses the graph convolution operation of the graph neural network to update node attributes and calculate edge weights using fusion features to quantify the energy consumption correlation strength between devices and regions; Specifically: First, the graph convolutional network algorithm is used to achieve iterative updates of node features through neighborhood information aggregation and nonlinear transformation. The formula is as follows: Among them, H (l) is the node feature matrix of the lth layer, and the initial feature matrix is ​​the fusion feature matrix F final ; is the normalized adjacency matrix, A is the original adjacency matrix, D is the degree matrix; W (l) is the learnable weight matrix of layer l, which is optimized by back propagation; o' is the activation function used to introduce nonlinearity; Then the edge weight e is calculated based on the feature similarity of adjacent nodes. ij , the formula is as follows: where h i ,h j is the feature vector of node i, j, and the edge weight reflects the correlation between the energy consumption patterns of the two; Finally, the updated graph structure G = (V, E) is output, where E represents the edge set containing dynamic weights; The dynamic update unit is used to monitor equipment failures and regional function change events in real time, trigger a time-series-aware incremental update algorithm, and locally reconstruct node attributes and edge weights of associated subgraphs; Specifically: First, real-time event monitoring is performed. For equipment failures, the device status data is obtained through the IoT multi-source data acquisition module. When a device failure is detected, the corresponding node is marked as a failure state. For area changes, the area use adjustment instruction is received through the building management system and the functional attributes of the area nodes are updated. Then, an incremental update algorithm is used to determine the affected node set according to the event type and extract the corresponding subgraph. For the faulty device nodes, the missing values ​​are filled using historical data and features of similar devices; for the nodes in the function-changed area, the edge weights between them and the adjacent nodes are recalculated; then the graph convolution operation is performed only on the affected subgraph G′ to update the node features and edge weights; finally, the updated dynamic graph structure G is output. updated , synchronized to the intelligent decision engine module as the latest state space.

6. The energy consumption model intelligent construction system based on artificial intelligence according to claim 1, characterized in that: The intelligent decision engine module includes an edge decision unit, a cloud optimization unit and a strategy output unit; The edge decision unit is responsible for deploying a lightweight reinforcement learning model and generating device operating parameter adjustment instructions in real time based on the subgraph features in the dynamic graph structure; Specifically: For the model architecture, the Q-Learning model is used, and the state space is the subgraph node feature vector h i , the action space is the device adjustable parameter; then the current subgraph is obtained from the dynamic energy consumption relationship graph construction module Extract target node feature h i As state s t ; Then use the model to predict action a t , the calculation formula is as follows: a t =argmax a Q(s t ,a;i); Where Q is the action value function and θ is the model parameter; Finally, the control parameters corresponding to the result output action are sent to the strategy output unit; The cloud optimization unit is used to run the complete reinforcement learning model, combined with the model predictive control algorithm, based on the global graph structure G updated Generate cross-regional coordination strategies; Specifically: First, the entire building graph structure is encoded into a state vector S = (h1,h2,...,h n ); where h i is the device / region node feature, including spatiotemporal features and energy consumption association weights. Then, through the prediction model, the state evolution of the next T steps is predicted based on the graph neural network. The formula is as follows: S t+1:T =GNN(S t ,A); Where A is the adjacency matrix; Then, the target optimization is performed by minimizing the weighted sum of energy consumption cost and comfort deviation. The formula is as follows: Among them, is the control sequence of the next T steps; E k To predict the energy consumption value, the edge weight aggregation calculation in the graph structure is performed; ComfDeviation i (k) is the comfort deviation of area i; (k) is the weight coefficient, which can be configured through the cloud interface; The policy output unit is responsible for converting the decision results of the edge layer and the cloud layer into device-executable protocol instructions and sending them to the edge-cloud collaborative deployment module; Specifically: First, the actions output by the lightweight model are converted into register write instructions of the Modbus protocol. Then, the control sequence optimized by MPC is converted into a policy file in JSON format and pushed to the edge node through the MQTT protocol. Finally, a unified instruction format specification is defined, including but not limited to fields such as device identification, parameter name, target value, and execution time window, and ensuring that the device identification in the instruction corresponds to the node ID of the dynamic energy consumption relationship diagram.

7. The energy consumption model intelligent construction system based on artificial intelligence according to claim 1, characterized in that: The edge-cloud collaborative deployment module includes an edge computing unit, a cloud hub unit, and a communication interaction unit; The edge computing unit is responsible for deploying a lightweight graph neural network model compressed by knowledge distillation technology, completing local data preprocessing, subgraph feature extraction, and edge layer decision execution at the edge node; Specifically: First, knowledge distillation technology is used to migrate the core knowledge of the Transformer and graph neural network combination model to a lightweight model at the edge. The raw data collected by the Internet of Things is then normalized and the raw values ​​are converted into standard-scale feature values ​​by calculating the data mean and standard deviation. Then, based on the local subgraph structure output by the dynamic energy consumption relationship graph construction module, the convolution operation of the graph neural network is used to extract the association features between devices and regional nodes in the subgraph, forming a subgraph feature vector for edge-layer decision-making. Finally, the edge-layer instructions of the intelligent decision engine module are received and converted into control signals that can be recognized by the device through the device driver interface, executing local device control in real time. The cloud-based central unit is used to run the complete Transformer and graph neural network model, integrate data from the entire building and multiple locations, and achieve global model training and cross-scenario migration through federated learning technology; Specifically: Global data integration collects subgraph feature vectors uploaded by each edge node, integrates the building information model and historical energy consumption data, and constructs a global energy consumption relationship diagram covering all building equipment and regional associations, thereby strengthening the model's ability to learn overall energy consumption patterns; Federated learning first initializes the global model on the cloud, and then each edge node independently conducts model training based on local data, uploading only the gradient update information of the model training to the cloud without transmitting the original data. The cloud completes the update of the global model parameters by aggregating the gradient information of all edge nodes and sends the updated model to the edge nodes; For cross-scenario migration, the cloud adapts to new scenarios by adjusting parameters related to regional functions and equipment types in the model. The communication interaction unit establishes a two-way communication channel between the edge node and the cloud server based on the MQTT protocol, realizing real-time interaction between subgraph feature uploading and global strategy issuance; Specifically: MQTT protocol is used to define topics for data interaction. Then, the JSON format of data interaction is unified. Subgraph feature messages contain edge node ID, subgraph ID, and feature vector data. The global policy message contains the policy ID, device identifier, control parameters, and target value. Finally, the real-time interaction between sub-graph feature upload and global policy issuance is realized based on the bidirectional channel.

8. A method for intelligently constructing an energy consumption model based on artificial intelligence, applied to the system for intelligently constructing an energy consumption model based on artificial intelligence according to claims 1-7, characterized in that: The following steps are involved: S1. Real-time weather data, indoor environmental parameters, equipment operating status, and historical energy consumption data are collected through sensors, smart meters, and device API interfaces. After parsing using Modbus and MQTT protocols, the data is uniformly converted into standardized XML format data containing timestamps, device identifiers, parameter names, and parameter values. S2. Use the 3o' rule and isolation forest algorithm to detect outliers in the original data, calibrate and normalize cross-device timestamps based on the NTP protocol, and use bidirectional LSTM neural network interpolation to repair missing values, generating time-aligned and spatially correlated structured time series data; S3. Through Fourier transform, embedding matrix mapping, and linear transformation, the structured time series data is encoded into an embedding vector containing time, device, parameter, and spatial features. The multi-head self-attention mechanism of the Transformer neural network is then used to generate a feature vector that integrates spatiotemporal features, device coupling relationships, and environmental impact weights. S4: Abstract devices and physical areas into graph nodes, initialize edge weights based on spatial location and physical connections, update node attributes and calculate edge weights through graph convolution operations, integrate a time-aware incremental update algorithm, and locally reconstruct associated subgraphs when devices fail or regional functions change; S5, the edge layer uses a lightweight reinforcement learning model based on dynamic graph subgraph features to adjust the operating parameters of a single region or device in real time; the cloud layer uses a model predictive control algorithm based on the global graph structure to generate cross-regional collaborative strategies, building a two-layer decision-making mechanism; S6. The edge node converts the decision instructions into Modbus protocol instructions for execution and uploads the subgraph features to the cloud; The cloud integrates all building data through federated learning to optimize model parameters, and sends the updated model to edge nodes to achieve a collaborative closed loop.

Citation Information

Patent Citations

  • Industrial intelligent detection method and system based on multi-modal large model

    CN118503832A

  • Energy consumption monitoring and optimizing method and system based on large model and multiple agents

    CN118916778A

  • Auxiliary hospital space design method and device based on building energy consumption model

    CN119783208A

  • Building electromechanical full life cycle management platform based on BIM and optimization strategy thereof

    CN119863011A

  • Energy-saving control method and system based on building group spatial form

    CN119987271A

Cited By

  • Internal and external network security service passing method and system based on edge computing

    CN121098634A

  • Edge computing-based internal and external network security service access method and system

    CN121098634B

  • Energy consumption prediction method and system based on multi-source data fusion

    CN121258136A

  • Dynamically changing campus environment safety monitoring system and method

    CN121458074A

  • Dynamic proportioning optimization system for multi-station injection feeding

    CN121477648A