Electricity consumption monitoring analysis early warning system
By building a power consumption sequence model and a fault prediction mechanism, combining health index and hierarchical warning, the shortcomings of the existing system in power consumption monitoring and fault warning are solved, and efficient and accurate power consumption abnormality detection and fault response are achieved.
Patent Information
- Application Number
- CN202510536196.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-27
- Publication Date
- 2025-08-01
AI Technical Summary
The existing power consumption monitoring and analysis and fault warning systems cannot collect user electricity data efficiently in real time, cannot effectively identify abnormal patterns in complex electricity consumption behavior, is difficult to deal with complex relationships between multi-dimensional features, and cannot dynamically adjust strategies to achieve timely response and optimization.
Convolutional neural network and long-term memory network are used to build an electricity sequence model, combine random forest algorithms and target optimization functions to dynamically identify abnormal behaviors and predict fault types, build a hierarchical early warning strategy based on health index, and combine real-time analysis to trigger alarms and feedback to regulate emergency measures.
It realizes efficient integration of power consumption data and dynamic identification of abnormal behaviors, improves the robustness and accuracy of fault prediction, has high adaptability and closed-loop optimization capabilities, and can dynamically adjust the response strategy to deal with different faults.
Smart Images

Figure CN120408447A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power consumption analysis and early warning, and specifically to a power consumption monitoring, analysis and early warning system. Background Art
[0002] In modern society, electricity is an important and indispensable energy source in daily life and industrial activities. With the accelerating advancement of electronic informatization, the types and quantities of household appliances have increased rapidly, and the demand for power monitoring and fault early warning has become increasingly prominent. However, the existing technologies have the following problems in power consumption monitoring, analysis and fault early warning: Traditional systems mostly rely on manual records or simple monitoring methods and cannot collect users' power consumption data in real time and efficiently; Conventional methods rely on a single threshold or simple rules and cannot effectively identify abnormal patterns in complex power consumption behaviors; Existing fault prediction methods are difficult to handle the complex relationships between multi-dimensional features, resulting in insufficient reliability and accuracy of prediction results; Existing early warning systems cannot dynamically adjust strategies and cannot achieve timely response and optimization for complex fault types. Summary of the Invention
[0003] In view of the above existing problems, the present invention is proposed.
[0004] To solve the above technical problems, the present invention provides the following technical solutions: A power consumption monitoring, analysis and early warning system includes the following steps. An abnormal behavior detection module, which is used to identify abnormal behavior data in users' power consumption data, specifically: By collecting users' power consumption data and historical power consumption data, and constructing the collected power consumption data into corresponding data sets, extracting normal power consumption behavior characteristics from the historical power consumption data. At the same time, using a convolutional neural network and a long short-term memory network to construct a power consumption sequence model, taking the normal power consumption behavior characteristics as the input of the model, and the output result of the model as the benchmark threshold for abnormal behavior data detection. Then, inputting the comprehensive feature vector of abnormal behavior detection based on power consumption data into the power consumption sequence model, and comparing the output result with the benchmark threshold to achieve abnormal behavior data detection; A fault type prediction module, which uses a fault prediction model to predict the fault type for the detected abnormal behavior data, specifically: Using the random forest algorithm to construct the preliminary detection stage of the fault type, and constructing the precise detection stage of the fault type through the objective optimization function, and realizing the precise prediction of the fault type according to the comprehensive analysis of the detection results of the two stages; And, an intelligent early warning module, which conducts intelligent early warning based on the predicted fault type, specifically: Calculate the health index based on the predicted fault type, divide the warning level, trigger an alarm in combination with the real-time analysis result, locate the cause of the fault, trigger different emergency measures based on the located cause of the fault, and perform secondary calculation on the health index after taking the emergency measures, and realize the feedback adjustment of the intelligent warning according to the calculation result.
[0005] As a preferred solution of the power consumption monitoring, analysis and warning system described in the present invention, wherein: the reference threshold for detecting abnormal behavior data is specifically as follows: The current data feature vector in the normal behavior features extracted from the historical power consumption data , the voltage data feature vector and the power data feature vector ; Construct the extracted normal behavior features into a normal behavior feature comprehensive vector , and the constructed comprehensive feature vector satisfies the formula ; Take the constructed normal behavior feature comprehensive vector as the input value of the power consumption sequence model, and pass it through the convolutional neural network part and the long short-term memory network part in turn, record the final output result , and take the current output result of the power consumption sequence model as the reference threshold for abnormal behavior detection.
[0006] As a preferred solution of the power consumption monitoring, analysis and warning system described in the present invention, wherein: the realization of abnormal behavior data detection is specifically as follows: Construct the corresponding abnormal behavior detection comprehensive feature vector for the collected power consumption data according to the normal behavior feature comprehensive vector ; Calculate the error between the output result of the power consumption sequence model under the abnormal behavior detection comprehensive feature vector and the basic threshold, then there is wherein, represents the reference threshold for abnormal behavior detection, represents the output result of the power consumption sequence model under the abnormal behavior comprehensive feature vector, represents the calculated error result, which is used to realize the detection of abnormal behavior data, specifically: Set the error correction , and the value satisfies the formula , If the calculated error result satisfies the formula , it means that the behavior feature corresponding to the current output result of the power consumption sequence model is a normal behavior feature, and the corresponding power consumption data is normal behavior data; If the calculated error result satisfies the formula When it indicates that the behavioral feature corresponding to the current output result of the electricity consumption sequence model is an abnormal behavioral feature, the corresponding electricity consumption data is abnormal behavioral data, and the data at this time is constructed into abnormal behavioral data for subsequent prediction of fault types.
[0007] As a preferred solution of the electricity consumption monitoring, analysis and early warning system described in the present invention, wherein: the specific process of constructing the preliminary detection stage of the fault type by using the random forest algorithm is as follows: Through the tree model in the random forest, calculate the importance degree of different features in the abnormal behavior data, then wherein, represents the index of the decision tree in the random forest, represents the set of decision trees in the random forest, represents the contribution of the feature in the decision tree ; represents the importance degree of the feature in the random forest; Use the voting mechanism of the random forest to achieve the preliminary detection of the fault type, then wherein, represents the preliminary detection result of the fault type, represents the th tree's prediction result for the input data feature ; represents the indicator function, which is used to count whether the prediction of each tree belongs to the category , when the prediction result of the th tree is the category , the output result of the indicator function is 1, otherwise it outputs 0, represents the total number of decision trees.
[0008] As a preferred solution of the electricity consumption monitoring, analysis and early warning system described in the present invention, wherein: the specific process of constructing the accurate detection stage of the fault type by using the target optimization function is as follows: Before formulating the optimization function, convert the importance degree of the feature in the random forest into the corresponding weight vector, then wherein, represents the importance degree of the feature in the random forest, represents the total number of input features, represents the weight vector converted from the feature , which is the importance weight; Based on the transformed weight vector, an optimization function is formulated to achieve accurate detection of the fault type. Then, wherein, represents the output result of the objective function, represents the index of the input feature, represents the total number of input features, represents the feature importance weight, represents the th feature corresponding true fault type, represents the th feature corresponding predicted fault type, represents the weight coefficient of the regularization term, which is used to control the influence degree of regularization on the overall objective function, represents the total number of fault categories, represents the fault category is weight coefficient.
[0009] As a preferred solution of the power consumption monitoring, analysis and early warning system described in the present invention, wherein: the accurate prediction of the fault type is specifically as follows: Before the accurate detection of the fault type, a benchmark detection threshold ; Based on the preliminary detection result, calculate the confidence of the preliminary detection classification. Then, wherein, represents the prediction result of the th tree for the input data feature , represents the indicator function, which is used to count whether the prediction of each tree belongs to the category . When the prediction result of the th tree is the category , the output result of the indicator function is 1, otherwise it outputs 0, represents the total number of decision trees, represents the calculated confidence of the preliminary detection classification, which is used to judge which result to adopt for the accurate detection of the final fault type. Specifically: If the calculated confidence of the preliminary detection classification satisfies the formula when compared with the benchmark detection threshold , it means that the accuracy of the preliminary detection result of the fault type meets the fault prediction requirements. At this time, the fault detection result of the abnormal data adopts the preliminary detection result of the fault type ; If the calculated confidence of the preliminary detection classification satisfies the formula when compared with the benchmark detection threshold , it indicates that the accuracy of the preliminary detection result of the fault type does not meet the fault prediction requirements. At this time, the accurate detection of the fault type is achieved by adjusting the weight coefficient of regularization, specifically as follows: Adjust the weight coefficient of regularization And the weight coefficient of the fault category , so that the output result of the objective function satisfies the formula , it means that the predicted result of the fault type is consistent with the actual result at this time. At this time, the fault detection result of the abnormal data adopts the predicted result of the fault type of the feature in the objective function .
[0010] As a preferred solution of the power consumption monitoring, analysis and early warning system described in the present invention, wherein: calculating the health index based on the predicted fault type is specifically as follows: Construct the predicted fault type into a corresponding fault data set , and satisfy the formula , where Represents the first fault type, represents the second fault type, represents the th fault type, Represents the upper limit of the type of fault types; Construct the health index based on the predicted fault type, then Among them, Represents the upper limit of the type of fault types, Represents the fault type Of the weight coefficient, Represents the feature For the feature Caused by the fault Of the influence function, Represents the calculated health index; Divide the early warning level based on the constructed health index, and divide the early warning level into Levels, each fault type corresponds to an early warning level, and moreover, the threshold range of each early warning level , and satisfy the formula , where Represents the th minimum threshold of the early warning level, Represents the th maximum threshold of the early warning level, Represents the serial number of the early warning level, and the value range satisfies the formula , and moreover, the maximum and minimum values between the two levels of the threshold satisfy the formula , for the serial number of the early warning level The value is consistent with the serial number of the fault type when calculating the health index.
[0011] As a preferred solution of the power consumption monitoring, analysis and early warning system described in the present invention, the feedback adjustment of the intelligent early warning is specifically as follows: When the health index satisfies the formula When the health index is calculated, it means that the current health index exceeds the The lower threshold of the warning level corresponds to the trigger level Level 1 alarm; For triggered alarms, based on the collected power consumption data and historical data, the cause of the fault can be located. in, Indicates the cause of the positioning fault. Indicates that under given electricity consumption data and historical data, The probability of a failure cause; According to the fault cause after positioning, take corresponding emergency measures, and perform a secondary calculation of the health index after taking emergency measures, then we have, in, Indicates the upper limit of the fault type. Indicates the fault type The weight coefficient is set by the implementer according to the actual application scenario. Representation characteristics For the characteristics Failure caused The influence function of Indicates the characteristics after taking emergency measures, Indicates the health index after emergency measures are taken, and is used to provide feedback on whether the emergency measures are effective. Specifically: When the health index after taking emergency measures satisfies the formula When it is displayed, it means that the emergency measures taken for the current fault cause are effective, and the corresponding emergency measures for this fault cause are recorded and saved. You can directly take the measures when you encounter the fault cause later. When the health index after taking emergency measures satisfies the formula When , it means that the emergency measures taken for the current fault cause are invalid, and emergency measures are taken again for adjustment until the adjusted health index meets the formula until.
[0012] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the system according to any one of claims 1 to 8 when executing the computer program.
[0013] A computer-readable storage medium storing a computer program, which when executed by a processor implements the system according to any one of claims 1 to 8.
[0014] Advantages of the present invention: The present invention realizes the efficient integration and dynamic invocation of power consumption data by using a unique user identifier and combining cloud database management; Based on historical power consumption data, a normal behavior feature model is constructed, combined with a power consumption sequence model, and abnormal behaviors are dynamically identified through multi-dimensional feature matching. The combination of a convolutional neural network and a long short-term memory network is used to capture the local fluctuation features and long-term trends of power consumption data, realizing the accurate detection of abnormal behaviors; At the same time, a two-stage fault prediction mechanism is introduced, and through dynamic feature weight adjustment and regularization optimization, the robustness and accuracy of fault prediction are improved; Based on the health index, a hierarchical early warning strategy is dynamically constructed. The calculation of the health index is strongly correlated with real-time data and has high adaptability. An integrated feedback adjustment mechanism is integrated to dynamically adjust the health index and early warning strategy according to the effect of emergency measures, realizing closed-loop optimization; And targeted emergency measures (such as load shunting, automatic line isolation, temperature control management, etc.) are designed for different fault reasons, and the response strategy is dynamically adjusted in combination with the health index. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings. Among them: Figure 1 It is a schematic diagram of the overall system step structure of a power consumption monitoring, analysis and early warning system of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0016] In order to make the above objects, features and advantages of the present invention more obvious and understandable, the specific embodiments of the present invention will be described in detail below with reference to the drawings of the specification. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0017] In the following description, numerous specific details are set forth to provide a thorough understanding of the present invention. However, the present invention may be practiced in other ways than those specifically described herein. Those skilled in the art can make similar extensions without departing from the spirit of the present invention. Therefore, the present invention is not limited by the specific embodiments disclosed below.
[0018] Secondly, the so-called "one embodiment" or "embodiment" herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation manner of the present invention. The appearances of "in one embodiment" in different places in this specification do not all refer to the same embodiment, nor are they separate or alternative embodiments that exclude each other from other embodiments.
[0019] The present invention is described in detail in conjunction with schematic diagrams. When detailing the embodiments of the present invention, for the sake of convenience of explanation, the cross-sectional views showing the device structure will be enlarged locally out of the general proportion, and the schematic diagrams are only examples and should not limit the scope of protection of the present invention herein. In addition, in actual production, three-dimensional spatial dimensions including length, width, and depth should be included.
[0020] Meanwhile, in the description of the present invention, it should be noted that the terms "first, second, or third" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance.
[0021] Unless otherwise clearly defined and limited in the present invention, the terms "mounted, connected, and coupled" shall be construed in a broad sense. For example, it may be a fixed connection, a detachable connection, or an integral connection; it may also be a mechanical connection, an electrical connection, or a direct connection, or may be indirectly connected through an intermediate medium, or may be the communication inside two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood in specific situations.
[0022] Example 1: Refer to Figure 1 , which is an embodiment of the present invention, and provides a power consumption monitoring, analysis, and early warning system, including an abnormal behavior detection module, a fault type prediction module, and an intelligent early warning module; Specifically, the abnormal behavior detection module is used to identify abnormal behavior data in the user's power consumption data; the fault type prediction module is used to predict the fault type based on the abnormal behavior data; the intelligent early warning module is used to perform intelligent early warning based on the predicted fault type.
[0023] Further, the abnormal behavior detection module collects the user power consumption data and historical power consumption data, constructs the collected data into corresponding data sets, extracts the normal power consumption behavior characteristics from the historical power consumption data, and simultaneously constructs a power consumption time series model based on the collected user power consumption data. Using the normal power consumption behavior characteristics as a control group, it inputs into the power consumption time series model. According to the output result of the control group, it identifies the data in the user power consumption data that deviates from the normal power consumption behavior, realizing the detection of potential faults.
[0024] Further, before performing abnormal behavior detection, sensors are used to collect the user power consumption data in the area, and serial numbers are assigned to the users in the area. According to the unique serial numbers of the users, the collected power consumption data is constructed into a data set. Then, where, represents the power consumption data set of users in the area, represents the power consumption data of the user with serial number 1 in the area, represents the serial number in the area is of the user's power consumption data, represents the total number of users in the area; The power consumption data set corresponding to the user is then, where, respectively represent the voltage data, current data, and power data at the collection time when the serial number is 1, represents the serial number in the area is of the user's voltage data, current data, and power data at the collection time when the serial number is 1, represents the serial number in the area is of the user at the collection time when the serial number is of the voltage data, current data, and power data, represents the upper limit of the serial number at the collection time; At the same time, according to the unique serial numbers of the users in the area, the historical power consumption data of the users is obtained from the cloud database according to the serial numbers, and the obtained historical power consumption data is constructed into a corresponding historical power consumption data set in the form of a power consumption data set For the constructed power consumption data set and historical power consumption data set, data preprocessing is performed on the data set by means of data deduplication and data cleaning to ensure data quality. For the accuracy of subsequent extraction of normal power consumption behavior characteristics and detection of fault abnormal behavior, data deduplication and data cleaning are well-known techniques that are easily associated by those skilled in the art and will not be elaborated in this embodiment. The specific preprocessing method can be selected by the implementer according to the actual application scenario.
[0025] Further, the extraction of normal power consumption behavior characteristics is to extract the mean, standard deviation, maximum value, minimum value, skewness, and variance of each data from the historical power consumption data set in the time interval where no power failure has been triggered in the past, and integrate the extracted characteristics to construct corresponding feature vectors. Then, The feature vector corresponding to the current data, The feature vector corresponding to the voltage data, The feature vector corresponding to the power data, Among them, respectively represent the means of the current data, voltage data, and power data, respectively represent the standard deviations of the current data, voltage data, and power data, respectively represent the maximum values of the current data, voltage data, and power data, respectively represent the minimum values of the current data, voltage data, and power data, respectively represent the skewnesses of the current data, voltage data, and power data, respectively represent the variances of the current data, voltage data, and power data, [[ID=3 ]]respectively represent the feature vectors of the current data, voltage data, and power data.
[0026] It should be noted that using the same feature extraction method, select the same length of time interval from the user's power consumption data, extract the same features respectively, and construct the corresponding Current data feature vector, Voltage data feature vector and Power data feature vector.
[0027] Furthermore, the power consumption sequence model includes a convolutional neural network part and a long short-term memory network part. The convolutional neural network part is used to extract local features and capture sudden changes or periodic fluctuations in the power consumption data. The long short-term memory network is used to capture long-term dependencies. By inputting the local features extracted by the convolutional neural network into the long short-term memory network and using the update of feature information, the capture of the long-term trend of the features is realized. The specific construction is as follows: [[ID= ]]Use the convolutional neural network to perform local feature extraction on the time series of the input data, capture its short-term time series features, and perform convolution operations through multiple convolutional kernels to extract local features on different time scales. Specifically: Select multiple convolution kernels of different sizes to extract local features of electricity consumption data. Then, Set the convolution sum size to and initialize the weight coefficients of the convolution kernel ; For the data under each implementation sequence window perform a convolution operation and use a convolution kernel with a size of and a weight coefficient of to perform the convolution operation. Then, where, represents the th convolution output, which is the feature extracted by the convolution kernel in the current time series, represents the th convolution kernel weight coefficient, represents the th data point in the input time series, represents the size of the convolution kernel, represents the bias term; For the feature map of the convolution output, capture the local change features of the electricity consumption data through average pooling operation. Dynamically adjust the size of the pooling window based on the amplitude of the electricity load fluctuation, and then accurately capture the change features of the electricity consumption data. Specifically: Average pooling operation, where, represents the average pooling result of the feature map of the th convolution output, represents the feature map of the convolution output, represents the size of the pooling window during the average pooling operation, which is dynamically regulated by the input user's electricity load fluctuation, and the specific value is set by the implementer according to the actual application scenario; Based on the output result after pooling, construct a feature sequence where, represents the local feature extracted at the th time step, represents the constructed feature sequence, which is used as the input data for the subsequent long short-term memory network. Specifically: Before the data in the feature sequence is input into the long short-term memory network, set the input dimension of each time step to the feature dimension extracted by the convolution layer , then it satisfies the formula where, represents the real number space, represents a A vector space of dimensions, where the value of each dimension is a real number; Eliminate the useless information of the input features through the forget gate to improve the accuracy of subsequent abnormal behavior detection. Specifically: Among them, Represents the local feature extracted at the time step, which is the feature input at the current moment. Represents the weight matrix of the forget gate. Represents the bias term of the forget gate. Represents the output result of the previous moment. Represents the output of the forget gate, which is the result after information elimination of the input features. Use the input gate with a two-layer structure to achieve precise control of the information of the input features. Specifically: The activation value of the input gate, then there is Control of the candidate memory unit, then there is Among them, Represents the activation value of the input gate, which is the input ratio at the current time step and the range satisfies the formula , Represents the weight matrix of the input gate. Represents the bias term of the input gate. Represents the output result of the previous moment. Represents the weight matrix of the memory unit. Represents the bias term of the memory unit. Represents the potential memory unit, which is the comprehensive representation of the current time step input and the past hidden state. According to the outputs of the forget gate and the input gate, update the feature information, then there is Among them, Represents the output of the forget gate. Represents the potential memory unit. Represents the activation value of the input gate. Represents the feature information at the current moment. Represents the feature information at the past moment. Use the output ratio to control the feature state for calculating the output of the current time step, then there is Among them, Represents the output ratio and satisfies the formula , Denote the weight matrix of the output gate, Denote the bias term of the output gate, Denote the output result of the previous moment; According to the ratio of the output gate and the update of the feature information, the output of the hidden state at the current time step is realized. Then, Among them, Denote the output ratio, Denote the feature information at the current moment, Denote the output result of the feature information at the current time step, which is the output result of the long short-term memory network.
[0028] Furthermore, the abnormal behavior detection is to use the extracted normal behavior features as the control group, construct an electricity consumption sequence model with the input values, use the output result of the electricity consumption sequence model under the normal behavior features as the benchmark threshold for abnormal behavior detection. By using the collected electricity consumption data as the input values of the electricity consumption sequence model and recording the output result of the electricity consumption sequence model under the input values, compare the output result with the benchmark threshold, and according to the comparison result, realize the detection of abnormal behavior in the electricity consumption data. The specific implementation is as follows: For the current data feature vector in the normal behavior features extracted from the historical electricity consumption data 、voltage data feature vector and power data feature vector ; Construct the extracted normal behavior features into a normal behavior feature comprehensive vector , and the constructed comprehensive feature vector satisfies the formula ; Use the constructed normal behavior feature comprehensive vector , as the input value of the electricity consumption sequence model, and pass through the convolutional neural network part and the long short-term memory network part in turn, record the final output result , and use the current output result of the electricity consumption sequence model as the benchmark threshold for abnormal behavior detection; Construct the corresponding abnormal behavior detection comprehensive feature vector from the collected electricity consumption data according to the same format as the normal behavior feature comprehensive vector ; And input the constructed abnormal behavior detection comprehensive feature vector into the electricity consumption sequence model, and also pass through the convolutional neural network part and the long short-term memory network part in turn, and record the final output result , compare the output result with the base threshold, and realize the detection of abnormal behavior data according to the comparison result. Specifically: Calculate the error between the output result of the power consumption sequence model under the comprehensive feature vector of abnormal behavior detection and the basic threshold. Then, where, represents the benchmark threshold for abnormal behavior detection, represents the output result of the power consumption sequence model under the comprehensive feature vector of abnormal behavior, represents the calculated error result, which is used to detect abnormal behavior data. Specifically: Set the error correction , and its value satisfies the formula . The specific value is set by the implementer according to the actual application scenario. If the calculated error result satisfies the formula , it indicates that the behavior feature corresponding to the current output result of the power consumption sequence model is a normal behavior feature, and the corresponding power consumption data is normal behavior data; If the calculated error result satisfies the formula , it means that the behavior feature corresponding to the current output result of the power consumption sequence model is an abnormal behavior feature, and the corresponding power consumption data is abnormal behavior data. And the data at this time is constructed as abnormal behavior data for subsequent fault type prediction.
[0029] Furthermore, the fault type prediction module predicts the fault type of the abnormal behavior data by constructing a fault type prediction model based on the abnormal behavior data detected by the abnormal behavior detection module. The specific implementation is as follows: For the abnormal behavior data detected by the abnormal behavior detection module , take the abnormal behavior data as the input of the fault type prediction model, and achieve accurate prediction of the fault type according to the output result of the fault type prediction model. Then, The fault prediction model includes a preliminary detection stage and an accurate prediction stage. The preliminary detection stage uses the voting mechanism of random forest to conduct preliminary detection of the fault type, and the accurate prediction stage conducts in-depth optimization analysis on the preliminary detection result to achieve accurate detection of the fault type. The specific detection is as follows: Through the tree model in the random forest, calculate the importance of different features in the abnormal behavior data. Then, where, represents the index of the decision tree in the random forest, represents the set of decision trees in the random forest, represents the contribution of the feature in the decision tree , The preliminary detection of fault types is achieved by using the voting mechanism of the random forest. Then, wherein, represents the preliminary detection result of the fault type, represents the th tree's prediction result for the input data feature , represents the indicator function, which is used to count whether the prediction of each tree belongs to the category . When the prediction result of the th tree is the category , the output result of the indicator function is 1; otherwise, the output is 0. represents the total number of decision trees; According to the preliminary detection result of the fault type, in-depth optimization analysis is carried out by formulating an optimization function to achieve the accurate detection of the fault type. Specifically: Before formulating the optimization function, the importance of the feature in the random forest is converted into the corresponding weight vector. Then, wherein, represents the importance of the feature in the random forest, represents the total number of input features, represents the weight vector converted from the feature , which is the importance weight; Based on the converted weight vector, an optimization function is formulated to achieve the accurate detection of the fault type. Then, wherein, represents the output result of the objective function, represents the index of the input feature, represents the total number of input features, represents the importance weight of the feature , represents the th corresponding true fault type of the feature, represents the th corresponding predicted fault type of the feature, represents the weight coefficient of the regularization term, which is used to control the influence degree of the regularization on the overall objective function, represents the total number of fault categories, represents the weight coefficient when the fault category is . The specific value is set by the implementer according to the actual application scenario.
[0030] It should be noted that the precise detection of the fault type is comprehensively detected based on the preliminary detection result of the fault type and the optimization result of the objective function. The specific detection is as follows: Before performing the precise detection of the fault type, a benchmark detection threshold is set ; Based on the preliminary detection result, calculate the confidence level of the preliminary detection classification. Then, where, represents the prediction result of the th tree for the input data feature , represents an indicator function used to count whether the prediction of each tree belongs to the category . When the prediction result of the th tree is the category , the output result of the indicator function is 1; otherwise, the output result is 0. represents the total number of decision trees, represents the calculated confidence level of the preliminary detection classification, which is used to determine which result to adopt for the final precise detection of the fault type. Specifically: If the calculated confidence level of the preliminary detection classification satisfies the formula when compared with the benchmark detection threshold, it indicates that the accuracy of the preliminary detection result of the fault type meets the fault prediction requirements. At this time, the fault detection result for abnormal data adopts the preliminary detection result of the fault type ; If the calculated confidence level of the preliminary detection classification satisfies the formula when compared with the benchmark detection threshold, it indicates that the accuracy of the preliminary detection result of the fault type does not meet the fault prediction requirements. At this time, the precise detection of the fault type is achieved by adjusting the regularization weight coefficient. Specifically: Adjust the regularization weight coefficient and the weight coefficient of the fault category so that the output result of the objective function satisfies the formula , indicating that the prediction result of the fault type is consistent with the actual result at this time. At this time, the fault detection result for abnormal data adopts the fault type prediction result of the features in the objective function .
[0031] It should be noted that according to the established fault prediction model, which includes a two-layer prediction mechanism, through the two-layer prediction mechanism, the prediction accuracy of the model for complex fault types is improved, and the prediction result can be adaptively selected, reducing computational redundancy. At the same time, the dynamic feature weight adjustment mechanism enhances the fault tolerance of the model for abnormal data.
[0032] Furthermore, the intelligent early warning module triggers an alarm and locates the cause of the fault by constructing a hierarchical early warning strategy in combination with the real-time analysis results. At the same time, based on the located cause of the fault, different emergency measures are triggered. The hierarchical early warning strategy constructs a health index and formulates hierarchical early warning measurements according to the constructed health index. The level of the health index is positively correlated with the level of the early warning. The adjustment results after the emergency measures are taken are evaluated, and the evaluation results are compared with the basic thresholds of each level of early warning. Feedback adjustment is performed according to the comparison results until the comparison results corresponding to each level of early warning meet the basic thresholds. The specific implementation is as follows: Construct a health index according to the predicted fault type, then Construct the predicted fault type into the corresponding fault data set and satisfy the formula where represents the first type of fault, represents the second type of fault, represents the th type of fault represents the upper limit of the types of fault types; Based on the predicted fault type, construct a health index, then where represents the upper limit of the types of fault types, represents the fault type 's weight coefficient, which is set by the implementer according to the actual application scenario, represents the feature For the fault caused by the feature 's influence function, in this embodiment, the sigmoid function is used for illustration. In actual applications, other functions can be adopted, which are set by the implementer according to the actual application scenario, represents the calculated health index; Based on the constructed health index, divide the early warning levels into levels. Each fault type corresponds to an early warning level. And the threshold range of each early warning level and satisfy the formula where represents the minimum threshold of the th early warning level, represents the maximum threshold of the th early warning level, represents the serial number of the early warning level, and the value range satisfies the formula And the maximum and minimum values between the two levels of thresholds satisfy the formula For the serial number of the early warning level The value is consistent with the serial number of the fault type when calculating the health index, and the corresponding warning level threshold is also regulated by the health index; According to the established warning level, real-time analysis of electricity consumption data is carried out and alarms are triggered. Perform alarm trigger analysis on the calculated health index, specifically: When the health index satisfies the formula When the health index is calculated, it means that the current health index exceeds the The lower threshold of the warning level corresponds to the trigger level Level 1 alarm; For triggered alarms, based on the collected power consumption data and historical data, the cause of the fault can be located. in, Indicates the cause of the located fault, including load power exceeding the rated capacity of the equipment, aging and damage of the cable insulation layer, abnormal equipment temperature, and abnormal voltage data in the power system. There are many causes of faults. This example is only used as a representative example. The actual cause depends on the actual implementation scenario. Indicates that under given electricity consumption data and historical data, The probability of a failure cause; According to the fault cause after positioning, take corresponding emergency measures, and perform a secondary calculation of the health index after taking emergency measures, then we have, in, Indicates the upper limit of the fault type. Indicates the fault type The weight coefficient is set by the implementer according to the actual application scenario. Representation characteristics For the characteristics Failure caused The influence function of Indicates the characteristics after taking emergency measures, Indicates the health index after emergency measures are taken, and is used to provide feedback on whether the emergency measures are effective. Specifically: When the health index after taking emergency measures satisfies the formula When it is displayed, it means that the emergency measures taken for the current fault cause are effective, and the corresponding emergency measures for this fault cause are recorded and saved. You can directly take the measures when you encounter the fault cause later. When the health index after taking emergency measures satisfies the formula When , it means that the emergency measures taken for the current fault cause are invalid, and emergency measures are taken again for adjustment until the adjusted health index meets the formula up to this point
[0033] Furthermore, if the above-mentioned functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the system described in various embodiments of the present invention. The aforementioned storage medium includes: USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs, and other various media that can store program codes.
[0034] The logic and / or steps represented in the flowchart or described in other ways herein, for example, can be considered as a definite sequence list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other systems that can fetch and execute instructions from the instruction execution system, apparatus, or device), or used in combination with these instruction execution systems, apparatus, or devices. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
[0035] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection part with one or more wirings (electronic device), a portable computer disk cartridge (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other media, then editing, interpreting, or processing it in other suitable ways as necessary, and then storing it in a computer memory.
[0036] In addition, to provide a concise description of the exemplary embodiments, all features of the actual embodiments may not be described (i.e., those features that are not relevant to the currently considered best mode of implementing the present invention, or those features that are not relevant to the implementation of the present invention).
[0037] It should be understood that, during the development of any actual implementation, such as in any engineering or design project, a large number of specific implementation decisions can be made. Such development efforts may be complex and time-consuming, but for those of ordinary skill in the art who benefit from this disclosure, without undue experimentation, such development efforts will be routine work in design, manufacturing, and production.
[0038] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention, and they should all be covered by the scope of the claims of the present invention.
Claims
1. An electricity consumption monitoring, analysis and early warning system, characterized in that: It includes the following steps. The abnormal behavior detection module is used to identify the abnormal behavior data in the user's electricity consumption data. Specifically: By collecting the user's electricity consumption data and historical electricity consumption data, and constructing the collected electricity consumption data into a corresponding data set, extracting the normal electricity consumption behavior characteristics from the historical electricity consumption data. At the same time, using a convolutional neural network and a long short-term memory network to construct an electricity consumption sequence model, taking the normal electricity consumption behavior characteristics as the input of the model, and the output result of the model as the benchmark threshold for detecting abnormal behavior data. Input the comprehensive feature vector of abnormal behavior detection based on electricity consumption data into the electricity consumption sequence model, and compare the output result with the benchmark threshold to achieve the detection of abnormal behavior data; The fault type prediction module uses a fault prediction model to predict the fault type for the detected abnormal behavior data. Specifically: Using the random forest algorithm to construct the preliminary detection stage of the fault type, and constructing the precise detection stage of the fault type through the objective optimization function. Based on the comprehensive analysis of the detection results of the two stages, achieve the precise prediction of the fault type; And, the intelligent warning module conducts intelligent warning based on the predicted fault type. Specifically: Calculate the health index based on the predicted fault type, divide the warning level, trigger an alarm in combination with the real-time analysis result, and locate the cause of the fault. Based on the located cause of the fault, trigger different emergency measures, and perform a secondary calculation of the health index after taking the emergency measures. According to the calculation result, achieve the feedback adjustment of the intelligent warning.
2. The power consumption monitoring, analysis and early warning system according to claim 1, characterized in that: The benchmark threshold for detecting the abnormal behavior data is specifically as follows: The current data feature vector in the normal behavior features extracted from historical power consumption data , the voltage data feature vector and the power data feature vector ; Construct the extracted normal behavior features into a comprehensive vector of normal behavior features , and the constructed comprehensive feature vector satisfies the formula ; The synthesized vector of normal behavior features constructed is used as the input value of the electricity consumption sequence model, and successively passes through the convolutional neural network part and the long short-term memory network part, and records the final output result The current output result of the electricity consumption sequence model is used as the benchmark threshold for abnormal behavior detection.
3. The power consumption monitoring, analysis and early warning system according to claim 2, characterized in that: The implementation of detecting the abnormal behavior data is specifically as follows: Construct the corresponding comprehensive feature vector for abnormal behavior detection according to the comprehensive vector of normal behavior characteristics from the collected power consumption data ; Calculate the error between the output result of the electricity consumption sequence model under the comprehensive feature vector of abnormal behavior detection and the basic threshold. Then, Among them, represents the benchmark threshold for abnormal behavior detection, represents the output result of the power consumption sequence model under the comprehensive feature vector of abnormal behavior, represents the calculated error result, which is used to detect abnormal behavior data. Specifically: Setting error correction , and the value satisfies the formula , If the calculated error result satisfies the formula it indicates that the behavioral feature corresponding to the current output result of the electricity consumption sequence model is a normal behavioral feature, and the corresponding electricity consumption data is normal behavioral data; If the calculated error result satisfies the formula it indicates that the behavior feature corresponding to the current output result of the electricity consumption sequence model is an abnormal behavior feature, and the corresponding electricity consumption data is abnormal behavior data, and the data at this time is constructed as abnormal behavior data for subsequent fault type prediction.
4. The power consumption monitoring, analysis and early warning system according to claim 3, characterized in that: The construction of the preliminary detection stage of the fault type using the random forest algorithm is specifically as follows: Through the tree model in the random forest, calculate the importance degree of different features in the abnormal behavior data. Then, Among them, represents the index of the decision tree in the random forest, represents the set of decision trees in the random forest, represents the contribution of the feature in the decision tree ; represents the importance of the feature in the random forest. Use the voting mechanism of the random forest to achieve the preliminary detection of the fault type. Then, Among them, represents the preliminary detection result of the fault type, represents the th tree's prediction result for the input data feature , represents an indicator function used to count whether the prediction of each tree belongs to the category . When the prediction result of the th tree is the category , the output result of the indicator function is 1, otherwise it outputs 0. represents the total number of decision trees.
5. The power consumption monitoring, analysis and early warning system according to claim 4, characterized in that: The construction of the precise detection stage of the fault type through the objective optimization function is specifically as follows: Before formulating the optimization function, convert the importance degree of the feature in the random forest into a corresponding weight vector. Then, Among them, represents the importance degree in the random forest, represents the total number of input features, represents the feature converted weight vector, which is the importance weight; Based on the converted weight vector, formulate the optimization function to achieve the precise detection of the fault type. Then, Among them, represents the output result of the objective function, represents the index of the input feature, represents the total number of input features, represents the feature importance weight, represents the true fault type corresponding to the th feature, represents the predicted fault type corresponding to the th feature, represents the weight coefficient of the regularization term, which is used to control the influence degree of regularization on the overall objective function, represents the total number of fault categories, represents that the fault category is weight coefficient.
6. The power consumption monitoring, analysis and early warning system according to claim 5, characterized in that: The precise prediction of the fault type is specifically as follows: Before performing precise detection of the fault type, set a reference detection threshold ; Calculate the confidence degree of the preliminary detection classification based on the preliminary detection result. Then, Among them, represents the prediction result of the th tree on the input data features . represents the indicator function, which is used to count whether the prediction of each tree belongs to the category . When the prediction result of the th tree is the category , the output result of the indicator function is 1, otherwise the output is 0. represents the total number of decision trees. represents the confidence level of the preliminary detection classification calculation, which is used to judge which result to adopt for the precise detection of the final fault type. Specifically: If the confidence level of the preliminary detection classification calculated meets the formula when compared with the benchmark detection threshold , it indicates that the accuracy of the preliminary detection result of the fault type meets the fault prediction requirements. At this time, the fault detection result of the abnormal data adopts the preliminary detection result of the fault type ; If the confidence level of the preliminary detection classification calculated is compared with the benchmark detection threshold and satisfies the formula , it means that the accuracy of the preliminary detection result of the fault type does not meet the fault prediction requirements. At this time, the accurate detection of the fault type is achieved by adjusting the regularization weight coefficient, specifically as follows: Adjust the weight coefficient of regularization and the weight coefficient of the fault category , so that the output result of the objective function satisfies the formula , indicating that the prediction result of the fault type is consistent with the actual result at this time. At this time, the fault detection result of the abnormal data adopts the prediction result of the fault type of the feature in the objective function .
7. The power consumption monitoring, analysis and early warning system according to claim 6, characterized in that: The calculation of the health index based on the predicted fault type is specifically as follows: Construct the predicted fault type into a corresponding fault data set , and satisfy the formula , where represents the first type of fault, represents the second type of fault, represents the th type of fault, represents the upper limit of the types of fault types; Construct the health index based on the predicted fault type. Then, Among them, represents the upper limit of the type of fault types, represents the fault type weight coefficient, represents the feature For the fault caused by the feature influence function, represents the calculated health index; Divide the warning levels based on the constructed health index. The warning levels are divided into levels. Each fault type corresponds to one warning level. Moreover, the threshold range of each warning level is , and satisfies the formula , where represents the minimum threshold of the th warning level, represents the maximum threshold of the th warning level, represents the serial number of the warning level, and its value range satisfies the formula . Also, the maximum and minimum values between two levels of thresholds satisfy the formula . For the serial number values of the warning level, they are consistent with the serial numbers of the fault types during the calculation of the health index.
8. The power consumption monitoring, analysis and early warning system according to claim 7, characterized in that, The feedback adjustment of the intelligent warning is specifically as follows: When the health index satisfies the formula , it means that the currently calculated health index exceeds the lower threshold corresponding to the warning of level , triggering an alarm of level ; For the triggered alarm, based on the collected electricity consumption data and historical data, achieve the location of the cause of the fault. Then, Among them, indicates the cause of the positioning failure, indicates the probability of the th cause of failure under the given power consumption data and historical data; According to the located cause of the fault, take corresponding emergency measures, and perform a secondary calculation of the health index after taking the emergency measures. Then, Among them, represents the upper limit of the types of fault types, represents the fault type of the weight coefficient, which is set by the implementer according to the actual application scenario, represents the feature For the feature caused by the fault of the influence function, represents the feature after taking emergency measures, represents the health index after taking emergency measures, which is used to feedback and adjust whether the emergency measures are effective. Specifically: When the health index after taking emergency measures satisfies the formula it indicates that the emergency measures taken for the current cause of the failure are effective, and the corresponding emergency measures for this cause of the failure are recorded and saved for direct adoption in case of the cause of the failure in the future; When the health index after taking emergency measures satisfies the formula it indicates that the emergency measures taken for the current fault cause are ineffective, and the emergency measures are taken again for adjustment until the adjusted health index satisfies the formula up to that point.
9. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the system described in any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the system described in any one of claims 1 to 8.