Power grid resource clustering early warning method, system and device for new power system and storage medium

By fusing multi-source, multi-modal data and using the K-means clustering algorithm, a multivariate fault space is constructed, which solves the problem of insufficient proactive early warning in the power grid resource early warning system, realizes accurate and timely early warning of power grid resources, optimizes cluster analysis, and improves the efficiency of power grid resource management.

CN118035910BActive Publication Date: 2026-07-10STATE GRID ELECTRIC POWER RES INST +2

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
STATE GRID ELECTRIC POWER RES INST
Filing Date
2024-01-26
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Existing power grid resource early warning systems lack proactive early warning capabilities. The single static threshold early warning method is not adaptable enough and lacks multi-dimensional analysis, resulting in frequent false alarms and missed alarms, and failing to accurately capture power grid resource anomalies.

Method used

Multi-source and multi-modal power grid resource data fusion is adopted, K-means clustering algorithm is used for cluster analysis, and outlier points are detected by combining the change distance of cluster centers. A multi-dimensional fault space is constructed, and the warning thresholds of important and ordinary dimensions are calculated to conduct multi-dimensional cluster space warning analysis.

Benefits of technology

It enables proactive early warning of power grid resources, improves the accuracy and timeliness of early warning, reduces false alarms and missed alarms, optimizes cluster analysis algorithms, and comprehensively assists users in decision-making.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118035910B_ABST
    Figure CN118035910B_ABST
Patent Text Reader

Abstract

This invention discloses a method, system, device, and storage medium for power grid resource clustering early warning in new power systems. The method includes: aggregation of multi-source, multi-modal power grid resource data; digital conversion to form a vectorized representation; cluster analysis; outlier detection based on the distance of cluster center changes; construction of a multi-dimensional fault space; multi-dimensional cluster space early warning analysis; processing of fault information with missing dimensions; and submission to users for comprehensive analysis. This invention fully leverages the value of data from new power systems, identifying, warning of, and timely handling of potential power grid resource hazards before faults occur, establishing a proactive early warning model for power grid resources based on prevention. Based on the digital space and multi-dimensional fault space of the power grid, it proposes a power grid resource clustering analysis early warning method, improving the timeliness and accuracy of power grid resource early warning analysis. It effectively assists power companies at all levels in making power grid emergency repair decisions, improving users' electricity experience, and has significant practical implications for improving the reliability of power grid supply.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power grid digitalization technology, and in particular to a method, system, device and storage medium for power grid resource clustering early warning for new power systems. Background Technology

[0002] In recent years, with the continuous advancement of the construction of new power systems, the power supply structure and power grid structure have undergone in-depth adjustments, resulting in an increasingly large scale of power grid resources and significant changes in the operating characteristics of the power system, making the system security situation more severe. Therefore, higher standards and demands have been placed on the daily management of massive power grid resources. However, the current power grid resource operation and maintenance system only achieves post-event alarms and real-time alerts, failing to achieve proactive early warning. It lacks the ability to provide early warnings when various power grid resources in the new power system exhibit hidden dangers and anomalies, lacks the ability to resolve hidden dangers, and lacks a supporting management system. Furthermore, with the construction and development of new power systems, a large amount of data is constantly being generated and accumulated, but currently only some basic analytical methods are available, failing to realize the value of power grid resource data. When there are hidden dangers in power grid resources, the speed, accuracy, and timeliness of early warning assessment and handling not only affect users' electricity experience and interests but also relate to the operating performance and service level of power supply companies. Achieving proactive early warning through power grid resource clustering for new power systems can effectively analyze and mine massive amounts of power grid resource operating data, enabling fault location, fault analysis, and fault early warning before faults occur, improving the efficiency of power grid resource operation and maintenance, and ensuring the safe and stable operation of the power grid.

[0003] Currently, there are still the following shortcomings in power grid resource early warning:

[0004] I. A proactive early warning model based on prevention has not yet been implemented. Currently, the main operation and maintenance (O&M) model is a passive model that relies on alarms and emergency repairs after a fault occurs. This model leads to power grid resource O&M personnel spending most of their time and energy dealing with simple and repetitive "passive firefighting" problems, which is not only inefficient but also often results in a vicious chain reaction. There is a lack of capability to provide early warnings for power grid resources before faults occur, and a lack of capability to locate and analyze potential O&M risks. Therefore, a proactive O&M model based on prevention is urgently needed.

[0005] Second, the single static threshold early warning method for power grid resources lacks adaptability. The power grid is a complex and ever-changing system. When the scenarios and states of various power grid resources change, the single static threshold early warning method has certain limitations. Setting the threshold too low easily leads to false alarms; setting it too high easily leads to missed alarms. This results in conventional early warning modes failing to accurately achieve proactive early warning of power grid resources and potentially causing frequent false alarms, increasing the cost and workload of early warning processing. Therefore, there is an urgent need to implement power grid resource clustering early warning to meet the needs of new power systems for power grid resource early warning.

[0006] Third, the current power grid resource clustering early warning system lacks multi-dimensional analysis methods. It often only considers a few aspects or dimensions, which can lead to insufficient accuracy in early warning. If clustering analysis and early warning are based on only a few dimensions, misjudgments or omissions may occur, failing to accurately capture anomalies in power grid resources. Therefore, multi-dimensional analysis methods are needed after clustering power grid resource data.

[0007] In summary, those skilled in the art urgently need to solve the technical problems mentioned above in power grid resource early warning. Summary of the Invention

[0008] Purpose of the invention: The purpose of this invention is to provide a power grid resource clustering early warning method for new power systems, thereby solving the problems in the background technology.

[0009] The present invention also provides a power grid resource clustering early warning system, computer equipment, and computer storage medium for new power systems.

[0010] Technical solution: Firstly, a method for early warning of power grid resource clustering in a new type of power system, the method comprising:

[0011] Multi-source, multi-modal power grid resource data are integrated and digitally converted to form vectorized digital resources, which are divided into labeled normal operation data, labeled abnormal operation data, and unlabeled operation data.

[0012] The K-means clustering algorithm was used to perform cluster analysis on the unlabeled running data, and outlier detection was performed based on the distance of cluster center variation to identify abnormal data.

[0013] The identified abnormal data and the labeled abnormal operation data are clustered again to construct an initial fault space. The set of data in the initial fault space that meets the initial judgment rules of multi-fault space fusion is then fused to complete the multi-fault space fusion.

[0014] Based on the data after the fusion of multiple fault spaces, the clustering space is divided into important dimensions and ordinary dimensions. The warning thresholds for important dimensions and ordinary dimensions are calculated separately, and the fusion warning evaluation value of all dimensions is calculated. The warning judgment of the multidimensional clustering space is carried out based on the warning thresholds of the corresponding dimensions and the fusion warning evaluation value of all dimensions.

[0015] Furthermore,

[0016] Furthermore, multi-source, multi-modal power grid resource data includes structured and unstructured data. The digital transformation of structured data includes:

[0017] Given v structured data {a1, a2, ..., a...} v Transform it into r c-dimensional vectors, represented as b1=[a1,a2,…,a…]. c ], b2 = [a c+1 ,a c+2 ,…,a 2c ],…,b r =[a (r-1)c+1 ,…,a v [,0,…,0], where (r-1)c <v≤rc;

[0018] Transform unstructured data into c-dimensional vectors as well;

[0019] The dimension c of a vector is obtained using the following formula for vector dimension:

[0020]

[0021] Among them, S i It is the sum of the number of structured data and the number of words in the unstructured data of the i-th resource in the digital resources of the power grid, where N is the number of power grid resources. This indicates rounding to the nearest integer.

[0022] Optionally, the k value in the K-means algorithm is determined using the clustering marginal coefficient method, including:

[0023] For each sample point h in each cluster i Calculate sample point h i The average distance a(i) to other sample points belonging to the same cluster;

[0024] Select h i Other clusters G j Calculate h i With G j The average distance b of all samples ij Iterate through all other clusters and find the minimum average distance, denoted as b(i), where b(i) = min(b). i1 ,b i1 ,…,b ik );

[0025] Calculate all sample points d using the following formula i Clustering marginal coefficient: The average value is the overall clustering margin coefficient S for the current k value, where S∈[-1,1].

[0026] The value corresponding to the largest cluster margin coefficient is selected as the final number of clusters.

[0027] Optionally, the value of k in the K-means algorithm is determined by clustering error analysis, including:

[0028] After the cluster centers stabilize, we define a set of possible values ​​for k, denoted as K = {K1, K2, ..., K}. n}, K1 to K n Arrange the clusters in ascending order and calculate the overall clustering error:

[0029]

[0030] Where P is the overall clustering error; c j e represents the cluster center of the j-th cluster; j d represents the number of sample points in the j-th cluster; j ranges from 1 to K; jl This represents the value of the l-th sample point in the j-th cluster; l ranges from 1 to e. j ;

[0031] Select a suitable k value by judging the trend of the P value:

[0032]

[0033] Where, the value of k is K i At that time, P i The overall error of clustering is represented by α; the coefficient of determination is α; and the value of k is taken as K. a At that time, P a The overall error of clustering is represented by the value of a. The value of a is continuously increased, and when the above formula satisfies the requirements, the k value corresponding to the smallest a value that satisfies the formula is selected.

[0034] Preferably, the value of k in the K-means algorithm is determined by a fusion algorithm of the clustering marginal coefficient method and the clustering error analysis method:

[0035]

[0036] Where Q is the k value selected by the fusion algorithm; A is the k value selected by the clustering marginal coefficient method; B is the k value selected by the clustering error analysis method; P A P represents the overall clustering error when k is A; B This represents the overall clustering error when k is valued as B.

[0037] Furthermore, outlier detection based on the distance of cluster center variation includes:

[0038] Remember g m After clustering, class G m The cluster centers, in turn, belong to class G. m Instance h a After removing, calculate the new cluster centers and g. mThe distance d between ma The influence of a removed instance on the cluster center change distance algorithm is measured using this algorithm. The formula for the removed instance cluster center change distance algorithm is as follows:

[0039]

[0040] in, It is to remove the h a After belonging to g m All instances, h b It belongs to All instances;

[0041] After sorting the calculated cluster center variation distances in ascending order, we get {d} ′ m1 ,d ′ m2 ,…,d ′ mn}, for those belonging to class G m Instance h a The corresponding cluster center variation distance d ma Determine whether the following formula is satisfied, and identify instances that satisfy the formula as outliers:

[0042]

[0043] Where, d ma This indicates removing items belonging to class G. m Instance h a The corresponding cluster center change distance, where n is the number of instances in the cluster, and d is the distance between the cluster centers. ′ mn d represents the maximum value of the cluster center variation distance after sorting in ascending order. ′ mi This represents the i-th change distance of the cluster center after sorting in ascending order, where α1 and α2 are weights.

[0044] Furthermore, the initial judgment rules for multi-factor fault space fusion are as follows:

[0045]

[0046] Where, r i and r j Fault class G i With G j The dense radius, R i and R j Fault class G i With G j The tolerance radius, ρ im and ρ jm For fault data hm To the fault class G i With G j The distance, ρ ij For fault class G i With G j Cluster center g i g j The distance between them, where t0 is the current time, t p β represents the generation time of fault data, and β is a settable threshold.

[0047] The formula for multi-fault space fusion is as follows:

[0048]

[0049] In the formula: x represents the number of sets that need to be merged simultaneously, |G i | Represents the fault class G i The number of samples in the middle, g i Let g be the cluster center, and g′ be the cluster center after merging x sets.

[0050] Furthermore, the method for determining the fault tolerance radius is as follows:

[0051] The fault category is designated as G. i The calculation belongs to the fault class G. i All fault data h j To cluster center g i distance ρi j Sort in ascending order, and select the ρ values ​​with the smallest specified percentage distance. ij The average value is denoted as the dense radius r of the fault class. i The remaining distance values ​​with larger values ​​ρ ij Take the average value And add r i Let R be the tolerance radius of the fault class. i ,Right now ε is the adjustment weight.

[0052] Furthermore, for important dimensions, the warning threshold is calculated using the following formula:

[0053]

[0054] Among them, R max For important dimensions, the early warning threshold; r max r min These represent the maximum and minimum values ​​among the n data points in this dimension, respectively; r i This represents the i-th data point in this important dimension;

[0055] For ordinary dimensions, the warning threshold is calculated using the following formula:

[0056]

[0057] Among them, T max The warning threshold for ordinary dimensions; t max t min These represent the maximum and minimum values ​​among the m data points in this dimension, respectively; t i This represents the i-th data point in the ordinary dimension;

[0058] The integrated early warning evaluation value across all dimensions is determined using the following formula:

[0059]

[0060]

[0061] Among them, Q i W represents the early warning evaluation value for the i-th important dimension; Early warning indicates a direct early warning; W j Let be the early warning evaluation value for the j-th ordinary dimension; Let T be the dataset for the i-th important dimension; j Let R be the dataset of the j-th ordinary dimension. imax T represents the warning threshold of the data set for the i-th important dimension; jmax This represents the warning threshold for the data set of the j-th ordinary dimension.

[0062] Furthermore, early warning analysis of multi-dimensional clustering spaces includes:

[0063] Based on the early warning evaluation value, the early warning intervals for important dimensions and ordinary dimensions are each divided into three parts, corresponding to the red early warning interval, the orange early warning interval, and the normal yellow early warning interval, respectively.

[0064] When key data exceeds the threshold of the red alert zone, an alert is issued directly; for other cases, it is determined whether the following formula is met, and if so, an alert is issued:

[0065]

[0066] Where q is the number of important dimensions, w is the number of ordinary dimensions, and γ is the preset warning coefficient.

[0067] Furthermore, before performing early warning analysis of the multidimensional clustering space, the method further includes: identifying missing dimensions in the power grid resource data, using a fault assessment algorithm oriented towards missing dimensions to calculate the distance between the missing real-time power grid resource data and the cluster center, and determining whether the real-time data is in the fault space. For real-time data not in the fault space, no early warning analysis of the multidimensional clustering space is performed. The fault assessment algorithm oriented towards missing dimensions is as follows:

[0068]

[0069] Among them, P j (y i =m|x i () represents the data x to be analyzed. i The probability of belonging to the j-th cluster center, m represents the number of cluster centers in total, g j Let P be the j-th cluster center; ignore indicates invalid information, Z is the total dimension of the power grid resource data; if P j If the real-time data exceeds the specified threshold, it can be clustered with the j-th class and placed in the fault space; otherwise, the real-time data is not placed in the fault space and is not analyzed.

[0070] Secondly, a power grid resource clustering early warning system for a new type of power system is provided, the system comprising:

[0071] The data preprocessing module integrates multi-source, multi-modal power grid resource data and performs digital conversion to form vectorized digital resources, which are divided into labeled normal operation data, labeled abnormal operation data, and unlabeled operation data.

[0072] The preliminary anomaly detection module uses the K-means clustering algorithm to perform cluster analysis on the unlabeled running data and detects outliers based on the distance of change of cluster centers to identify abnormal data.

[0073] The fault space fusion module further clusters the identified abnormal data and the labeled operational abnormal data to construct an initial fault space. It then merges the set of data in the initial fault space that meets the initial judgment rules for multi-factor fault space fusion to complete the multi-factor fault space fusion.

[0074] The early warning and judgment module divides the clustering space into important dimensions and ordinary dimensions based on the data after the fusion of multiple fault spaces. It calculates the early warning thresholds for important dimensions and ordinary dimensions respectively, and calculates the fusion early warning evaluation value of all dimensions. Based on the early warning thresholds of the corresponding dimensions and the fusion early warning evaluation value of all dimensions, it performs early warning judgment on the multi-dimensional clustering space.

[0075] Thirdly, a computer device is provided, comprising: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, wherein when the programs are executed by the processors, they implement the steps of the power grid resource clustering early warning method for novel power systems as described in the first aspect of the present invention.

[0076] Fourthly, a computer-readable storage medium is provided, on which a computer program is stored, wherein when executed by a processor, the computer program implements the steps of the power grid resource clustering early warning method for novel power systems as described in the first aspect of the present invention.

[0077] Beneficial effects:

[0078] (1) This invention establishes a proactive early warning mode for power grid resources with prevention as the main focus. By unifying and effectively integrating multi-source and multi-modal resource data in the power grid, and combining it with a dynamic threshold early warning and judgment strategy for power grid resources based on big data, it breaks the previous passive management mode of alarming and repairing only after a power grid resource fault occurs, and realizes a proactive early warning mode that identifies, warns, and promptly handles potential power grid resource hazards before a fault occurs.

[0079] (2) This invention proposes a cluster analysis and early warning method for power grid resources. The cluster analysis algorithm system for digital resources is optimized, and a multi-dimensional cluster space early warning and judgment method is designed based on this. On the basis of constructing a multi-dimensional fault space, cluster analysis is performed on multiple dimensions, and the cluster results are integrated and judged. The clustering method is used to realize reasonable early warning of power grid resources and improve the accuracy of power grid resource early warning.

[0080] (3) This invention designs a multi-dimensional analysis method for power grid resource clustering early warning. Based on multiple dimensions, an optimized clustering algorithm is first used to analyze the digital resources of the power grid, and outliers are removed by detecting outliers based on the distance of cluster center changes. On the basis of constructing a multi-dimensional fault space in each dimension, early warning judgment is performed on the multi-dimensional clustering space, making the power grid resource clustering early warning more comprehensive and effectively assisting user decision-making. Attached Figure Description

[0081] Figure 1 This is an overall flowchart of the method of the present invention;

[0082] Figure 2 This is a flowchart of cluster analysis of digital resources;

[0083] Figure 3 This is a schematic diagram of multidimensional clustering spatial early warning analysis. Detailed Implementation

[0084] The technical solution of the present invention will be further described below with reference to the accompanying drawings.

[0085] Example 1:

[0086] This embodiment provides a power grid resource clustering and early warning method for new power systems. To improve the stability of power grid resources and the reliability of power supply, it addresses issues such as the significant losses caused by passive operation and maintenance modes that rely on alarms and emergency repairs after a fault occurs, the inability of static thresholds to adapt to complex dynamic early warning and analysis needs, insufficient accuracy of power grid resource threshold settings, unclear fault tracing, inaccurate impact range, and unintelligent cause identification. This method gathers multi-source, multi-modal data on power grid resources from various management systems, including the new generation dispatching technology support system, the new generation centralized control station system, the distribution automation system, the substation automation system, the electricity consumption information collection system, the marketing business application system, the power grid resource business platform, the data platform, and the new generation equipment asset lean management system. This data covers major primary power equipment in the transmission network, major overhead primary power equipment in the distribution network, major substation primary power equipment in the distribution network, major low-voltage primary power equipment in the distribution network, major power grid control systems, relay protection and safety automatic devices, major online monitoring equipment, major automation equipment, and major communication equipment. A proactive early warning mode for power grid resources, primarily based on prevention, is established, enabling the identification, early warning, and timely handling of potential power grid resource hazards before a fault occurs. This invention proposes a clustering analysis and judgment strategy to achieve early warning of power grid resources through clustering; it also designs a fusion algorithm for power grid resource clustering and early warning, improving the accuracy of power grid resource clustering and early warning judgment. Furthermore, this enhances the accuracy of power grid resource early warning judgment, reduces the number of power grid faults, improves power supply reliability, and ensures the safe and stable operation of the new power system.

[0087] Reference Figure 1 This embodiment provides a power grid resource clustering early warning method for new power systems, which includes the following steps:

[0088] S01: Aggregate and process multi-source, multi-modal power grid resource data to obtain the data required for early warning and judgment of integrated power grid resources.

[0089] Currently, the data sources for the multi-source, multi-modal data of power grid resources include: a new generation of dispatching technology support system, a new generation of centralized control station system, distribution automation system, substation automation system, electricity consumption information collection system, marketing business application system, power grid resource business platform, data platform, and a new generation of lean management system for equipment assets.

[0090] Among them, the multi-source multi-modal data of the power grid resources includes: (1) the main primary power equipment of the power transmission network, specifically including: transformers, busbars, generators, transformer windings, circuit breakers, disconnectors, grounding disconnectors, loads, parallel reactors, parallel capacitors, series reactors, series compensation devices, parallel compensation devices, current transformers, voltage transformers, surge arresters, wave traps, combined filters, filter capacitors, AC filters, arc suppression devices, grounding resistors, smoothing reactors, DC filters, converter valves, converter transformers, DC voltage transformers, DC current transformers, DC circuit breakers, DC disconnectors, DC grounding disconnectors, DC surge arresters, grounding electrodes, DC wave traps, and DC busbars. (2) The main overhead primary power equipment of the distribution network includes: pole-mounted transformers, pole-mounted circuit breakers, pole-mounted load switches, pole-mounted disconnect switches, pole-mounted reclosers, pole-mounted drop-out fuses, line surge arresters, line fault indicators, pole-mounted capacitors, pole-mounted voltage transformers, pole-mounted current transformers, and pole-mounted sectionalizers. (3) The main substation primary power equipment of the distribution network includes: distribution transformers, station transformers, grounding transformers, circuit breakers, disconnect switches, load switches, fuses, jumper wires, busbars, reactors, current transformers, voltage transformers, power capacitors, surge arresters, grounding resistors, fault indicators, substation cables, and AC filters. (4) The main low-voltage primary power equipment of the distribution network includes: low-voltage pole-mounted switches, low-voltage pole-mounted fuses, low-voltage fuse wires, low-voltage pole-mounted capacitors, low-voltage reactive power compensation devices, low-voltage pole-mounted surge arresters, low-voltage meter boxes, low-voltage fuse boxes, wall brackets, low-voltage distribution boxes, low-voltage residual current devices, low-voltage cable junction boxes, low-voltage cable terminal boxes, low-voltage capacitors, low-voltage switches, low-voltage busbars, low-voltage distribution panels, low-voltage switchgear, low-voltage power electronic equipment, low-voltage energy storage devices, and anti-islanding devices. (5) The main control systems, relay protection and safety automatic devices of the power grid include: converter station control systems, fault recorders, protection fault information system substations, relays, converter station protection systems, converter station control and protection systems, AC protection devices, DC system protection devices, and safety automatic devices. (6) Main online monitoring equipment for power grids, specifically including: tower monitoring equipment, conductor monitoring equipment, meteorological and environmental monitoring equipment, transmission video / image monitoring equipment, transformer / reactor / converter transformer monitoring equipment, capacitor type equipment monitoring equipment, metal oxide surge arrester monitoring equipment, circuit breaker / GIS monitoring equipment, substation video / image monitoring equipment, and cable body monitoring equipment. (7) Main automation equipment for power grids, specifically including: automation systems, remote terminal units (RTUs), remote terminal units (FTUs), remote terminal units (DTUs), remote terminal units (TTUs), remote energy terminals, phasor measurement devices, secondary system safety protection equipment, clock synchronization devices, computer equipment, storage devices, power supply equipment, remote data acquisition equipment, power data acquisition equipment, dispatch simulation screens, and large screens.(8) Major communication equipment in the power grid, specifically including: communication equipment rooms, communication cabinets, communication optical cables, communication optical cable segments, communication optical paths, communication equipment rooms, communication power supplies, transmission systems, PCM access systems, terminal communication access systems, power line carrier machines, data networks, switching networks, and communication network management systems. (9) Other power grid resources, specifically including historical data, power grid resource models, etc.

[0091] By standardizing and fusing multi-source, multi-modal data of power grid resources, the technical challenges of large scale, wide range, dispersed location, and numerous data sources in the power grid have been addressed. Standardized fusion processing refers to the standardization of multi-source data after fusion. Standardization involves scaling the data proportionally to fit it into a small, specific range. Common standardization methods are used to remove unit limitations from the data, transforming it into dimensionless pure numerical values, facilitating comparison and weighting of indicators with different units or magnitudes. Appropriate fusion algorithms are intelligently selected based on the fusion objective and fusion level, achieving more accurate judgments by fusing data and related information from multiple devices.

[0092] S02: Digital transformation of power grid resources. In cluster analysis for proactive early warning of power grid resource risks, the parameter matrix needs to be continuously adjusted to make the prediction results more and more accurate. The original structured and unstructured data cannot be directly used in the training process. Therefore, it is necessary to digitally transform power grid resources and extract the feature vectors of entities as input to this method.

[0093] 1) Digital conversion of structured data in power grid resources

[0094] First, the v structured data {a1, a2, ..., a...} in the power grid resource data are... v There are two ways to convert data into a vector. One is to directly convert all the data into a vector b = [a1, a2, ..., a...]. v The first approach is to transform a single set of numbers into a v-dimensional vector; the second is to transform it into several c-dimensional vectors. Since the vectors derived from unstructured data will be input into the neural network along with the unstructured data, it's crucial to ensure consistency in vector dimensions to prevent data loss due to format mismatches during machine learning. Therefore, the structured data is transformed into r c-dimensional vectors. That is, b1 = [a1, a2, ..., a...]. c ], b2 = [a c+1 a c+2 , ..., a 2c ],…,b r =[a (r-1)c+1 , ..., a v [0, ..., 0]. b r In the given information, since there are a total of v data points, and the first r-1 c-dimensional vectors have already arranged (r-1)c data points, therefore a... (r-1)c+1, ..., a v For the remaining data, empty data points in the vector that are not fully arranged are marked as 0. Where (r-1)c < v ≤ rc, the vector dimension is obtained according to the vector dimension calculation formula. Subsequent steps need to maintain consistency in dimension, converting unstructured data into c-dimensional vectors as well. When the selected dimension is too low, the vector representation will have a large bias because lower dimensions lose more information. Conversely, when the dimension is too high, the vector representation is prone to overfitting, resulting in a large amount of noise. A series of structured numerical values ​​can be directly converted into vectors, while unstructured data requires further processing. The vector dimension calculation formula in this embodiment is as follows:

[0095]

[0096] Among them, S i It is the sum of the number of structured data and the number of words in the unstructured data of the i-th resource in the digital resources of the power grid, where N is the number of power grid resources. This indicates rounding to the nearest integer.

[0097] 2) Digital conversion of unstructured data in power grid resources

[0098] Unstructured data in power grid digitization resources cannot be directly converted into vectors. Unstructured data includes emails, websites, media (digital photos, audio files, video files), all formats of office documents, text, images, XML, HTML, various reports, and audio / video information. This invention takes the most common text as an example and uses a combination of word embedding and part-of-speech tagging embedding to obtain the initial input vector for unstructured data. Other types of data can be vectorized using appropriate methods.

[0099] In the word feature representation layer, sentence s i Each word w in ij They will all be mapped to a vector v ij To obtain a more efficient feature representation, the final word vector v is generated by concatenating the following two types of vectors. ij .

[0100] (2-1) Word embedding: This is a method of converting words into numerical vectors. In order to analyze them using standard machine learning algorithms, these vectors, which have been converted into numbers, need to be used as input in numerical form. The word embedding process involves embedding a high-dimensional space with the number of words into a continuous vector space with a much lower dimension. Each word or phrase is mapped to a vector in the real number field. Words that frequently appear together are mapped to adjacent positions in the vector space. The result of word embedding is the generation of word vectors.

[0101] Word2Vec is an efficient model for training word vectors. It encodes each word into a vector. These encoded vectors are not randomly generated, but rather reflect the relationships between the words. Here, a pre-trained Word2Vec model is used to obtain word embeddings.

[0102] (2-2) Part-of-Speech Tagging Embedding: Part-of-speech tagging is the process of determining the most appropriate part-of-speech tag for each word in a given sentence. The accuracy of part-of-speech tagging directly affects subsequent syntactic and semantic analysis, and is one of the foundations of information processing. This involves classifying words in a corpus according to their part of speech. A word's part of speech is determined by its meaning, morphology, and grammatical function in its language. Part-of-speech tagging is the process of determining the grammatical category of each word in a given sentence, identifying its part of speech, and tagging it. In simpler terms, it involves segmenting a sentence and then marking the segmented words with their properties, such as noun (n), verb (v), etc. Part-of-speech tags typically contain a large amount of syntactic information, which can provide important information for digital resource modeling of power grids. The Stanford CoreNLP model is used to obtain the part-of-speech tag for each word in the sentence and convert it into a real-valued vector.

[0103] (2-3) Word embedding and part-of-speech tagging embedding concatenation

[0104] The results of word embedding and part-of-speech tagging embedding are concatenated to obtain each word w in the sentence. ij The initial word represents V ij as follows:

[0105] V ij =[q ij P ij ]

[0106] Among them, the word w ij It is the j-th word of the i-th sentence in unstructured data, q ij The word w ij Word embedding vector, p ij The word w ij The part-of-speech tagging embedding vector.

[0107] S03: Vectorized Representation of Digital Resources

[0108] Digital resource data of each power grid D i = [H′1,...,H′ L b1, ..., b r ] = [d1, d2, ..., d L+r All of these serve as instances of the support set and query set in the construction plot, {H′1, ..., H′ L Let {b1, ..., b2} be a vector representation of L sentences in unstructured data. r} represents r vectors transformed from structured data.

[0109] In digital modeling, most existing methods fall under the category of supervised learning, and their performance largely depends on the quantity and quality of labeled samples. The challenge is that the high cost of manual labeling makes it impossible to provide large-scale, high-quality training sets in practical applications. Secondly, existing methods struggle when handling new categories with few or no instances during training. The traditional approach in machine learning research is to acquire a large dataset for a specific task and train a model from scratch using that dataset. However, when the scenario changes, the model needs to be retrained. To address these issues, the machine learning community has proposed a method called "meta-learning," which aims to acquire the ability to "learn by learning," enabling it to quickly learn new tasks based on existing "knowledge." When labeled data is limited, meta-learning can effectively handle few-shot learning tasks, overcoming the problem of limited sample sizes for classification or regression tasks. Using few-shot learning methods based on meta-learning in studies with limited sample sizes yields better results, therefore, the choice depends on the sample situation in digital modeling.

[0110] Meta-learning, also known as learn-to-learn, is based on the idea of ​​constructing a large number of episodes (meta-tasks) during the meta-training phase to learn meta-knowledge. This meta-knowledge is then used to improve the model's generalization ability, allowing the model to learn the commonalities of meta-tasks across different episodes while ignoring task-specific parts of the meta-tasks. After training, the trained model is tested in a meta-test, which allows for the introduction of a small number of new classes—classes not present in the meta-training.

[0111] In few-shot meta-learning, each episode contains a support set and a query set. Each support set consists of C classes selected from the training set, with K samples drawn from each of the C classes, for a total of C×K samples. Each query set selects O samples from the training set that do not belong to any of the C classes already selected in the training set. The meta-test dataset is constructed in the same way as the meta-training dataset, except that the classes selected in the meta-test phase cannot overlap with those selected in the meta-training phase. This few-shot meta-learning is then called a C-way K-shot problem.

[0112] It should be noted that the first step of this method involves multi-source, multi-modal data fusion, indicating a large amount of data. However, this does not necessarily mean a large number of samples of the same data type. Therefore, this invention employs a few-sample meta-learning method using Bi-LSTM to train a mapping function f that converts instances into spatial vectors. θ (·). A problem with using LSTM to model sequence vectors is its inability to encode information from back to front. In finer-grained classification, attention needs to be paid to the interactions between the preceding and following sequences. The Bi-LSTM model, which combines forward and backward LSTM, can better capture bidirectional semantic dependencies. (This is related to the digitization of power grid resource data.) i d j (1≤j≤L+r) are sequentially input into the forward LSTM model and the backward LSTM model, respectively. The hidden states are calculated in the LSTM models in both directions. The final hidden states generated by the forward and backward LSTMs are concatenated to form the digital resource data D of the power grid. i The final vector representation D ′ i :

[0113]

[0114] in, This represents the forward LSTM model, with a sequential input sequence vector. This represents a backward LSTM model, with the input sequence vector being reversed.

[0115] S04: Cluster analysis of digital resources.

[0116] Each digital resource of the power grid can be represented by the final vector D. ′ i This indicates that the data can be divided into labeled normal operation data, labeled abnormal operation data, and unlabeled operation data. First, cluster analysis is performed on the unlabeled operation data to find abnormal data in the normal operation data after preliminary processing.

[0117] Clustering is the process of classifying and organizing data members in a dataset that are similar in certain aspects; it is a technique for discovering this inherent structure. The K-means algorithm is the most well-known partitioning clustering algorithm, widely used due to its simplicity and efficiency. Based on a given clustering objective function, the algorithm uses an iterative update method, with each iteration decreasing the objective function until the final clustering result minimizes the objective function, achieving a good classification effect.

[0118] In this invention, the silhouette coefficient is used to evaluate the clustering effect for different values ​​of k. Finally, the k corresponding to the largest silhouette coefficient is selected as the final number of clusters. k-means will aggregate historical daily data into k clusters. For example... Figure 2 As shown, the specific steps are as follows:

[0119] (1) Select the k points that are farthest apart from each other as the initial points for clustering.

[0120] (2) For each sample h in the dataset i Calculate its Euclidean distance to the k cluster centers and assign it to the cluster corresponding to the cluster center with the smallest distance. Calculate the Euclidean distance ρ using the following algorithm. ij Calculation:

[0121]

[0122] Among them, h i It is the vector representation of each sample in the dataset, g j Let i be the cluster center, i be the i-th similar day, and j be the j-th cluster center.

[0123] (3) For each class G i Recalculate its cluster center g i The centroids of all samples belonging to the cluster are calculated using the following algorithm and used as the new cluster centers.

[0124]

[0125] Among them, G i It is a cluster formed through clustering, |G i | represents cluster G i The number of samples in cluster G, h represents the number of clusters G. i The samples in.

[0126] (4) Repeat steps 2 and 3 above until the cluster centers are stable.

[0127] The method for selecting the value of k is as follows:

[0128] 1) Clustering Margin Coefficient Method

[0129] The above steps can be used to calculate the clusters for the current value of k. The K-means algorithm is sensitive to the value of k; different k values ​​lead to different clustering results. Therefore, the clustering marginal coefficient is used to evaluate the clustering effect for different k values, and finally, the k corresponding to the largest clustering marginal coefficient is selected as the final number of clusters.

[0130] The clustering margin coefficient combines the cohesion and separation of clusters and is used to evaluate the effectiveness of clustering. For each sample point h in each cluster... iCalculate the cluster margin coefficients for each sample point h. Specifically, this requires calculating the cluster margin coefficients for each sample point h. i Calculate the following two indicators:

[0131] a(i): Sample point h i The average distance to other sample points belonging to the same cluster. The smaller a(i) is, the greater the probability that the sample belongs to that class, and it is used to quantify the cohesion within the cluster.

[0132] b(i): Select h i Other clusters G j Calculate h i With G j The average distance b of all samples ij Iterate through all other clusters and find the minimum average distance, denoted as b(i), where b(i) = min(b). i1 ,b i1 ,…,b ik ), used to quantify the separation between clusters.

[0133] Sample point d i The clustering margin coefficient is:

[0134]

[0135] Calculate all sample points d i The clustering marginal coefficients are calculated, and the average value is the overall clustering marginal coefficient S for the current k value, which measures the tightness of the data clusters. S∈[-1,1], and the closer S is to 1, the better the clustering effect.

[0136] Finally, the value k corresponding to the largest clustering marginal coefficient is selected as the final number of clusters, and these k clusters are fixed. Let the selected value of k be A.

[0137] 2) Clustering error analysis method

[0138] After the cluster centers stabilize, we define a set of approximate values ​​for k, denoted as K = {K1, K2, ..., K}. n}, K1 to K n Arrange in ascending order. Calculate the overall clustering error:

[0139]

[0140] Where P is the overall clustering error; c j e represents the cluster center of the j-th cluster; j d represents the number of sample points in the j-th cluster; j ranges from 1 to K; jl This represents the value of the l-th sample point in the j-th cluster; l ranges from 1 to e. j .

[0141] Select a suitable k value by judging the trend of the P value.

[0142]

[0143] Where, the value of k is K i At that time, P i The overall clustering error is represented by α, which can be chosen according to the actual situation; the value of k is K. a At that time, P a Let be the overall error of clustering; continuously increase the value of 'a', and when the above formula satisfies the requirement, select the k value corresponding to the smallest 'a' value that satisfies the formula. Let the selected k value be B.

[0144] 3) Clustering k-value selection fusion algorithm

[0145]

[0146] Where Q is the k value selected by the fusion algorithm; A is the k value selected by the clustering marginal coefficient method; B is the k value selected by the clustering error analysis method; P A P represents the overall clustering error when k is A; B This represents the overall clustering error when k is valued as B.

[0147] Because the k-means algorithm aims to minimize intra-cluster variance and maximize inter-cluster variance for each cluster, the cluster marginal coefficient method can be used to calculate the intra-cluster similarity to determine the k-value, thus balancing the intra-cluster variance. Furthermore, there is a turning point in the relationship between the k-value and the overall clustering error P. Before reaching this turning point, increasing the k-value significantly impacts the error P, but after the turning point, the impact weakens. Increasing the k-value further only increases workload; therefore, clustering error analysis can be used to find the optimal k-value at this turning point. This embodiment of the invention integrates two algorithms to optimize the k-value and complete the clustering process.

[0148] S05: Outlier detection based on the distance of changing cluster centers.

[0149] For those belonging to g m The digital resources of the power grid have some inaccurate classifications. An outlier identification and labeling strategy based on the distance of cluster center variation will be used. The specific steps are as follows:

[0150] g m After clustering, class G m The cluster centers, in turn, belong to class G. m Instance h a After removing, calculate the new cluster centers and g. m The distance d between maThe cluster center change distance algorithm for removing instances is used to measure the influence of an instance on the cluster centers. When the change distance is too large, the instance is considered to be an outlier. The formula for the cluster center change distance algorithm for removing instances is as follows:

[0151]

[0152] in, It is to remove the h a After belonging to g m All instances, h b It belongs to All instances of .

[0153] After sorting the calculated cluster center variation distances in ascending order, we get {d} ′ m1 ,d ′ m2 ,…,d ′ mn}, for those belonging to class G m Instance h a The corresponding cluster center variation distance d ma An algorithm based on the distance of cluster center variation is used to determine a threshold. If an instance satisfies the given formula, it is considered an outlier. The algorithm for determining the threshold based on the distance of cluster center variation is as follows:

[0154]

[0155] Where, d ma This indicates removing items belonging to class G. m Instance h a The corresponding cluster center change distance, where n is the number of instances in the cluster, and d is the distance between the cluster centers. ′ mn d represents the maximum value of the cluster center variation distance after sorting in ascending order. ′ mi This represents the i-th change distance of the cluster center after sorting in ascending order. α1 and α2 are weights, with α1 = 2 and α2 = 1 being the default values. Users can adjust these values ​​according to their actual needs.

[0156] When the distance between the cluster centers of some instances exceeds a threshold based on the distance between cluster centers, these instances are marked as outliers. These outliers are then submitted to the user for evaluation, and the user can adjust them to regular points based on the actual situation. Detected outliers represent abnormal data.

[0157] S06: Construct a multi-dimensional fault space.

[0158] 1) Construct the initial fault space

[0159] In the power grid resource space constructed in step S04, analyzing all normal operation data and fault data together may result in some fault data having low distinguishability from normal data, and may lead to multiple useless judgments in subsequent fault warnings. Directly matching fault warning information with historical fault information can accelerate the fault warning speed and improve the warning accuracy. Therefore, it is necessary to cluster the abnormal data obtained from density-based local outlier detection in step S05 and the labeled operational anomaly data again to construct the initial fault space and obtain the power grid resource fault model. The initial fault space is derived from the power grid resource space in terms of fault information processing, and is dedicated to the analysis, processing and matching of fault information.

[0160] 2) Initial analysis of multi-factor fault space fusion

[0161] Because a single fault may be caused by multiple anomalous and similar data, these data may not exhibit good clustering characteristics in the initial fault space, instead appearing scattered and forming multiple clusters. That is, multiple clusters with Euclidean distance proximity may lead to the same fault, but do not belong to the same cluster. Therefore, a multivariate fault space fusion initial judgment method is needed to merge these neighboring clusters leading to the same fault into a single cluster. Here, "multivariate" refers to the different fault classes formed by the clustering.

[0162] The calculation belongs to fault class G. i All fault data h j To cluster center g i distance ρ ij Then sort in ascending order, and select the first certain percentage (e.g., 80%) of those with smaller values ​​of ρ. ij The average value is denoted as the dense radius r of the fault class. i The remaining (e.g., 20%) of the ρ values ​​that are larger than the given values ​​will be... ij Take the average value And add εr i Let R be the tolerance radius of the fault class. i ,Right now ε = 2 is the default value, and users can configure it according to their actual situation.

[0163] When fault class G i With G j Some faulty data points in G meet the following conditions, therefore G is considered to be... i With G j When faults are close together, the initial judgment rule of multivariate fault space fusion can be used for judgment. When all of the following rules are met, the fault class G can be classified. i With G j The fusion process is then implemented. The initial judgment rules for multi-factor fault space fusion are as follows:

[0164]

[0165] Where, r i and r j Fault class G i With G j The dense radius, R i and R j Fault class G i With G j The tolerance radius, ρ im and ρ jm For fault data h m To the fault class G i With G j The distance, ρ ij For fault class G i With G j Cluster center g i g j The distance between them, where t0 is the current time, t p The generation time of fault data, β, can be configured by the user according to the actual situation. When fault data occurs multiple times in a short period of time, exceeding the threshold β, it is considered that G... i With G i The faults are close enough to be fused.

[0166] 3) Multi-fault space fusion

[0167] The set of conditions that meet the initial judgment rules of multi-factor fault space fusion is fused using the multi-factor fault space fusion algorithm, as shown in the following formula:

[0168]

[0169] In the formula: x represents the number of sets that need to be merged simultaneously, |G i | Represents the fault class G i The number of samples in the middle, g i Let g be the cluster center, and g′ be the cluster center after merging x sets.

[0170] By constructing an initial fault space and then fusing multiple fault spaces, fault data can be effectively distinguished from normal data, preventing multiple useless judgments in subsequent fault warnings.

[0171] S07: Multidimensional clustering spatial early warning analysis.

[0172] Due to the complexity and variability of power grid resources, in the vectorized representation of power grid resources in step S03, the power grid resource data is formed into multiple dimensions. In step S04, when clustering power grid resources, a multi-dimensional clustering space is formed. The multi-dimensionality refers to different indicators for evaluating the same power equipment, such as voltage, current, and power. This invention divides different dimensions to form a multi-dimensional clustering space early warning algorithm. Assuming there are N dimensions, including q important dimensions and w ordinary dimensions, the division between important and ordinary dimensions is generally determined based on whether they are important parameters or indicators of power grid equipment. This invention does not impose any restrictions on this division based on actual circumstances. Figure 3 As shown, the multidimensional clustering spatial early warning algorithm is as follows:

[0173] 1) Early warning of key dimensions

[0174]

[0175] Among them, R max For important dimensions, the early warning threshold; r max F min These represent the maximum and minimum values ​​among the n data points in this dimension, respectively; r i This represents the i-th data point in this important dimension;

[0176] 2) Ordinary Dimension Early Warning

[0177]

[0178] Among them, T max The warning threshold for ordinary dimensions; t max t min These represent the maximum and minimum values ​​among the m data points in this dimension, respectively; t i This represents the i-th data point in the ordinary dimension;

[0179] 3) Warning of all dimensions fused value

[0180] Key dimensions exceeded the standard, i.e. A direct warning will be issued; otherwise, a warning evaluation value will be provided.

[0181]

[0182]

[0183] Among them, Q i W is the early warning evaluation value for the i-th important dimension; j Let be the early warning evaluation value for the j-th ordinary dimension; Let T be the dataset for the i-th important dimension; j Let R be the dataset of the j-th ordinary dimension. imaxT represents the warning threshold of the data set for the i-th important dimension; jmax This represents the warning threshold for the j-th ordinary dimension of the data set;

[0184] The warning intervals for both important and ordinary dimensions are each divided into three parts. Taking the important dimension as an example: R max Values ​​of 0.8R and above constitute a red alert zone; values ​​greater than or equal to 0.8R max Less than R max The area is under orange alert; less than 0.8R. max This is within the normal yellow alert range.

[0185] When red and orange alerts for ordinary dimensions, and orange alerts for important dimensions, accumulate to a certain number of occurrences, an alert should also be issued. The algorithm is as follows:

[0186]

[0187] Where q is the number of important dimensions, w is the number of ordinary dimensions, and γ is the warning coefficient, which can be set according to user needs.

[0188] S08: Handling of Dimension Missing Fault Information

[0189] During real-time early warning, due to reasons such as unsuccessful terminal data collection, communication network delays, and untimely detection, there may be false alarms of fault information when the power grid resources are operating normally, while fault information may be missed or not reported in a timely manner when the distribution network is in operation, resulting in missing dimensions. In such cases, the data cannot be directly used for early warning analysis, otherwise the false alarm rate will increase significantly.

[0190] Let Z be the dimension of the power grid resource data, and s be the missing dimension. At that time, too many data dimensions were missing, and the information was deemed invalid. In this case, the existing clustering space is reduced in dimensionality, and a fault assessment algorithm oriented towards missing dimensions is used to calculate the distance between the missing real-time power grid resource data and the cluster centers, and to determine whether the missing real-time data is located in the fault space. The fault assessment algorithm oriented towards missing dimensions is as follows:

[0191]

[0192] Among them, P j (y i =m|x i () represents the data x to be analyzed. i The probability of belonging to the j-th cluster center, m represents the number of cluster centers in total, g j Let P be the j-th cluster center. j If P > 0.9, then the real-time data can be clustered with the j-th class and is located in the fault space. jIf the value is ≤0.9, then the real-time data is not in the fault space and no analysis is performed.

[0193] S09: Comprehensive early warning and assessment.

[0194] The grid resource clustering early warning analysis method for new power systems provided by steps S01-S08 above can further improve the stability of grid resources and the reliability of grid power supply. It solves problems such as large losses caused by the passive operation and maintenance mode of alarming and repairing after a fault occurs, the inability of static thresholds to adapt to the complex dynamic early warning and judgment needs, insufficient accuracy of grid resource threshold settings, unclear fault tracing, inaccurate impact range, and unintelligent cause judgment. It can issue early warnings to users. Users can further comprehensively judge grid resource faults based on the grid resource early warning and judgment results of this method, and adopt methods such as referring to judgment information from other channels and arranging personnel for inspection, to determine the fault handling plan for the grid resource, locate the grid fault, make repair decisions, and arrange manpower, vehicles, equipment and other resources to complete the processing of grid resource early warning information and fault repair work.

[0195] It should be understood that in some examples, the above combination Figure 1 The operations illustrated herein can be performed by hardware (e.g., including circuits, processing blocks, logic components, and other components), code executed by a processor (e.g., software or firmware), or any combination thereof. Alternative examples of related content may be implemented, and some steps may be performed in a different order than those described, or not at all. In some cases, steps may include additional features not mentioned above, or more steps may be added.

[0196] Example 2:

[0197] This embodiment provides a power grid resource clustering early warning system for a new type of power system, the system comprising:

[0198] The data preprocessing module integrates multi-source, multi-modal power grid resource data and performs digital conversion to form vectorized digital resources, which are divided into labeled normal operation data, labeled abnormal operation data, and unlabeled operation data.

[0199] The preliminary anomaly detection module uses the K-means clustering algorithm to perform cluster analysis on the unlabeled running data and detects outliers based on the distance of change of cluster centers to identify abnormal data.

[0200] The fault space fusion module further clusters the identified abnormal data and the labeled operational abnormal data to construct an initial fault space. It then merges the set of data in the initial fault space that meets the initial judgment rules for multi-factor fault space fusion to complete the multi-factor fault space fusion.

[0201] The early warning and judgment module divides the clustering space into important dimensions and ordinary dimensions based on the data after the fusion of multiple fault spaces. It calculates the early warning thresholds for important dimensions and ordinary dimensions respectively, and calculates the fusion early warning evaluation value of all dimensions. Based on the early warning thresholds of the corresponding dimensions and the fusion early warning evaluation value of all dimensions, it performs early warning judgment on the multi-dimensional clustering space.

[0202] It should be understood that the power grid resource clustering early warning system for new power systems in this embodiment of the invention can realize all the technical solutions in the above method embodiments. The functions of each functional module can be specifically implemented according to the methods in the above method embodiments. The specific implementation process can be referred to the relevant descriptions in the above embodiments, which will not be repeated here.

[0203] Example 3:

[0204] This embodiment provides a computer device, including: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the programs, when executed by the processors, implement the steps of the power grid resource clustering early warning method for novel power systems as described in the first aspect of the present invention.

[0205] Example 4:

[0206] This embodiment provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the power grid resource clustering early warning method for novel power systems as described in the first aspect of this invention.

[0207] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus (systems), computer devices, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0208] This invention is described with reference to a flowchart of a method according to embodiments of the invention. It should be understood that each step in the flowchart and combinations thereof can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing device, generate instructions for implementing the process. Figure 1 A device for a function specified in one or more processes.

[0209] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 The function specified in one or more processes.

[0210] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 Steps of a specified function in one or more processes.

Claims

1. A method for early warning of power grid resource clustering in a new type of power system, characterized in that, The method includes: Multi-source, multi-modal power grid resource data are integrated and digitally converted to form vectorized digital resources, which are divided into labeled normal operation data, labeled abnormal operation data, and unlabeled operation data. The K-means clustering algorithm was used to perform cluster analysis on the unlabeled running data, and outlier detection was performed based on the distance of cluster center variation to identify abnormal data. The identified abnormal data and the labeled operational anomaly data are clustered again to construct an initial fault space. The set of data in the initial fault space that satisfies the initial judgment rules for multi-dimensional fault space fusion is then fused to complete the multi-dimensional fault space fusion. The initial judgment rules for multi-dimensional fault space fusion are as follows: in, and Fault Class and The dense radius, and Fault Class and tolerance radius, and For fault data To the fault category and distance, For faults and Cluster center , The distance between them For the current time, The generation time of the fault data. A configurable threshold; Based on the data after the fusion of multiple fault spaces, the clustering space is divided into important dimensions and ordinary dimensions. The warning thresholds for important dimensions and ordinary dimensions are calculated separately, and the fusion warning evaluation value of all dimensions is calculated. The warning judgment of the multidimensional clustering space is carried out based on the warning thresholds of the corresponding dimensions and the fusion warning evaluation value of all dimensions.

2. The method according to claim 1, characterized in that, Multi-source, multi-modal power grid resource data includes structured and unstructured data. The digital transformation of structured data includes: V structured data Transform it into r c-dimensional vectors, represented as: , , … , ,in, ; Transform unstructured data into c-dimensional vectors as well; The dimension c of a vector is obtained using the following formula for vector dimension: in, It is the sum of the number of structured data and the number of words in the unstructured data of the i-th resource in the digital resources of the power grid, where N is the number of power grid resources. This indicates rounding to the nearest integer.

3. The method according to claim 1, characterized in that, The value of k in the K-means algorithm is determined by the clustering marginal coefficient method, including: For each sample point in each cluster Calculate sample points The average distance to other sample points belonging to the same cluster ; Select Other clusters ,calculate and The average distance of all samples Iterate through all other clusters and find the minimum average distance, denoted as . , ; Calculate all sample points using the following formula Clustering marginal coefficient: The average value is the overall cluster margin coefficient S for the current k value. ; The value corresponding to the largest cluster margin coefficient is selected as the final number of clusters.

4. The method according to claim 1, characterized in that, The value of k in the K-means algorithm is determined through clustering error analysis, including: After the cluster centers stabilize, we define a set of possible values ​​for the value k, denoted as . , arrive Arrange the clusters in ascending order and calculate the overall clustering error: in, This represents the overall error of clustering; This represents the cluster center of the j-th cluster; This represents the number of sample points in the j-th cluster; j ranges from 1 to... ; This represents the value of the l-th sample point in the j-th cluster; l takes a value from 1 to... ; Select a suitable k value by judging the trend of the P value: Where, the value of k is taken as hour, This represents the overall error of clustering; The coefficient of determination; the value of k is taken as... hour, The overall error of clustering is represented by the value of a. The value of a is continuously increased, and when the above formula satisfies the requirements, the k value corresponding to the smallest a value that satisfies the formula is selected.

5. The method according to claim 1, characterized in that, The value of k in the K-means algorithm is determined by a fusion algorithm combining the clustering marginal coefficient method and the clustering error analysis method: Q= Where Q is the k value selected by the fusion algorithm; B is the value of k selected by the clustering marginal coefficient method; B is the value of k selected by the clustering error analysis method. This represents the overall clustering error when k is A. This represents the overall clustering error when k is valued as B. The methods for calculating the value of A include: For each sample point in each cluster Calculate sample points The average distance to other sample points belonging to the same cluster Select Other clusters ,calculate and The average distance of all samples Iterate through all other clusters and find the minimum average distance, denoted as . , Calculate all sample points using the following formula. Clustering marginal coefficient: The average value is the overall clustering margin coefficient S for the current k value; the k value corresponding to the largest clustering margin coefficient is selected as the final number of clusters, denoted as A. The methods for calculating the value of B include: After the cluster centers stabilize, we define a set of possible values ​​for the value k, denoted as . , arrive Arrange the clusters in ascending order and calculate the overall clustering error: ,in, This represents the overall error of clustering; This represents the cluster center of the j-th cluster; This represents the number of sample points in the j-th cluster; j ranges from 1 to... ; This represents the value of the l-th sample point in the j-th cluster; l takes a value from 1 to... Select a suitable k value by judging the trend of the P value: Where the value of k is taken as hour, This represents the overall error of clustering; The coefficient of determination; the value of k is taken as... hour, Let be the overall error of clustering; continuously increase the value of 'a', and when the above formula satisfies the requirements, select the k value corresponding to the smallest 'a' value that satisfies the formula, and denote it as B.

6. The method according to claim 1, characterized in that, Outlier detection based on the distance of cluster center variation includes: remember After clustering, the class The cluster centers, in turn, group the members belonging to the class Examples After removing, calculate the new cluster centers and Distance between The influence of a removed instance on the cluster center change distance algorithm is measured using this algorithm. The formula for the removed instance cluster center change distance algorithm is as follows: in, It is to remove Later belong to All instances, It belongs to All instances; After sorting the calculated cluster center movement distances in ascending order, we get... For those belonging to class Examples Corresponding cluster center variation distance Determine whether the following formula is satisfied, and identify instances that satisfy the formula as outliers: in, This indicates removing the class. Examples The corresponding cluster center change distance, where n is the number of instances in that cluster. This represents the maximum value after sorting the cluster center migration distances in ascending order. This represents the i-th distance of change in cluster center distance after sorting in ascending order. , It's the weight.

7. The method according to claim 1, characterized in that, The formula for multi-fault space fusion is as follows: In the formula: x represents the number of sets that need to be merged simultaneously. Represents fault class The number of samples in the middle, As cluster center, Let x be the cluster center after merging the sets.

8. The method according to claim 7, characterized in that, The method for determining the fault tolerance radius is as follows: Record the fault category as The calculation belongs to the fault category. All fault data To the cluster center distance Sort in ascending order, and select the values ​​with the smallest specified percentage distance. The average value is recorded as the dense radius of the fault class. The remaining distance values ​​with larger values Take the average value And add The tolerance radius of the fault class is denoted as ,Right now , To adjust the weights.

9. The method according to claim 1, characterized in that, For important dimensions, the warning threshold is calculated using the following formula: in, Warning thresholds for key dimensions; , These represent the maximum and minimum values ​​among the n data points in this dimension, respectively. This represents the i-th data point in this important dimension; For ordinary dimensions, the warning threshold is calculated using the following formula: in, The warning threshold is for ordinary dimensions; , These represent the maximum and minimum values ​​among the m data points in this dimension, respectively. This represents the i-th data point in the ordinary dimension; The integrated early warning evaluation value across all dimensions is determined using the following formula: in, Let be the early warning evaluation value for the i-th important dimension; This indicates a direct warning; Let be the early warning evaluation value for the j-th ordinary dimension; For the data set of the i-th important dimension; Let j be the data set of the j-th ordinary dimension; This represents the warning threshold for the data set of the i-th important dimension; This represents the warning threshold for the data set of the j-th ordinary dimension.

10. The method according to claim 9, characterized in that, Early warning analysis of multidimensional clustering space includes: Based on the early warning evaluation value, the early warning intervals for important dimensions and ordinary dimensions are each divided into three parts, corresponding to the red early warning interval, the orange early warning interval, and the normal yellow early warning interval, respectively. When key data exceeds the threshold of the red alert zone, an alert is issued directly; for other cases, it is determined whether the following formula is met, and if so, an alert is issued: Where q is the number of important dimensions and w is the number of ordinary dimensions. This is the preset warning coefficient.

11. The method according to claim 1, characterized in that, Before performing early warning analysis of the multidimensional clustering space, the method further includes: identifying missing dimensions in the power grid resource data, using a fault assessment algorithm oriented towards missing dimensions to calculate the distance between the missing real-time power grid resource data and the cluster center, and determining whether the real-time data is in the fault space. For real-time data that is not in the fault space, no early warning analysis of the multidimensional clustering space is performed. The fault assessment algorithm oriented towards missing dimensions is as follows: in, Data to be analyzed The probability of belonging to the j-th cluster center, where m represents the number of cluster centers in total. Let j be the cluster center; Indicates invalid information; Z is the total dimension of the power grid resource data. If the real-time data exceeds the specified threshold, it can be clustered with the j-th class and placed in the fault space; otherwise, the real-time data is not placed in the fault space and is not analyzed.

12. A power grid resource clustering early warning system for a new type of power system, characterized in that, The system includes: The data preprocessing module integrates multi-source, multi-modal power grid resource data and performs digital conversion to form vectorized digital resources, which are divided into labeled normal operation data, labeled abnormal operation data, and unlabeled operation data. The preliminary anomaly detection module uses the K-means clustering algorithm to perform cluster analysis on the unlabeled running data and detects outliers based on the distance of change of cluster centers to identify abnormal data. The fault space fusion module further clusters the identified abnormal data and the labeled operational anomaly data to construct an initial fault space. It then merges the sets of data in the initial fault space that satisfy the initial judgment rules for multi-dimensional fault space fusion to complete the multi-dimensional fault space fusion. The initial judgment rules for multi-dimensional fault space fusion are as follows: in, and Fault Class and The dense radius, and Fault Class and tolerance radius, and For fault data To the fault category and distance, For faults and Cluster center , The distance between them For the current time, The generation time of the fault data. A configurable threshold; The early warning and judgment module divides the clustering space into important dimensions and ordinary dimensions based on the data after the fusion of multiple fault spaces. It calculates the early warning thresholds for important dimensions and ordinary dimensions respectively, and calculates the fusion early warning evaluation value of all dimensions. Based on the early warning thresholds of the corresponding dimensions and the fusion early warning evaluation value of all dimensions, it performs early warning judgment on the multi-dimensional clustering space.

13. The system according to claim 12, characterized in that, Multi-source, multi-modal power grid resource data includes structured and unstructured data. The digital transformation of structured data includes: V structured data Transform it into r c-dimensional vectors, represented as: , , … , ,in, ; Transform unstructured data into c-dimensional vectors as well; The dimension c of a vector is obtained using the following formula for vector dimension: in, It is the sum of the number of structured data and the number of words in the unstructured data of the i-th resource in the digital resources of the power grid, where N is the number of power grid resources. This indicates rounding to the nearest integer.

14. The system according to claim 12, characterized in that, The value of k in the K-means algorithm is determined by the clustering marginal coefficient method, including: For each sample point in each cluster Calculate sample points The average distance to other sample points belonging to the same cluster ; Select Other clusters ,calculate and The average distance of all samples Iterate through all other clusters and find the minimum average distance, denoted as . , ; Calculate all sample points using the following formula Clustering marginal coefficient: The average value is the overall cluster margin coefficient S for the current k value. ; The value corresponding to the largest cluster margin coefficient is selected as the final number of clusters.

15. The system according to claim 12, characterized in that, The value of k in the K-means algorithm is determined through clustering error analysis, including: After the cluster centers stabilize, we define a set of possible values ​​for the value k, denoted as . , arrive Arrange the clusters in ascending order and calculate the overall clustering error: in, This represents the overall error of clustering; This represents the cluster center of the j-th cluster; This represents the number of sample points in the j-th cluster; j ranges from 1 to... ; This represents the value of the l-th sample point in the j-th cluster; l takes a value from 1 to... ; Select a suitable k value by judging the trend of the P value: Where, the value of k is taken as hour, This represents the overall error of clustering; The coefficient of determination; the value of k is taken as... hour, The overall error of clustering is represented by the value of a. The value of a is continuously increased, and when the above formula satisfies the requirements, the k value corresponding to the smallest a value that satisfies the formula is selected.

16. The system according to claim 12, characterized in that, The value of k in the K-means algorithm is determined by a fusion algorithm combining the clustering marginal coefficient method and the clustering error analysis method: Q= Where Q is the k value selected by the fusion algorithm; B is the value of k selected by the clustering marginal coefficient method; B is the value of k selected by the clustering error analysis method. This represents the overall clustering error when k is A. This represents the overall clustering error when k is valued as B. The methods for calculating the value of A include: For each sample point in each cluster Calculate sample points The average distance to other sample points belonging to the same cluster Select Other clusters ,calculate and The average distance of all samples Iterate through all other clusters and find the minimum average distance, denoted as . , Calculate all sample points using the following formula. Clustering marginal coefficient: The average value is the overall clustering margin coefficient S for the current k value; the k value corresponding to the largest clustering margin coefficient is selected as the final number of clusters, denoted as A. The methods for calculating the value of B include: After the cluster centers stabilize, we define a set of possible values ​​for the value k, denoted as . , arrive Arrange the clusters in ascending order and calculate the overall clustering error: ,in, This represents the overall error of clustering; This represents the cluster center of the j-th cluster; This represents the number of sample points in the j-th cluster; j ranges from 1 to... ; This represents the value of the l-th sample point in the j-th cluster; l takes a value from 1 to... Select a suitable k value by judging the trend of the P value: Where the value of k is taken as hour, This represents the overall error of clustering; The coefficient of determination; the value of k is taken as... hour, Let be the overall error of clustering; continuously increase the value of 'a', and when the above formula satisfies the requirements, select the k value corresponding to the smallest 'a' value that satisfies the formula, and denote it as B.

17. The system according to claim 12, characterized in that, Outlier detection based on the distance of cluster center variation includes: remember After clustering, the class The cluster centers, in turn, group the members belonging to the class Examples After removing, calculate the new cluster centers and Distance between The influence of a removed instance on the cluster center change distance algorithm is measured using this algorithm. The formula for the removed instance cluster center change distance algorithm is as follows: in, It is to remove Later belong to All instances, It belongs to All instances; After sorting the calculated cluster center movement distances in ascending order, we get... For those belonging to class Examples Corresponding cluster center variation distance Determine whether the following formula is satisfied, and identify instances that satisfy the formula as outliers: in, This indicates removing the class. Examples The corresponding cluster center change distance, where n is the number of instances in that cluster. This represents the maximum value after sorting the cluster center migration distances in ascending order. This represents the i-th distance of change in cluster center distance after sorting in ascending order. , It's the weight.

18. The system according to claim 12, characterized in that, The formula for multi-fault space fusion is as follows: In the formula: x represents the number of sets that need to be merged simultaneously. Represents fault class The number of samples in the middle, As cluster center, Let x be the cluster center after merging the sets.

19. The system according to claim 12, characterized in that, For important dimensions, the warning threshold is calculated using the following formula: in, Warning thresholds for key dimensions; , These represent the maximum and minimum values ​​among the n data points in this dimension, respectively. This represents the i-th data point in this important dimension; For ordinary dimensions, the warning threshold is calculated using the following formula: in, The warning threshold is for ordinary dimensions; , These represent the maximum and minimum values ​​among the m data points in this dimension, respectively. This represents the i-th data point in the ordinary dimension; The integrated early warning evaluation value across all dimensions is determined using the following formula: in, Let be the early warning evaluation value for the i-th important dimension; This indicates a direct warning; Let be the early warning evaluation value for the j-th ordinary dimension; For the data set of the i-th important dimension; Let j be the data set of the j-th ordinary dimension; This represents the warning threshold for the data set of the i-th important dimension; This represents the warning threshold for the data set of the j-th ordinary dimension.

20. The system according to claim 19, characterized in that, Early warning analysis of multidimensional clustering space includes: Based on the early warning evaluation value, the early warning intervals for important dimensions and ordinary dimensions are each divided into three parts, corresponding to the red early warning interval, the orange early warning interval, and the normal yellow early warning interval, respectively. When key data exceeds the threshold of the red alert zone, an alert is issued directly; for other cases, it is determined whether the following formula is met, and if so, an alert is issued: Where q is the number of important dimensions and w is the number of ordinary dimensions. This is the preset warning coefficient.

21. The system according to claim 12, characterized in that, It also includes a dimension-missing fault information processing module, which is used to identify missing dimensions in power grid resource data before performing early warning analysis of multi-dimensional clustering space. It uses a dimension-missing fault analysis algorithm to calculate the distance between the missing real-time power grid resource data and the cluster center, and determines whether the real-time data is in the fault space. For real-time data not in the fault space, no early warning analysis of multi-dimensional clustering space is performed. The dimension-missing fault analysis algorithm is as follows: in, Data to be analyzed The probability of belonging to the j-th cluster center, where m represents the number of cluster centers in total. Let j be the cluster center; Indicates invalid information; Z is the total dimension of the power grid resource data. If the real-time data exceeds the specified threshold, it can be clustered with the j-th class and placed in the fault space; otherwise, the real-time data is not placed in the fault space and is not analyzed.

22. A computer device, characterized in that, include: One or more processors; Memory; as well as One or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, wherein when the programs are executed by the processors, they implement the steps of the grid resource clustering early warning method for novel power systems as described in any one of claims 1-11.

23. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the power grid resource clustering early warning method for novel power systems as described in any one of claims 1-11.