A power grid operation risk control method and system
By constructing an isolated tree with weighted path length and evaluating the degree of abnormality of electrical parameters, the misjudgment problem of abnormality detection in traditional isolated forest algorithms is solved, and the accuracy of grid operation risk control is improved.
Patent Information
- Application Number
- CN202411242943.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-05
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2044-09-05
AI Technical Summary
Traditional isolated forest algorithms ignore the degree of abnormality of electrical parameters in grid abnormality detection, resulting in the failure of key information to fully play a role, which may lead to the real abnormal data being misjudged as normal data, affecting the safe and stable operation of the power grid.
By building an isolated tree and weighting the path length according to the anomaly degree of each electrical data layer, the weighted path length is obtained, and the degree of abnormality is evaluated based on the deviation degree of electrical parameters and the kurtosis, improving the accuracy of abnormality detection.
It significantly improves the accuracy of abnormal detection, reduces misjudgment, and ensures the safe and stable operation of the power grid.
Smart Images

Figure CN119066589B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a method and system for controlling power grid operation risks. Background Art
[0002] As the infrastructure of modern society, the stable operation of the power grid is crucial to national security, economic development and people's lives. Nowadays, with the continuous growth of residential electricity demand, the bearing pressure of the power grid has increased significantly, and the operation safety faces severe challenges. Once a power grid fails, it may cause large-scale power outages or even unsafe accidents, seriously affecting industrial production, commercial operations and residents' lives, causing huge economic losses and social impacts. Therefore, effectively managing and reducing the operation risks of the power grid has become an important issue that needs to be urgently addressed in the power industry. In the field of power grid operation monitoring, factors such as equipment failure, overload and external interference often lead to abnormal conditions such as voltage drop and current surge, which in turn cause abnormal data in different electrical data. Therefore, a power grid operation risk management method and system are proposed to evaluate the operation risk of the power grid by collecting electrical data and analyzing the abnormal data in the electrical data.
[0003] The patent document with the authorization announcement number CN111798312B currently discloses a method for identifying anomalies in financial transaction systems based on the isolation forest algorithm. The method performs consistency checks on the original data, removes invalid data and duplicate data, fills in missing values, and converts categorical variables into numerical variables; performs isolation forest modeling on the input data; calculates the path length of the sample point in the isolation forest model to calculate the anomaly score; sets an anomaly score threshold based on experience, judges trading behaviors with anomaly scores greater than the threshold as abnormal behaviors, and reports the abnormal behaviors to the verification module.
[0004] When using the traditional isolation forest algorithm in the above method to analyze abnormal data in electrical data, the average path length of each data in all isolated trees is calculated with the same weight to evaluate its abnormality. However, this ignores the key role of various electrical parameters with higher abnormality in electrical data in anomaly detection, resulting in the failure to fully play the role of these key information in the model construction process, and thus some isolated trees that perform well in specific abnormal modes fail to receive due attention in the calculation of the final anomaly score, which may cause the real abnormal data to be misjudged as normal data, posing a potential threat to the safe and stable operation of the power grid. Summary of the invention
[0005] To solve the technical problem that the traditional isolation forest algorithm calculates the average path length of each data in all isolation trees with the same weight to evaluate its abnormality, ignores the key role of electrical parameters with a higher degree of abnormality in anomaly detection, and may lead to misjudgment of real abnormal points as normal, the present invention provides a power grid operation risk control method and system.
[0006] In the first aspect, the present invention provides a power grid operation risk control method, adopting the following technical solution:
[0007] A power grid operation risk control method includes the steps of:
[0008] Collect each electrical data and each electrical parameter sequence, where each electrical data includes each electrical parameter; obtain the historical data of each data in each electrical parameter sequence; obtain the deviation degree of each data in each electrical parameter sequence, where the deviation degree represents the prominent degree of the value of each data in each electrical parameter sequence compared with the value of its historical data; obtain the abnormality degree of each electrical parameter: ; where represents the abnormality degree of the k-th electrical parameter; represents the deviation degree of the i-th data in the k-th electrical parameter sequence; represents the number of data in the k-th electrical parameter sequence; represents the kurtosis of the deviation degrees of all data in the k-th electrical parameter sequence; exp() represents the exponential function with the natural constant as the base;
[0009] Construct each isolation tree according to each electrical parameter of all electrical data, and obtain the path length of each electrical data in each isolation tree according to each isolation tree; obtain the weighted path length of each electrical data in each isolation tree, where the weighted path length is obtained by weighting the path length of each electrical data in each isolation tree by the abnormality degree of the corresponding electrical parameter of the layer where each electrical data is located;
[0010] According to the weighted path length of each electrical data in each isolation tree, obtain the anomaly score of each electrical data to obtain abnormal data.
[0011] The innovation of the present invention lies in weighting the path lengths of each electrical data in each isolated tree according to the degree of abnormality of the electrical parameter corresponding to the layer where each electrical data is located in each isolated tree, obtaining the weighted path lengths of each electrical data in each isolated tree, considering the different roles of the degrees of abnormality of different electrical parameters in anomaly detection, making the abnormal data have shorter path lengths in the isolated tree, facilitating subsequent identification as abnormal data, reducing the situation of misjudgment, and thus significantly improving the accuracy of anomaly detection; further, the degree of abnormality of each electrical parameter is first comprehensively evaluated by the direct difference between any data in the electrical parameter sequence and the average level of its historical data and the change in the degree of dispersion of the historical data distribution caused by the addition of this data, and finally, the mean value and kurtosis of the deviation degrees of all data in each electrical parameter sequence are used to evaluate the degree of abnormality of each electrical parameter, making the degree of abnormality of each electrical parameter more accurate.
[0012] Preferably, obtaining the historical data of each data in each electrical parameter sequence includes:
[0013] Presetting the number of historical data m, and denoting the m data before the i-th data in the k-th electrical parameter sequence in the k-th electrical parameter sequence as the historical data of the i-th data in the k-th electrical parameter sequence.
[0014] It is convenient to subsequently analyze the degree to which the value of each data deviates from the value of its historical data, and obtain the deviation degree of each data in each electrical parameter sequence.
[0015] Preferably, obtaining the deviation degree of each data in each electrical parameter sequence includes:
[0016] ;
[0017] In the formula, represents the deviation degree of the i-th data in the k-th electrical parameter sequence; represents the value of the i-th data in the k-th electrical parameter sequence; represents the mean value of all historical data of the i-th data in the k-th electrical parameter sequence; represents the range of all historical data of the i-th data in the k-th electrical parameter sequence; represents the coefficient of variation of the values of the i-th data and all its historical data in the k-th electrical parameter sequence; represents the coefficient of variation of the values of all historical data of the i-th data in the k-th electrical parameter sequence; represents the hyperbolic tangent function.
[0018] It is convenient to subsequently obtain the degree of abnormality of each electrical parameter according to the deviation degree of each data in each electrical parameter sequence.
[0019] Preferably, constructing each isolation tree according to each electrical parameter of all electrical data includes:
[0020] Presetting the number of isolation trees M and the depth W of each isolation tree, constructing M isolation trees according to multiple electrical parameters of all electrical data. For any one isolation tree, randomly select any one electrical parameter of all electrical data for splitting at the first layer of the isolation tree, and the splitting value is a random value within the value range of the electrical parameter of all electrical data. According to the splitting method of the first layer of the isolation tree, randomly select any one electrical parameter of all electrical data for splitting at the second layer of the isolation tree, and so on, until the depth of the isolation tree reaches W and then stop.
[0021] Preferably, obtaining the path length of each electrical data in each isolation tree includes:
[0022] Taking the number of edges passed from the root node of each isolation tree to each electrical data in each isolation tree as the path length of each electrical data in each isolation tree.
[0023] Preferably, obtaining the weighted path length of each electrical data in each isolation tree includes:
[0024] ;
[0025] In the formula, represents the weighted path length of the d-th electrical data in the c-th isolation tree; represents the path length of the d-th electrical data in the c-th isolation tree; represents the degree of abnormality of the electrical parameter corresponding to the layer where the d-th electrical data in the c-th isolation tree is located; exp() represents the exponential function with the natural constant as the base.
[0026] If the degree of abnormality of the electrical parameter corresponding to the layer where each electrical data in the isolation tree is located is greater, it indicates that each electrical data is more abnormal, and the path length of each electrical data in the isolation tree is adjusted smaller, which is convenient to detect it as abnormal data.
[0027] Preferably, obtaining the anomaly score of each electrical data according to the weighted path length of each electrical data in each isolation tree to obtain abnormal data includes:
[0028] Presetting an anomaly threshold T, taking the mean value of the weighted path lengths of the d-th electrical data in all isolation trees as the weighted average path length of the d-th electrical data, and obtaining the weighted average path length of all electrical data; using the isolation forest algorithm, obtaining the anomaly score of each electrical data according to the weighted average path length of each electrical data. If the anomaly score of any electrical data is greater than or equal to the anomaly threshold, then the electrical data is abnormal data.
[0029] The accuracy of the anomaly detection result is improved.
[0030] Preferably, the collection of each electrical data and each electrical parameter sequence includes:
[0031] The preset sampling time is 1 second / time. Current sensors, voltage sensors, and temperature sensors are installed at key positions on the power grid bus. Each time, current data, voltage data, and temperature data are collected as an electrical data, and the collection lasts for two hours; each electrical data includes three electrical parameters (current data, voltage data, and temperature data);
[0032] Sort all the electrical parameters of all electrical data in ascending order according to the sampling time to obtain each electrical parameter sequence.
[0033] In a second aspect, the present invention provides a power grid operation risk control system, adopting the following technical solution:
[0034] A power grid operation risk control system includes: a processor and a memory. The memory stores computer program instructions, and when the computer program instructions are executed by the processor, the above-mentioned power grid operation risk control method is implemented.
[0035] By adopting the above technical solution, the above-mentioned power grid operation risk control method is generated into a computer program and stored in the memory to be loaded and executed by the processor. Thus, a terminal device is manufactured according to the memory and the processor, which is convenient to use.
[0036] The present invention has the following technical effects: According to the anomaly degree of the corresponding electrical parameter of each electrical data in each isolated tree at the layer where it is located, the present invention weights the path length of each electrical data in each isolated tree to obtain the weighted path length of each electrical data in each isolated tree. Considering the different roles of the anomaly degrees of different electrical parameters in anomaly detection, finally, the abnormal data has a shorter path length in the isolated tree, which is convenient to be identified as abnormal data subsequently, reducing the situation of misjudgment, and thus significantly improving the accuracy of anomaly detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] By referring to the following detailed description with reference to the drawings, the above and other objects, features, and advantages of the exemplary embodiments of the present invention will become easy to understand. In the drawings, several embodiments of the present invention are shown in an exemplary rather than restrictive manner, and the same or corresponding reference numerals represent the same or corresponding parts.
[0038] Figure 1 It is a flowchart of the method in an embodiment of a power grid operation risk control method of the present invention. DETAILED DESCRIPTION
[0039] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative efforts belong to the scope of protection of the present invention.
[0040] It should be understood that when terms such as "first" and "second" are used in the claims, the description, and the drawings of the present invention, they are only used to distinguish different objects, rather than to describe a specific order. The terms "including" and "comprising" used in the description and claims of the present invention indicate the presence of the described features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their combinations.
[0041] An embodiment of the present invention discloses a method for controlling power grid operation risks. Refer to Figure 1 , including steps S1 - S3:
[0042] S1: Collect electrical data and various electrical parameter sequences during the operation of the power grid.
[0043] It should be noted that the purpose of the present invention is to judge the abnormal conditions during the operation of the power grid by real - time monitoring of the electrical data during the operation of the power grid in a certain area. The known types of electrical parameters during the operation of the power grid include current data, voltage data, temperature data, etc.
[0044] In the embodiment of the present invention, the preset sampling time is 1 second / time. Current sensors, voltage sensors, and temperature sensors are installed at key positions on the power grid bus. Each time, current data, voltage data, and temperature data are collected for a total of two hours to obtain each electrical data. Each electrical data includes three electrical parameters (current data, voltage data, and temperature data);
[0045] Sort the electrical parameters of all electrical data in ascending order according to the sampling time to obtain each electrical parameter sequence.
[0046] S2: Obtain the historical data of each data in each electrical parameter sequence, and obtain the deviation degree of each data in each electrical parameter sequence according to the deviation of each data in its historical data; obtain the abnormal degree of each electrical parameter according to the deviation degree of each data in each electrical parameter sequence.
[0047] It should be noted that electrical data with a relatively high known degree of abnormality can often quickly and accurately capture the key information of abnormal features. However, when the traditional isolation forest algorithm analyzes abnormal data in electrical data, it calculates the average path length of each data in all isolation trees with the same weight to evaluate its abnormality. However, this ignores the key role of various electrical parameters with a relatively high degree of abnormality in electrical data in anomaly detection, resulting in the failure of these key information to fully play its role in the model construction process. Furthermore, some isolation trees that perform excellently under specific abnormal patterns fail to receive due attention in the calculation of the final anomaly score, which may lead to misjudging real abnormal points as normal, posing a potential threat to the safe and stable operation of the power grid.
[0048] Step S2 includes steps S20 - S21, which are specifically as follows:
[0049] S20: Obtain the historical data of each data in each electrical parameter sequence, and obtain the deviation degree of each data in each electrical parameter sequence according to the deviation of each data in its historical data.
[0050] It should be noted that timely detecting the abnormality of electrical parameters during the operation of the power grid is crucial for ensuring the safe and stable operation of the power grid. It is known that due to the complex and changeable actual environment, such as sudden increase in regional load, short - circuit on the transmission line, open - circuit of the transmission line, etc., these situations are often accompanied by significant changes in electrical parameters, and these rapidly changing data represent the occurrence of unsafe events. Therefore, it is necessary to analyze whether a data deviates from other data by combining the change characteristics of any data in each electrical parameter sequence. However, the operating state of the power grid will change with various factors such as time, load change, weather conditions, etc. Directly analyzing all data in each electrical parameter sequence may not accurately reflect the actual state of the data. Therefore, select the data within a certain historical period in its electrical parameter series as the historical data of the data, and consider the direct difference between the data and the average level of its historical data as well as the change in the dispersion degree of the historical data distribution caused by the addition of the data to comprehensively evaluate the deviation degree of the data.
[0051] In the embodiment of the present invention, a preset number of historical data m is set. Denote the m data before the i - th data in the k - th electrical parameter sequence in the k - th electrical parameter sequence as the historical data of the i - th data in the k - th electrical parameter sequence; in the embodiment of the present invention, the preset number of historical data m = 20. In other embodiments, the implementer can preset the value of the number of historical data according to the specific implementation situation.
[0052] Obtain the deviation degree of the i - th data in the k - th electrical parameter sequence:
[0053] ;
[0054] In the formula, represents the degree of deviation of the i-th data in the k-th electrical parameter sequence; represents the value of the i-th data in the k-th electrical parameter sequence; represents the mean value of all historical data of the i-th data in the k-th electrical parameter sequence; represents the range of all historical data of the i-th data in the k-th electrical parameter sequence. It should be noted that the acquisition of the range of the data set is a prior art and will not be elaborated in detail in the embodiments of the present invention; represents the coefficient of variation of the value of the i-th data and all its historical data in the k-th electrical parameter sequence; represents the coefficient of variation of the values of all historical data of the i-th data in the k-th electrical parameter sequence. It should be noted that the acquisition of the coefficient of variation of the values of all data in the data is a well-known technology and will not be elaborated in detail in the embodiments of the present invention; represents the hyperbolic tangent function, which is used for normalization processing.
[0055] represents the deviation of the value of the i-th data in the k-th electrical parameter sequence from the average level of the values of all its historical data. When the range is relatively small, it indicates that the values of all historical data of the i-th data in the k-th electrical parameter sequence are relatively concentrated. At this time, if the value of the i-th data is significantly different from the average value of all its historical data, then has a large value, indicating that the i-th data in the k-th electrical parameter sequence is significantly higher than the values of all its historical data; therefore, the degree of deviation of the i-th data in the k-th electrical parameter sequence is relatively large.
[0056] represents the difference between the coefficient of variation of the value of the i-th data and all its historical data in the k-th electrical parameter sequence and the coefficient of variation of the values of all historical data of the i-th data in the k-th electrical parameter sequence. The larger its value, the more significant the addition of the i-th data in the k-th electrical parameter sequence enhances the dispersion degree of all its historical data. Therefore, the degree of deviation of the i-th data in the k-th electrical parameter sequence is relatively large.
[0057] S21: Obtain the abnormality degree of each electrical parameter according to the deviation degree of each data in each electrical parameter sequence.
[0058] It should be noted that the normal operating ranges of various electrical parameters (such as voltage, current, temperature, etc.) during the operation of the power grid are crucial for the stability and efficiency of the system. If some electrical parameters deviate from the normal range or exhibit abnormal fluctuations, it may lead to a decline in the performance of the power grid system, equipment damage, or even safety accidents. Therefore, the degree of abnormality of each electrical parameter can be obtained based on the deviation degree of all data in the sequence of each electrical parameter. However, it ignores whether there are extreme values in the distribution of the deviation degrees of all data in each electrical parameter. For example, there are a small number of data with a relatively high deviation degree in all data of the sequence of each electrical parameter, which means that this electrical parameter is abnormal and its degree of abnormality is relatively large. Then, when quantifying the degree of abnormality of this electrical parameter only based on the average value of the deviation degrees of all data in the sequence of each electrical parameter, it may cause the data with a relatively high deviation degree to be averaged to a lower or median value by the data with a relatively low deviation degree, and it will be mistakenly considered that the degree of abnormality of this electrical parameter is relatively low. Therefore, by combining the kurtosis of the deviation degrees of all data in the sequence of each electrical parameter and the average value of the deviation degrees of all data in the sequence of each electrical parameter, the degree of abnormality of each electrical parameter is obtained. If the kurtosis is large and the average value is large, it indicates that the degree of abnormality of each electrical parameter is relatively high.
[0059] In the embodiment of the present invention, the degree of abnormality of the k-th electrical parameter is obtained:
[0060] ;
[0061] In the formula, represents the degree of abnormality of the k-th electrical parameter; represents the deviation degree of the i-th data in the sequence of the k-th electrical parameter; represents the number of data in the sequence of the k-th electrical parameter; represents the kurtosis of the deviation degrees of all data in the sequence of the k-th electrical parameter; exp() represents the exponential function with the natural constant as the base;
[0062] represents the average value of the deviation degrees of all data in the sequence of the k-th electrical parameter. The larger this value is, the more data in the sequence of the k-th electrical parameter deviate from its average level, that is, it is considered that there are more abnormal data in the sequence of the k-th electrical parameter; The larger the value of
[0063] S3: construct multiple isolated trees based on multiple electrical parameters of all electrical data; obtain the weighted path length of each electrical data in each isolated tree based on the abnormality of the electrical parameter corresponding to the layer where each electrical data is located in each isolated tree; obtain abnormal data based on the weighted path length of each electrical data in each isolated tree.
[0064] Step S3 includes steps S30 and S31, which are specifically as follows:
[0065] S30: construct multiple isolated trees according to multiple electrical parameters of all electrical data; obtain the weighted path length of each electrical data in each isolated tree according to the abnormality degree of the electrical parameter corresponding to the layer where each electrical data is located in each isolated tree.
[0066] It should be noted that when the traditional isolation forest algorithm performs anomaly detection on electrical data, all electrical parameters of the electrical data are considered equally important, which ignores the different roles of different electrical parameters in power grid stability and anomaly detection. For example, when a voltage drop occurs in the power grid, the abnormality of voltage-related electrical parameters (such as voltage data) may be very high. Therefore, an isolation tree is first constructed based on multiple electrical parameters of all electrical data, and then the path length of each electrical data in each isolated tree is adjusted according to the abnormality of the electrical parameter corresponding to the layer where each electrical data is located in each isolated tree. When the abnormality of the electrical parameter corresponding to the layer where each electrical data is located in each isolated tree is greater, the path length of each electrical data in each isolated tree needs to be adjusted to a smaller size, so that the abnormal data has a shorter path length in the isolated tree, which is convenient for subsequent identification as abnormal data.
[0067] In an embodiment of the present invention, the number of isolated trees M and the depth of each isolated tree W are preset, and M isolated trees are constructed according to multiple electrical parameters of all electrical data. For any isolated tree, any electrical parameter of all electrical data is randomly selected from the first layer of the isolated tree for segmentation, and the segmentation value is a random value within the value range of the electrical parameter of all electrical data. According to the first-layer segmentation method of the isolated tree, any electrical parameter of all electrical data is randomly selected from the second layer of the isolated tree for segmentation, and so on, until the depth of the isolated tree is W and stops.
[0068] It should be noted that the root node of the isolation tree is the 0th layer, and the depth of the isolation tree is the sum of the layers of the isolation tree.
[0069] In the embodiment of the present invention, the preset number of isolated trees M=20, and the depth of each isolated tree W=8. In other embodiments, implementers may preset the values of M and W according to the specific implementation scope.
[0070] The path length of each electrical data in each isolated tree is the number of edges passed from the root node of each isolated tree to each electrical data in each isolated tree.
[0071] In the embodiment of the present invention, the weighted path length of each electrical data in each isolated tree is obtained:
[0072] ;
[0073] In the formula, represents the weighted path length of the d-th electrical data in the c-th isolated tree; represents the path length of the d-th electrical data in the c-th isolated tree; represents the degree of abnormality of the electrical parameter corresponding to the layer where the d-th electrical data in the c-th isolated tree is located; exp() represents the exponential function with the natural constant as the base; when the degree of abnormality of the electrical parameter corresponding to the layer where the d-th electrical data in the c-th isolated tree is located is higher, it indicates that the d-th electrical data in the c-th isolated tree is more likely to be abnormal data, and in the traditional isolated tree, the smaller the path length, the more abnormal the data. Therefore, it is necessary to make the path length of the more abnormal electrical data smaller.
[0074] S31: Obtain abnormal data according to the weighted path length of each electrical data in each isolated tree.
[0075] It should be noted that since abnormal data often deviates from the distribution pattern of normal data, resulting in abnormal data having a shorter path length in the isolated tree. Therefore, first, the weighted average path length of each electrical data is obtained according to the weighted path length of each electrical data in each isolated tree, and the abnormal score of each electrical data is obtained, thereby improving the accuracy of abnormal detection.
[0076] In the embodiment of the present invention, the mean value of the weighted path lengths of the d-th electrical data in all isolated trees is used as the weighted average path length of the d-th electrical data; the weighted average path lengths of all electrical data are obtained; using the isolation forest algorithm, according to the weighted average path length of each electrical data, the abnormal score of each electrical data is obtained, and a preset abnormal threshold T is set. If the abnormal score of any electrical data is greater than or equal to the abnormal threshold, then the electrical data is abnormal data, and at this time, the system issues a warning to prompt the corresponding management personnel to control it.
[0077] The embodiment of the present invention also discloses a power grid operation risk control system, including a processor and a memory. The memory stores computer program instructions, and when the computer program instructions are executed by the processor, a power grid operation risk control method according to the present invention is implemented.
[0078] The above system also includes other components well known to those skilled in the art, such as a communication bus and a communication interface. Their settings and functions are known in the art and will not be elaborated herein.
[0079] In the present invention, the aforementioned memory can be any tangible medium that contains or stores a program, which can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, a computer-readable storage medium can be any suitable magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory, a dynamic random access memory, a static random access memory, an enhanced dynamic random access memory, a high-bandwidth memory, a hybrid memory cube, etc., or any other medium that can be used to store the required information and can be accessed by an application program, a module, or both. Any such computer storage medium can be part of the device or accessible or connectable to the device.
[0080] Although this specification has shown and described multiple embodiments of the present invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art will think of many changes, alterations, and alternative ways without departing from the spirit and scope of the present invention. It should be understood that various alternatives to the embodiments of the present invention described herein can be employed in the practice of the present invention.
[0081] The above are all preferred embodiments of the present invention, and the protection scope of the present invention is not limited thereby. Therefore, all equivalent changes made according to the structure, shape, and principle of the present invention shall be covered within the protection scope of the present invention.
Claims
1. A power grid operation risk control method, characterized in that, Including the steps of: Collecting various electrical data and sequences of various electrical parameters, where the various electrical data include various electrical parameters; obtaining the historical data of each data in the sequences of various electrical parameters; obtaining the deviation degree of each data in the sequences of various electrical parameters, where the deviation degree characterizes the prominence of the value of each data in the sequences of various electrical parameters compared to the value of its historical data. Obtain the abnormality degree of each electrical parameter: ; where represents the abnormality degree of the k-th electrical parameter; represents the deviation degree of the i-th data in the k-th electrical parameter sequence; represents the number of data in the k-th electrical parameter sequence; represents the kurtosis of the deviation degrees of all data in the k-th electrical parameter sequence; exp() represents the exponential function with the natural constant as the base; Constructing isolation trees for each electrical parameter based on all the electrical data, and obtaining the path length of each electrical data in each isolation tree according to each isolation tree; obtaining the weighted path length of each electrical data in each isolation tree, where the weighted path length is obtained by weighting the path length of each electrical data in each isolation tree by the abnormality degree of the corresponding electrical parameter at the layer where each electrical data is located in each isolation tree. Obtaining the anomaly score of each electrical data according to the weighted path length of each electrical data in each isolation tree, and obtaining the anomaly data.
2. The grid operation risk control method according to claim 1, wherein The obtaining of the historical data of each data in the sequences of various electrical parameters includes: Presetting the number of historical data m, and denoting the m data before the i-th data in the k-th electrical parameter sequence in the k-th electrical parameter sequence as the historical data of the i-th data in the k-th electrical parameter sequence.
3. A power grid operation risk control method according to claim 1, characterized in that, The obtaining of the deviation degree of each data in the sequences of various electrical parameters includes: ; In the formula, represents the deviation degree of the i-th data in the k-th electrical parameter sequence; represents the value of the i-th data in the k-th electrical parameter sequence; represents the mean value of all historical data of the i-th data in the k-th electrical parameter sequence; represents the range of all historical data of the i-th data in the k-th electrical parameter sequence; represents the coefficient of variation of the value of the i-th data and all its historical data in the k-th electrical parameter sequence; represents the coefficient of variation of the values of all historical data of the i-th data in the k-th electrical parameter sequence; represents the hyperbolic tangent function.
4. A power grid operation risk control method according to claim 1, characterized in that The constructing of isolation trees for each electrical parameter based on all the electrical data includes: Presetting the number of isolation trees M and the depth W of each isolation tree, constructing M isolation trees according to multiple electrical parameters of all the electrical data. For any one isolation tree, randomly select any one electrical parameter of all the electrical data for splitting at the first layer of the isolation tree, where the splitting value is a random value within the value range of the corresponding electrical parameter of all the electrical data. According to the splitting method at the first layer of the isolation tree, randomly select any one electrical parameter of all the electrical data for splitting at the second layer of the isolation tree, and so on, until the depth of the isolation tree reaches W and then stop.
5. A power grid operation risk control method according to claim 1, characterized in that The obtaining of the path length of each electrical data in each isolation tree includes: Taking the number of edges passed from the root node of each isolation tree to each electrical data in each isolation tree as the path length of each electrical data in each isolation tree.
6. The grid operation risk control method according to claim 1, wherein The obtaining of the weighted path length of each electrical data in each isolation tree includes: ; In the formula, represents the weighted path length of the d-th electrical data in the c-th isolated tree; represents the path length of the d-th electrical data in the c-th isolated tree; represents the degree of abnormality of the electrical parameter corresponding to the layer where the d-th electrical data is located in the c-th isolated tree; exp() represents the exponential function with the natural constant as the base.
7. A power grid operation risk control method according to claim 1, characterized in that The obtaining of the anomaly score of each electrical data according to the weighted path length of each electrical data in each isolation tree, and obtaining the anomaly data, includes: Presetting the anomaly threshold T, taking the mean value of the weighted path lengths of the d-th electrical data in all the isolation trees as the weighted average path length of the d-th electrical data, and obtaining the weighted average path lengths of all the electrical data; using the isolation forest algorithm, obtaining the anomaly score of each electrical data according to the weighted average path length of each electrical data. If the anomaly score of any electrical data is greater than or equal to the anomaly threshold, then the electrical data is anomaly data.
8. A power grid operation risk control method according to claim 1, characterized in that The collecting of various electrical data and sequences of various electrical parameters includes: The preset sampling time is once per second. Current sensors, voltage sensors, and temperature sensors are installed at key positions on the power grid bus. Each time, current data, voltage data, and temperature data are collected as an electrical data set, and the collection lasts for two hours. Each electrical data set includes current data, voltage data, and temperature data. Sort all the electrical parameters of the electrical data in ascending order according to the sampling time to obtain a sequence of each electrical parameter.
9. A power grid operation risk control and management system, characterized in that, It includes: A processor and a memory. The memory stores computer program instructions, and when the computer program instructions are executed by the processor, a power grid operation risk control method according to any one of claims 1-8 is implemented.
Citation Information
Patent Citations
A method for identifying anomalies in financial trading systems based on isolation forest algorithm
CN111798312B
Intelligent fault monitoring method for electric power communication equipment
CN117411811A
Security management system and method for data of Internet of Things
CN117574307A