Neural network-based electricity utilization safety assessment method, system and equipment and medium
Through the neural network-based power safety evaluation method, combined with real-time power sensor network and LSTM-LAN sub-feature extraction model, the data integration and environmental adaptability problems of traditional power equipment hazard diagnosis are solved, and higher detection accuracy and system stability are achieved.
Patent Information
- Application Number
- CN202510094357.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-21
- Publication Date
- 2025-05-30
AI Technical Summary
Traditional power equipment hidden danger diagnosis relies on a single data source analysis, making it difficult to fully capture equipment abnormalities in complex environments, and the existing technology cannot adapt to changing power environment conditions, and lacks the ability to effectively integrate data from multiple types of sensors, resulting in limited diagnostic accuracy and insufficient system sensitivity and reliability.
The power consumption safety evaluation method based on neural network is adopted, and the initial sub-power data is collected through the real-time power sensor network, and the LSTM-LAN sub-feature extraction model is constructed after pre-processing. The target sub-power data is identified abnormally. The total power abnormal score is summarized and the power safety evaluation results are generated based on the integrated learning strategy.
Effectively integrate multiple categories of data, significantly improve the comprehensiveness and accuracy of potential hazard detection of power equipment, improve the robustness and stability of the system, reduce false alarm rates and missed detection rates, and increase maintenance cost-effectiveness ratio.
Smart Images

Figure CN120069525A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of smart grid monitoring and hidden danger diagnosis of power equipment, and particularly to a power consumption safety assessment method, system, device and medium based on a neural network. Background Art
[0002] With the rapid development of smart grid technology, the safety performance of power equipment has become a key factor in ensuring power supply stability.
[0003] However, traditional hidden danger diagnosis of power equipment mainly relies on single data source analysis, such as current and voltage records, and it is difficult to comprehensively capture equipment anomalies in complex environments, which may lead to limited diagnostic accuracy. Existing technologies usually adopt fixed threshold alarm strategies or rule-based expert systems for hidden danger diagnosis, but such methods often cannot adapt to changing power environment conditions and lack the ability to effectively integrate various types of sensor data, and cannot fully consider environmental change factors and equipment surface conditions, restricting the sensitivity and reliability of the diagnostic system and unable to comprehensively and accurately evaluate the operating state of power equipment.
[0004] Therefore, it is necessary to provide a power consumption safety assessment method, system, device and medium based on a neural network to solve the above technical problems. Summary of the Invention
[0005] To solve the above technical problems, the present invention provides a power consumption safety assessment method, system, device and medium based on a neural network, which is used to solve the problems that traditional hidden danger diagnosis of power equipment mainly relies on single data source analysis, it is difficult to comprehensively capture equipment anomalies in complex environments, and the diagnostic accuracy is limited. Existing technologies usually adopt fixed threshold alarm strategies or rule-based expert systems for hidden danger diagnosis, often unable to adapt to changing power environment conditions, and lack the ability to effectively integrate various types of sensor data, unable to fully consider environmental change factors and equipment surface conditions, restricting the sensitivity and reliability of the diagnostic system and unable to comprehensively and accurately evaluate the operating state of power equipment.
[0006] A power consumption safety assessment method based on a neural network provided by the present invention, the assessment method includes: Collect initial sub-power data of a target power equipment through a real-time power sensor network; Perform preprocessing operations on the initial sub-power data to generate corresponding target sub-power data; Construct an LSTM-LAN sub-feature extraction model to perform anomaly recognition on the target sub-power data to obtain corresponding sub-power anomaly scores; Adopt an ensemble learning strategy to aggregate the sub-power anomaly scores to generate corresponding total power anomaly scores; Obtain the abnormal score threshold of the target power equipment, compare the total power abnormality score with the abnormal score threshold, and generate the corresponding power safety assessment result.
[0007] Preferably, the acquisition of the initial sub-power data of the target power equipment through the real-time power sensor network specifically includes: The real-time power sensor network includes a first power sensor, a second power sensor, and a third power sensor; the initial sub-power data includes initial power fluctuation data, initial environmental change data, and initial device visual data; Obtain the current and voltage fluctuation conditions of the target power equipment through the first power sensor, and generate the initial power fluctuation data; Obtain the temperature and humidity change conditions of the target power equipment through the second power sensor, and generate the initial environmental change data; Obtain the surface image information of the target power equipment through the third power sensor, and generate the initial device visual data.
[0008] Preferably, the preprocessing operation on the initial sub-power data to generate the corresponding target sub-power data specifically includes: Identify and remove the error data in the initial sub-power data, and fill in the missing data in the initial sub-power data to generate the corresponding intermediate sub-power data; Perform standardization processing on the intermediate sub-power data to generate the target sub-power data.
[0009] Preferably, the construction of the LSTM-LAN sub-feature extraction model to perform abnormal identification on the target sub-power data to obtain the corresponding sub-power abnormality score specifically includes: The LSTM-LAN sub-feature extraction model includes an LSTM-LAN first sub-feature extraction model, an LSTM-LAN second sub-feature extraction model, and an LSTM-LAN third sub-feature extraction model; the target sub-power data includes target power fluctuation data, target environmental change data, and target device visual data; the sub-power abnormality score includes a sub-power fluctuation abnormality score, a sub-environmental change abnormality score, and a sub-device visual abnormality score; Based on the LSTM-LAN first sub-feature extraction model, perform feature extraction on the target power fluctuation data to obtain target power fluctuation features, perform feature grading on the target power fluctuation features to obtain multi-level hierarchical power fluctuation features, determine the hierarchical power fluctuation scores according to the attention weights corresponding to the hierarchical power fluctuation features, and sum all the hierarchical power fluctuation scores to obtain the sub-power fluctuation abnormality score: Based on the LSTM-LAN second sub-feature extraction model, feature extraction is performed on the target environmental change data to obtain target environmental change features, and the target environmental change features are hierarchically classified to obtain hierarchical environmental change features at multiple levels. According to the attention weights corresponding to the hierarchical environmental change features, hierarchical environmental change scores are determined, and the sub-environmental change anomaly scores are obtained by summing all the hierarchical environmental change scores: Based on the LSTM-LAN third sub-feature extraction model, feature extraction is performed on the target device visual data to obtain target device visual features, and the target device visual features are hierarchically classified to obtain hierarchical device visual features at multiple levels. According to the attention weights corresponding to the hierarchical device visual features, hierarchical device visual scores are determined, and the sub-device visual anomaly scores are obtained by summing all the hierarchical device visual scores.
[0010] Preferably, the target power fluctuation data is input into the forget gate of the LSTM-LAN first sub-feature extraction model, and the data to be retained in the target power fluctuation data is determined based on the forget gate. The corresponding calculation formula is as follows: In the formula, represents the output of the forget gate at the current time t; represents the weight matrix of the forget gate at the current time t; represents the hidden state at the previous time t-1; represents the target power fluctuation data input at the current time t; represents the hidden state and the target power fluctuation data constitute a vector; represents the bias term of the forget gate; represents the activation function; Based on the input gate, the data to be added to the candidate cell state in the target power fluctuation data is determined. The corresponding calculation formula is as follows: In the formula, represents the output of the input gate at the current time t; represents the candidate cell state at the current time t; and respectively represent the weight matrices of the input gate and the candidate cell state; represents the hidden state at the previous time t-1; represents the target power fluctuation data input at the current time t; represents the hidden state and the target power fluctuation data constitute a vector; and Bias terms representing the input gate and the candidate cell state respectively; Represents the activation function; Represents the hyperbolic tangent function; Update the cell state according to the output of the forget gate, the output of the input gate, and the candidate cell state. The corresponding calculation formula is as follows: In the formula, Represents the cell state at the current time t; Represents the output of the forget gate at the current time t; Represents the cell state at the previous time t-1; Represents the output of the input gate at the current time t; Represents the candidate cell state at the current time t; According to the cell state, determine the data to be output in the hidden state through the output gate. The corresponding calculation formula is as follows: In the formula, Represents the output of the output gate at the current time t; Represents the activation function; Represents the weight matrix of the output gate; Represents the hidden state at the previous time t-1; Represents the target power fluctuation data input at the current time t; Represents the hidden state And the target power fluctuation data Composed vector; Represents the bias term of the output gate; Represents the hidden state of the target power fluctuation feature at the current time t; Represents the hyperbolic tangent function; Represents the cell state at the current time t.
[0011] Preferably, after obtaining the hierarchical power fluctuation features of multiple levels, determine the hidden state and the output of the output gate corresponding to each of the hierarchical power fluctuation features; Set the total number of levels of the target power fluctuation feature to L. The calculation formula for the attention weight corresponding to the j-th hierarchical power fluctuation feature of the f-th level at the current time t is as follows: In the formula, Represents the attention score corresponding to the j-th hierarchical power fluctuation feature of the f-th level at the current time t; Represents the attention score function; Represents the hidden state of the j-th hierarchical power fluctuation feature of the f-th level at the current time t; Represents the output of the output gate of the j-th hierarchical power fluctuation feature of the f-th level at the current time t; The attention weight representing the j-th hierarchical power fluctuation feature of the f-th level at the current moment t; Denotes the exponential function with the natural constant e as the base; N represents the number of hierarchical device visual features of the f-th level; Determine the hierarchical power fluctuation score according to the attention weight of the hierarchical power fluctuation feature, and sum all the hierarchical power fluctuation scores to obtain the sub-power fluctuation anomaly score. The corresponding calculation formula is as follows: In the formula, Represents the sub-power fluctuation anomaly score at the current moment t; L represents the total number of levels of the target power fluctuation feature; N represents the number of hierarchical device visual features of the f-th level; The attention weight representing the j-th hierarchical power fluctuation feature of the f-th level at the current moment t; Represents the output of the output gate of the j-th hierarchical power fluctuation feature of the f-th level at the current moment t; Represents the hidden state of the j-th hierarchical power fluctuation feature of the f-th level at the current moment t; Represents the hidden output combination function; The calculation processes of the sub-environment change anomaly score and the sub-device vision anomaly score are the same as above.
[0012] Preferably, based on the ensemble learning strategy, the sub-power fluctuation anomaly score, the sub-environment change anomaly score, and the sub-device vision anomaly score are weighted and averaged to obtain the total power anomaly score. The corresponding calculation formula is as follows: In the formula, Represents the total power anomaly score; Represents the weight coefficient corresponding to the sub-power fluctuation anomaly score; Represents the sub-power fluctuation anomaly score; Represents the weight coefficient corresponding to the sub-environment change anomaly score; Represents the sub-environment change anomaly score; Represents the weight coefficient corresponding to the sub-device vision anomaly score; Represents the sub-device vision anomaly score; Obtain the anomaly score threshold of the target power device , compare the total power anomaly score with the anomaly score threshold to obtain the power safety assessment result. The expression of the power safety assessment result is as follows: In the formula, Represents the power safety assessment result; Represents the total power anomaly score; Represents the abnormal score threshold.
[0013] A neural network-based power consumption safety assessment system, the assessment system comprising: A data acquisition module for collecting initial sub-power data of a target power device through a real-time power sensor network; A data preprocessing module for preprocessing the initial sub-power data to generate corresponding target sub-power data; An anomaly recognition module for constructing an LSTM-LAN sub-feature extraction model to perform anomaly recognition on the target sub-power data to obtain corresponding sub-power anomaly scores; A score aggregation module for aggregating the sub-power anomaly scores by using an ensemble learning strategy to generate corresponding total power anomaly scores; A result determination module for obtaining the abnormal score threshold of the target power device, comparing the total power abnormal score with the abnormal score threshold, and generating a corresponding power safety assessment result.
[0014] An electronic device comprising a memory and a processor, wherein a computer program is stored in the memory, and when the processor runs the computer program stored in the memory, the processor executes the steps of the neural network-based power consumption safety assessment method described in any one of the above.
[0015] A readable storage medium storing a computer program, the computer program being used to implement the steps of the neural network-based power consumption safety assessment method described in any one of the above when executed by a processor.
[0016] Compared with the related art, a neural network-based power consumption safety assessment method, system, device and medium provided by the present invention have the following beneficial effects: The present invention can collect initial sub-power data of a target power device through a real-time power sensor network; preprocess the initial sub-power data to generate corresponding target sub-power data; construct an LSTM-LAN sub-feature extraction model to perform anomaly recognition on the target sub-power data to obtain corresponding sub-power anomaly scores; aggregate the sub-power anomaly scores by using an ensemble learning strategy to generate corresponding total power anomaly scores; obtain the abnormal score threshold of the target power device, compare the total power abnormal score with the abnormal score threshold, and generate a corresponding power safety assessment result, thereby effectively integrating multi-category data and significantly improving the comprehensiveness and accuracy of power device hidden danger detection.
[0017] The present invention can effectively integrate the power fluctuation data, environmental change data, and device visual data of power equipment, comprehensively monitor the operating conditions of power equipment, and thus can significantly expand the coverage of hidden danger detection. The present invention can adopt a mechanism combining a recurrent neural network and a hierarchical attention network, greatly improving the model's processing ability for long-sequence data and the capture efficiency of subtle features, and enhancing the accuracy and response speed of hidden danger identification for power equipment. Moreover, the present invention can adopt an ensemble learning strategy, with multiple sub-models working together to avoid the overfitting problem that a single model may face, ensuring the flexibility and adaptability of the system in the face of diverse data and uncertain situations, greatly reducing the false alarm rate and missed detection rate of hidden danger diagnosis, enhancing the robustness and stability of the system, and increasing the maintenance cost-benefit ratio. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 is a flowchart of a neural network-based electricity safety assessment method provided by an embodiment of the present invention; Figure 2 is a system block diagram of a neural network-based electricity safety assessment system provided by an embodiment of the present invention; Figure 3 is a schematic hardware structure diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0019] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0020] As Figure 1 shown, it is a flowchart of a neural network-based electricity safety assessment method provided by an embodiment of the present invention, Figure 1The execution entity of the method shown can be a software and / or hardware device. The execution entity of this application can include, but is not limited to, at least one of the following: user equipment, network equipment, etc. Among them, the user equipment can include, but is not limited to, computers, smart phones, personal digital assistants (Personal Digital Assistant, abbreviated as: PDA), and the electronic devices mentioned above, etc. The network equipment can include, but is not limited to, a single network server, a server group composed of multiple network servers, or a cloud composed of a large number of computers or network servers based on cloud computing. Among them, cloud computing is a type of distributed computing, which is composed of a group of loosely coupled computers to form a super virtual computer. This embodiment does not limit this. It includes steps S1 to S5, specifically as follows: S1, collect the initial sub-power data of the target power equipment through a real-time power sensor network; Among them, the real-time power sensor network refers to a network composed of multiple sensors used to collect the power fluctuation data of power equipment, the changes in the surrounding environment, and the surface image information of the equipment; the initial sub-power data refers to the real-time power fluctuation data of the power equipment, the surrounding environment change data, and the surface state data of the equipment that have not been processed.
[0021] S2, perform a preprocessing operation on the initial sub-power data to generate corresponding target sub-power data; It should be noted that the target sub-power data refers to the preprocessed real-time power fluctuation data of the power equipment, the surrounding environment change data, and the surface state data.
[0022] It can be understood that first, a pre-deployed real-time power sensor network can be used to accurately collect the initial sub-power data of the power equipment. In order to ensure the accuracy and reliability of the data, a preprocessing operation can be performed on it to generate target sub-power data with a more regular structure and higher quality.
[0023] S3, construct an LSTM-LAN sub-feature extraction model, perform anomaly recognition on the target sub-power data, and obtain corresponding sub-power anomaly scores; Among them, the sub-power anomaly score refers to the anomaly score corresponding to the current working state of the power equipment. In order to effectively identify the anomaly patterns in the target sub-power data, a composite feature extraction model based on long short-term memory network (LSTM) and local adaptive neural network (LAN), that is, an LSTM-LAN sub-feature extraction model, can be constructed.
[0024] It should be noted that LSTM can capture the long-term dependencies in time series data, while LAN enhances the sensitivity of the model to local features. The combination of the two can significantly improve the accuracy of model anomaly detection.
[0025] Further, by using the LSTM-LAN sub-feature extraction model to perform anomaly recognition on the target sub-power data, the power anomaly scores of each target sub-power data can be calculated, and these scores can reflect the degree to which the data deviates from the normal range.
[0026] S4. Adopt an ensemble learning strategy to aggregate the sub-power anomaly scores to generate corresponding total power anomaly scores; In practical applications, in order to comprehensively evaluate the abnormal state of power equipment, an ensemble learning strategy can be adopted to aggregate multiple sub-power anomaly scores through a voting mechanism to generate comprehensive total power anomaly scores.
[0027] Through the above method, the complementary advantages of different sub-feature extraction models can be fully utilized to improve the robustness and accuracy of power equipment anomaly detection.
[0028] S5. Obtain the anomaly score threshold of the target power equipment, compare the total power anomaly score with the anomaly score threshold, and generate corresponding power safety assessment results.
[0029] Among them, the anomaly score threshold refers to the critical value of the abnormal state score of the power equipment preset in advance. This threshold is set based on historical data and expert experience and is used to distinguish the normal operation state of the power equipment from potential safety risks.
[0030] After obtaining the anomaly score threshold of the power equipment, the calculated total power anomaly score can be compared with the preset anomaly score threshold to automatically and real-time generate power safety assessment results. These results can provide immediate safety warnings for maintenance personnel and contribute to the formulation of adaptive scheduling and fault prevention strategies for smart grids.
[0031] In the specific implementation process, the acquisition of the initial sub-power data of the target power equipment through the real-time power sensor network specifically includes: The real-time power sensor network includes a first power sensor, a second power sensor, and a third power sensor; the initial sub-power data includes initial power fluctuation data, initial environmental change data, and initial device visual data; Obtain the current and voltage fluctuation conditions of the target power equipment through the first power sensor to generate the initial power fluctuation data; Obtain the temperature and humidity change conditions of the target power equipment through the second power sensor to generate the initial environmental change data; Obtain the surface image information of the target power equipment through the third power sensor to generate the initial device visual data.
[0032] Among them, the real-time power sensor network consists of three core components: the first power sensor, the second power sensor, and the third power sensor, jointly ensuring the comprehensiveness and accuracy of data collection.
[0033] Specifically, the first power sensor is used to monitor the electrical parameters of power equipment. It can capture the current and voltage fluctuations of power equipment in real time and generate initial power fluctuation data.
[0034] It should be noted that the fluctuations of current and voltage are direct indicators reflecting the operating state, load changes, and potential electrical faults of power equipment.
[0035] Secondly, the second power sensor can continuously monitor the temperature and humidity environment where the power equipment is located. And the changes in temperature and humidity have important impacts on the thermal management, insulation performance, and overall lifespan of power equipment. By accurately measuring and recording these environmental changes, initial environmental change data can be generated, which can further help identify potential interferences of environmental factors on equipment performance.
[0036] Finally, the third power sensor uses vision sensing technology to obtain the surface image information of power equipment in real time and generate initial equipment vision data. This step not only includes a simple visual inspection of power equipment but also includes the automatic identification and analysis of visual features such as surface defects, dirt accumulation, and physical damage of power equipment, so as to timely detect the appearance abnormalities of power equipment and prevent equipment failures caused by visual obstacles.
[0037] Through the real-time power sensor network, initial sub-power data can be comprehensively collected, including multi-dimensional information such as current and voltage fluctuations, environmental change situations, and equipment visual states, thus ensuring the accuracy and comprehensiveness of data collection.
[0038] The preprocessing operation on the initial sub-power data to generate corresponding target sub-power data specifically includes: Identifying and removing the incorrect data in the initial sub-power data and filling in the missing data in the initial sub-power data to generate corresponding intermediate sub-power data; Performing standardization processing on the intermediate sub-power data to generate the target sub-power data.
[0039] It can be understood that first, the initial sub-power data can be cleaned, identifying and removing the incorrect data existing in the initial sub-power data set. These incorrect data may result from sensor failures, data transmission errors, or recording mistakes, etc., which may have misleading effects on subsequent analysis. At the same time, for the missing data in the initial sub-power data, interpolation methods can be used for filling, so as to ensure the integrity of the data and generate corresponding intermediate sub-power data.
[0040] Then, the intermediate sub-power data can be standardized to eliminate the adverse effects of different dimensions and distributions on data analysis. After standardization, the intermediate sub-power data can be converted into target sub-power data with a unified scale and comparability.
[0041] Constructing the LSTM-LAN sub-feature extraction model to perform anomaly recognition on the target sub-power data to obtain corresponding sub-power anomaly scores specifically includes: The LSTM-LAN sub-feature extraction model includes an LSTM-LAN first sub-feature extraction model, an LSTM-LAN second sub-feature extraction model, and an LSTM-LAN third sub-feature extraction model; the target sub-power data includes target power fluctuation data, target environmental change data, and target device visual data; the sub-power anomaly scores include sub-power fluctuation anomaly scores, sub-environmental change anomaly scores, and sub-device visual anomaly scores; Based on the LSTM-LAN first sub-feature extraction model, feature extraction is performed on the target power fluctuation data to obtain target power fluctuation features, and feature grading is performed on the target power fluctuation features to obtain hierarchical power fluctuation features at multiple levels. According to the attention weights corresponding to the hierarchical power fluctuation features, hierarchical power fluctuation scores are determined, and the sub-power fluctuation anomaly scores are obtained by summing all the hierarchical power fluctuation scores: Based on the LSTM-LAN second sub-feature extraction model, feature extraction is performed on the target environmental change data to obtain target environmental change features, and feature grading is performed on the target environmental change features to obtain hierarchical environmental change features at multiple levels. According to the attention weights corresponding to the hierarchical environmental change features, hierarchical environmental change scores are determined, and the sub-environmental change anomaly scores are obtained by summing all the hierarchical environmental change scores: Based on the LSTM-LAN third sub-feature extraction model, feature extraction is performed on the target device visual data to obtain target device visual features, and feature grading is performed on the target device visual features to obtain hierarchical device visual features at multiple levels. According to the attention weights corresponding to the hierarchical device visual features, hierarchical device visual scores are determined, and the sub-device visual anomaly scores are obtained by summing all the hierarchical device visual scores.
[0042] It should be noted that the target sub-power data specifically includes target power fluctuation data, target environmental change data, and target device visual data. These data can comprehensively reflect the operating status of power equipment, external environmental conditions, and changes in the appearance or operating status of the equipment.
[0043] Specifically, first, the long short-term memory network (LSTM) can be used to extract time series features from the input data and capture its inherent dynamic change patterns. Then, the local adaptive neural network (LAN) can be introduced to hierarchically process the extracted features, generating hierarchical feature representations at multiple levels, which can enhance the model's sensitivity to key information and improve the accuracy of the model's anomaly recognition through feature hierarchy.
[0044] Furthermore, the model can calculate hierarchical scores based on the attention weights corresponding to the features at each level, and these weights can comprehensively reflect the importance of different features for anomaly recognition. Then, by accumulating all the hierarchical scores, the sub-anomaly scores for each data type can be obtained, enabling in-depth analysis and anomaly recognition of various types of data of power equipment and quantitatively evaluating the abnormal state of the equipment to ensure the safe and stable operation of power equipment.
[0045] Input the target power fluctuation data into the forget gate of the LSTM-LAN first sub-feature extraction model, and determine the data to be retained in the target power fluctuation data based on the forget gate. The corresponding calculation formula is as follows: In the formula, represents the output of the forget gate at the current time t; represents the weight matrix of the forget gate at the current time t; represents the hidden state at the previous time t-1; represents the target power fluctuation data input at the current time t; represents the hidden state and the target power fluctuation data forming a vector; represents the bias term of the forget gate; represents the activation function; Based on the input gate, determine the data to be added to the candidate cell state in the target power fluctuation data. The corresponding calculation formula is as follows: In the formula, represents the output of the input gate at the current time t; represents the candidate cell state at the current time t; and respectively represent the weight matrices of the input gate and the candidate cell state; represents the hidden state at the previous time t-1; represents the target power fluctuation data input at the current time t; represents the hidden state and the target power fluctuation data forming a vector; and Represent the bias terms of the input gate and candidate cell state respectively; represents the activation function; represents the hyperbolic tangent function; The cell state is updated according to the output of the forget gate, the output of the input gate and the candidate cell state. The corresponding calculation formula is as follows: In the formula, Represents the cell state at the current time t; Represents the output of the forget gate at the current time t; Indicates the cell state at the previous time t-1; Represents the output of the input gate at the current time t; represents the candidate cell state at the current time t; According to the cell state, the data to be output in the hidden state is determined through the output gate, and the corresponding calculation formula is as follows: In the formula, represents the output of the output gate at the current time t; represents the activation function; Represents the weight matrix of the output gate; Represents the hidden state at the previous moment t-1; represents the target power fluctuation data input at the current time t; Indicates hidden state and target power fluctuation data The vector composed of Represents the bias term of the output gate; represents the hidden state of the target power fluctuation feature at the current time t; represents the hyperbolic tangent function; Represents the cell state at the current time t.
[0046] It is understandable that the information that needs to be retained in the target power fluctuation data can be determined by the forget gate mechanism. Then, the input gate mechanism can be used to determine the information that needs to be added to the candidate cell state. According to the output of the forget gate, the output of the input gate, and the candidate cell state, the cell state can be updated to ensure the effective transmission of information and the effective maintenance of the state.
[0047] Finally, based on the updated cell state, the information that needs to be output in the hidden state can be determined through the output gate mechanism, thus completing the feature extraction process of the target power fluctuation data by the first sub-feature extraction model of LSTM-LAN.
[0048] After obtaining the hierarchical power fluctuation features of multiple levels, determining the hidden state corresponding to each of the hierarchical power fluctuation features and the output of the output gate; Set the total number of levels of the target power fluctuation characteristics as L. The calculation formula for the attention weight corresponding to the j-th sub-layer power fluctuation characteristic of the f-th level at the current moment t is as follows: In the formula, represents the attention score corresponding to the j-th sub-layer power fluctuation characteristic of the f-th level at the current moment t; represents the attention score function; represents the hidden state of the j-th sub-layer power fluctuation characteristic of the f-th level at the current moment t; represents the output of the output gate of the j-th sub-layer power fluctuation characteristic of the f-th level at the current moment t; represents the attention weight of the j-th sub-layer power fluctuation characteristic of the f-th level at the current moment t; represents the exponential function with the natural constant e as the base; N represents the number of sub-layer device visual characteristics of the f-th level; Determine the sub-layer power fluctuation score according to the attention weight of the sub-layer power fluctuation characteristic, and sum all the sub-layer power fluctuation scores to obtain the sub-power fluctuation anomaly score. The corresponding calculation formula is as follows: In the formula, represents the sub-power fluctuation anomaly score at the current moment t; L represents the total number of levels of the target power fluctuation characteristics; N represents the number of sub-layer device visual characteristics of the f-th level; represents the attention weight of the j-th sub-layer power fluctuation characteristic of the f-th level at the current moment t; represents the output of the output gate of the j-th sub-layer power fluctuation characteristic of the f-th level at the current moment t; represents the hidden state of the j-th sub-layer power fluctuation characteristic of the f-th level at the current moment t; represents the hidden output combination function; The calculation processes of the sub-environment change anomaly score and the sub-device vision anomaly score are the same as above.
[0049] Among them, after obtaining the sub-layer power fluctuation characteristics of multiple levels, the hidden state and the output of the output gate corresponding to each sub-layer power fluctuation characteristic can be determined, and then the attention weight of this characteristic can be calculated based on the attention score function.
[0050] Furthermore, the sub-layer power fluctuation score corresponding to it can be determined according to the attention weight of the sub-layer power fluctuation characteristic. Then, all the sub-layer power fluctuation scores can be summed to obtain the sub-power fluctuation anomaly score at the current moment.
[0051] It should be noted that the calculation processes of the sub - environment change anomaly score and the sub - device vision anomaly score are the same as that of the sub - power fluctuation anomaly score.
[0052] Based on the ensemble learning strategy, a weighted average of the sub - power fluctuation anomaly score, the sub - environment change anomaly score, and the sub - device vision anomaly score is performed to obtain the total power anomaly score. The corresponding calculation formula is as follows: In the formula, represents the total power anomaly score; represents the weight coefficient corresponding to the sub - power fluctuation anomaly score; represents the sub - power fluctuation anomaly score; represents the weight coefficient corresponding to the sub - environment change anomaly score; represents the sub - environment change anomaly score; represents the weight coefficient corresponding to the sub - device vision anomaly score; represents the sub - device vision anomaly score; Obtain the anomaly score threshold of the target power device , and compare the total power anomaly score with the anomaly score threshold to obtain the power safety assessment result. The expression of the power safety assessment result is as follows: In the formula, represents the power safety assessment result; represents the total power anomaly score; represents the anomaly score threshold.
[0053] It should be noted that the ensemble learning strategy can be used to perform a weighted average of the sub - power fluctuation anomaly score, the sub - environment change anomaly score, and the sub - device vision anomaly score to obtain the total power anomaly score, so as to accurately quantify the overall abnormal state of the power device.
[0054] Furthermore, the anomaly score threshold of the power device can be preset in advance, and the calculated total power anomaly score is compared with this threshold to obtain the power safety assessment result, thereby improving the accuracy of power safety monitoring and ensuring the safe and stable operation of the power device.
[0055] As Figure 2 shown, it is a system block diagram of a neural - network - based power consumption safety assessment system provided by an embodiment of the present invention. The assessment system includes: A data acquisition module, configured to collect the initial sub - power data of the target power device through a real - time power sensor network; A data pre - processing module, configured to perform pre - processing operations on the initial sub - power data to generate corresponding target sub - power data; Anomaly recognition module, configured to build an LSTM-LAN sub-feature extraction model to perform anomaly recognition on the target sub-power data to obtain corresponding sub-power anomaly scores; Score summarization module, configured to use an ensemble learning strategy to summarize the sub-power anomaly scores to generate corresponding total power anomaly scores; Result determination module, configured to obtain the anomaly score threshold of the target power device, compare the total power anomaly score with the anomaly score threshold, and generate corresponding power safety assessment results.
[0056] Figure 2 The device in the illustrated embodiment can correspondingly be used to execute Figure 1 the steps in the illustrated method embodiment, and its implementation principle and technical effects are similar, which will not be elaborated here.
[0057] An electronic device includes a memory and a processor. A computer program is stored in the memory. When the processor runs the computer program stored in the memory, the processor executes the steps of the neural network-based power consumption safety assessment method described in any one of the above.
[0058] As Figure 3 shown, it is a schematic hardware structure diagram of an electronic device provided by an embodiment of the present invention. The electronic device 30 includes: a processor 31, a memory 32, and a computer program; where Memory 32, configured to store the computer program. This memory can also be a flash memory. The computer program is, for example, an application program or a functional module that implements the above method.
[0059] Processor 31, configured to execute the computer program stored in the memory to implement each step executed by the device in the above method. Specifically, reference can be made to the relevant descriptions in the foregoing method embodiments.
[0060] Optionally, the memory 32 can be either independent or integrated with the processor 31.
[0061] When the memory 32 is a device independent of the processor 31, the device may further include: Bus 33, configured to connect the memory 32 and the processor 31.
[0062] A readable storage medium stores a computer program, and when the computer program is executed by a processor, it is used to implement the steps of the neural network-based power consumption safety assessment method described in any one of the above.
[0063] Among them, the readable storage medium can be a computer storage medium or a communication medium. The communication medium includes any medium that facilitates the transmission of a computer program from one place to another. The computer storage medium can be any available medium accessible by a general-purpose or special-purpose computer. For example, the readable storage medium is coupled to the processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (ASIC). Additionally, the ASIC can be located in a user device. Of course, the processor and the readable storage medium can also exist as discrete components in a communication device. The readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a CD-ROM, magnetic tape, a floppy disk, and an optical data storage device, etc.
[0064] The present invention also provides a program product, which includes execution instructions stored in a readable storage medium. At least one processor of the device can read the execution instructions from the readable storage medium, and the execution of the execution instructions by at least one processor causes the device to implement the methods provided by the above various embodiments.
[0065] In the above embodiments of the device, it should be understood that the processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in combination with the present invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor.
[0066] Through the introduction of the above embodiments, the present invention, through the power safety assessment method, system, device and medium based on neural network, can collect the initial sub-power data of the target power equipment through the real-time power sensor network; perform preprocessing operations on the initial sub-power data to generate corresponding target sub-power data; construct an LSTM-LAN sub-feature extraction model to identify anomalies in the target sub-power data and obtain corresponding sub-power anomaly scores; adopt an ensemble learning strategy to aggregate the sub-power anomaly scores to generate corresponding total power anomaly scores; obtain the anomaly score threshold of the target power equipment, compare the total power anomaly score with the anomaly score threshold, and generate corresponding power safety assessment results, thereby effectively integrating multi-category data and significantly improving the comprehensiveness and accuracy of hidden danger detection of power equipment.
[0067] The present invention can effectively integrate the power fluctuation data, environmental change data and device vision data of power equipment, comprehensively monitor the operating conditions of power equipment, and thus significantly expand the coverage of hidden danger detection; the present invention can adopt a mechanism combining a recurrent neural network and a hierarchical attention network, greatly improving the model's processing ability for long-sequence data and the capture efficiency of subtle features, and improving the accuracy and response speed of hidden danger identification of power equipment; and the present invention can adopt an ensemble learning strategy, with multiple sub-models working together, avoiding the overfitting problem that a single model may face, ensuring the flexibility and adaptability of the system in the face of diverse data and uncertain situations, greatly reducing the false alarm rate and missed detection rate of hidden danger diagnosis, improving the robustness and stability of the system, and increasing the maintenance cost-benefit ratio.
[0068] This application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, and the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in one process Figure 1 one process or multiple processes and / or blocks Figure 1 a device for the functions specified in one block or multiple blocks.
[0069] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing relevant hardware through a program, and this program can be stored in a computer-readable storage medium. The storage medium includes read-only memory (ROM), random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically-erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc memories, magnetic disk memories, tape memories, or any other medium that can be used to carry or store data and is readable by a computer.
[0070] It should also be noted that the term "comprising", "including" or any other variation thereof is intended to cover non-exclusive inclusion, so that a process, method, commodity or device comprising a series of elements not only includes those elements, but also includes other elements not explicitly listed, or further includes elements inherent to such a process, method, commodity or device. Without further limitation, an element defined by the statement "comprising one..." does not exclude the existence of another identical element in the process, method, commodity or device comprising the element.
Claims
1. A method for evaluating electricity safety based on a neural network, characterized in that: The evaluation methods include: Collecting initial sub-power data of target power equipment through a real-time power sensor network; Performing a preprocessing operation on the initial sub-power data to generate corresponding target sub-power data; Constructing an LSTM-LAN sub-feature extraction model, performing abnormal identification on the target sub-power data, and obtaining a corresponding sub-power abnormality score; Adopting an integrated learning strategy to aggregate the sub-power anomaly scores to generate a corresponding total power anomaly score; The abnormality score threshold of the target power equipment is obtained, the total power abnormality score is compared with the abnormality score threshold, and a corresponding power safety assessment result is generated.
2. The method for evaluating electricity safety based on a neural network according to claim 1, characterized in that: The collecting of initial sub-power data of the target power equipment through the real-time power sensor network specifically includes: The real-time power sensor network includes a first power sensor, a second power sensor and a third power sensor; the initial sub-power data includes initial power fluctuation data, initial environment change data and initial device visual data; Acquiring the current and voltage fluctuations of the target power equipment through the first power sensor to generate the initial power fluctuation data; Acquiring the temperature and humidity changes of the target power equipment through the second power sensor to generate the initial environment change data; The surface image information of the target power device is acquired by the third power sensor to generate the initial device visual data.
3. The method for evaluating electricity safety based on a neural network according to claim 1, characterized in that: The preprocessing operation on the initial sub-power data to generate corresponding target sub-power data specifically includes: Identify and remove erroneous data in the initial sub-power data, and fill in missing data in the initial sub-power data to generate corresponding intermediate sub-power data; The intermediate sub-power data is standardized to generate the target sub-power data.
4. The method for evaluating electricity safety based on a neural network according to claim 1, characterized in that: The LSTM-LAN sub-feature extraction model is constructed to identify anomalies of the target sub-power data and obtain corresponding sub-power anomaly scores, specifically including: The LSTM-LAN sub-feature extraction model includes a LSTM-LAN first sub-feature extraction model, a LSTM-LAN second sub-feature extraction model and a LSTM-LAN third sub-feature extraction model; the target sub-power data includes target power fluctuation data, target environment change data and target device visual data; the sub-power anomaly score includes a sub-power fluctuation anomaly score, a sub-environment change anomaly score and a sub-device visual anomaly score; Based on the LSTM-LAN first sub-feature extraction model, feature extraction is performed on the target power fluctuation data to obtain target power fluctuation features, and the target power fluctuation features are feature graded to obtain hierarchical power fluctuation features of multiple levels. Hierarchical power fluctuation scores are determined according to attention weights corresponding to the hierarchical power fluctuation features, and the sub-power fluctuation anomaly scores are obtained by summing up all the hierarchical power fluctuation scores: Based on the LSTM-LAN second sub-feature extraction model, feature extraction is performed on the target environment change data to obtain target environment change features, and the target environment change features are feature graded to obtain hierarchical environment change features of multiple levels, and hierarchical environment change scores are determined according to the attention weights corresponding to the hierarchical environment change features, and all the hierarchical environment change scores are summed to obtain the sub-environment change anomaly score: Based on the LSTM-LAN third sub-feature extraction model, feature extraction is performed on the target device visual data to obtain the target device visual features, and the target device visual features are feature graded to obtain layered device visual features of multiple levels, and the layered device visual scores are determined according to the attention weights corresponding to the layered device visual features, and the sub-device visual anomaly scores are obtained by summing up all the layered device visual scores.
5. The method for evaluating electricity safety based on a neural network according to claim 4 is characterized in that: The target power fluctuation data is input into the forget gate of the first sub-feature extraction model of the LSTM-LAN, and the data to be retained in the target power fluctuation data is determined based on the forget gate. The corresponding calculation formula is as follows: In the formula, Represents the output of the forget gate at the current time t; Represents the weight matrix of the forget gate at the current time t; Represents the hidden state at the previous moment t-1; represents the target power fluctuation data input at the current time t; Indicates hidden state and target power fluctuation data The vector composed of Represents the bias term of the forget gate; represents the activation function; Based on the input gate, the data in the target power fluctuation data that needs to be added to the candidate cell state is determined, and the corresponding calculation formula is as follows: In the formula, Represents the output of the input gate at the current time t; represents the candidate cell state at the current time t; and The weight matrices representing the input gate and candidate cell states respectively; Represents the hidden state at the previous moment t-1; represents the target power fluctuation data input at the current time t; Indicates hidden state and target power fluctuation data The vector composed of and Represent the bias terms of the input gate and candidate cell state respectively; represents the activation function; represents the hyperbolic tangent function; The cell state is updated according to the output of the forget gate, the output of the input gate and the candidate cell state. The corresponding calculation formula is as follows: In the formula, Represents the cell state at the current time t; Represents the output of the forget gate at the current time t; Indicates the cell state at the previous time t-1; Represents the output of the input gate at the current time t; represents the candidate cell state at the current time t; According to the cell state, the data to be output in the hidden state is determined through the output gate, and the corresponding calculation formula is as follows: In the formula, represents the output of the output gate at the current time t; represents the activation function; Represents the weight matrix of the output gate; Represents the hidden state at the previous moment t-1; represents the target power fluctuation data input at the current time t; Indicates hidden state and target power fluctuation data The vector composed of Represents the bias term of the output gate; represents the hidden state of the target power fluctuation feature at the current time t; represents the hyperbolic tangent function; Represents the cell state at the current time t.
6. The method for evaluating electricity safety based on a neural network according to claim 5, characterized in that: After obtaining the hierarchical power fluctuation features of multiple levels, determining the hidden state corresponding to each of the hierarchical power fluctuation features and the output of the output gate; Assuming the total number of levels of the target power fluctuation feature is L, the calculation formula for the attention weight corresponding to the j-th layered power fluctuation feature of the f-th level at the current time t is as follows: In the formula, represents the attention score corresponding to the j-th hierarchical power fluctuation feature of the f-th level at the current time t; represents the attention score function; represents the hidden state of the j-th hierarchical power fluctuation feature at the f-th level at the current time t; The output of the output gate representing the j-th hierarchical power fluctuation characteristic of the f-th level at the current time t; represents the attention weight of the j-th hierarchical power fluctuation feature of the f-th level at the current time t; represents an exponential function with the natural constant e as the base; N represents the number of hierarchical device visual features at the f-th level; The layered power fluctuation score is determined according to the attention weight of the layered power fluctuation feature, and all the layered power fluctuation scores are summed to obtain the sub-power fluctuation abnormality score. The corresponding calculation formula is as follows: In the formula, represents the sub-power fluctuation anomaly score at the current time t; L represents the total number of levels of the target power fluctuation feature; N represents the number of hierarchical device visual features at the fth level; represents the attention weight of the j-th hierarchical power fluctuation feature of the f-th level at the current time t; The output of the output gate representing the j-th hierarchical power fluctuation characteristic of the f-th level at the current time t; represents the hidden state of the j-th hierarchical power fluctuation feature at the f-th level at the current time t; represents the hidden output combining function; The calculation process of the sub-environment change anomaly score and the sub-device visual anomaly score is the same as above.
7. The method for evaluating electricity safety based on a neural network according to claim 6, characterized in that: Based on the integrated learning strategy, the sub-power fluctuation anomaly score, the sub-environment change anomaly score and the sub-device visual anomaly score are weighted averaged to obtain the total power anomaly score. The corresponding calculation formula is as follows: In the formula, represents the total power anomaly score; Indicates the weight coefficient corresponding to the abnormal score of sub-power fluctuation; Indicates the sub-power fluctuation abnormality score; Indicates the weight coefficient corresponding to the abnormal score of sub-environment change; represents the abnormal score of sub-environment change; Indicates the weight coefficient corresponding to the visual anomaly score of the sub-device; Indicates the visual anomaly score of the sub-device; Obtain the abnormal score threshold of the target power equipment , the total power anomaly score and anomaly score threshold The comparison is performed to obtain the power safety assessment result, and the expression of the power safety assessment result is as follows: In the formula, Indicates the result of power safety assessment; represents the total power anomaly score; Represents the anomaly score threshold.
8. A neural network-based electricity safety assessment system, applied to a neural network-based electricity safety assessment method as claimed in any one of claims 1 to 7, the assessment system comprising: A data acquisition module, used for acquiring initial sub-power data of target power equipment through a real-time power sensor network; A data preprocessing module, used for performing a preprocessing operation on the initial sub-power data to generate corresponding target sub-power data; An anomaly identification module is used to construct an LSTM-LAN sub-feature extraction model to identify anomalies of the target sub-power data and obtain corresponding sub-power anomaly scores; A score aggregation module, used to aggregate the sub-power anomaly scores using an integrated learning strategy to generate a corresponding total power anomaly score; The result determination module is used to obtain the abnormality score threshold of the target power equipment, compare the total power abnormality score with the abnormality score threshold, and generate a corresponding power safety assessment result.
9. An electronic device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the processor runs the computer program stored in the memory, the processor executes the steps of the neural network-based electricity safety assessment method as described in any one of claims 1 to 7.
10. A readable storage medium having a computer program stored therein, characterized in that: When the computer program is executed by a processor, it is used to implement the steps of the neural network-based electricity safety assessment method as described in any one of claims 1 to 7.