Digital twin modeling method for privacy protection under network physical energy system

By using conditional generation adversarial networks and federated learning in cyber physical energy systems, the digital twin modeling method is optimized, and the problems of privacy protection and efficiency improvement are solved, and efficient digital twin modeling and update are achieved.

CN118890285AActive Publication Date: 2024-11-01HEILONGJIANG UNIV

Patent Information

Application Number
CN202410900113.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-05
Publication Date
2024-11-01
Estimated Expiration
2044-07-05

AI Technical Summary

Technical Problem

The existing digital twin modeling methods have problems in privacy protection and efficiency improvement in cyber physical energy systems, especially the complex calculation and analysis of federated learning methods lead to inefficient modeling and updates.

Method used

Multiple edge servers are used to establish a single digital twin model based on the real value of the target data, and aggregation of the central cloud server forms a global digital twin model, combining condition-generating adversarial networks and federated learning, and optimizing condition-generating adversarial through prediction methods and loss function corrections. Network model parameters are used to filter client and weight allocation, and finally achieve weighted average global digital twin model aggregation.

Benefits of technology

It improves the efficiency of digital twin modeling, ensures model performance, and improves the efficiency of modeling and updates while ensuring privacy protection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118890285A_ABST
    Figure CN118890285A_ABST
Patent Text Reader

Abstract

The invention discloses a privacy protection-oriented digital twin modeling method under a network physical energy system, and belongs to the field of wind power load prediction modeling. The invention aims to solve the problem of low modeling and updating efficiency caused by complex calculation and analysis of the existing digital twin modeling method using federated learning. Comprising the following steps: firstly, describing a modeling concern point and a relationship between digital twinning and a physical entity by adopting a digital twinning theoretical model; secondly, the problem of digital twinborn local modeling is solved through a cyclic condition generative adversarial network; and finally, solving the privacy protection problem in the digital twinborn modeling process in the distributed environment through federated learning to ensure the modeling security. In the process of modeling the digital twin global model based on federated learning, optimization of client selection, initial weight distribution and global model aggregation is carried out, and the modeling efficiency is improved. Compared with an existing reference strategy, the method has the advantages that the modeling efficiency can be improved, and the model performance is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a digital twin modeling method for privacy protection in a network physical energy system, and belongs to the field of wind power load prediction modeling. Background Art

[0002] As the latest paradigm in cyber-physical energy systems, digital twins fully exploit their real-time and low-cost characteristics in terms of interaction. It greatly improves the operating efficiency of physical entities throughout their life cycle and ensures reliable operating quality. However, low modeling and updating efficiency directly affects the practical application of digital twins. In addition, privacy data protection is often neglected during the digital twin modeling process.

[0003] Emerging technologies such as artificial intelligence, big data analysis, cloud computing and edge computing have greatly promoted the development of cyber-physical energy systems. However, as the scale becomes larger and larger, more and more devices are involved in cyber-physical energy systems, resulting in a sharp increase in workload. As a result, the complexity of the coordinated operation of various links has exploded. The emergence of digitalization has made the work process visible and transparent, which not only improves operational efficiency, but also better solves the difficulties in connecting various links. As the latest paradigm of digital technology, digital twins have the two major advantages of real-time and low cost, and their value is highlighted in cyber-physical energy systems.

[0004] Digital twins simulate the operation process of the physical world, predict trends and risks, and provide a basis for decision-making. Digital twins can reduce emergencies in complex systems and map the behaviors of physical entities that may or will exist in the future into cyberspace for digital representation. The introduction of the concept of digital twins has aroused great research interest in academia and industry, as well as the interests of practitioners in manufacturing, the Internet of Things and other technical groups and some industries. From generation to application, digital twins can basically be summarized into five stages: acquisition, transmission, data processing, mapping and modeling. Among them, digital twin modeling is not only the premise for the implementation of digital twin technology, but also the foundation of the entire digital twin network architecture in the future. A considerable amount of work has been focused on digital twin modeling methods. For example, the modeling method based on the mechanism model pursues high-precision simulation of physical entities, but it is more complex and lacks certain flexibility. Compared with traditional methods, although machine learning can effectively model digital twins and can learn related relationships well, it lacks a unified and concrete expression of digital twin models, and there are still problems in privacy protection and efficiency improvement. If digital twins do not protect data security during modeling, serious problems such as privacy leakage will occur to physical entities. This is because there are many unknown security risks in the modeling process of digital twins. Y. Wang et al. showed that the relevant security defects of digital twins, including privacy protection, are the key to hindering the deployment and large-scale application of digital twins. In addition, W. Wang et al. emphasized that although digital twins can well enable wireless networks, they may also suffer from many security attacks. Therefore, the security issues of digital twin modeling need to be taken seriously and strengthened. Therefore, Z. Zhou et al. pointed out that the privacy and security issues of digital twins in the application process should be solved from a technical perspective. In addition, privacy protection and data sharing must be balanced in the process of using digital twins. Federated learning, as a secure distributed learning framework, can effectively protect data privacy in the process of digital twin modeling and achieve good modeling results. The global digital twin modeled using federated learning is universal within the selected range.

[0005] While paying attention to the security issues of digital twins, it will also bring about complex calculations and analysis, which will lead to a significant decrease in modeling and updating efficiency. The value of digital twins is reflected in the advanced simulation of physical entities after rapid modeling. Therefore, the modeling efficiency will directly determine whether the digital twins can achieve the expected application effect. In order to further improve efficiency, H.Elayan et al. proposed the use of machine learning methods to realize an intelligent healthcare system with environmental perception based on the concept of digital twins. The combination of various technologies such as artificial intelligence and blockchain provides new technical support and direction for improving the efficiency of enabling digital twins while taking into account data security. Even D.Van Huynh et al. believe that in the future, mobile edge computing and ultra-high reliability and ultra-low latency communications can improve the modeling efficiency of digital twins to the extent that the metaverse can be constructed. However, the current machine learning methods are constrained by efficiency bottlenecks when modeling digital twins. Therefore, the digital twin modeling method using federated learning needs to be further improved and optimized. Summary of the invention

[0006] In view of the problem that the existing digital twin modeling method using federated learning has low modeling and updating efficiency due to complex calculations and analysis, the present invention provides a digital twin modeling method for privacy protection in a cyber-physical energy system.

[0007] A digital twin modeling method for privacy protection in a cyber-physical energy system of the present invention includes:

[0008] At the physical entity layer, the target data true value of each physical entity PO is obtained, and the target data includes behavior data and status data; at the modeling layer, multiple edge servers are used to establish a single digital twin model at different times for each physical entity PO based on the corresponding target data true value, which is used to predict the target data prediction value of the physical entity PO at the target time; at the digital twin layer, a central cloud server is used to aggregate all single digital twin models to obtain a global digital twin model;

[0009] The digital twin theoretical model is obtained by combining the general representation of the prediction method used to solve the problem of digital twins; the digital twin theoretical model is deformed by combining the prediction method currently used to solve the problem of the network physical energy system to obtain the digital twin specific model of the network physical energy system;

[0010] The conditional generative adversarial network is used as the single digital twin model, and the value function of the conditional generative adversarial network modeling digital twin is configured; then the loss function of the current problem is calculated based on the digital twin of the conditional generative adversarial network under the federated learning framework, and the digital twin based on the conditional generative adversarial network under the federated learning framework is corrected by calculating the probability distribution and Wasserstein distance;

[0011] Then, federated learning is used in combination with the calculation of the loss function to update the model parameters of the discriminator and generator in the conditional generative adversarial network through stochastic gradient ascent and descent, respectively, to obtain the optimized conditional generative adversarial network;

[0012] Perform a preliminary screening of the physical entity PO as the client to obtain the preliminary selected clients based on data difference screening; then further screen the preliminary selected clients based on the statistical characteristics of the client data to obtain the final selected clients; use the real value of the target data corresponding to the final selected client to use the optimized conditional generative adversarial network to perform the final digital twin modeling for the physical entity PO, and obtain the final monomer digital twin model corresponding to each final selected client;

[0013] Initial weights are assigned to all the final selected clients, and the initial weights are calculated based on the distances between the final selected clients. The weighted average method is then used to aggregate all the final monomer digital twin models to obtain the final global digital twin model after aggregation, thus completing the modeling.

[0014] Beneficial effects of the present invention: The method of the present invention performs digital twin modeling based on federated learning and cyclic conditional generative adversarial networks. It first uses the theoretical model of digital twins to describe the modeling focus and the relationship between digital twins and physical entities. Then, the problem of local modeling of digital twins is solved by a cyclic conditional generative adversarial network. Finally, the privacy protection problem in the digital twin modeling process in a distributed environment is solved by federated learning to ensure modeling security. The method of the present invention optimizes client selection, initial weight allocation, and global model aggregation in the process of modeling a digital twin global model based on federated learning, thereby improving modeling efficiency. Numerical experimental results based on real data sets show that the method of the present invention can improve modeling efficiency and ensure model performance compared to existing benchmark strategies. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 It is a model architecture diagram of the digital twin modeling method for privacy protection in the cyber-physical energy system of the present invention;

[0016] Figure 2 It is a schematic diagram of the selection strategy for screening clients;

[0017] Figure 3 This is a diagram of the convergence of the loss function obtained by training the conditional generative adversarial network in the verification experiment;

[0018] Figure 4 yes Figure 3 The test effect diagram of the conditional generative adversarial network trained in ;

[0019] Figure 5It is the learning effect convergence diagram of the conditional generative adversarial network (random global model, Global Random Model) of the final global digital twin model every time the central server randomly selects a client;

[0020] Figure 6 yes Figure 5 The test effect diagram of the conditional generation adversarial network obtained in ;

[0021] Figure 7 It is the learning effect convergence diagram of the conditional generative adversarial network (global rough model) of the final global digital twin model every time the central server performs preliminary screening to obtain the preliminary selected client;

[0022] Figure 8 yes Figure 7 The test effect diagram of the conditional generation adversarial network obtained in ;

[0023] Fig. 9 It is the learning effect convergence diagram of the conditional generative adversarial network (Global Fine Model) of the final global digital twin model when the central server performs preliminary screening and further screening to obtain the final selected client each time;

[0024] Fig.10 yes Fig. 9 The test effect diagram of the conditional generation adversarial network obtained in ;

[0025] Fig.11 It is a comparison chart of the target data prediction of the Global Fine Model, Global Rough Model, Global Random Model and the final single digital twin model (local model) in the same time period;

[0026] Fig.12 This is a bar chart comparing the indicators in Table 2. DETAILED DESCRIPTION

[0027] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0028] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.

[0029] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments, but they are not intended to limit the present invention.

[0030] Specific implementation method 1. Combination Figure 1 and Figure 2 As shown, the present invention provides a digital twin modeling method for privacy protection in a cyber-physical energy system, including:

[0031] At the physical entity layer, the target data true value of each physical entity PO is obtained, and the target data includes behavior data and status data; at the modeling layer, multiple edge servers are used to establish a single digital twin model at different times for each physical entity PO based on the corresponding target data true value, which is used to predict the target data prediction value of the physical entity PO at the target time; at the digital twin layer, a central cloud server is used to aggregate all single digital twin models to obtain a global digital twin model;

[0032] The digital twin theoretical model is obtained by combining the general representation of the prediction method used to solve the problem of digital twins; the digital twin theoretical model is deformed by combining the prediction method currently used to solve the problem of the network physical energy system to obtain the digital twin specific model of the network physical energy system;

[0033] The conditional generative adversarial network is used as the single digital twin model, and the value function of the conditional generative adversarial network modeling digital twin is configured; then the loss function of the current problem is calculated based on the digital twin of the conditional generative adversarial network under the federated learning framework, and the digital twin based on the conditional generative adversarial network under the federated learning framework is corrected by calculating the probability distribution and Wasserstein distance;

[0034] Then, federated learning is used in combination with the calculation of the loss function to update the model parameters of the discriminator and generator in the conditional generative adversarial network through stochastic gradient ascent and descent, respectively, to obtain the optimized conditional generative adversarial network;

[0035] Perform a preliminary screening of the physical entity PO as the client to obtain the preliminary selected clients based on data difference screening; then further screen the preliminary selected clients based on the statistical characteristics of the client data to obtain the final selected clients; use the real value of the target data corresponding to the final selected client to use the optimized conditional generative adversarial network to perform the final digital twin modeling for the physical entity PO, and obtain the final monomer digital twin model corresponding to each final selected client;

[0036] Initial weights are assigned to all the final selected clients, and the initial weights are calculated based on the distances between the final selected clients. The weighted average method is then used to aggregate all the final monomer digital twin models to obtain the final global digital twin model after aggregation, thus completing the modeling.

[0037] The digital twin theoretical model proposed in this embodiment can well describe the characteristics and modeling process of modeling digital twins using machine learning and neural networks. Considering that the data used to model digital twins should be privacy-protected, this embodiment uses federated learning to ensure that the original data for modeling digital twins is not shared but can still be fully utilized in the model training process. In addition, in order to improve the modeling and updating efficiency of digital twins, an optimization method for modeling global digital twins using federated learning is proposed, which ensures efficiency while also ensuring model performance.

[0038] The theoretical model of digital twins proposed in this implementation mainly describes the two-way dynamic relationship between physical entities and digital twins from the two perspectives of historical experience data and real-time operating status; the use of cyclic conditional generative adversarial networks to model local digital twins can better perceive the data distribution of physical entities and extract useful time series features; the use of federated learning to model global digital twins allows digital twins to have high versatility within the optional range while solving the privacy protection problem that exists when aggregating local digital twins in a distributed environment; this implementation formulaically expresses and optimizes client selection, initial weight allocation, and model aggregation in the process of global digital twin modeling based on federated learning, thereby greatly improving the efficiency of digital twin modeling and updating while ensuring good model performance; numerical results and simulation experimental results based on real data sets show that the proposed digital twin modeling method is significantly better than the baseline strategy.

[0039] The following first introduces the traditional methods of modeling digital twins, including software-defined methods and model engineering, and then discusses the use of machine learning to model digital twins.

[0040] First, the software-defined approach attempts to simulate physical entities with high fidelity through visualization tools, software or technology, and to achieve the consistency between digital twins and physical entities as much as possible. In essence, it is a digital mirror or copy of the modeled physical entity. In this way, the established digital twin model can rely on the physical entity itself, thereby providing a reference for the simulation operation process. The software-defined approach needs to construct digital twins based on certain modeling theories or methods. For example, an existing digital twin concept modeling method based on a five-dimensional digital twin framework represents the complex relationship between physical entities and their attributes. Furthermore, the existing discrete event system modeling theory for building a three-dimensional digital twin model constructs and maps all discrete units into digital manufacturing modules, and finally integrates all digital modules into a three-dimensional digital twin model. Similarly, there are also literatures that divide digital twins into product digital twins, process digital twins and operation digital twins in the context of manufacturing, and model and operate them separately, so as to simulate the state and behavior of the corresponding physical entities for the optimization of the production process. However, the software-defined approach focuses on theory and ignores the consideration of practicality in digital twin modeling, and the software-defined approach lacks a clear consensus on information modeling specifications. Most importantly, the software-defined approach overly pursues high-precision modeling results, which is difficult to achieve in practice.

[0041] Then, model engineering grasps the core of the model to fundamentally clarify the model establishment and other related issues of digital twins. For this reason, some literature attempts to answer two questions from the perspective of model engineering: how to define the correct digital twin and how to build the correct digital twin. While introducing the concept and related technologies of model engineering, it also points out that it is meaningless to model without the specific aspects to be studied, because any model is established based on specific needs, so that the dynamic attribute changes of the model can be better studied, and it must also be ensured that it is within the life cycle of the modeling object itself. Other literature proposes to use model-driven engineering, a method that strives to be both flexible and universal, for design from the perspective of engineering, that is, digital twins need to be modeled as corresponding basic components according to different functions, and then these components are aggregated hierarchically to form a complete digital twin. However, model engineering fails to integrate all the details, and there are many such as definition, quantification, evaluation indicators, data processing and management in modeling, and there is no research on the dynamic development and universality of digital twins over time. Therefore, model engineering is more suitable as the guiding ideology of digital twins rather than a specific modeling method.

[0042] Finally, machine learning has become an efficient enabling method for modeling digital twins with its excellent feature extraction and correlation learning capabilities. This is because the relationship between the digital twin itself and its corresponding physical entity is relatively complex. The model construction complexity is high and the flexibility and adaptability are too poor through mathematical equations. Machine learning has the characteristics of simplicity, efficiency, high scalability and high applicability. Compared with other methods, machine learning can learn the correlation based on the valuable data provided by the physical entity to model the digital twin. For example, the digital twin wireless network architecture implemented by federated learning effectively alleviates the unreliable communication problem between the user end and the long-distance edge server end. Similarly, the digital twin edge network architecture integrates digital twins into the edge network to improve communication efficiency and reduce transmission costs. On the basis of introducing this architecture, the blockchain-enabled federated learning modeling strategy is proposed to further strengthen communication security and data privacy protection, and the asynchronous aggregation strategy is proposed to reasonably allocate bandwidth resources. In addition, after proposing the use of deep reinforcement learning to solve the problem of random unloading of digital twin networks, the digital twin network architecture is improved and optimized from the two perspectives of reducing the unloading delay of the digital twin edge network architecture and model update verification. However, on the one hand, the use of machine learning to model digital twins may cause the leakage of the original data of physical entities, or the model itself may be subject to cyber attacks. On the other hand, in the process of solving security problems, the problem of reduced modeling and updating efficiency will arise. If the data is encrypted or security protection is increased, the modeling efficiency will be greatly reduced. One of the very important application values ​​of digital twins is the near-real-time advanced simulation of physical entities, which is bound to affect the application of digital twins. Therefore, it is necessary to consider how to improve the efficiency of digital twin modeling and updating.

[0043] This implementation method takes into account the characteristics of machine learning modeling digital twins and proposes a theoretical model of digital twins to describe the digital representation of digital twins in general scenarios and specific scenarios. Then, a generative adversarial network is used to fully learn the data pattern of the physical entity to generate the corresponding digital twin to complete the modeling. Finally, federated learning modeling digital twins is used to ensure the data security of the physical entity, and further optimization strategies are proposed to improve the efficiency of modeling and updating.

[0044] This implementation method divides the model architecture of the digital twin into the physical entity layer, the modeling layer, and the digital twin layer. Figure 1As shown in Figure 2. The N different devices in the physical entity layer (including sensors, mobile devices, computing devices, etc.) represent the corresponding physical entities PO of the digital twin DT to be modeled. This layer provides the behavioral data required for modeling digital twins that can characterize the N physical entities at different times t.<X,Y> And the state S is given to the modeling layer. After that, the uploaded data undergoes certain pre-processing operations such as data cleaning and enhancement for model training. In the modeling layer, each edge server is responsible for local modeling of its own physical entity. Each edge server uses a deep neural network to model the digital twin model of each physical entity PO at different times. Each local digital twin model is aggregated by the central cloud server (Central cloudserver) in the digital twin layer, and finally a global digital twin model is obtained.

[0045] The construction process of digital twins is evolved step by step from three levels, and as the amount of data continues to expand, the model will continue to maintain real-time modeling and updating. After the digital twin modeling is completed, the digital twin layer feeds back the analysis results to the physical entity layer to drive it to operate better in the real world, and the two-way closed-loop iterative update is completed in this way. While the network topology and overall structure of the digital twin become more complex and complete, the physical entity itself will continue to be improved and optimized.

[0046] This implementation method focuses on the relationship between characteristics such as data, status and behavior, eliminates the interference of other unimportant factors, and designs and constructs digital twins at a deeper level with a model as the center. The system model will establish the digital twin from two perspectives: 1) general model 2) specific model.

[0047] In this implementation, the method for establishing a single digital twin model is:

[0048] The behavior data of N physical entities PO is expressed as<X,Y> , where X represents the sampled behavior data set of N physical entities PO, and Y represents the data label set of the sampled behavior data:

[0049] X={x1,x2,...,x N},

[0050] Y={y1,y2,...,y N},

[0051] Where x N is the sampling behavior data of the Nth physical entity PO, y N is the sampled behavior data x N Corresponding data labels;

[0052] S represents the state data set:

[0053] S={S1,S2,...,S T},

[0054] Where S T It is the status data of all physical entity PO at time T;

[0055] The single digital twin model is represented as

[0056]

[0057] Aggregate all the individual digital twin models to obtain the global digital twin model DT t :

[0058]

[0059] In the formula is the preprocessed sampling behavior data set X.

[0060] General model: When solving different tasks, the digital twin obtains the behavior model of the tth moment in different dimensions based on the data tuples and state modeling of the physical entity. The model is substituted into the problem to be studied to output the digital twin to predict the possible behavior of the physical entity in the future, and then compared and analyzed with the actual behavior of the physical entity in the future. Finally, the general model of the digital twin is obtained by minimizing the approximation loss between the digital twin and the physical entity.

[0061] The theoretical model of digital twin is:

[0062]

[0063] Where F represents the loss function, P is the general representation of the prediction method used by digital twins to solve problems, and the output result is the predicted value of the target data. t The digital twin provides the actual value of the target data PO for the physical entity; the digital twin feeds back the analysis results to the physical entity as a reference and guide for future operations, and then the physical entity further operates and provides updated data to the digital twin for further optimization. Such real-time two-way interaction, modeling, and updating not only avoids a large amount of transmission load and improves work efficiency, but also drives the physical entity to better operate and provide services in the real world.

[0064] Specific model: The specific model of the digital twin model varies according to the specific problem. The specific model can transform the problem to be solved and the loss function into the representation of the corresponding problem based on the general model. For example, when the digital twin is used to solve the regression problem, the specific model of the digital twin of the cyber-physical energy system is:

[0065] DT t+i=minMSE(RG t~t+i (DT t ),PO t+i )(2),

[0066] Where i represents a future time point relative to the current time t, MSE represents the mean square error, the current problem to be solved is a regression problem, MSE is the loss function for the regression problem, RG is the prediction method corresponding to the regression problem, and the output is the predicted value of the target data at time t+i.

[0067] When solving the special case of regression problems, the digital twin model can use MSE as a loss function, and obtain the corresponding analysis results by comparing the future behavior of the physical entity with the behavior predicted by the digital twin. The analysis result at this time is the concrete representation of the digital twin, that is, the direct application of the digital twin, which can simulate the future operation of the physical entity and provide strong support and basis for making good and effective decisions.

[0068] Generative adversarial networks (GANs) play an important role in the process of digital twin modeling due to their excellent ability to perceive data distribution and extract data features in the field of unsupervised learning, as well as their advantages in learning the relationship between physical entities PO and digital twins DT. For example, some literature uses bidirectional LSTM and GAN to model digital twins, respectively, so that they can be used as proxy models for the mathematical model SEIRS for studying the COVID-19 pandemic to predict the behavior of the epidemic, and prove that the use of GANs has better results. Similarly, a variant conditional generative adversarial network CGAN is used to add auxiliary information to the generator and discriminator to learn conditional probability distribution information, so that the model can more robustly classify and predict the corresponding development situation.

[0069] Furthermore, the value function of the digital twin of a physical entity at a future moment modeled using a conditional generative adversarial network is expressed as:

[0070]

[0071] In the formula, D represents the discriminator of the conditional generative adversarial network, G represents the generator of the conditional generative adversarial network, V(D,G) represents the objective function of the digital twin obtained by training the discriminator and the generator through game theory; E represents the expectation, U t is the true value of the target data of the physical entity PO at time t, U is the set of true values ​​of the target data at different times, r U is the distribution of the true value of the target data, c is the historical experience data as auxiliary information, z is the noise sample, Z is the noise sample set, r Z is the distribution of the noise sample. z is the sample obtained by the standard Gaussian distribution sampled by G.

[0072] The generator in the generative adversarial network is regarded as a digital twin DT, because the discriminator needs to judge the authenticity of the sample data based on the physical entity PO, and the digital twin tries to deceive the discriminator by constantly simulating the physical entity to achieve the effect of making the fake look real. First, the discriminator has the ability to distinguish whether the sample data comes from a physical entity or a digital twin through its own training. Then, the digital twin is constantly learning and updating, making it closer and closer to the physical entity itself, making the discriminator gradually unable to distinguish between the entity and the digital twin. The two maximize the probability of the discriminator making mistakes based on the physical entity and minimize the probability of the digital twin making mistakes in approximating the physical entity by playing a zero-sum game of the minimum and maximum. The game between the two finally reaches a Nash equilibrium, that is, the digital twin modeling is completed.

[0073] Moreover, there are literatures that use GAN to solve the problem of missing data in smart energy systems, and can also study the impact of probabilistic events on GAN when processing anomaly detection tasks. Therefore, the digital twins modeled using GAN can solve corresponding specific problems according to different application scenarios. This implementation method can take the problem of wind power forecasting as an example by modeling a good digital twin. This is because compared with the traditional load forecasting method of obtaining a single value, probabilistic forecasting can better capture the inherent dynamic changes and time series correlations of wind energy, and GAN is precisely because of its excellent learning and utilization capabilities in probability distribution that it can well complete related tasks such as probabilistic forecasting.

[0074] At the same time, this implementation also pays special attention to the privacy protection issues in the digital twin modeling process. Federated learning, as a machine learning paradigm for achieving data security and privacy protection, can solve this problem well. Its core idea is to enable multiple data sources with local data (also called clients) to perform distributed model training, and its combined use with GAN can maintain competitive performance while protecting data privacy, such as solving the COVID-19 detection problem well in edge cloud computing.

[0075] The loss function of the current problem (regression task) solved by digital twin computing based on conditional generative adversarial networks in the federated learning framework is expressed as

[0076]

[0077] In the formula represents the loss function for solving the regression problem, RM is the prediction method for the regression problem, Gn is the generator of the nth conditional generative adversarial network, is the model parameter of the nth generator.

[0078] Going further, the method for correcting the digital twin based on the conditional generative adversarial network under the federated learning framework is:

[0079] After training is completed, calculate the sampled behavior data x n The probability distribution P of historical experience data c r (x n ,c) and the probability distribution P of noise sample z and historical experience data c f (z,c):

[0080]

[0081] Where s is the activation function, C n Generate an adversarial network for the nth condition, Generate model parameters of the adversarial network for the nth condition;

[0082] Next, we calculate the divergence KL according to formulas (5) and (6) to observe whether the probability distribution predicted by the model is close to the probability distribution of the real data, and calculate the loss function of the divergence KL

[0083]

[0084] Input the noise sample into the generator for training to obtain the distribution of target data prediction values;

[0085] In order to reduce the impact of the asymmetry of KL divergence on the performance of the test model, the Wasserstein distance is introduced to further ensure the prediction accuracy. The Wasserstein distance is calculated based on the distribution of the target data's true value and the distribution of the target data's predicted value:

[0086]

[0087] In the formula is the Wasserstein distance, inf is the lower bound, sup is the upper bound, f is the first-order Lipschitz function that complies with the Lipschitz constraint, and L is the norm; Π(P r ,P f ) is g(x t+1 , the joint distribution set of G(z|y));

[0088] |f(U t )-f(U t+1 )|£|U t -U t+1 |(9);

[0089] After using KL divergence and Wasserstein distance to confirm that the predicted probability distribution of the model is very close to the true distribution, CRPS (Continuous Ranked Probability Score) is used to comprehensively evaluate the overall performance of the GAN model probability prediction, which can be equivalently expressed as formula (11).

[0090] The continuous grade probability score CRPS is used to evaluate the overall performance of the conditional generative adversarial network:

[0091]

[0092] In the formula is the cumulative distribution function, U t ¢ is the predicted value of the target data at time t, U t * For U t Mutually independent true values ​​of target data at time t;

[0093] After the above process, the correction of the digital twin based on the conditional generative adversarial network under the federated learning framework is completed.

[0094] In the local digital twin modeling method based on the cyclic conditional generative adversarial network in this embodiment, first, the real data and noise data need to be input into the cyclic conditional generative adversarial network for training the discriminator network and the generator network. Before the training starts, hyperparameters such as the number of training times and training step size of the discriminator network need to be initialized. During the training process, the discriminator network and the generator network are updated and optimized successively until the game between the two reaches a balanced state. After the training is completed, the generator network is able to output predicted data close to the real data, and the local digital twin modeling is completed.

[0095] Federated learning does not require physical entities to exchange local data or sample data. It only exchanges parameters or intermediate results in the digital twin modeling process to build a global digital twin model within the selected range, thereby achieving a balance between data privacy protection and data sharing calculations. In this way, the privacy of digital twins can be protected by using federated learning, ensuring the security of the entire modeling process.

[0096] In addition, federated learning is used to solve digital twin modeling problems in distributed scenarios.

[0097] Going further, the method for obtaining the optimized conditional generative adversarial network is:

[0098] The objective function of establishing a global digital twin model using federated learning is:

[0099]

[0100] In the formula represents the loss function of the conditional generative adversarial network, Update the discriminator in the model through stochastic gradient ascent; def means defined as;

[0101] Update the model parameters of the discriminator in the conditional generative adversarial network through stochastic gradient ascent:

[0102]

[0103] In the formula represents the gradient update formula of the discriminator, q d are the model parameters of the discriminator, is the true value of the target data corresponding to the nth physical entity PO at time t, z n is the noise sample corresponding to the nth physical entity PO;

[0104] Then update the model parameters of the generator in the conditional generative adversarial network through stochastic gradient descent:

[0105]

[0106] In the formula Represents the gradient update formula of the generator;

[0107] After updating the model parameters, the optimized conditional generative adversarial network is obtained.

[0108] The following describes the digital twin modeling and update efficiency improvement strategy based on data selection in this implementation:

[0109] In this embodiment, a digital twin modeling method based on a cyclic conditional generative adversarial network of federated learning is used. It is necessary to select the most representative part of all clients to build a global digital twin model that needs to complete a specific task. The selected clients, as participants, calculate their initial weights through a pre-set selection method, and each participant starts to perform local digital twin modeling at the same time.

[0110] The participant modeling digital twin model first needs to sample the noise vector from the noise sample, and then concatenate it with the conditional auxiliary information vector into a compact vector representation and input it into the RNN Layer in the generator to obtain the generated sample. It is then compared with the real sample vector sampled from the real data distribution and the conditional auxiliary information vector, which is also a compact vector representation formed by combining the real sample vector and the conditional auxiliary information vector, and input into the RNN Layer in the discriminator to finally obtain the discrimination result of the generated sample.

[0111] After each participant completes the modeling, they upload the model parameters to the central server. Finally, the central server performs weighted averaging based on the initial weights of each participant to complete the global digital twin model aggregation. The above process is repeated until the model converges and the global digital twin model is completed.

[0112] The global digital twin model obtained through modeling is shared with all clients to complete their respective tasks, which can be regarded as pre-training. This method allows the model to learn with a small amount of data, saving training time while effectively preventing overfitting and making the model accurate enough to be competitive.

[0113] In order to better achieve secure data sharing and data fusion, and without leaking the original data of physical entities, this implementation proposes a data selection-based strategy for modeling a global digital twin model that can fully learn the diversity and differences of data and has real-time characteristics.

[0114] This implementation method takes into account both privacy security and efficiency improvement in the process of modeling digital twins. The structure diagram of the data selection strategy is as follows: Figure 2 As shown in the figure. The focus is to ensure good model performance while using less data to update the model. First, it is proposed to ensure the privacy security of physical entities when using federated learning to model digital twins. Then, in the process of using federated learning modeling to build a global digital twin model, the three processes of client screening (including rough selection and fine selection), initial weight allocation and global model aggregation are optimized respectively, so as to meet the important characteristics of real-time modeling and updating of digital twins.

[0115] In this implementation, the method for preliminarily screening the physical entity PO as the client is as follows:

[0116] The focus of this step is to select clients with greater differences and filter out clients with higher similarity. It is necessary to observe the internal data rules to provide corresponding references for the subsequent selection of participants without leaking user privacy. Therefore, each client needs to standardize and normalize the data set it has first, and then sample the pre-processed data from the client and upload it to the central server for analysis. The data preprocessing is shown in formula (14).

[0117]

[0118] In the formula is the sampled behavior data x of the nth physical entity PO n The sampled behavior data at time t, for After preprocessing, μ n Sampling behavior data for the nth physical entity PO at each moment The mean value, σ n Represents the sampling behavior data of the nth physical entity PO The standard deviation of n For preprocessed data The minimum value, max n For preprocessed data The maximum value of

[0119] Next, the dynamic time warping (DTW) method, which is insensitive to time series offset, is used to calculate the preprocessed data. The similarity of , so that the initial weights can be assigned to different clients according to the size of the similarity difference:

[0120]

[0121] Where d DTW represents the similarity difference, K represents the total number of paths, represents the minimum distance between the sampled behavior data of the nth client and the n¢th client, n¢=1, 2, 3, ... N; n 1n¢; (I, J) is the two-dimensional coordinate of the end point of the path, (I k ,J k ) is the two-dimensional coordinate of the end point of the kth path, A(I k ,J k ) represents the minimum distance between the sampled behavior data of the nth client and the n¢th client in the kth path, where n k As the starting point of the k-th path, it corresponds to the preprocessed data of the n-th client, and n¢as the end point of the k-th path, it corresponds to the preprocessed data of the n¢-th client;

[0122] d DTW The smaller the distance d, the more similar the two different time series data sets are. DTW The larger the difference, the greater the difference; the similarity difference d DTW Clients with a value greater than a preset threshold are selected as preliminary clients.

[0123] The method for further screening to obtain the final selected client is:

[0124] Combination Figure 2 As shown, the initially selected clients are sorted according to the similarity and difference d DTWThe preprocessed data corresponding to each cluster of clients are averaged, and the averaged preprocessed data is used as the preprocessed data of the final selected client. This not only helps to reduce the data with high similarity or inline degree to a certain extent, thereby reducing data redundancy and preventing training overfitting, thereby improving training efficiency, but also helps to reduce computing pressure, reduce communication delay, optimize resource allocation and enhance training efficiency in the process of federated learning:

[0125]

[0126] In the formula is the mean preprocessed data of the wth finally selected client, is virtual data, w = 1, 2, 3, ... W, where W is the total number of finally selected clients; Q is the number of initially selected clients in each cluster of clients, The average preprocessed data corresponding to the initially selected client q.

[0127] At this stage, we can either select the most representative client from these clients based on the statistical characteristics of the sample data (such as the sample mean, which depends on the specific problem), or set up a trusted edge server (TrustedEdge Server) for these clients with greater similarity to aggregate their pre-processed sample data and perform averaging. In this way, the data owned by the clients can be fused after a certain processing so that they can participate in the global model aggregation in another way.

[0128] The trusted edge server participates in the subsequent global model aggregation instead of some clients with greater local similarity. Its higher computing power can not only ignore problems such as calculation and communication delays, but also reduce the model's learning of similar data, further improving training efficiency and preventing model overfitting.

[0129] Initial weight assignment and global model aggregation:

[0130] Before the model is globally aggregated, the initial weights need to be distributed to each participant for local digital twin modeling. In order to make the model aggregate and update faster and better, it is necessary to assign corresponding and more reasonable weights to different participants. The size of the assigned weights means that the local digital twin models of each participant have different effects on the global model aggregation during the training process.

[0131] Finally, the method to obtain the final global digital twin model after aggregation is:

[0132] Calculate the final selected client similarity difference set H:

[0133]

[0134] In the formula is the similarity difference between the first final selected client and the wth final selected client;

[0135] Due to e -x The value is always [0,1] in the range of [0,+∞], and decreases as x increases. Therefore, the DTW distances between the current participant and other participants are summed and normalized. The smaller the total DTW distance, the higher the similarity. By substituting it into e -x Inverse calculation is also required to obtain the smaller weight that should be given. x Because the results obtained by different x values ​​vary greatly in magnitude, the final calculation may result in some participants having infinite initial weights. Therefore, it is necessary to minimize and maximize d DTW Linearly map to the range [0,1], such as k for the wth participant w The sum of the DTW distances with other participants is processed.

[0136] Calculate the weight coefficient k w :

[0137]

[0138] Where H w is the w final selected client similarity difference sets, minH is the minimum value of the final selected client similarity difference set H, and maxH is the maximum value of the final selected client similarity difference set H; then e x After processing, the initial weight range of each participant is limited to [1,e].

[0139] According to the weight coefficient k w Initial weight allocation for the W final selected clients:

[0140]

[0141] Where w W is the initial weight of the Wth finally selected client;

[0142] The weighted average method is used to aggregate all final monomer digital twin models to obtain the weighted average value. And according to the weighted average Get the final global digital twin model after aggregation;

[0143]

[0144] The model parameters of the discriminator for the Wth finally selected client;

[0145] The method to update the model parameters is:

[0146]

[0147] In the formula is the gradient update formula of the discriminator corresponding to the wth finally selected client; F is the gradient update function,

[0148]

[0149] In the formula is the gradient update formula of the generator corresponding to the wth finally selected client; q G is the model parameter of the generator;

[0150] The updating method of each finally selected client model parameter is:

[0151]

[0152] In the formula is the updated value of the model parameters of the w-th discriminator at time t+1, is the model parameter value of the w-th discriminator at time t, h is the gradient coefficient, is the model parameter value of the w-th discriminator;

[0153] In the formula Update the model parameters of the w-th generator at time t+1. is the model parameter value of the w-th generator at time t, is the model parameter value of the w-th generator;

[0154] The parameter update method of the final global digital twin model after aggregation is:

[0155]

[0156] Where q d,t+1 Update the model parameters of the discriminator in the final global digital twin model, q G,t+1 Update values ​​for the model parameters of the generator in the final global digital twin model.

[0157] Experimental verification:

[0158] Experimental environment settings:

[0159] Taking the modeled digital twin to solve the wind power prediction problem as an example, the data set used comes from NREL. NREL includes a wealth of energy data, and the wind power data is selected as the key feature of the physical entity required for digital twin modeling. The wind power data of the selected wind farm is the energy after the wind speed is converted into electrical energy. Taking one hour as a moment, the amount of data calculated for 365 days a year for this wind farm is 8760 data, and the data unit size is KW / H.

[0160] In the process of digital twin modeling, in order to prevent the gradient explosion of the neural network during calculation, the wind power data needs to be normalized. The minimum-maximum normalization method is used to normalize the data to the range of [0,1].

[0161] Performance evaluation: The following standards are selected to measure the model performance of the present invention, namely, mean absolute error MAE, root mean square error RMSE, continuous ranking probability score CRPS, KL divergence KLD, and Wasserstein distance. The above standards are model test results obtained using data in the range of [0,1]. In order to better measure the prediction accuracy of the digital twin modeled by the present invention, the data is restored back to the range for testing, and new test standards are added, namely, mean absolute percentage error MAPE, normalized root mean square error NRMSE and coefficient of variation of root mean square error CV-RMSE.

[0162] The training loss of the local digital twin model is as follows: Figure 3 As shown, the model converges around the 6000th round. Figure 3 It can be seen that the generator network and the discriminator network of the digital twin modeling using the generative adversarial network reach a balance in the game at a loss value of approximately 0.69, indicating that the digital twin modeling is complete and can be applied.

[0163] Figure 4 This is the test effect diagram of the local digital twin model after convergence. The data set is divided into 5:1:4 ratios, so the data volume of the test set is 3504. Figure 4 A local zoomed-in image is added to more clearly show the model’s predictive performance. Figure 4 It can be seen that the model established in this embodiment is relatively good in learning and extracting wind power timing characteristics, especially in describing the overall trend, which shows that the model established in the present invention has considerable application value.

[0164] After the local digital twin modeling is completed, it is necessary to model the global digital twin under the federated learning framework. In this process, a data selection-based strategy is proposed to optimize the global model modeling. Figures 5 to 10It shows the comparison of learning effect and prediction accuracy of the central server randomly selecting clients each time, only using preliminary screening to obtain preliminary selected clients, and performing preliminary screening according to the method of the present invention and further screening to obtain the final selected clients. Among them, the random selection of clients belongs to the classic federated learning FedAvg algorithm, which belongs to the benchmark strategy. As can be seen from the figure, the learning stability and prediction accuracy of the data selection strategy proposed by the present invention are similar to those of the benchmark strategy, but only half of the data amount is used for learning. Experiments have proved that the strategy of the present invention to select clients for learning on the basis of protecting data privacy is reasonable and effective.

[0165] Fig.11 for Figures 5 to 10 Together with the local enlarged graph of the prediction accuracy of the local model in the same time period, it can be seen that the local model has the best wind power trend prediction accuracy, followed only by the global model based on data selection strategy optimization proposed in the present invention.

[0166] The comparison results of each model in various indicators are shown in Table 1, which is the comparison result when the input data is normalized to the range of [0,1].

[0167] Table 1

[0168]

[0169] Table 2 shows the results when the input data is in the original to original range.

[0170] Table 2

[0171]

[0172] Fig.12 It is intuitively shown that the method of the present invention uses half the amount of data to greatly improve the modeling and updating efficiency, thereby further ensuring the real-time characteristics of the digital twin.

[0173] In summary, the method of the present invention ensures privacy security and further improves the modeling efficiency in the digital twin modeling method based on federated learning in the network physical energy system. First, according to the characteristics of machine learning, a digital twin theoretical model is proposed to represent the bidirectional dynamic relationship between digital twins and physical entities. Then, federated learning is used to solve the privacy protection problem in the process of global model aggregation of local digital twin models modeled by generative adversarial networks in a distributed environment. Finally, a data selection-based strategy is proposed to optimize the screening of clients, initial weight allocation and global model aggregation to improve the model update efficiency and meet the real-time requirements of digital twins. Finally, the numerical results based on real data sets show that the method of the present invention can make digital twins universal within the constructed range compared with the benchmark strategy. A large number of simulation experiments show that the strategy proposed in the present invention can significantly improve the update efficiency.

[0174] Although the present invention is described herein with reference to specific embodiments, it should be understood that these embodiments are merely examples of the principles and applications of the present invention. It should therefore be understood that many modifications may be made to the exemplary embodiments and that other arrangements may be devised without departing from the spirit and scope of the present invention as defined by the appended claims. It should be understood that the various dependent claims and features described herein may be combined in a manner different from that described in the original claims. It should also be understood that the features described in conjunction with a single embodiment may be used in other described embodiments.

Claims

1. A digital twin modeling method for privacy protection in a cyber-physical energy system, characterized in that: include: At the physical entity layer, the real value of the target data of each physical entity PO is obtained. The target data includes behavior data and status data. In the modeling layer, multiple edge servers are used to establish a single digital twin model at different times for each physical entity PO based on the corresponding target data real value, which is used to predict the target data prediction value of the physical entity PO at the target time; in the digital twin layer, a central cloud server is used to aggregate all single digital twin models to obtain a global digital twin model; The digital twin theoretical model is obtained by combining the general representation of the prediction method used to solve the problem of digital twins; the digital twin theoretical model is deformed by combining the prediction method currently used to solve the problem of the network physical energy system to obtain the digital twin specific model of the network physical energy system; The conditional generative adversarial network is used as the single digital twin model, and the value function of the conditional generative adversarial network modeling digital twin is configured; then the loss function of the current problem is calculated based on the digital twin of the conditional generative adversarial network under the federated learning framework, and the digital twin based on the conditional generative adversarial network under the federated learning framework is corrected by calculating the probability distribution and Wasserstein distance; Then, federated learning is used in combination with the calculation of the loss function to update the model parameters of the discriminator and generator in the conditional generative adversarial network through stochastic gradient ascent and descent, respectively, to obtain the optimized conditional generative adversarial network; Perform a preliminary screening of the physical entity PO as the client, and obtain the preliminary selected clients based on data difference screening; Then, based on the statistical characteristics of the client data, the initially selected clients are further screened to obtain the final selected clients; The actual value of the target data corresponding to the final selected client is used to perform the final digital twin modeling of the physical entity PO using the optimized conditional generative adversarial network to obtain the final monomer digital twin model corresponding to each final selected client; Initial weights are assigned to all the final selected clients, and the initial weights are calculated based on the distances between the final selected clients. The weighted average method is then used to aggregate all the final monomer digital twin models to obtain the final global digital twin model after aggregation, thus completing the modeling.

2. The digital twin modeling method for privacy protection in a cyber-physical energy system according to claim 1 is characterized in that: The method for establishing a single digital twin model is as follows: The behavior data of N physical entities PO is expressed as<X,Y> , where X represents the sampled behavior data set of N physical entities PO, and Y represents the data label set of the sampled behavior data: X={x1,x2,...,x N }, Y={y1,y2,...,y N }, Where x N is the sampling behavior data of the Nth physical entity PO, y N is the sampled behavior data x N Corresponding data labels; S represents the state data set: S={S1,S2,...,S T }, Where S T It is the status data of all physical entity PO at time T; The single digital twin model is represented as Aggregate all the individual digital twin models to obtain the global digital twin model DT t : In the formula is the preprocessed sampling behavior data set X.

3. The digital twin modeling method for privacy protection in a cyber-physical energy system according to claim 2 is characterized in that: The theoretical model of digital twin is: Where F represents the loss function, P is the general representation of the prediction method used by digital twins to solve problems, and the output result is the predicted value of the target data. t The actual value of the target data of the physical entity PO; The specific models of the digital twin of a cyber-physical energy system are: DT t+i =minMSE(RG t~t+i (DT t ),PO t+i ) (2), Where i represents a future time point relative to the current time t, MSE represents the mean square error, the current problem to be solved is a regression problem, MSE is the loss function for the regression problem, RG is the prediction method corresponding to the regression problem, and the output is the predicted value of the target data at time t+i.

4. The digital twin modeling method for privacy protection in a cyber-physical energy system according to claim 3 is characterized in that: The value function of modeling digital twins using conditional generative adversarial networks is expressed as: In the formula, D represents the discriminator of the conditional generative adversarial network, G represents the generator of the conditional generative adversarial network, V(D,G) represents the objective function of the digital twin obtained by training the discriminator and the generator through game theory; E represents the expectation, U t is the true value of the target data of the physical entity PO at time t, U is the set of true values ​​of the target data at different times, ρ U is the distribution of the true value of the target data, c is the historical experience data as auxiliary information, z is the noise sample, Z is the noise sample set, ρ Z is the distribution obeyed by the noise samples.

5. The digital twin modeling method for privacy protection in a cyber-physical energy system according to claim 4 is characterized in that: The loss function of the current problem solved by digital twin computing based on conditional generative adversarial networks in the federated learning framework is expressed as In the formula represents the loss function for solving the regression problem, RM is the prediction method for the regression problem, G n Generator for the nth conditional generative adversarial network, is the model parameter of the nth generator.

6. The digital twin modeling method for privacy protection in a cyber-physical energy system according to claim 5 is characterized in that: The method to correct the digital twin based on conditional generative adversarial network under the federated learning framework is: Calculate the sampled behavior data x n The probability distribution P of historical experience data c r (x n ,c) and the probability distribution P of noise sample z and historical experience data c f (z,c): Where σ is the activation function, C n Generate an adversarial network for the nth condition, Generate model parameters of the adversarial network for the nth condition; Calculate the divergence KL and calculate the loss function of the divergence KL Input the noise sample into the generator for training to obtain the distribution of target data prediction values; Calculate the Wasserstein distance based on the target data's true value distribution and the target data's predicted value distribution: In the formula is the Wasserstein distance, inf represents the lower bound, sup represents the upper bound, f is the first-order Lipschitz function that complies with the Lipschitz constraint, and L represents the norm; |f(U t )-f(U t+1 )|≤|U t -IN t+1 | (9); The continuous grade probability score CRPS is used to evaluate the overall performance of the conditional generative adversarial network: In the formula is the cumulative distribution function, U′ t is the predicted value of the target data at time t, U t * For U t Mutually independent true values ​​of target data at time t; After the above process, the correction of the digital twin based on the conditional generative adversarial network under the federated learning framework is completed.

7. The digital twin modeling method for privacy protection in a cyber-physical energy system according to claim 6 is characterized in that: The method to obtain the optimized conditional generative adversarial network is: The objective function of establishing a global digital twin model using federated learning is: In the formula represents the loss function of the conditional generative adversarial network, and def is defined as; Update the model parameters of the discriminator in the conditional generative adversarial network through stochastic gradient ascent: Where l D represents the gradient update formula of the discriminator, θ d are the model parameters of the discriminator, is the true value of the target data corresponding to the nth physical entity PO at time t, z n is the noise sample corresponding to the nth physical entity PO; Then update the model parameters of the generator in the conditional generative adversarial network through stochastic gradient descent: Where l G Represents the gradient update formula of the generator; After updating the model parameters, the optimized conditional generative adversarial network is obtained.

8. The digital twin modeling method for privacy protection in a cyber-physical energy system according to claim 7, characterized in that: The method for preliminary screening of physical entity POs as clients is as follows: In the formula is the sampled behavior data x of the nth physical entity PO n The sampled behavior data at time t, for After preprocessing, μ n Sampling behavior data for the nth physical entity PO at each moment The mean value, σ n Represents the sampling behavior data of the nth physical entity PO The standard deviation of n For preprocessed data The minimum value, max n For preprocessed data The maximum value of The dynamic time warping (DTW) method, which is insensitive to time series offset, is used to calculate the preprocessed data. Similarity: Where d DTW represents the similarity difference, K represents the total number of paths, represents the minimum distance between the sampled behavior data of the nth client and the n′th client, n′=1, 2, 3, ... N; (I,J) is the two-dimensional coordinate of the end point of the path, (I k ,J k ) is the two-dimensional coordinate of the end point of the kth path, A(I k ,J k ) represents the minimum distance between the sampled behavior data of the nth client and the n′th client in the kth path, where n k As the starting point of the k-th path, it corresponds to the preprocessed data of the n-th client, and n′ as the end point of the k-th path, it corresponds to the preprocessed data of the n′-th client; The similarity difference d DTW Clients with a value greater than a preset threshold are selected as preliminary clients.

9. The digital twin modeling method for privacy protection in a cyber-physical energy system according to claim 8, characterized in that: The method for further screening to obtain the final selected client is: The initially selected clients are sorted according to similarity and difference DTW The pre-processed data corresponding to each cluster of clients are averaged, and the averaged pre-processed data obtained is used as the pre-processed data of the final selected client: In the formula is the preprocessed data of the wth finally selected client, w = 1, 2, 3, ... W, where W is the total number of finally selected clients; Q is the number of initially selected clients in each cluster of clients, The average preprocessed data corresponding to the initially selected client q.

10. The digital twin modeling method for privacy protection in a cyber-physical energy system according to claim 9, characterized in that: The method to obtain the final global digital twin model after aggregation is: Calculate the final selected client similarity difference set H: In the formula is the similarity difference between the first final selected client and the wth final selected client; Calculate the weight coefficient k w : Where H w are w final selected client similarity difference sets, minH is the minimum value of the final selected client similarity difference set H, and maxH is the maximum value of the final selected client similarity difference set H; Initial weight allocation for the W final selected clients: Where ω W is the initial weight of the Wth finally selected client; The weighted average method is used to aggregate all final monomer digital twin models to obtain the weighted average value. And according to the weighted average Get the final global digital twin model after aggregation; The model parameters of the discriminator for the Wth finally selected client; The method to update the model parameters is: In the formula is the gradient update formula of the discriminator corresponding to the wth finally selected client; F is the gradient update function, In the formula is the gradient update formula for the generator corresponding to the wth finally selected client; θ G is the model parameter of the generator; The updating method of each finally selected client model parameter is: In the formula is the updated value of the model parameters of the w-th discriminator at time t+1, is the model parameter value of the w-th discriminator at time t, η is the gradient coefficient, is the model parameter value of the w-th discriminator; In the formula Update the model parameters of the w-th generator at time t+1. is the model parameter value of the w-th generator at time t, is the model parameter value of the w-th generator; The parameter update method of the final global digital twin model after aggregation is: Where θ d,t+1 Update the model parameters of the discriminator in the final global digital twin model, θ G,t+1 Update values ​​for the model parameters of the generator in the final global digital twin model.

Citation Information

Patent Citations

  • Excitation method for federated learning driven by digital twinning in air-ground network

    CN112367109A

  • Federal learning method utilizing digital twinning auxiliary model training

    CN115802389A

  • Unified modeling based on digital twinning and twinning system simulation evolution method thereof

    CN116933638A

Cited By

  • Virtual travel platform construction method based on digital twinning

    CN119992019A

  • A method for constructing a virtual cultural tourism platform based on digital twins

    CN119992019B

  • AGV simulation model establishment method and system based on digital twinning and medium

    CN120105577A

  • Semantic recognition and automatic execution method, system and equipment oriented to audit rule configuration and medium

    CN121031613A