Method, device, terminal equipment and storage medium for generating digital twin of power grid

By constructing a correlation topology graph and using a data filling method, the performance problem caused by frequent data exchange in the power grid digital twin system was solved, and the system performance was improved.

CN119475975BActive Publication Date: 2025-09-19GUANGDONG POWER GRID CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411502668.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-25
Publication Date
2025-09-19
Estimated Expiration
2044-10-25

AI Technical Summary

Technical Problem

In existing power grid digital twin systems, mapping all real-time data to the digital twin requires frequent exchange of large amounts of data, which impairs system performance.

Method used

By constructing a correlation topology graph, the power grid data on the shortest path is determined as the retained data, its twin mapping step is skipped, and the filled data is obtained using the data filling method. Only the candidate data is twin mapped to construct the digital twin of the power grid.

Benefits of technology

The number of data exchanges for digital twin mapping is reduced, and system performance is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119475975B_ABST
    Figure CN119475975B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, apparatus, terminal device and storage medium for generating a digital twin of a power grid. The method comprises: constructing a correlation topology map through power grid data with an associated relationship, finding the shortest path in the correlation topology map, using the power grid data on the shortest path as retained data, and other data as candidate data. Since the process of digital twin is relatively complicated, the present invention skips the twin mapping step for the retained data, uses the data filling method to obtain the corresponding filling data, generates twin data for the candidate data according to the twin mapping step, and then constructs the digital twin of the power grid based on the filling data and the twin data. The present invention eliminates the need for a digital twin of retained data, reduces the number of data exchanges in the twin mapping, and improves the performance of the twin system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of smart grid technology, and in particular to a method, apparatus, terminal device, and storage medium for generating a digital twin of a power grid. Background Art

[0002] With the transformation and upgrading of energy systems, the construction of smart grids is accelerating globally. Grid digitization and informatization have become crucial tools for power companies to achieve intelligent management and refined operations and maintenance. Furthermore, digital twins, as a cutting-edge digital technology, have garnered significant attention within the power industry. Digital twins leverage data, models, algorithms, and computing platforms to achieve a virtual miniature of physical assets, mapping the virtual and real world. Currently, power grids encompass multiple scenarios, including substations and transmission and distribution lines, with complex data types. The digital twin mapping mechanism, which maps all real-time data collected by sensors in the physical world to the digital twin, requires frequent and extensive data exchange between the virtual model and the physical entity, placing significant pressure on the system and impacting the performance of the grid digital twin system. Summary of the Invention

[0003] The present invention provides a method, apparatus, terminal device and storage medium for generating a digital twin of a power grid to solve the technical problem in the prior art that mapping all real-time data to a digital twin requires frequent interaction of large amounts of data, which impairs system performance.

[0004] In order to solve the above technical problems, an embodiment of the present invention provides a method for generating a digital twin of a power grid, comprising:

[0005] Obtaining grid data;

[0006] All power grid data that are associated with other power grid data are stored in a first associated data set, and the remaining power grid data are stored in a non-associated data set;

[0007] Constructing a correlation topology graph based on the first correlation data set; wherein the nodes of the correlation topology graph are the power grid data in the first correlation data set, and the edge weights between the nodes are negatively correlated with the correlation between the power grid data corresponding to the nodes;

[0008] Determine the shortest path between two preset nodes in the association topology graph, and use the power grid data corresponding to the nodes on the shortest path as retained data, and use the power grid data other than the retained data in the first association data set as candidate data;

[0009] Performing twin mapping on the power grid data in the non-correlated data set and the candidate data to obtain twin data;

[0010] Performing data filling on the first associated data set containing only candidate data to generate filled data;

[0011] A digital twin of the power grid is constructed based on the twin data and the filling data.

[0012] As a preferred solution, constructing a correlation topology map based on the first correlation data set includes:

[0013] Calculating a first correlation degree between the power grid data having a correlation relationship in the first correlation data set according to a correlation degree calculation formula;

[0014] Calculating edge weights between nodes corresponding to the power grid data according to a first degree of association between the power grid data in the first associated data set;

[0015] The association degree topology graph is generated by taking the power grid data in the first association data set as nodes and the first association degrees between the power grid data as edge weights.

[0016] As a preferred solution, the correlation calculation formula is:

[0017]

[0018] X i ={x i (t), t=1,...,M};

[0019] X j ={x j (t), t=1,...,M};

[0020] Where, X i represents the i-th power grid data in the first associated data set; X j represents the jth power grid data in the first associated data set; x i (t) represents the power grid data X i The data at the tth moment in x j (t) represents the power grid data X j The time data of the tth moment in the grid; M represents the number of time data corresponding to each grid data; R ij Represents power grid data X i and grid data X i The correlation between i,j (m1,m2) represents the power grid data X i The time data and power grid data X at the moment m1 j The correlation between the data at the m2th moment in the equation is: Cov is the covariance; Var is the variance.

[0021] As a preferred solution, the calculation formula of the edge weight is:

[0022]

[0023] Where, ω ij Represents power grid data X i and grid data X i The edge weights between corresponding nodes; k is a preset constant.

[0024] As a preferred solution, after generating the filling data, the method further includes:

[0025] replacing the retained data in the first associated data set with the filling data to obtain a second associated data set;

[0026] Calculating, according to the correlation calculation formula, a second correlation degree between the power grid data having a correlation relationship in the second correlation data set;

[0027] Calculating a first correlation degree average value of all first correlation degrees and a second correlation degree average value of all second correlation degrees;

[0028] Calculating a correlation error based on the first correlation average value and the second correlation average value;

[0029] Determine whether the correlation error is less than a preset error threshold. If so, continue to execute subsequent operations. If not, construct a digital twin of the power grid based on the twin data and the retained data, and stop executing subsequent operations.

[0030] As a preferred solution, performing data filling on the first associated data set containing only candidate data to generate filled data includes:

[0031] Obtaining historical data corresponding to each type of retained data; wherein the historical data is power grid data for a historical period before the current moment;

[0032] Inputting historical data corresponding to each type of retained data into a first prediction model corresponding to the retained data, so that the prediction model predicts the retained data based on the historical data to obtain first prediction data;

[0033] Using the first predicted data corresponding to all retained data as filling data;

[0034] The training process of the first prediction model corresponding to each type of retained data includes:

[0035] For each type of retained data, a plurality of first sample data corresponding to the retained data is obtained; wherein each first sample data includes: first historical data of a historical period and second historical data at a moment after the historical period;

[0036] For each first sample data, input the first historical data into a first model corresponding to the retained data, so that the first model predicts the power grid data at a next moment corresponding to the first historical data based on the first historical data, thereby obtaining a first historical data prediction result; calculate a first loss value based on the first historical data prediction result and the second historical data, and adjust the first model based on the first loss value;

[0037] The adjusted first model is used as the first prediction model.

[0038] As a preferred solution, performing data filling on the first associated data set containing only candidate data to generate filled data includes:

[0039] Inputting the candidate data into a second prediction model so that the second prediction model predicts the retained data according to the candidate data to obtain second prediction data;

[0040] Using the second predicted data as filling data;

[0041] The training process of the second prediction model includes:

[0042] Acquire a plurality of second sample data; wherein each of the second sample data includes: first power grid data corresponding to the candidate data at a certain historical moment and second power grid data corresponding to the retained data;

[0043] For each second sample data, input the first power grid data into a second model, so that the second model predicts the retained data corresponding to the first power grid data based on the first power grid data to obtain a first power grid data prediction result; calculate a second loss value based on the first power grid data prediction result and the second power grid data, and adjust the second model based on the second loss value;

[0044] The adjusted second model is used as the second prediction model.

[0045] Based on the above embodiment, another embodiment of the present invention provides a device for generating a digital twin of a power grid, comprising: a data acquisition module, a retention and candidate data determination module, a twin mapping module, and a digital twin supplement module;

[0046] The data acquisition module is used to acquire power grid data;

[0047] The retained and candidate data determination module is configured to store all power grid data that are associated with other power grid data into a first associated data set, and the remaining power grid data into a non-associated data set; construct a correlation topology graph based on the first associated data set; wherein the nodes of the correlation topology graph are the power grid data in the first associated data set, and the edge weights between the nodes are negatively correlated with the correlation between the power grid data corresponding to the nodes; determine the shortest path between two preset nodes in the correlation topology graph, and use the power grid data corresponding to the nodes on the shortest path as retained data, and use the power grid data in the first associated data set other than the retained data as candidate data;

[0048] The twin mapping module is used to perform twin mapping on the power grid data in the non-correlated data set and the candidate data to obtain twin data;

[0049] The digital twin supplement module is used to perform data filling on the first associated data set containing only candidate data to generate filled data; and to construct a digital twin of the power grid based on the twin data and the filled data.

[0050] Based on the above embodiments, another embodiment of the present invention provides a terminal device, which includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the method for generating a digital twin of the power grid described in the above embodiments of the invention.

[0051] Based on the above embodiments, another embodiment of the present invention provides a storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the storage medium is located is controlled to execute the method for generating a digital twin of the power grid described in the above embodiment of the invention.

[0052] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:

[0053] The present invention constructs a correlation topology map through the grid data with an associated relationship, finds the shortest path in the correlation topology map, uses the grid data on the shortest path as retained data, and uses other data as candidate data. Since the process of digital twin is relatively complicated, the present invention skips the twin mapping step for the retained data, uses the data filling method to obtain the corresponding filling data, and generates twin data for the candidate data according to the twin mapping step, and then constructs the digital twin of the grid based on the filling data and the twin data. The present invention eliminates the need for digital twins of retained data, reduces the number of data exchanges in twin mapping, and improves the performance of the twin system. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1This is a flow chart of a method for generating a digital twin of a power grid provided by one embodiment of the present invention;

[0055] Figure 2 It is a structural schematic diagram of a power grid digital twin generation device provided by one embodiment of the present invention. DETAILED DESCRIPTION

[0056] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0057] Example 1

[0058] Please refer to Figure 1 , a method for generating a power grid digital twin provided by an embodiment of the present invention, comprising:

[0059] S1. Obtain power grid data.

[0060] It should be noted that grid data refers to the data that needs to be mapped when generating a digital twin of the power grid, including but not limited to: physical grid data, grid equipment status and parameter data, power flow data, load data, equipment health data, and environmental monitoring data. Grid physical data refers to the location and connection methods of physical entities such as substations, transmission lines, distribution lines, and transformers, while power flow data refers to current and voltage data.

[0061] S2. All power grid data that are associated with other power grid data are stored in a first associated data set, and the remaining power grid data are stored in a non-associated data set.

[0062] It should be noted that the association between power grid data is preset based on actual conditions. If a change in data A causes a change in data B, then data A and data B are considered to be associated. For example, environmental monitoring data affects equipment health data, so there is an association between environmental monitoring data and equipment health data.

[0063] In step S2, all grid data that are associated with other grid data are stored in a first associated data set, and the remaining grid data are stored in an unassociated data set. In other words, if a certain grid data is associated with any other grid data, it is stored in the first associated data set. If a certain grid data is not associated with any other grid data, it is stored in an unassociated data set.

[0064] S3. Construct a correlation topology graph based on the first correlation data set; wherein the nodes of the correlation topology graph are the power grid data in the first correlation data set, and the edge weights between the nodes are negatively correlated with the correlation between the power grid data corresponding to the nodes.

[0065] It should be noted that the correlation degree is used to characterize the degree of correlation between power grid data. The greater the correlation degree, the higher the degree of correlation.

[0066] In step S3, an undirected connected graph is constructed based on the first associated data set as a correlation topology graph. The power grid data is used as nodes. Edges exist between nodes corresponding to associated power grid data, while no edges exist between nodes corresponding to unassociated power grid data. The correlation between power grid data is negatively correlated with the edge weights between the corresponding nodes; that is, the greater the correlation, the smaller the corresponding edge weight.

[0067] In a preferred embodiment, constructing a correlation topology map based on the first correlation data set includes:

[0068] Calculating a first correlation degree between the power grid data having a correlation relationship in the first correlation data set according to a correlation degree calculation formula;

[0069] Calculating edge weights between nodes corresponding to the power grid data according to a first degree of association between the power grid data in the first associated data set;

[0070] The association degree topology graph is generated by taking the power grid data in the first association data set as nodes and the first association degrees between the power grid data as edge weights.

[0071] In a preferred embodiment, the correlation calculation formula is:

[0072]

[0073] X i ={x i (t), t=1,...,M};

[0074] X j ={x j (t), t=1,...,M};

[0075] Where, X i represents the i-th power grid data in the first associated data set; X j represents the jth power grid data in the first associated data set; x i (t) represents the power grid data X i The data at the tth moment in x j (t) represents the power grid data X jThe time data of the tth moment in the grid; M represents the number of time data corresponding to each grid data; R ij Represents power grid data X i and grid data X i The correlation between i,j (m1,m2) represents the power grid data X i The time data and power grid data X at the moment m1 j The correlation between the data at the m2th moment in the equation is: Cov is the covariance; Var is the variance.

[0076] It should be noted that when calculating the correlation, some non-quantitative data, such as power grid equipment status data, can be analyzed and processed using NLP text quantification tools to convert data text that is not a quantitative indicator from a qualitative description into a quantitative indicator. The power grid data collected by the present invention is data from the same time period. When calculating the correlation, each power grid data is divided based on the time series to obtain the moment data for all moments in the time period. The moment data refers to the power grid data at a certain moment. The time period contains a total of M moments, and each power grid data is divided to obtain M moment data.

[0077] In this embodiment, the i-th power grid data X in the first associated data set is calculated. i and the jth power grid data X j The correlation between them, first, according to the divided X i and X j Time data: X i ={x i (t), t=1,...,M} and X j ={x j (t), t=1,...,M}, calculate X i and X j The correlation degree r between all two-time data i,j (m1,m2),m1=1...M,m2=1...M,get X i and X j The correlation matrix between:

[0078]

[0079] Then, calculate the mean of the correlation matrix: Get X i and X j The correlation between them.

[0080] It should also be noted that the correlation degree calculated based on the acquired power grid data is the first correlation degree, which is distinguished from the second correlation degree recalculated later.

[0081] In a preferred embodiment, the edge weight is calculated as follows:

[0082]

[0083] Where, ω ij Represents power grid data X i and grid data X i The edge weights between corresponding nodes; k is a preset constant.

[0084] It should be noted that the edge weight is negatively correlated with the association degree. In this embodiment, an inverse formula is used to characterize the relationship between the two.

[0085] S4. Determine the shortest path between two preset nodes in the association topology graph, and use the power grid data corresponding to the nodes on the shortest path as retained data, and use the power grid data other than the retained data in the first association data set as candidate data.

[0086] In step S4, two nodes corresponding to the grid data are preset as the starting point and the end point, and the ant colony algorithm is used to determine the shortest path between the starting point and the end point.

[0087] First, the parameters of the ant colony algorithm are initialized based on the starting and end points, and a preset number of ants are placed at the starting point. Then, each ant selects the next node based on the probability of pheromone concentration and heuristic factor. The ants move in the planar topological structure, gradually building a path. After the ants complete the path, the pheromone concentration is updated according to the path length. The process of path selection and pheromone concentration update is repeated until the predetermined number of iterations is reached. During all iterations, the shortest path found by each ant is recorded, and the shortest path among all paths is selected as the optimal solution and output.

[0088] Each ant selects the next node based on the probability of pheromone concentration and heuristic factor. The probability P(a,b) of an ant going from node a to node b is expressed as:

[0089]

[0090] Where α and β represent the relative importance of pheromone heuristic factor and expected heuristic factor respectively; τ(a, b) represents the number of pheromones in the node path (a, b); μ(a, b) represents the heuristic factor for path node selection; S next Represents the set from node a to the next node.

[0091] When all ants complete a path traversal, they update the pheromones on each path. The pheromone update is expressed as:

[0092] τ ab (t+n)=(1-ρ)·τab (t)+Δτ ab ;

[0093]

[0094] Where ρ represents the evaporation coefficient of pheromone on the path, ρ∈[0,1]; 1-ρ represents the persistence coefficient of pheromone; Δτ ab represents the pheromone increment on the path (a, b); z represents the number of ants; Δτ ab k represents the amount of pheromone left by the kth ant on the path (a, b) in this iteration; Q represents a positive constant; L k It represents the length of the path traveled by the kth ant in this traversal.

[0095] S5. Perform twin mapping on the power grid data in the non-associated data set and the candidate data to obtain twin data.

[0096] In step S5, a data mapping model is used to perform digital twin mapping on the power grid data and candidate data in the non-associated data set to obtain twin data.

[0097] S6. Perform data filling on the first associated data set containing only candidate data to generate filled data.

[0098] In step S6, the retained data in the first associated data set is removed, and the first associated data set containing only the candidate data is filled to generate filled data.

[0099] It should be noted that the filler data can be understood as new retained data, which is used to replace the original, deleted retained data.

[0100] In a preferred embodiment, after generating the filling data, the method further includes:

[0101] replacing the retained data in the first associated data set with the filling data to obtain a second associated data set;

[0102] Calculating, according to the correlation calculation formula, a second correlation degree between the power grid data having a correlation relationship in the second correlation data set;

[0103] calculating a first correlation degree average value of all first correlation degrees and a second correlation degree average value of all second correlation degrees;

[0104] Calculating a correlation error based on the first correlation average value and the second correlation average value;

[0105] Determine whether the correlation error is less than a preset error threshold. If so, continue to execute subsequent operations. If not, construct a digital twin of the power grid based on the twin data and the retained data, and stop executing subsequent operations.

[0106] In this embodiment, after the fill-in data is generated, the retained data in the first associated data set is replaced with the fill-in data to obtain a second associated data set. The second associated data set is composed of candidate data and fill-in data. It is also necessary to calculate the second correlation between the power grid data with correlation in the second associated data set according to the correlation calculation formula. It should be noted that the fill-in data inherits the correlation relationship of the retained data. According to whether the correlation error between the first correlation and the second correlation is less than the error threshold, it is determined whether the generated fill-in data can be used to replace the retained data. If it is less than the error threshold, it means that the fill-in data can replace the retained data, and subsequent operations are continued. If it is not less than the error threshold, it means that the fill-in data cannot replace the retained data, and the retained data is restored. The digital twin of the power grid is constructed based on the retained data and the twin data, and subsequent operations are stopped.

[0107] In a preferred embodiment, performing data filling on the first associated data set containing only candidate data to generate filled data includes:

[0108] Obtaining historical data corresponding to each type of retained data; wherein the historical data is power grid data for a historical period before the current moment;

[0109] Inputting historical data corresponding to each type of retained data into a first prediction model corresponding to the retained data, so that the prediction model predicts the retained data based on the historical data to obtain first prediction data;

[0110] Using the first predicted data corresponding to all retained data as filling data;

[0111] The training process of the first prediction model corresponding to each type of retained data includes:

[0112] For each type of retained data, a plurality of first sample data corresponding to the retained data is obtained; wherein each first sample data includes: first historical data of a historical period and second historical data at a moment after the historical period;

[0113] For each first sample data, input the first historical data into a first model corresponding to the retained data, so that the first model predicts the power grid data at a next moment corresponding to the first historical data based on the first historical data, thereby obtaining a first historical data prediction result; calculate a first loss value based on the first historical data prediction result and the second historical data, and adjust the first model based on the first loss value;

[0114] The adjusted first model is used as the first prediction model.

[0115] In this embodiment, a prediction model based on the C3D-LSTM framework is adopted, and the C3D module is used to extract the spatiotemporal features of the historical data of the retained data. The calculation process is as follows:

[0116]

[0117] Where * represents the three-dimensional convolution operation; represents the output of the i-th layer; Represents the input of the i-th layer and the output of the i-1-th layer. When i=1, X∈R ξ×S×F×c , X is the original input data, ξ, S and F represent time, space and features respectively, c represents the number of channels, and c = 1, Represents the weight parameter of the i-th convolutional layer; represents the bias parameter; f represents the activation function.

[0118] The extracted features are transformed into time series data through dimension transformation and input into the LSTM network. Time series features for predicting data are extracted from the sequence. The extracted time series features are passed through a fully connected network and output to obtain predicted data.

[0119] It should be noted that the data filling method provided in this embodiment is to predict the retained data of the current period based on the historical data corresponding to the retained data. The current period refers to the period corresponding to the power grid data obtained in step S1.

[0120] In a preferred embodiment, performing data filling on the first associated data set containing only candidate data to generate filled data includes:

[0121] Inputting the candidate data into a second prediction model so that the second prediction model predicts the retained data according to the candidate data to obtain second prediction data;

[0122] Using the second predicted data as filling data;

[0123] The training process of the second prediction model includes:

[0124] Acquire a plurality of second sample data; wherein each of the second sample data includes: first power grid data corresponding to the candidate data at a certain historical moment and second power grid data corresponding to the retained data;

[0125] For each second sample data, input the first power grid data into a second model, so that the second model predicts the retained data corresponding to the first power grid data based on the first power grid data to obtain a first power grid data prediction result; calculate a second loss value based on the first power grid data prediction result and the second power grid data, and adjust the second model based on the second loss value;

[0126] The adjusted second model is used as the second prediction model.

[0127] It should be noted that the data filling method provided in this embodiment predicts retained data based on candidate data. Because the candidate data and retained data are associated with each other, the second prediction model trained based on the association between historical candidate data and retained data can predict the corresponding retained data using candidate data as input.

[0128] S7. Construct a digital twin of the power grid based on the twin data and the filling data.

[0129] It should be noted that the digital twinning process is relatively complex. The retained data skips the twin mapping step, and the corresponding filler data is obtained using a data filling method. The candidate data is still generated into twin data according to the twin mapping step. Then, the digital twin of the power grid is constructed based on the filler data and the twin data. This method eliminates the need for digital twinning of retained data, reduces the number of data exchanges in the twin mapping, and improves the performance of the twin system.

[0130] Example 2

[0131] Please refer to Figure 2 , a power grid digital twin generation device provided by an embodiment of the present invention includes: a data acquisition module, a retention and candidate data determination module, a twin mapping module and a digital twin supplement module;

[0132] The data acquisition module is used to acquire power grid data;

[0133] The retained and candidate data determination module is configured to store all power grid data that are associated with other power grid data into a first associated data set, and the remaining power grid data into a non-associated data set; construct a correlation topology graph based on the first associated data set; wherein the nodes of the correlation topology graph are the power grid data in the first associated data set, and the edge weights between the nodes are negatively correlated with the correlation between the power grid data corresponding to the nodes; determine the shortest path between two preset nodes in the correlation topology graph, and use the power grid data corresponding to the nodes on the shortest path as retained data, and use the power grid data in the first associated data set other than the retained data as candidate data;

[0134] The twin mapping module is used to perform twin mapping on the power grid data in the non-correlated data set and the candidate data to obtain twin data;

[0135] The digital twin supplement module is used to perform data filling on the first associated data set containing only candidate data to generate filled data; and to construct a digital twin of the power grid based on the twin data and the filled data.

[0136] Example 3

[0137] Accordingly, an embodiment of the present invention provides a terminal device, which includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the method for generating a digital twin of the power grid described in the above-mentioned embodiment of the invention.

[0138] Example 4

[0139] Accordingly, an embodiment of the present invention provides a storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the storage medium is located is controlled to execute the method for generating a digital twin of the power grid described in the above-mentioned embodiment of the invention.

[0140] It should be noted that the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed across multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment. In addition, in the drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art can understand and implement the present invention without inventive work.

[0141] Those skilled in the art will clearly understand that for the sake of convenience and brevity, the specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0142] The terminal device may be a computing device such as a desktop computer, a notebook computer, a PDA, a cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.

[0143] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the device, connecting various parts of the entire device using various interfaces and lines.

[0144] The memory can be used to store the computer program, and the processor realizes various functions of the device by running or executing the computer program stored in the memory and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function, etc.; the data storage area can store data created according to the use of the mobile phone, etc. In addition, the memory can include a high-speed random access memory and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0145] The storage medium is a storage medium, and the computer program is stored in the storage medium. When the computer program is executed by the processor, it can implement the steps of the above-mentioned method embodiments. The computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device that can carry the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0146] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A method for generating a digital twin of a power grid, characterized in that: include: Obtaining power grid data; All power grid data that are associated with other power grid data are stored in a first associated data set, and the remaining power grid data are stored in a non-associated data set; Constructing a correlation topology graph based on the first correlation data set; wherein the nodes of the correlation topology graph are the power grid data in the first correlation data set, and the edge weights between the nodes are negatively correlated with the correlation between the power grid data corresponding to the nodes; Determine the shortest path between two preset nodes in the association topology graph, and use the power grid data corresponding to the nodes on the shortest path as retained data, and use the power grid data other than the retained data in the first association data set as candidate data; Performing twin mapping on the power grid data in the non-correlated data set and the candidate data to obtain twin data; Performing data filling on the first associated data set containing only candidate data to generate filled data; A digital twin of the power grid is constructed based on the twin data and the filling data.

2. The method for generating a digital twin of a power grid according to claim 1, wherein: The step of constructing a correlation topology graph based on the first correlation data set includes: Calculating a first correlation degree between the power grid data having a correlation relationship in the first correlation data set according to a correlation degree calculation formula; Calculating edge weights between nodes corresponding to the power grid data according to a first degree of association between the power grid data in the first associated data set; The association degree topology graph is generated by taking the power grid data in the first association data set as nodes and the first association degrees between the power grid data as edge weights.

3. The method for generating a digital twin of a power grid according to claim 2, wherein: The correlation calculation formula is: X i ={x i (t),t=1,...,M}; X j ={x j (t),t=1,...,M}; Where, X i represents the i-th power grid data in the first associated data set; X j represents the jth power grid data in the first associated data set; x i (t) represents the power grid data X i The data at the tth moment in x j (t) represents the power grid data X j The time data of the tth moment in the grid; M represents the number of time data corresponding to each grid data; R ij Represents power grid data X i and grid data X i The correlation between i,j (m1,m2) represents the power grid data X i The time data and power grid data X at the moment m1 j The correlation between the data at the m2th moment in the equation is: Cov is the covariance; Var is the variance.

4. The method for generating a digital twin of a power grid according to claim 2, wherein: The calculation formula of the edge weight is: Where, ω ij Represents power grid data X i and grid data X i The edge weights between corresponding nodes; k is a preset constant.

5. The method for generating a digital twin of a power grid according to claim 2, wherein: After generating the fill data, also include: replacing the retained data in the first associated data set with the filling data to obtain a second associated data set; Calculating, according to the correlation calculation formula, a second correlation degree between the power grid data having a correlation relationship in the second correlation data set; Calculating a first correlation degree average value of all first correlation degrees and a second correlation degree average value of all second correlation degrees; Calculating a correlation error based on the first correlation average value and the second correlation average value; Determine whether the correlation error is less than a preset error threshold. If so, continue to execute subsequent operations. If not, construct a digital twin of the power grid based on the twin data and the retained data, and stop executing subsequent operations.

6. The method for generating a digital twin of a power grid according to claim 1, wherein: The step of performing data filling on the first associated data set having only candidate data to generate filled data includes: Obtaining historical data corresponding to each type of retained data; wherein the historical data is power grid data for a historical period before the current moment; Inputting historical data corresponding to each type of retained data into a first prediction model corresponding to the retained data, so that the prediction model predicts the retained data based on the historical data to obtain first prediction data; Using the first predicted data corresponding to all retained data as filling data; The training process of the first prediction model corresponding to each type of retained data includes: For each type of retained data, a plurality of first sample data corresponding to the retained data is obtained; wherein each first sample data includes: first historical data of a historical period and second historical data at a moment after the historical period; For each first sample data, input the first historical data into a first model corresponding to the retained data, so that the first model predicts the power grid data at a next moment corresponding to the first historical data based on the first historical data, thereby obtaining a first historical data prediction result; calculate a first loss value based on the first historical data prediction result and the second historical data, and adjust the first model based on the first loss value; The adjusted first model is used as the first prediction model.

7. The method for generating a digital twin of a power grid according to claim 1, wherein: The step of performing data filling on the first associated data set having only candidate data to generate filled data includes: Inputting the candidate data into a second prediction model so that the second prediction model predicts the retained data according to the candidate data to obtain second prediction data; Using the second predicted data as filling data; The training process of the second prediction model includes: Acquire a plurality of second sample data; wherein each of the second sample data includes: first power grid data corresponding to the candidate data at a certain historical moment and second power grid data corresponding to the retained data; For each second sample data, input the first power grid data into a second model, so that the second model predicts the retained data corresponding to the first power grid data based on the first power grid data to obtain a first power grid data prediction result; calculate a second loss value based on the first power grid data prediction result and the second power grid data, and adjust the second model based on the second loss value; The adjusted second model is used as the second prediction model.

8. A device for generating a digital twin of a power grid, characterized in that: include: Data acquisition module, retention and candidate data determination module, twin mapping module and digital twin supplement module; The data acquisition module is used to acquire power grid data; The retained and candidate data determination module is configured to store all power grid data that are associated with other power grid data into a first associated data set, and the remaining power grid data into a non-associated data set; construct a correlation topology graph based on the first associated data set; wherein the nodes of the correlation topology graph are the power grid data in the first associated data set, and the edge weights between the nodes are negatively correlated with the correlation between the power grid data corresponding to the nodes; determine the shortest path between two preset nodes in the correlation topology graph, and use the power grid data corresponding to the nodes on the shortest path as retained data, and use the power grid data in the first associated data set other than the retained data as candidate data; The twin mapping module is used to perform twin mapping on the power grid data in the non-correlated data set and the candidate data to obtain twin data; The digital twin supplement module is used to perform data filling on the first associated data set containing only candidate data to generate filled data; and to construct a digital twin of the power grid based on the twin data and the filled data.

9. A terminal device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, the method for generating a digital twin of a power grid as described in any one of claims 1 to 7 is implemented.

10. A storage medium, characterized in that: The storage medium includes a stored computer program, wherein, when the computer program is running, the device where the storage medium is located is controlled to execute the method for generating a digital twin of a power grid according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Digital twinning-based digital power grid system and method

    CN112231305A

  • Digital twin power grid dynamic state estimation method and related system

    CN117559384A