Power grid situation adaptive deduction method based on meta learning
By employing a meta-learning-based adaptive extrapolation method for power grid status, and utilizing LDA and MAML algorithms to process power grid data, this method achieves efficient extrapolation and adaptive adjustment of power grid status. It addresses the issue of unsatisfactory performance of traditional methods in complex power grids, and improves the accuracy and real-time response capability of power grid status prediction.
Patent Information
- Application Number
- CN202510670676.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-22
- Publication Date
- 2025-11-18
AI Technical Summary
Traditional mathematical and physical models do not perform well in complex power grid situations and cannot accurately and timely predict changes in power grid status and faults, resulting in insufficient stability and security of power grid operation.
A meta-learning-based adaptive power grid situation extrapolation method is adopted. By collecting real-time power grid data, historical data, and topology data, cleaning and standardizing them, using LDA to extract key features, dividing the data into multiple tasks, and using the MAML meta-learning algorithm for model training and optimization, the real-time extrapolation and adaptive adjustment of the power grid situation can be achieved.
It improves the accuracy and timeliness of power grid status assessment and forecasting, enabling rapid adaptation to changes in power grid status and enhancing the stability and security of power grid operation.
Smart Images

Figure CN120978702A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of power grids, and more particularly relates to a power grid situation adaptive deduction method based on meta-learning. BACKGROUND
[0002] A power grid is one of the infrastructures for the operation of modern society and economy. As an important energy transmission and distribution system, the stability and security of the power grid directly affect the normal operation of various industries. With the development of smart grid technology, the scale and complexity of the power grid are increasing, and the operating conditions of the power grid have become more diverse and complex. The power grid is affected by various factors such as load fluctuations, equipment failures, external disturbances, and topology changes during operation. These factors together determine the "situation" of the power grid, i.e., the current operating state of the power grid.
[0003] In order to ensure the efficient and stable operation of the power grid, power system dispatchers and operators need to keep abreast of real-time situation information of the power grid. How to accurately and timely predict changes in the power grid situation, predict possible failures, and take appropriate preventive measures has become a core technical problem in the power system.
[0004] At present, the research on power grid situation assessment and deduction has made great progress. Traditional power grid situation assessment methods mostly rely on expert experience, static models, and simple mathematical analysis, and are usually based on historical data and power grid topology to predict the operating state of the power grid. For example, classical power flow calculation methods, state estimation methods, and pattern recognition methods based on historical data have been widely used in power grid operation.
[0005] These methods can assess the current operating situation of the power grid and make certain predictions through analysis of real-time data and historical data of the power grid.
[0006] Traditional power grid situation assessment methods often assume that the power grid system is linear, but the real power grid system is full of high nonlinearity, and there are complex interactions between various components. This makes the performance of traditional mathematical models and physical models not ideal in complex power grid situations. SUMMARY
[0007] The present application provides a power grid situation adaptive deduction method based on meta-learning, which aims to solve the technical problem that traditional mathematical models and physical models perform not ideally in complex power grid situations.
[0008] The power grid situation adaptive deduction method based on meta-learning includes the following steps:
[0009] Step 1: Collect power grid real-time data, historical power grid data, and power grid topology data from the power grid system, and clean and standardize the collected data to obtain a power grid data set after cleaning and standardization;
[0010] Step 2: Extract key features based on the cleaned and standardized power grid dataset using LDA to obtain the extracted key feature data;
[0011] Step 3: Based on the extracted key feature data and the running situation in the power grid, the different situations of the power grid are divided into multiple tasks, and a task set is constructed based on the historical data of the power grid, fault records and actual operation, each task corresponds to a data set, which is suitable for task learning in meta-learning;
[0012] Step 4: Use MAML meta-learning algorithm to meta-train the model, use multiple power grid situation tasks as training sample sets during the training process, and perform inner loop training in each task to learn the behavior characteristics of the power grid in that situation, and adjust the model parameters through outer loop optimization;
[0013] Step 5: Use the trained meta-learning model to perform real-time deduction of the power grid situation, and dynamically update the model when the power grid state changes to ensure the accuracy of the deduction.
[0014] The present application collects real-time data, historical data and topology data of the power grid, and performs cleaning and standardization to ensure the consistency and high quality of the input data, providing a reliable data foundation for subsequent analysis. Secondly, the key features of the power grid data are extracted by the LDA (Linear Discriminant Analysis) method, which effectively reduces the high dimensionality of the data and ensures the efficiency and accuracy of the model in processing large-scale power grid data. After feature extraction, the different situations of the power grid are divided into multiple tasks, each task corresponds to a different operating state of the power grid, and the meta-learning algorithm (such as MAML) is used for model training, so that the model can quickly adapt and optimize when the power grid state changes through multi-task learning. This method can gradually learn the behavior characteristics of the power grid in different situations through inner loop training, and then adjust the model parameters through outer loop optimization to improve the generalization ability and prediction accuracy of the model. Finally, in practical application, the trained meta-learning model can perform real-time deduction of the power grid situation, and dynamically update the model according to the changes of the power grid state to ensure the accuracy and timeliness of the deduction results. Through this series of steps, the present application realizes efficient deduction and self-adaptive adjustment of the power grid situation, overcomes the shortcomings of traditional methods in the complexity and dynamics of the power grid, and significantly improves the ability of power grid situation assessment and prediction.
[0015] Preferably, the step 2 comprises the following steps:
[0016] Extract time scale features: extract short-term features, medium-term features and long-term features, and for each time scale feature, calculate the statistics in the window through the sliding window method;
[0017] Spatial scale feature: for each region of the power grid, calculate the mean and standard deviation of all sensors in the region;
[0018] Fusion of multi-scale features and LDA dimension reduction: concatenate the spatial scale features and the time scale features to form a high-dimensional feature space;
[0019] LDA dimension reduction: based on the LDM model, reduce the dimension of the high-dimensional feature space, and select the first k eigenvectors as key feature data.
[0020] Preferably, the LDA model is as follows:
[0021] Inter-class scatter matrix S B :
[0022]
[0023] where k represents the number of classes; N i represents the number of i-th class samples; μ i represents the mean vector of the i-th class samples; μ represents the overall mean vector of all samples;
[0024] Intra-class scatter matrix S W :
[0025]
[0026] where C i represents the i-th class sample set; x j represents the j-th sample in the i-th class;
[0027] Calculate the LDA objective function: maximize the ratio of inter-class scatter to intra-class scatter:
[0028]
[0029] where w represents the projection direction vector;
[0030] S B w=λS W w;
[0031] Solve the generalized eigenvalue problem to get the eigenvalue λ and the corresponding eigenvector w, and the eigenvector w is the projection direction of LDA; select the first k eigenvectors w as key feature data.
[0032] Preferably, the specific steps of constructing the task data set are as follows:
[0033] Task data set division: extract the operation data under different situations from the real-time data of the power grid, extract the data samples through a predefined window, and ensure that the data set of each task can completely reflect the operation mode of the power grid under the state;
[0034] Feature selection: select features closely related to the task according to the task definition;
[0035] Label definition: define the corresponding label for each task;
[0036] Dataset construction: each task corresponds to a dataset containing feature vectors and labels under the situation.
[0037] Preferably, it also includes balancing the constructed dataset, and the specific steps are as follows:
[0038] Let the selected target sample number be N target As the data volume of each task, if the sample number of task T i is less than N target , oversampling is performed; if the sample number of task T i is greater than N target , undersampling is performed; after data balancing is performed on each task T i , the adjusted dataset containing N target samples is obtained.
[0039] Preferably, the step 3 further includes task selection, similarity between two task feature matrices is calculated based on cosine similarity, and tasks with similarity greater than a similarity threshold are selected based on similarity for joint training.
[0040] Preferably, the specific steps of meta-training the model using the MAML meta-learning algorithm are as follows:
[0041] Model parameter initialization: initialize the parameters θ0 of the model, which will be shared and optimized on all tasks;
[0042] Inner loop training:
[0043] Train the model on each task to learn the behavior characteristics of the power grid under the state through the training data, and perform small-scale training on each task T i to obtain new task-specific parameters θ i ', and the specific steps are as follows:
[0044] Assume that on task T i , the prediction error of the model is
[0045]
[0046] In the formula: denotes the training data of task T i ; x represents input data; y is the label; f θ(x) represents the predicted output of the model; Loss represents the loss function;
[0047] Inner loop update: update the parameters by gradient descent method to obtain task-specific parameters θ i ′;
[0048] Repeat inner loop: inner loop training is performed on each task, and specific model parameters θ of each task are obtained through inner loop training i ′;
[0049] Outer loop optimization:
[0050] Calculate the loss function of all tasks: after the inner loop update, calculate the loss function on all tasks and sum them up;
[0051] Outer loop update: update the model parameters by gradient descent on the loss function of all tasks with respect to θ
[0052] Iterative training:
[0053] Repeat the training iteration several times for the entire process, each iteration includes inner loop training and outer loop optimization, and obtain the optimized model parameters θ.
[0054] The beneficial effects of the present application include:
[0055] The present application collects real-time data, historical data and topology data of the power grid, and performs cleaning and standardization to ensure the consistency and high quality of the input data, providing a reliable data foundation for subsequent analysis. Secondly, by using the LDA (Linear Discriminant Analysis) method to extract the key features of the power grid data, the high dimensionality of the data is effectively reduced, ensuring the efficiency and accuracy of the model in processing large-scale power grid data. After feature extraction, the different situations of the power grid are divided into multiple tasks, each task corresponds to a different operating state of the power grid, and the meta-learning algorithm (such as MAML) is used for model training, so that the model can quickly adapt and optimize when the state of the power grid changes through multi-task learning. This method can gradually learn the behavior characteristics of the power grid under different situations through inner loop training, and then adjust the model parameters through outer loop optimization, thereby improving the generalization ability and prediction accuracy of the model. Finally, in practical application, the trained meta-learning model can perform real-time deduction on the power grid situation, and dynamically update the model according to the changes in the state of the power grid, ensuring the accuracy and timeliness of the deduction results. Through this series of steps, the present application realizes efficient deduction and adaptive adjustment of the power grid situation, overcomes the shortcomings of traditional methods in the complexity and dynamics of the power grid, and significantly improves the ability of power grid situation assessment and prediction. BRIEF DESCRIPTION OF DRAWINGS
[0056] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, the drawings in the following description only constitute some embodiments of the present application, and other drawings can be obtained by those skilled in the art without any creative effort.
[0057] Figure 1 The overall step block diagram provided by the present application. DETAILED DESCRIPTION
[0059] In order to make the technical problems, technical solutions and beneficial effects of the present application more clear, the present application will be further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application.
[0060] Referring to Figure 1 for further explanation of the best embodiments of the present application;
[0061] The power grid situation self-adaptive deduction method based on meta-learning includes the following steps:
[0062] Step 1: Collect real-time power grid data, historical power grid data and power grid topology data from the power grid system, and clean and standardize the collected data, and the power grid data set after cleaning and standardization;
[0063] Real-time power grid data: voltage, current, load, frequency, power flow, line state, etc.
[0064] Historical power grid data: load change, equipment failure, climate data, etc.
[0065] Power grid topology data: structure of power grid, topology relationship of each substation and transmission line.
[0066] Data cleaning: using statistical methods (mean interpolation, interpolation method, etc.) to supplement missing data and remove outliers.
[0067] Step 2: Based on the power grid data set after cleaning and standardization, key features are extracted by LDA to obtain the extracted key feature data;
[0068] The step 2 includes the following steps:
[0069] Extracting time scale features: extracting short-term features, medium-term features and long-term features, for each time scale feature, calculating the statistics in the window by sliding window method;
[0070] Short-term scale (minute level): Select a minute-level time window (e.g., 1-10 minute sliding window), calculate the instantaneous load, frequency, power, and other short-term fluctuation characteristics of the power grid.
[0071] Medium-term scale (hour level): Select a hour-level time window, calculate the average load, power fluctuation, fault occurrence frequency, and other indicators within the window.
[0072] Long-term scale (day level or longer time scale): Select a day-level or week-level time window, extract the seasonal fluctuations, periodic load changes, and other long-term characteristics of the power grid.
[0073] Spatial scale features: For each region of the power grid (such as different substations, power supply grid areas, etc.), we can calculate the average value, standard deviation, etc. of all sensors (such as voltage, current monitoring points) in the region.
[0074] Assume the feature set of region R i is Then:
[0075]
[0076] In the formula: M i represents the number of sensors in region R i ; represents the feature value of the jth detection point; represents the average feature of region R i ;
[0077] Fusion of multi-scale features and LDA dimensionality reduction: Concatenate the spatial scale features and time scale features to form a high-dimensional feature space;
[0078] LDA dimensionality reduction: Based on the LDM model, the high-dimensional feature space is reduced, and the first k feature vectors are selected as key feature data.
[0079] The LDA model is as follows:
[0080] The between-class scatter matrix S B :
[0081]
[0082] In the formula: k represents the number of classes; N i represents the number of i-th class samples; μ i represents the mean vector of the i-th class sample; μ represents the overall mean vector of all samples;
[0083] The within-class scatter matrix S W :
[0084]
[0085] where C i represents the set of the ith class of samples; x j represents the jth sample in the ith class;
[0086] Calculate the LDA objective function: maximize the ratio of inter-class dispersion to intra-class dispersion:
[0087]
[0088] where w represents the projection direction vector;
[0089] S B w = λS W W;
[0090] Solve the generalized eigenvalue problem to obtain the eigenvalue λ and the corresponding eigenvector w, which is the projection direction of LDA. Select the top k eigenvectors w as the key feature data.
[0091] Step 3: Based on the extracted key feature data and the operating situation in the power grid, divide the different situations of the power grid into multiple tasks, and based on the historical data of the power grid, fault records and actual operation, construct a task set, each task corresponds to a data set, suitable for task learning in meta-learning;
[0092] Exemplary:
[0093] The goal of power grid situation deduction is to predict the behavior of the power grid in different states from real-time operating data. The operating state of the power grid can change due to equipment failure, power demand fluctuations, external environmental changes, and other factors. Therefore, the operating situation of the power grid has high dynamicity and complexity. In order to adapt to the meta-learning algorithm, we divide the operating situation of the power grid into several sub-tasks, each corresponding to a specific power grid operating mode or behavior characteristic.
[0094] The situation of the power grid can be divided according to the following dimensions:
[0095] Operating state: normal operation of the power grid, fault state, emergency state, load fluctuation, etc.
[0096] Device health state: health status of power grid equipment, such as normal equipment, partial failure, complete failure, etc.
[0097] Load demand state: fluctuation state of power grid load, such as high load, low load, fluctuating load, etc.
[0098] Topology structure change: situation change caused by changes in power grid topology (such as line disconnection, device offline, etc.).
[0099] According to these dimensions, the situation of the power grid can be divided into multiple tasks, such as:
[0100] Task 1: Normal operation state of power grid
[0101] Task 2: Partial failure state of power grid equipment
[0102] Task 3: High load state of power grid
[0103] Task 4: Change of power grid topology
[0104] Task 5: Emergency recovery state of power grid.
[0105] The specific steps for constructing the task dataset are as follows:
[0106] Task dataset division: First, extract the operation data under different situations from the real-time data of the power grid. For example, if the power grid is in the "high load" state, extract the load data, equipment state, fault record, etc. under this state.
[0107] Extract data samples through predefined time windows (such as 1 hour, 24 hours, etc.), ensuring that the dataset of each task can fully reflect the behavior pattern of the power grid under this state.
[0108] Feature selection: According to the definition of the task, select features closely related to the task. For example, for the "partial failure of equipment" task, select features such as equipment failure record, equipment response time, voltage fluctuation; for the "high load" task, select features such as load prediction data, historical load, external climate factors, etc.
[0109] If necessary, further feature engineering can be performed according to the different operation modes of the power grid system, such as normalization, standardization or dimension reduction (LDA is only used in step 2 and is not repeated in this step).
[0110] Label definition: Define the corresponding label for each task. For example, the label of task 1 ("normal operation of power grid") is "normal", the label of task 2 ("partial failure of power grid equipment") is "partial failure", the label of task 3 ("high load of power grid") is "high load", etc.
[0111] Dataset construction: Each task corresponds to a dataset containing feature vectors and labels under this situation, as follows:
[0112] D i ={(X i,1 ,y i,1 ),(X i,2 ,y i,2 ),…,(X i,n ,y i,n )};
[0113] wherein: X i,j represents the feature vector (such as load data, equipment state, topology data, etc.) under the task T i ; y i,j represents the label corresponding to the feature vector;
[0114] Further comprising balancing processing of the constructed data set, and the specific steps are as follows:
[0115] Suppose the selected target sample number N target is taken as the data amount of each task, if the sample number of the task T i is less than N target , oversampling is performed; if the sample number of the task T i is greater than N target , undersampling is performed; after the data balancing of each task T i , an adjusted data set containing N target samples is obtained; wherein the oversampling is to repeatedly sample the samples in D i to increase the sample number until N target ; the undersampling is to randomly delete the excessive samples from D i until N target ; the data itself can be unbalanced (for example, some tasks can have more samples and some tasks can have fewer samples), which can cause the training to be biased towards the tasks with large sample amounts. Therefore, the data balancing technology adjusts the data set size of each task through oversampling or undersampling, so that the sample number of each task is consistent or reaches a certain standard. This balancing processing ensures that the model will not be biased due to too much or too little data of some tasks.
[0116] As a further implementation manner of the embodiment, the step 3 further comprises task selection, similarity between two task feature matrices is calculated based on cosine similarity, and tasks with similarity greater than a similarity threshold are selected to be trained together based on the similarity. By calculating the similarity (such as feature similarity, label distribution, etc.) between tasks, we can know which tasks are more similar in feature space or in target prediction. In the training process, tasks with high similarity can be selected to be trained together to improve the generalization ability of the model.
[0117] Step 4: meta-training the model using the MAML meta-learning algorithm, using multiple power grid situation tasks as training sample sets in the training process, performing inner loop training in each task to learn the behavior characteristics of the power grid under the situation, and adjusting the model parameters through outer loop optimization;
[0118] In this embodiment, the model used for meta-training using the MAML meta-learning algorithm refers to a machine learning model designed to solve a specific task. In the context of power grid situation simulation, these models can be:
[0119] Fault prediction model: used to predict potential faults and equipment failures in the power grid.
[0120] Grid demand forecasting model: used to predict fluctuations in electricity demand.
[0121] Situation assessment model: used to assess the real-time operating status of the power grid.
[0122] Recovery strategy optimization model: used to optimize recovery strategies after power grid failures.
[0123] The specific steps for meta-training the model using the MAML meta-learning algorithm are as follows:
[0124] Model parameter initialization: Initialize the model parameters θ0. Parameter θ0 will be shared and optimized across all tasks.
[0125] Internal circulation training:
[0126] The model is trained on each task, and the behavioral characteristics of the power grid in that state are learned through the training data. i Perform small-scale training to obtain new task-specific parameters θ. i The specific steps are as follows:
[0127] Assuming in task T i Above, the model's prediction error is
[0128]
[0129] In the formula: Represents task T i The training data; x represents the input data; y is the label; f θ (x) represents the model's predicted output; Loss represents the loss function;
[0130] Inner loop update: Update the parameters using gradient descent to obtain the task-specific parameters θ. i ′;
[0131] Repeated inner loop: Perform inner loop training on each task, and obtain the specific model parameters θ for each task through inner loop training. i ′;
[0132] External loop optimization:
[0133] Compute the loss function for all tasks: After the inner loop update, compute the loss function on all tasks and sum them up;
[0134] Outer loop update: Update the model parameters by gradient descent on the loss function with respect to θ for all tasks;
[0135] Iterative training:
[0136] Repeat the training iterations multiple times for the entire process, each iteration including inner loop training and outer loop optimization, to obtain the optimized model parameters θ.
[0137] In the present invention, the power grid situation tasks are divided based on historical data, fault records and power grid topology, each task containing a specific situation of the power grid. By using LDA to extract the key features of the power grid, it can ensure that each task is representative and capture different working states of the power grid. The use of MAML algorithm makes the model quickly adapt to the new power grid situation through a small number of training steps when the power grid state changes, improving the real-time response ability and accuracy of the system. The meta-training method of MAML can handle different power grid situation tasks, adapt to the complex and variable operation mode of the power grid, and maintain good performance in different power grid states.
[0138] Step 5: Use the trained meta-learning model to perform real-time inference of the power grid situation, and dynamically update the model when the power grid state changes to ensure the accuracy of the inference.
[0139] When the power grid situation changes, real-time data is fed back to the model. Through the feedback of new data, the model needs to fine-tune according to a small number of new samples to quickly adapt to the new power grid state.
[0140] Using the inner loop mechanism of MAML, based on the current real-time data and inference results, fine-tune quickly. In this case, the inner loop update will optimize for the current power grid situation to adapt to the new state.
[0141] If there is a significant change in the power grid situation over a long period of time, the model can be further adjusted through outer loop optimization.
[0142] The present application collects real-time data, historical data and topology data of the power grid, and performs cleaning and standardization to ensure the consistency and high quality of the input data, providing a reliable data foundation for subsequent analysis. Secondly, by using the LDA (Linear Discriminant Analysis) method to extract the key features of the power grid data, the high dimensionality of the data is effectively reduced, ensuring the efficiency and accuracy of the model in processing large-scale power grid data. After feature extraction, different situations of the power grid are divided into multiple tasks, each task corresponding to different operating states of the power grid. The meta-learning algorithm (such as MAML) is used for model training, so that the model can quickly adapt and optimize when the state of the power grid changes through multi-task learning. This method can gradually learn the behavior characteristics of the power grid under different situations through inner loop training, and then optimize and adjust the model parameters through outer loop, thereby improving the generalization ability and prediction accuracy of the model. Finally, in practical application, the trained meta-learning model can perform real-time deduction on the state of the power grid, and dynamically update the model according to the changes of the power grid state, ensuring the accuracy and timeliness of the deduction results. Through these series of steps, the present application realizes efficient deduction and self-adaptive adjustment of the power grid situation, overcomes the shortcomings of traditional methods in the complexity and dynamics of the power grid, and significantly improves the ability of power grid situation assessment and prediction.
[0143] The above is only a preferred embodiment of the present application, and is not intended to limit the present application. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A power grid situation self-adaptive deduction method based on meta-learning, characterized in that, The method comprises the following steps: Step 1: Collect real-time grid data, historical grid data and grid topology data from the grid system, and clean and standardize the collected data to obtain a cleaned and standardized grid data set; Step 2: Extract key features based on the cleaned and standardized grid data set using LDA to obtain extracted key feature data; Step 3: Based on the extracted key feature data and the running situation in the grid, different situations of the grid are divided into multiple tasks, and a task set is constructed based on the historical data of the grid, fault records and actual operation conditions, each task corresponds to a data set, which is suitable for task learning in meta-learning; Step 4: Use the MAML meta-learning algorithm to meta-train the model, use multiple grid situation tasks as training sample sets during the training process, perform inner loop training in each task to learn the behavior characteristics of the grid in the situation, and optimize the model parameters through outer loop optimization; Step 5: Use the trained meta-learning model to perform real-time deduction of the grid situation, and dynamically update the model when the grid state changes to ensure the accuracy of the deduction.
2. The meta-learning based power grid situation self-adaptive deduction method according to claim 1, characterized in that, The step 2 comprises the following steps: Extracting time scale features: extracting short-term features, medium-term features and long-term features, and for each time scale feature, calculating the statistics in the window through the sliding window method; Spatial scale feature: for each region of the grid, calculate the average and standard deviation of all sensors in the region; Fusion and LDA dimensionality reduction of multi-scale features: splice the spatial scale features and the time scale features to form a high-dimensional feature space; LDA dimensionality reduction: reduce the dimensionality of the high-dimensional feature space based on the LDM model, and select the first k eigenvectors as the key feature data.
3. The meta-learning based power grid situation self-adaptive deduction method according to claim 1, characterized in that, The LDA model is as follows: Intra-class scatter matrix S B : where: k represents the number of classes; N i represents the number of samples in the ith class; μ i represents the mean vector of the ith class; μ represents the overall mean vector of all samples; Intra-class scatter matrix S W : where: C i represents a set of samples of the i-th class; x j represents the j-th sample in the i-th class; Calculate the LDA objective function: maximize the ratio of inter-class dispersion to intra-class dispersion: In the formula: w represents the projection direction vector; S B w = λS W w; Obtain the eigenvalue λ and the corresponding eigenvector w by solving the generalized eigenvalue problem, and the eigenvector w is the projection direction of LDA; select the first k eigenvectors w as the key feature data.
4. The meta-learning based power grid situation self-adaptive deduction method according to claim 1, characterized in that, The specific steps of constructing the task data set are as follows: Task data set division: extract running data under different situations from the real-time data of the grid, extract data samples through a predefined window, and ensure that the data set of each task can completely reflect the running mode of the grid under the state; Feature selection: select features closely related to the task according to the task definition; Label definition: define the corresponding label for each task; Data set construction: each task corresponds to a data set, which contains the feature vector and the label under the situation.
5. The meta-learning based power grid situation self-adaptive deduction method according to claim 4, characterized in that, It also includes balancing the constructed data set, and the specific steps are as follows: Set the target sample number N target As the data amount of each task, if the sample number of task T i is less than N target , oversampling is performed; if the sample number of task T i is greater than N target , undersampling is performed; after data balancing is performed on each task T i , an adjusted data set containing N target samples is obtained.
6. The meta-learning based power grid situation self-adaptive deduction method according to claim 4, characterized in that, The step 3 also includes task selection, calculating the similarity between two task feature matrices based on cosine similarity, and selecting tasks with similarity greater than a similarity threshold for joint training based on the similarity.
7. The meta-learning based power grid situation self-adaptive deduction method according to claim 1, characterized in that, The specific steps of meta-training the model using the MAML meta-learning algorithm are as follows: Model parameter initialization: initialize the model parameters θ0, which will be shared and optimized on all tasks; Inner loop training: The model is trained on each task, learning the behavior characteristics of the power grid in this state through the training data, and the new task-specific parameters θ i are obtained through small-scale training on each task T i The specific steps are as follows: Assume that at task T i the prediction error of the model is In the formula: represents the task T i ; x represents the input data; y is the label; f θ (x) represents the predicted output of the model; Loss represents the loss function; Inner loop update: update the parameters by gradient descent method to get task-specific parameters θ i ′; Inner loop training: inner loop training is performed on each task to obtain task-specific model parameters θ i ′; Outer loop optimization: Compute the loss function for all tasks: After the inner loop update, compute the loss function on all tasks and sum them up; Outer loop update: Update the model parameters by gradient descent on the loss function with respect to θ for all tasks; Iterative training: Repeat the training iterations for multiple times, each iteration includes inner loop training and outer loop optimization, and get the optimized model parameters θ.
Citation Information
Patent Citations
Power generation power prediction method of optical storage power grid based on model agnostic meta learning method
CN116384539A
Small sample time sequence prediction method based on meta-learning framework
CN117272040A
Smart power grid security situation assessment method and system
CN118536875A
Optimal power flow computation method based on multi-task deep learning
US11436494B1