Power distribution equipment fault detection method and device, terminal equipment and storage medium
By performing feature vector extraction and abnormal detection models for distribution equipment, the degree of abnormality and risk urgency of equipment are accurately detected, and the problem of excessive response range in the prior art is solved, and accurate abnormal warning is achieved.
Patent Information
- Application Number
- CN202411819975.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-03-21
AI Technical Summary
The prior art fails to pay attention to the degree of equipment abnormality and the risk urgency of abnormality in the detection of power distribution equipment in the detection of faults of power distribution equipment, resulting in the abnormal response range being too large and the inability to accurately respond to abnormalities of varying degrees and risk urgency.
By obtaining the characteristic vector of the power distribution equipment, input it to the trained anomaly detection model for abnormality detection, output the status prediction probability result, determine the predicted state of the equipment, and trigger the corresponding abnormality warning mechanism based on the predicted state and fault risk level.
Accurate detection of abnormalities in distribution equipment is achieved, focusing on the degree of abnormalities and risk urgency, and triggering an accurate warning mechanism, avoiding unnecessary responses and waste of resources.
Smart Images

Figure CN119669906A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power distribution equipment fault warning, and in particular to a power distribution equipment fault detection method, device, terminal equipment and storage medium. Background Art
[0002] With the rapid transformation of power systems towards intelligence and digitalization, distribution networks are facing increasing complexity and real-time requirements. In the field of fault detection of distribution equipment, not all abnormalities of distribution equipment will pose a threat to the distribution system, and not all abnormalities require timely response. Existing technologies generally only detect whether the distribution equipment is abnormal, and do not pay attention to the degree of equipment abnormality and the risk urgency of the abnormality. This results in almost all abnormalities generating the same abnormal response, the range of abnormal response is too large, and it is impossible to accurately respond to abnormalities of different degrees and risk urgency. Summary of the invention
[0003] The present invention provides a method, an apparatus, a terminal device and a storage medium for detecting faults of a power distribution device, so as to solve the technical problem that the prior art does not pay attention to the degree of equipment abnormality and the risk urgency of the abnormality.
[0004] In order to solve the above technical problems, an embodiment of the present invention provides a method for detecting a fault of a power distribution device, comprising:
[0005] Acquire a feature vector of a power distribution device; wherein the feature vector is obtained by extracting features from operating data of the power distribution device;
[0006] The feature vector is input into a trained power distribution equipment anomaly detection model, so that the power distribution equipment anomaly detection model performs anomaly detection on the power distribution equipment according to the feature vector, and outputs a state prediction probability result; wherein the state prediction probability result includes: normal probability, slight abnormal probability, moderate abnormal probability and severe abnormal probability;
[0007] Determine the predicted state of the power distribution equipment according to the state prediction probability result; wherein the types of the predicted state include: normal, slightly abnormal, moderately abnormal and severely abnormal;
[0008] When the predicted state is not normal, determining a corresponding state target feature vector according to the predicted state;
[0009] Determining a fault risk level corresponding to the predicted state according to the feature vector and the state target feature vector;
[0010] According to the state prediction result and the corresponding fault risk level, a corresponding abnormal warning mechanism is triggered.
[0011] As a preferred solution, the step of obtaining a characteristic vector of the power distribution equipment includes:
[0012] Acquiring operation data of the power distribution equipment;
[0013] Using a multi-scale feature extraction method based on wavelet transform, performing preliminary feature extraction on the operation data to obtain an initial feature vector;
[0014] The principal component analysis method is used to perform dimension reduction processing on the initial feature vector to obtain the feature vector.
[0015] As a preferred solution, the training process of the power distribution equipment anomaly detection model includes:
[0016] Acquire several sample feature vectors and corresponding labels; wherein the sample feature vectors are obtained by feature extraction from historical operation data of the power distribution equipment; the categories of the labels include: normal, slightly abnormal, moderately abnormal, and severely abnormal;
[0017] The sample feature vector is input into the constructed power distribution equipment anomaly detection model, so that the power distribution equipment anomaly detection model performs anomaly detection according to the sample feature vector and outputs a sample state prediction probability result; the state prediction probability result includes: sample normal probability, sample mild abnormal probability, sample moderate abnormal probability and sample severe abnormal probability;
[0018] Calculate the loss function value according to the sample feature vector, the sample state prediction probability result and the corresponding label;
[0019] According to the loss function value, adjusting the parameters of the power distribution equipment anomaly detection model to obtain a trained power distribution equipment anomaly detection model;
[0020] Among them, the loss function of the power distribution equipment anomaly detection model is:
[0021]
[0022] Where E represents the loss function value; y c Indicates the label value; if the label is normal, y1=1, y2=0, y3=0, y4=0; if the label is slightly abnormal, y1=0, y2=1, y3=0, y4=0; if the label is moderately abnormal, y1=0, y2=0, y3=1, y4=0; if the label is severely abnormal, y1=0, y2=0, y3=0, y4=1; Indicates the state prediction probability result; represents the probability that the sample is normal; Indicates the probability of a sample being slightly abnormal; Indicates the probability of moderate abnormality in the sample; Indicates the probability of serious abnormality of the sample; is the penalty coefficient; F P represents the sample feature vector; F target,1 The target feature vector representing the normal state; F target,2 The target feature vector representing the mild abnormal state; F target,3 The target feature vector representing the moderate abnormal state; F target,4 Target feature vector representing severe abnormal conditions.
[0023] As a preferred solution, the power distribution equipment fault detection method further includes:
[0024] Calculate a first state variable according to the state prediction probability result and the characteristic vector, and determine a corresponding first adjustment instruction;
[0025] Use the Q-value learning algorithm to minimize power loss and maximize system stability as the optimization goal, and determine the Q-value update formula;
[0026] Calculating a first Q value according to the first state variable and a first adjustment instruction;
[0027] According to the Q value update formula, the first Q value is updated to obtain a second Q value;
[0028] Determining a corresponding second adjustment instruction according to the second Q value;
[0029] adjusting the power distribution equipment according to the second adjustment instruction;
[0030] Wherein, the Q value update formula is:
[0031] Q2(s,a2)=Q1(s,a1)+α[r+γmax a′ Q(s′,a′)-Q1(s,a1)];
[0032] In the formula, Q2(s,a2) represents the second Q value; s represents the first state variable; a2 represents the second adjustment instruction; Q1(s,a1) represents the first Q value; a1 represents the first adjustment instruction; α is the learning rate; r represents the feedback reward obtained after executing the adjustment instruction; γ is the discount factor; s′ represents the state variable at the next moment; a′ represents the adjustment instruction to be executed in the next step; Q(s′,a′) represents the Q value calculated after executing the adjustment instruction under the state variable at the next moment.
[0033] As a preferred solution, the power distribution equipment fault detection method further includes:
[0034] Acquire a second state variable after executing the second adjustment instruction;
[0035] determining a feedback signal according to the first state variable and the second state variable;
[0036] updating the learning rate according to the first state variable, the second state variable and a feedback signal;
[0037] Among them, the update formula of the learning rate is:
[0038]
[0039] In the formula, α t+1 represents the updated learning rate; α t represents the learning rate before updating; s t represents the first state variable; s t+1 represents the second state variable; η is the coefficient for controlling the adjustment of the learning rate; f t Indicates feedback signal.
[0040] As a preferred solution, the calculation formula for the feedback reward is:
[0041] r=-(|VV ref |+|II ref |);
[0042] Where V ref Indicates the voltage reference value of the power distribution equipment; I ref It represents the current reference value of the power distribution equipment; V represents the voltage after the adjustment instruction is executed; I represents the current after the adjustment instruction is executed.
[0043] As a preferred solution, determining the fault risk level corresponding to the predicted state according to the feature vector and the state target feature vector includes:
[0044] Calculating the difference between the feature vector and the state target feature vector;
[0045] According to the difference, the fault risk level corresponding to the predicted state is determined by a fault risk level function; wherein the value of the fault risk level is 1, 2, 3 or 4; when the fault risk level is 1, it indicates a low risk level; when the fault risk level is 2, it indicates a medium risk level; when the fault risk level is 3, it indicates a high risk level; when the fault risk level is 4, it indicates an emergency level;
[0046] Wherein, the fault risk level function is:
[0047]
[0048] In the formula, δ fault_level represents the value of the fault risk level; D represents the difference between the feature vector and the state target feature vector; θ1, θ2 and θ3 are different risk level thresholds.
[0049] Based on the above embodiment, another embodiment of the present invention provides a power distribution equipment fault detection device, including: a data acquisition module, an abnormality detection module and an abnormality warning module;
[0050] The data acquisition module is used to acquire a feature vector of the power distribution equipment; wherein the feature vector is obtained by extracting the operating data of the power distribution equipment;
[0051] The anomaly detection module is used to input the feature vector into a trained power distribution equipment anomaly detection model, so that the power distribution equipment anomaly detection model performs anomaly detection on the power distribution equipment according to the feature vector, and outputs a state prediction probability result; wherein the state prediction probability result includes: normal probability, slight abnormality probability, moderate abnormality probability and severe abnormality probability; according to the state prediction probability result, determine the predicted state of the power distribution equipment; wherein the types of the predicted state include: normal, slight abnormality, moderate abnormality and severe abnormality;
[0052] The abnormal warning module is used to determine the corresponding state target feature vector according to the predicted state when the predicted state is not normal; determine the fault risk level corresponding to the predicted state according to the feature vector and the state target feature vector; and trigger the corresponding abnormal warning mechanism according to the state prediction result and the corresponding fault risk level.
[0053] Based on the above embodiments, another embodiment of the present invention provides a terminal device, which includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and when the processor executes the computer program, the distribution equipment fault detection method described in the above invention embodiment is implemented.
[0054] Based on the above embodiments, another embodiment of the present invention provides a storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the storage medium is located is controlled to execute the distribution equipment fault detection method described in the above invention embodiment.
[0055] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0056] The present invention obtains a feature vector of a power distribution device; inputs the feature vector into a trained power distribution device anomaly detection model, so that the power distribution device anomaly detection model performs anomaly detection on the power distribution device according to the feature vector, and outputs a state prediction probability result; determines the predicted state of the power distribution device according to the state prediction probability result; wherein the types of the predicted state include: normal, mild abnormality, moderate abnormality, and severe abnormality; when the predicted state is not normal, determines the corresponding state target feature vector according to the predicted state; determines the fault risk level corresponding to the predicted state according to the feature vector and the state target feature vector; triggers the corresponding abnormal warning mechanism according to the state prediction result and the corresponding fault risk level. When performing abnormality detection on the power distribution device, the present invention pays attention to the degree of equipment abnormality and the risk urgency of the abnormality, determines the type of abnormality and the fault risk level, and realizes accurate detection of abnormalities on the power distribution device. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 It is a flow chart of a method for detecting a fault of a power distribution device provided by an embodiment of the present invention;
[0058] Figure 2 It is a structural schematic diagram of a power distribution equipment fault detection device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0059] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions 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 are within the scope of protection of the present invention.
[0060] Embodiment 1
[0061] Please refer to Figure 1 , is a flow chart of a method for detecting a fault in a power distribution device provided by an embodiment of the present invention, comprising:
[0062] S1. Obtain a feature vector of a power distribution device; wherein the feature vector is obtained by extracting features from operating data of the power distribution device.
[0063] It should be noted that the operating data of the distribution equipment generally refers to key parameters such as voltage, current and temperature of the distribution equipment.
[0064] It should be noted that the present invention adopts an adaptive sampling strategy to dynamically adjust the sampling frequency according to the load fluctuation of the power distribution equipment. When the power distribution equipment is working under high load, the sampling frequency is increased to obtain more meter-level data. The calculation formula of the sampling frequency is:
[0065]
[0066] In the formula, f s Indicates the real-time sampling frequency; f base represents the basic sampling frequency; α is the sampling frequency adjustment coefficient; P avg represents the average power; δP represents the current load fluctuation, that is, the instantaneous power relative to the average power P avg The difference.
[0067] Next, the present invention continues to perform noise reduction preprocessing on the sampled data to reduce the influence of redundant noise in data transmission. The present invention uses Gaussian filtering to achieve noise reduction processing:
[0068] X filtered (t) = X(t)*G σ (t), t=1,2,3,...,n;
[0069] X(t)=[V(t),I(t),T(t)],t=1,2,3,...,n;
[0070] In the formula, X filtered (t) represents the signal data after noise reduction processing; X(t) represents the sampled signal data; t represents the time point of the current sampling; G σ (t) represents Gaussian filter; σ represents filter bandwidth; V(t) represents voltage parameter; I(t) represents power parameter; T(t) represents temperature parameter.
[0071] By adaptively adjusting the sampling frequency and preliminary noise reduction preprocessing, it can be ensured that each sampling point efficiently reflects the status of the power distribution equipment, reducing the pressure of subsequent data processing.
[0072] In a preferred embodiment, the step of obtaining a characteristic vector of the power distribution equipment includes:
[0073] Acquiring operation data of the power distribution equipment;
[0074] Using a multi-scale feature extraction method based on wavelet transform, performing preliminary feature extraction on the operation data to obtain an initial feature vector;
[0075] The principal component analysis method is used to perform dimension reduction processing on the initial feature vector to obtain the feature vector.
[0076] In this embodiment, signal features are extracted by wavelet transform and principal component analysis, and the device status information is captured at multiple scales and redundant features are removed. The signal is decomposed by discrete wavelet transform. In the selection of wavelet function, Daubechies wavelet or Symlet wavelet is selected based on the characteristics of power distribution system data to ensure that the high-frequency and low-frequency features in the signal can be accurately captured. The signal data after wavelet transformation can be expressed as:
[0077]
[0078] Where W j (t) represents the detail coefficient of the jth layer, which is used to reveal the mutation information of the signal; A j (t) represents the approximation coefficient of the jth layer, which is used to represent the smooth part of the signal; Ψ j (t) represents the detail wavelet function of the jth layer; φ j (t) represents the approximate wavelet function of the jth layer; J represents the total number of layers.
[0079] Through wavelet transformation, the characteristics of power distribution equipment at different frequencies and time scales can be captured. The signal after each level of wavelet decomposition has corresponding energy, which can be used as a feature to reflect the state of power distribution equipment. Define the energy feature vector E j Represents the energy information of the j-th layer wavelet decomposition:
[0080] E j =∑ t |W j (t)| 2 ;
[0081] Therefore, the initial feature vector F = [E1, E2, ..., E J ] represents the energy distribution at different scales.
[0082] In order to reduce the redundant information of the initial eigenvector F and improve the calculation efficiency, the principal component analysis method is used to reduce the dimension of the initial eigenvector, with the goal of retaining 90% of the energy cumulative contribution rate and removing redundant dimensions. The calculation formula for the result after dimensionality reduction is:
[0083] F PCA =F·W PCA =[f1,f2,...,f d ];
[0084] Where W PCA represents the PCA dimension reduction matrix; d represents F PCA Dimension.
[0085] S2. Input the feature vector into a trained abnormality detection model for power distribution equipment, so that the abnormality detection model for power distribution equipment performs abnormality detection on the power distribution equipment according to the feature vector, and outputs a state prediction probability result; wherein the state prediction probability result includes: normal probability, mild abnormality probability, moderate abnormality probability and severe abnormality probability.
[0086] In this embodiment, the power distribution equipment anomaly detection model is used to classify the feature data and evaluate the state of the equipment in real time. During the classification process, the output of the power distribution equipment anomaly detection model is probabilistically processed by a function to obtain the probability of each state:
[0087]
[0088] In the formula, z c Represents the activation value of category c; when c=1, it represents the normal category; when c=2, it represents the mild abnormal category; when c=3, it represents the moderate abnormal category; when c=4, it represents the severe abnormal category.
[0089] It should be noted that the distribution equipment anomaly detection model dynamically adjusts the sensitivity and learning rate through a feedback mechanism to ensure timely detection of potential faults when the status of the distribution equipment changes.
[0090] The implementation process of the feedback mechanism is described in detail below:
[0091] (1) Error calculation and feedback signal generation:
[0092] The feedback signal is generated by error calculation. For each time t, the system calculates the error based on the predicted output and the actual system state category label:
[0093]
[0094] Where e(t) represents the deviation between the current prediction and the actual state.
[0095] The feedback signal is directly generated from the error e(t) and serves as the basis for subsequent adjustments to the model.
[0096] (2) Sensitivity coefficient adjustment:
[0097] The sensitivity coefficient directly affects the model's ability to detect minor anomalies. When e(t) is large, increase the sensitivity to enhance the detection effect; when e(t) is small, reduce the sensitivity to prevent false alarms. The sensitivity adjustment formula is:
[0098] α(t+1)=α(t)+μ·e(t);
[0099] Where α represents the sensitivity; μ is the feedback gain coefficient, which controls the speed of sensitivity adjustment.
[0100] (3) Dynamic adjustment of threshold:
[0101] The detection threshold θ used subsequently can change dynamically with the error, so as to flexibly adjust the severity of anomaly detection under different conditions. The detection threshold adjustment formula is:
[0102] θ(t+1)=θ(t)-τ·e(t);
[0103] Wherein, τ represents the threshold adjustment coefficient, which is used to balance the amplitude of threshold adjustment.
[0104] (4) Adaptive learning rate:
[0105] The adaptive learning rate is used to adjust the model update speed. When the feedback error is large, the learning rate increases to speed up the adjustment of the model; when the error is small, the learning rate decreases to keep the model stable.
[0106] Learning Rate The update formula is:
[0107]
[0108] In the formula, represents the learning rate; ρ is the learning rate adjustment coefficient, which controls the rate of change of the learning rate.
[0109] Through dynamic adjustment of the adaptive learning rate, the system can quickly adjust model parameters under large fluctuations and gradually converge under stable conditions to achieve more stable anomaly detection and fault prediction.
[0110] In a preferred embodiment, the training process of the power distribution equipment anomaly detection model includes:
[0111] Acquire several sample feature vectors and corresponding labels; wherein the sample feature vectors are obtained by feature extraction from historical operation data of the power distribution equipment; the categories of the labels include: normal, slightly abnormal, moderately abnormal, and severely abnormal;
[0112] The sample feature vector is input into the constructed power distribution equipment anomaly detection model, so that the power distribution equipment anomaly detection model performs anomaly detection according to the sample feature vector and outputs a sample state prediction probability result; the state prediction probability result includes: sample normal probability, sample mild abnormal probability, sample moderate abnormal probability and sample severe abnormal probability;
[0113] Calculate the loss function value according to the sample feature vector, the sample state prediction probability result and the corresponding label;
[0114] According to the loss function value, adjusting the parameters of the power distribution equipment anomaly detection model to obtain a trained power distribution equipment anomaly detection model;
[0115] Among them, the loss function of the power distribution equipment anomaly detection model is:
[0116]
[0117] Where E represents the loss function value; y c Indicates the label value; if the label is normal, y1=1, y2=0, y3=0, y4=0; if the label is slightly abnormal, y1=0, y2=1, y3=0, y4=0; if the label is moderately abnormal, y1=0, y2=0, y3=1, y4=0; if the label is severely abnormal, y1=0, y2=0, y3=0, y4=1; Indicates the state prediction probability result; represents the probability that the sample is normal; Indicates the probability of a sample being slightly abnormal; Indicates the probability of moderate abnormality in the sample; Indicates the probability of serious abnormality of the sample; is the penalty coefficient; F P represents the sample feature vector; F target,1 The target feature vector representing the normal state; F target,2 The target feature vector representing the mild abnormal state; F target,3 The target feature vector representing the moderate abnormal state; F target,4 Target feature vector representing severe abnormal conditions.
[0118] It should be noted that the training samples of the distribution equipment anomaly detection model are mainly derived from the historical operation data of the distribution equipment. These data are processed by multi-scale wavelet transform and PCA dimensionality reduction in the feature extraction stage to generate sample feature vectors for model training. Each training sample is labeled by the fluctuation characteristics of historical data and the equipment operation log, and classified into four states: normal, slightly abnormal, moderately abnormal, and severely abnormal. For example, when the fluctuation of voltage and current exceeds the threshold and is accompanied by abnormal equipment temperature, the state is labeled as "severely abnormal". Each category has its own target feature vector.
[0119] S3. Determine the predicted state of the power distribution equipment according to the state prediction probability result; wherein the types of the predicted state include: normal, slightly abnormal, moderately abnormal and severely abnormal.
[0120] S4. When the predicted state is not normal, determine the corresponding state target feature vector according to the predicted state; determine the fault risk level corresponding to the predicted state according to the feature vector and the state target feature vector; trigger the corresponding abnormal warning mechanism according to the state prediction result and the corresponding fault risk level.
[0121] In a preferred embodiment, the power distribution equipment fault detection method further includes:
[0122] Calculate a first state variable according to the state prediction probability result and the characteristic vector, and determine a corresponding first adjustment instruction;
[0123] Use the Q-value learning algorithm to minimize power loss and maximize system stability as the optimization goal, and determine the Q-value update formula;
[0124] Calculating a first Q value according to the first state variable and a first adjustment instruction;
[0125] According to the Q value update formula, the first Q value is updated to obtain a second Q value;
[0126] Determining a corresponding second adjustment instruction according to the second Q value;
[0127] adjusting the power distribution equipment according to the second adjustment instruction;
[0128] Wherein, the Q value update formula is:
[0129] Q2(s,a2)=Q1(s,a1)+α[r+γmax a′ Q(s′,a′)-Q1(s,a1)];
[0130] In the formula, Q2(s,a2) represents the second Q value; s represents the first state variable; a2 represents the second adjustment instruction; Q1(s,a1) represents the first Q value; a1 represents the first adjustment instruction; α is the learning rate; r represents the feedback reward obtained after executing the adjustment instruction; γ is the discount factor; s′ represents the state variable at the next moment; a′ represents the adjustment instruction to be executed in the next step; Q(s′,a′) represents the Q value calculated after executing the adjustment instruction under the state variable at the next moment.
[0131] In this embodiment, the parameters of the power distribution equipment are adaptively adjusted based on the Q learning algorithm, mainly adjusting the voltage and current parameters of the power distribution equipment. The present invention maps the output result of the power distribution equipment anomaly detection model combined with the feature vector into the state variable s in the Q learning algorithm:
[0132]
[0133] Where s represents the state variable, which indicates the current voltage, current, temperature, and system status; g(·) represents the state mapping function, which is used to integrate the model output results and feature vectors.
[0134] The action a of Q learning represents the instruction for adjusting the voltage and current. The optimization goal of Q value learning is to find the optimal action a under each state s to minimize power loss and fluctuation and maximize system stability. The feedback reward r represents the feedback reward obtained after executing the adjustment instruction, which is defined here as the degree to which the adjusted voltage and current are close to the target value. The discount factor γ is used to balance the current reward with the future reward.
[0135] In a preferred embodiment, the power distribution equipment fault detection method further includes:
[0136] Acquire a second state variable after executing the second adjustment instruction;
[0137] determining a feedback signal according to the first state variable and the second state variable;
[0138] updating the learning rate according to the first state variable, the second state variable and a feedback signal;
[0139] Among them, the update formula of the learning rate is:
[0140]
[0141] In the formula, α t+1 represents the updated learning rate; α t represents the learning rate before updating; s t represents the first state variable; s t+1 represents the second state variable; η is the coefficient for controlling the adjustment of the learning rate; f t Indicates feedback signal.
[0142] It should be noted that the present invention also introduces an adaptive learning rate mechanism based on the Q learning algorithm. The core is to optimize the learning rate □ by introducing feedback signals and dynamic adjustment of system states, so as to adjust the abnormal response speed of the power distribution system and improve the regulation accuracy and feedback efficiency. The significance of this dynamic optimization learning rate method is that it not only improves the adaptive ability of the system, but also enables it to flexibly adjust parameters according to environmental changes. Therefore, the system can quickly converge to the optimal strategy when dealing with complex power loads and environmental changes, reduce voltage and current fluctuations, reduce power losses, and ultimately improve the reliability and overall performance of the intelligent power distribution system.
[0143] The parameter η is used to adjust the speed of system response. t and t+1Represent the state of the system at the current time t and the next time t+1 respectively, and these states are represented by relevant characteristics such as voltage, current, and load. t It can be understood as a collection of the system's current voltage, current and other key parameters that affect system operation. t+1 -s t | reflects the magnitude of the change in the system between two consecutive moments. A large state change indicates a large fluctuation in voltage or current, and the system may be adjusted more drastically. In this case, the learning rate needs to be large to ensure that the system can respond quickly to these changes. When the state change is small, that is, s t+1 and t The difference is small, the system tends to be stable, and the learning rate should be appropriately reduced to prevent the system from over-adjusting, so as to achieve stable convergence of the system.
[0144] Feedback signal f t The function of is to introduce the current regulation effect of the system into the learning rate adjustment process. The value of this parameter is based on the real-time operating status of the system. When the system feedback shows that the regulation effect is poor, the feedback signal f t When the system takes a larger positive value, the system will show high power loss and large voltage fluctuation. At this time, the change amplitude of the system state will increase, and the adjustment amplitude of the learning rate η will increase accordingly, allowing the system to respond quickly and make larger adjustments. Conversely, when the system feedback shows that the adjustment effect is good, the feedback signal takes a smaller value, that is, the state change|s t+1 -s t | is smaller, the adjustment range of the learning rate is reduced, the system tends to be stable and gradually converges to the optimal state.
[0145] In a preferred embodiment, the calculation formula of the feedback reward is:
[0146] r=-(|VV ref |+|II ref |);
[0147] Where V ref Indicates the voltage reference value of the power distribution equipment; I ref It represents the current reference value of the power distribution equipment; V represents the voltage after the adjustment instruction is executed; I represents the current after the adjustment instruction is executed.
[0148] It should be noted that the introduction of feedback rewards makes Q-value learning more inclined to adjust voltage and current to minimize their deviation, thereby achieving adaptive regulation. When the load on the distribution line is detected to be increased, the system will automatically adjust the corresponding voltage and power distribution parameters to reduce the risk of overheating or overload. This adaptive optimization control enables the system to maintain a stable power supply effect when the equipment environment or load changes.
[0149] In a preferred embodiment, determining the fault risk level corresponding to the predicted state according to the feature vector and the state target feature vector includes:
[0150] Calculating the difference between the feature vector and the state target feature vector;
[0151] According to the difference, the fault risk level corresponding to the predicted state is determined by a fault risk level function; wherein the value of the fault risk level is 1, 2, 3 or 4; when the fault risk level is 1, it indicates a low risk level; when the fault risk level is 2, it indicates a medium risk level; when the fault risk level is 3, it indicates a high risk level; when the fault risk level is 4, it indicates an emergency level;
[0152] Wherein, the fault risk level function is:
[0153]
[0154] In the formula, δ fault_level represents the value of the fault risk level; D represents the difference between the feature vector and the state target feature vector; θ1, θ2 and θ3 are different risk level thresholds.
[0155] In this embodiment, according to the multi-level early warning mechanism, a layered response is performed according to the severity of the fault risk. Different fault risk levels will trigger corresponding response strategies to ensure the safety of the distribution equipment and the stability of the distribution system.
[0156] It should be noted that the difference D between the feature vector and the state target feature vector refers to the distance between the feature vector and the state target feature vector, and the calculation formula is:
[0157] D=||F PCA -F target ||;
[0158] Where, represents the target feature vector in different states, which is used for the ideal feature distribution of the power distribution equipment in different states. It is the same as the target feature vector in the loss function.
[0159] When the eigenvector F PCA With F target When the deviation is significant, the hierarchical early warning mechanism of the fault response module can be triggered.
[0160] The different fault response strategies corresponding to different exception levels are as follows:
[0161] (1) Low risk level: reflects small short-term fluctuations in system operation or occasional abnormal signals. The system conducts preliminary verification of abnormal signals to ensure that they will not have a direct impact on equipment operation, and collects more data for subsequent analysis.
[0162] (2) Medium risk level: The system shows continuous abnormal signals, reflecting potential hidden dangers or mild equipment aging problems, but has not yet threatened system stability. At this time, the system will combine historical data with real-time characteristics to further determine whether it is necessary to dynamically adjust equipment parameters to mitigate risks;
[0163] (3) High-risk level: Abnormal signals are persistent and significant, indicating that there may be greater equipment or system risks, such as overheating, severe load overload, etc. At this time, the edge and cloud of the system work together to conduct comprehensive diagnosis, quickly grade and evaluate the abnormalities, optimize equipment parameters, and relieve system pressure;
[0164] (4) Emergency level: The system is in a dangerous state and may face serious consequences such as equipment damage, system downtime or chain reaction. The system will quickly handle the crisis by automatically cutting off power or maximizing resource calls, and record detailed data for subsequent analysis.
[0165] Embodiment 2
[0166] Please refer to Figure 2 , is a schematic diagram of the structure of a power distribution equipment fault detection device provided by an embodiment of the present invention, comprising: a data acquisition module, an abnormality detection module and an abnormality warning module;
[0167] The data acquisition module is used to acquire a feature vector of the power distribution equipment; wherein the feature vector is obtained by extracting the operating data of the power distribution equipment;
[0168] The anomaly detection module is used to input the feature vector into a trained power distribution equipment anomaly detection model, so that the power distribution equipment anomaly detection model performs anomaly detection on the power distribution equipment according to the feature vector, and outputs a state prediction probability result; wherein the state prediction probability result includes: normal probability, slight abnormality probability, moderate abnormality probability and severe abnormality probability; according to the state prediction probability result, determine the predicted state of the power distribution equipment; wherein the types of the predicted state include: normal, slight abnormality, moderate abnormality and severe abnormality;
[0169] The abnormal warning module is used to determine the corresponding state target feature vector according to the predicted state when the predicted state is not normal; determine the fault risk level corresponding to the predicted state according to the feature vector and the state target feature vector; and trigger the corresponding abnormal warning mechanism according to the state prediction result and the corresponding fault risk level.
[0170] Embodiment 3
[0171] Accordingly, an embodiment of the present invention provides a terminal device, which includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and when the processor executes the computer program, it implements the distribution equipment fault detection method described in the above-mentioned embodiment of the invention.
[0172] Embodiment 4
[0173] Accordingly, an embodiment of the present invention provides a storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the storage medium is located is controlled to execute the distribution equipment fault detection method described in the above-mentioned embodiment of the invention.
[0174] It should be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the accompanying drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art may understand and implement it without paying any creative effort.
[0175] Those skilled in the art can clearly understand that for the sake of convenience and brevity, the specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0176] The terminal device may be a computing device such as a desktop computer, a notebook, a palmtop computer, a cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.
[0177] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the device, and various interfaces and lines are used to connect various parts of the entire device.
[0178] The memory can be used to store the computer program, and the processor realizes various functions of the device by running or executing the computer program stored in the memory and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function, etc.; the data storage area can store data created according to the use of the mobile phone, etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0179] The storage medium is a storage medium, and the computer program is stored in the storage medium. When the computer program is executed by the processor, the steps of each method embodiment described above can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer readable media do not include electric carrier signals and telecommunication signals.
[0180] The above is a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A method for detecting a fault in a power distribution device, characterized in that: include: Acquire a feature vector of a power distribution device; wherein the feature vector is obtained by extracting features from operating data of the power distribution device; The feature vector is input into a trained power distribution equipment anomaly detection model, so that the power distribution equipment anomaly detection model performs anomaly detection on the power distribution equipment according to the feature vector, and outputs a state prediction probability result; wherein the state prediction probability result includes: normal probability, slight abnormal probability, moderate abnormal probability and severe abnormal probability; Determine the predicted state of the power distribution equipment according to the state prediction probability result; wherein the types of the predicted state include: normal, slightly abnormal, moderately abnormal and severely abnormal; When the predicted state is not normal, the corresponding state target feature vector is determined according to the predicted state; the fault risk level corresponding to the predicted state is determined according to the feature vector and the state target feature vector; and the corresponding abnormal warning mechanism is triggered according to the state prediction result and the corresponding fault risk level.
2. The method for detecting a fault in a power distribution device according to claim 1, wherein: The step of obtaining a characteristic vector of the power distribution equipment includes: Acquiring operation data of the power distribution equipment; Using a multi-scale feature extraction method based on wavelet transform, performing preliminary feature extraction on the operation data to obtain an initial feature vector; The principal component analysis method is used to perform dimension reduction processing on the initial feature vector to obtain the feature vector.
3. The method for detecting a fault in a power distribution device according to claim 1, wherein: The training process of the power distribution equipment anomaly detection model includes: Acquire several sample feature vectors and corresponding labels; wherein the sample feature vectors are obtained by feature extraction from historical operation data of the power distribution equipment; the categories of the labels include: normal, slightly abnormal, moderately abnormal, and severely abnormal; The sample feature vector is input into the constructed power distribution equipment anomaly detection model, so that the power distribution equipment anomaly detection model performs anomaly detection according to the sample feature vector and outputs a sample state prediction probability result; the state prediction probability result includes: sample normal probability, sample mild abnormal probability, sample moderate abnormal probability and sample severe abnormal probability; Calculate the loss function value according to the sample feature vector, the sample state prediction probability result and the corresponding label; According to the loss function value, adjusting the parameters of the power distribution equipment anomaly detection model to obtain a trained power distribution equipment anomaly detection model; Among them, the loss function of the power distribution equipment anomaly detection model is: Where E represents the loss function value; y c Indicates the label value; if the label is normal, y1=1, y2=0, y3=0, y4=0; if the label is slightly abnormal, y1=0, y2=1, y3=0, y4=0; if the label is moderately abnormal, y1=0, y2=0, y3=1, y4=0; if the label is severely abnormal, y1=0, y2=0, y3=0, y4=1; Indicates the state prediction probability result; represents the probability that the sample is normal; Indicates the probability of a sample being slightly abnormal; Indicates the probability of moderate abnormality in the sample; Indicates the probability of serious abnormality of the sample; is the penalty coefficient; F P represents the sample feature vector; F target,1 The target feature vector representing the normal state; F target,2 The target feature vector representing the mild abnormal state; F target,3 The target feature vector representing the moderate abnormal state; F target,4 Target feature vector representing severe abnormal conditions.
4. The method for detecting a fault in a power distribution device according to claim 1, wherein: Also includes: Calculate a first state variable according to the state prediction probability result and the characteristic vector, and determine a corresponding first adjustment instruction; Use the Q-value learning algorithm to minimize power loss and maximize system stability as the optimization goal, and determine the Q-value update formula; Calculating a first Q value according to the first state variable and a first adjustment instruction; According to the Q value update formula, the first Q value is updated to obtain a second Q value; Determining a corresponding second adjustment instruction according to the second Q value; adjusting the power distribution equipment according to the second adjustment instruction; Wherein, the Q value update formula is: Q2(s,a2)=Q1(s,a1)+α[r+γmax a′ Q(s′,a′)-Q1(s,a1)]; In the formula, Q2(s,a2) represents the second Q value; s represents the first state variable; a2 represents the second adjustment instruction; Q1(s,a1) represents the first Q value; a1 represents the first adjustment instruction; α is the learning rate; r represents the feedback reward obtained after executing the adjustment instruction; γ is the discount factor; s′ represents the state variable at the next moment; a′ represents the adjustment instruction to be executed in the next step; Q(s′,a′) represents the Q value calculated after executing the adjustment instruction under the state variable at the next moment.
5. The method for detecting a fault in a power distribution device according to claim 4, wherein: Also includes: Acquire a second state variable after executing the second adjustment instruction; determining a feedback signal according to the first state variable and the second state variable; updating the learning rate according to the first state variable, the second state variable and a feedback signal; Among them, the update formula of the learning rate is: In the formula, α t+1 represents the updated learning rate; α t represents the learning rate before updating; s t represents the first state variable; s t+1 represents the second state variable; η is the coefficient for controlling the adjustment of the learning rate; f t Indicates feedback signal.
6. The method for detecting a fault in a power distribution device according to claim 4, wherein: The calculation formula of the feedback reward is: r=-(|VV ref |+|II ref |); Where V ref Indicates the voltage reference value of the power distribution equipment; I ref It represents the current reference value of the power distribution equipment; V represents the voltage after the adjustment instruction is executed; I represents the current after the adjustment instruction is executed.
7. The method for detecting a fault in a power distribution device according to claim 1, wherein: The determining, according to the feature vector and the state target feature vector, the fault risk level corresponding to the predicted state includes: Calculating the difference between the feature vector and the state target feature vector; According to the difference, the fault risk level corresponding to the predicted state is determined by a fault risk level function; wherein the value of the fault risk level is 1, 2, 3 or 4; when the fault risk level is 1, it indicates a low risk level; when the fault risk level is 2, it indicates a medium risk level; when the fault risk level is 3, it indicates a high risk level; when the fault risk level is 4, it indicates an emergency level; Wherein, the fault risk level function is: In the formula, δ fault_level represents the value of the fault risk level; D represents the difference between the feature vector and the state target feature vector; θ1, θ2 and θ3 are different risk level thresholds.
8. A power distribution equipment fault detection device, characterized in that: include: Data acquisition module, anomaly detection module and anomaly warning module; The data acquisition module is used to acquire a feature vector of the power distribution equipment; wherein the feature vector is obtained by extracting the operating data of the power distribution equipment; The anomaly detection module is used to input the feature vector into a trained power distribution equipment anomaly detection model, so that the power distribution equipment anomaly detection model performs anomaly detection on the power distribution equipment according to the feature vector, and outputs a state prediction probability result; wherein the state prediction probability result includes: normal probability, slight abnormality probability, moderate abnormality probability and severe abnormality probability; according to the state prediction probability result, determine the predicted state of the power distribution equipment; wherein the types of the predicted state include: normal, slight abnormality, moderate abnormality and severe abnormality; The abnormal warning module is used to determine the corresponding state target feature vector according to the predicted state when the predicted state is not normal; determine the fault risk level corresponding to the predicted state according to the feature vector and the state target feature vector; and trigger the corresponding abnormal warning mechanism according to the state prediction result and the corresponding fault risk level.
9. A terminal device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the power distribution equipment fault detection method as claimed in any one of claims 1 to 7 when executing the computer program.
10. A storage medium, characterized in that: The storage medium includes a stored computer program, wherein when the computer program is executed, the device where the storage medium is located is controlled to execute the method for detecting faults of distribution equipment according to any one of claims 1 to 7.