Dynamic updating method and system for digital twin model of power grid
The power grid data is obtained in real time through sensor networks and machine learning algorithms, and the power grid digital twin model is dynamically updated, solving the problem that traditional power grid monitoring methods are difficult to meet real-time needs, real-time monitoring and prediction of power grid status is achieved, and operation and maintenance efficiency and model accuracy are improved.
Patent Information
- Application Number
- CN202510275120.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-07
- Publication Date
- 2025-07-18
AI Technical Summary
Traditional power grid monitoring and management methods are difficult to meet the efficient, safe and reliable operation needs of modern power grids. The existing digital twin models mainly rely on historical data and static models, making it difficult to achieve real-time monitoring.
The power grid operation data is obtained in real time through the sensor network, combined with machine learning algorithms to analyze the state changes of the power grid, dynamically update the power grid digital twin model, and find matching data in the model buffer area for updates to ensure that the model and the power grid are synchronized in real time.
Real-time monitoring and prediction of power grid status is realized, operation and maintenance efficiency is improved, operation and maintenance costs are reduced, model accuracy and stability is ensured, potential problems are discovered and dealt with in a timely manner, and the stability of the power grid system is enhanced.
Smart Images

Figure CN120336994A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power grids, and specifically to a method and system for dynamically updating a digital twin model of a power grid. Background Art
[0002] Traditional power grid monitoring and management methods are no longer sufficient to meet the requirements of the efficient, safe, and reliable operation of modern power grids. As an emerging technical means, digital twin technology can realize real-time monitoring, prediction, and optimization of the power grid state by constructing a virtual copy of the physical system, thereby improving the operation efficiency and safety of the power grid. Traditional digital twin model updates mainly rely on historical data and static models as well as offline data, which are difficult to meet the needs of real-time power grid monitoring; therefore, they do not meet the existing requirements, and for this reason, we propose a method and system for dynamically updating a digital twin model of a power grid. Summary of the Invention
[0003] The purpose of the present invention is to provide a method and system for dynamically updating a digital twin model of a power grid. By using a sensor network to obtain power grid operation data in real time, it is ensured that the digital twin model can dynamically reflect the actual operation state of the power grid. At the same time, by combining machine learning algorithms to analyze the collected power grid operation data, it is possible to accurately identify the change trend and potential problems of the power grid state, and dynamically update the digital twin model of the power grid when changes occur to reflect the actual operation state or predicted state of the power grid. At the same time, the updated digital twin model is verified, and the verification results are feedback to ensure the long-term accuracy and stability of the digital twin model of the power grid, thus solving the problems raised in the above background art.
[0004] To achieve the above purpose, the present invention provides the following technical solution: A method for dynamically updating a digital twin model of a power grid, where the dynamic update method is a dynamic update method for adjusting the digital twin model of the power grid by combining machine learning algorithms to identify the change trend and potential problems of the power grid state;
[0005] The dynamic update method includes:
[0006] Clean, integrate, and analyze the power grid operation data collected by sensors in real time to identify the change trend and potential problems of the power grid state;
[0007] If the data analysis result shows that the power grid state has changed significantly or it is predicted that a change will occur soon, trigger a model update request;
[0008] Search in the buffer area of the digital twin model of the power grid to find if there is data corresponding to the current update request, and based on the data called, dynamically update the digital twin model of the power grid;
[0009] Verify the updated digital twin model and feedback the verification results.
[0010] Furthermore, for the grid operation data collected by sensors in real time, the following steps are included:
[0011] Deploy various sensors at each node of the grid, including smart meters, current transformers, voltage transformers, and power sensors. Monitor current, voltage, and power in real time through the deployed sensors, and collect grid operation data in real time;
[0012] Among them, according to the operation characteristics of the grid, set data collection frequencies for various sensors, and the sensors collect grid operation data according to the set collection frequencies;
[0013] Before data transmission, perform preliminary data filtering and denoising processing on the collected grid operation data at the sensor end or edge computing device to remove outliers and noise data from the grid operation data;
[0014] Transmit the preprocessed grid operation data through a 5G or optical fiber communication network and adopt an encrypted transmission protocol.
[0015] Furthermore, clean, integrate, and analyze the grid operation data collected by sensors in real time. Specifically:
[0016] Data cleaning: Clean the grid operation data collected by various sensors, including removing outliers and filling missing values. Among them:
[0017] Removing outliers: Identify and eliminate abnormal data through statistical methods or machine learning algorithms. The statistical method adopts the 3σ principle, and the machine learning algorithm adopts the isolation forest;
[0018] Filling missing values: Fill missing data using interpolation methods or prediction methods based on existing historical data. Interpolation methods include linear interpolation and spline interpolation;
[0019] Data integration: Integrate the grid operation data from different sensors. By aligning the grid operation data from different sensors and different timestamps in time and space, form a unified grid operation data set;
[0020] Data analysis: Use machine learning algorithms to analyze the integrated data, identify the change trend of the grid state, and at the same time, based on historical data and current data, use time series analysis to predict the future operation state of the grid.
[0021] Furthermore, the data analysis includes the following steps:
[0022] Extract features from the existing historical data, including the mean, variance, peak value, and harmonic components of current / and voltage;
[0023] Use the method of correlation analysis or principal component analysis to select the features that have the greatest impact on the power grid state;
[0024] Perform standardization or normalization on the selected features to ensure that the dimensions of different features are consistent;
[0025] After feature extraction is completed, construct a machine learning model based on linear regression, support vector regression, or neural network;
[0026] Divide the existing historical data of the extracted features into a training set, a validation set, and a test set, where 70% is the training set, 15% is the validation set, and 15% is the test set;
[0027] Use the training set to train the machine learning model and adjust the hyperparameters to optimize the model performance;
[0028] Use the validation set to evaluate the model performance, adjust the model structure or hyperparameters to avoid overfitting, and at the same time use cross-validation to improve the generalization ability of the model;
[0029] Deploy the trained machine learning model to the production environment, analyze the real-time collected power grid operation data, identify the change trend of the power grid state, and at the same time, based on historical data and current data, use time series analysis to predict the future operation state of the power grid;
[0030] For a dynamically changing power grid environment, use an online learning algorithm to update the model parameters in real time, and continuously monitor the performance of the model. When the model performance deteriorates, retrain the model or adjust the model structure.
[0031] Furthermore, trigger a model update request, including the following steps:
[0032] Based on the data analysis results, set a threshold for state changes in advance and compare the data analysis results with the threshold;
[0033] Evaluate whether the current state of the power grid has changed significantly or whether it is predicted that a change will occur in the future. If the change exceeds the threshold, automatically trigger a model update request;
[0034] At the same time, assign different priorities to the model update request according to the severity and scope of the change.
[0035] Furthermore, perform dynamic updates on the power grid digital twin model, including the following steps:
[0036] Set a buffer area in the power grid digital twin model, and store historical data and model parameters through the set buffer area;
[0037] According to the triggered current update request, use a similarity measurement method to find in the buffer area whether there is historical data or model parameters that match the current power grid state;
[0038] If matching data is found, the data is called for updating the power grid digital twin model. If no matching data is found, the required data is obtained from an external database or real-time data stream;
[0039] Based on the called data, the parameters of the power grid digital twin model are adjusted to ensure that the power grid digital twin model reflects the actual operating state or predicted state of the power grid;
[0040] Meanwhile, during the model update process, the digital twin model and the actual power grid need to be kept in real-time synchronization.
[0041] Furthermore, a buffer area is set in the power grid digital twin model, including:
[0042] Distributed cache nodes are deployed in the server cluster of the power grid digital twin model, and network connections are established between each distributed buffer node:
[0043] Buffer node parameters are set for the distributed cache nodes; among them, the buffer node parameters include memory size, number of connections, and timeout time;
[0044] The real-time data and historical data of the power grid digital twin model are monitored in real-time, and the data information that needs to be cached is retrieved from the real-time data and historical data;
[0045] According to the access mode of the data, the data information that needs to be cached is partitioned to obtain multiple partitioned data after partitioning;
[0046] The partitioned data is correspondingly mapped to a distributed cache node;
[0047] The running load status of the distributed cache nodes and the data generation status of the partitioned data accessed by each distributed cache node are monitored in real-time;
[0048] According to the running load status of the distributed cache nodes and the data generation status of the partitioned data accessed by each distributed cache node, it is judged whether the running load status of the distributed cache nodes is adapted to the data generation status of the partitioned data accessed by the distributed cache nodes;
[0049] When the running load status of the distributed cache nodes is not adapted to the data generation status of the partitioned data accessed by the distributed cache nodes, the distributed cache node corresponding to the mapped partitioned data is dynamically allocated.
[0050] Further, when the operating load state of the distributed cache node does not match the data generation state of the partition data accessed by the distributed cache node, dynamic allocation is performed on the distributed cache node corresponding to the mapped partition data, including:
[0051] Real-time monitor the data volume and data access frequency of the data generated per unit time corresponding to each partition data;
[0052] Obtain the data generation state coefficient corresponding to each partition data according to the data volume and data access frequency of the data generated per unit time corresponding to each partition data;
[0053] Among them, the data generation state coefficient is obtained through the following formula:
[0054]
[0055] Among them, S represents the data generation state coefficient; V represents the data volume of the data generated per unit time corresponding to the partition data; F represents the data access frequency corresponding to the partition data per unit time; w 01 and w 02 respectively represent the weight coefficients corresponding to the data volume and data access frequency; V max and F max represent the maximum allowable data volume and maximum allowable access frequency predefined by the system; ΔV and ΔF represent the maximum floating amount of the data volume of the data generated per unit time and the maximum floating amount of the data access frequency corresponding to the partition data;
[0056] Real-time monitor the operating load parameters of the distributed cache node corresponding to each partition data. Among them, the operating load parameters include the influence ratio of CPU usage rate on memory usage rate and the influence ratio of memory usage rate on CPU usage rate during the operation of the distributed cache node; among them, the influence ratio of CPU usage rate on memory usage rate refers to the increase amplitude ratio of memory usage rate when the CPU usage rate increases by one unit during the operation of the distributed cache node; the influence ratio of memory usage rate on CPU usage rate refers to the increase amplitude ratio of CPU usage rate when the memory usage rate increases by one unit during the operation of the distributed cache node;
[0057] Obtain the operating load state coefficient corresponding to the distributed cache node by using the operating load parameters of the distributed cache node;
[0058] Among them, the operating load state coefficient corresponding to the distributed cache node is obtained through the following formula:
[0059] K = C·(1 + a) + M·(1 + b)
[0060] Among them, K represents the operating load status coefficient corresponding to the distributed cache node; C represents the current CPU usage rate of the distributed cache node; M represents the current CPU usage rate of the distributed cache node; a represents the influence ratio of CPU usage rate on memory usage rate; b represents the influence ratio of memory usage rate on CPU usage rate;
[0061] Perform normalization processing on the operating load status coefficient corresponding to the distributed cache node and the data generation status coefficient corresponding to each partition data to obtain the normalized operating load status coefficient and data generation status coefficient;
[0062] When the data generation status coefficient after normalization processing is greater than the operating load status coefficient, it is determined that the operating load status of the distributed cache node does not match the data generation status of the partition data accessed by the distributed cache node;
[0063] When the operating load status of the distributed cache node does not match the data generation status of the partition data accessed by the distributed cache node, the mismatched partition data is dynamically accessed to the distributed cache node whose operating load status coefficient is greater than its corresponding data generation status coefficient.
[0064] Furthermore, verify the updated digital twin model, including the following steps:
[0065] By comparing the output of the power grid digital twin model with the actual power grid operation data, calculate the error indicators, including the mean square error and the mean absolute error;
[0066] If there is a deviation between the output of the power grid digital twin model and the actual power grid operation data, conduct error analysis, find out the reasons for the deviation and make corrections;
[0067] Feed back the verification results to form a closed-loop control. If the verification passes, the model update is completed. If the verification fails, the model update process is triggered again.
[0068] The dynamic update system of the power grid digital twin model is used to implement the dynamic update method of the power grid digital twin model, including:
[0069] The data acquisition module is used for:
[0070] Deploy various sensors at each node of the power grid, and set the data acquisition frequency for various sensors according to the operating characteristics of the power grid;
[0071] The sensors collect the power grid operation data in real time according to the set data acquisition frequency, including current, voltage and power;
[0072] The data analysis module is used for:
[0073] Clean and integrate the collected power grid operation data;
[0074] Construct a machine learning model based on linear regression, support vector regression or neural network to identify the changing trend of the power grid state;
[0075] At the same time, based on historical data and current data, use time series analysis to predict the future operation state of the power grid;
[0076] A request update module, which is used for:
[0077] Set the threshold of state change in advance, compare the data analysis result of the data analysis module with the set threshold, judge whether the power grid state has changed significantly or it is predicted that a change is about to occur. If the change exceeds the threshold, automatically trigger a model update request;
[0078] A model update module, which is used for:
[0079] Search in the buffer area of the power grid digital twin model to find whether there is data corresponding to the current update request. If matching data is found, call the data for updating the power grid digital twin model;
[0080] A model verification module, which is used for:
[0081] Verify the updated power grid digital twin model and feedback the verification result.
[0082] Compared with the prior art, the beneficial effects of the present invention are:
[0083] By deploying various sensors and setting the data collection frequency, the present invention can collect the power grid operation data in real time, thereby improving the comprehensiveness and timeliness of the data. By cleaning and integrating the data, the quality of the power grid operation data can be improved. Then, using machine learning algorithms to analyze the power grid operation data, the changing trend and potential problems of the power grid state can be identified. Thus, according to the data analysis result, a model update request can be triggered, and the power grid digital twin model can be dynamically updated according to the model update request to reflect the actual operation state or predicted state of the power grid. At the same time, the updated digital twin model is verified and the verification result is feedback to ensure the long-term accuracy and stability of the power grid digital twin model. Description of the Drawings
[0084] Figure 1 It is a schematic diagram of the dynamic update method of the power grid digital twin model of the present invention;
[0085] Figure 2 It is a schematic diagram of the dynamic update system of the power grid digital twin model of the present invention. Detailed Embodiments
[0086] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0087] To solve the technical problem that the existing digital twin model updates mainly rely on historical data and static models and rely on offline data, making it difficult to meet the real-time monitoring requirements of the power grid, please refer to Figure 1 - Figure 2 , the following technical solutions are provided in this embodiment:
[0088] A dynamic update method for a power grid digital twin model, where the dynamic update method is a dynamic update method that combines machine learning algorithms to identify the change trend and potential problems of the power grid state and adjusts the power grid digital twin model;
[0089] The dynamic update method includes:
[0090] Clean, integrate, and analyze the power grid operation data collected in real time by sensors to identify the change trend and potential problems of the power grid state;
[0091] If the data analysis result shows that the power grid state has changed significantly or it is predicted that a change will occur soon, trigger a model update request;
[0092] Search in the buffer area of the power grid digital twin model to find whether there is data corresponding to the current update request, and based on the called data, dynamically update the power grid digital twin model;
[0093] Verify the updated digital twin model and feedback the verification result.
[0094] The technical effects of the above content are as follows: By deploying various sensors to collect power grid operation data in real time, and performing cleaning, integration, and analysis, the change trend and potential problems of the power grid state can be accurately identified. When the data analysis result shows that the power grid state has changed significantly or it is predicted that a change will occur soon, a model update request can be quickly triggered, so as to realize the real-time monitoring and prediction of the power grid state. Search for data corresponding to the current update request in the buffer area of the power grid digital twin model, and dynamically adjust the model based on these data, which can reflect the actual operation state or predicted state of the power grid. This dynamic update mechanism can reduce manual intervention, improve operation and maintenance efficiency, and reduce operation and maintenance costs. Verify the updated digital twin model and feedback the verification result, which can ensure the accuracy and reliability of the model, help to timely discover and handle potential problems in the power grid, avoid the occurrence of faults, and thus enhance the stability of the power grid system.
[0095] For the grid operation data collected by sensors in real time, the following steps are included:
[0096] Deploy various sensors at each node of the grid, including smart meters, current transformers, voltage transformers, and power sensors. Monitor current, voltage, and power in real time through the deployed sensors, and collect grid operation data in real time;
[0097] Among them, according to the operation characteristics of the grid, set the data collection frequency (such as millisecond level) for various sensors, and the sensors collect grid operation data according to the set collection frequency;
[0098] Before data transmission, perform preliminary data filtering and denoising on the collected grid operation data at the sensor end or edge computing device to remove outliers and noise data from the grid operation data;
[0099] Transmit the preprocessed grid operation data through a 5G or fiber optic communication network and adopt an encrypted transmission protocol (such as TLS / SSL).
[0100] The technical effects of the above content are as follows: The combined use of smart meters, current transformers, voltage transformers, and power sensors can comprehensively monitor key parameters such as current, voltage, and power of the grid, providing a rich and accurate data basis for the grid digital twin model. According to the operation characteristics of the grid, an appropriate data collection frequency (such as millisecond level) can be set for various sensors to balance data real-time and system load. Before data transmission, perform preliminary data processing at the sensor end or edge computing device to reduce the data transmission volume and the computing pressure on the central system. Use a 5G or fiber optic communication network for data transmission to ensure high-speed and stable data transmission, meeting the real-time data requirements of the grid digital twin model. Adopt encrypted transmission protocols such as TLS / SSL to ensure the security of data during transmission, prevent data from being illegally intercepted or tampered with, and protect the privacy and security of the grid.
[0101] Clean, integrate, and analyze the grid operation data collected by sensors in real time, specifically:
[0102] Data cleaning: Clean the grid operation data collected by various sensors, including removing outliers and filling in missing values, where:
[0103] Removing outliers: Identify and eliminate abnormal data through statistical methods or machine learning algorithms. The statistical method uses the 3σ principle, and the machine learning algorithm uses Isolation Forest;
[0104] The 3σ principle calculates the mean (μ) and standard deviation (σ) according to the normal distribution characteristics of the data, and regards the data outside the range of μ±3σ as outliers and eliminates them;
[0105] Construct a decision tree using the Isolation Forest algorithm to identify outliers by calculating the "isolation degree" of data points
[0106] Fill in missing values: Use interpolation methods or prediction methods based on existing historical data to fill in missing data. Interpolation methods include linear interpolation and spline interpolation;
[0107] Data integration: Integrate the power grid operation data from different sensors by aligning the time and space of the power grid operation data from different sensors and different timestamps to form a unified power grid operation dataset;
[0108] Data analysis: Use machine learning algorithms to analyze the integrated data to identify the changing trends of the power grid state. At the same time, based on historical data and current data, use time series analysis to predict the future operation state of the power grid;
[0109] Among them, data analysis includes:
[0110] Extract features from existing historical data, including the mean, variance, peak value, and harmonic components of current and voltage;
[0111] Use correlation analysis or principal component analysis methods to select the features that have the greatest impact on the power grid state;
[0112] Perform standardization or normalization processing on the selected features to ensure that the dimensions of different features are consistent;
[0113] After feature extraction is completed, construct a machine learning model based on linear regression, support vector regression, or neural network;
[0114] Divide the existing historical data with the extracted features into a training set, a validation set, and a test set. Among them, 70% is the training set, 15% is the validation set, and 15% is the test set;
[0115] Use the training set to train the machine learning model and adjust the hyperparameters to optimize the model performance;
[0116] Use the validation set to evaluate the model performance, adjust the model structure or hyperparameters to avoid overfitting, and at the same time use cross-validation to improve the generalization ability of the model;
[0117] Deploy the trained machine learning model to the production environment, analyze the real-time collected power grid operation data, identify the changing trends of the power grid state, and at the same time, based on historical data and current data, use time series analysis to predict the future operation state of the power grid;
[0118] For a dynamically changing power grid environment, online learning algorithms (such as incremental learning and online gradient descent) are used to update model parameters in real time, while continuously monitoring the performance of the model. When the model performance degrades, the model is retrained or its structure is adjusted.
[0119] The technical effects of the above content are as follows: By data cleaning, the data quality can be further improved. Through data integration, data from different sensors are aligned according to timestamps to ensure the temporal consistency of the data, thus forming a unified and complete power grid operation dataset, providing a solid foundation for subsequent data analysis. Then, a machine learning model based on linear regression, support vector regression, or neural network is constructed and trained, and the trained machine learning model is deployed to the production environment to analyze the real-time collected power grid operation data, identify the changing trends of the power grid state, and at the same time, based on historical data and current data, use time series analysis to predict the future operation state of the power grid, thereby providing strong support for power grid state monitoring and prediction. The deployed model will use online learning algorithms to update model parameters in real time and continuously monitor the model performance. When the performance degrades, the model is retrained or its structure is adjusted to ensure that the model adapts to the dynamic changes of the power grid environment and maintains the prediction accuracy and stability of the model.
[0120] Triggering a model update request includes the following steps:
[0121] Based on the data analysis results, a threshold for state change is set in advance, and the data analysis results are compared with the threshold;
[0122] Evaluate whether the current state of the power grid has changed significantly or whether a future change is predicted. If the change exceeds the threshold, a model update request is automatically triggered;
[0123] At the same time, different priorities are assigned to the model update request according to the severity of the change (such as voltage dip, frequency deviation) and the scope of influence (such as local or global).
[0124] The technical effects of the above content are as follows: Based on the data analysis results, it is first necessary to preset the threshold for state change. The threshold is comprehensively determined according to factors such as the normal operating state of the power grid, historical fault data, and equipment performance requirements, and is used to judge whether the power grid state has changed significantly or predict that a change will occur in the future. Then, the data analysis results are compared with the threshold. The data analysis results may include statistical characteristics, change trends, and prediction results of key indicators such as current, voltage, and power. By comparing these data analysis results with the set threshold, it can be evaluated whether the current state of the power grid has changed significantly or whether a change will occur in the future. When the data analysis results show that the power grid state change exceeds the set threshold, a model update request is automatically triggered, and according to the preset rules and processes, the power grid digital twin model is dynamically adjusted to reflect the latest state of the power grid. At the same time, according to the severity and scope of the change, different priorities are assigned to the model update request to ensure that important and urgent changes can be processed in a timely manner.
[0125] The dynamic update of the power grid digital twin model includes the following steps:
[0126] Set a buffer area in the power grid digital twin model. Through the set buffer area, historical data and model parameters are stored. The buffer area is used to store historical data and model parameters for quick access and call when needed, which can improve the speed and efficiency of model update. The buffer area can store the historical data of the power grid digital twin model at different time points, including time series data of key indicators such as current, voltage, and power, as well as model parameters (such as linear regression coefficients, neural network weights, etc.);
[0127] According to the triggered current update request, use similarity measurement methods (Euclidean distance and cosine similarity) to find whether there is historical data or model parameters in the buffer area that match the current power grid state;
[0128] If matching data is found, call the data for power grid digital twin model update. If no matching data is found, obtain the required data from an external database or real-time data stream;
[0129] Based on the called data, adjust the parameters of the power grid digital twin model to ensure that the power grid digital twin model reflects the actual operating state or prediction state of the power grid;
[0130] At the same time, during the model update process, the digital twin model and the actual power grid need to be kept in real-time synchronization.
[0131] The technical effects of the above content are as follows: By setting a buffer area in the power grid digital twin model and using a similarity measurement method to find matching historical data or model parameters in the buffer area, fast response and efficient processing of model updates can be achieved. At the same time, during the model update process, real-time synchronization with the actual power grid is maintained, ensuring the accuracy and reliability of the power grid digital twin model. The above design is of great significance for improving the operation and maintenance efficiency of the power grid, reducing the failure risk, and optimizing the power grid operation strategy.
[0132] Specifically, setting a buffer area in the power grid digital twin model includes:
[0133] Deploying distributed cache nodes in the server cluster of the power grid digital twin model and establishing network connections between each distributed buffer node:
[0134] Performing buffer node parameter settings for the distributed cache nodes; among them, the buffer node parameters include memory size, connection number, and timeout time;
[0135] Real-time monitoring of the real-time data and historical data of the power grid digital twin model, and retrieving the data information to be cached from the real-time data and historical data;
[0136] Dividing the data information to be cached according to the data access mode to obtain multiple partitioned data after data division;
[0137] Mapping the partitioned data to a distributed cache node correspondingly;
[0138] Real-time monitoring of the running load status of the distributed cache nodes and the data generation status of the partitioned data accessed by each distributed cache node;
[0139] Judging whether the running load status of the distributed cache node is adapted to the data generation status of the partitioned data accessed by the distributed cache node according to the running load status of the distributed cache node and the data generation status of the partitioned data accessed by each distributed cache node;
[0140] When the running load status of the distributed cache node is not adapted to the data generation status of the partitioned data accessed by the distributed cache node, dynamically allocate the distributed cache node to which the partitioned data is correspondingly mapped.
[0141] The technical effects of the above technical solution are as follows: By deploying distributed cache nodes in the server cluster of the power grid digital twin model, the frequency of directly reading data from the main database or storage system can be significantly reduced, thereby improving the response speed of data access. The use of distributed cache nodes also means that data can be closer to users or application servers, further reducing latency. The settings of buffer node parameters (such as memory size, connection count, and timeout) can be tuned according to actual requirements to ensure the efficient use of resources. By real-time monitoring the real-time data and historical data of the power grid digital twin model and intelligently selecting the data information to be cached, unnecessary data redundancy can be avoided, thus saving storage space.
[0142] The strategy of mapping data partitioning and partitioned data to distributed cache nodes enables the system to flexibly handle the growth of data volume. When the data volume increases, the system capacity can be expanded by adding distributed cache nodes. Real-time monitoring of the operating load status of distributed cache nodes and the data generation status of the partitioned data accessed by each node provides a basis for dynamic allocation. This dynamic allocation ability enables the system to automatically adjust resource allocation when the load changes, thus maintaining efficient operation. Through the deployment and connection of distributed cache nodes, redundant storage of data can be achieved, improving data availability and fault tolerance. When a certain distributed cache node fails, the system can quickly transfer the relevant partitioned data to other healthy nodes, thus ensuring the continuity of services. Data partitioning of the data information to be cached according to the data access pattern can make the cache strategy more in line with the actual application requirements. This helps to optimize data access performance, especially when dealing with complex queries or big data analysis.
[0143] In summary, through the introduction of distributed cache nodes and intelligent data cache management strategies, the above technical solution significantly improves the data access efficiency, resource utilization efficiency, flexibility and scalability, stability and reliability of the power grid digital twin model, and supports complex data access patterns. These technical effects jointly provide strong support for the efficient operation and optimization of the power grid digital twin model.
[0144] Specifically, when the operating load status of the distributed cache node does not match the data generation status of the partitioned data accessed by the distributed cache node, dynamic allocation of the distributed cache node corresponding to the partitioned data mapping is performed, including:
[0145] Real-time monitoring of the data volume and data access frequency of the data generated per unit time corresponding to each partitioned data;
[0146] Obtaining the data generation status coefficient corresponding to each partitioned data according to the data volume and data access frequency of the data generated per unit time corresponding to each partitioned data;
[0147] The data generation state coefficient is obtained by the following formula:
[0148]
[0149] Among them, S represents the data generation state coefficient; V represents the amount of data generated per unit time corresponding to the partition data; F represents the data access frequency per unit time corresponding to the partition data; w 01 and w 02 Respectively represent the weight coefficients corresponding to the data volume and data access frequency; V max and F max Indicates the maximum allowable data volume and maximum allowable access frequency predefined by the system; ΔV and ΔF indicate the maximum floating amount of data volume generated per unit time and the maximum floating amount of data access frequency corresponding to the partition data;
[0150] Monitor the operating load parameters of the distributed cache node corresponding to each partition data in real time, wherein the operating load parameters include the impact ratio of CPU usage to memory usage and the impact ratio of memory usage to CPU usage during the operation of the distributed cache node; wherein the impact ratio of CPU usage to memory usage refers to the ratio of the increase in memory usage when the CPU usage increases by one unit during the operation of the distributed cache node; the impact ratio of memory usage to CPU usage refers to the ratio of the increase in CPU usage when the memory usage increases by one unit during the operation of the distributed cache node;
[0151] Obtaining an operation load state coefficient corresponding to the distributed cache node using the operation load parameter of the distributed cache node;
[0152] The running load state coefficient corresponding to the distributed cache node is obtained by the following formula:
[0153] K=C·(1+a)+M·(1+b)
[0154] Among them, K represents the operating load state coefficient corresponding to the distributed cache node; C represents the current CPU usage of the distributed cache node; M represents the current CPU usage of the distributed cache node; a represents the impact ratio of CPU usage to memory usage; b represents the impact ratio of memory usage to CPU usage; in the formula, C·(1+a) represents the actual load of the CPU, including the current usage and its associated impact on the memory; M·(1+b) similarly includes the memory load itself and its associated impact on the CPU. The above formula explicitly models the mutual amplification effect of CPU and memory through parameters a and b, reflecting the nonlinear load growth caused by resource contention.
[0155] Normalize the operating load status coefficient corresponding to the distributed cache node and the data generation status coefficient corresponding to each partition of data to obtain the normalized operating load status coefficient and data generation status coefficient;
[0156] When the normalized data generation status coefficient is greater than the operating load status coefficient, it is determined that the operating load status of the distributed cache node does not match the data generation status of the partition data accessed by the distributed cache node;
[0157] When the operating load status of the distributed cache node does not match the data generation status of the partition data accessed by the distributed cache node, the mismatched partition data is dynamically accessed to the distributed cache node whose operating load status coefficient is greater than its corresponding data generation status coefficient.
[0158] The technical effect of the above technical solution is: In the mathematical model of the data generation status coefficient proposed in the above technical solution and The data volume and access frequency are compressed into the [0, 1] interval to eliminate the dimension difference. The weight value is used to reflect the importance difference between the data volume and access frequency in the business scenario. Finally, the larger the value of the data generation status coefficient S ∈ [0, 1], the higher the pressure generated by the partition data. At the same time, the mathematical model of the operating load status coefficient corresponding to the distributed cache node proposed in the above technical solution establishes the joint effect of data volume and access frequency through the product form of two independent parts, C·(1 + a) and M·(1 + b); The interaction between CPU and memory is captured by introducing parameters a and b to avoid underestimating the coupled load. The calculation complexity is reduced by addition (instead of multiplication), while the key non-linear characteristics are retained, and the non-linear characteristics are amplified by parameters a and b. Further, by horizontally comparing the pressure and capacity, the dynamic migration decision is driven to optimize the system resource utilization rate;
[0159] Meanwhile, by monitoring in real time the data volume and data access frequency of each partition data per unit time and calculating the data generation state coefficient, the data generation state of each partition data can be accurately evaluated. Meanwhile, by monitoring the operation load parameters of the distributed cache nodes and calculating the operation load state coefficient, the current operation state of the nodes can be accurately reflected. After standardizing and comparing these two coefficients, the adaptability between the distributed cache nodes and the partition data can be judged more scientifically, so as to allocate resources more reasonably. When it is found that the operation load state of the distributed cache node does not match the data generation state of the partition data, dynamic allocation is carried out in a timely manner, which can avoid the situation of node overload or resource waste. This dynamic allocation mechanism can ensure that each distributed cache node runs at its optimal load state, thus improving the performance and response speed of the entire system. This technical solution provides a flexible dynamic allocation mechanism, which can dynamically adjust the distributed cache nodes and partition data according to the actual situation. This flexibility enables the system to easily cope with the growth of data volume or the change of access patterns, thus maintaining efficient operation. Through real-time monitoring and dynamic allocation, potential overload or performance bottleneck problems can be discovered and solved in a timely manner, thus avoiding risks such as system crashes or data loss. This mechanism helps to improve the stability and reliability of the system, ensuring that the power grid digital twin model can operate continuously and stably. This technical solution not only considers the data volume and data access frequency, but also considers the mutual influence between the CPU and memory, so as to be able to evaluate the operation state of the system more comprehensively. This evaluation method enables the system to better support complex data access patterns, especially performing well in scenarios such as handling high concurrency and large data volumes.
[0160] In summary, this technical solution improves the rationality of resource allocation, optimizes the system performance, enhances the flexibility and scalability of the system, improves the stability and reliability of the system, and supports complex data access patterns by real-time monitoring and dynamic allocation of distributed cache nodes and partition data. These technical effects jointly provide a strong guarantee for the efficient operation and optimization of the power grid digital twin model.
[0161] Verifying the updated digital twin model includes the following steps:
[0162] Verifying the updated power grid digital twin model by comparing the output of the power grid digital twin model with the actual power grid operation data and calculating the error indicators, including the mean square error and the mean absolute error;
[0163] If there is a deviation between the output of the power grid digital twin model and the actual power grid operation data, conduct error analysis, find out the reasons for the deviation and make corrections;
[0164] Feed back the verification results to form a closed-loop control. If the verification passes, the model update is completed. If the verification fails, the model update process is triggered again.
[0165] The technical effects of the above content are as follows: Compare the output of the power grid digital twin model with the actual power grid operation data. Through the comparison, the degree of coincidence between the output result and the actual power grid state can be intuitively understood. Then calculate the error metrics (such as mean squared error (MSE) and mean absolute error (MAE)). The error metrics can quantify the deviation degree between the output of the power grid digital twin model and the actual data, providing an important basis for subsequent error analysis. If there is a deviation between the output of the power grid digital twin model and the actual power grid operation data, that is, the error metrics exceed the preset range, then error analysis is required. The purpose of error analysis is to find out the reasons for the deviation, which may include data quality problems, improper model parameter settings, inappropriate algorithm selection, etc. Through in-depth analysis, the key factors leading to the deviation can be determined and corrected accordingly. The correction measures may involve adjusting model parameters, optimizing algorithm selection, improving the data preprocessing process, etc. After correction, the model needs to be verified again to ensure that the deviation is effectively reduced. After the verification is completed, the verification results are fed back to form a closed-loop control, thereby ensuring the long-term accuracy and stability of the power grid digital twin model.
[0166] A dynamic update system for the power grid digital twin model, used to implement the dynamic update method of the power grid digital twin model, includes:
[0167] A data acquisition module, used for:
[0168] Deploy various sensors at each node of the power grid, and set the data acquisition frequency for each type of sensor according to the operating characteristics of the power grid;
[0169] The sensors collect the power grid operation data in real time according to the set data acquisition frequency, including current, voltage, and power;
[0170] A data analysis module, used for:
[0171] Clean and integrate the collected power grid operation data;
[0172] Build a machine learning model based on linear regression, support vector regression, or neural network to identify the change trend of the power grid state;
[0173] At the same time, based on historical data and current data, use time series analysis to predict the future operating state of the power grid;
[0174] A request update module, used for:
[0175] Set the threshold for state change in advance, compare the data analysis result of the data analysis module with the set threshold, and determine whether the power grid state has changed significantly or it is predicted that a change will occur soon. If the change exceeds the threshold, automatically trigger a model update request;
[0176] A model update module, used for:
[0177] Search in the buffer area of the power grid digital twin model to find whether there is data corresponding to the current update request. If matching data is found, call the data for updating the power grid digital twin model;
[0178] A model verification module, used for:
[0179] Verify the updated power grid digital twin model and feedback the verification result.
[0180] The technical effects of the above content are as follows: Through real-time data collection and model update, it is ensured that the power grid digital twin model can timely reflect the latest state of the power grid. Through machine learning models and time series analysis, the model's ability to identify the changing trend of the power grid state and prediction accuracy are improved. Through automatically triggering model update requests and feedback of verification results, the automation and intelligence of model update are realized. The data collection module, data analysis module, request update module, model update module, and model verification module each perform their own functions, jointly realizing the real-time monitoring, prediction, and adjustment of the power grid operation state, ensuring that the digital twin model always remains consistent with the actual operation state of the power grid, thereby improving the reliability, safety, and operation efficiency of the power grid.
[0181] Working principle: Deploy various sensors on the key nodes and components of the power grid to ensure that the collected data is accurate and effective. Real-time collect the operation data of the power grid through the deployed sensors, and perform cleaning, integration, and analysis. It can accurately identify the changing trend of the power grid state and potential problems, and set the threshold for state change according to the operation characteristics of the power grid. When the data analysis result shows that the power grid state has changed significantly or it is predicted that a change will occur soon, and the degree of change exceeds the set threshold, trigger a model update request. Search in the buffer area of the power grid digital twin model for data corresponding to the current update request and call it. Dynamically adjust the model based on the called data, which can reflect the actual operation state or predicted state of the power grid. This dynamic update mechanism can reduce manual intervention and improve the operation and maintenance efficiency. Verifying the updated digital twin model and feedbacking the verification result can ensure the accuracy and reliability of the model, help to timely discover and handle potential problems in the power grid, avoid the occurrence of faults, and thus enhance the stability of the power grid system.
[0182] It should be noted that, in this document, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprising", "including" or any other variant thereof are intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device.
[0183] Although the embodiments of the present invention have been shown and described, it will be understood by those of ordinary skill in the art that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles and spirit of the present invention.
Claims
1. A method for dynamically updating a digital twin model of a power grid, characterized in that The dynamic update method is a dynamic update method for adjusting the digital twin model of the power grid by combining a machine learning algorithm to identify the changing trends and potential problems of the power grid state. The dynamic update method includes: cleaning, integrating and analyzing the power grid operation data collected by sensors in real time, identifying the changing trends and potential problems of the power grid state, and if the data analysis results show that the power grid state has changed significantly or is predicted to change, triggering a model update request, searching the cache area of the power grid digital twin model for data corresponding to the current update request, and dynamically updating the power grid digital twin model based on the called data, and providing verification feedback for the updated digital twin model.
2. The dynamic update method of the power grid digital twin model according to claim 1, wherein: The power grid operation data collected by the sensor in real time includes the following steps: Deploy various sensors at various nodes of the power grid, including smart meters, current transformers, voltage transformers, and power sensors. The deployed sensors monitor current, voltage, and power in real time, and collect power grid operation data in real time. Among them, according to the operation characteristics of the power grid, the data collection frequency is set for various sensors, and the sensors collect power grid operation data according to the set collection frequency; Before data transmission, the collected power grid operation data is initially filtered and denoised on the sensor side or edge computing device to remove outliers and noise data in the power grid operation data; The pre-processed grid operation data is transmitted through 5G or fiber-optic communication networks using encrypted transmission protocols.
3. The dynamic update method of the power grid digital twin model according to claim 1, characterized in that: Clean, integrate and analyze the power grid operation data collected by sensors in real time, specifically: Data cleaning: Clean the power grid operation data collected by various sensors, including removing outliers and filling missing values, including: Remove outliers: Identify and remove abnormal data through statistical methods or machine learning algorithms. The statistical method uses the 3σ principle, and the machine learning algorithm uses the isolation forest. Filling missing values: Use interpolation methods or prediction methods based on existing historical data to fill missing data. Interpolation methods include linear interpolation and spline interpolation. Data integration: Integrate the grid operation data from different sensors, and form a unified grid operation data set by aligning the grid operation data from different sensors and different timestamps in time and space; Data analysis: Use machine learning algorithms to analyze the integrated data to identify the changing trends of the power grid status. At the same time, use time series analysis based on historical data and current data to predict the future operating status of the power grid.
4. The dynamic update method of the power grid digital twin model according to claim 3, characterized in that: The data analysis comprises the following steps: Extract features from existing historical data, including the mean, variance, peak value and harmonic components of current and voltage; Use correlation analysis or principal component analysis to select the features that have the greatest impact on the grid status; Standardize or normalize the selected features to ensure that the dimensions of different features are consistent; After feature extraction is completed, a machine learning model based on linear regression, support vector regression or neural network is constructed; The existing historical data with extracted features are divided into training set, validation set and test set, of which 70% is the training set, 15% is the validation set and 15% is the test set; Train a machine learning model using a training set and adjust hyperparameters to optimize model performance; Evaluate the model performance using a validation set, adjust the model structure or hyperparameters to avoid overfitting, and at the same time use cross-validation to improve the generalization ability of the model; Deploy the trained machine learning model to the production environment, analyze the real-time collected power grid operation data, identify the changing trends of the power grid state, and at the same time, based on historical data and current data, use time series analysis to predict the future operation state of the power grid; For a dynamically changing power grid environment, adopt an online learning algorithm to update model parameters in real time, and continuously monitor the performance of the model. When the model performance degrades, retrain the model or adjust the model structure.
5. The dynamic update method of the power grid digital twin model according to claim 1, characterized in that: Trigger a model update request, including the following steps: Based on the data analysis results, set a threshold for state changes in advance and compare the data analysis results with the threshold; Evaluate whether the current state of the power grid has changed significantly or whether a future change is predicted. If the change exceeds the threshold, automatically trigger a model update request; At the same time, assign different priorities to the model update request according to the severity and scope of the change.
6. The dynamic update method of the power grid digital twin model according to claim 1, wherein: Perform dynamic updates on the power grid digital twin model, including the following steps: Set up a buffer area in the power grid digital twin model and store historical data and model parameters through the set buffer area; According to the triggered current update request, use a similarity measurement method to find in the buffer area whether there is historical data or model parameters that match the current power grid state; If matching data is found, call the data for power grid digital twin model update. If no matching data is found, obtain the required data from an external database or real-time data stream; Based on the called data, adjust the parameters of the power grid digital twin model to ensure that the power grid digital twin model reflects the actual operation state or predicted state of the power grid; At the same time, during the model update process, the digital twin model and the actual power grid need to be kept in real-time synchronization.
7. The dynamic update method of the power grid digital twin model according to claim 6, characterized in that: Set up a buffer area in the power grid digital twin model, including: Deploy distributed cache nodes in the server cluster of the power grid digital twin model and establish network connections between each distributed buffer node: Set buffer node parameters for the distributed cache nodes; among them, the buffer node parameters include memory size, number of connections, and timeout time; Real-time monitor the real-time data and historical data of the power grid digital twin model, and retrieve the data information that needs to be cached from the real-time data and historical data; Perform data partitioning on the data information that needs to be cached according to the data access mode to obtain multiple partitioned data after data partitioning; Map the partitioned data to a distributed cache node correspondingly; Real-time monitor the running load status of the distributed cache nodes and the data generation status of the partitioned data accessed by each distributed cache node; Judge whether the running load status of the distributed cache node is adapted to the data generation status of the partitioned data accessed by the distributed cache node according to the running load status of the distributed cache node and the data generation status of the partitioned data accessed by each distributed cache node; When the operating load state of the distributed cache node does not match the data generation state of the partition data accessed by the distributed cache node, dynamic allocation is performed on the distributed cache node corresponding to the mapped partition data.
8. The dynamic update method of the power grid digital twin model according to claim 7, characterized in that: When the operating load state of the distributed cache node does not match the data generation state of the partition data accessed by the distributed cache node, dynamic allocation is performed on the distributed cache node corresponding to the mapped partition data, including: Real-time monitoring of the data volume and data access frequency of the data generated per unit time corresponding to each partition data; Obtaining the data generation state coefficient corresponding to each partition data according to the data volume and data access frequency of the data generated per unit time corresponding to each partition data; Real-time monitoring of the operating load parameters of the distributed cache node corresponding to each partition data, where the operating load parameters include the influence ratio of CPU usage to memory usage and the influence ratio of memory usage to CPU usage during the operation of the distributed cache node; Obtaining the operating load state coefficient corresponding to the distributed cache node by using the operating load parameters of the distributed cache node; Performing standardization processing on the operating load state coefficient corresponding to the distributed cache node and the data generation state coefficient corresponding to each partition data to obtain the standardized operating load state coefficient and data generation state coefficient; When the standardized data generation state coefficient is greater than the operating load state coefficient, it is determined that the operating load state of the distributed cache node does not match the data generation state of the partition data accessed by the distributed cache node; When the operating load state of the distributed cache node does not match the data generation state of the partition data accessed by the distributed cache node, the mismatched partition data is dynamically connected to the distributed cache node whose operating load state coefficient is greater than its corresponding data generation state coefficient.
9. The dynamic update method of the power grid digital twin model according to claim 1, characterized in that: Verifying the updated digital twin model includes the following steps: By comparing the output of the power grid digital twin model with the actual power grid operation data, calculating error metrics, including mean square error and mean absolute error; If there is a deviation between the output of the power grid digital twin model and the actual power grid operation data, perform error analysis, find out the cause of the deviation and make corrections; Feed back the verification result to form a closed-loop control. If the verification passes, the model update is completed. If the verification fails, the model update process is triggered again.
10. A dynamic update system for a power grid digital twin model, which is used to implement the dynamic update method of the power grid digital twin model according to any one of claims 1-9, characterized in that: Including: Data acquisition module, used for: Deploy various sensors at each node of the power grid, and set the data acquisition frequency for various sensors according to the operating characteristics of the power grid; The sensors collect the power grid operation data in real time according to the set data acquisition frequency, including current, voltage and power; Data analysis module, used for: Cleaning and integrating the collected power grid operation data; Constructing a machine learning model based on linear regression, support vector regression or neural network to identify the change trend of the power grid state; At the same time, based on historical data and current data, using time series analysis to predict the future operation state of the power grid; Request update module, used for: Set the threshold for state change in advance, compare the data analysis result of the data analysis module with the set threshold to determine whether the power grid state has changed significantly or it is predicted that a change is about to occur. If the change exceeds the threshold, automatically trigger a model update request; The model update module is used for: Search in the buffer area of the power grid digital twin model to find whether there is data corresponding to the current update request. If matching data is found, call the data for updating the power grid digital twin model; The model verification module is used for: Verify the updated power grid digital twin model and provide feedback on the verification result.