A power communication network risk early warning method and system based on digital twinning

By constructing a digital twin network and federated learning architecture for power communication networks and adopting an adaptive weight allocation strategy, the problem of sample asymmetry in power communication networks is solved, achieving efficient traffic identification and risk warning.

CN120110941BActive Publication Date: 2026-05-01STATE GRID ZHEJIANG ELECTRIC POWER CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
STATE GRID ZHEJIANG ELECTRIC POWER CO LTD
Filing Date
2025-04-28
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

In power communication networks, the difference in data acquisition frequency and quality among communication nodes leads to an asymmetry in the number of samples in the federated learning model, which reduces the effectiveness of traffic identification and the accuracy of risk warning.

Method used

By constructing a digital twin network of the target power communication network, selecting subnets and establishing a federated learning architecture, generating simulated traffic data, and using a two-factor adaptive weight allocation strategy for iterative training to optimize the global model, combined with topology information and state data, traffic identification and risk warning are achieved.

Benefits of technology

It achieves near-global optimal performance in traffic classification and risk warning with low complexity, improving the automatic identification capability and warning accuracy of abnormal traffic.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120110941B_ABST
    Figure CN120110941B_ABST
Patent Text Reader

Abstract

The application discloses a power communication network risk early warning method and system based on digital twinning, and the method comprises the following steps: constructing a digital twin network corresponding to a target power communication network, selecting a subnet for the digital twin network, and determining a federated learning architecture corresponding to the target power communication network, wherein the federated learning architecture comprises a server and a plurality of clients connected to the server, and each client corresponds to a subnet; generating simulated traffic data based on the digital twin network and transmitting the simulated traffic data to the federated learning architecture, so that each client obtains corresponding local data; obtaining a target global model of the server based on a plurality of iteration training steps; obtaining actual traffic data based on the target power communication network, inputting the actual traffic data into the target global model, and determining whether to issue a risk early warning alarm according to the obtained traffic identification result. The application can effectively improve the risk early warning capability of the power communication network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power system technology, and in particular to a method and system for risk early warning of power communication networks based on digital twins. Background Technology

[0002] In modern power systems, power communication networks serve as critical support systems, undertaking important functions such as information transmission, data exchange, and communication control. Their secure and stable operation is crucial to the overall performance of the power system. With the continuous expansion of power communication network scale and the increasing complexity of service demands, the network faces various potential risks and challenges, such as network attacks, equipment failures, and traffic congestion. These risks may lead to communication interruptions, data loss or leakage, thereby affecting the normal operation of the power system and dispatch decisions. Therefore, risk analysis of power communication networks is of great significance.

[0003] In recent years, digital twin technology combined with federated learning has been applied to risk analysis of power communication networks. In a digital twin network, operational data from each communication node and device can be collected in real time via sensors and interact with the digital twin model, thereby achieving accurate mapping and prediction of network status. Federated learning allows communication nodes to jointly model without sharing raw data, achieving knowledge sharing by exchanging only model parameters. This not only effectively protects data privacy but also fully utilizes communication data resources distributed across different geographical locations, improving the accuracy and efficiency of risk analysis.

[0004] However, in power communication networks and their digital twin networks, the data acquisition frequency and quality of each communication network element are usually different, resulting in an asymmetry in the number of samples for each client in the federated learning model. This reduces the training effect of the traditional federated learning model, reduces the classification and identification effect of various types of traffic, and ultimately worsens the accuracy of the system's risk warning. Summary of the Invention

[0005] To address the problems encountered when using digital twins and federated learning for risk analysis in power communication networks, this invention provides a method and system for early warning of power communication network risks based on digital twins. This method can effectively overcome the shortcomings of general federated learning, which suffers from poor traffic identification due to asymmetric sample sizes.

[0006] In a first aspect, embodiments of the present invention provide a method for risk early warning of power communication networks based on digital twins, comprising:

[0007] A digital twin network corresponding to the target power communication network is constructed, and subnets are selected for the digital twin network to determine the federated learning architecture corresponding to the target power communication network. The federated learning architecture includes a server and several clients connected to the server, and each client corresponds to a subnet.

[0008] Simulated traffic data is generated based on the digital twin network and transmitted to the federated learning architecture so that each client can obtain corresponding local data. The simulated traffic data includes several simulated traffic data samples, and the local data of each client includes a random number of simulated traffic data samples.

[0009] Based on several iterative training steps, the target global model of the server is obtained. Each iterative training step includes: obtaining the current global model of the server and sending the current global model to each client so that each client trains the current global model based on the corresponding local data; the server aggregates the first global model trained by each client to obtain a second global model and represents the second global model as the current global model.

[0010] Based on the target power communication network, actual traffic data is obtained, the actual traffic data is input into the target global model, and a risk warning is issued based on the obtained traffic identification results, wherein the traffic identification results include normal and abnormal.

[0011] Preferably, the step of constructing a digital twin network corresponding to the target power communication network, selecting subnets within the digital twin network, and determining the federated learning architecture corresponding to the target power communication network includes:

[0012] Based on the topology and bandwidth resource status of the target power communication network, a digital twin network corresponding to the target power communication network is constructed.

[0013] Based on the digital twin network, several subnets carrying service traffic are selected, and each subnet is treated as a client.

[0014] A server is set up that connects to each of the clients, and a federated learning architecture corresponding to the target power communication network is formed based on the server and each of the clients.

[0015] Preferably, the step of generating simulated traffic data based on the digital twin network and transmitting the simulated traffic data to the federated learning architecture so that each client can obtain corresponding local data includes:

[0016] Several types of simulated traffic data are generated based on the digital twin network, wherein the types include normal, abnormal, measurement messages and event messages;

[0017] Based on the transmission process of the simulated traffic data in each of the subnets, the local data obtained by each client is determined.

[0018] Preferably, obtaining the target global model of the server based on several iterative training steps includes:

[0019] Perform several iterative training steps until the current global model reaches a convergence state, and obtain the target global model of the server. The convergence state is that the changes in the parameters of the current global model are within a preset range.

[0020] Preferably, obtaining the current global model from the server and sending the current global model to each client, so that each client trains the current global model based on the corresponding local data, includes:

[0021] Each client performs E local iterations of training on the current global model based on the corresponding local data, where E is an integer ≥ 1;

[0022] Each local iteration of training includes:

[0023] The local data is identified based on the current global model, and a loss function is calculated based on the identification results and the true results, wherein the loss function is used to quantify the degree of difference between the identification results and the true results;

[0024] Based on the loss function, the current global model is updated using the gradient descent optimization algorithm.

[0025] Preferably, the loss function includes the cross-entropy loss function.

[0026] Preferably, the step of aggregating the first global model trained on each client by the server to obtain the second global model includes:

[0027] Based on the number of samples contained in the local data of each client, a first weight factor for the corresponding first global model is determined;

[0028] For each client, a performance evaluation is performed on the first global model to determine the second weight factor corresponding to the first global model;

[0029] The first global model is weighted and aggregated based on the first weight factor and the second weight factor to obtain the second global model.

[0030] Preferably, the first weight factor corresponding to the first global model is calculated using the following formula:

[0031]

[0032] in, This represents the first weight factor of the first global model for the i-th client. This represents the number of samples contained in the local data of the i-th client. This represents the total number of samples contained in the local data of all clients;

[0033] The second weight factor corresponding to the first global model is calculated using the following formula:

[0034]

[0035] in, This represents the second weight factor of the first global model for the i-th client. This represents the recognition accuracy of the first global model for the i-th client. This represents the sum of the recognition accuracy of the first global model across all clients;

[0036] The second global model is characterized by the following formula:

[0037]

[0038] in, This represents the second global model on the server side. This represents the influence factor, which quantifies the server's bias towards a certain number of client samples. This represents the aggregation result of the first global model based on the first weight factor. This represents the aggregation result of the first global model based on the second weighting factor.

[0039] Preferably, the first global model aggregation result based on the first weight factor is calculated using the following formula:

[0040]

[0041] in, This represents the aggregation result of the first global model based on the first weight factor, where N represents the number of clients. This represents the first weight factor of the first global model for the i-th client. This represents the first global model for the i-th client;

[0042] The aggregation result of the first global model based on the second weighting factor is calculated using the following formula:

[0043]

[0044] in, This represents the aggregation result of the first global model based on the second weighting factor. This represents the second weight factor of the first global model for the i-th client.

[0045] Secondly, embodiments of the present invention provide a power communication network risk early warning system based on digital twins, comprising:

[0046] An architecture construction module is used to construct a digital twin network corresponding to a target power communication network, select subnets for the digital twin network, and determine the federated learning architecture corresponding to the target power communication network. The federated learning architecture includes a server and several clients connected to the server, and each client corresponds to a subnet.

[0047] The data transmission module is used to generate simulated traffic data based on the digital twin network and transmit the simulated traffic data to the federated learning architecture so that each client can obtain corresponding local data. The simulated traffic data includes a number of simulated traffic data samples, and the local data of each client includes a random number of simulated traffic data samples.

[0048] An iterative training module is used to obtain the target global model of the server based on several iterative training steps. Each iterative training step includes: obtaining the current global model of the server and sending the current global model to each client so that each client trains the current global model based on the corresponding local data; the server aggregates the first global model trained by each client to obtain a second global model and represents the second global model as the current global model.

[0049] The risk warning module is used to acquire actual traffic data based on the target power communication network, input the actual traffic data into the target global model, and determine whether to issue a risk warning based on the obtained traffic identification results, wherein the traffic identification results include normal and abnormal.

[0050] Compared with existing technologies, the present invention provides a method and system for risk early warning of power communication networks based on digital twins. The advantages of this method and system are as follows: Federated learning is used for traffic identification in power communication networks, and a large amount of training data is generated based on digital twin network simulation. While maintaining low complexity, it achieves near-globally optimal traffic classification and risk early warning performance. By utilizing digital twin networks to acquire and simulate the topology information and state data of the target power communication network, and by employing a weight adjustment strategy based on sample size and model performance to optimize client contributions in federated learning, the effectiveness of collaborative training in federated learning can be guaranteed, enabling automatic identification and risk early warning of abnormal traffic in the target power communication network. Attached Figure Description

[0051] Figure 1 This is a flowchart illustrating a risk early warning method for power communication networks based on digital twins, according to an embodiment of the present invention.

[0052] Figure 2 This is a schematic diagram of the process of constructing a federated learning architecture according to an embodiment of the present invention;

[0053] Figure 3 This is a schematic diagram of the federated learning architecture according to an embodiment of the present invention;

[0054] Figure 4 This is a schematic diagram of the process of the client obtaining local data according to an embodiment of the present invention;

[0055] Figure 5 This is a schematic diagram of the structure of a power communication network risk early warning system based on digital twin according to an embodiment of the present invention. Detailed Implementation

[0056] The specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples. The following examples are for illustrative purposes only and are not intended to limit the scope of the invention.

[0057] In the description of this invention, it should be understood that the terms "first" and "second," etc., are used to distinguish different objects, rather than to describe a specific order.

[0058] In the description of this invention, it should be noted that, unless otherwise defined, all technical and scientific terms used in this invention have the same meaning as commonly understood by those skilled in the art. The terminology used in this specification is for the purpose of describing specific embodiments only and is not intended to limit the invention. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0059] like Figure 1As shown, this embodiment of the invention provides a method for risk early warning of power communication networks based on digital twins, including the following steps:

[0060] S1. Construct a digital twin network corresponding to the target power communication network, select subnets for the digital twin network, and determine the federated learning architecture corresponding to the target power communication network.

[0061] Specifically, such as Figure 2 As shown, step S1 includes:

[0062] S101. Based on the topology and bandwidth resource status of the target power communication network, construct a digital twin network corresponding to the target power communication network;

[0063] Based on the topology and bandwidth resource status of the target power communication network, a digital twin network is constructed using digital twin technology. The rise of digital twin technology provides a new solution for risk analysis of power communication networks. By constructing a virtual mirror of the power communication network, it enables real-time monitoring and simulation analysis of the network status.

[0064] S102. Select several subnets that carry service traffic based on the digital twin network, and treat each subnet as a client.

[0065] Service traffic refers to various service data transmitted in power communication networks, including but not limited to real-time monitoring data, control commands, and video surveillance data of the power system. Based on a digital twin network, multiple subnets with service traffic are selected according to the network topology, and each subnet serves as a client for federated learning.

[0066] S103. Set up a server that connects to each client, and construct a federated learning architecture for the target power communication network based on the server and each client.

[0067] Figure 3 An embodiment of the federated learning architecture of the present invention is shown. The federated learning architecture includes a server and a number of clients connected to the server, each client corresponding to a subnet.

[0068] S2. Generate simulated traffic data based on the digital twin network and transmit the simulated traffic data to the federated learning architecture so that each client can obtain the corresponding local data;

[0069] Specifically, such as Figure 4 As shown, step S2 includes:

[0070] S201. Generate several types of simulated traffic data based on a digital twin network;

[0071] In a digital twin network, various types of traffic data are generated through simulation, namely, several types of simulated traffic data. Specifically, the types include normal, abnormal, measurement messages, and event messages, and the simulated traffic data includes several simulated traffic data samples.

[0072] S202. Based on the simulated traffic data transmission process in each subnet, determine the local data obtained by each client.

[0073] The transmission process of traffic data in each subnet is simulated using a digital twin network. Each subnet collects traffic data at fixed time intervals to determine the local data acquired by each client. Specifically, the local data of each client includes a random number of simulated traffic data samples, with time intervals including but not limited to minutes, hours, days, and weeks.

[0074] S3. Based on several iterative training steps, the target global model of the server is obtained;

[0075] The training process involves several iterations until the current global model reaches convergence, resulting in the target global model for the server. In federated learning, convergence occurs when the parameters of the current global model remain within a preset range, meaning the parameters tend to stabilize.

[0076] Specifically, each iteration of the training process includes:

[0077] 1) Obtain the current global model from the server and send the current global model to each client so that each client can train the current global model based on the corresponding local data;

[0078] It should be noted that in the first iteration of training, the server initializes the global model, which becomes the server's current global model. The initialized global model includes, but is not limited to, decision tree models; any machine learning model suitable for traffic data classification and recognition is acceptable.

[0079] Each client performs E local iterations of training on the current global model based on its corresponding local data. Here, E is an integer ≥ 1, which can be set according to the actual application scenario.

[0080] Specifically, each local iteration of training includes:

[0081] 11) Identify local data based on the current global model, and calculate the loss function based on the identification results and the actual results;

[0082] The client identifies local data based on the current global model and compares the identified results with the true results, quantifying the difference between them using a loss function. In other words, the loss function quantifies the degree of difference between the identified results and the true results. Specifically, the client's loss function includes the cross-entropy loss function.

[0083] 12) Based on the loss function, the gradient descent optimization algorithm is used to update the current global model.

[0084] Based on the loss function, the client uses the gradient descent optimization algorithm to calculate the gradient of the loss function with respect to the current global model parameters, and updates the current global model parameters in the opposite direction to the gradient, so that the value of the loss function gradually decreases, thereby continuously adjusting the current global model parameters in a direction that makes the current global model perform better.

[0085] 2) The server aggregates the first global model trained on each client to obtain the second global model, and represents the second global model as the current global model.

[0086] In traditional federated learning, the global model on the server side is updated by averaging the models of each client, implicitly assuming that each client's contribution to the global model is equally important. However, due to the inherent imbalance of traffic data across nodes in power communication networks, the imbalance of data volume between subnets is also inevitable when digital twin networks simulate various types of traffic data as input to each subnet.

[0087] Specifically, the second global model is obtained by aggregating the first global model trained on each client by the server, including the following steps:

[0088] 21) Determine the first weight factor for the corresponding first global model based on the number of samples contained in the local data of each client;

[0089] Considering that clients with a sufficient number of samples possess sample features that are more representative of the global sample features compared to clients with a smaller number of samples, the models trained on these clients are more generalizable and perform better across the global data distribution. Therefore, this invention assigns higher weights to clients with a sufficient number of samples. In other words, the first weight factor for the model trained on the corresponding client is determined based on the number of samples.

[0090] Specifically, the first weight factor corresponding to the first global model is calculated using the following formula:

[0091]

[0092] in, This represents the first weight factor of the first global model for the i-th client. This represents the number of samples contained in the local data of the i-th client. This represents the total number of samples contained in the local data of all clients.

[0093] Assigning weights to each client based on the ratio of the number of samples to the total number of samples can reflect the importance of different clients, thereby improving the generalization ability of the global model.

[0094] 22) Perform performance evaluation on the first global model for each client and determine the second weight factor corresponding to the first global model;

[0095] Given the uncertainty of traffic destinations in complex power communication networks, clients with high model performance may not necessarily have a large number of data samples. If a client's samples happen to have relatively obvious features, then that client will have a high accuracy rate in identifying various types of traffic data. However, the data distribution of that client's samples cannot represent the global data distribution, therefore the model trained on that client does not have generalization ability.

[0096] Based on the above situation, this invention assigns higher weights to clients with better model performance. In other words, it determines the second weight factor of the model trained on the corresponding client based on performance evaluation.

[0097] Specifically, the second weight factor corresponding to the first global model is calculated using the following formula:

[0098]

[0099] in, This represents the second weight factor of the first global model for the i-th client. This represents the recognition accuracy of the first global model for the i-th client. This represents the sum of the recognition accuracy of the first global model across all clients.

[0100] Assigning weights to each client based on its recognition accuracy as a proportion of the sum of all recognition accuracies can reflect the importance of different clients, thereby improving the generalization ability of the global model.

[0101] 23) Based on the first weight factor and the second weight factor, each first global model is weighted and aggregated to obtain the second global model.

[0102] This invention employs a two-factor adaptive weight allocation strategy that integrates the sample quantity factor and model performance factor of the client, and aggregates the model of each client based on this.

[0103] Specifically, the second global model is characterized by the following formula:

[0104]

[0105] in, This represents the second global model on the server side. This represents the influence factor, which quantifies the server's bias towards a certain number of client samples. This represents the aggregation result of the first global model based on the first weight factor. This represents the aggregation result of the first global model based on the second weighting factor.

[0106] It should be noted that, .when When the sample size is too large, the aggregation model considers more factors related to the number of samples. When the size is too small, more model performance factors need to be considered when using aggregation models. Through analysis of... By adjusting the parameters, a better model aggregation strategy can be found. This embodiment... The value is set to 0.5, which balances the factors of sample size and model performance.

[0107] Furthermore, the aggregation result of the first global model based on the first weight factor is calculated using the following formula:

[0108]

[0109] in, This represents the aggregation result of the first global model based on the first weight factor, where N represents the number of clients. This represents the first weight factor of the first global model for the i-th client. This represents the first global model for the i-th client.

[0110] The aggregation result of the first global model based on the second weighting factor is calculated using the following formula:

[0111]

[0112] in, This represents the aggregation result of the first global model based on the second weighting factor. This represents the second weight factor of the first global model for the i-th client.

[0113] S4. Obtain actual traffic data based on the target power communication network, input the actual traffic data into the target global model, and determine whether to issue a risk warning based on the obtained traffic identification results.

[0114] Traffic identification results can be categorized as normal or abnormal. When abnormal traffic is detected in the traffic identification results, a risk warning will be issued.

[0115] The effectiveness of a risk early warning method for power communication networks based on digital twins according to an embodiment of the present invention will be specifically explained below:

[0116] Table 1 shows the traffic identification accuracy of each client under different data imbalance conditions using the traditional average aggregation method. The last row shows the performance degradation of the model under different levels of data imbalance compared to data balance. The order of data imbalance is: Case 3 > Case 2 > Case 1.

[0117] Table 1. Client-side recognition accuracy under different data imbalance conditions

[0118]

[0119] As shown in Table 1, in scenario 1, the data imbalance among clients is relatively minor. Compared to the scenario with balanced data, the recognition accuracy of each client decreases slightly, with an average decrease of 4.92%. In scenario 2, compared to the scenario with balanced data, the recognition accuracy of each client decreases significantly, with an average decrease of 11.4%. Because the data imbalance in scenario 2 is more severe than in scenario 1, the model performance in scenario 2 is 6.48% lower than in scenario 1. Scenario 3 has the highest degree of data imbalance, and the recognition accuracy of each client is the lowest. The average recognition accuracy in scenario 3 is 20.68% lower than the average recognition accuracy under balanced data, a 15.76% decrease in model performance compared to scenario 1, and a 9.28% decrease in model performance compared to scenario 2.

[0120] In summary, the imbalance in the number of samples among clients has a certain impact on model performance, and the model performance decreases as the imbalance among clients increases. That is, the higher the data imbalance among clients, the lower the recognition accuracy of the model trained on each client.

[0121] Table 2 shows the traffic identification accuracy of different clients under different data imbalance conditions when using a two-factor adaptive weight allocation strategy based on the number of client samples and model performance. The degree of data imbalance is ranked as follows: Case 3 > Case 2 > Case 1.

[0122] Table 2 Client-side recognition accuracy under different data imbalance conditions

[0123]

[0124] As shown in Table 2, after adopting the two-factor adaptive weight allocation strategy, the average recognition accuracy of each client in the imbalanced environment of Case 1 increased by 3.61% compared to Table 1; and the average recognition accuracy of each client in Case 3 increased by 15.10% compared to Table 1. After using the two-factor adaptive weight allocation strategy to allocate weights to the clients, the performance of the global model in different degrees of data imbalance on each client was significantly improved. Moreover, the average recognition accuracy of the model on each client in Table 2 is better than that listed in Table 1. This indicates that the weight allocation strategy, which takes into account the influence of the number of samples on each client and the model performance, can further optimize the recognition performance of the model, and thus effectively improve the risk warning capability of the power communication network.

[0125] This invention discloses a risk warning method for power communication networks based on digital twins. Federated learning is used for traffic identification in power communication networks, and a large amount of training data is generated based on digital twin network simulation. While maintaining low complexity, it achieves near-globally optimal traffic classification and risk warning performance. The method utilizes digital twin networks to acquire and simulate the topology and state data of the target power communication network, and employs a weight adjustment strategy based on sample size and model performance to optimize client contributions in federated learning. This ensures the effectiveness of collaborative training in federated learning and enables automatic identification and risk warning of abnormal traffic in the target power communication network.

[0126] Based on the above-mentioned digital twin-based risk early warning method for power communication networks, such as Figure 5 As shown, this embodiment of the invention provides a power communication network risk early warning system based on digital twins, comprising:

[0127] Architecture building module 1 is used to build a digital twin network corresponding to the target power communication network, select subnets for the digital twin network, and determine the federated learning architecture corresponding to the target power communication network. The federated learning architecture includes a server and several clients connected to the server, with each client corresponding to a subnet.

[0128] Data transmission module 2 is used to generate simulated traffic data based on the digital twin network and transmit the simulated traffic data to the federated learning architecture so that each client can obtain the corresponding local data. The simulated traffic data includes several simulated traffic data samples, and the local data of each client includes a random number of simulated traffic data samples.

[0129] Iterative training module 3 is used to obtain the target global model of the server based on several iterative training steps. Each iterative training step includes: obtaining the current global model of the server and sending the current global model to each client so that each client trains the current global model based on the corresponding local data; the server aggregates the first global model trained by each client to obtain the second global model and represents the second global model as the current global model.

[0130] Risk warning module 4 is used to obtain actual traffic data based on the target power communication network, input the actual traffic data into the target global model, and determine whether to issue a risk warning based on the obtained traffic identification results. The traffic identification results include normal and abnormal.

[0131] It should be noted that each module in the aforementioned digital twin-based power communication network risk early warning system can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module. For specific limitations regarding the digital twin-based power communication network risk early warning system, please refer to the limitations of the digital twin-based power communication network risk early warning method mentioned above; both have the same function and role, and will not be repeated here.

[0132] In summary, the present invention provides a method and system for risk early warning of power communication networks based on digital twins. This method utilizes federated learning for traffic identification in power communication networks and generates a large amount of training data based on digital twin network simulation. While maintaining low complexity, it achieves near-globally optimal traffic classification and risk early warning performance. By acquiring and simulating the topology and state data of the target power communication network using a digital twin network, and employing a weight adjustment strategy based on sample size and model performance to optimize client contributions in federated learning, the effectiveness of collaborative training in federated learning can be guaranteed, enabling automatic identification and risk early warning of abnormal traffic in the target power communication network.

[0133] The various embodiments in this specification are described in a progressive manner. For directly identical or similar parts of the embodiments, refer to each other. Each embodiment focuses on its differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments. It should be noted that the technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification.

[0134] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and substitutions can be made without departing from the technical principles of the present invention, and these improvements and substitutions should also be considered within the scope of protection of the present invention.

Claims

1. A risk early warning method for power communication networks based on digital twins, characterized in that, include: A digital twin network corresponding to the target power communication network is constructed, and subnets are selected for the digital twin network to determine the federated learning architecture corresponding to the target power communication network. The federated learning architecture includes a server and several clients connected to the server, and each client corresponds to a subnet. Simulated traffic data is generated based on the digital twin network, and the simulated traffic data is transmitted to the federated learning architecture so that each client can obtain the corresponding local data. Based on several iterative training steps, the target global model of the server is obtained. Each iterative training step includes: obtaining the current global model of the server and sending the current global model to each client so that each client trains the current global model based on the corresponding local data; the server aggregates the first global model trained by each client to obtain a second global model and represents the second global model as the current global model. Based on the target power communication network, actual traffic data is obtained, the actual traffic data is input into the target global model, and a risk warning is issued based on the obtained traffic identification results. The step of aggregating the first global model trained on each client by the server to obtain the second global model includes: Based on the number of samples contained in the local data of each client, a first weight factor for the corresponding first global model is determined; For each client, a performance evaluation is performed on the first global model to determine the second weight factor corresponding to the first global model; Based on the first weighting factor and the second weighting factor, each of the first global models is weighted and aggregated to obtain the second global model; The first weight factor of the corresponding first global model is calculated using the following formula: in, This represents the first weight factor of the first global model for the i-th client. This represents the number of samples contained in the local data of the i-th client. This represents the total number of samples contained in the local data of all clients; The second weight factor corresponding to the first global model is calculated using the following formula: in, This represents the second weight factor of the first global model for the i-th client. This represents the recognition accuracy of the first global model for the i-th client. This represents the sum of the recognition accuracy of the first global model across all clients.

2. The power communication network risk early warning method according to claim 1, characterized in that, The process of constructing a digital twin network corresponding to the target power communication network, selecting subnets within the digital twin network, and determining the federated learning architecture corresponding to the target power communication network includes: Based on the topology and bandwidth resource status of the target power communication network, a digital twin network corresponding to the target power communication network is constructed. Based on the digital twin network, several subnets carrying service traffic are selected, and each subnet is treated as a client. A server is set up that connects to each of the clients, and a federated learning architecture corresponding to the target power communication network is formed based on the server and each of the clients.

3. The power communication network risk early warning method according to claim 1, characterized in that, The process of generating simulated traffic data based on the digital twin network and transmitting the simulated traffic data to the federated learning architecture, so that each client can obtain corresponding local data, includes: Several types of simulated traffic data are generated based on the digital twin network, wherein the types include normal, abnormal, measurement messages and event messages; Based on the transmission process of the simulated traffic data in each of the subnets, the local data obtained by each client is determined.

4. The power communication network risk early warning method according to claim 1, characterized in that, The process of obtaining the target global model of the server based on several iterative training steps includes: Perform several iterative training steps until the current global model reaches a convergence state, and obtain the target global model of the server. The convergence state is that the changes in the parameters of the current global model are within a preset range.

5. The power communication network risk early warning method according to claim 1, characterized in that, The step of obtaining the current global model from the server and sending the current global model to each client, so that each client trains the current global model based on the corresponding local data, includes: Each client performs E local iterations of training on the current global model based on the corresponding local data, where E is an integer ≥ 1; Each local iteration of training includes: The local data is identified based on the current global model, and a loss function is calculated based on the identification results and the true results, wherein the loss function is used to quantify the degree of difference between the identification results and the true results; Based on the loss function, the current global model is updated using the gradient descent optimization algorithm.

6. The power communication network risk early warning method according to claim 5, characterized in that, The loss function includes the cross-entropy loss function.

7. The power communication network risk early warning method according to claim 1, characterized in that, The second global model is characterized by the following formula: in, This represents the second global model on the server side. This represents the influence factor, which quantifies the server's bias towards a certain number of client samples. This represents the aggregation result of the first global model based on the first weight factor. This represents the aggregation result of the first global model based on the second weighting factor.

8. The power communication network risk early warning method according to claim 7, characterized in that, The first global model aggregation result based on the first weight factor is calculated using the following formula: in, This represents the aggregation result of the first global model based on the first weight factor, where N represents the number of clients. This represents the first weight factor of the first global model for the i-th client. This represents the first global model for the i-th client; The aggregation result of the first global model based on the second weighting factor is calculated using the following formula: in, This represents the aggregation result of the first global model based on the second weighting factor. This represents the second weight factor of the first global model for the i-th client.

9. A risk early warning system for power communication networks based on digital twins, characterized in that, The method for risk early warning of power communication networks based on digital twins as described in any one of claims 1 to 8 includes: An architecture construction module is used to construct a digital twin network corresponding to a target power communication network, select subnets for the digital twin network, and determine the federated learning architecture corresponding to the target power communication network. The federated learning architecture includes a server and several clients connected to the server, and each client corresponds to a subnet. The data transmission module is used to generate simulated traffic data based on the digital twin network and transmit the simulated traffic data to the federated learning architecture so that each client can obtain the corresponding local data. An iterative training module is used to obtain the target global model of the server based on several iterative training steps. Each iterative training step includes: obtaining the current global model of the server and sending the current global model to each client so that each client trains the current global model based on the corresponding local data; the server aggregates the first global model trained by each client to obtain a second global model and represents the second global model as the current global model. The risk warning module is used to obtain actual traffic data based on the target power communication network, input the actual traffic data into the target global model, and determine whether to issue a risk warning based on the obtained traffic identification results. The step of aggregating the first global model trained on each client by the server to obtain the second global model includes: Based on the number of samples contained in the local data of each client, a first weight factor for the corresponding first global model is determined; For each client, a performance evaluation is performed on the first global model to determine the second weight factor corresponding to the first global model; The first global model is weighted and aggregated based on the first weight factor and the second weight factor to obtain the second global model.