Electric power communication network risk early warning method and system based on digital twinning
By building a digital twin network and a federated learning architecture in the power communication network, the weight adjustment strategy of client contribution is optimized, and the problem of asymmetry in sample count is solved, and efficient traffic identification and risk warning performance is achieved.
Patent Information
- Application Number
- CN202510541798.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-28
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2045-04-28
AI Technical Summary
In the power communication network and its digital twin network, there are differences in the data acquisition frequency and quality of each communication network element, resulting in asymmetric sample counts of each client in the federated learning model, reducing the training effect and risk warning accuracy of the traditional federated learning model.
By building a digital twin network and federated learning architecture of the target power communication network, simulated traffic data is generated and iterative training is performed, and the weight adjustment strategy contributed by the client is optimized to achieve traffic identification and risk warning of the target power communication network.
While having low complexity, it achieves traffic classification identification and risk warning performance that is approaching the global optimal, ensures the effectiveness of federated learning collaborative training, and realizes automatic identification and risk warning of abnormal traffic of the target power communication network.
Smart Images

Figure CN120110941A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power systems, and in particular to a power communication network risk early warning method and system based on digital twins. Background Art
[0002] In modern power systems, power communication networks, as key support systems, undertake important functions such as information transmission, data exchange and communication control. Their safe and stable operation is crucial to the overall performance of the power system. With the continuous expansion of the scale of power communication networks and the increasing complexity of business needs, 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, and thus affect the normal operation and dispatching decisions of the power system. Therefore, it is of great significance to conduct risk analysis on power communication networks.
[0003] In recent years, digital twin technology has been combined with federated learning for risk analysis of power communication networks. In a digital twin network, the operating data of each communication node and device can be collected in real time through sensors and interact with the digital twin model to achieve accurate mapping and prediction of the network status. Federated learning allows each communication node to perform joint modeling without sharing the original data, and to achieve knowledge sharing by exchanging only model parameters. It can not only effectively protect data privacy, but also make full use of communication data resources distributed in different geographical locations, improving the accuracy and efficiency of risk analysis.
[0004] However, in the power communication network and its digital twin network, there are usually differences in the data collection frequency and quality of each communication network element, resulting in an asymmetric 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 system's risk warning accuracy. Summary of the invention
[0005] In response to the problems encountered when digital twins and federated learning are used for risk analysis of power communication networks, the present invention provides a power communication network risk warning method and system based on digital twins, which can effectively overcome the defect of poor traffic identification effect caused by the asymmetric number of samples in general federated learning.
[0006] In a first aspect, an embodiment of the present invention provides a risk warning method for a power communication network based on digital twins, comprising: Construct a digital twin network corresponding to the target power communication network, select a subnet for the digital twin network, and determine a federated learning architecture corresponding to the target power communication network, wherein the federated learning architecture includes a server and a plurality of clients connected to the server, and each of the clients corresponds to a subnet; Generate simulated traffic data based on the digital twin network, and transmit the simulated traffic data to the federated learning architecture, so that each of the clients obtains corresponding local data, wherein the simulated traffic data includes a number of simulated traffic data samples, and the local data of each of the clients includes a random number of simulated traffic data samples; Based on several iterative training steps, a target global model of the server is obtained, wherein each iterative training step includes: obtaining a current global model of the server, and sending the current global model to each of the clients, so that each of the clients trains the current global model based on the corresponding local data, aggregating the first global model trained by each of the clients through the server to obtain a second global model, and characterizing the second global model as the current global model; Actual flow data is acquired based on the target power communication network, the actual flow data is input into the target global model, and it is determined whether to issue a risk warning alarm according to the obtained flow identification result, wherein the flow identification result includes normal and abnormal.
[0007] Preferably, the step of constructing a digital twin network corresponding to the 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 includes: Based on the topological relationship and bandwidth resource status of the target power communication network, construct a digital twin network corresponding to the target power communication network; Selecting several subnets that carry business traffic based on the digital twin network, and treating each of the subnets as a client; A server connected to each of the clients is provided, and a federated learning architecture corresponding to the target power communication network is constructed based on the server and each of the clients.
[0008] Preferably, generating simulated traffic data based on the digital twin network and transmitting the simulated traffic data to the federated learning architecture so that each of the clients obtains corresponding local data includes: Generating several types of simulated traffic data 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 acquired by each of the clients is determined.
[0009] Preferably, the target global model of the server is obtained based on several iterative training steps, including: Perform several iterative training steps until the current global model reaches a convergence state, thereby obtaining the target global model of the server, wherein the convergence state means that the change of the current global model parameters is within a preset range.
[0010] Preferably, obtaining the current global model of the server and sending the current global model to each of the clients so that each of the clients trains the current global model based on the corresponding local data includes: Each of the clients performs E local iterative training on the current global model based on the corresponding local data, where E is an integer ≥ 1; The process of each local iterative training includes: Recognize the local data based on the current global model, and calculate a loss function according to the recognition result and the true result, wherein the loss function is used to quantify the degree of difference between the recognition result and the true result; Based on the loss function, a gradient descent optimization algorithm is used to update the current global model.
[0011] Preferably, the loss function comprises a cross entropy loss function.
[0012] Preferably, the step of aggregating the first global model obtained by training each of the clients through the server to obtain the second global model includes: Determine a first weight factor corresponding to the first global model based on the number of samples included in the local data of each of the clients; Performing a performance evaluation on the first global model of each of the clients to determine a second weight factor corresponding to the first global model; Each of the first global models is weightedly aggregated based on the first weight factor and the second weight factor to obtain a second global model.
[0013] Preferably, the first weight factor corresponding to the first global model is calculated using the following formula: in, represents the first weight factor of the first global model of the i-th client, Indicates the number of samples contained in the local data of the i-th client, Indicates 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, represents the second weight factor of the first global model for the i-th client, represents the recognition accuracy of the first global model of the i-th client, represents the sum of the recognition accuracy of the first global model of all clients; The second global model is characterized by the following formula: in, Represents the second global model of the server, Represents the impact factor, which is used to quantify the server's preference for the number of client samples. represents the first global model aggregation result based on the first weight factor, Represents the aggregation result of the first global model based on the second weight factor.
[0014] Preferably, the first global model aggregation result based on the first weight factor is calculated using the following formula: in, represents the aggregation result of the first global model based on the first weight factor, N represents the number of clients, represents the first weight factor of the first global model of the i-th client, represents the first global model of the i-th client; The first global model aggregation result based on the second weight factor is calculated using the following formula: in, represents the aggregation result of the first global model based on the second weight factor, represents the second weight factor of the first global model for the ith client.
[0015] In a second aspect, an embodiment of the present invention provides a power communication network risk early warning system based on digital twins, including: An architecture construction module, used to construct a digital twin network corresponding to a target power communication network, and select a subnet for the digital twin network to determine a federated learning architecture corresponding to the target power communication network, wherein the federated learning architecture includes a server and a plurality of clients connected to the server, and each of the clients corresponds to a subnet; A data transmission module, 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 of the clients obtains corresponding local data, wherein the simulated traffic data includes a plurality of simulated traffic data samples, and the local data of each of the clients includes a random number of simulated traffic data samples; An iterative training module is used to obtain the target global model of the server based on several iterative training steps, wherein each iterative training step includes: obtaining the current global model of the server, and sending the current global model to each of the clients, so that each of the clients trains the current global model based on the corresponding local data, aggregating the first global model trained by each of the clients through the server to obtain a second global model, and representing the second global model as the current global model; A risk warning module is used to obtain actual flow data based on the target power communication network, input the actual flow data into the target global model, and determine whether to issue a risk warning alarm based on the obtained flow identification results, wherein the flow identification results include normal and abnormal.
[0016] Compared with the prior art, the embodiment of the present invention provides a method and system for risk warning of electric power communication network based on digital twin, and its beneficial effects are: using federated learning for traffic identification of electric power communication network, and generating a large amount of training data based on digital twin network simulation, while having low complexity, it is possible to obtain traffic classification identification and risk warning performance close to the global optimum; using the digital twin network to obtain and simulate the topology information and status data of the target electric power communication network, and adopting a weight adjustment strategy based on the number of samples and model performance to optimize the client contribution in federated learning, which can ensure the effectiveness of federated learning collaborative training and realize automatic identification of abnormal traffic in the target electric power communication network and risk warning. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 It is a flow chart of a method for early warning of electric power communication network risks based on digital twins according to an embodiment of the present invention; Figure 2 It is a schematic diagram of a process of constructing a federated learning architecture according to an embodiment of the present invention; Figure 3 is a schematic diagram of a federated learning architecture according to an embodiment of the present invention; Figure 4 This is a schematic diagram of a process for a client to obtain local data according to an embodiment of the present invention; Figure 5 It is a structural schematic diagram of a power communication network risk early warning system based on digital twins according to an embodiment of the present invention. DETAILED DESCRIPTION
[0018] The specific implementation of the present invention is further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.
[0019] In the description of the present invention, it should be understood that the terms "first" and "second" etc. are used in the present invention to distinguish different objects rather than to describe a specific order.
[0020] In the description of the present invention, it should be noted that, unless otherwise defined, all technical and scientific terms used in the present invention have the same meaning as those commonly understood by those skilled in the art. The terms used in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood by specific circumstances.
[0021] like Figure 1 As shown, an embodiment of the present invention provides a power communication network risk warning method based on digital twins, comprising the steps of: S1. 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; Specifically, if Figure 2 As shown, step S1 includes: S101. Based on the topological relationship and bandwidth resource status of the target power communication network, construct a digital twin network corresponding to the target power communication network; Based on the topological relationship and bandwidth resource state of the target power communication network, digital twin technology is used to build a digital twin network corresponding to the target power communication network. The rise of digital twin technology provides new solutions for risk analysis of power communication networks. By building virtual mirrors of power communication networks, it can realize real-time monitoring and simulation analysis of network status.
[0022] S102. Select several subnets that carry business traffic based on the digital twin network, and use each subnet as a client; Service traffic is various service data transmitted in the power communication network, including but not limited to real-time monitoring data, control instructions and video surveillance data of the power system. Based on the digital twin network, multiple subnets with service traffic are selected according to the network topology relationship, and each subnet serves as a client for federated learning.
[0023] S103, setting a server connected to each client, and constructing a federated learning architecture corresponding to the target power communication network based on the server and each client.
[0024] Figure 3 An embodiment of a federated learning architecture of the present invention is shown. The federated learning architecture includes a server and several clients connected to the server, and each client corresponds to a subnet.
[0025] 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; Specifically, Figure 4 As shown, step S2 includes: S201. Generate several types of simulated traffic data based on the digital twin network; In the digital twin network, simulation generates multiple types of traffic data, 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.
[0026] S202: Determine the local data acquired by each client based on the transmission process of the simulated traffic data in each subnet.
[0027] The digital twin network simulates the transmission process of traffic data in each subnet, and each subnet collects traffic data at a fixed time interval to determine the local data obtained by each client. Specifically, the local data of each client includes a random number of simulated traffic data samples, and the time interval units include but are not limited to minutes, hours, days and weeks.
[0028] S3, based on several iterative training steps, obtain the target global model of the server; Perform several iterative training steps until the current global model reaches a convergence state and obtains the target global model on the server. In federated learning, the convergence state means that the change of the current global model parameters is within the preset range, that is, the current global model parameters tend to a stable value.
[0029] Specifically, each iterative training step includes: 1) Obtain the current global model from the server and send it to each client, so that each client can train the current global model based on the corresponding local data; It should be noted that in the first iteration training, the server initializes the global model and uses the initialized global model as the current global model of the server. The initialized global model includes but is not limited to a decision tree model and any machine learning model suitable for traffic data classification and recognition.
[0030] Each client performs E local iteration training on the current global model based on the corresponding local data, where E is an integer ≥ 1, which can be set according to the actual application scenario.
[0031] Specifically, each local iterative training process includes: 11) Identify local data based on the current global model and calculate the loss function based on the identification results and the true results; The client identifies local data based on the current global model, compares the obtained recognition results with the true results, and quantifies the difference between the two through a loss function. That is to say, the loss function is used to quantify the degree of difference between the recognition results and the true results. Specifically, the loss function of the client includes the cross-entropy loss function.
[0032] 12) Based on the loss function, use the gradient descent optimization algorithm to update the current global model.
[0033] 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 parameters of the current global model, and updates the parameters of the current global model in the direction opposite to the gradient, so that the value of the loss function gradually decreases, thereby making the parameters of the current global model continuously adjust in the direction that can make the current global model perform better.
[0034] 2) Aggregate the first global model trained by each client through the server to obtain a second global model, and represent the second global model as the current global model.
[0035] In traditional federated learning, the global model of the server is updated by averaging and aggregating the models of each client, with the potential assumption that the contribution of each client to the global model is equally important. However, due to the natural imbalance of traffic data in the power communication network, when the digital twin network simulates various types of traffic data as input and enters each subnet, it is inevitable that the problem of uneven data volume in each subnet will occur.
[0036] Specifically, aggregating the first global model trained by each client through the server to obtain a second global model includes the steps: 21) Based on the number of samples included in the local data of each client, determine the first weight factor corresponding to the first global model; Considering that clients with sufficient sample numbers have sample characteristics that are more representative of the global sample characteristics compared to clients with fewer samples, the model trained by this client is more general and has better performance for the global data distribution. Therefore, the present invention assigns a higher weight to clients with sufficient sample numbers. That is to say, determine the first weight factor of the model trained by the corresponding client based on the number of samples.
[0037] Specifically, use the following formula to calculate the first weight factor corresponding to the first global model: Among them, represents the first weight factor of the first global model of the i-th client, represents the number of samples included in the local data of the i-th client, Indicates the total number of samples contained in the local data of all clients.
[0038] Assigning weights to each client according to the ratio of its sample number to the sum of all sample numbers can reflect the importance of different clients, thereby improving the generalization ability of the global model.
[0039] 22) performing a performance evaluation on the first global model of each client and determining a second weight factor corresponding to the first global model; Considering the uncertainty of the transmission destination of traffic in the complex power communication network, the client with good model performance does not necessarily have more data samples. If the sample of a client happens to have more obvious characteristics, the recognition accuracy of the client for various types of traffic data is higher. However, the data distribution of the client sample cannot represent the global data distribution, so the model trained by the client does not have generalization ability.
[0040] Based on the above situation, the present invention assigns a higher weight to the client with better model performance. In other words, the second weight factor of the model trained by the corresponding client is determined based on the performance evaluation.
[0041] Specifically, the second weight factor corresponding to the first global model is calculated using the following formula: in, represents the second weight factor of the first global model for the i-th client, represents the recognition accuracy of the first global model of the i-th client, Represents the sum of the recognition accuracy of the first global model of all clients.
[0042] Assigning weights to each client according to the ratio of its recognition accuracy to the sum of all recognition accuracy rates can reflect the importance of different clients, thereby improving the generalization ability of the global model.
[0043] 23) Performing weighted aggregation on each first global model based on the first weight factor and the second weight factor to obtain a second global model.
[0044] The present invention adopts a dual-factor adaptive weight allocation strategy, which integrates the sample quantity factor of the client and the model performance factor, and aggregates the model of each client on this basis.
[0045] Specifically, the second global model is characterized by the following formula: in, Represents the second global model of the server, Represents the impact factor, which is used to quantify the server's preference for the number of client samples. represents the first global model aggregation result based on the first weight factor, Represents the aggregation result of the first global model based on the second weight factor.
[0046] It should be noted that .when When it is too large, more sample size factors are considered in the aggregation model. When the value is too small, more model performance factors need to be considered when aggregating the model. By adjusting the model aggregation strategy, a better model aggregation strategy can be found. The value of is 0.5, which can balance the sample quantity factor and model performance factor.
[0047] Furthermore, the first global model aggregation result based on the first weight factor is calculated using the following formula: in, represents the aggregation result of the first global model based on the first weight factor, N represents the number of clients, represents the first weight factor of the first global model of the i-th client, represents the first global model of the i-th client.
[0048] The first global model aggregation result based on the second weight factor is calculated using the following formula: in, represents the aggregation result of the first global model based on the second weight factor, represents the second weight factor of the first global model for the ith client.
[0049] S4. Acquire actual flow data based on the target power communication network, input the actual flow data into the target global model, and determine whether to issue a risk warning alarm based on the obtained flow identification results.
[0050] Traffic identification results include normal and abnormal traffic. When the traffic identification results contain abnormal traffic, a risk warning alarm is issued.
[0051] The effectiveness of a power communication network risk warning method based on digital twins in an embodiment of the present invention is specifically described below: Table 1 shows the traffic recognition accuracy of each client under different data imbalance conditions using the traditional average aggregation method. The last row shows the degradation of model performance under different data imbalance levels compared to data balance. The relationship between the degree of data imbalance is: Case 3 > Case 2 > Case 1.
[0052] Table 1 Client recognition accuracy under different data imbalance conditions As shown in Table 1, in the scenario of case 1, the data imbalance between clients is relatively mild. Compared with the case under data balance, the recognition accuracy of each client is slightly reduced, and the average recognition accuracy is reduced by 4.92%; in the scenario of case 2, compared with the case under data balance, the recognition accuracy of each client is greatly reduced, and the average recognition accuracy is reduced by 11.4%. Since the data imbalance degree of case 2 is more serious than that of case 1, the model performance of case 2 is 6.48% lower than that of case 1; the data imbalance degree of case 3 is the highest, and the recognition accuracy of each client is the lowest. The average recognition accuracy of case 3 is 20.68% lower than that of the average recognition accuracy under data balance, which is 15.76% lower than the model performance of case 1 and 9.28% lower than that of case 2.
[0053] In summary, the imbalance in the number of samples between clients has a certain impact on the model performance, and the model performance decreases as the imbalance degree of the clients increases. That is, the higher the data imbalance between clients, the lower the recognition accuracy of the finally trained model in each client.
[0054] Table 2 shows the traffic identification accuracy of different clients under different data imbalance conditions when using the dual-factor adaptive weight allocation strategy based on the client sample quantity factor and the model performance factor. Among them, the relationship between the degree of data imbalance is: case 3> case 2> case 1.
[0055] Table 2 Client recognition accuracy under different data imbalance conditions 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 with that in Table 1; the average recognition accuracy of each client in case 3 increased by 15.10% compared with that in 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 is significantly improved, and the average recognition accuracy of the model on each client in Table 2 is better than that listed in Table 1, indicating that the weight allocation strategy that comprehensively considers the number of samples of each client and the influence of model performance can further optimize the recognition performance of the model, and thus can effectively improve the risk warning capability of the power communication network.
[0056] The embodiment of the present invention is a risk warning method for electric power communication network based on digital twin. Federated learning is used for traffic identification of electric power communication network, and a large amount of training data is generated based on digital twin network simulation. While having low complexity, it is possible to obtain traffic classification identification and risk warning performance close to the global optimum. The digital twin network is used to obtain and simulate the topology information and status data of the target electric power communication network, and a weight adjustment strategy based on the number of samples and model performance is adopted to optimize the client contribution in federated learning. This can ensure the effectiveness of federated learning collaborative training and realize automatic identification of abnormal traffic in the target electric power communication network and risk warning.
[0057] Based on the above-mentioned digital twin-based power communication network risk warning method, Figure 5 As shown, an embodiment of the present invention provides a power communication network risk early warning system based on digital twins, including: Architecture construction module 1 is used to construct a digital twin network corresponding to the target power communication network, select a subnet for the digital twin network, and determine the federated learning architecture corresponding to the target power communication network, wherein the federated learning architecture includes a server and a number of clients connected to the server, and each client corresponds to a subnet; Data transmission module 2, 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 obtains corresponding local data, wherein 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; Iterative training module 3 is used to obtain the target global model of the server based on several iterative training steps, wherein 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, aggregating the first global model trained by each client through the server to obtain a second global model, and characterizing the second global model as the current global model; The risk warning module 4 is used to obtain actual flow data based on the target power communication network, input the actual flow data into the target global model, and determine whether to issue a risk warning alarm based on the obtained flow identification results, wherein the flow identification results include normal and abnormal.
[0058] It should be noted that each module in the above-mentioned power communication network risk warning system based on digital twins can be fully or partially implemented by software, hardware and their combination. The above-mentioned modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to the above modules. For the specific definition of a power communication network risk warning system based on digital twins, please refer to the definition of a power communication network risk warning method based on digital twins above. The two have the same functions and effects, which will not be repeated here.
[0059] In summary, the embodiment of the present invention provides a method and system for risk warning of a power communication network based on digital twins. Federated learning is used for traffic identification of a power communication network, and a large amount of training data is generated based on digital twin network simulation. While having low complexity, it is possible to obtain traffic classification identification and risk warning performance that is close to the global optimum. The digital twin network is used to obtain and simulate the topology information and status data of the target power communication network, and a weight adjustment strategy based on the number of samples and model performance is adopted to optimize the client contribution in federated learning. This can ensure the effectiveness of federated learning collaborative training and realize automatic identification of abnormal traffic in the target power communication network and risk warning.
[0060] Each embodiment in this specification is described in a progressive manner, and the same or similar parts of each embodiment can be directly referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. It should be noted that the technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above-mentioned embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0061] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and substitutions can be made without departing from the technical principles of the present invention. These improvements and substitutions should also be regarded as the scope of protection of the present invention.
Claims
1. A power communication network risk early warning method based on digital twins, characterized in that: include: Construct a digital twin network corresponding to the target power communication network, select a subnet for the digital twin network, and determine a federated learning architecture corresponding to the target power communication network, wherein the federated learning architecture includes a server and a plurality of clients connected to the server, and each of the clients corresponds to a subnet; Generate simulated traffic data based on the digital twin network, and transmit the simulated traffic data to the federated learning architecture so that each of the clients obtains corresponding local data; Based on several iterative training steps, a target global model of the server is obtained, wherein each iterative training step includes: obtaining a current global model of the server, and sending the current global model to each of the clients, so that each of the clients trains the current global model based on the corresponding local data, aggregating the first global model trained by each of the clients through the server to obtain a second global model, and characterizing the second global model as the current global model; Actual flow data is acquired based on the target power communication network, the actual flow data is input into the target global model, and it is determined whether to issue a risk warning alarm according to the obtained flow identification result.
2. The power communication network risk early warning method according to claim 1 is characterized in that: The step of constructing a digital twin network corresponding to the 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 includes: Based on the topological relationship and bandwidth resource status of the target power communication network, construct a digital twin network corresponding to the target power communication network; Selecting several subnets that carry business traffic based on the digital twin network, and treating each of the subnets as a client; A server connected to each of the clients is provided, 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 is characterized in that: The generating of simulated traffic data based on the digital twin network and transmitting the simulated traffic data to the federated learning architecture so that each of the clients obtains corresponding local data includes: Generate several types of simulated traffic data 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 of the clients is determined.
4. The power communication network risk early warning method according to claim 1 is characterized in that: The target global model of the server is obtained based on several iterative training steps, including: Perform several iterative training steps until the current global model reaches a convergence state, thereby obtaining the target global model of the server, wherein the convergence state means that the change of the current global model parameters is within a preset range.
5. The power communication network risk early warning method according to claim 1 is characterized in that: The obtaining of the current global model of the server and sending the current global model to each of the clients so that each of the clients trains the current global model based on the corresponding local data includes: Each of the clients performs E local iterative training on the current global model based on the corresponding local data, where E is an integer ≥ 1; The process of each local iterative training includes: Recognize the local data based on the current global model, and calculate a loss function according to the recognition result and the true result, wherein the loss function is used to quantify the degree of difference between the recognition result and the true result; Based on the loss function, a gradient descent optimization algorithm is used to update the current global model.
6. The power communication network risk early warning method according to claim 5 is characterized in that: The loss function includes a cross entropy loss function.
7. The power communication network risk early warning method according to claim 1 is characterized in that: The step of aggregating the first global model obtained by training each of the clients through the server to obtain the second global model includes: Determine a first weight factor corresponding to the first global model based on the number of samples included in the local data of each of the clients; Performing a performance evaluation on the first global model of each of the clients to determine a second weight factor corresponding to the first global model; Each of the first global models is weightedly aggregated based on the first weight factor and the second weight factor to obtain a second global model.
8. The power communication network risk early warning method according to claim 7 is characterized in that: The first weight factor corresponding to the first global model is calculated using the following formula: in, represents the first weight factor of the first global model of the i-th client, Indicates the number of samples contained in the local data of the i-th client, Indicates 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, represents the second weight factor of the first global model for the i-th client, represents the recognition accuracy of the first global model of the i-th client, represents the sum of the recognition accuracy of the first global model of all clients; The second global model is characterized by the following formula: in, Represents the second global model of the server, Represents the impact factor, which is used to quantify the server's preference for the number of client samples. represents the first global model aggregation result based on the first weight factor, Represents the aggregation result of the first global model based on the second weight factor.
9. The power communication network risk early warning method according to claim 8, characterized in that: The first global model aggregation result based on the first weight factor is calculated using the following formula: in, represents the aggregation result of the first global model based on the first weight factor, N represents the number of clients, represents the first weight factor of the first global model of the i-th client, represents the first global model of the i-th client; The first global model aggregation result based on the second weight factor is calculated using the following formula: in, represents the aggregation result of the first global model based on the second weight factor, represents the second weight factor of the first global model for the ith client.
10. A power communication network risk early warning system based on digital twins, characterized in that: include: An architecture construction module, used to construct a digital twin network corresponding to a target power communication network, and select a subnet for the digital twin network to determine a federated learning architecture corresponding to the target power communication network, wherein the federated learning architecture includes a server and a plurality of clients connected to the server, and each of the clients corresponds to a subnet; A data transmission module, 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 of the clients obtains corresponding local data; An iterative training module is used to obtain the target global model of the server based on several iterative training steps, wherein each iterative training step includes: obtaining the current global model of the server, and sending the current global model to each of the clients, so that each of the clients trains the current global model based on the corresponding local data, aggregating the first global model trained by each of the clients through the server to obtain a second global model, and representing the second global model as the current global model; The risk warning module is used to obtain actual flow data based on the target power communication network, input the actual flow data into the target global model, and determine whether to issue a risk warning alarm based on the obtained flow identification result.
Citation Information
Patent Citations
Federal learning-based online battery cycle life prediction system and method thereof
CN114066100A
Electric power communication resource operation and maintenance management and control method based on digital twinning
CN116227103A
Abnormal network traffic identification method based on small sample data enhancement
CN119397466A
Federal learning method for adaptive differential privacy, client, server, storage medium and product
CN119494421A
Biosecure digital twin for cyber-physical anomaly detection and biological process modeling
WO2024077271A2
Cited By
Federal learning training method and system for weak network environment
CN121098743A