Power stealing risk threshold dynamic optimization and multistage early warning method based on reinforcement learning

Through the dynamic optimization of electricity theft risk threshold and multi-level early warning method based on reinforcement learning, the problems of poor adaptability of static thresholds and low efficiency of centralized computing in electricity theft detection are solved, the dynamic adaptability and multi-objective collaborative optimization of electricity theft detection are realized, the false alarm rate and missed alarm rate are significantly reduced, and the detection accuracy and protection efficiency of smart grids are improved.

CN120634254APending Publication Date: 2025-09-12STATE GRID SHANGHAI MUNICIPAL ELECTRIC POWER CO
View PDF 0 Cites 6 Cited by

Patent Information

Application Number
CN202510750816.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-06
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

Existing electricity theft detection methods have problems such as poor static threshold adaptability, low centralized computing efficiency and insufficient multi-objective coordination, resulting in high false alarm and missed alarm rates, and cannot meet the real-time and multi-objective optimization requirements of the power system.

Method used

A reinforcement learning-based dynamic optimization and multi-level warning method for electricity theft risk threshold is adopted to construct a multi-dimensional state space. The risk threshold is dynamically adjusted through the reinforcement learning algorithm. Combined with the multi-level warning mechanism, a multi-objective weighted reward function and a red, orange and yellow three-color warning mechanism are designed to achieve efficient detection of electricity theft and distribution safety protection.

Benefits of technology

Significantly reduce the false alarm rate and missed alarm rate, improve detection accuracy, achieve strong dynamic adaptability and multi-objective collaborative optimization, improve the power theft detection and protection efficiency of smart grids, reduce the false alarm rate by 30% and the missed alarm rate by 25%, and improve detection accuracy and line loss control efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120634254A_ABST
    Figure CN120634254A_ABST
Patent Text Reader

Abstract

The invention discloses an electricity larceny risk threshold dynamic optimization and multistage early warning method based on reinforcement learning, and the method achieves the dynamic adjustment of an electricity larceny risk threshold through constructing a multi-dimensional state space containing a risk perception percentage, a line loss rate deviation, a cost budget and a load feature vector, and employing a reinforcement learning algorithm. Safety constraints are introduced to ensure the rationality of threshold adjustment, a TD3 algorithm is adopted to train and update a strategy network and a value network, the learning efficiency is improved through priority experience playback, a multi-target weighted reward function is designed to balance the multi-target optimization requirements of detection precision, line loss control, inspection cost and the like, and a red, orange and yellow three-color early warning mechanism is constructed. Early warning actions of different levels are triggered according to the ratio of the dynamically updated reference threshold value to the risk perception percentage, and early warning visualization and strategy effect evaluation are achieved through a geographic information graph dynamic rendering module, a natural language report generation module and an anti-fact analysis module.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention discloses a dynamic optimization and multi-level early warning method for power theft risk threshold based on reinforcement learning, which relates to the detection of abnormal power consumption behavior of power users and the safety protection of power distribution, and belongs to the technical field of power system safety monitoring. Background Art

[0002] With the rapid development of smart grids and the continued expansion of electricity users, the negative impact of electricity theft on grid line loss and distribution security is becoming increasingly prominent. Accurately detecting electricity theft in real time and dynamically adjusting risk thresholds have become key issues in ensuring the economic operation of power systems.

[0003] Currently, existing electricity theft detection methods are mainly based on static threshold rules or centralized data analysis technologies. For example, they set fixed line loss rate thresholds or use models such as support vector machines and autoencoders to perform offline analysis of user electricity usage data. These methods have the following drawbacks:

[0004] Static thresholds have poor adaptability: they cannot dynamically adjust the thresholds based on grid conditions, resulting in high false alarm and missed alarm rates.

[0005] Centralized computing is inefficient: Relying on a central server to process network-wide data, computational complexity increases dramatically with the growth of user scale, making it difficult to meet real-time requirements.

[0006] Insufficient multi-objective coordination: Existing methods usually optimize detection accuracy or line loss rate alone, lacking a comprehensive balance of multiple objectives such as audit costs and grid stability. Summary of the Invention

[0007] The purpose of the present invention is to address the shortcomings of the above-mentioned background technology and provide a dynamic optimization and multi-level early warning method for electricity theft risk threshold based on reinforcement learning. By constructing a multi-dimensional state space, dynamically adjusting the risk threshold and combining a multi-level early warning mechanism, efficient detection of electricity theft and real-time protection of power distribution safety can be achieved.

[0008] To achieve the above object, the technical solution adopted by the present invention is:

[0009] The method for dynamic optimization of electricity theft risk threshold and multi-level early warning based on reinforcement learning is characterized by comprising the following steps:

[0010] Step 1: Data Acquisition

[0011] Get input parameters, including load characteristic vector F load , line loss rate deviation ΔLoss, cost budget C penalty and the percentage of risk perception R t ;

[0012] Step 2: Input Normalization

[0013] Normalize the input parameters in step 1;

[0014] Step 3: State Space Construction

[0015] Combine the normalized feature vectors in step 2 into the state space S;

[0016] Step 4: Action Generation and Constraint Verification

[0017] Perform continuous action space design, combine the standard deviation σ of the risk perception percentage, calculate the actual adjustment amount, and constrain the action space. If the adjusted threshold violates the safety constraint, jump to step 8. If the adjustment is legal, jump to step 5.

[0018] Step 5: Reward Function Calculation

[0019] Set the reward function. The total reward of the reward function includes accuracy reward, line loss reward, and cost penalty.

[0020] Step 6: TD3 strategy training

[0021] First, the priority experience replay pool is initialized, and then the dual Q network is used for training to obtain the strategy with the highest value and output it;

[0022] Step 7: Counterfactual Analysis

[0023] Simulate the effects of different threshold strategies. If the original strategy is better, continue to step 8, otherwise return to step 6 for retraining.

[0024] Step 8: Multi-level warning

[0025] The optimal threshold is obtained based on value maximization, and then a red, orange, and yellow color warning is issued based on the ratio of the dynamic threshold to the risk perception percentage. Step 9 is then performed, and the error is adjusted based on the return threshold for immediate blocking. Otherwise, return to step 5.

[0026] Step 9: Visualization and report generation

[0027] Render geographic information maps to dynamically display the distribution of high-risk areas, and generate warning reasons, corresponding suggestions and measures through natural language.

[0028] As a preferred technical solution of the present invention: in step 3, the state space is composed of the risk perception percentage R t , line loss deviation And the load characteristic vector F load =[P peak , P valley , N mut ]constitute.

[0029] As a preferred technical solution of the present invention: in step 4, the threshold decision is made through reinforcement learning, and the design of the action space is continuous threshold adjustment, and the adjustment amount is a t =clip(π(S t ), [-0.1.σ, +0.1σ]), σ is the standard deviation of risk perception percentage, π(S t ) is the output of the policy network, set security constraints, and the threshold adjustment range is limited to [u R -3σ,u R +3σ], and the cumulative adjustment per day shall not exceed 0.5σ.

[0030] As a preferred technical solution of the present invention: in step 5, the reward function is determined using a multi-objective weighted formula, which is as follows: t =0.6*R acc +0.3R loss -0.1*C penalty

[0031] Among them, R acc For precision rewards, TPR is the recall rate, TNR is the precision rate, TPR and TNR are dynamically calculated through the confusion matrix, R loss is the line loss reward, R loss =0.5*ΔL oss ;c penalty

[0032] For cost penalty, Among them, I(·) is the indicator function, the threshold th i Above average risk The penalty is triggered.

[0033] As the preferred technical solution of the present invention: in step 6, strategy training is implemented through the TD3 algorithm. The strategy network in the TD3 algorithm adopts a multi-layer fully connected neural network structure, and the output range is limited by the ReLU activation function and the Tanh function. The exploration noise is generated by the Ornstein-Uhlenbeck process, the value network adopts a double Q network design and performs soft updates, the experience replay adopts a priority sampling strategy, and the counterfactual analysis module is used to evaluate the effects of different threshold strategies.

[0034] As the preferred technical solution of the present invention: the TD3 algorithm steps are as follows:

[0035] First, the threshold is determined. The threshold must meet the safety constraints. If the threshold exceeds the safety range of the safety constraints, the system jumps directly to the warning stage. If the adjustment exceeds the threshold of the safety constraints, the threshold of the previous stage is maintained, and learning continues. Two sets of critic networks with the same network architecture are introduced.

[0036] Then, the target value is calculated. When calculating the target value, the minimum value between the two is used to estimate the state-action value of the next state-action pair (S′, a′), that is,

[0037] Finally, the strategy with the greatest value is output.

[0038] As a preferred technical solution of the present invention: in step 7, the counterfactual analysis includes the following steps:

[0039] After completing the threshold strategy update, conduct counterfactual analysis and compare strategies by changing the threshold. Set the baseline strategy as The comparison strategy is calculate If η>ηth occurs, adopt a new strategy; otherwise, retrain.

[0040] As a preferred technical solution of the present invention: in step 8, a warning mechanism of red, orange and yellow three-color warnings is constructed, and the warning mechanisms corresponding to different colors are triggered according to the ratio of the dynamically updated benchmark threshold and the risk perception percentage.

[0041] As a preferred technical solution of the present invention: the red warning is >1.5 times the threshold, the orange warning is 1.2 to 1.5 times the threshold, and the yellow warning is 1.0 to 1.2 times the threshold.

[0042] As the preferred technical solution of the present invention: corresponding measures are given for warnings of different colors. When it is a yellow warning, information backtracking is automatically performed. When it is an orange warning, patrol warnings are given to staff. When it is a red warning, power is cut off.

[0043] In the above technical solution: The present invention constructs a multidimensional state space that includes risk perception percentage, line loss rate deviation, cost budget, and load characteristic vectors, uses a reinforcement learning algorithm to dynamically adjust the power theft risk threshold, and introduces safety constraints to ensure the rationality of the threshold adjustment. By adopting the TD3 algorithm to train and update the policy network and value network, and improving learning efficiency through priority experience replay, a multi-objective weighted reward function is designed to balance multi-objective optimization requirements such as detection accuracy, line loss control, and audit costs. At the same time, a red, orange, and yellow three-color warning mechanism is constructed to trigger different levels of warning actions based on the ratio of the dynamically updated baseline threshold and the risk perception percentage. The warning visualization and strategy effect evaluation are achieved through dynamic rendering of geographic information maps, natural language report generation, and counterfactual analysis modules.

[0044] The method of the present invention has the advantages of strong dynamic adaptability, multi-objective collaborative optimization, efficient training, and high strategy robustness. It can effectively reduce the false alarm rate and missed alarm rate, and improve the efficiency of smart grid electricity theft detection and protection.

[0045] Compared with the prior art, the present invention has the following beneficial effects:

[0046] 1. Dynamic threshold optimization and strong adaptability: Through reinforcement learning (TD3 algorithm), the system instantly perceives grid load, line loss rate, and user behavior characteristics, constructs a multidimensional state space that includes risk perception percentage, line loss deviation, and load characteristics, and dynamically adjusts the risk threshold. Compared with traditional static threshold methods, the system can adaptively optimize the threshold based on the grid's operating status, significantly reducing false alarm rates (by approximately 30%) and missed alarm rates (by approximately 25%), thereby improving detection accuracy.

[0047] 2. Multi-objective collaborative optimization mechanism, design a multi-objective weighted reward function, integrate detection accuracy, line loss control and audit cost indicators, and achieve Pareto optimality through weight coefficients (α=0.6, β=0.3, γ=0.1).

[0048] 3. Prioritized experience replay and efficient training: A prioritized sampling strategy based on TD error prioritizes training high-value samples, accelerating the TD3 algorithm's convergence speed by 35%. Furthermore, a dual-Q network design (min(Q1',Q2')) effectively suppresses overestimation of value, reducing Q-value errors by 50%.

[0049] 4. Counterfactual Analysis and Policy Robustness: After a policy update, the cumulative rewards of the baseline policy and the counterfactual policy are compared to quantify the policy improvement. If η < 15%, policy retraining is triggered to ensure system stability in the face of sudden changes in grid load or evolving power theft methods, reducing the risk of policy failure by 70%. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1is a flow chart of the present invention;

[0051] Figure 2 It is a statistical table of the traditional static threshold detection method;

[0052] Figure 3 This is a statistical table of the detection method based on centralized machine learning;

[0053] Figure 4 This is the data statistics table of this application. DETAILED DESCRIPTION

[0054] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments:

[0055] like Figure 1 As shown, the present invention proposes a method for dynamic optimization of electricity theft risk threshold and multi-level early warning based on reinforcement learning, which includes the following steps:

[0056] Step 1: Data Acquisition

[0057] Get input parameters, including load characteristic vector F load , line loss rate deviation ΔLoss, cost budget c penalty and the percentage of risk perception R t ;

[0058] Step 2: Input Normalization

[0059] Normalize the input parameters in step 1;

[0060] Step 3: State Space Construction

[0061] Combine the normalized feature vectors in step 2 into the state space S;

[0062] Step 4: Action Generation and Constraint Verification

[0063] Perform continuous action space design, combine the standard deviation σ of the risk perception percentage, calculate the actual adjustment amount, and constrain the action space. If the adjusted threshold violates the safety constraint, jump to step 8. If the adjustment is legal, jump to step 5.

[0064] Step 5: Reward Function Calculation

[0065] Set the reward function. The total reward of the reward function includes accuracy reward, line loss reward, and cost penalty.

[0066] Step 6: TD3 strategy training

[0067] First, the priority experience replay pool is initialized, and then the dual Q network is used for training to obtain the strategy with the highest value and output it;

[0068] Step 7: Counterfactual Analysis

[0069] Simulate the effects of different threshold strategies. If the original strategy is better, continue to step 8, otherwise return to step 6 for retraining.

[0070] Step 8: Multi-level warning

[0071] The optimal threshold is obtained based on value maximization, and then a red, orange, and yellow color warning is issued based on the ratio of the dynamic threshold to the risk perception percentage. Step 9 is then performed, and the error is adjusted based on the return threshold for immediate blocking. Otherwise, return to step 5.

[0072] Step 9: Visualization and report generation

[0073] Render geographic information maps to dynamically display the distribution of high-risk areas, and generate warning reasons, corresponding suggestions and measures through natural language.

[0074] This invention constructs a multidimensional state space encompassing risk perception percentage, line loss rate deviation, cost budget, and load characteristic vectors, utilizes a reinforcement learning algorithm to dynamically adjust the electricity theft risk threshold, and introduces safety constraints to ensure the rationality of threshold adjustment. The TD3 algorithm is employed to train and update the policy and value networks, and learning efficiency is improved through prioritized experience replay. A multi-objective weighted reward function is designed to balance multi-objective optimization requirements such as detection accuracy, line loss control, and audit costs. Furthermore, a red, orange, and yellow warning mechanism is constructed, triggering different levels of warning actions based on the ratio of dynamically updated baseline thresholds to risk perception percentages. Warning visualization and policy effectiveness evaluation are achieved through dynamic rendering of geographic information maps, natural language report generation, and counterfactual analysis modules.

[0075] By defining Q(s,a), a threshold risk warning based on reinforcement learning is realized, and the concept of reward value is proposed. The reward value is calculated based on the inspection cost, accuracy reward and line loss reward.

[0076] Among them, C penalty Used to describe the cost penalty, if the user is warned, it is used to describe the economic cost management of the inspection. For example, if a user's threshold th i Above average risk Then C penalty It is necessary to calculate, otherwise C penaltyThe algorithm first inputs state data, including the percentage of electricity theft risk, line loss rate deviation, and load characteristic vectors. These variables are normalized for further representation. The algorithm's conditional representation indicates that if normalization is not performed, the algorithm returns to the next step for further processing; otherwise, the algorithm proceeds directly to the next step, determining the TD3 policy for reinforcement learning. The algorithm does not specify the action policy determination or reward function setting, as these are included in the TD3 policy representation. The structure of the policy network is shown in the formula: Δ = Tanh(W2·ReLU(W1S+b1)+b2).

[0077] In step 3, the state space is represented by the risk perception percentage R t , line loss deviation And the load characteristic vector F load =[P peak ,P valley ,N mut ], and finally normalize all the input features. Among them, u roll and variance σ roll .

[0078] In step 4, the threshold decision is made through reinforcement learning, and the action space is designed as a continuous threshold adjustment, and the adjustment amount is a t =clip(π(S t ),[-0.1σ,+0.1σ]), σ is the standard deviation of risk perception percentage, π(S t ) is the output of the policy network, set security constraints, and the threshold adjustment range is limited to [u R -3σ,u R +3σ], and the cumulative adjustment per day shall not exceed 0.5σ.

[0079] In step 5, the reward function is determined using a multi-objective weighted formula, as follows: t =0.6*R acc +0.3*R loss -0.1*C penalty

[0080] Among them, R acc For precision rewards, TPR is the recall rate, TNR is the precision rate, TPR and TNR are dynamically calculated through the confusion matrix, R loss is the line loss reward, R loss =0.5*ΔL oss ; C penalty

[0081] For cost penalty, Among them, I(·) is the indicator function, the threshold th i Above average risk The penalty is triggered.

[0082] In step 6, strategy training is implemented through the TD3 algorithm. The strategy network in the TD3 algorithm adopts a multi-layer fully connected neural network structure, limits the output range through the ReLU activation function and the Tanh function, generates exploration noise using the Ornstein-Uhlenbeck process, and adopts a double Q network design for the value network and performs soft updates. The experience replay adopts a priority sampling strategy, and the counterfactual analysis module is used to evaluate the effects of different threshold strategies.

[0083] The TD3 algorithm steps are as follows:

[0084] First, the threshold is determined. The threshold must meet the safety constraints. If the threshold exceeds the safety range of the safety constraints, it will jump directly to the warning stage. If the adjustment exceeds the threshold of the safety constraints, the threshold of the previous stage is maintained and learning continues. In the reinforcement learning TD3 algorithm, the problem of network overestimation may occur, mainly due to bootstrapping and maximization. Therefore, a dual network is used in the operation to solve this problem, and two sets of critic networks with the same network architecture are introduced;

[0085] Then, the target value is calculated. When calculating the target value, the minimum value between the two is used to estimate the state-action value of the next state-action pair (S′, a′), that is,

[0086] Finally, the strategy with the greatest value is output.

[0087] It is worth noting that the TD3 strategy algorithm uses priority experience replay, which can effectively improve the algorithm's speed.

[0088] In step 7, the counterfactual analysis includes the following steps:

[0089] After completing the threshold strategy update, conduct counterfactual analysis and compare strategies by changing the threshold. Set the baseline strategy as The comparison strategy is calculate If η>ηth occurs, adopt a new strategy; otherwise, retrain.

[0090] In step 8, a warning mechanism with red, orange and yellow colors is constructed, and the warning mechanism corresponding to different colors is triggered according to the ratio of the dynamically updated benchmark threshold and the risk perception percentage.

[0091] The red warning is >1.5 times the threshold, the orange warning is 1.2 to 1.5 times the threshold, and the yellow warning is 1.0 to 1.2 times the threshold.

[0092] Corresponding measures are given for warnings of different colors. When it is a yellow warning, information is automatically backtracked. When it is an orange warning, patrol warnings are issued to staff. When it is a red warning, power is cut off.

[0093] Embodiment: The present invention is described in comparison with three examples below.

[0094] 1. Traditional static threshold detection method (no dynamic optimization)

[0095] Technical features: It uses a fixed line loss rate threshold (such as 5%) and regular manual inspections, without an adaptive adjustment mechanism.

[0096] Test scenario: Simulate electricity theft under different user scales (10,000 to 1 million users) and statistically analyze the detection results.

[0097] like Figure 2 As shown in the figure, the reasons for this result are as follows: high false alarms / missed alarms, fixed thresholds cannot adapt to load fluctuations, and the false alarm rate increases significantly when the user scale expands; response is delayed and relies on manual verification, with the response time exceeding 4 days at a scale of 500,000 users; and line loss control is poor: the line loss rate deviation increases with the number of users, approaching 9% at 1 million users.

[0098] 2: Detection method based on centralized machine learning

[0099] Technical features: Uses the SVM model for offline data analysis, updates thresholds daily, and uses a central server to process network-wide data.

[0100] like Figure 3 As shown in the figure, the reasons for this result are as follows: computing bottleneck, centralized computing causes the response time to increase linearly with the user scale, and it still takes 3.5 days when there are 1 million users; update delay: the threshold is updated once a day, which cannot respond to sudden power theft incidents in real time, and the false alarm rate is still higher than 25%.

[0101] 3: Dynamic optimization and multi-level warning method of electricity theft risk threshold based on reinforcement learning proposed in this paper

[0102] Technical features: Adopting a distributed edge computing architecture, dynamically adjusting thresholds in real time, and combining multi-objective optimization with counterfactual analysis.

[0103] like Figure 4 As shown, the advantages of dynamic optimization are: the false alarm rate and missed alarm rate are reduced by more than 60% compared with Example 1, and the missed alarm rate is only 12% when there are 1 million users; multi-target collaboration: the line loss rate deviation is stabilized below 3.3%, and the audit cost is reduced by 65% ​​(compared with the detection method based on centralized machine learning).

[0104] Therefore, based on the above two examples, the method of the present invention has the advantages of strong dynamic adaptability, multi-objective collaborative optimization, efficient training, and high strategy robustness. It can effectively reduce the false alarm rate and missed alarm rate, and improve the efficiency of smart grid power theft detection and protection.

[0105] The above description is merely a preferred embodiment of the present invention and does not constitute any other form of limitation to the present invention. Any modification or equivalent variation based on the technical essence of the present invention shall still fall within the scope of protection claimed by the present invention.

Claims

1. Dynamic optimization of electricity theft risk threshold and multi-level early warning method based on reinforcement learning, characterized by: The steps include: Step 1: Data Acquisition Get input parameters, including load characteristic vector F load , line loss rate deviation ΔLoss, cost budget C penalty and the percentage of risk perception R t ; Step 2: Input Normalization Normalize the input parameters in step 1; Step 3: State Space Construction Combine the normalized feature vectors in step 2 into the state space S; Step 4: Action Generation and Constraint Verification Perform continuous action space design, combine the standard deviation σ of the risk perception percentage, calculate the actual adjustment amount, and constrain the action space. If the adjusted threshold violates the safety constraint, jump to step 8. If the adjustment is legal, jump to step 5. Step 5: Reward Function Calculation Set the reward function. The total reward of the reward function includes accuracy reward, line loss reward, and cost penalty. Step 6: TD3 strategy training First, the priority experience replay pool is initialized, and then the dual Q network is used for training to obtain the strategy with the highest value and output it; Step 7: Counterfactual Analysis Simulate the effects of different threshold strategies. If the original strategy is better, continue to step 8, otherwise return to step 6 for retraining. Step 8: Multi-level warning The optimal threshold is obtained based on value maximization, and then a red, orange, and yellow color warning is issued based on the ratio of the dynamic threshold to the risk perception percentage. Step 9 is then performed, and the error is adjusted based on the return threshold for immediate blocking. Otherwise, return to step 5. Step 9: Visualization and report generation Render geographic information maps to dynamically display the distribution of high-risk areas, and generate warning reasons, corresponding suggestions and measures through natural language.

2. The method for dynamic optimization and multi-level early warning of electricity theft risk threshold based on reinforcement learning according to claim 1 is characterized in that: In step 3, the state space is represented by the risk perception percentage R t , line loss deviation And the load characteristic vector F load =[P peak , P valley , N mut ]constitute.

3. The method for dynamic optimization and multi-level early warning of electricity theft risk threshold based on reinforcement learning according to claim 1 is characterized in that: In step 4, the threshold decision is made through reinforcement learning, and the action space is designed as a continuous threshold adjustment, and the adjustment amount is a t =clip(π(S t ), [-0.1σ+0.1σ]), σ is the standard deviation of risk perception percentage, π(S t ) is the output of the policy network, set security constraints, and the threshold adjustment range is limited to [u R -3σ,u R +3σ], and the cumulative adjustment per day shall not exceed 0.5σ.

4. The method for dynamic optimization of electricity theft risk threshold and multi-level early warning based on reinforcement learning according to claim 1 is characterized in that: In step 5, the reward function is determined using a multi-objective weighted formula, as follows: r t =0.6*R acc +0.3*R loss -0.1*C penalty Among them, R acc For precision rewards, TPR is the recall rate, TNR is the precision rate, TPR and TNR are dynamically calculated through the confusion matrix, R locc is the line loss reward, R loss =0.5*ΔL oss ; C penalty For cost penalty, Among them, I(·) is the indicator function, the threshold th i Above average risk The penalty is triggered.

5. The method for dynamic optimization of electricity theft risk threshold and multi-level early warning based on reinforcement learning according to claim 1 is characterized in that: In step 6, strategy training is implemented through the TD3 algorithm. The strategy network in the TD3 algorithm adopts a multi-layer fully connected neural network structure, limits the output range through the ReLU activation function and the Tanh function, generates exploration noise using the Ornstein-Uhlenbeck process, and adopts a double Q network design for the value network and performs soft updates. The experience replay adopts a priority sampling strategy, and the counterfactual analysis module is used to evaluate the effects of different threshold strategies.

6. The method for dynamic optimization and multi-level early warning of electricity theft risk threshold based on reinforcement learning according to claim 5 is characterized in that: The specific steps of the TD3 algorithm are as follows: First, the threshold is determined. The threshold must meet the safety constraints. If the threshold exceeds the safety range of the safety constraints, the system jumps directly to the warning stage. If the adjustment exceeds the threshold of the safety constraints, the threshold of the previous stage is maintained, and learning continues. Two sets of critic networks with the same network architecture are introduced. Then, the target value is calculated. When calculating the target value, the minimum value between the two is used to estimate the state-action value of the next state-action pair (S′, a′), that is, Finally, the strategy with the greatest value is output.

7. The method for dynamic optimization and multi-level early warning of electricity theft risk threshold based on reinforcement learning according to claim 1 is characterized in that: In step 7, the counterfactual analysis includes the following steps: After completing the threshold strategy update, conduct counterfactual analysis and compare strategies by changing the threshold. Set the baseline strategy as The comparison strategy is calculate When η>ηth occurs, a new strategy is adopted; Otherwise retrain.

8. The method for dynamic optimization and multi-level early warning of electricity theft risk threshold based on reinforcement learning according to claim 1 is characterized in that: In step 8, a warning mechanism with red, orange and yellow colors is constructed, and the warning mechanism corresponding to different colors is triggered according to the ratio of the dynamically updated benchmark threshold and the risk perception percentage.

9. The method for dynamic optimization and multi-level early warning of electricity theft risk threshold based on reinforcement learning according to claim 8 is characterized in that: The red warning is >1.5 times the threshold, the orange warning is 1.2 to 1.5 times the threshold, and the yellow warning is 1.0 to 1.2 times the threshold.

10. The method for dynamic optimization and multi-level early warning of electricity theft risk threshold based on reinforcement learning according to claim 9 is characterized in that: Corresponding measures are given for warnings of different colors. When it is a yellow warning, information is automatically backtracked. When it is an orange warning, patrol warnings are issued to staff. When it is a red warning, power is cut off.

Citation Information

Cited By

  • CaualVAE-based yield increase measure effect evaluation method, system and equipment

    CN121094338A

  • Intelligent electrical fire risk assessment method based on data analysis

    CN121725606A

  • Intelligent electrical fire risk assessment method based on data analysis

    CN121725606B

  • State grid marketing business auditing method and system based on multi-source monitoring

    CN121766786A

  • A method and system for temperature control in a feed pelleting production process

    CN122387227A