Electric shock signal identification method
By increasing the proportion of electric shock signal data in the deep neural network model and designing adaptive training methods, the problems of low accuracy of electric shock signal recognition and high false alarm rate in the prior art are solved, and accurate identification and error judgment of electric shock signal are achieved.
Patent Information
- Application Number
- CN202411665625.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-20
- Publication Date
- 2025-04-08
AI Technical Summary
The existing electroshock signal recognition methods have low accuracy and high false alarm rate, especially in the case of dynamic signal recognition and scarce data.
By obtaining historical measurement data, cleaning and labeling data, establishing a deep neural network model, and training by increasing the proportion of electric shock signal data, designing a small sample detection model and asymmetric sample adaptive training method to achieve accurate identification of electric shock signals.
It effectively improves the accuracy of the deep neural network model for identifying electric shock signals, reduces the probability of misjudgment, and provides an efficient solution for identifying electric shock signals.
Smart Images

Figure CN119782698A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power systems, and in particular to a method for identifying electric shock signals. Background Art
[0002] With the transformation of the global energy structure and the growing demand for electricity, the stable operation of the power grid has become an important cornerstone for national energy security and social and economic development. However, while pursuing efficient and green energy, we have to face a series of complex and urgent challenges. In terms of policy factors, governments have introduced policies to encourage the development of renewable energy, but at the same time have also put forward higher requirements for the flexibility and resilience of the power grid to cope with the uncertainty brought about by the access of new energy. In terms of safety factors, large-scale biological electric shock incidents are a major hidden danger to power grid safety. It may not only cause direct consequences such as equipment damage and power outages, but may also have long-term impacts on the ecological environment and public safety.
[0003] Existing methods for electric shock signal recognition include traditional signal processing technology, which mainly converts complex time domain signals into frequency domain for analysis through Fourier transform or short-time Fourier transform, thereby extracting the key features of electric shock signals. However, this method relies on prior knowledge and manual parameter adjustment, and has limited recognition of dynamically changing signals.
[0004] In order to solve the problem that traditional signal processing technology has limited recognition of dynamic signals, the existing electric shock signal recognition method also includes deep learning technology. However, due to the current data scarcity and imbalance problems faced by electric shock signals, the number of electric shock signal samples is less than that of conventional signal samples, and the deep learning model cannot be well trained. This data asymmetry leads to low accuracy of deep learning technology in recognizing electric shock signals and a high false alarm rate. Summary of the invention
[0005] The present invention provides a method for identifying an electric shock signal, so as to solve the problem that the current method for identifying an electric shock signal has low accuracy and high false alarm rate.
[0006] In a first aspect, the present invention provides a method for identifying an electric shock signal, the identification method comprising:
[0007] Acquire historical measurement data, which includes normal signal data and electric shock signal data; clean the historical measurement data;
[0008] Build a deep neural network model;
[0009] Increase the proportion of electric shock signal data in historical measurement data, input historical measurement data into the deep neural network model, and train the deep neural network model;
[0010] The real-time collected measurement data is input into the deep neural network model, and the deep neural network model determines whether the real-time collected measurement data contains electric shock signal data.
[0011] Optionally, obtain historical measurement data, including:
[0012] Acquire current data, voltage data, power data, frequency data and electric shock tag data, where the electric shock tag data includes electric shock location and electric shock time;
[0013] All acquired data are mapped into a data chain in time sequence.
[0014] Optionally, historical measurement data is cleaned, including:
[0015] Conduct data anomaly analysis on historical measurement data to identify data noise points and data missing points;
[0016] Fill the data missing points with measurement values, and use the filled measurement values as data noise points;
[0017] Replace data noise points with measured values.
[0018] Optionally, after the historical measurement data is cleaned, the following steps are also included:
[0019] The electric shock signal data in the historical measurement data are labeled with an electric shock signal label, and the normal signal data in the historical measurement data are labeled with a normal signal label;
[0020] The historical measurement data is converted into time-frequency domain data using Fourier transform.
[0021] Optionally, historical measurement data is used as a source instance set, and electric shock signal data is used as a target instance set. The proportion of electric shock signal data in the historical measurement data is increased, and the historical measurement data is input into a deep neural network model to train the deep neural network model, including:
[0022] The source instance set is divided into a target similar set and a target dissimilar set; the target similar set is the signal data in the source instance set that is similar to the target instance set, and the target dissimilar set is the signal data in the source instance set that is dissimilar to the target instance set;
[0023] Expand the target instance set using the target similarity set;
[0024] Asynchronously aligning the target dissimilar set and the expanded target instance set;
[0025] The deep neural network model is trained by using a supervised training method of the recognition task; the supervised training method of the recognition task is that the deep neural network model only determines whether the signal data of the expanded target instance set is electric shock signal data during training.
[0026] Optionally, the proportion of electric shock signal data in the historical measurement data is increased, the historical measurement data is input into the deep neural network model, and after the deep neural network model is trained, the following is further included:
[0027] Input historical measurement data into the deep neural network model to test the deep neural network model.
[0028] Optionally, the deep neural network model determines whether the real-time collected measurement data contains electric shock signal data, including:
[0029] The deep neural network model extracts features from the measurement data collected in real time;
[0030] The deep neural network model amplifies the feature points containing the electric shock signal data;
[0031] Using the TinyReLU activation function, the difference between the feature points containing the electric shock signal data and the feature points not containing the electric shock signal data is enlarged;
[0032] The deep neural network model determines whether the real-time collected measurement data contains electric shock signal data based on the difference between the feature points containing electric shock signal data and the feature points not containing electric shock signal data and the feature points containing electric shock signal data after amplification.
[0033] Optionally, the deep neural network model amplifies the feature points containing the electric shock signal data, including:
[0034] Extracting the maximum value of the length, width and channel size of the feature point map containing the electric shock signal data;
[0035] Performing filtering on feature points containing electric shock signal data;
[0036] The feature points containing the electric shock signal data are enlarged using dilated convolution with continuously increasing dilation coefficients.
[0037] Optionally, historical measurement data is input into the deep neural network model to train the deep neural network model, including:
[0038] In the process of training the deep neural network model, historical measurement data is input into the deep neural network model to evaluate the performance of the deep neural network model; evaluating the performance of the deep neural network model includes calculating the loss function value according to the historical measurement data;
[0039] If the loss function value does not change according to the first change trend, the training of the deep neural network model is stopped.
[0040] Optionally, build a deep neural network model, including:
[0041] A deep neural network model consisting of an input layer, a hidden layer and an output layer is established. The input layer receives the measurement data input into the deep neural network model; the hidden layer performs feature extraction, feature amplification and feature difference amplification on the measurement data; and the output layer outputs the result of whether there is electric shock signal data.
[0042] The technical solution of the embodiment of the present invention, when training the deep neural network model, aims at the asymmetric proportion of electric shock signal data and normal signal data in the historical measurement data, that is, the proportion of electric shock signal data is particularly small, and proposes a training method for electric shock accident recognition model based on asymmetric small sample adaptive detection, designs a small sample detection model and an asymmetric sample adaptive training method, and ensures that the recognition model can make full use of the electric shock signal data with a low proportion in the sample during training. The specific method can be to divide the measurement data similar to the electric shock signal data in the historical measurement data, that is, the measurement data similar to the electric shock signal data in the normal signal data into the electric shock signal data, expand the electric shock signal data, and increase the proportion of the electric shock signal data in the historical measurement data. Effectively enable the deep neural network model to be fully trained when the existing electric shock signal data samples are insufficient, realize the accurate recognition of electric shock signals by the deep neural network model, and reduce the probability of misjudgment. Provides an efficient solution for electric shock signal recognition.
[0043] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0045] Figure 1 is a flow chart of a method for identifying an electric shock signal provided by an embodiment of the present invention;
[0046] Figure 2 is a flow chart of another method for identifying an electric shock signal provided by an embodiment of the present invention;
[0047] Figure 3 is a flow chart of another method for identifying an electric shock signal provided by an embodiment of the present invention;
[0048] Figure 4 is a schematic diagram of a model training provided by an embodiment of the present invention;
[0049] Figure 5 is a flow chart of another method for identifying an electric shock signal provided by an embodiment of the present invention;
[0050] Figure 6 This is a schematic diagram of a deep neural network for recognizing electric shock signals provided by an embodiment of the present invention;
[0051] Figure 7 It is a flow chart of another method for identifying electric shock signals provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0052] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0053] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0054] Figure 1 is a flow chart of a method for identifying an electric shock signal provided by an embodiment of the present invention, such as Figure 1 As shown, the method includes:
[0055] S100: Acquire historical measurement data, where the historical measurement data includes normal signal data and electric shock signal data; and clean the historical measurement data.
[0056] Specifically, first obtain the relevant historical measurement data of distribution network monitoring, which includes electric shock signal data and normal signal data. Perform cleaning processing on the acquired historical measurement data, which may include null value completion and time sequence unification. The historical measurement data may be marked, and the electric shock signal data in the historical measurement data may be labeled with an electric shock signal label, and the normal signal data in the historical measurement data may be labeled with a normal signal label. The cleaned historical measurement data may also be converted into time-frequency domain.
[0057] Before judging the characteristics of electric shock, it is first necessary to obtain relevant historical measurement data of distribution network monitoring to extract the characteristics of electric shock of large organisms, establish and train the recognition model, so as to more accurately identify whether there is electric shock of large organisms in real-time application.
[0058] S110: Build a deep neural network model.
[0059] Specifically, a deep neural network model is constructed, and the deep neural network model may include an input layer, multiple hidden layers and an output layer.
[0060] S120: Increasing the proportion of electric shock signal data in historical measurement data, inputting the historical measurement data into a deep neural network model, and training the deep neural network model.
[0061] Specifically, after the deep neural network model is constructed, the deep neural network model is trained. In view of the asymmetric proportion of electric shock signal data and normal signal data in historical measurement data, that is, the proportion of electric shock signal data is particularly small, a training method for electric shock accident recognition model based on asymmetric small sample adaptive detection is proposed, and a small sample detection model and an asymmetric sample adaptive training method are designed to ensure that the recognition model can make full use of the electric shock signal data with a relatively low proportion in the sample during training. The specific method can be to divide the measurement data similar to the electric shock signal data in the historical measurement data, that is, the measurement data similar to the electric shock signal data in the normal signal data into the electric shock signal data, expand the electric shock signal data, and increase the proportion of electric shock signal data in the historical measurement data. However, the proportion of electric shock signal data in the historical measurement data must be less than fifty percent.
[0062] The historical measurement data can be divided into a training data set and a test data set. For example, 70% of the historical measurement data can be divided into a training data set, and the remaining 30% can be divided into a test data set. The training data set is input into the deep neural network model to train the neural network model.
[0063] S130: Inputting the real-time collected measurement data into the deep neural network model, and the deep neural network model determines whether the real-time collected measurement data contains electric shock signal data.
[0064] Specifically, after the training of the deep neural network model is completed, the real-time collected measurement data is cleaned and processed by time-frequency conversion and then input into the deep neural network model. The deep neural network model can perform feature extraction and feature amplification on the real-time collected measurement data, and output the result of whether the real-time collected measurement data contains electric shock signal data, thereby achieving the purpose of electric shock signal identification.
[0065] The technical solution of the embodiment of the present invention, when training the deep neural network model, aims at the asymmetric proportion of electric shock signal data and normal signal data in the historical measurement data, that is, the proportion of electric shock signal data is particularly small, and proposes a training method for electric shock accident recognition model based on asymmetric small sample adaptive detection, designs a small sample detection model and an asymmetric sample adaptive training method, and ensures that the recognition model can make full use of the electric shock signal data with a low proportion in the sample during training. The specific method can be to divide the measurement data similar to the electric shock signal data in the historical measurement data, that is, the measurement data similar to the electric shock signal data in the normal signal data into the electric shock signal data, expand the electric shock signal data, and increase the proportion of the electric shock signal data in the historical measurement data. Effectively enable the deep neural network model to be fully trained when the existing electric shock signal data samples are insufficient, realize the accurate recognition of electric shock signals by the deep neural network model, and reduce the probability of misjudgment. Provides an efficient solution for electric shock signal recognition.
[0066] Optionally, based on the above examples, Figure 2 is a flow chart of another method for identifying an electric shock signal provided by an embodiment of the present invention, such as Figure 2 As shown, the method includes:
[0067] S200: Acquire current data, voltage data, power data, frequency data and electric shock tag data, where the electric shock tag data includes electric shock location and electric shock time.
[0068] Specifically, collect the current data of each branch, including the injected power of each node converted into current form and three-phase current data. Collect the voltage data of each node, mainly including abnormal voltage change data and time series change data. Collect the active power and reactive power of each node, especially the power operation data of nodes where electric shock accidents have occurred in the past. Collect the frequency changes of each node, especially the frequency data of the head and end. Collect the electric shock location and time tag data, including whether the leakage protection device is activated during electric shock, the line current during electric shock, and the voltage changes.
[0069] S210: All acquired data are converted into a data chain in time sequence.
[0070] Specifically, all the data acquired in S200 are correspondingly formed into a data chain in a time series form.
[0071] S220: Perform data anomaly analysis on historical measurement data to identify data noise points and data missing points.
[0072] Specifically, all the acquired historical measurement data are cleaned. Before cleaning, the source of the historical measurement data can be determined. The data is measured through the intelligent fusion terminal, feeder intelligent terminal unit, data terminal unit and equipment-level measurement device and uploaded to the edge device and cloud master station. After the source of the historical measurement data is determined, specific cleaning can be performed according to the source.
[0073] When uploading data, two types of data anomalies may occur due to abnormal communication quality and storage medium status, namely data missing and data noise. First, perform data anomaly analysis on historical measurement data to identify data noise points and data missing points.
[0074] S230: Filling the data missing points with measurement values, and using the filled measurement values as data noise points.
[0075] Specifically, data missing generally refers to data interruption caused by factors such as short-term sensor failure, communication port abnormality, and recording errors. Missing values in status data destroy the continuity of system operation and do not benefit from subsequent status evaluation and trend inspection.
[0076] When dealing with missing data, the missing values can be found through time series search. The missing point value is filled by inverting the previous value, and the filled measurement value is used as the data noise point. Assume t (i) If the measurement value data is missing, then the actual time series t (i) The measured value data at the moment is:
[0077] Vt (i) =-Vt (i-1)
[0078] Among them, Vt (i) t (i) The measured value data at the time, Vt (i-1) corresponds to the previous moment t (i-1) The measured value data.
[0079] S240: Replace the data noise points with measurement values.
[0080] Specifically, the time when noise is generated is uncertain, so it is necessary to identify the noise point. The technical solution of the embodiment of the present invention adopts the incremental mutation method to identify noise. In the normal time series, the increment of the data uploaded by the device is kept in a stable range, and the cyclic incremental slope of all data is solved to obtain the incremental abnormal data point. The formula is as follows:
[0081]
[0082] Among them, Vt (i) t (i) The measured value data at the time, Vt (i-1) is the corresponding time t (i-1) The measured data, Vt (i-2) is the corresponding time t (i-2) The measured data, Vt (i-3) is the corresponding time t (i-3) The measured value data. (i) Is the increment of the measured value data at time greater than t? (i-1) The increment of the measured value data at time t (i-2) The sum of the increments of the measured value data at time t (i) The increment of the measured value data at time t is greater than (i-1) The increment of the measured value data at time t (i-2) The sum of the increments of the measured value data at time t (i) The measured value data at time t is the incremental abnormal data point. (i) The increment of the measured value data at time t is less than or equal to (i-1) The increment of the measured value data at time t (i-2) The sum of the increments of the measured value data at time t (i) The measured value data at the time is not an incremental abnormal data point, so it can be directly determined that t (i) The moment is not a noise point. This formula verifies that t (i) Whether the moment is a noise point.
[0083] Considering that the data of equipment in the substation may have an incremental increase or decrease trend, taking photovoltaic as an example, the photovoltaic output is volatile, which may cause voltage mutations, but the actual equipment fluctuations are continuous and consistent. Double verification is required to determine whether the data is a noise point or an actual fluctuation. The formula for the second verification is as follows:
[0084]
[0085] (V t(i+1) -V t(i) )*(V t(i) -V t(i-1) )<0
[0086] Among them, Vt (i) t (i) The measured value data at the time, Vt (i+1) is the corresponding time t (i+1) The measured data, Vt (i+2) is the corresponding time t (i+2)The measured data, Vt (i+3) is the corresponding time t (i+3) The measured value data.
[0087] If t (i) The increment of the measured value data at time t is greater than (i-1) The increment of the measured value data at time t (i-2) The sum of the increments of the measured value data at time t (i) The measured value data at the moment is the incremental abnormal data point. First, the first formula in the second verification formula is used to determine whether the same out-of-phase incremental abnormality exists at the next moment. If there is an out-of-phase incremental abnormality, the second formula in the second verification formula is used to verify t (i) Whether there is a sudden change in the measured value data at time t (i) If the measured value data at time t has a sudden change, then it is considered that (i) The time is the data noise point.
[0088] The cleaned data is historical measurement data. When replacing noise, the relative consistency of the data must be ensured, that is, the data distribution law cannot destroy its time series law. Here, the mean filling method is used to replace the noise points. Assume t (i) The time is the data noise point, for t (i) The measured data value at the moment is replaced, and the formula is as follows:
[0089]
[0090] Coming soon (i-1) The measured value data Vt at the moment (i-1) and t (i-2) The measured value data Vt at the moment (i-2) Substitute t after averaging (i) The measurement value data at the moment.
[0091] However, considering the time difference of data upload, the nearest point filling may lead to local feature method of data. Therefore, the technical solution of the embodiment of the present invention designs the time ratio mean as the noise point replacement to maintain the normal volatility of historical measurement data. Assuming t (i) The time is the data noise point, for t (i) The measured data value at the moment is replaced, and the replacement formula for the noise point is changed to the following:
[0092]
[0093] Where m1 = t (i) -t (i-1) , n1=t (i) -t (i-2) .
[0094] S250: labeling the electric shock signal data in the historical measurement data with an electric shock signal label, and labeling the normal signal data in the historical measurement data with a normal signal label.
[0095] Specifically, according to the electric shock accident conditions in the collected historical measurement data, the corresponding time and location of occurrence are found, and all corresponding measurement data are marked as electric shock signal labels, that is, all historical measurement data are converted into two types: normal signal data and electric shock signal data.
[0096] S260: Convert the historical measurement data into time-frequency domain data by Fourier transform.
[0097] Specifically, the time period data of the electric shock accident is converted into a frequency domain signal using Fourier transform, and a frequency domain conversion window is established based on the same period, all processed measurement signal data is converted into frequency domain signals, and a label of whether it is an electric shock signal is retained.
[0098] The processed historical measurement data are divided into training data set and test data set. The training data set is used for deep neural network model training, which includes normal frequency domain signal data and electric shock frequency domain signal data. The test data set is used for model testing and verification to ensure the generalization ability of the model.
[0099] S270: Establish a deep neural network model.
[0100] S280: Increase the proportion of electric shock signal data in the historical measurement data, input the historical measurement data into the deep neural network model, and train the deep neural network model.
[0101] S290: Inputting the real-time collected measurement data into the deep neural network model, and the deep neural network model determines whether the real-time collected measurement data contains electric shock signal data.
[0102] Optionally, based on the above embodiments, Figure 3 is a flow chart of another method for identifying an electric shock signal provided by an embodiment of the present invention. Figure 4 is a schematic diagram of a model training provided by an embodiment of the present invention, wherein historical measurement data is used as a source instance set and electric shock signal data is used as a target instance set. Figure 3 As shown, the method includes:
[0103] S300: Acquire historical measurement data, where the historical measurement data includes normal signal data and electric shock signal data; and clean the historical measurement data.
[0104] S310: Establish a deep neural network model.
[0105] S320: Divide the source instance set into a target similar set and a target dissimilar set; the target similar set is signal data in the source instance set that is similar to the target instance set, and the target dissimilar set is signal data in the source instance set that is dissimilar to the target instance set.
[0106] Specifically, in the power system, only a small amount of target labeled electric shock signal data is available for training. During training, electric shock signal recognition is to find the target instance set in the source instance set. It can be seen that the data scarcity of the target instance set leads to an extreme imbalance in the data between the source instance set and the target instance set, which may lead to over-adaptation in traditional feature alignment. In order to solve the data imbalance problem, such as Figure 4 As shown, the technical solution of the embodiment of the present invention proposes an asymmetric adaptation paradigm (AsyFOD), which can utilize the source instance set and the target instance set from different perspectives. Specifically, by using the target distribution estimation, AsyFOD first identifies the source instance set similar to the target instance set, which helps to increase the limited target instance set. The source instance set is divided into a target similar set and a target dissimilar set.
[0107] S330: Expand the target instance set using the target similarity set.
[0108] Specifically, Figure 4 As shown, the limited target instance set is expanded using the target similarity set.
[0109] S340: Asynchronously aligning the target dissimilar set and the expanded target instance set.
[0110] Specifically, Figure 4 As shown in Figure 1, the target dissimilar set in the source instance set and the expanded target instance set are asynchronously aligned. This method can effectively alleviate transition adaptation. To achieve data asymmetry adaptation, the most important thing is to make the model make up for the difference between the source instance set and the target instance set during training.
[0111] Conventional asynchronous alignment methods will reduce recognition capabilities when the source instance set and the target instance set are extremely asymmetric, that is, over-adaptation occurs. The model is limited to a limited set of target instances and is difficult to generalize to other unobserved instances, resulting in a reduction in the model's generalized recognition capabilities for electric shock signal features. The technical solution of the embodiment of the present invention provides an instance-level asynchronous alignment method, the key of which is to separate the gradient parameters during the model training process. Therefore, the technical solution of the embodiment of the present invention proposes a new alignment criterion, the formula of which is as follows:
[0112]
[0113] Among them, s represents the source instance set, o trepresents the target instance set, sg() represents the operation of stopping the gradient, Indicates alignment. Schematic formula for representing the alignment method. A small number of target instance sets are biased to represent the target distribution. The new alignment method relatively stabilizes the feature alignment process between the source instance set and the target instance set, reducing the interference caused by data bias.
[0114] In addition, the present invention also constructs a target similarity set to increase the target instance set to further alleviate the data imbalance problem. Therefore, the asynchronous alignment formula at the instance level is as follows:
[0115]
[0116] in, Represents the target similarity set.
[0117] S350: The deep neural network model is trained using a supervised training method for the recognition task; the supervised training method for the recognition task is that the deep neural network model only determines whether the signal data of the expanded target instance set is electric shock signal data during training.
[0118] Specifically, due to the domain shift between the source instance set and the target instance set, the classification supervision of the target dissimilar set will have a negative impact on the target specific feature learning. Therefore, the technical solution of the embodiment of the present invention forces the classifier to focus on target-specific information. In order to better perceive the boundary information, we use all bounding boxes for positioning without filtering, thus avoiding information errors in the filtering process.
[0119] The technical solution of the embodiment of the present invention can improve the model training method through two directions: asynchronous distributed alignment and supervised training for recognition tasks, thereby achieving asymmetric adaptation of small samples of data.
[0120] S360: Inputting the real-time collected measurement data into the deep neural network model, and the deep neural network model determines whether the real-time collected measurement data contains electric shock signal data.
[0121] Optionally, based on the above embodiments, Figure 5 is a flow chart of another method for identifying an electric shock signal provided by an embodiment of the present invention. Figure 6 is a schematic diagram of a deep neural network for recognizing electric shock signals provided by an embodiment of the present invention, such as Figure 5 As shown, the method includes:
[0122] S400: Acquire historical measurement data, where the historical measurement data includes normal signal data and electric shock signal data; and clean the historical measurement data.
[0123] S410: Establish a deep neural network model consisting of an input layer, a hidden layer and an output layer, wherein the input layer receives the measurement data input into the deep neural network model; the hidden layer performs feature extraction, feature amplification and feature difference amplification on the measurement data; and the output layer outputs the result of whether there is electric shock signal data.
[0124] Specifically, the deep neural network model adopts a multi-layer fully connected neural network structure, combined with a specific activation function and regularization strategy to meet the needs of electric shock signal recognition. The deep neural network model may include an input layer, multiple hidden layers, and an output layer. The input layer can determine the number of neurons in the input layer according to the length of the feature vector corresponding to the preprocessed measurement data. Each feature vector may include key information extracted from frequency domain signals such as voltage, current, or power. Multiple hidden layers are used to gradually extract and fuse high-level features in the signal. Each hidden layer contains a certain number of neurons, and the ReLU activation function is applied to increase the nonlinear ability of the model. Information is transmitted between hidden layers in a fully connected manner, allowing the model to learn complex feature representations. The output layer uses a single neuron and applies the Sigmoid activation function to map the output value to a range of 0 to 1, indicating the probability of the existence of an electric shock signal. And finally output a judgment with a higher probability. A deep neural network model is established, in which the input layer is a large biological electric shock feature signal, the dimension is consistent with the signal, and the output is a label value for determining whether there is a large biological electric shock signal, the dimension is 1, and it is a 0-1 variable.
[0125] The regularization strategy is to add a weight decay term to the loss function to penalize excessively large weight values, thereby limiting the complexity of the model.
[0126] S420: Increasing the proportion of electric shock signal data in the historical measurement data, inputting the historical measurement data into the deep neural network model, and training the deep neural network model.
[0127] S430: The deep neural network model extracts features from the measurement data collected in real time.
[0128] Specifically, Figure 6 As shown, considering that neural networks are more efficient in identifying obvious information, on the basis of the deep neural network model, the deep neural network model is disassembled into three stages, that is, the extraction-amplification-fusion network (EAFNet) is improved to ensure that the electric shock signal recognition model can realize signal recognition more efficiently.
[0129] In the recognition of electric shock signals, since electric shock signals and other fault signals have multi-dimensional similarities, the characteristics of electric shock signals are not absolutely unique, so it is difficult for deep neural network models to achieve accurate judgment. We need to make certain structural changes to the deep neural network model and break down the single training into three steps. First, in the extraction stage, the technical solution of the embodiment of the present invention uses an effective deep neural network model to extract features of the electric shock signal in the frequency domain.
[0130] S440: Extract the maximum value of the length, width and channel size of the feature point mapping containing the electric shock signal data.
[0131] Specifically, Figure 6 As shown, the extracted electric shock feature is then amplified. The technical solution of the embodiment of the present invention designs an electric shock feature amplification module to amplify the extracted features. When the electric shock feature appears in the distribution network, it is a tiny signal for the entire distribution network. However, simply reducing the locking range and relatively amplifying the electric shock feature signal cannot effectively solve the problem of electric shock signal identification, and will increase the amount of calculation. Therefore, the technical solution of the embodiment of the present invention only amplifies the tiny electric shock signal features, and designs a tiny feature amplification (TFA) module. This module is divided into three stages: background suppression-target filtering-target amplification.
[0132] In the background suppression stage, the technical solution of the embodiment of the present invention extracts the maximum values of the length, width and channel size of the electric shock feature map. The purpose is to extract feature points containing more electric shock accident information and to suppress background information to a certain extent (features of the location where the electric shock accident did not occur when the electric shock accident occurred). The process can be described as:
[0133]
[0134] in, Represents a data set of dimensions c1×h1×w1, which conforms to F i The multi-dimensional feature points are the feature points of real-time measurement data.
[0135] The output after the background suppression stage is:
[0136]
[0137] Among them, the multi-dimensional feature points that meet F1 are the feature points of the electric shock data information.
[0138] The overall calculation formula can be:
[0139] F1=Ep H×w (max x F i )+Ep H×w (maxy F i )+Conv 1x1 (max z F i )
[0140] Among them, Ep H×w Indicates the size of converting the electric shock signal into Hxw dimensions, max x 、max y and max z Indicates taking the maximum value on dimensions x, y and z, Conv 1x1 Indicates that a convolution operation is performed on a 1×1 dimension.
[0141] Then add the Sigmoid activation function after the convolution, which can be expressed as:
[0142]
[0143] F2=Sig(Conv x1 F1)+Sig(Conv x2 F1)+Sig(Conv x3 F1)+Sig(Conv x4 F1)
[0144] Among them, Sig represents the Sigmoid activation function, x1, x2, x3, x4 represent the extracted electric shock signal features, and F2 scales the value of F1.
[0145] S450: Filtering the feature points containing the electric shock signal data.
[0146] Specifically, Figure 6 As shown, the feature points of the electric shock accident information are filtered.
[0147] S460: Use dilated convolution with a continuously increasing dilation coefficient to enlarge feature points containing the electric shock signal data.
[0148] Specifically, Figure 6 As shown, in the feature amplification stage, the technical solution of the embodiment of the present invention uses a dilated convolution with a continuously increasing dilation coefficient to amplify the electric shock signal feature. The dilated convolution can increase the receiving field while maintaining the resolution of the electric shock signal. The continuously increasing dilation factor can better convert local features into global features, thereby achieving feature amplification. The calculation formula is:
[0149] F o =Dc3{Dc2[Dc1(F2)]},
[0150] Among them, Dc1, Dc2 and Dc3 indicate that the convolution kernel is 3×3, and the expansion rates are 1, 2 and 3 respectively. F0 is the value obtained after the expansion convolution of F2.
[0151] S470: Using the TinyReLU activation function, the difference between the feature points containing the electric shock signal data and the feature points not containing the electric shock signal data is enlarged.
[0152] Specifically, Figure 6 As shown, in order to increase the contrast between the target and its environment, that is, to increase the contrast between the electric shock signal and the signals of other nodes, branches, and devices in the distribution network when an accident occurs. The technical solution of the embodiment of the present invention proposes a new activation function TinyReLU. TinyReLU and its derivative function can be expressed as:
[0153]
[0154] Among them, α represents the weight coefficient.
[0155] Finally, in the fusion stage, the technical solution of the embodiment of the present invention proposes an activation function TinyReLU to enhance the contrast between the electric shock feature and the background. When the input is positive, the gradient of TinyReLU is always greater than 0. The difference between different input and output is greater than the difference of the ReLU function. This enlarges the difference between the feature points containing the electric shock signal information and the feature points that do not contain the electric shock signal information, thereby increasing the contrast between the electric shock signal and the background. This is very beneficial for identifying the features at the junction of the electric shock signal and the background. When the input is negative, the TinyRelu function is an exponential function, which makes the average value of the overall output closer to 0. The anti-interference ability and robustness of the model are further improved. When the input is very small, the output saturates to a negative value, reducing the variance of the forward propagation.
[0156] S480: The deep neural network model determines whether there is electric shock signal data in the real-time collected measurement data based on the difference between the feature points containing the electric shock signal data and the feature points not containing the electric shock signal data and the feature points containing the electric shock signal data after amplification.
[0157] The technical solution of the embodiment of the present invention decomposes the deep neural network model into three stages, namely, improving the extraction-amplification-fusion network (EAFNet), and proposes a small sample detection model and an asymmetric sample adaptive training method, which can effectively realize the accurate identification of electric shock signals when the existing electric shock signal features are not obvious and the samples are insufficient, reduce the probability of misjudgment, and provide an efficient solution for electric shock signal identification.
[0158] Optionally, based on the above embodiments, Figure 7is a flow chart of another method for identifying an electric shock signal provided by an embodiment of the present invention, such as Figure 7 As shown, the method includes:
[0159] S500: Acquire historical measurement data, where the historical measurement data includes normal signal data and electric shock signal data; and clean the historical measurement data.
[0160] S510: Establish a deep neural network model.
[0161] S520: Increase the proportion of electric shock signal data in the historical measurement data, input the historical measurement data into the deep neural network model, and train the deep neural network model; during the training of the deep neural network model, input the historical measurement data into the deep neural network model, and evaluate the performance of the deep neural network model; evaluating the performance of the deep neural network model includes calculating the loss function value based on the historical measurement data.
[0162] Specifically, the training of the deep neural network model is divided into multiple cycles. After each training cycle, the performance of the deep neural network model needs to be evaluated. The test data set is input into the deep neural network model to evaluate the performance of the deep neural network model; the performance evaluation of the deep neural network model includes calculating the loss function value based on historical measurement data.
[0163] S530: If the loss function value does not change according to the first change trend, stop training the deep neural network model.
[0164] Specifically, the loss function value and accuracy on the validation data set are monitored during the training process, and the validation data set is the test data set. If the loss function value does not change according to the first change trend, that is, the loss on the validation set does not improve within a certain round, the training of the deep neural network model is stopped. The first change trend is preset according to the actual situation.
[0165] S540: Input historical measurement data into the deep neural network model to test the deep neural network model.
[0166] Specifically, the proposed electric shock signal recognition model is trained using the cleaned and transformed historical measurement data, and double samples are used for testing to fully simulate the recognition accuracy of large-scale biological electric shock accidents in actual distribution networks. Seventy percent of the historical measurement data is selected as the training data set, and thirty percent of the historical measurement data is selected as the test data set. After the training is completed, the model is tested using the test data set.
[0167] In order to more accurately verify the recognition effect of the deep neural network model, in addition to the original test data set, 50% of the data in the test data set was replaced with electric shock signal data, and a second test was conducted to compare the results of the two recognitions to ensure the accuracy of the recognition model.
[0168] S550: Inputting the real-time collected measurement data into the deep neural network model, and the deep neural network model determines whether the real-time collected measurement data contains electric shock signal data.
[0169] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0170] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for identifying an electric shock signal, characterized in that: include: Acquiring historical measurement data, wherein the historical measurement data includes normal signal data and electric shock signal data; Performing cleaning processing on the historical measurement data; Build deep neural network models; Increasing the proportion of the electric shock signal data in the historical measurement data, inputting the historical measurement data into the deep neural network model, and training the deep neural network model; The real-time collected measurement data is input into the deep neural network model, and the deep neural network model determines whether the real-time collected measurement data contains electric shock signal data.
2. The method for identifying electric shock signals according to claim 1, characterized in that: Obtain historical measurement data, including: Acquiring current data, voltage data, power data, frequency data and electric shock tag data, wherein the electric shock tag data includes electric shock location and electric shock time; All acquired data are mapped into a data chain in time sequence.
3. The method for identifying electric shock signals according to claim 1, characterized in that: The historical measurement data is cleaned, including: Performing data anomaly analysis on the historical measurement data to identify data noise points and data missing points; Filling the data missing points with measurement values, and using the filled measurement values as data noise points; The data noise points are replaced with measured values.
4. The method for identifying electric shock signals according to claim 3, characterized in that: After the historical measurement data is cleaned, the method further includes: Marking the electric shock signal data in the historical measurement data with an electric shock signal label, and marking the normal signal data in the historical measurement data with a normal signal label; The historical measurement data is converted into time-frequency domain data using Fourier transform.
5. The method for identifying electric shock signals according to claim 1, characterized in that: The historical measurement data is used as a source instance set, the electric shock signal data is used as a target instance set, the proportion of the electric shock signal data in the historical measurement data is increased, the historical measurement data is input into the deep neural network model, and the deep neural network model is trained, including: Dividing the source instance set into a target similar set and a target dissimilar set; the target similar set is signal data in the source instance set that is similar to the target instance set, and the target dissimilar set is signal data in the source instance set that is dissimilar to the target instance set; Expanding the target instance set using the target similarity set; Asynchronously aligning the target dissimilar set and the expanded target instance set; The deep neural network model is trained by adopting a supervised training method of the recognition task; the supervised training method of the recognition task is that the deep neural network model only determines whether the signal data of the expanded target instance set is electric shock signal data during training.
6. The method for identifying electric shock signals according to claim 1, characterized in that: Increasing the proportion of the electric shock signal data in the historical measurement data, inputting the historical measurement data into the deep neural network model, and after training the deep neural network model, further comprising: The historical measurement data is input into the deep neural network model to test the deep neural network model.
7. The method for identifying electric shock signals according to claim 1, characterized in that: The deep neural network model determines whether the real-time collected measurement data contains electric shock signal data, including: The deep neural network model performs feature extraction on the measurement data collected in real time; The deep neural network model amplifies the feature points containing the electric shock signal data; Using the TinyReLU activation function, the difference between the feature points containing the electric shock signal data and the feature points not containing the electric shock signal data is enlarged; The deep neural network model determines whether the measurement data collected in real time contains electric shock signal data based on the difference between the feature points containing electric shock signal data and the feature points not containing electric shock signal data and the feature points containing electric shock signal data after amplification.
8. The method for identifying electric shock signals according to claim 7, characterized in that: The deep neural network model performs a magnification process on the feature points containing the electric shock signal data, including: Extracting the maximum value of the length, width and channel size of the feature point map containing the electric shock signal data; Performing filtering on feature points containing electric shock signal data; The feature points containing the electric shock signal data are enlarged using dilated convolution with continuously increasing dilation coefficients.
9. The method for identifying electric shock signals according to claim 1, characterized in that: Inputting the historical measurement data into the deep neural network model to train the deep neural network model includes: In the process of training the deep neural network model, the historical measurement data is input into the deep neural network model to evaluate the performance of the deep neural network model; the performance evaluation of the deep neural network model includes calculating the loss function value according to the historical measurement data; If the loss function value does not change according to the first change trend, the training of the deep neural network model is stopped.
10. The method for identifying electric shock signals according to claim 1, characterized in that: Build a deep neural network model, including: A deep neural network model consisting of an input layer, a hidden layer and an output layer is established, wherein the input layer receives measurement data input into the deep neural network model; the hidden layer performs feature extraction, feature amplification and feature difference amplification on the measurement data; and the output layer outputs the result of whether there is electric shock signal data.