Fusion feature extraction method, model training method, medium and equipment
Through the dynamic feature interaction graph attention network screening, interaction and weighted fusion of synchronous waveform data and synchronous phasor data, the problem that traditional fault diagnosis methods are difficult to efficiently fuse data is solved, and the accuracy and efficiency of diagnosis are improved.
Patent Information
- Application Number
- CN202411763628.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-03-25
AI Technical Summary
Traditional fault diagnosis methods are difficult to efficiently integrate synchronous waveform data and synchronous phasor data, resulting in a decrease in diagnostic accuracy.
The dynamic feature interaction graph attention network is used to filter important features through the feature screening layer, the feature interaction layer constructs the similarity relationship between features, and the attention layer is weighted fusion, and finally optimizes the network through the loss function.
It realizes efficient integration of synchronous waveform data and synchronous phasor data, improves the accuracy and efficiency of fault diagnosis, automatically focuses on important features, and strengthens the complementarity of the two types of data.
Smart Images

Figure CN119691430A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent monitoring and fault diagnosis of electric power systems, and in particular to a fusion feature extraction method, a model training method, a medium and a device. Background Art
[0002] In the power system, synchronous waveform data refers to the original time-domain power waveform signal collected under a unified time reference, and synchronous phasor data refers to the data of electrical quantities such as voltage and current in the power system collected by the synchronous phasor measurement unit (PMU). There are significant differences in the feature dimensions, feature distribution, and importance of these two types of data. Traditional fault diagnosis methods are difficult to efficiently integrate the two to fully utilize the advantages of the two types of data, which will affect the accuracy of diagnosis. Summary of the invention
[0003] Based on this, it is necessary to provide fusion feature extraction methods, model training methods, media and equipment to solve the problem that traditional fault diagnosis methods are difficult to efficiently fuse synchronized waveform data and synchronized phasor data.
[0004] A training method for a dynamic feature interaction graph attention network, wherein the dynamic feature interaction graph attention network comprises a feature screening layer, a feature interaction layer and an attention layer connected in sequence, and the method comprises:
[0005] Inputting a first feature vector of a plurality of synchronized waveform sample data and a second feature vector of a plurality of synchronized phasor sample data into the dynamic feature interaction graph attention network, filtering feature vectors that meet the importance condition in the first feature vector through the feature vector filtering layer to form a first feature set, and filtering features that meet the importance condition in the second feature vector to form a second feature set;
[0006] The first feature set and the second feature set are spliced into a first feature matrix through the feature interaction layer, an adjacency matrix is constructed based on the similarity between the features in the first feature matrix, and the first feature matrix is updated through the adjacency matrix to obtain a second feature matrix;
[0007] Calculating the attention weights between the features in the second feature matrix through the attention layer to obtain a weighted feature vector, and updating the second feature matrix through the weighted feature vector to obtain a fused feature matrix;
[0008] The fused feature matrix is input into a preset feature loss function to calculate a loss value, and the dynamic feature interaction graph attention network is iteratively adjusted according to the loss value until the dynamic feature interaction graph attention network converges.
[0009] In one embodiment, the step of screening the feature vectors satisfying the importance condition in the first feature vector through the feature vector screening layer to form a first feature set, and screening the features satisfying the importance condition in the second feature vector to form a second feature set, comprises:
[0010] The contribution of each first eigenvector and each second eigenvector is calculated respectively, which is expressed as:
[0011]
[0012] In the above formula, Gain(x i ) represents the contribution of any first eigenvector or second eigenvector; N i is the total number of vectors of the first eigenvector or the second eigenvector; Impurity(i) is the impurity of the i-th eigenvector in the first eigenvector or the second eigenvector; Impurity(j) is the impurity of the j-th eigenvector in the first eigenvector or the second eigenvector; child(i) represents the set of child nodes related to node i;
[0013] All first feature vectors whose contribution is greater than a preset first contribution threshold are selected as a first feature set, and all second feature vectors whose contribution is greater than a preset second contribution threshold are selected as a second feature set.
[0014] In one embodiment, the step of screening the feature vectors satisfying the importance condition in the first feature vector through the feature vector screening layer to form a first feature set, and screening the features satisfying the importance condition in the second feature vector to form a second feature set, comprises:
[0015] The Lasso regression model is used to calculate the coefficients of each first eigenvector and each second eigenvector, expressed as:
[0016]
[0017] In the above formula, k(x i ) represents the coefficient of the i-th first eigenvector or the second eigenvector, y i represents the target value of the i-th first eigenvector or second eigenvector; x ij represents the jth eigenvalue in the i-th first eigenvector or the second eigenvector; β j represents the regression coefficient of the jth eigenvalue in the first eigenvector or the second eigenvector; λ represents the regularization parameter;
[0018] The first eigenvector of non-zero coefficients is selected as the first target eigenvector, and the second eigenvector of non-zero coefficients is selected as the second target eigenvector;
[0019] Calculate the mutual information value between each first target feature vector and the remaining first feature vectors, and select the first feature vectors whose mutual information value is higher than a preset first information value threshold value, and all the first target feature vectors as the first feature set;
[0020] The mutual information value between each second target feature vector and the remaining second feature vectors is calculated, and the second feature vectors whose mutual information value is higher than a preset second information value threshold value and all the second target feature vectors are screened out as the second feature set.
[0021] In one embodiment, the first feature set and the second feature set are spliced into a first feature matrix through the feature interaction layer, which is expressed as:
[0022] F int =concat(F PS ,F WS )
[0023] In the above formula, F int represents the first characteristic matrix; F PS represents the first feature set; F WS Denotes the second feature set.
[0024] In one embodiment, the adjacency matrix is constructed based on the similarity between the features in the first feature matrix, and the first feature matrix is updated by the adjacency matrix to obtain a second feature matrix, which is expressed as:
[0025]
[0026] F Hint =σ(AF int W int )
[0027] In the above formula, F int [i] represents the i-th value in the first feature matrix; F int [j] represents the jth value in the first feature matrix; A ij represents the similarity between the i-th value and the j-th value in the first feature matrix; F Hint represents the second feature matrix; σ represents the activation function; W int A weight matrix representing the interaction features.
[0028] In one embodiment, calculating the attention weights between features in the second feature matrix through the attention layer to obtain a weighted feature vector, and updating the second feature matrix through the weighted feature vector to obtain a fused feature matrix includes:
[0029]
[0030] In the above formula, α ij represents the attention weight between the i-th value and the j-th value in the second feature matrix; LRL is the activation function; a is a learnable parameter vector; represents the i-th value in the second feature matrix; represents the jth value in the second characteristic matrix; N i represents the total number of vectors associated with the i-th value in the second feature matrix; h i Represents the i-th fused feature in the fused feature matrix.
[0031] In one embodiment, the calculation formula of the loss value is expressed as:
[0032]
[0033] In the above formula, represents the loss value; h i represents the i-th fusion feature in the fusion feature matrix; h j represents the jth fusion feature in the fusion feature matrix; S ij Represents the similarity matrix derived based on domain knowledge, representing the similarity between features i and j.
[0034] A fusion feature extraction method, the method comprising:
[0035] The first eigenvector of multiple synchronous waveform measured data and the second eigenvector of multiple synchronous phasor measured data are input into the dynamic feature interaction graph attention network to obtain a fused fusion feature matrix; wherein the dynamic feature interaction graph attention network is trained by the above-mentioned dynamic feature interaction graph attention network training method.
[0036] A computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the processor executes the steps of the training method of the dynamic feature interaction graph attention network and the fusion feature extraction method.
[0037] A terminal device includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the training method of the dynamic feature interaction graph attention network and the fusion feature extraction method.
[0038] The present invention provides a fusion feature extraction method, a model training method, a medium and a device, which gradually screen the important features in the synchronous waveform data and the synchronous phasor data, and splice them into a feature matrix, construct the similarity relationship between the features, and use the attention mechanism to weightedly fuse the features, and finally optimize the network through the loss function to achieve the purpose of efficiently fusing the two types of data. Compared with the traditional fault diagnosis method, this method can overcome the problems of differences in feature dimensions and feature distribution between synchronous waveform data and synchronous phasor data through dynamic screening and feature interaction, thereby improving the efficiency of data fusion and the accuracy of fault diagnosis. Through the weighted update of the attention mechanism, the model can automatically focus on important features, strengthen the complementarity of the two types of data, and improve the diagnostic performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0040] in:
[0041] Figure 1 A flowchart of the training method of the dynamic feature interaction graph attention network;
[0042] Figure 2 The structural diagram of the dynamic feature interaction graph attention network;
[0043] Figure 3 It is a structural diagram of the fusion feature extraction method;
[0044] Figure 4 This is a structural block diagram of the terminal equipment. DETAILED DESCRIPTION
[0045] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0046] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0047] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0048] like Figure 1 As shown, Figure 1 The flowchart of a training method of a dynamic feature interaction graph attention network in one embodiment is shown. The dynamic feature interaction graph attention network includes a feature screening layer, a feature interaction layer and an attention layer connected in sequence. The training method of the dynamic feature interaction graph attention network in this embodiment includes the following steps:
[0049] S101, input the first feature vectors of multiple synchronized waveform sample data and the second feature vectors of multiple synchronized phasor sample data into the dynamic feature interaction graph attention network, and filter the feature vectors that meet the importance condition in the first feature vector through the feature vector filtering layer to form a first feature set, and filter the features that meet the importance condition in the second feature vector to form a second feature set.
[0050] Among them, the synchronous waveform data is usually the time domain representation of the voltage, current and other signals collected at a certain moment in the power system (under a unified time reference). By performing time domain analysis on the synchronous waveform data, such as calculating the statistical features of the waveform such as the mean, peak value, standard deviation, or using Fourier transform to extract its frequency domain features, or using a feature extraction network to extract features, the first feature vector can be obtained, such as Figure 2 As shown, that is, F here w1 …F wn .
[0051] The synchronized phasor data comes from the synchronized phasor measurement unit (PMU), which accurately measures the voltage, current and other signals in the power system and converts them into phasor form. By extracting the basic features of the synchronized phasor data such as phase and amplitude, or by using the feature extraction network for feature extraction, the second eigenvector can be obtained, such as Figure 2 As shown, that is, F here p1 …F pn .
[0052] Then, these first feature vectors and second feature vectors are input into the dynamic feature interaction graph attention network and filtered through the feature vector screening layer, which is used to select the features that contribute most to the task according to a certain standard or algorithm. Usually, the screening criteria are based on the contribution or importance of each feature in the data, which can be completed by feature selection algorithms (such as XGBoost).
[0053] Optionally, in S101, filtering the feature vectors satisfying the importance condition in the first feature vector by the feature vector filtering layer to form a first feature set, and filtering the features satisfying the importance condition in the second feature vector to form a second feature set specifically include the following steps:
[0054] A1. Calculate the contribution of each first eigenvector and each second eigenvector respectively, expressed as:
[0055]
[0056] In the above formula, Gain(x i ) represents the contribution of any first eigenvector or second eigenvector, that is, x i Indicates F w1 …F wn Any one of, or F p1 …F pn Any one of N i is the total number of vectors of the first eigenvector or the second eigenvector; Impurity(i) is the impurity of the i-th eigenvector in the first eigenvector or the second eigenvector; Impurity(j) is the impurity of the j-th eigenvector in the first eigenvector or the second eigenvector. The impurity is used to describe the degree of disorder of the data set. Common impurity measurement methods include Gini index and information gain. In the decision tree model, impurity reflects the degree of disorder of the data. The lower the impurity, the more effective the feature is in separating the data; child(i) represents the set of child nodes related to node i.
[0057] This step calculates the contribution based on the impurity of each feature vector, where the higher the contribution, the greater the impact of the feature on the model.
[0058] A2. Filter out all first feature vectors whose contribution is greater than a preset first contribution threshold as a first feature set, and filter out all second feature vectors whose contribution is greater than a preset second contribution threshold as a second feature set.
[0059] In the above specific embodiment, screening out features with higher contribution helps to reduce the impurity of the model (i.e., the chaos of the data set), that is, eliminating redundant or irrelevant features. Therefore, the selected features can more effectively help the model perform subsequent classification or regression tasks and improve the accuracy of fault diagnosis.
[0060] Optionally, in S101, filtering the feature vectors satisfying the importance condition in the first feature vector by the feature vector filtering layer to form a first feature set, and filtering the features satisfying the importance condition in the second feature vector to form a second feature set specifically include the following steps:
[0061] B1. Use the Lasso regression model to calculate the coefficients of each first eigenvector and each second eigenvector, expressed as:
[0062]
[0063] In the above formula, k(x i ) represents the coefficient of the i-th first eigenvector or second eigenvector, such as Figure 2 As shown, x i Indicates F w1 …F wn Any one of, or F p1 …F pn Any one of y i represents the target value of the i-th first eigenvector or second eigenvector; x ij represents the jth eigenvalue in the i-th first eigenvector or the second eigenvector; β j Represents the regression coefficient of the jth eigenvalue in the first eigenvector or the second eigenvector. The regression coefficient determines the role of each eigenvalue in the model. The larger the coefficient, the greater the influence of the eigenvalue on the prediction of the target. λ represents the regularization parameter.
[0064] B2. Filter the first eigenvector with non-zero coefficients as the first target eigenvector, and filter the second eigenvector with non-zero coefficients as the second target eigenvector.
[0065] The result of Lasso regression will produce a set of coefficients, some of which will become zero. The eigenvectors corresponding to these coefficients do not contribute significantly to the prediction of the target variable and are therefore discarded, while the features corresponding to the remaining non-zero coefficients are of greater importance in the model and are therefore retained.
[0066] B3. Calculate the mutual information value between each first target feature vector and the remaining first feature vectors, and select the first feature vectors whose mutual information value is higher than a preset first information value threshold, and all the first target feature vectors as the first feature set.
[0067] Among them, the mutual information value is a measure of the correlation and shared information between two variables. The higher the mutual information value, the stronger the correlation between the two features. By calculating the mutual information value, the correlation between each first target feature vector and the remaining first feature vectors can be evaluated, and those features with high information sharing with the first target feature can be selected. Since the first target feature vector is already of great importance, this step can be used to expand the selection of important feature vectors to enhance the expressive power of the feature set.
[0068] B4. Calculate the mutual information value between each second target feature vector and the remaining second feature vectors, and select the second feature vectors whose mutual information value is higher than a preset second information value threshold value, and all the second target feature vectors as the second feature set.
[0069] The principle of this step is basically the same as that of step B3, so it will not be described in detail.
[0070] S102, splicing the first feature set and the second feature set into a first feature matrix through a feature interaction layer, constructing an adjacency matrix based on the similarity between features in the first feature matrix, and updating the first feature matrix through the adjacency matrix to obtain a second feature matrix.
[0071] Among them, similarity is a measure of the degree of similarity between two feature vectors. Commonly used similarity measures include cosine similarity, Euclidean distance, Pearson correlation coefficient, etc. The purpose of calculating similarity is to reveal which features show similar patterns or change rules in the data, and then infer that these features may have common information value in tasks such as fault diagnosis. In this step, similarity is used to construct an adjacency matrix, which provides structural information for the similarity relationship between feature vectors, and the update operation based on the adjacency matrix will perform a weighted adjustment on the original feature matrix to generate a new second feature matrix.
[0072] Optionally, in S102, the first feature set and the second feature set are concatenated into a first feature matrix through a feature interaction layer, which is expressed as:
[0073] F int =concat(F PS ,F WS )
[0074] In the above formula, F int represents the first characteristic matrix; F PS represents the first feature set; F WS Represents the second feature set.
[0075] Optionally, in S102, an adjacency matrix is constructed based on the similarity between features in the first feature matrix, and the first feature matrix is updated by the adjacency matrix to obtain a second feature matrix, which is expressed as:
[0076]
[0077] F Hint =σ(AF int W int )
[0078] In the above formula, F int [i] represents the i-th value in the first feature matrix; F int [j] represents the jth value in the first feature matrix; A ij represents the similarity between the i-th value and the j-th value in the first feature matrix; F Hint represents the second feature matrix; σ represents the activation function; W int The purpose of graph convolution is to dynamically adjust these weights based on the relationship between features, so that the model can learn the importance of specific features in specific tasks.
[0079] In the above formula, by calculating the similarity between features, an adjacency matrix A is obtained, where the element A ij Represents the similarity between the i-th value and the j-th value in the first feature matrix. The higher the similarity, the closer the relationship between the features and the greater the impact of information propagation. By means of graph convolution, the adjacency matrix A is combined with the first feature matrix F int and the weight matrix W int Perform information propagation and obtain the second characteristic matrix F Hint This process incorporates the similarity information between features into the new feature matrix, so the second feature matrix has stronger feature expression ability than the first feature matrix.
[0080] S103, calculating the attention weights between the features in the second feature matrix through the attention layer to obtain a weighted feature vector, and updating the second feature matrix through the weighted feature vector to obtain a fused feature matrix.
[0081] Optionally, in S103, the attention weights between the features in the second feature matrix are calculated by the attention layer to obtain a weighted feature vector, and the second feature matrix is updated by the weighted feature vector to obtain a fused feature matrix, which is expressed as:
[0082]
[0083] In the above formula, α ij Represents the attention weight between the i-th value and the j-th value in the second feature matrix. The larger the α ijIndicates that feature j contributes more to feature i; LRL is an activation function, which is used to introduce nonlinear relationships to ensure that the model can capture complex data patterns during training; a is a learnable parameter vector. During training, the model will automatically adjust the value of a through back propagation so that the most meaningful features have the greatest impact on the fusion results; represents the i-th value in the second feature matrix; represents the jth value in the second characteristic matrix; N i represents the total number of vectors associated with the i-th value in the second feature matrix; h i Represents the i-th fused feature in the fused feature matrix. The fused feature represents the information merging between multiple features. The weighting mechanism makes the matrix focus on important features.
[0084] In the above formula, the attention weight between feature i and feature j is determined by calculating the similarity between them. This weight reflects the contribution of feature j to feature i. The activation function is then used to perform a nonlinear transformation on the similarity so that the model can better capture the complex relationship between features. The representation of feature i is updated by weighted summation of feature i and its neighbor features. The updated feature i contains information from other features while retaining some information of the original feature. In this way, the model can dynamically select and strengthen important features while weakening or ignoring less important features. This not only improves the accuracy of the model, but also avoids the interference of redundant information.
[0085] S104, input the fused feature matrix into a preset feature loss function to calculate the loss value, and iteratively adjust the dynamic feature interaction graph attention network according to the loss value until the dynamic feature interaction graph attention network converges.
[0086] In this step, the feature loss function compares the fused feature matrix with the expected target features, and then guides the network training process by calculating the loss value.
[0087] Optionally, the calculation formula of the loss value in S104 is expressed as:
[0088]
[0089] In the above formula, Indicates the loss value; h i represents the i-th fusion feature in the fusion feature matrix; h j represents the jth fusion feature in the fusion feature matrix; S ij Represents the similarity matrix derived based on domain knowledge, representing the similarity between features i and j.
[0090] The goal of this loss function is to optimize the fusion feature matrix so that the feature similarity learned by the model can be as close as possible to the actual similarity derived from domain knowledge. In other words, the model not only needs to learn the similarity between features from the data, but also needs to be consistent with the similarity based on prior knowledge or expert experience. By introducing the similarity matrix, the loss function helps reduce the noise in the feature representation, ensuring that the learned features are not only data-driven, but also reflect actual physical or engineering relevance. In this way, the model can effectively avoid overfitting and incorrect feature associations, further improving its generalization ability.
[0091] Next, we use the calculated loss value to perform gradient derivation on the network parameters (such as convolution kernel parameters, weights, etc.). We then use optimization algorithms (such as gradient descent or Adam) to adjust the network parameters according to the gradient to reduce the loss value. By repeatedly performing the above steps and continuously optimizing the network parameters through multiple iterations, we eventually converge the loss function value to the minimum value, and the dynamic feature interaction graph attention network reaches the optimal state.
[0092] The training method of the dynamic feature interaction graph attention network mentioned above gradually screens the important features in the synchronous waveform data and synchronous phasor data, splices them into a feature matrix, constructs the similarity relationship between the features, and uses the attention mechanism to weightedly fuse the features. Finally, the network is optimized through the loss function to achieve the purpose of efficiently fusing the two types of data. Compared with traditional fault diagnosis methods, this method can overcome the problems of differences in feature dimensions and feature distribution between synchronous waveform data and synchronous phasor data through dynamic screening and feature interaction, thereby improving the efficiency of data fusion and the accuracy of fault diagnosis. Through the weighted update of the attention mechanism, the model can automatically focus on important features, strengthen the complementarity of the two types of data, and improve the diagnostic performance.
[0093] In one embodiment, Figure 3 As shown, a fusion feature extraction method is proposed, which includes:
[0094] S301, input the first eigenvector of multiple synchronized waveform measured data and the second eigenvector of multiple synchronized phasor measured data into the dynamic feature interaction graph attention network to obtain a fused feature matrix after fusion.
[0095] Among them, the dynamic feature interaction graph attention network is trained by the above-mentioned dynamic feature interaction graph attention network training method.
[0096] This method combines the information in the synchronized waveform data and the synchronized phasor data to form a more comprehensive feature representation. This matrix contains the important features of the two types of data after fusion, and through network training, it can improve the quality of data fusion and the accuracy of fault diagnosis.
[0097] Figure 4 FIG. 2 shows an internal structure diagram of a terminal device in an embodiment. Figure 4 As shown, the terminal device includes a processor, a memory and a network interface connected via a system bus. The memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the terminal device stores an operating system and may also store a computer program. When the computer program is executed by the processor, the processor can implement the fusion feature extraction method. The internal memory may also store a computer program. When the computer program is executed by the processor, the processor can implement the fusion feature extraction method. Those skilled in the art can understand that Figure 4 The structure shown in the figure is only a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the terminal device to which the scheme of the present application is applied. The specific terminal device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0098] A computer-readable storage medium stores a computer program, which implements the following steps when executed by a processor: inputting a first eigenvector of a plurality of synchronous waveform sample data and a second eigenvector of a plurality of synchronous phasor sample data into a dynamic feature interaction graph attention network, filtering the eigenvectors that meet the importance condition in the first eigenvector through a eigenvector screening layer to form a first feature set, and filtering the features that meet the importance condition in the second eigenvector to form a second feature set; splicing the first feature set and the second feature set into a first feature matrix through a feature interaction layer, and constructing an adjacency matrix based on the similarity between features in the first feature matrix, updating the first feature matrix through the adjacency matrix to obtain a second feature matrix; calculating the attention weights between features in the second feature matrix through an attention layer to obtain a weighted eigenvector, and updating the second feature matrix through the weighted eigenvector to obtain a fused feature matrix; inputting the fused feature matrix into a preset feature loss function to calculate a loss value, and iteratively adjusting the dynamic feature interaction graph attention network through the loss value until the dynamic feature interaction graph attention network converges.
[0099] And implement the following steps: input the first eigenvector of multiple synchronous waveform measured data and the second eigenvector of multiple synchronous phasor measured data into the dynamic feature interaction graph attention network to obtain a fused fusion feature matrix; wherein the dynamic feature interaction graph attention network is trained by the above-mentioned dynamic feature interaction graph attention network training method.
[0100] A terminal device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program: inputting a first eigenvector of a plurality of synchronous waveform sample data and a second eigenvector of a plurality of synchronous phasor sample data into a dynamic feature interaction graph attention network, filtering the eigenvectors that meet the importance condition in the first eigenvector through a eigenvector screening layer to form a first feature set, and filtering the features that meet the importance condition in the second eigenvector to form a second feature set; splicing the first feature set and the second feature set into a first feature matrix through a feature interaction layer, constructing an adjacency matrix based on the similarity between features in the first feature matrix, updating the first feature matrix through the adjacency matrix to obtain a second feature matrix; calculating the attention weights between features in the second feature matrix through an attention layer to obtain a weighted eigenvector, updating the second feature matrix through the weighted eigenvector to obtain a fused feature matrix; inputting the fused feature matrix into a preset feature loss function to calculate a loss value, and iteratively adjusting the dynamic feature interaction graph attention network through the loss value until the dynamic feature interaction graph attention network converges.
[0101] And implement the following steps: input the first eigenvector of multiple synchronous waveform measured data and the second eigenvector of multiple synchronous phasor measured data into the dynamic feature interaction graph attention network to obtain a fused fusion feature matrix; wherein the dynamic feature interaction graph attention network is trained by the above-mentioned dynamic feature interaction graph attention network training method.
[0102] It should be noted that the above-mentioned fusion feature extraction method, model training method, device and computer-readable storage medium belong to a general inventive concept, and the contents in the embodiments of the fusion feature extraction method, model training method, device and computer-readable storage medium can be applied to each other.
[0103] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0104] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0105] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A training method for a dynamic feature interaction graph attention network, characterized in that: The dynamic feature interaction graph attention network includes a feature screening layer, a feature interaction layer and an attention layer connected in sequence, and the method includes: Inputting a first feature vector of a plurality of synchronized waveform sample data and a second feature vector of a plurality of synchronized phasor sample data into the dynamic feature interaction graph attention network, filtering feature vectors that meet the importance condition in the first feature vector through the feature vector filtering layer to form a first feature set, and filtering features that meet the importance condition in the second feature vector to form a second feature set; The first feature set and the second feature set are spliced into a first feature matrix through the feature interaction layer, an adjacency matrix is constructed based on the similarity between the features in the first feature matrix, and the first feature matrix is updated through the adjacency matrix to obtain a second feature matrix; Calculating the attention weights between the features in the second feature matrix through the attention layer to obtain a weighted feature vector, and updating the second feature matrix through the weighted feature vector to obtain a fused feature matrix; The fused feature matrix is input into a preset feature loss function to calculate a loss value, and the dynamic feature interaction graph attention network is iteratively adjusted according to the loss value until the dynamic feature interaction graph attention network converges.
2. The method according to claim 1, characterized in that The step of screening the feature vectors satisfying the importance condition in the first feature vector through the feature vector screening layer to form a first feature set, and screening the features satisfying the importance condition in the second feature vector to form a second feature set, comprises: The contribution of each first eigenvector and each second eigenvector is calculated respectively, which is expressed as: In the above formula, Gain(x i ) represents the contribution of any first eigenvector or second eigenvector; N i is the total number of vectors of the first eigenvector or the second eigenvector; Impurity(i) is the impurity of the i-th eigenvector in the first eigenvector or the second eigenvector; Impurity(j) is the impurity of the j-th eigenvector in the first eigenvector or the second eigenvector; child(i) represents the set of child nodes related to node i; All first feature vectors whose contribution is greater than a preset first contribution threshold are selected as a first feature set, and all second feature vectors whose contribution is greater than a preset second contribution threshold are selected as a second feature set.
3. The method according to claim 1, characterized in that The step of screening the feature vectors satisfying the importance condition in the first feature vector through the feature vector screening layer to form a first feature set, and screening the features satisfying the importance condition in the second feature vector to form a second feature set, comprises: The Lasso regression model is used to calculate the coefficients of each first eigenvector and each second eigenvector, expressed as: In the above formula, k(x i ) represents the coefficient of the i-th first eigenvector or the second eigenvector, y i represents the target value of the i-th first eigenvector or second eigenvector; x ij represents the jth eigenvalue in the i-th first eigenvector or the second eigenvector; β j represents the regression coefficient of the jth eigenvalue in the first eigenvector or the second eigenvector; λ represents the regularization parameter; The first eigenvector of non-zero coefficients is selected as the first target eigenvector, and the second eigenvector of non-zero coefficients is selected as the second target eigenvector; Calculate the mutual information value between each first target feature vector and the remaining first feature vectors, and select the first feature vectors whose mutual information value is higher than a preset first information value threshold value, and all the first target feature vectors as the first feature set; The mutual information value between each second target feature vector and the remaining second feature vectors is calculated, and the second feature vectors whose mutual information value is higher than a preset second information value threshold value and all the second target feature vectors are screened out as the second feature set.
4. The method according to claim 1, characterized in that: The first feature set and the second feature set are spliced into a first feature matrix through the feature interaction layer, which is expressed as: F int =concat(F PS ,F WS ) In the above formula, F int represents the first feature matrix; F PS represents the first feature set; F WS Denotes the second feature set.
5. The method according to claim 4, characterized in that The adjacency matrix is constructed based on the similarity between the features in the first feature matrix, and the first feature matrix is updated by the adjacency matrix to obtain a second feature matrix, which is expressed as: F Hint =σ(AF int W int ) In the above formula, F int [i] represents the i-th value in the first feature matrix; F int [j] represents the jth value in the first feature matrix; A ij represents the similarity between the i-th value and the j-th value in the first feature matrix; F Hint represents the second feature matrix; σ represents the activation function; W int A weight matrix representing the interaction features.
6. The method according to claim 1, characterized in that The step of calculating the attention weights between features in the second feature matrix by the attention layer to obtain a weighted feature vector, and updating the second feature matrix by the weighted feature vector to obtain a fused feature matrix includes: In the above formula, α ij represents the attention weight between the i-th value and the j-th value in the second feature matrix; LRL is the activation function; a is a learnable parameter vector; represents the i-th value in the second feature matrix; represents the jth value in the second characteristic matrix; N i represents the total number of vectors associated with the i-th value in the second feature matrix; h i Represents the i-th fused feature in the fused feature matrix.
7. The method according to claim 1, characterized in that The calculation formula of the loss value is expressed as: In the above formula, represents the loss value; h i Represents the i-th fusion feature in the fusion feature matrix; h j Represents the jth fusion feature in the fusion feature matrix; S ij Represents the similarity matrix derived based on domain knowledge, representing the similarity between features i and j.
8. A fusion feature extraction method, characterized in that: The method comprises: The first eigenvector of multiple synchronous waveform measured data and the second eigenvector of multiple synchronous phasor measured data are input into the dynamic feature interaction graph attention network to obtain a fused feature matrix after fusion; wherein the dynamic feature interaction graph attention network is trained by the method according to claim 1.
9. A computer-readable storage medium, characterized in that: A computer program is stored, and when the computer program is executed by a processor, the processor is caused to perform the steps of the method according to any one of claims 1 to 8.
10. A terminal device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the method according to any one of claims 1 to 8.