Intelligent building energy consumption data monitoring management method and system

By building a distributed architecture and graph attention mechanism to extract the joint features of energy consumption and environmental data, combined with the EPC-PSO algorithm and Lagrangian decomposition, the problem of misjudgment of anomaly detection in energy consumption data monitoring in smart buildings is solved, efficient resource allocation and task scheduling are achieved, and the system's adaptability and abnormal response capabilities are improved.

CN120634102AActive Publication Date: 2025-09-12LONG TECH CO LTD

Patent Information

Application Number
CN202510691651.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-27
Publication Date
2025-09-12
Estimated Expiration
2045-05-27

AI Technical Summary

Technical Problem

Existing smart building energy consumption data monitoring methods lack in-depth exploration of the correlation characteristics between energy consumption data and environmental data, resulting in misjudgments or missed judgments in anomaly detection. Traditional algorithms cannot effectively capture the complex dependencies between nodes in high-dimensional time series data processing, and are difficult to operate efficiently in distributed systems, resulting in low resource allocation efficiency.

Method used

Build a distributed architecture, use the graph attention mechanism to extract the joint features of energy consumption and environmental data, generate abnormal scene feature vectors through Mahalanobis distance weighting, combine the EPC-PSO algorithm for iterative optimization and Softmax classification, define the energy efficiency objective function, use Lagrangian decomposition and Hungarian KM algorithm for task scheduling, and build a visual interface to display the analysis results.

Benefits of technology

It improves the accuracy and robustness of anomaly detection, enhances resource allocation efficiency and overall benefits, and enhances the system's adaptive anomaly response capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120634102A_ABST
    Figure CN120634102A_ABST
Patent Text Reader

Abstract

The invention discloses a smart building energy consumption data monitoring management method and system, and relates to the technical field of smart building and energy management, and the method comprises the steps: constructing a dynamic graph structure, extracting joint features through employing a graph attention mechanism, weighting the Mahalanobis distance of a node through employing a batch average attention coefficient, and obtaining an abnormal scene feature vector; a target classification function is defined, an EPC-PSO algorithm is used for optimization, and a Softmax classifier is used for classifying abnormal scene feature vectors; defining an energy consumption efficiency objective function, decomposing into a sub-problem of each device by using Lagrange, outputting a global initial strategy vector by using a gradient descent method, defining a smart building task, constructing a matrix of a comprehensive benefit weight, converting the device and the task into a bipartite graph problem, and solving by using a Hungary KM algorithm; the batch average attention coefficient weights the mahalanobis distance, the robustness of anomaly detection is enhanced, and the comprehensive benefit of resources is improved by using Lagrange decomposition, a gradient descent method and a Hungary KM algorithm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of smart building and energy management technology, and in particular to a method and system for monitoring and managing energy consumption data of a smart building. Background Art

[0002] With the continuous advancement of concepts such as smart cities and green buildings, building energy consumption management has become one of the key links in improving the sustainable development capabilities of cities. In recent years, the development of emerging technologies such as the Internet of Things (IoT), edge computing, and artificial intelligence has provided important support for the acquisition, processing, and analysis of energy consumption data in smart buildings. Current smart building systems usually rely on various sensor nodes deployed in buildings to collect multi-dimensional energy consumption data and environmental parameters such as electricity, water, and gas; and summarize, model, and analyze them through data concentration platforms to achieve functions such as energy consumption trend prediction, operation efficiency evaluation, and abnormal warning.

[0003] Although relevant technologies have achieved certain results, they still face many challenges and limitations. Most existing methods only analyze energy consumption data or environmental data separately, and lack in-depth exploration of the correlation characteristics between the two, which leads to misjudgment or omission in the anomaly detection process. Traditional anomaly detection algorithms are often unable to effectively capture the complex dependencies between nodes when processing high-dimensional time series data, and lack robustness. In terms of task scheduling and energy consumption optimization, current common methods are mostly based on heuristic algorithms or centralized solution frameworks, which are difficult to operate efficiently in distributed systems and fail to fully consider the nonlinear coupling relationship and resource constraints between devices and tasks. Summary of the Invention

[0004] In view of the above existing problems, the present invention is proposed.

[0005] Therefore, the present invention provides a smart building energy consumption data monitoring and management method and system to solve the problem that most existing methods only analyze energy consumption data or environmental data separately, lack of in-depth mining of the correlation characteristics between the two, resulting in misjudgment or missed judgment in the anomaly detection process. When processing high-dimensional time series data, traditional anomaly detection algorithms are often unable to effectively capture the complex dependencies between nodes and lack robustness. In terms of task scheduling and energy consumption optimization, current common methods are mostly based on heuristic algorithms or centralized solution frameworks, which are difficult to operate efficiently in distributed systems, and fail to fully consider the nonlinear coupling relationship between equipment and tasks and resource constraints.

[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:

[0007] In a first aspect, the present invention provides a method for monitoring and managing energy consumption data of a smart building, which comprises:

[0008] Build a distributed architecture, collect energy consumption and environmental data for preprocessing, construct a dynamic graph structure, use the graph attention mechanism (GTA) to extract the joint features of energy consumption and environmental data, and use the batch average attention coefficient to weight the Mahalanobis distance of the nodes to obtain the abnormal scene feature vector;

[0009] Define the target classification function, use the EPC-PSO algorithm for iterative optimization, use the Softmax classifier to classify the abnormal scene feature vector, and calculate the severity of each abnormal type;

[0010] Define the energy efficiency objective function, use Lagrangian decomposition to decompose it into subproblems for each device, use gradient descent to output the global initial strategy vector, define smart building tasks, construct a matrix of comprehensive benefit weights, transform the devices and tasks into a bipartite graph problem, and solve it using the Hungarian KM algorithm;

[0011] Collect real-time data to perform smart building energy consumption management, and build a visual interface to display the data generated by analysis.

[0012] As a preferred solution of the smart building energy consumption data monitoring and management method of the present invention, the construction of a dynamic graph structure, the use of the graph attention mechanism GTA to extract the joint features of energy consumption and environmental data, and the calculation of abnormal scene feature vectors include:

[0013] The distributed architecture includes edge nodes and master nodes;

[0014] The collected energy consumption and environmental data include current, power, energy consumption rate, temperature, humidity, and smoke concentration data;

[0015] Construct a time-segment data matrix, map each data type in the time-segment data matrix to a node, and use the Pearson correlation coefficient to add edges of the dynamic graph structure;

[0016] Calculate the comprehensive volatility of edges between nodes to which edges are added, convert it into a time decay factor using a linear mapping function, calculate the dynamic weight of edges, construct a dynamic graph structure, and calculate the adjacency matrix;

[0017] Based on the adjacency matrix and dynamic graph structure, the graph attention mechanism GAT is used at the edge nodes to extract the joint features of energy consumption and environmental variables;

[0018] Use weighted multi-head attention to calculate the weighted attention score of each pair of nodes, calculate the average attention coefficient of each node, use the ReLU activation function to aggregate neighbor features for each head, perform multi-head splicing on the feature vectors generated by each head to obtain the feature matrix H, divide the features in the feature matrix H and the average attention coefficient of each node into batches to obtain the batch feature matrix and batch attention coefficient;

[0019] Calculate the mean and covariance matrix of each batch feature matrix, calculate the Mahalanobis distance of each node, use the batch attention coefficient to weight the Mahalanobis distance of each node as the anomaly score, and perform normalization. Use the fixed threshold screening method to filter out nodes with anomaly scores greater than the anomaly threshold, generate an abnormal node set, and transmit it to the master node through the edge node;

[0020] The master control node uses the multiplication method to weight the anomaly score to the feature vectors in the received abnormal node set to obtain the abnormal scene feature vector, and generates an abnormal scene set from all the abnormal scene feature vectors.

[0021] As a preferred solution of the smart building energy consumption data monitoring and management method of the present invention, wherein: the target classification function is defined, the EPC-PSO algorithm is used for iterative optimization, the Softmax classifier is used to classify the abnormal scene feature vectors, and the severity of each abnormal type is calculated, including:

[0022] On the master node, the EPC-PSO particle swarm is initialized and the abnormal data in the collected historical energy consumption data and historical environmental data with labels are extracted as the historical abnormal data set;

[0023] Define the classification objective function, use the initialized position of each particle as the classification boundary parameter, input it into the classification objective function, calculate the objective function value, select the global optimal particle position of the current iteration, use the EPC movement rule to update the speed and position of each particle, and after reaching the maximum number of iterations, output the global optimal position. Substitute the global optimal position into the classification objective function to obtain the initialized individual optimal position. Use PSO to update the speed and position of the initialized individual optimal position. Based on the abnormal scene feature vector, calculate the classification score and generate a classification score vector. Use the Softmax function to calculate the probability of the classification score vector, set the abnormal type weight, use the average severity calculation method to calculate the initial severity score of the abnormal score in the classification score vector, and use the multiplication method to calculate the adjusted severity score.

[0024] High-risk and medium-risk thresholds are set based on empirical rules, and the adjusted severity scores are used to set alarm level classification rules.

[0025] As a preferred solution of the smart building energy consumption data monitoring and management method of the present invention, wherein: the energy efficiency objective function is defined, the sub-problems of each device are decomposed using Lagrangian method, and the global initial strategy vector is output using gradient descent method, including:

[0026] Establish energy efficiency targets at edge nodes to maximize the performance-to-energy ratio. Set power and performance constraints for edge nodes. Use Lagrangian decomposition to decompose local optimization targets and constraints into subproblems for each device. For each device, use gradient descent to iteratively update power and calculate environmental quality based on the updated power.

[0027] The updated device performance is calculated using the ratio method, and the updated comprehensive performance of each device is calculated using the weighted summation method. The performance threshold of the device is set using the fixed value method. The device performance threshold is compared with the updated comprehensive performance to determine the device switching state. Based on the updated power, the mapping method is used to obtain the quantitative value of the mode.

[0028] Based on the updated power, the Lagrange multiplier is updated. After reaching the maximum number of iterations, the optimal power, switching state and operation mode of the device are output, and a global initial strategy vector is generated at the master node.

[0029] As a preferred solution of the smart building energy consumption data monitoring and management method of the present invention, the steps of defining smart building tasks, constructing a matrix of comprehensive benefit weights, converting equipment and tasks into a bipartite graph problem, and solving it using the Hungarian KM algorithm include:

[0030] Define the standard forms of the four tasks of smart buildings and the candidate action rules for normal and abnormal scenarios, set the comprehensive benefit weight of each device under the task and candidate action, construct the comprehensive benefit weight of each device into a weight matrix, and generate a candidate action set for normal and abnormal scenarios;

[0031] Each edge node transmits the weight matrix and candidate action set to the master node. The master node aggregates the weight matrices of all edge nodes through the mean aggregation method to obtain the initial global weight. Based on the candidate action set, the initial global weight is corrected by the action constraint weight to obtain the final global weight. The master node distributes the global weight and candidate action set to each edge node.

[0032] Based on the global weight, a bipartite graph is constructed. Using the device-task adaptability verification method, unreasonable device-task edges are removed. Virtual nodes are used to supplement nodes where the number of devices is not equal to the number of tasks. The graph expansion method is used to add virtual nodes to the bipartite graph to obtain an updated bipartite graph.

[0033] Taking maximizing global weight and task matching as the objective function, a single matching constraint is set;

[0034] Based on the updated bipartite graph, set an empty matching set, use the KM Hungarian algorithm to match device-task edges, and output the final matching set;

[0035] Each edge node transmits the final matching set to the master node, which converts the final matching set into device control instructions and distributes them to the edge nodes to perform task allocation.

[0036] As a preferred solution of the smart building energy consumption data monitoring and management method of the present invention, the collecting of real-time data to perform smart building energy consumption management includes:

[0037] The edge nodes collect real-time data, and the master node analyzes the normal and abnormal conditions of the data. Based on different scenarios (normal scenarios and abnormal scenarios), with the goal of minimizing energy consumption, tasks are executed in order of alarm levels, and the final matching set is used to send instructions to the devices controlled by the edge nodes for control.

[0038] As a preferred solution of the smart building energy consumption data monitoring and management method of the present invention, the construction of a visual interface to display the data generated by the analysis includes:

[0039] Use BIM to build a visual interface to display four areas;

[0040] The four areas include displaying energy consumption distribution in the form of a heat map, device actions (power, switch status, and operating status) controlled by edge nodes, displaying the location of abnormalities, and real-time values ​​of energy consumption and environmental data;

[0041] Provides an interactive interface that allows managers to manually adjust device status and confirm automated suggestions.

[0042] In a second aspect, the present invention provides a smart building energy consumption data monitoring and management system, comprising:

[0043] The collection and construction module is used to build a distributed architecture, collect energy consumption and environmental data for preprocessing, build a dynamic graph structure, use the graph attention mechanism (GTA) to extract the joint features of energy consumption and environmental data, and use the batch average attention coefficient to weight the Mahalanobis distance of the nodes to obtain the abnormal scene feature vector;

[0044] Define a classification module to define the target classification function, use the EPC-PSO algorithm for iterative optimization, use the Softmax classifier to classify the abnormal scene feature vectors, and calculate the severity of each abnormal type;

[0045] The decomposition and solution module is used to define the energy efficiency objective function, use Lagrangian decomposition to decompose the sub-problems for each device, use the gradient descent method to output the global initial strategy vector, define the smart building tasks, construct a matrix of comprehensive benefit weights, transform the devices and tasks into a bipartite graph problem, and solve it using the Hungarian KM algorithm;

[0046] The execution visualization module is used to collect real-time data to perform smart building energy consumption management and build a visualization interface to display the data generated by the analysis.

[0047] In a third aspect, the present invention provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program is executed by the processor, any step of the smart building energy consumption data monitoring and management method as described in the first aspect of the present invention is implemented.

[0048] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, it implements any step of the smart building energy consumption data monitoring and management method as described in the first aspect of the present invention.

[0049] The beneficial effects of the present invention are as follows: the present invention constructs a distributed architecture, collects energy consumption and environmental data for preprocessing, constructs a dynamic graph structure, uses the graph attention mechanism GTA to extract the joint features of energy consumption and environmental data, uses the batch average attention coefficient to weight the Mahalanobis distance of the node, and obtains the abnormal scene feature vector; defines the target classification function, uses the EPC-PSO algorithm for iterative optimization, uses the Softmax classifier to classify the abnormal scene feature vector, and calculates the severity of each abnormal type; defines the energy consumption efficiency objective function, uses Lagrangian decomposition into sub-problems for each device, uses the gradient descent method to output the global initial strategy vector, defines the smart building task, constructs a matrix of comprehensive benefit weights, converts the equipment and tasks into a bipartite graph problem, and uses the Hungarian KM algorithm to solve it; collects real-time data to perform smart building energy consumption management, and constructs a visual interface to display the data generated by the analysis, thereby improving the accuracy and robustness of anomaly detection, improving the resource allocation efficiency and comprehensive benefits, and enhancing the system's adaptive abnormal response capability. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0051] Figure 1 This is a flow chart of the smart building energy consumption data monitoring and management method in Example 1.

[0052] Figure 2 This is a schematic diagram of the smart building energy consumption data monitoring and management system in Example 1.

[0053] Figure 3This is a flow chart of the dynamic graph structure and anomaly detection in Example 1.

[0054] Figure 4 This is a flowchart of optimization and task scheduling in Example 1. DETAILED DESCRIPTION

[0055] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0056] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0057] Secondly, the term "one embodiment" or "embodiment" herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in various places throughout this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive of other embodiments.

[0058] Example 1, reference Figures 1 to 4 , which is the first embodiment of the present invention, provides a method for monitoring and managing energy consumption data of a smart building, comprising the following steps:

[0059] S1. Build a distributed architecture, collect energy consumption and environmental data for preprocessing, construct a dynamic graph structure, use the graph attention mechanism (GTA) to extract the joint features of energy consumption and environmental data, and use the batch average attention coefficient to weight the Mahalanobis distance of the nodes to obtain the abnormal scene feature vector;

[0060] Preferably, sensors are deployed in key areas of smart buildings, including electricity meters, current sensors, temperature sensors, humidity sensors, and smoke sensors, to collect energy consumption data (current, power, energy consumption rate) and environmental data (temperature, humidity, smoke concentration);

[0061] The critical areas include air conditioning, lighting, heating, and data center cooling systems;

[0062] The sensor adopts a distributed architecture and is connected to the edge controller embedded PLC through a low-power communication protocol. It collects data and transmits it to the edge node PLC of the distributed control system DCS. The DCS master node (cloud server) coordinates the edge nodes to ensure data synchronization and real-time performance.

[0063] Pre-process the collected energy consumption and environmental data;

[0064] The preprocessing includes using Kalman filtering to remove sensor noise, using linear interpolation to fill missing data, and standardizing the collected energy consumption and environmental data;

[0065] At the edge node PLC, the time series is divided into time segments by minute, and the time segment data matrix is ​​constructed with the time segment length as the column and the data type as the column;

[0066] Build a dynamic graph structure, map each data type in the time segment data matrix to a node, calculate the Pearson correlation coefficient between nodes, set the correlation threshold using an empirical method, and add edges between nodes whose Pearson correlation coefficient is greater than the correlation threshold; otherwise, do not add edges.

[0067] Calculate the edge comprehensive volatility between the nodes where the edge is added ∝ i,j ,formula:

[0068]

[0069] in, and are the variances of the i-th and j-th nodes respectively, where i and j are two adjacent nodes;

[0070] Opposite-side comprehensive volatility ij Perform normalization and use a linear mapping function to convert the normalized edge comprehensive volatility into a time decay factor ∝′ij;

[0071] Use the time decay factor ∝′ij to calculate the dynamic weight of the edge, formula:

[0072] w ij (t)=∝′ ij ·|r ij (t)|+(1-∝′ ij )·w ij (t-1),

[0073] Among them, w ij (t) is the edge e at time segment t ij The weight, r ij (t) is the Pearson correlation coefficient between the i-th and j-th nodes in time segment t, (t-1) is the previous time segment, t≥1, is the initial edge e ij The weight of is the average Pearson correlation coefficient between the i-th and j-th nodes, M is the total number of time segments, and β is the exponential weighting factor, which is set using the fixed value method;

[0074] Define an empty matrix, generate an edge set E from the edges between all nodes, traverse the edge set E, map the dynamic weights of the edges to the corresponding positions of the empty matrix, and obtain the adjacency matrix;

[0075] Calculate the average value and change rate of each node in the dynamic graph structure G in time segment t, and group each node data, average value and change rate into the feature vector of the node, and normalize all feature vectors and edge weight sets;

[0076] Build a graph attention mechanism (GAT), collect historical energy consumption data and historical environmental data with labels for preprocessing, build a dynamic graph structure, train the GAT, stop training after reaching the maximum number of training times, and output the trained GAT.

[0077] Use weighted multi-head attention to calculate the weighted attention scores of the i-th and j-th nodes. Formula:

[0078]

[0079] in, is the weighted attention score of nodes i and j at the kth head in time segment t, LeakyReLU(·) is the activation function, and a kT is the transpose of the k-th head’s attention vector, obtained through the graph attention mechanism GAT training, T is the transpose symbol, is the feature transformation matrix of the k-th head, obtained through the graph attention mechanism GAT training, and are the normalized feature vectors of node i and node j at time segment t, w′ ij (t) is the normalized edge e at time segment t ij The weight of

[0080] Calculate the average attention coefficient of each node to assist in abnormal location. Formula:

[0081]

[0082] in, is the average attention coefficient of node i at time segment t, reflecting the overall importance of its neighbor relationship (e.g., a high value indicates a key variable, such as smoke concentration in a fire), K is the number of heads of multi-head attention, is the set of neighbor nodes of node i;

[0083] Use the ReLU activation function to aggregate neighbor features for each head. Formula:

[0084]

[0085] in, is the feature vector generated by the k-th head at node i in time segment t, and σ(·) is the ReLU activation function;

[0086] The feature vectors generated by each head are concatenated at the same time segment and node to obtain the feature matrix H;

[0087] Based on the edge node memory, the batch size is set, and the features in the feature matrix H and the average attention coefficient of each node are divided into batches to obtain the batch feature matrix and batch attention coefficient;

[0088] Calculate the mean and covariance matrix of each batch feature matrix, calculate the Mahalanobis distance of each node, and use the batch attention coefficient to weight the Mahalanobis distance of each node as the anomaly score. The formula is:

[0089]

[0090] Among them, s i (t) is the anomaly score of node i at time segment t, is the weight based on the attention coefficient, which amplifies the score of topological abnormal nodes. for The batch mean of ,∈ is a small constant to prevent division by zero, h′ i (t)-μ gl is the characteristic deviation of Mahalanobis distance, h′ i (t) is the eigenvector of node i in time segment t in the feature matrix H, is the global mean, μ b is the mean of the b-th batch, Q b is the index set of the feature vectors of the bth batch, is the inverse of the covariance matrix, used to standardize the deviations, is the global covariance matrix, is the covariance matrix of the b-th batch;

[0091] Normalize the anomaly scores of all nodes, set the anomaly threshold using empirical methods, and use a fixed threshold screening method to filter out nodes with anomaly scores greater than the anomaly threshold. Generate an abnormal node set and transmit it to the master node through the edge node;

[0092] The master control node uses the multiplication method to weight the anomaly score to the feature vectors in the received abnormal node set to obtain the abnormal scene feature vector, and generates an abnormal scene set from all the abnormal scene feature vectors.

[0093] By dividing the minute-level time series into time segments and constructing a data matrix, the temporal discretization management of energy consumption and environmental data is realized. By normalizing the comprehensive volatility of the edges and converting it into a time attenuation factor, introducing time dynamics, and combining the Pearson coefficient between nodes, it effectively adapts to the changing trend of building operation status over time, thereby improving the model's adaptability to dynamic environments and the accuracy of feature representation. By calculating the average attention coefficient of each node, the importance of "key variables" in a specific time period is identified, and an explainable anomaly detection mechanism oriented to variable importance is realized, which enhances the anomaly tracing and on-site management capabilities. The node feature vector calculates the Mahalanobis distance and introduces the batch average attention coefficient weighted scoring to accurately characterize the degree to which the node deviates from normal behavior, realizing a comprehensive scoring mechanism for local topological anomalies and timing anomalies, thereby improving the credibility and accuracy of the anomaly detection results. By setting an empirical threshold, nodes with higher anomaly scores are screened out to form an abnormal node set, and the multiplication method is used to generate abnormal scenario feature vectors, which are finally summarized into an abnormal scenario set. The original anomaly detection results are structured and contextualized, making the management system capable of visualizing, traceable, and responsive to anomalies, significantly improving operation and maintenance efficiency and security assurance levels.

[0094] S2. Define the target classification function, use the EPC-PSO algorithm for iterative optimization, use the Softmax classifier to classify the abnormal scene feature vector, and calculate the severity of each abnormal type;

[0095] Preferably, on the master node, the EPC-PSO particle swarm is initialized, and abnormal data from the collected historical energy consumption data and historical environmental data with labels are extracted as a historical abnormal data set;

[0096] The initialization process includes initializing the particle positions of the EPC-PSO particle swarm using a chaotic map, zero-initializing the particle velocities, setting the values ​​of the EPC parameters (temperature factor and distance factor) based on empirical rules, and setting the values ​​of the PSO parameters (inertia weight and learning factor) using a fixed value method;

[0097] Define the classification objective function, formula:

[0098]

[0099] in, is the objective function, minimizing the classification error and regularization term, is the classification boundary parameter of the classifier, D is the historical anomaly dataset, x is the index of the historical anomaly dataset, is the cross entropy loss, which measures the error between the prediction and the true label. y x and are the true label (0: mechanical failure, 1: electrical failure, 2: operation abnormality, 3: environmental interference) and predicted label of the x-th abnormal data in the historical abnormal data set, is L2 regularization to prevent overfitting, λ is the regularization coefficient, and a general value is set according to the situation;

[0100] The initialized position of each particle is used as the classification boundary parameter and input into the classification objective function. The objective function value is calculated and the global optimal particle position of the current iteration is selected. The formula is:

[0101]

[0102] in, is the global optimal particle position of the cth iteration, indicating the optimal classification boundary parameter, is the position of particle p at the cth iteration;

[0103] Use the EPC movement rule to calculate the update speed of each particle. The formula is:

[0104]

[0105] in, is the speed of particle p in the c+1th iteration, TC is the temperature factor, which controls the exploration amplitude, and the universal value ensures the global search capability, rand(·)~[0,1] is a random value, which enhances the search diversity, DC is the distance factor, which is based on the Euclidean distance between the particle and the global optimum, and the universal value balances the convergence speed, dist The Euclidean distance is a measure of how close the particle is to the optimal solution;

[0106] Use the updated velocity of each particle to update the particle position. The formula is:

[0107]

[0108] in, is the position of particle p at the c+1th iteration;

[0109] Set the particle position range constraint to prevent overflow. Formula:

[0110]

[0111] in, For the general Limited to the range of [-1,1], consistent with the initialization range;

[0112] Iterate and stop iterating after reaching the maximum number of iterations. Output the global optimal position and substitute the global optimal position into the classification objective function to obtain the initialized individual optimal position. The update speed of the initialized individual optimal position is as follows:

[0113]

[0114] in, is the speed of particle p in the c′+1th iteration, c′ is the maximum number of iterations of global optimization, ω is the inertia weight, which retains the inertia of the previous iteration speed, c1 and c2 are learning factors that control the attraction of individual and global optimality respectively, r1, r2 ~ [0, 1] are random factors that enhance the randomness of the search, The global optimal position provided by the EPC for the c′th iteration, is the individual optimal position of particle p at the c′th iteration;

[0115] Use the initialized individual optimal position to update the speed, update the particle position, calculate the objective function value of the new position, and update the individual optimal position. Formula:

[0116]

[0117] Set the maximum number of iterations, update the speed and position each time, stop the iteration when the maximum number of iterations is reached, output the final particle swarm state, and select the classification parameter with the smallest objective function value from the final particle swarm state as the optimal solution

[0118] Based on the abnormal scene feature vector, use the optimal solution Calculate the classification score, formula:

[0119]

[0120] Among them, s m is the classification score of the mth type of anomaly, m∈{0,1,2,3}, corresponding to mechanical failure, electrical failure, operation abnormality, and environmental interference, respectively. is the mth column of the optimal classification boundary parameter, A n is the nth abnormal scene feature vector in the abnormal scene set, It is an inner product operation, which measures the matching degree between the abnormal scene feature vector and the boundary of the mth class in the abnormal scene set;

[0121] The classification scores of different types of anomalies are summarized into a classification score vector s. The Softmax function is used to calculate the probability of the classification score vector s, generate a probability distribution vector P, and calculate the anomaly type. The formula is:

[0122]

[0123] Among them, ca is the predicted abnormal type, p m is the predicted probability of the mth type of abnormality;

[0124] Set the abnormal type weight, formula:

[0125]

[0126] Among them, γ c is the weight of the predicted anomaly type ca, N is the standard anomaly weight set based on actual conditions, N- and N+ represent anomaly weights with lower and higher priorities than the standard anomaly weight, respectively. Mechanical and electrical faults represent standard priorities, operational anomalies have the lowest priority (usually have little impact on the system), and environmental disturbances have the highest priority (such as fires requiring emergency response).

[0127] The average severity calculation method is used to calculate the initial severity score of the anomaly score in the classification score vector, and the anomaly type weight γ is multiplied by ca This was combined with the initial severity score to form the adjusted severity score;

[0128] The predicted anomaly type, adjusted severity score, anomaly scenario feature vector, and timestamp are encapsulated as anomaly information and transmitted to the edge node via the BACnet protocol. The edge node maps the anomaly type to a specific descriptive label (e.g., c = 0 → "mechanical failure," indicating low motor efficiency), constructs it into an alarm data packet, and stores it in the master node database.

[0129] Based on the empirical rule, the high-risk threshold τ1 and the medium-risk threshold τ2 are set respectively, and the adjusted severity score is used to set the alarm level classification rule. The formula is:

[0130]

[0131] Level is the alarm level, High, Medium, and Low are the high-risk, medium-risk, and low-risk alarm levels respectively, and sev is the adjusted severity score.

[0132] By using chaotic mapping to initialize particle positions on the master node, an efficient search initialization state and the construction of a training dataset foundation are achieved. By defining a classification objective function consisting of a cross-entropy loss and an L2 regularization term, the dual goals of accurately distinguishing anomaly categories and controlling model complexity are achieved. By inputting particle positions as classification boundary parameters into the classification objective function and iteratively updating particle velocities and positions in combination with rules such as the EPC temperature factor and the Euclidean distance factor, an optimization strategy combining efficient global search with local convergence control is implemented. By normalizing the classification score vector using the Softmax function and calculating the probability distribution of each anomaly type, a normalized decision-making mechanism is implemented for multi-class anomaly scenarios. By assigning priority weights to different anomaly types and combining the severity calculation method with classification probability, a functional transition from "category identification" to "event severity quantification" is achieved. By setting high, medium, and low-risk alarm levels based on practical empirical rules and performing graded calculations based on severity scores, a dynamic and flexible alarm level assessment system is implemented.

[0133] S3. Define the energy efficiency objective function, use Lagrangian decomposition to decompose it into sub-problems for each device, use gradient descent to output the global initial strategy vector, define smart building tasks, construct a matrix of comprehensive benefit weights, transform the devices and tasks into a bipartite graph problem, and solve it using the Hungarian KM algorithm;

[0134] Preferably, the anomaly score, the predicted anomaly type, the adjusted severity score, the node features of the dynamic graph structure, the edge weights, and the pre-processed energy consumption data and environmental data are integrated and normalized to generate a state vector;

[0135] The master node distributes the state vector to the edge node through the BACnet protocol, establishes the energy efficiency target at the edge node, and maximizes the ratio of performance to energy consumption. The formula is:

[0136]

[0137] Among them, EE l is the energy efficiency of edge node l (performance / energy consumption, general indicator), Z l The set of devices that the edge node l is responsible for, w c QC q +w e QE q is the comprehensive performance of the qth device, is the contribution of the qth device to the environmental quality, α q,o is the actual value of the oth environmental parameter output by the qth device, R is the set of environmental parameters, α q,taris the target value of the oth environmental parameter, set based on actual needs, QE q The efficiency of the qth device is the ratio of output performance to energy consumption, and the recommended usage is obtained from each device and manufacturer. is the weight of environmental quality and is the weight of equipment performance, P q is the normalized power of the qth device;

[0138] Set the power and performance constraints of edge nodes, formula:

[0139]

[0140] EQ1=QC q -QC min ≥0,

[0141] EQ2=QE q -QE min ≥0,

[0142] Among them, P total,l The total power allocated to edge nodes, QC min and QE min is the minimum performance requirement of the device, EP is the edge node power constraint, EQ1 and EQ2 are the environmental quality and efficiency constraints respectively;

[0143] The local optimization target EE l And the constraints are decomposed into subproblems for each device using Lagrangian formula:

[0144]

[0145] Among them, L l is the Lagrangian function of the lth edge node, λ 1,l ,λ 2,q and λ 3,q Both are Lagrange multipliers, and the initial value is set using the fixed value method, λ 1,l is the Lagrange multiplier of the lth edge node, λ 2,q is the Lagrange multiplier of the environmental quality of the qth device, λ 3,q is the Lagrange multiplier of the efficiency of the qth device;

[0146] Subproblem definition: For each device q∈Z l , optimize the sub-Lagrangian function, formula:

[0147] L l,q =(w c QC q +w e QEq )-μ l P q +λ 2,q EQ1+λ 3,q EQ2,

[0148] Among them, L l,q is the Lagrangian function of the lth edge node in q devices, μ l is the power allocation coefficient of the lth edge node, initially 1 / Z l ;

[0149] For each device, the power is iteratively updated using gradient descent a″+1 is the a″+1th iteration using the gradient descent method, and the updated power Calculate environmental quality, formula:

[0150]

[0151] Among them, w o is the sensitivity coefficient of the oth environmental parameter, estimated by the equipment specifications, ΔP q is the power difference between the current iteration number and the previous iteration number;

[0152] The updated equipment effectiveness is calculated using the ratio method, and the updated comprehensive effectiveness of each equipment is calculated using the weighted sum method;

[0153] Use the fixed value method to set the device's performance threshold, and compare the device's performance threshold with the updated comprehensive performance. If the updated comprehensive performance is less than the corresponding device's performance threshold, it means the device's contribution is insufficient, and the device switch is updated to the off state to save energy. Otherwise, the device switch is updated to the on state.

[0154] For devices whose switches are updated to the on state, the updated power is normalized. The range [0, 1] is divided into three parts using the ternary method. The updated power is mapped into these three parts. A mode is selected based on the range. The power values ​​mapped into these three parts are quantized and used as the quantized value of the mode.

[0155] The three ranges are arranged in descending order, from high to low, and are labeled as high performance mode, normal mode, and energy saving mode;

[0156] For devices whose device switch is updated to the off state, it is marked as modeless;

[0157] Based on the updated power, the Lagrange multiplier is updated as follows:

[0158]

[0159] Among them, ηt is the step size of the gradient descent method, and the fixed step size set by the fixed value method is used. and are all Lagrange multipliers of the a″+1th iteration;

[0160] When the maximum number of iterations is reached, the iteration stops and the optimal power, switch state, and operation mode of the device are output. The optimal power, switch state, and operation mode of the device are then spliced ​​into a global initial strategy vector at the master node.

[0161] By constructing an energy efficiency objective function, we ensure that the maximum system benefit is obtained under energy consumption constraints, achieve a balance between energy saving and performance, and improve the comprehensive energy efficiency ratio of building operation. By setting power and performance constraints and constructing reasonable boundary conditions, we can achieve quality control under the premise of energy saving, improve the stability of system operation and engineering adaptability, ensure energy saving while meeting basic operation requirements and environmental comfort. By decomposing the problem into sub-problems through Lagrangian, we can achieve distributed parallel optimization among multiple devices, improve scheduling efficiency and system convergence, optimize equipment power allocation through gradient descent method, achieve high-precision energy efficiency adjustment, enhance the dynamic nature of the control strategy, realize dynamic energy consumption tailoring through efficiency threshold judgment and equipment state switching, and improve operational economy. Through power segmentation mapping and mode quantization, we can achieve controllable equipment state and standardized strategy, improve the execution accuracy and visualization capability of the system, and achieve self-adjustment of optimization direction through dynamic updating of Lagrangian multipliers, improve the stability of system iterative convergence, ensure that the system optimization process gradually approaches the optimal solution under multiple constraints, and improve optimization accuracy and controllability of overall system performance.

[0162] Furthermore, the standard forms of the four tasks of smart buildings are defined according to the manager’s preferences;

[0163] The four tasks include ventilation tasks for adjusting air quality (e.g., smoke concentration <20 ppm), cooling tasks for lowering indoor temperature (e.g., target temperature <25°C), lighting tasks for providing indoor lighting (e.g., illuminance >500 lx), and entertainment tasks for supporting entertainment equipment functions such as multimedia equipment in conference rooms.

[0164] Use empirical methods to set severity thresholds and set candidate action rules for normal and abnormal scenarios:

[0165] When the predicted anomaly type is environmental interference, if the severity score is greater than the severity threshold, the forced ventilation device switch state is turned on and the operating mode is high performance, and other devices are forced to shut down; otherwise, the forced ventilation device switch state is still turned on and the operating mode is high performance, and other devices are in energy-saving mode;

[0166] When the predicted anomaly type is a mechanical or electrical fault, if the severity score is greater than the severity threshold, the affected device is forced to shut down while other devices continue to perform the task. Otherwise, the affected device is placed in energy-saving mode while other devices continue to perform the task.

[0167] When the predicted anomaly type is an operational anomaly, if the severity score is greater than the severity threshold, all devices execute tasks in energy-saving mode; otherwise, all devices execute tasks in normal mode.

[0168] In the absence of abnormalities, that is, under normal circumstances, all devices perform their tasks at optimal power, switching status, and operating mode;

[0169] Define the comprehensive benefit weight of each device under the task, formula:

[0170] EW q,u =ef q,u +ew q,u +ea q,u ,

[0171] Among them, EW q,u is the comprehensive benefit weight of the qth device under the uth task, is the energy consumption weight of the qth device under the uth task, kg q,u is the candidate switch state of the qth device under the uth task, if it is closed, it is 0, if it is open, it is 1, P q,u is the output power of the qth device under the uth task, P q,max is the maximum output power of the qth device, mp q is the quantized value of the candidate operating mode of the qth device, is the QoS weight of the qth device under the uth task, which quantifies the degree to which the device output meets the task requirements, sb q,u is the performance output of the qth device under the uth task (for example, if the task target temperature is 25℃ and the room temperature is 30℃, then the task requirement is to decrease by 5℃, sb q,u To implement a 5°C cooling amount), sb u is the performance output required by the u-th task, ea q,u =kg q,u sev is the abnormal interference weight of the qth device under the uth task;

[0172] If the device does not support the task, EW q,u =0;

[0173] The comprehensive benefit weight of each device under the task is constructed as a weight matrix, and candidate actions for normal scenarios and abnormal scenarios are used to generate a candidate action set;

[0174] Each edge node packages the weight matrix and candidate action set into JSON format and transmits it to the master node. The master node aggregates the weight matrices of all edge nodes using the mean aggregation method to obtain the initial global weight. Based on the candidate action set, the initial global weight is corrected by the action constraint weight to obtain the final global weight. The master node distributes the global weight and candidate action set to each edge node.

[0175] Construct a bipartite graph. Based on the global weight, map each pair of devices and tasks to an edge of the bipartite graph. The left node of the bipartite graph is the device set, and the right node is the task set.

[0176] Use the device-task compatibility verification method to determine the type of task to be performed based on the device function. Remove unreasonable device-task edges (such as lighting equipment performing cooling tasks) and set the weight of the edge to an invalid value (negative infinity).

[0177] If the number of devices is not equal to the number of tasks, virtual nodes are used to supplement them. The graph expansion method is used to add the virtual nodes to the bipartite graph to obtain the updated bipartite graph.

[0178] Taking maximizing global weight and task matching as the objective function, the formula is:

[0179]

[0180] Among them, QU is the objective function of maximizing energy efficiency benefits, EW′ q,u is the final global weight of the qth device under the uth task, x′ q,u ∈{0,1} is the matching variable between the qth device and the uth task, x′ q,u =1 means that the qth device is assigned to the uth task, x′ q,u =0 means that the qth device is not assigned to the uth task;

[0181] Set single allocation constraints, assigning each device to at most one task, and each task to at most one device;

[0182] Based on the updated bipartite graph, set an empty matching set, use the KM Hungarian algorithm to match device-task edges, and construct an equality subgraph. The equality subgraph only contains reasonable device-task edges.

[0183] For devices that have not been matched, start accessing them from the unmatched devices, use the depth-first search algorithm to find an augmenting path in the equality subgraph, and use the augmenting path to update the matching set until each device in the matching set has found a task. Stop the iteration and output the final matching set.

[0184] The access refers to matching devices and tasks;

[0185] The augmenting path starts from the unmatched device and explores all edges connected to the task. If there is an unmatched task, the unmatched device is matched with the unmatched task as an augmenting path. If there is no unmatched task, the device with the matched task is explored and the device with the unmatched task is used as the starting point for re-exploration. If no augmenting path is found after exploring every device, the reasonable device-task edges are adjusted and the equal subgraph is rebuilt to explore again.

[0186] Each edge node transmits the final matching set to the master node, which converts the final matching set into device control instructions and distributes them to the edge nodes to perform task allocation.

[0187] By presetting four types of building operation tasks, namely ventilation, refrigeration, lighting, and entertainment, based on the actual needs and preferences of users, the functional classification of building usage scenarios and quantitative management of target parameters are achieved. The system can intelligently judge the degree of fit between current operating requirements and equipment status, and form task-driven data perception and execution logic. By introducing empirical methods to set severity thresholds and combining different types of anomalies (environmental interference, equipment failures, operational anomalies, etc.), different equipment control strategies are constructed, realizing a dynamic response mechanism based on intelligent classification and hierarchical control. By constructing a weight function covering multi-dimensional indicators such as energy consumption, task responsiveness (QoS), performance output, and abnormal interference, a quantitative evaluation of the comprehensive performance of equipment under specific tasks is achieved. By constructing a matrix of candidate device actions and their comprehensive benefit weights in different scenarios, and packaging and transmitting them locally on the edge node, an edge-cloud collaborative processing mechanism for task control decisions is realized. By constructing a bipartite graph structure with devices and tasks as two vertex sets, and using the device function adaptation method to remove logically unreasonable matching edges, the preliminary regularization of the task matching space and the semantic legitimacy verification are achieved. By defining the maximum benefit objective function based on the global weight and setting the "single matching constraint" for devices and tasks, the KM Hungarian algorithm is used to construct an equal subgraph and iteratively solve the augmenting path to ensure the widest matching coverage, ultimately achieving the beneficial effect of achieving optimal resource utilization and improving the energy efficiency scheduling level under the conditions of limited task number and device resources.

[0188] S4. Collect real-time data to implement smart building energy consumption management and build a visual interface to display the data generated by analysis;

[0189] Preferably, the edge node collects real-time data, the master node analyzes the normal and abnormal conditions of the data, and based on different scenarios (normal scenarios and abnormal scenarios), with the goal of minimizing energy consumption, executes tasks in order of alarm levels, and sends instructions to the devices controlled by the edge node based on the final matching set to control them.

[0190] By building a graph model and using technical means such as the graph attention mechanism, the master control node conducts fusion analysis on the collected data, identifies abnormal patterns in energy consumption behavior, and divides the current building status into scenarios, which enhances the system's ability to understand complex and dynamic energy consumption environments, and helps to accurately identify system failures, atypical behaviors or potential energy waste. By constructing a comprehensive objective function and introducing an energy consumption optimization strategy, it realizes dynamic adjustment of the task execution order under different operating scenarios and optimally allocates system resources, improving the system's intelligent scheduling capability and task response flexibility, ensuring the safety of building operation, and pursuing energy efficiency optimization under normal conditions, thereby achieving the optimal balance between energy use and system stability.

[0191] Furthermore, a visual interface was constructed using BIM to display the four areas;

[0192] The four areas include displaying energy consumption distribution in the form of a heat map, device actions (power, switch status, and operating status) controlled by edge nodes, displaying the location of abnormalities, and real-time values ​​of energy consumption and environmental data;

[0193] Provides an interactive interface that allows managers to manually adjust device status and confirm automated suggestions.

[0194] By presenting energy consumption data in the form of a heat map in the building space, the energy consumption density of each area in the building is visually intuitive. The action information of various devices controlled by edge nodes is presented through a visual interface, which realizes the centralized and transparent management of the operating status of terminal devices. By intuitively marking the specific location of abnormal events in the interface, the integration of abnormality detection and spatial positioning is realized. The real-time collection values ​​of energy consumption (such as electricity, water, gas, etc.) and environmental (such as temperature, humidity, CO2 concentration, etc.) data are continuously displayed through the interface, which realizes holographic perception and trend tracking of the building's operating status. By building a human-computer interactive interface, managers are given the ability to manually intervene and the right to confirm intelligent control suggestions, realizing a human-computer collaborative mechanism for system control.

[0195] This embodiment also provides a smart building energy consumption data monitoring and management system, including:

[0196] The collection and construction module is used to build a distributed architecture, collect energy consumption and environmental data for preprocessing, build a dynamic graph structure, use the graph attention mechanism (GTA) to extract the joint features of energy consumption and environmental data, and use the batch average attention coefficient to weight the Mahalanobis distance of the nodes to obtain the abnormal scene feature vector;

[0197] Define a classification module to define the target classification function, use the EPC-PSO algorithm for iterative optimization, use the Softmax classifier to classify the abnormal scene feature vectors, and calculate the severity of each abnormal type;

[0198] The decomposition and solution module is used to define the energy efficiency objective function, use Lagrangian decomposition to decompose the sub-problems for each device, use the gradient descent method to output the global initial strategy vector, define the smart building tasks, construct a matrix of comprehensive benefit weights, transform the devices and tasks into a bipartite graph problem, and solve it using the Hungarian KM algorithm;

[0199] The execution visualization module is used to collect real-time data to perform smart building energy consumption management and build a visualization interface to display the data generated by the analysis.

[0200] This embodiment also provides a computer device suitable for the smart building energy consumption data monitoring and management method, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute computer-executable instructions to implement the smart building energy consumption data monitoring and management method proposed in the above embodiment.

[0201] The computer device may be a terminal, comprising a processor, a memory, a communication interface, a display screen and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device comprises a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner may be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. The display screen of the computer device may be a liquid crystal display or an electronic ink display screen, and the input device of the computer device may be a touch layer covering the display screen, or a button, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse.

[0202] This embodiment also provides a storage medium on which a computer program is stored. When the program is executed by a processor, the method for monitoring and managing energy consumption data of smart buildings proposed in the above embodiment is implemented; the storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, disk or optical disk.

[0203] In summary, the present invention achieves the following results: constructing a distributed architecture, collecting energy consumption and environmental data for preprocessing, constructing a dynamic graph structure, using the graph attention mechanism GTA to extract the joint features of energy consumption and environmental data, using the batch average attention coefficient to weight the Mahalanobis distance of the node to obtain the abnormal scene feature vector; defining the target classification function, using the EPC-PSO algorithm for iterative optimization, using the Softmax classifier to classify the abnormal scene feature vector, and calculating the severity of each abnormal type; defining the energy consumption efficiency objective function, using Lagrangian decomposition into sub-problems for each device, using the gradient descent method to output the global initial strategy vector, defining the smart building task, constructing a matrix of comprehensive benefit weights, converting the equipment and tasks into a bipartite graph problem, and using the Hungarian KM algorithm to solve it; collecting real-time data to perform smart building energy consumption management, and constructing a visual interface to display the data generated by the analysis, thereby improving the accuracy and robustness of anomaly detection, improving the resource allocation efficiency and comprehensive benefits, and enhancing the system's adaptive abnormal response capability.

[0204] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.

Claims

1. A method for monitoring and managing energy consumption data of smart buildings, characterized by: include, Build a distributed architecture, collect energy consumption and environmental data for preprocessing, construct a dynamic graph structure, use the graph attention mechanism (GTA) to extract the joint features of energy consumption and environmental data, and use the batch average attention coefficient to weight the Mahalanobis distance of the nodes to obtain the abnormal scene feature vector; Define the target classification function, use the EPC-PSO algorithm for iterative optimization, use the Softmax classifier to classify the abnormal scene feature vector, and calculate the severity of each abnormal type; Define the energy efficiency objective function, use Lagrangian decomposition to decompose it into subproblems for each device, use gradient descent to output the global initial strategy vector, define smart building tasks, construct a matrix of comprehensive benefit weights, transform the devices and tasks into a bipartite graph problem, and solve it using the Hungarian KM algorithm; Collect real-time data to perform smart building energy consumption management, and build a visual interface to display the data generated by analysis.

2. The method for monitoring and managing energy consumption data of a smart building according to claim 1, wherein: The dynamic graph structure is constructed, and the graph attention mechanism GTA is used to extract the joint features of energy consumption and environmental data, and calculate the abnormal scene feature vector, including: The distributed architecture includes edge nodes and master nodes; The collected energy consumption and environmental data include current, power, energy consumption rate, temperature, humidity, and smoke concentration data; Construct a time-segment data matrix, map each data type in the time-segment data matrix to a node, and use the Pearson correlation coefficient to add edges of the dynamic graph structure; Calculate the comprehensive volatility of edges between nodes to which edges are added, convert it into a time decay factor using a linear mapping function, calculate the dynamic weight of edges, construct a dynamic graph structure, and calculate the adjacency matrix; Based on the adjacency matrix and dynamic graph structure, the graph attention mechanism GAT is used at the edge nodes to extract the joint features of energy consumption and environmental variables; Use weighted multi-head attention to calculate the weighted attention score of each pair of nodes, calculate the average attention coefficient of each node, use the ReLU activation function to aggregate neighbor features for each head, perform multi-head splicing on the feature vectors generated by each head to obtain the feature matrix H, divide the features in the feature matrix H and the average attention coefficient of each node into batches to obtain the batch feature matrix and batch attention coefficient; Calculate the mean and covariance matrix of each batch feature matrix, calculate the Mahalanobis distance of each node, use the batch attention coefficient to weight the Mahalanobis distance of each node as the anomaly score, and perform normalization. Use the fixed threshold screening method to filter out nodes with anomaly scores greater than the anomaly threshold, generate an abnormal node set, and transmit it to the master node through the edge node; The master control node uses the multiplication method to weight the anomaly score to the feature vectors in the received abnormal node set to obtain the abnormal scene feature vector, and generates an abnormal scene set from all the abnormal scene feature vectors.

3. The method for monitoring and managing energy consumption data of a smart building according to claim 2, wherein: The target classification function is defined, the EPC-PSO algorithm is used for iterative optimization, the Softmax classifier is used to classify the abnormal scene feature vector, and the severity of each abnormal type is calculated, including: On the master node, the EPC-PSO particle swarm is initialized and the abnormal data in the collected historical energy consumption data and historical environmental data with labels are extracted as the historical abnormal data set; Define the classification objective function, use the initialized position of each particle as the classification boundary parameter, input it into the classification objective function, calculate the objective function value, select the global optimal particle position of the current iteration, use the EPC movement rule to update the speed and position of each particle, and after reaching the maximum number of iterations, output the global optimal position. Substitute the global optimal position into the classification objective function to obtain the initialized individual optimal position. Use PSO to update the speed and position of the initialized individual optimal position. Based on the abnormal scene feature vector, calculate the classification score and generate a classification score vector. Use the Softmax function to calculate the probability of the classification score vector, set the abnormal type weight, use the average severity calculation method to calculate the initial severity score of the abnormal score in the classification score vector, and use the multiplication method to calculate the adjusted severity score. High-risk and medium-risk thresholds are set based on empirical rules, and the adjusted severity scores are used to set alarm level classification rules.

4. The method for monitoring and managing energy consumption data of a smart building according to claim 3, wherein: The energy efficiency objective function is defined, Lagrangian decomposition is used to decompose the sub-problems for each device, and the gradient descent method is used to output the global initial strategy vector, including: Establish energy efficiency targets at edge nodes to maximize the performance-to-energy ratio. Set power and performance constraints for edge nodes. Use Lagrangian decomposition to decompose local optimization targets and constraints into subproblems for each device. For each device, use gradient descent to iteratively update power and calculate environmental quality based on the updated power. The updated device performance is calculated using the ratio method, and the updated comprehensive performance of each device is calculated using the weighted summation method. The performance threshold of the device is set using the fixed value method. The device performance threshold is compared with the updated comprehensive performance to determine the device switching state. Based on the updated power, the mapping method is used to obtain the quantitative value of the mode. Based on the updated power, the Lagrange multiplier is updated. After reaching the maximum number of iterations, the optimal power, switching state and operation mode of the device are output, and a global initial strategy vector is generated at the master node.

5. The method for monitoring and managing energy consumption data of a smart building according to claim 4, wherein: The above process of defining smart building tasks, constructing a matrix of comprehensive benefit weights, converting equipment and tasks into a bipartite graph problem, and solving it using the Hungarian KM algorithm includes: Define the standard forms of the four tasks of smart buildings and the candidate action rules for normal and abnormal scenarios, set the comprehensive benefit weight of each device under the task and candidate action, construct the comprehensive benefit weight of each device into a weight matrix, and generate a candidate action set for normal and abnormal scenarios; Each edge node transmits the weight matrix and candidate action set to the master node. The master node aggregates the weight matrices of all edge nodes through the mean aggregation method to obtain the initial global weight. Based on the candidate action set, the initial global weight is corrected by the action constraint weight to obtain the final global weight. The master node distributes the global weight and candidate action set to each edge node. Based on the global weight, a bipartite graph is constructed. Using the device-task adaptability verification method, unreasonable device-task edges are removed. Virtual nodes are used to supplement nodes where the number of devices is not equal to the number of tasks. The graph expansion method is used to add virtual nodes to the bipartite graph to obtain an updated bipartite graph. Taking maximizing global weight and task matching as the objective function, a single matching constraint is set; Based on the updated bipartite graph, set an empty matching set, use the KM Hungarian algorithm to match device-task edges, and output the final matching set; Each edge node transmits the final matching set to the master node, which converts the final matching set into device control instructions and distributes them to the edge nodes to perform task allocation.

6. The method for monitoring and managing energy consumption data of a smart building according to claim 5, wherein: The collection of real-time data to perform smart building energy consumption management includes: The edge nodes collect real-time data, and the master node analyzes the normal and abnormal conditions of the data. Based on different scenarios and with the goal of minimizing energy consumption, the master node executes tasks in order of alarm levels and sends instructions to the devices controlled by the edge nodes based on the final matching set.

7. The method for monitoring and managing energy consumption data of a smart building according to claim 6, wherein: The construction of a visual interface to display the data generated by the analysis includes: Use BIM to build a visual interface to display four areas; Provides an interactive interface that allows managers to manually adjust device status and confirm automated suggestions.

8. A smart building energy consumption data monitoring and management system, based on the smart building energy consumption data monitoring and management method according to any one of claims 1 to 7, characterized in that: include, The collection and construction module is used to build a distributed architecture, collect energy consumption and environmental data for preprocessing, build a dynamic graph structure, use the graph attention mechanism (GTA) to extract the joint features of energy consumption and environmental data, and use the batch average attention coefficient to weight the Mahalanobis distance of the nodes to obtain the abnormal scene feature vector; Define a classification module to define the target classification function, use the EPC-PSO algorithm for iterative optimization, use the Softmax classifier to classify the abnormal scene feature vectors, and calculate the severity of each abnormal type; The decomposition and solution module is used to define the energy efficiency objective function, use Lagrangian decomposition to decompose the sub-problems for each device, use the gradient descent method to output the global initial strategy vector, define the smart building tasks, construct a matrix of comprehensive benefit weights, transform the devices and tasks into a bipartite graph problem, and solve it using the Hungarian KM algorithm; The execution visualization module is used to collect real-time data to perform smart building energy consumption management and build a visualization interface to display the data generated by the analysis.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the smart building energy consumption data monitoring and management method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the smart building energy consumption data monitoring and management method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Building energy consumption management system and method for analyzing power grid load

    CN119671202A

  • Sensor network target distribution method and device

    CN119729390A

  • BIM-based building energy consumption simulation analysis optimization method and system

    CN119849297A

  • System and method suitable for optimizing linehaul operations

    US20080140597A1

  • Anomaly recognition method and system for tracks of trucks

    US20250005492A1

Cited By

  • Learning and optimization-based online cooperative operation method for power grid interaction type residential buildings

    CN120855321A

  • Intelligent green curtain wall reverse modeling method based on BIM-IoT fusion

    CN121030895A

  • Electronic component intelligent production control method and system, electronic equipment and storage medium

    CN121187182A

  • AI fault analysis system for box transformer measurement and control device

    CN121461313A