An adaptive building energy consumption anomaly detection method and system

By employing distributed collaborative training and encryption technologies, the problems of data silos and privacy security in building energy consumption anomaly detection have been solved, achieving efficient energy consumption anomaly detection.

CN116244628BActive Publication Date: 2025-12-16WUHAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310190026.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-28
Publication Date
2025-12-16
Estimated Expiration
2043-02-28

AI Technical Summary

Technical Problem

Existing methods for detecting abnormal building energy consumption suffer from unsatisfactory results due to data silos and weak generalization capabilities of data processing models, and user data privacy and security issues are difficult to resolve.

Method used

An adaptive building energy consumption anomaly detection method is adopted. This method involves distributed collaborative training between a local computing terminal and a model server. It utilizes a feature extraction network and an anomaly detection network, combined with simulated annealing algorithm and homomorphic encryption technology, to protect user data privacy while collaboratively training and updating model parameters.

Benefits of technology

It effectively solves the problem of data silos, improves the generalization ability of the detection model, and achieves efficient detection of abnormal energy consumption while protecting user data privacy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116244628B_ABST
    Figure CN116244628B_ABST
Patent Text Reader

Abstract

The application provides a kind of adaptive building energy consumption anomaly detection method and system, belong to energy protection technical field, including: based on building local energy consumption record construction feature extraction network, training obtains local feature extraction network parameter, receives updated local feature extraction network parameter, feature extraction network is updated based on updated local feature extraction network parameter;Extract the deep feature of building local energy consumption record, based on deep feature construction anomaly detection network;Training obtains anomaly detection network model parameter, receives anomaly detection network model parameter updated according to building activity, and outputs energy consumption anomaly detection result.The application is calculated and identified to multiple building energy anomaly consumption by using multiple collaborative distributed local computing terminal and model server, while protecting the privacy and security of user data in building, effectively solve the problem that data cannot be cooperated to cause data island and data processing model generalization ability is weak.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of energy conservation, and particularly relates to a self-adaptive building energy consumption anomaly detection method and system. BACKGROUND

[0002] With the development of society, energy consumption is increasing, and the energy consumption of various buildings accounts for more than 40% of the total global energy consumption, and the carbon dioxide emission is more than 30%, so it is necessary to quantitatively analyze and monitor the energy consumption of buildings to achieve the purpose of energy saving and emission reduction and reduce resource waste.

[0003] In the existing building energy consumption detection, the intelligent data-driven analog-digital conversion method has been greatly developed, and these methods are supported by a large amount of data collected by sensors in the material network. Machine learning and deep learning technology have achieved good application effect in the field of energy anomaly detection. However, there are still many challenges and obstacles in the application of these methods, which limit their popularization. The biggest problem is the privacy and security of user data in each building, which makes it difficult for individual buildings to collect enough high-quality data to establish an effective anomaly detection model. Often, the interaction and coordination of data are needed to complete the interaction of information, so as to obtain accurate measurement information. The aggregation of data needs to comply with relevant data privacy policies. In the building scene, especially in the residence, many users are unwilling to disclose their personal privacy data. At the same time, in the existing building energy consumption anomaly detection scheme, it is usually assumed that the feature data of different buildings is in the same distribution condition. This assumption often leads to unsatisfactory detection results, because the same model is deployed in different buildings, and the result is even less ideal than using single building data.

[0004] Therefore, in view of the limitations of the existing building energy consumption anomaly detection, a new detection method needs to be proposed. SUMMARY

[0005] The present application provides a self-adaptive building energy consumption anomaly detection method and system to solve the defects of data islands caused by the isolation of data between the existing technology for building energy consumption anomaly detection, and the weak generalization ability of data processing model makes the detection result not ideal.

[0006] In a first aspect, the present application provides a self-adaptive building energy consumption anomaly detection method, comprising:

[0007] obtaining a building local energy consumption record, and constructing a feature extraction network based on the building local energy consumption record;

[0008] training the feature extraction network, obtaining local feature extraction network parameters, and sending the local feature extraction network parameters to a model server;

[0009] receiving updated local feature extraction network parameters from the model server, and updating the feature extraction network based on the updated local feature extraction network parameters;

[0010] extracting deep features of the building local energy consumption records, and constructing an anomaly detection network based on the deep features;

[0011] training the anomaly detection network, obtaining anomaly detection network model parameters, and sending the anomaly detection network model parameters to the model server;

[0012] receiving updated anomaly detection network model parameters from the model server according to the building activity, and outputting an energy consumption anomaly detection result.

[0013] According to the adaptive building energy consumption anomaly detection method provided by the application, the building local energy consumption records are obtained, and a feature extraction network is constructed based on the building local energy consumption records, which comprises:

[0014] The feature extraction network is constructed according to the number of buildings, any original feature in the local energy consumption feature, any anomaly label of the local energy consumption, and any building record number.

[0015] It is determined that the feature extraction network comprises a feature encoder and a feature decoder, the feature encoder is connected with a second linear layer and a third linear layer respectively through a first linear layer and a first activation function layer, generates feature mean and feature variance, and samples the feature mean and the feature variance by using a preset sampling factor to obtain the deep features.

[0016] According to the adaptive building energy consumption anomaly detection method provided by the application, the training of the feature extraction network, the obtaining of the local feature extraction network parameters, and the sending of the local feature extraction network parameters to the model server comprise:

[0017] The feature extraction network is trained by using the simulated annealing algorithm, a mean square error loss function is constructed based on any original feature in the local energy consumption feature, any original feature recovery data in the local energy consumption feature, and any building record number, an optimized feature extraction network parameter loss function is formed by using the mean square error loss function, feature variance, and feature mean, the feature extraction network is converged by using the optimized feature extraction network parameter loss function, and the local feature extraction network parameters are obtained.

[0018] The local feature extraction network parameters are encrypted by using a homomorphic encryption technology to obtain encrypted local feature extraction network parameters, and the encrypted local feature extraction network parameters are sent to the model server.

[0019] According to the adaptive building energy consumption anomaly detection method provided by the application, the deep features of the building local energy consumption records are extracted, and an anomaly detection network is constructed based on the deep features, including:

[0020] The deep features are extracted by using a feature decoder in the feature extraction network.

[0021] It is determined that the anomaly detection network is obtained by sequentially connecting a first convolutional layer, a first pooling layer, a second convolutional layer, a second pooling layer, a batch normalization layer and a fully connected layer.

[0022] According to the adaptive building energy consumption anomaly detection method provided by the application, the anomaly detection network is trained, anomaly detection network model parameters are obtained, and the anomaly detection network model parameters are sent to the model server, including:

[0023] The anomaly detection network is trained by using a simulated annealing algorithm, a cross-entropy loss function is constructed based on any anomaly label of local energy consumption, any network output prediction label of local energy consumption and any building record number, an optimized anomaly detection network parameter loss function is formed by using the cross-entropy loss function, the anomaly detection network is converged, and the anomaly detection network model parameters are obtained.

[0024] The anomaly detection network model parameters are encrypted by using a homomorphic encryption technology to obtain encrypted anomaly detection network model parameters, and the encrypted anomaly detection network model parameters are sent to the model server.

[0025] In a second aspect, the application further provides an adaptive building energy consumption anomaly detection method, including:

[0026] After the local computing terminal generates local feature extraction network parameters, the local feature extraction network parameters are received.

[0027] The local feature extraction network parameters are weighted to obtain updated local feature extraction network parameters, and the updated local feature extraction network parameters are sent to the local computing terminal.

[0028] After the local computing terminal generates anomaly detection network model parameters, the anomaly detection network model parameters are received.

[0029] The abnormality detection network model parameters are updated according to the building activity, updated abnormality detection network model parameters are generated, and the updated abnormality detection network model parameters are sent to the local computing terminal, so that the local computing terminal outputs an energy consumption abnormality detection result.

[0030] According to the adaptive building energy consumption abnormality detection method, the local feature extraction network parameters are weighted to obtain updated local feature extraction network parameters, which include:

[0031] The local feature extraction network parameters are weighted based on the local feature extraction network parameters of any local computing terminal and the number of buildings, and initial local feature extraction network parameters are obtained.

[0032] The process is repeated until a preset iteration number is met, and the updated local feature extraction network parameters are obtained.

[0033] According to the adaptive building energy consumption abnormality detection method, the abnormality detection network model parameters are updated according to the building activity, and updated abnormality detection network model parameters are generated, which include:

[0034] A building set is determined, the number of buildings is determined as a to-be-calculated building number in the building set, any local abnormality detection network batch normalization layer feature vector, any local abnormality detection network batch normalization layer feature transpose vector, and a feature vector dimension are determined, and a similarity between local feature extraction network features is obtained.

[0035] A building activity index is obtained from the similarity between the local feature extraction network features and the number of buildings.

[0036] The building activity indexes are arranged in descending order, and the active building set is formed by extracting the buildings corresponding to the first preset number of building activity indexes.

[0037] If it is determined that any building belongs to the active building set, a similarity probability density is obtained from the similarity between the local feature extraction network features, and the abnormality detection network model parameters of the any building are obtained from the similarity probability density and other abnormality detection network model parameters.

[0038] If it is determined that any building does not belong to the active building set, the abnormality detection network model parameters of the any building are obtained from other abnormality detection network model parameters and the number of buildings.

[0039] The process is repeated until a preset iteration number is met, and the updated abnormality detection network model parameters are obtained.

[0040] In a third aspect, the present application further provides an adaptive building energy consumption anomaly detection system, comprising:

[0041] A first construction module is configured to acquire a building local energy consumption record, and construct a feature extraction network based on the building local energy consumption record;

[0042] A first training module is configured to train the feature extraction network, acquire a local feature extraction network parameter, and send the local feature extraction network parameter to a model server;

[0043] A first updating module is configured to receive an updated local feature extraction network parameter of the model server, and update the feature extraction network based on the updated local feature extraction network parameter;

[0044] A second construction module is configured to extract a deep feature of the building local energy consumption record, and construct an anomaly detection network based on the deep feature;

[0045] A second training module is configured to train the anomaly detection network, acquire an anomaly detection network model parameter, and send the anomaly detection network model parameter to the model server;

[0046] A detection module is configured to receive an anomaly detection network model parameter updated by the model server according to a building activity level, and output an energy consumption anomaly detection result.

[0047] In a fourth aspect, the present application further provides an adaptive building energy consumption anomaly detection system, comprising:

[0048] A first receiving module is configured to generate a local feature extraction network parameter by a local computing terminal, and receive the local feature extraction network parameter;

[0049] A second updating module is configured to perform weighted processing on the local feature extraction network parameter to obtain an updated local feature extraction network parameter, and send the updated local feature extraction network parameter to the local computing terminal;

[0050] A second receiving module is configured to generate an anomaly detection network model parameter by the local computing terminal, and receive the anomaly detection network model parameter;

[0051] A third updating module is configured to update the anomaly detection network model parameter according to a building activity level, generate an updated anomaly detection network model parameter, and send the updated anomaly detection network model parameter to the local computing terminal, so that the local computing terminal outputs an energy consumption anomaly detection result.

[0052] The adaptive building energy consumption anomaly detection method and system provided by the application can effectively solve the problems of data island and weak generalization ability of data processing model caused by the inability of data to cooperate while protecting the privacy and security of user data in the building. BRIEF DESCRIPTION OF DRAWINGS

[0053] In order to more clearly illustrate the technical solutions in the application or prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are some embodiments of the application, and other drawings can be obtained by those skilled in the art without creative labor.

[0054] Figure 1 is one of the flowcharts of the adaptive building energy consumption anomaly detection method provided by the application;

[0055] Figure 2 is a structural diagram of the model server and the local computing terminal provided by the application;

[0056] Figure 3 is the second flowchart of the adaptive building energy consumption anomaly detection method provided by the application;

[0057] Figure 4 is a local anomaly detection network model parameter update diagram provided by the application;

[0058] Figure 5 is one of the structural diagrams of the adaptive building energy consumption anomaly detection system provided by the application;

[0059] Figure 6 is the second structural diagram of the adaptive building energy consumption anomaly detection system provided by the application. DETAILED DESCRIPTION

[0060] In order to make the purpose, technical scheme and advantages of the application more clear, the technical scheme in the application will be described clearly and completely in the following combined with the drawings in the application. Obviously, the described embodiments are part of the embodiments of the application, not all the embodiments. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative labor belong to the protection scope of the application.

[0061] In order to solve the problems of data privacy and security and data cooperation in the existing building energy consumption anomaly detection technology, the application provides an adaptive building energy consumption anomaly detection method and system based on a distributed cooperative training architecture.

[0062] Figure 1 is one of the flowcharts of the adaptive building energy consumption anomaly detection method provided by the embodiment of the present application, and the corresponding execution subject is a local computing terminal, as shown in Figure 1 , which comprises:

[0063] Step 101: Obtain the building local energy consumption record, and construct a feature extraction network based on the building local energy consumption record;

[0064] Step 102: Train the feature extraction network, obtain the local feature extraction network parameters, and send the local feature extraction network parameters to the model server;

[0065] Step 103: Receive the updated local feature extraction network parameters of the model server, and update the feature extraction network based on the updated local feature extraction network parameters;

[0066] Step 104: Extract deep features of the building local energy consumption record, and construct an anomaly detection network based on the deep features;

[0067] Step 105: Train the anomaly detection network, obtain the anomaly detection network model parameters, and send the anomaly detection network model parameters to the model server;

[0068] Step 106: Receive the anomaly detection network model parameters updated by the model server according to the building activity, and output the energy consumption anomaly detection result.

[0069] It should be noted that the embodiment of the present application adopts a distributed architecture as shown in Figure 2 , which comprises a model server, a local computing terminal and a sensor, etc. The sensor is deployed in each building to obtain the energy consumption data of the building in real time. The local computing terminal is also deployed in each building. The model server is deployed remotely and forms a distributed connection architecture with each local computing terminal. Full-duplex communication is adopted between each local computing terminal and the model server to cooperatively train the model. The model server is selected as Raspberry PI Zero, and multiple local computing terminals are selected as Raspberry PI Zero.

[0070] Specifically, the local computing terminal in each building obtains a building local energy consumption record, constructs a feature extraction network, trains the feature extraction network, sends the local feature extraction network parameters to the model server after obtaining the local feature extraction network parameters, receives the updated local feature extraction network parameters after the model server updates the local feature extraction network parameters, updates the feature extraction network, and repeatedly executes the update process until a preset iteration number is reached. Stop updating, further extract deep features of the building local energy consumption record by the local computing terminal, construct an anomaly detection network, train the anomaly detection network, send the anomaly detection network model parameters to the model server after obtaining the anomaly detection network model parameters, update the anomaly detection network model parameters based on the building activity by the model server, repeatedly execute the update process until a preset iteration number is reached. Stop updating, receive the final updated anomaly detection network model parameters, and output an energy consumption anomaly detection result.

[0071] The present application solves the problems of data island and weak generalization ability of data processing model caused by the inability of data to cooperate by using multiple collaborative distributed local computing terminals and model servers to calculate and identify multiple building energy abnormal consumption, while protecting the privacy and security of user data in the building.

[0072] On the basis of the above embodiment, step 101 comprises:

[0073] According to the number of buildings, any original feature in the local energy consumption feature, any abnormal label of the local energy consumption, and any building record number, the feature extraction network is constructed;

[0074] The feature extraction network comprises a feature encoder and a feature decoder, the feature encoder is connected with a first linear layer and a first activation function layer, respectively, and a second linear layer and a third linear layer, generates a feature mean and a feature variance, and samples the feature mean and the feature variance by using a preset sampling factor, to obtain the deep feature.

[0075] Specifically, the local energy consumption record of each building is obtained, and the local energy consumption record comprises a local energy consumption feature and a corresponding abnormal label, and is defined as:

[0076]

[0077] Wherein, D i is the local energy consumption record of building i, n b is the number of buildings, is the jth original feature of the energy consumption feature, is the jth abnormal label of the local energy consumption record, n i is the number of records of the ith building.

[0078] The feature extraction network is constructed, and the feature extraction network includes two parts of a feature encoder and a feature decoder. The feature extractor is generated by a first linear layer 1, a first activation function layer 1, a second linear layer 2 and a third linear layer 3 connected respectively to generate a feature mean value u and a feature variance σ, a sampling operation is performed to obtain a deep feature Z, and the sampling operation is specifically represented as:

[0079] Z = u + σ · ∈

[0080] Wherein, ∈ is a sampling factor, is a random value sampled in a standard normal distribution, u is a feature mean value, and σ is a feature variance.

[0081] On the basis of the above embodiment, step 200 includes:

[0082] The feature extraction network is trained by using the simulated annealing algorithm, a mean square error loss function is constructed based on any original feature in the local energy consumption feature, the original feature restoration data in the local energy consumption feature and any building record number, an optimized feature extraction network parameter loss function is formed by using the mean square error loss function and the feature variance and the feature mean value, the feature extraction network is converged by using the optimized feature extraction network parameter loss function, and the local feature extraction network parameter is obtained.

[0083] The local feature extraction network parameter is encrypted by using the homomorphic encryption technology to obtain an encrypted local feature extraction network parameter, and the encrypted local feature extraction network parameter is sent to the model server.

[0084] Specifically, the local feature extraction network is updated by the local computing terminal, and the local energy consumption record is used to train the feature extraction network. In the training process, the simulated annealing algorithm is used for artificial attenuation, and the corresponding loss function is:

[0085]

[0086] Wherein, Θ f represents the feature extraction network parameter to be optimized, l mse () is a mean square error loss function, is the jth original feature of the energy consumption feature, is the restoration data of the jth energy consumption feature output by the network, n i is the record number of the ith building, σ is the feature variance, μ is the feature mean value, i represents any building, and j represents any feature.

[0087] Here, in order to ensure privacy, the feature extraction network parameter is encrypted by using the homomorphic encryption technology by the local computing terminal and sent to the model server.

[0088] On the basis of the above embodiment, step 104 includes:

[0089] extract the deep features by using a feature decoder in the feature extraction network;

[0090] The abnormality detection network is obtained by sequentially connecting a first convolutional layer, a first pooling layer, a second convolutional layer, a second pooling layer, a batch normalization layer, and a fully connected layer.

[0091] Specifically, the local computing terminal extracts deep features of the local energy consumption data by using a decoder part in the feature extraction network.

[0092] The abnormality detection network is obtained by sequentially connecting a first convolutional layer, a first pooling layer, a second convolutional layer, a second pooling layer, a batch normalization (BN) layer, and a fully connected layer.

[0093] On the basis of the above-mentioned embodiments, step 105 comprises:

[0094] The abnormality detection network is trained by using the simulated annealing algorithm, a cross-entropy loss function is constructed based on any abnormality label of the local energy consumption, any network output prediction label of the local energy consumption, and any building record number, an optimized abnormality detection network parameter loss function is formed by using the cross-entropy loss function, the abnormality detection network is converged, and the abnormality detection network model parameters are obtained.

[0095] The abnormality detection network model parameters are encrypted by using the homomorphic encryption technology to obtain encrypted abnormality detection network model parameters, and the encrypted abnormality detection network model parameters are sent to the model server.

[0096] Specifically, the local computing terminal updates the local abnormality detection network, uses the local energy consumption data, and locally trains the local abnormality detection network. In the training process, the simulated annealing algorithm is used for artificial attenuation, and the corresponding loss function is:

[0097]

[0098] wherein, Θ d represents the parameters of the abnormality detection network to be optimized, l cross () is a cross-entropy loss function, is a prediction label output by the network, represents the jth abnormality label of the local energy consumption record, n i is the record number of the ith building, i represents any building, and j represents any energy consumption feature.

[0099] Similarly, the local computing terminal encrypts the abnormality detection network model parameters by using the homomorphic encryption technology and sends them to the model server.

[0100] Figure 3is a flowchart of the adaptive building energy consumption anomaly detection method provided by the embodiment of the present application, and the corresponding execution subject is a model server, as shown in the figure, which comprises: Figure 3

[0101] Step 201: The local feature extraction network parameters are generated by the local computing terminal, and the local feature extraction network parameters are received.

[0102] Step 202: The local feature extraction network parameters are weighted to obtain updated local feature extraction network parameters, and the updated local feature extraction network parameters are sent to the local computing terminal.

[0103] Step 203: The anomaly detection network model parameters are generated by the local computing terminal, and the anomaly detection network model parameters are received.

[0104] Step 204: The anomaly detection network model parameters are updated according to the building activity, the updated anomaly detection network model parameters are generated, and the updated anomaly detection network model parameters are sent to the local computing terminal for outputting the energy consumption anomaly detection result.

[0105] Specifically, the local computing terminal in each building obtains the building local energy consumption record, constructs a feature extraction network, trains the feature extraction network, obtains the local feature extraction network parameters, and sends them to the model server. After the model server updates the local feature extraction network parameters, the updated local feature extraction network parameters are received, the feature extraction network is updated, the updating process is repeatedly executed, and the updating is stopped after a preset iteration number. The local computing terminal further extracts the deep features of the building local energy consumption record, constructs an anomaly detection network, trains the anomaly detection network, obtains the anomaly detection network model parameters, and sends them to the model server. The model server updates the anomaly detection network model parameters based on the building activity, repeatedly executes the updating process, and stops updating after a preset iteration number. The local computing terminal receives the final updated anomaly detection network model parameters and outputs the energy consumption anomaly detection result.

[0106] The present application adopts multiple collaborative distributed local computing terminals and model servers to calculate and identify multiple building energy consumption anomalies, which effectively solves the problem of data island caused by the inability of data to cooperate and the weak generalization ability of data processing model while protecting the privacy and security of user data in the building.

[0107] On the basis of the above embodiment, the local feature extraction network parameters are weighted to obtain updated local feature extraction network parameters, which comprises:

[0108] ​The local feature extraction network parameters of any local computing terminal are weighted based on the local feature extraction network parameters and the number of buildings, and initial local feature extraction network parameters are obtained by weighting the local feature extraction network parameters.

[0109] The updating of the local feature extraction network parameters is repeated until a preset iteration number is met.

[0110] Specifically, after the local computing terminal sends the trained local feature extraction network parameters to the model server, the model server performs weighting processing on the local feature extraction network parameters, updates the feature extraction network held by the model server using the weighted parameters, sends the updated feature extraction network parameters to the local computing terminal, and specifically:

[0111]

[0112] wherein, is the weighted average user feature extraction network, is the local feature extraction network parameter held by the i-th local computing terminal, n b is the number of buildings, and i represents any building.

[0113] The updating step is repeated until a preset iteration number is reached, and preferably, the iteration number of the embodiment of the application is set to 20.

[0114] On the basis of the above-mentioned embodiment, the updating of the anomaly detection network model parameters according to the building activity degree to generate updated anomaly detection network model parameters comprises:

[0115] A building set is determined, the logarithm of the number of buildings in the building set is determined as the to-be-calculated building number, any local anomaly detection network batch normalization layer feature vector, any local anomaly detection network batch normalization layer feature transpose vector, and the feature vector dimension are determined, and the similarity between the local feature extraction network features is obtained.

[0116] The building activity index is obtained from the similarity between the local feature extraction network features and the number of buildings.

[0117] The building activity indexes are arranged in descending order, and the buildings corresponding to the first preset number of building activity indexes form an active building set.

[0118] If it is determined that any building belongs to the active building set, the similarity probability density is obtained from the similarity between the local feature extraction network features, and the anomaly detection network model parameters of the any building are obtained from the similarity probability density and other anomaly detection network model parameters.

[0119] If it is determined that any building does not belong to the active building set, the abnormality detection network model parameters of the any building are obtained from other abnormality detection network model parameters and the number of buildings;

[0120] The repeated execution is performed until a preset iteration number is met, and the updated abnormality detection network model parameters are obtained.

[0121] Specifically, after the model server receives the local abnormality detection network parameters sent by the local computing terminal, the model server calculates the parameter update value of each local abnormality detection network according to the building activity, and correspondingly sends the updated local abnormality detection network to the local computing terminal, as shown in FIG. 2. Figure 4

[0122] The building set participating in the calculation of the model is denoted as B. Where N is the number of buildings, and each building's computing terminal saves and calculates a local abnormality detection network, and the BN feature vector of the local abnormality detection network is denoted as v.

[0123] The model server calculates the activity index I according to the BN feature vector of each uploaded abnormality detection network, and the calculation is specifically as follows:

[0124]

[0125] Where I i represents the activity index of the i-th building, and N represents Figure 1 the number of buildings participating in the calculation, as shown in FIG. 1. i As preferred, for I i,j , the embodiment of the present application only randomly selects lnN BN feature vectors of the model to calculate the similarity s

[0126]

[0127] Where v i is the feature vector of the BN layer of the i-th abnormality detection network, and d is the dimension of the feature vector. represents the transposed vector of the feature output by the BN layer of the j-th abnormality detection network.

[0128] The I is arranged in descending order, and the buildings corresponding to the first K activity indexes I are selected to form an active building set B, and as preferred, K = lnN.

[0129] In the first case, if the building b i ∈B, the similarity s i between the BN feature v j of the building and the BN features v i,j of other buildings is calculated:

[0130]

[0131] The similarity probability density is calculated as follows:

[0132]

[0133] The model parameters of the building b i are updated as follows:

[0134]

[0135] where Θ i is the parameter of the anomaly detection model of the building b i , and Θ j is the parameter of the anomaly detection model of the building b j .

[0136] In the second case, if the building b The model parameters of the building b i are updated as follows:

[0137]

[0138] Similarly, the above updating process is repeated until the number of iterations, for example, 20 times, is reached.

[0139] The energy consumption data in the present application is trained on a local computing terminal of the building, and only the model parameters are uploaded to the model server, effectively protecting privacy while utilizing all other local data participating in model training. The architecture of the multi-terminal collaborative computing model makes the present application method scalable, that is, in the face of data growth and device increase, the model can still be updated on the basis of the original model. The multi-terminal collaborative computing method is used to extract features from high-dimensional energy consumption features, compress them into low-dimensional dense features for anomaly detection, and greatly reduce the subsequent model computation overhead. The building activity is determined according to different energy consumption data of different buildings, different parameter updating strategies are adopted according to different building activity, and the time complexity and memory usage are reduced from to The prediction accuracy is improved, and the computing efficiency and performance requirements for computing devices are greatly improved.

[0140] The adaptive building energy consumption anomaly detection system provided by the present application is described below, and the adaptive building energy consumption anomaly detection system described below can be mutually corresponding to the adaptive building energy consumption anomaly detection system method described above.

[0141] Figure 5 is one of the structural diagrams of the adaptive building energy consumption anomaly detection system provided by the present application, as Figure 5As shown, comprising: a first construction module 51, a first training module 52, a first update module 53, a second construction module 54, a second training module 55 and a detection module 56, wherein:

[0142] The first construction module 51 is used for acquiring building local energy consumption records, and constructing a feature extraction network based on the building local energy consumption records; the first training module 52 is used for training the feature extraction network, acquiring local feature extraction network parameters, and sending the local feature extraction network parameters to a model server; the first update module 53 is used for receiving updated local feature extraction network parameters of the model server, and updating the feature extraction network based on the updated local feature extraction network parameters; the second construction module 54 is used for extracting deep features of the building local energy consumption records, and constructing an anomaly detection network based on the deep features; the second training module 55 is used for training the anomaly detection network, acquiring anomaly detection network model parameters, and sending the anomaly detection network model parameters to the model server; and the detection module 56 is used for receiving anomaly detection network model parameters updated by the model server according to building activity, and outputting an energy consumption anomaly detection result.

[0143] Figure 6 It is the second structure schematic view of the adaptive building energy consumption anomaly detection system provided by the embodiment of the application, as shown in Figure 6 As shown, comprising: a first receiving module 61, a second update module 62, a second receiving module and a third update module 64, wherein:

[0144] The first receiving module 61 is used for generating local feature extraction network parameters by a local computing terminal, and receiving the local feature extraction network parameters; the second update module 62 is used for performing weighted processing on the local feature extraction network parameters to obtain updated local feature extraction network parameters, and sending the updated local feature extraction network parameters to the local computing terminal; the second receiving module 63 is used for generating anomaly detection network model parameters by the local computing terminal, and receiving the anomaly detection network model parameters; and the third update module 64 is used for updating the anomaly detection network model parameters according to building activity, generating updated anomaly detection network model parameters, and sending the updated anomaly detection network model parameters to the local computing terminal, so that the local computing terminal outputs an energy consumption anomaly detection result.

[0145] The device embodiments described above are merely illustrative, wherein the units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, i.e., can be located in one place, or can be distributed to multiple network units. Part or all of the modules can be selected to achieve the purposes of the embodiments according to actual needs. Those skilled in the art can understand and implement without creative labor.

[0146] Through the description of the above embodiments, those skilled in the art can clearly understand that the embodiments can be realized by means of software and the necessary general hardware platform, and of course can also be realized by hardware. Based on such understanding, the above technical solutions can be embodied in the form of a software product, which can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the methods described in each embodiment or some parts of the embodiments.

[0147] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. An adaptive building energy consumption anomaly detection method applied to a local computing terminal, characterized in that, The method comprises the following steps: obtaining a building local energy consumption record, and constructing a feature extraction network based on the building local energy consumption record; training the feature extraction network, obtaining local feature extraction network parameters, and sending the local feature extraction network parameters to a model server, comprising: training the feature extraction network using a simulated annealing algorithm, constructing a mean square error loss function based on any original feature in the local energy consumption feature, the original feature in the local energy consumption feature, and any building record number, and using the mean square error loss function and the optimized feature extraction network parameter loss function formed by the feature variance and the feature mean to converge the feature extraction network to obtain the local feature extraction network parameters; encrypting the local feature extraction network parameters using homomorphic encryption technology to obtain encrypted local feature extraction network parameters, and sending the encrypted local feature extraction network parameters to the model server; receiving updated local feature extraction network parameters from the model server, and updating the feature extraction network based on the updated local feature extraction network parameters; extracting deep features of the building local energy consumption record, and constructing an anomaly detection network based on the deep features, comprising: extracting the deep features using a feature decoder in the feature extraction network; determining that the anomaly detection network is obtained by sequentially connecting a first convolutional layer, a first pooling layer, a second convolutional layer, a second pooling layer, a batch normalization layer, and a fully connected layer; training the anomaly detection network, obtaining anomaly detection network model parameters, and sending the anomaly detection network model parameters to the model server, comprising: training the anomaly detection network using a simulated annealing algorithm, constructing a cross-entropy loss function based on any anomaly label of local energy consumption, any network output prediction label of local energy consumption, and any building record number, and using the cross-entropy loss function to form an optimized anomaly detection network parameter loss function to converge the anomaly detection network to obtain the anomaly detection network model parameters; encrypting the anomaly detection network model parameters using homomorphic encryption technology to obtain encrypted anomaly detection network model parameters, and sending the encrypted anomaly detection network model parameters to the model server; receiving updated anomaly detection network model parameters from the model server according to the building activity, and outputting an energy consumption anomaly detection result. 2.The adaptive building energy consumption anomaly detection method of claim 1, wherein, The method comprises the following steps: obtaining a building local energy consumption record, and constructing a feature extraction network based on the building local energy consumption record, comprising: constructing the feature extraction network according to the number of buildings, any original feature in the local energy consumption feature, any anomaly label of local energy consumption, and any building record number; 3. An adaptive building energy consumption anomaly detection method applied to a model server, characterized in that, determining that the feature extraction network comprises a feature encoder and a feature decoder, the feature encoder connects a first linear layer and a first activation function layer with a second linear layer and a third linear layer respectively to generate feature mean and feature variance, and samples the feature mean and feature variance using a preset sampling factor to obtain the deep features. The method comprises the following steps: generating local feature extraction network parameters by a local computing terminal, and receiving the local feature extraction network parameters; The local feature extraction network parameters are weighted to obtain updated local feature extraction network parameters, and the updated local feature extraction network parameters are sent to the local computing terminal; After the local computing terminal generates the abnormality detection network model parameters, the abnormality detection network model parameters are received; The abnormality detection network model parameters are updated according to the building activity, and updated abnormality detection network model parameters are generated, including: Determine the building set, determine the logarithm of the building number as the to-be-calculated building number in the building set, determine any local abnormality detection network batch normalization layer feature vector, any local abnormality detection network batch normalization layer feature transpose vector, and the feature vector dimension, to obtain the similarity between local feature extraction network features; The building activity index is obtained from the building number and the similarity between the local feature extraction network features; The building activity indexes are arranged in descending order, and the active building set is formed by extracting the buildings corresponding to the top pre-set number of building activity indexes; If it is determined that any building belongs to the active building set, the similarity probability density is obtained from the similarity between the local feature extraction network features, and the abnormality detection network model parameters of the any building are obtained from the similarity probability density and other abnormality detection network model parameters; If it is determined that any building does not belong to the active building set, the abnormality detection network model parameters of the any building are obtained from other abnormality detection network model parameters and the building number; Repeat until the pre-set iteration number is met, and the updated abnormality detection network model parameters are obtained; The updated abnormality detection network model parameters are sent to the local computing terminal for output of the energy consumption abnormality detection result. 4.The adaptive building energy consumption anomaly detection method of claim 3, wherein, The local feature extraction network parameters are weighted to obtain updated local feature extraction network parameters, including: The local feature extraction network parameters are weighted based on the local feature extraction network parameters of any local computing terminal and the building number, to obtain initial local feature extraction network parameters; Repeat until the pre-set iteration number is met, and the updated local feature extraction network parameters are obtained.

5. An adaptive building energy consumption anomaly detection system based on the adaptive building energy consumption anomaly detection method of claim 1 or 2, applied to a local computing terminal, characterized in that, Including: The first construction module is configured to obtain building local energy consumption records, and construct a feature extraction network based on the building local energy consumption records; The first training module is configured to train the feature extraction network, obtain local feature extraction network parameters, and send the local feature extraction network parameters to a model server; The first update module is configured to receive updated local feature extraction network parameters from the model server, and update the feature extraction network based on the updated local feature extraction network parameters; The second construction module is configured to extract deep features of the building local energy consumption records, and construct an abnormality detection network based on the deep features; The second training module is configured to train the abnormality detection network, obtain abnormality detection network model parameters, and send the abnormality detection network model parameters to the model server; The detection module is configured to receive the abnormality detection network model parameter updated according to the building activity, and output an energy consumption abnormality detection result.

6. An adaptive building energy consumption anomaly detection system based on the adaptive building energy consumption anomaly detection method of claim 3 or 4, applied to a model server, characterized in that, Comprise: The first receiving module is configured to receive the local feature extraction network parameter generated by the local computing terminal; The second updating module is configured to perform weighted processing on the local feature extraction network parameter to obtain an updated local feature extraction network parameter, and send the updated local feature extraction network parameter to the local computing terminal; The second receiving module is configured to receive the abnormality detection network model parameter generated by the local computing terminal; The third updating module is configured to update the abnormality detection network model parameter according to the building activity, generate an updated abnormality detection network model parameter, and send the updated abnormality detection network model parameter to the local computing terminal, so that the local computing terminal outputs an energy consumption abnormality detection result.