Active learning-based power grid safe operation boundary construction method and device

By applying active learning and residual network technology in the power grid, the safe operation boundary of the power grid is built, and the problems of low computing efficiency and insufficient accuracy in the existing technology are solved, and faster and more accurate construction of the safe operation boundary of the power grid is achieved, which improves the safety stability and power supply reliability of the power grid.

CN120124474APending Publication Date: 2025-06-10SHANDONG UNIV OF TECH +3
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510236290.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-28
Publication Date
2025-06-10

AI Technical Summary

Technical Problem

When the prior art builds a safe operation boundary under steady-state conditions of the power grid, the calculation efficiency is low, the time is long, and the accuracy is affected, making it difficult to meet the high requirements for safe and stable operation of the power grid.

Method used

Using an active learning method, by setting a steady-state constraint model of the power system, a grid safety evaluation model based on residual network is constructed, the mapping relationship between the grid safety operation boundary and the safety evaluation model is analyzed, and the grid safety operation boundary function is obtained through active learning, and the sample data is screened using the safe distance for model training.

Benefits of technology

It significantly improves the resolution speed and accuracy of the safe operation boundary of the power grid, optimizes the model performance, and enhances the guarantee of safe operation of the power grid and the power supply reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120124474A_ABST
    Figure CN120124474A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of safety boundary construction, and particularly relates to a power grid safety operation boundary construction method and device based on active learning, and the method comprises the steps: setting a steady-state constraint model of a power system; constructing a differential equation of a system state under a steady-state condition, and forming a power grid safety evaluation model based on the residual network; analyzing a mapping relation between the power grid safety operation boundary and the power grid safety evaluation model, and obtaining a power grid safety operation boundary function through active learning; defining the safety distance as the matching degree of the actual safety condition of the operation point and the safety condition obtained through the current power grid safety operation boundary function, and screening sample data to train the power grid safety evaluation model and the power grid safety operation boundary function; and based on the trained power grid safety evaluation model and the power grid safety operation boundary function, judging whether the operation point is safe or not. According to the method, the safe operation boundary of the power grid can be calculated more accurately and quickly, and safe operation guarantee is provided for the system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of security boundary construction, and particularly relates to a method and device for constructing a power grid safe operation boundary based on active learning. Background Art

[0002] With the development of modern power systems, the complexity of the power grid structure has been continuously increasing, and the operation modes have also tended to be diversified. These phenomena have put forward higher requirements for the safe and stable operation of the power grid. Residual networks are widely used in the power system, and have good effects on the efficient and accurate monitoring and evaluation technologies of the power system. At the same time, combined with active learning, very good monitoring and evaluation effects can be shown. Compared with other deep learning networks, residual networks can effectively solve the problems of gradient disappearance and gradient explosion in the training of deep networks by introducing residual connections. Residual connections allow information to be directly passed from the previous layer to the next layer, ensuring the stability of the gradient. At the same time, residual networks can train deeper neural networks, improve the accuracy and generalization ability of the model, and have good application effects in the context of complex tasks in the power system.

[0003] In the current field of power system security domain construction, for the problem of constructing a safe operation boundary under transient conditions, there are currently studies on a transient voltage safety boundary construction method based on active learning, which proposes a data-driven method for a transient voltage power grid safety assessment model and safety margin calculation for the dynamic security domain under transient conditions. For the problem of constructing a safe operation boundary under steady-state conditions, most current studies calculate the modified equation and system power flow to solve the safe operation boundary, and construct a safety margin assessment model to provide opinions on the safety control of the power system and safety warning when the structural parameters change.

[0004] Among various current methods for constructing a safe operation boundary under steady-state conditions, for the calculation of the modified equation and system power flow, a large number of offline calculation methods are usually adopted to calculate the limit points of safe operation. After obtaining the data information of multiple limit points, the hyperplane equation of the safe operation boundary is given by fitting. This method involves a relatively large amount of calculation, so it takes a long time and has a slow speed. When the piecewise approximation method is used to improve the boundary solving speed, its calculation speed is greatly improved, but its accuracy will be affected to a certain extent. Therefore, in order to ensure the safe and stable operation of the power grid and improve the reliability of power supply, there is an urgent need for a method for constructing a power grid safe operation boundary. Summary of the Invention

[0005] In view of the deficiencies in the above prior art, the object of the present invention is to provide a method and device for constructing the power grid safe operation boundary based on active learning, which can improve the learning efficiency and optimize the model performance through artificial intelligence, so as to calculate the power grid safe operation boundary more accurately and quickly, provide a guarantee for the safe operation of the system, and ensure the reliability of power supply.

[0006] To achieve the above object, the present invention provides a method for constructing the power grid safe operation boundary based on active learning, including the following steps: S1. Set the steady-state constraint model of the power system, including node voltage amplitude constraint, branch current constraint, generator active power capacity constraint, generator reactive power capacity constraint, and system power flow constraint; S2. On the basis of the steady-state constraint model, construct a differential equation of the system state under steady-state conditions to form a power grid safety assessment model based on a residual network; S3. On the basis of the power grid safety assessment model, analyze the mapping relationship between the power grid safe operation boundary and the power grid safety assessment model, and obtain the power grid safe operation boundary function through active learning as the basis for judging whether the operating point is safe; S4. Define the safety distance as the matching degree between the actual safety situation of the operating point and the safety situation obtained through the current power grid safe operation boundary function, and use the safety distance as the screening strategy for sample data to screen sample data to train the power grid safety assessment model and the power grid safe operation boundary function; S5. Based on the trained power grid safety assessment model and the power grid safe operation boundary function, judge whether the operating point is safe.

[0007] As a preferred solution of the present invention, in S1, the specific constraint conditions in the steady-state constraint model are as follows: S1.1. Assume that the voltage amplitude of node i is , then the node voltage amplitude constraint is expressed as: ; In the formula, , respectively represent the upper limit and lower limit of the voltage amplitude of node i; n is the number of nodes; S1.2. The branch current constraint is expressed as: ; In the formula, represents the circuit amplitude size of branch ; represents the amplitude upper limit of branch ; v represents the index of the branch, and l is the number of branches; S1.2, Active power capacity constraint of the generator and reactive power capacity constraint are expressed as: ; In the formula, , respectively represent the active and reactive power outputs of generator k; K is the number of generators; , respectively represent the upper and lower limits of the active power output of generator k; , respectively represent the upper and lower limits of the reactive power output of generator k; S1.3, The system power flow constraint in polar coordinates is expressed as: ; In the formula, , respectively represent the active and reactive power outputs of node i; indicates that node j is an adjacent node of node i; is the voltage amplitude of node j; represents the conductance of line ij between node i and node j; represents the susceptance of line ij; is the voltage phase angle difference between node i and node j.

[0008] As a preferred solution of the present invention, in S1.3, for line ij, , , , then can be expressed as: ; It is represented in matrix form as: ; In the formula, is the voltage phase angle difference matrix; B is the imaginary part of the nodal admittance matrix; P is the active power output matrix; X is the reactance matrix; Then the active power flow of line ij and the nodal phase angle difference satisfy the following relationship: ; In the formula, is the reactance of line ij.

[0009] As a preferred solution of the present invention, in S2, the process of forming the power grid security assessment model based on the residual network is that, assuming that the training sample set for establishing the power grid security assessment model is , where \(u\) is the injection power vector of the node, given as the input of the model; \(g\) represents the security state of the power system, and \([1, 0]\) and \([0, 1]\) represent secure and insecure respectively. Using the single-layer fully connected method and setting the number of residual modules to \(m\), the power grid security assessment model based on the residual network is expressed as: ; In the formula, represents the input of the power grid security assessment model, \(z = 1, 2, \ldots, m\); for the residual module \(z\), and are the two weight parameters of this residual module; , are the two weight parameters of the output layer; represents the function result after classification, and the predicted probability information is obtained after being processed by the softmax normalization function : .

[0010] As a preferred solution of the present invention, in the above-mentioned S2, the power grid secure operation boundary function is expressed as: ; In the formula, , are the output layer weight parameters of the power grid security assessment model in the secure state of the power grid; , are the output layer weight parameters of the power grid security assessment model in the insecure state of the power grid; , are the parameters obtained through active learning and are used to define the boundary function.

[0011] As a preferred solution of the present invention, when , it indicates that the operating point is in the critical state between secure and insecure; when , it indicates that the operating point is in the secure state; when , it indicates that the operating point is in the insecure state.

[0012] As a preferred solution of the present invention, in the above-mentioned S4, is used to approximate the security distance, that is: ; Define the security distance threshold, and select the sample data with a value less than the security distance threshold as the filtered sample data.

[0013] As a preferred solution of the present invention, in the above-mentioned S4, the training process is: S4.1. Obtain the initial sample set, calibrate the sample data in the initial sample set through a simulation tool, and form an initial power grid security assessment model through active learning; S4.2. Select the training set to be calibrated by using the safety distance assessment, and filter the sample data based on the safety distance threshold to form a new training set; S4.3. Through active learning, use the new training set to train the power grid security assessment model and the power grid security operation boundary function, and update the parameters; S4.4. Determine whether the accuracy of the safety classification reaches the set accuracy threshold. If it reaches the accuracy threshold, the iteration ends; otherwise, return to S4.2 to continue the iterative training.

[0014] As a preferred solution of the present invention, the safety distance threshold is adjusted by using a dynamic adaptive mechanism, which specifically includes the following steps: Step 1. Set the safety distance threshold as , where t represents the current iteration round, initialize the safety distance threshold as , and set the benchmark accuracy improvement rate β; Step 2. In each iterative training, calculate the difference between the current model accuracy and the accuracy of the previous round: ; Step 3. Adjust the threshold according to : If , then reduce the threshold , where is the adjustment parameter 1, and ; If and the number of filtered samples is lower than the preset ratio, then increase the threshold , where is the adjustment parameter 2, and ; Step 4. Filter the sample data through the dynamically adjusted safety distance threshold , and update the parameters of the power grid security assessment model.

[0015] A power grid security operation boundary construction device based on active learning includes a memory, a processor, and a computer program stored on the memory and capable of running on the processor. The above method is implemented by the processor executing the computer program.

[0016] The beneficial effects of the present invention are: By utilizing the residual network and the active learning strategy, the present invention can calculate the safe operating boundary of the power grid more accurately and quickly. This method optimizes the problem of low calculation efficiency of traditional methods, improves the learning efficiency and model performance through artificial intelligence technology, and thus significantly enhances the solution speed of the safe operating boundary of the power grid.

[0017] The present invention introduces the concept of safety distance to screen sample data that has a greater impact on the model. This method not only reduces the dependence of the model on the overall data but also increases the training speed and iteration efficiency of the model. By continuously iteratively updating the power grid safety assessment model and the safety boundary function, this solution can continuously improve the accuracy and generalization ability of the model, providing a more reliable guarantee for the safe operation of the power grid. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 is the process schematic diagram of the present invention; Figure 2 is the IEEE 39-bus system diagram during the verification process of the present invention; Figure 3 is the safety boundary training diagram under the initial training set during the verification process of the present invention; Figure 4 is the safety boundary training diagram with 60 samples and 10 iterations during the verification process of the present invention; Figure 5 is the safety boundary training diagram with 90 samples and 20 iterations during the verification process of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0019] The following further describes the embodiments of the present invention with reference to the drawings: Embodiment 1 As Figure 1 shown, a method for constructing the safe operating boundary of a power grid based on active learning includes the following steps: S1. Set the steady-state constraint model of the power system, including node voltage magnitude constraints, branch current constraints, generator active power capacity constraints, generator reactive power capacity constraints, and system power flow constraints; S2. On the basis of the steady-state constraint model, construct a differential equation of the system state under steady-state conditions to form a power grid safety assessment model based on the residual network; S3. On the basis of the power grid safety assessment model, analyze the mapping relationship between the safe operating boundary of the power grid and the power grid safety assessment model, and obtain the power grid safe operating boundary function through active learning as the basis for judging whether the operating point is safe; S4. Define the safety distance as the matching degree between the actual safety condition of the operating point and the safety condition obtained through the power grid security operation boundary function, and use the safety distance as the screening strategy for sample data to screen the sample data and train the power grid security assessment model and the power grid security operation boundary function; S5. Based on the trained power grid security assessment model and the power grid security operation boundary function, judge whether the operating point is safe.

[0020] For various daily constraints of the power system, mainly including power system load demand constraints, safe operation constraints, and reliability constraints. Among them, the power system load demand constraint guarantees the power consumption demand of power users and also maintains the power supply and demand balance of the power system; the power system safe operation constraint aims to ensure the safety and stability of the power system and guarantee the safe power supply of the power system; the power system reliability constraint is used to ensure the reliability of the power system power supply and ensure the power consumption safety of power users. This embodiment mainly analyzes the safe operation constraints under the steady-state operation conditions of the power system and constructs a power grid security assessment model in cooperation with the residual network.

[0021] In S1, the specific constraint conditions in the steady-state constraint model are as follows: S1.1. Assume that the voltage amplitude of node i is , then the node voltage amplitude constraint is expressed as: ; In the formula, , respectively represent the upper limit and lower limit of the voltage amplitude of node i; n is the number of nodes; S1.2. In order to avoid system instability problems caused by equipment overload, line heating, etc., it is often required that the current of each branch of the power system also be kept within a certain range. The branch current constraint is expressed as: ; In the formula, represents the circuit amplitude size of branch ; represents the amplitude upper limit of branch ; v represents the index of the branch, and l is the number of branches; S1.2. As the injection equipment of active and reactive power in the power system, due to various reasons such as power grid and voltage stability, generator self-overload protection, and reactive power compensation, the input capacity of its active and reactive power also needs to be restricted. The generator active power capacity constraint and the reactive power capacity constraint are expressed as: ; In the formula, , respectively represent the active and reactive power outputs of generator k; K is the number of generators; , respectively represent the upper and lower limits of the active power output of generator k; , respectively represent the upper and lower limits of the reactive power output of generator k; S1.3. The system power flow constraint in polar coordinates is expressed as: ; In the formula, , respectively represent the active and reactive power outputs of node i; indicates that node j is an adjacent node of node i; is the voltage amplitude of node j; represents the conductance of line ij between node i and node j; represents the susceptance of line ij; is the voltage phase angle difference between node i and node j.

[0022] In S1.3, since the resistance of equipment such as lines is much smaller than the reactance, and the phase angle difference at both ends of the line is very small, for line ij, it can be considered that , , , then can be expressed as: ; It is represented in matrix form: ; In the formula, is the voltage phase angle difference matrix; B is the imaginary part of the node admittance matrix; P is the active power output matrix; X is the reactance matrix; Then the active power flow of line ij and the node phase angle difference satisfy the following relationship: ; In the formula, is the reactance of line ij.

[0023] In S2, the process of forming the power grid security assessment model based on the residual network is as follows. Assume that the training sample set for establishing the power grid security assessment model is , where \(u\) is the injection power vector of the node, which is given as the input of the model; \(g\) represents the security state of the power system and can be represented by one-hot encoding. \([1, 0]\) and \([0, 1]\) represent safe and unsafe respectively. For the structure setting of the residual network, a single-layer fully connected method is adopted, and the number of residual modules is set to \(m\). Then, the power grid security assessment model based on the residual network is expressed as: ; In the formula, represents the input of the power grid security assessment model, \(z = 1, 2, \cdots, m\); for the residual module \(z\), and are the two weight parameters of this residual module; , are the two weight parameters of the output layer; represents the function result after classification, and the predicted probability information is obtained after being processed by the softmax normalization function : .

[0024] In S2, the power grid safe operation boundary function is expressed as: ; In the formula, , are the output layer weight parameters of the power grid security assessment model in the safe state of the power grid; , are the output layer weight parameters of the power grid security assessment model in the unsafe state of the power grid; , are the parameters obtained through active learning and are used to define the boundary function.

[0025] When , it indicates that the operating point is in the critical state between safe and unsafe; when , it indicates that the operating point is in a safe state; when , it indicates that the operating point is in an unsafe state.

[0026] Since the power grid safe operation boundary function is obtained based on the power grid security assessment model, in order to improve the accuracy of the power grid security assessment model, the safety distance is used as the sample screening strategy. The safety distance can be described as the matching degree between the actual safety situation of the operating point and the safety situation obtained through the current power grid security assessment model. It can be seen from this that when the actual operating point is inside and outside the safe operation boundary, its safety distance is large, the reliability is high, and the impact on the power grid security assessment model is relatively small. When the actual operating point is on the safe operation boundary, the safety distance is the smallest at this time, and the impact on the power grid security assessment model is the largest.

[0027] In S4, is used to approximate the safety distance, that is: ; Each time, the smallest part is selected. The specific method is to define a safety distance threshold and select the sample data less than the safety distance threshold as the filtered sample data.

[0028] In S4, the training process is as follows: S4.1. Obtain the initial sample set, calibrate the sample data in the initial sample set through a simulation tool, and form an initial power grid safety assessment model through active learning; S4.2. Use the training set to be calibrated selected by the safety distance assessment, filter the sample data based on the safety distance threshold, and form a new training set; S4.3. Through active learning, use the new training set to train the power grid safety assessment model and the power grid safe operation boundary function, and update the parameters; S4.4. Judge whether the accuracy of the safety classification reaches the set accuracy threshold. If it reaches the accuracy threshold, the iteration ends; otherwise, return to S4.2 to continue the iterative training.

[0029] The simulation tool selects MATLAB. Through the PSAT simulation software of MATLAB, in order to simulate the load fluctuations under different conditions, a random fluctuation of 0.5 - 0.8 is set on the base output of two generator nodes. Considering the in-situ balance of reactive power, only the change of the injected active power of the load node and the generator node is concerned.

[0030] The safety distance threshold is adjusted by a dynamic adaptive mechanism, which specifically includes the following steps: Step 1. Set the safety distance threshold as , where t represents the current iteration round, initialize the safety distance threshold as , and set the benchmark accuracy improvement rate β; Step 2. In each iterative training, calculate the difference between the current model accuracy and the accuracy of the previous round: ; Step 3. Adjust the threshold according to : If , then reduce the threshold , where is the adjustment parameter 1, and ; If If the number of filtered samples is lower than the preset ratio, then the threshold is enlarged. , where is the second adjustment parameter, and ; Step 4. Filter the sample data through the dynamically adjusted safety distance threshold and update the parameters of the power grid security assessment model.

[0031] The verification process is as follows: Figure 2 is the IEEE 39-bus system diagram of a certain area. Considering the existence of reactive power compensation, the impact caused by the change of reactive power is not considered, and only the active power injection is changed. The injection powers of buses 1 and 2 are combined and changed to obtain the sample set to be calibrated, which is used for the subsequent assessment model to screen the sample set. Combining this system diagram, a power grid security assessment model based on a residual network is constructed. By selecting an appropriate sample screening strategy through the safety distance, the data with greater influence in the sample set to be calibrated is screened out and calibrated, which is used for the iteration and update of the model, and the effectiveness of the method for constructing the power grid safe operation boundary based on active learning is verified.

[0032] It can be seen from Figure 3 that when 30 samples are used as the initial sample set, the obtained initial safe operation assessment model has a large error, and the samples in the initial training set have a large dispersion and are probabilistically distributed at various positions in the power generation combination space. Figures 3 - 5 In 1 , the abscissa P 2 represents the active power injection of bus 1, the ordinate P represents the active power injection of bus 2, and the unit of both is per unit value p.u., the blue triangles represent , and the red circles represent

[0033] Figure 4 is the safe boundary training diagram with 60 samples and 10 iterations. It can be seen that increasing the initial training set to 60 and performing ten iterations to update the parameters of the safe operation assessment model has a good improvement on the safe operation assessment model and the boundary function. At the same time, the new samples screened in each iteration are the sample data closer to the safe operation boundary, which reduces the dependence of the safe operation assessment model on the overall data to a certain extent, increases the speed of training the model, and improves the efficiency of iteration.

[0034] Figure 5 is the safe boundary training diagram with 90 samples and 20 iterations. It can be seen that if the initial training set is continuously increased and the number of iterations is increased, the correction effect on the power grid security assessment model and the safe operation boundary function is better.

[0035] Embodiment 2 A device for constructing the grid security operation boundary based on active learning, comprising a memory, a processor, and a computer program stored on the memory and capable of running on the processor. The method described in Embodiment 1 is implemented by the processor executing the computer program.

Claims

1. A method for constructing a safe operation boundary of a power grid based on active learning, characterized in that The following steps are involved: S1. Set up a steady-state constraint model for the power system, including node voltage amplitude constraints, branch current constraints, generator active capacity constraints, generator reactive capacity constraints and system flow constraints; S2. On the basis of the steady-state constraint model, a differential equation of the system state under steady-state conditions is constructed to form a power grid security assessment model based on a residual network; S3. On the basis of the power grid security assessment model, the mapping relationship between the power grid safe operation boundary and the power grid security assessment model is analyzed, and the power grid safe operation boundary function is obtained through active learning as the basis for judging whether the operating point is safe; S4. Define the safety distance as the degree of match between the actual safety situation of the operating point and the safety situation obtained by the current power grid safety operation boundary function, use the safety distance as a screening strategy for sample data, screen the sample data to train the power grid safety assessment model and the power grid safety operation boundary function; S5. Based on the trained power grid security assessment model and the power grid safe operation boundary function, determine whether the operating point is safe.

2. According to claim 1, a method for constructing a safe operation boundary of a power grid based on active learning is characterized in that: In S1, the various constraints in the steady-state constraint model are specifically: S1.1, Assume that the voltage amplitude of node i is , then the node voltage amplitude constraint It is expressed as: ; In the formula, , Respectively represent the upper and lower limits of the voltage amplitude of node i; n is the number of nodes; S1.2, branch current constraints It is expressed as: ; In the formula, Indicates branch The circuit amplitude size; Indicates branch The upper limit of the amplitude; v represents the index of the branch, l is the number of branches; S1.

2. Generator active capacity constraints and reactive capacity constraints It is expressed as: ; In the formula, , They represent the active and reactive outputs of generator k respectively; K is the number of generators; , They represent the upper and lower limits of the active output of generator k respectively; , Respectively represent the upper and lower limits of the reactive output of generator k; S1.3, the system power flow constraint in polar coordinates is expressed as: ; In the formula, , Respectively represent the active and reactive output of node i; Indicates that node j is an adjacent node of node i; is the voltage amplitude of node j; represents the conductance of line ij between node i and node j; represents the susceptance of line ij; is the voltage phase angle difference between node i and node j.

3. A method for constructing a safe operation boundary of a power grid based on active learning according to claim 2, characterized in that: In S1.3, for line ij, , , ,but Can be expressed as: ; Represented in matrix form: ; In the formula, is the voltage phase difference matrix; B is the imaginary part of the node admittance matrix; P is the active output matrix; X is the reactance matrix; Then the active power flow of line ij and the node phase angle difference satisfy the following relationship: ; In the formula, is the reactance of line ij.

4. A method for constructing a safe operation boundary of a power grid based on active learning according to claim 2, characterized in that: In S2, the process of forming a power grid security assessment model based on a residual network is as follows: Assume that the training sample set for establishing the power grid security assessment model is , where u is the node's injected power vector, which is given as the input of the model; g represents the safety state of the power system, [1, 0] and [0, 1] represent safety and insecurity respectively. A single-layer full connection method is adopted, and the number of residual modules is set to m. The power grid security assessment model based on the residual network is expressed as: ; In the formula, represents the input of the power grid security assessment model, z=1, 2, ..., m; for the residual module z, and are the two weight parameters of the residual module; , are the two weight parameters of the output layer; Represents the function result after classification, and the predicted probability information is obtained after being processed by the softmax normalization function : 。 5. A method for constructing a safe operation boundary of a power grid based on active learning according to claim 4, characterized in that: In S2, the power grid safe operation boundary function It is expressed as: ; In the formula, , is the output layer weight parameter of the power grid security assessment model under the power grid security state; , is the output layer weight parameter of the power grid security assessment model under the power grid insecure state; , are the parameters obtained through active learning and are used to define the boundary function.

6. A method for constructing a safe operation boundary of a power grid based on active learning according to claim 5, characterized in that: when When , it indicates that the operating point is in a critical state between safety and unsafety; when When It indicates that the operating point is in an unsafe state.

7. A method for constructing a safe operation boundary of a power grid based on active learning according to claim 6, characterized in that: In the S4, the To approximate the safety distance, it is: ; Define the safety distance threshold, select The sample data that is smaller than the safety distance threshold is used as the filtered sample data.

8. The method for constructing a safe operation boundary of a power grid based on active learning according to claim 7, characterized in that: In the above S4, the training process is: S4.

1. Obtain an initial sample set, calibrate the sample data in the initial sample set through a simulation tool, and form an initial power grid security assessment model through active learning; S4.2, using the training set to be calibrated selected by the safety distance assessment, filter the sample data based on the safety distance threshold to form a new training set; S4.3, through active learning, use the new training set to train the power grid security assessment model and the power grid safe operation boundary function and update the parameters; S4.

4. Determine whether the accuracy of the security classification reaches the set accuracy threshold. If it reaches the accuracy threshold, the iteration ends, otherwise return to S4.2 to continue iterative training.

9. A method for constructing a safe operation boundary of a power grid based on active learning according to claim 8, characterized in that: The safety distance threshold is adjusted using a dynamic adaptive mechanism, which specifically includes the following steps: Step 1: Set the safety distance threshold to , t represents the current iteration round, and the initial safety distance threshold is , and set the benchmark accuracy improvement rate β; Step 2: Calculate the current model accuracy in each iteration of training Compared with the previous round accuracy The difference: ; Step 3: According to Adjusting the Threshold : like , then reduce the threshold ,in is the adjustment parameter 1, and ; like If the number of samples after screening is lower than the preset ratio, the threshold is expanded. ,in is the second adjustment parameter, and ; Step 4: Dynamically adjusted safety distance threshold Filter sample data and update the parameters of the power grid security assessment model.

10. A device for constructing a safe operation boundary of a power grid based on active learning, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, and the method according to any one of claims 1 to 9 is implemented by executing the computer program by the processor.