Substation network flow prediction method, bandwidth allocation method and system
The substation network traffic prediction method based on multi-terminal distillation and adversarial training solves the problems of complex traffic data and resource-constrained environment in substation networks, achieving high-precision and robust traffic prediction and improving the efficiency and accuracy of bandwidth allocation.
Patent Information
- Application Number
- CN202511870236.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-12
- Publication Date
- 2026-01-13
- Estimated Expiration
- 2045-12-12
AI Technical Summary
In complex network environments such as substations in the power sector, traffic data exhibits complex characteristics such as nonlinear evolution, overlapping of multiple time scales, and high noise interference. Existing traffic prediction methods are prone to performance degradation in scenarios with abnormal fluctuations, frequent changes in topology, or adversarial disturbances. At the same time, high-precision deep models are difficult to adapt to resource-constrained environments such as edge computing.
A substation network traffic prediction method based on multi-end distillation and adversarial training is adopted. By constructing a teacher base model and a student base model, the student model is trained using consistency loss and KL divergence loss function. The robustness and prediction accuracy of the model are improved by combining a multi-teacher model group and learning sample sets with different data lengths.
It improves the model's robust predictive ability in complex network environments and its predictive stability in resource-constrained environments, enhances its tolerance to non-ideal inputs, and improves the applicability and practicality of the predictive model.
Smart Images

Figure CN121333962A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of artificial intelligence and data analysis, and particularly relates to a substation network traffic prediction method, a bandwidth allocation method and system. BACKGROUND
[0002] The smart grid is built on the basis of an integrated, high-speed bidirectional communication network, and is applied through advanced sensing and measurement technology, advanced equipment technology, advanced control methods, and advanced decision support system technology. The smart digital substation is a fully digital information-based intelligent substation. Efficient and intelligent network communication technology is the key foundation of the smart digital substation, and provides important technical support for the integration of the smart substation automation system in all directions.
[0003] In the complex network environment of the substation, various nodes such as terminal devices, routers, switches, and the like continuously perform large-scale data interaction. With the dynamic evolution of the network topology structure, the continuous diversification of the service types, and the high randomness of the user access behavior, the traffic data presents complex characteristics such as nonlinear evolution law, multi-time scale overlap, and high noise interference. Under this background, it has become a technical bottleneck in the dynamic allocation of bandwidth resources and intelligent network management and control to build a traffic prediction model with high robustness, high efficiency, and strong generalization ability. In view of this problem, network traffic prediction technology can be used to analyze historical traffic data and predict the time series change of network traffic in the future period, so as to accurately predict the size and trend of the traffic, support the dynamic planning and bandwidth scheduling of network resources, effectively prevent service interruption or system overload caused by sudden traffic, and thus guarantee the quality of network service and the stability of operation, and improve the intelligent level of overall network operation and maintenance.
[0004] The existing traffic prediction methods mainly include three types of technical routes: one is a linear prediction method based on autoregressive integrated moving average model (ARIMA) and other statistical models, which is suitable for stationary time series; two is a traditional machine learning method using support vector machine, random forest and other models; and three is a deep learning method represented by recurrent neural network (RNN) and long short-term memory network (LSTM). These methods can achieve certain accuracy in specific scenarios, but in scenarios such as abnormal fluctuations in traffic, frequent changes in topology structure, or existence of adversarial disturbance, the prediction model is prone to performance degradation. In addition, high-precision deep models usually rely on a large number of parameters and complex structures, which are difficult to adapt to resource-constrained environments such as edge computing, resulting in a trade-off between prediction efficiency and accuracy.
[0005] Currently, in the field of bandwidth allocation, the quality of network traffic data faces multi-dimensional challenges: On the one hand, the collection and transmission of raw data are susceptible to interference. Sensor noise, equipment aging, or calibration offsets can lead to systematic errors; abrupt changes caused by abnormal events such as DDoS attacks and link failures disrupt the continuity of time sequences; and malicious behaviors such as man-in-the-middle attacks and data injection attacks can cause systematic distortions in data distribution. These sources of interference, through feature coupling effects, cause cognitive biases in the model during the key feature extraction stage, severely affecting prediction accuracy and robustness. On the other hand, hardware constraints in edge computing environments also place higher demands on model deployment. Limited memory resources limit the scale of model parameters, while the computing power bottleneck of embedded computing chips requires models to optimize the computational graph structure, improve operating efficiency, and reduce latency while ensuring prediction accuracy.
[0006] The above background information is provided only to assist in understanding the inventive concept and technical solution of this invention. It does not necessarily belong to the prior art of this application, nor does it necessarily provide technical teaching. In the absence of clear evidence that the above information was disclosed before the filing date of this application, the above background information should not be used to evaluate the novelty and inventiveness of this application. Summary of the Invention
[0007] The purpose of this invention is to provide a substation network traffic prediction method, bandwidth allocation method, and system. The prediction model exhibits good robustness and high prediction accuracy, enabling more efficient, accurate, and rational allocation of substation network bandwidth. Specifically, it addresses the complex characteristics of traffic data in power scenarios such as substations, which exhibit nonlinear evolution, overlapping time scales, and high noise interference. It also addresses the performance degradation issues of existing traffic prediction methods in scenarios with abnormal fluctuations, frequent topology changes, or adversarial disturbances. Furthermore, it solves the technical problem that high-precision deep models are difficult to adapt to resource-constrained environments such as edge computing.
[0008] To achieve the above objectives, the technical solution adopted by the present invention is as follows: A substation network traffic prediction method based on multi-terminal distillation and adversarial training includes the following steps: The graph structure data of the substation network is determined, and the flow data of the substation network is obtained. The graph structure data and flow data are input into a pre-trained student model to obtain the flow prediction results of each node in the substation network. The student model is trained in the following way: A teacher base model and a student base model are pre-built, wherein the teacher base model includes a clean teacher head and a noisy teacher head; Obtain a learning sample set, which includes network topology data and multiple sets of real data samples, perturbation data samples and target prediction labels with corresponding relationships; The learning sample set is input into the teacher base model for training. The clean teacher head outputs the traffic prediction value of each node in the network based on real data samples, and the noisy teacher head outputs the traffic prediction value of each node in the network based on perturbed data samples. On the basis of constraining the output of the clean teacher head to align with the target prediction label, the consistency loss is used to constrain the output of the noisy teacher head to align with the output of the clean teacher head, so as to obtain the trained teacher model. The student model is obtained by training the student base model using the trained teacher model and the learning sample set based on the KL divergence loss function.
[0009] Furthermore, following any one or a combination of the aforementioned technical solutions, the output of the noisy teacher head is aligned to the output of the clean teacher head using the consistency loss constraint based on the following formula:
[0010] in, L cons Represents the consistency loss function. β To control the proportion of the energy alignment portion, The clean teacher's head is aimed at the first i Each node t Predicted value at time, Indicates noise teacher head to the first i Each node t Predicted value at time, i Take natural numbers from 1 to N. Let N be the energy function, N represent the number of nodes in the substation network, and |·| represent the absolute value. This represents the L2 norm.
[0011] Furthermore, based on any one or a combination of the aforementioned technical solutions, the total loss function for training the teacher's basic model is expressed as follows:
[0012] in, σ k It is the learnable uncertainty variable for each loss function. L k This refers to the sub-loss function, which includes the consistency loss function. L cons First loss function L pred Second loss functionL adv , L pred Used to constrain the output of the clean teacher head. L adv Used to constrain the output of the noise-generating teacher head; And / or, The teacher base model includes multiple teacher model groups, each of which includes a clean teacher head and a noisy teacher head. Different teacher model groups are trained using learning sample sets of different data lengths.
[0013] Furthermore, based on any one or a combination of the aforementioned technical solutions, the output of the clean teacher head is constrained in the following ways:
[0014] in, L pred Denotes the first loss function. The clean teacher's head is aimed at the first i Each node t Predicted value at time, Indicates the first i Each node t The true value of a moment This refers to element-wise difference operations, where N represents the number of nodes. Represents the L2 norm; And / or, The training process for the teacher base model also includes constraining the output of the noisy teacher head in the following ways:
[0015] in, L adv This represents the second loss function. Indicates noise teacher head to the first i Each node t Predicted value at time, Indicates the first i Each node t The true value of a moment T Represents the transpose matrix. R Let α represent the set of real numbers, and α be the balance coefficient. This is the Mahalanobis distance. To predict entropy.
[0016] Furthermore, following any one or a combination of the aforementioned technical solutions, during the training of the student basic model, a third loss function based on distillation loss is used to constrain the output of the student model as follows:
[0017] in, This represents the third loss function. This indicates the calculation of KL divergence. It is the output of the student model based on real data samples. It is the output of the student model based on perturbation data samples. It's the output of a clean-cut teacher's head. This is the output of the noise teacher head.
[0018] Furthermore, following any one or a combination of the aforementioned technical solutions, the training process for the student's basic model also includes constraining its prediction results through the following fourth loss function:
[0019] in, This represents the fourth loss function. The student model represents nodes based on real data samples. i time t The prediction results It is the true label based on the target predicted label, where N represents the number of nodes. This indicates element-wise difference operation. Represents the L2 norm; And / or, The training process for the student's basic model also includes constraining its prediction results through the following fifth loss function:
[0020] in, This represents the fifth loss function. The student model represents nodes based on perturbation data samples. i time t The prediction results It is the true label based on the target predicted label, where N represents the number of nodes. This indicates element-wise difference operation. This represents the L2 norm.
[0021] Furthermore, following any one or a combination of the aforementioned technical solutions, the learning sample set is obtained in the following manner: Historical flow time-series characteristics of each node in the substation network are collected based on a preset sampling frequency. The traffic features corresponding to the target time set in the historical traffic time series features are determined to obtain the real traffic time series features, and the real traffic time series features are configured as the real data samples. In the historical traffic time-series features, the historical traffic time-series features at several time steps after the actual traffic time-series features are determined as the target prediction sequence, and the target prediction sequence is configured as the target prediction label; The real traffic time-series characteristics are perturbed to obtain perturbed traffic time-series characteristics, which are then configured as perturbed data samples.
[0022] Furthermore, following any one or a combination of the aforementioned technical solutions, the method further includes the following steps: From the historical traffic time-series characteristics, select a time point that is a preset distance away. t Historical flow characteristics at periodic intervals To obtain the true traffic time-series characteristics, the true traffic time-series characteristics It is expressed as follows:
[0023] in, t express t time, The interval length, L Indicates the sequence length. The historical time series representing the traffic temporal characteristics of multiple nodes. express Historical traffic characteristics of each node at any given time. R Represents the set of real numbers. N This indicates the number of nodes in the substation network. D Represents the dimensions of traffic characteristics; After determining the time-series characteristics of the actual traffic H The historical flow time series features at each time step are used to predict the target sequence:
[0024] in, It is to predict the target sequence. Indicates at time t The historical traffic time series characteristics of each node in the subsequent 1st to Hth time steps.
[0025] According to another aspect of the present invention, a substation network bandwidth allocation method based on multi-terminal distillation and adversarial training is provided, comprising the following steps: The substation network traffic prediction method based on multi-terminal distillation and adversarial training, as described above, obtains the prediction output results of each node in the substation network based on any one or a combination of the above technical solutions. Based on the following formula, the corresponding bandwidth is allocated to each link in the substation network according to the traffic prediction results:
[0026] in, This represents the final bandwidth allocation for each link, where Q indicates the total number of links in the substation network. It is the first i The predicted output for each link, where M represents the total number of links. i Take integers from 1 to M. It is the total bandwidth capacity of the link. It is an equalization perturbation coefficient to prevent numerical values. This represents the predicted demand vector for each link in the future.
[0027] According to another aspect of the present invention, a substation network bandwidth allocation system is provided, including a processor configured to determine the bandwidth allocation of each flow in a substation network band according to the substation network bandwidth allocation method based on multi-terminal distillation and adversarial training as described above.
[0028] The beneficial effects of the technical solution provided by this invention are as follows: a. This invention guarantees the robustness of the student model in two aspects. On the one hand, the application of adversarial training in the pre-training of the teacher model enhances the teacher model's ability to identify anomalies and interference patterns by introducing perturbation data samples, enabling it to generate more robust knowledge. On the other hand, adversarial training is added during the training of the student model, so that it not only imitates the knowledge of the teacher model during the distillation learning process, but also maintains stable output in perturbation environments, thereby improving its robust prediction ability in complex network environments. b. This invention sets up multiple teacher model groups, each including a clean teacher head and a noisy teacher head, and trains different teacher model groups using learning sample sets of different data lengths. During the distillation process, the student model learns specific prediction patterns and robust representations by fitting the soft label outputs and intermediate feature representations of multiple teachers, while extracting the core knowledge of the teachers, thereby ignoring the overfitting noise and improving the accuracy and applicability of the prediction. c. The substation network traffic prediction and allocation method provided by this invention can solve the complex characteristics of traffic data in the complex network environment of power scenarios such as substations, which exhibit nonlinear evolution, multi-timescale overlap and high noise interference. It also addresses the problem that existing traffic prediction methods are prone to performance degradation in scenarios such as abnormal fluctuations, frequent topology changes or adversarial disturbances. At the same time, it solves the technical problem that high-precision deep models are difficult to adapt to resource-constrained environments such as edge computing. Attached Figure Description
[0029] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0030] Figure 1 A schematic diagram of the bandwidth allocation workflow of a substation network provided as an exemplary embodiment of the present invention; Figure 2 A schematic diagram of a teacher model pre-training framework provided as an exemplary embodiment of the present invention; Figure 3 A schematic diagram of the multi-end distillation and adversarial training process of a robust student model provided in an embodiment of the present invention. Detailed Implementation
[0031] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0032] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, apparatus, product, or device that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.
[0033] To address the shortcomings of existing technologies, this invention proposes a robust traffic prediction method that integrates multi-terminal knowledge distillation and adversarial training mechanisms. The prediction model based on this method possesses both expressive power and a lightweight structure. This method effectively improves the model's prediction stability and response efficiency under conditions of data contamination, node anomalies, and resource constraints. Furthermore, this method not only enhances the model's tolerance to non-ideal inputs but also improves the practicality and generalizability of the prediction model in edge environments, demonstrating significant research value and broad application prospects for adaptive intelligent traffic management oriented towards bandwidth allocation.
[0034] In one embodiment of the present invention, a substation network traffic prediction method based on multi-terminal distillation and adversarial training is provided, comprising the following steps: The graph structure data of the substation network is determined, and the flow data of the substation network is obtained. The graph structure data and flow data are input into a pre-trained student model to obtain the flow prediction results of each node in the substation network. The student model is trained in the following way: A teacher base model and a student base model are pre-built, wherein the teacher base model includes a clean teacher head and a noisy teacher head; Obtain a learning sample set, which includes network topology data and multiple sets of real data samples, perturbation data samples and target prediction labels with corresponding relationships; The learning sample set is input into the teacher base model for training. The clean teacher head outputs the traffic prediction value of each node in the network based on real data samples, and the noisy teacher head outputs the traffic prediction value of each node in the network based on perturbed data samples. On the basis of constraining the output of the clean teacher head to align with the target prediction label, the consistency loss is used to constrain the output of the noisy teacher head to align with the output of the clean teacher head, so as to obtain the trained teacher model. The student model is obtained by training the student base model using the trained teacher model and the learning sample set based on the KL divergence loss function.
[0035] In the application scenario of traffic prediction and bandwidth allocation for substation networks, the workflow diagram of the final result of this invention (robust student model) is as follows: Figure 1 As shown.
[0036] In this invention, the nodes of the substation network include core and edge devices, specifically servers, routers, and switches. Network time-series data is collected using SNMP (Simple Network Management Protocol) and NetFlow / sFlow tools. Each node can record traffic data including uplink and downlink rates, frame traffic, and latency. The raw collected data undergoes preprocessing operations, including time alignment, missing value imputation, and normalization, to ensure data temporal consistency and availability. The processed data is organized into a structured time-series format, with each time step corresponding to a set of traffic status snapshots of network nodes, serving as input features for the traffic prediction model (Student Model).
[0037] The method proposed in this invention first utilizes a powerful teacher model trained on complete data to obtain an accurate representation of traffic patterns. Then, through a distillation process, soft labels or intermediate features from the teacher model are passed to a student model. During training, the student model learns to adapt to perturbation data based on the teacher's output patterns, thereby enabling a lightweight student model to integrate the performance of a complex teacher model. Furthermore, this invention employs multi-end distillation and integrates adversarial training techniques at multiple stages of knowledge distillation, allowing the student model to learn a more stable representation of traffic features.
[0038] In selecting teacher and student models, a complex model is generally chosen as the teacher, and a simple model as the student. Teacher models have greater capacity and more complex structures, enabling them to fully learn the potential temporal patterns and anomalies in network traffic. Therefore, the teacher model in this invention typically uses a prediction model based on dynamic graph neural networks combined with spatiotemporal attention, such as an Adaptive Graph Convolutional Recurrent Network (ACGRN). The dynamic graph neural network is used to learn and analyze the spatial dependencies between nodes, while the spatiotemporal attention mechanism is used to capture the temporal correlation of traffic data, allowing the prediction model to understand and predict changes in traffic patterns. In this invention, to ensure that the teacher can provide knowledge from different aspects, a basic architecture with a common backbone and multiple teacher heads is adopted, as detailed below. The selection of student models is more diverse. Theoretically, lighter-weight neural network models can be used, such as convolutional neural networks (CNN), gated recurrent units (GRU), or simplified variants of graph convolutional networks (GCN), to adapt to specific bandwidth allocation scenarios.
[0039] From the perspective of robustness enhancement, this invention guarantees the robustness of the student model in two aspects. Firstly, the application of adversarial training in the pre-training of the teacher model improves its ability to identify anomalies and interference patterns by introducing perturbation data samples, enabling it to generate more robust knowledge. Secondly, adversarial training is incorporated into the training of the student model, allowing it to not only imitate the knowledge of the teacher model during distillation learning but also maintain stable output under perturbation environments, thereby enhancing its robust prediction ability in complex network environments. The second aspect is multi-end distillation. During distillation, the student model learns specific prediction patterns and robust representations by fitting the soft-label outputs and intermediate feature representations of multiple teachers, while extracting the core knowledge of the teachers, thus ignoring overfitting noise.
[0040] In one embodiment of the present invention, the learning sample set is obtained by: collecting historical flow time-series features of each node in the substation network based on a preset sampling frequency; determining the flow features corresponding to a target time set in the historical flow time-series features to obtain real flow time-series features, wherein the target time set includes multiple target times, and the real flow time-series features are configured as real data samples; determining the historical flow time-series features of several time steps after the real flow time-series features as the target prediction sequence, and the target prediction sequence is configured as the target prediction label; perturbing the real flow time-series features to obtain perturbed flow time-series features, and the perturbed flow time-series features are configured as perturbed data samples.
[0041] This invention focuses on the construction of a multi-terminal acquisition and storage architecture for raw network traffic data. The following describes in detail the substation network traffic prediction method based on multi-terminal distillation and adversarial training proposed in this application, wherein the process of acquiring raw data and learning sample set is described in steps one and two below.
[0042] Step 1: Obtaining raw data.
[0043] First, capture real-time traffic logs from multiple terminal nodes directly from traffic probes or SDN controllers deployed within the network / data center. The log record format is as follows: Log record = {Source IP address, Destination IP address, Device MAC address, Port number, Protocol type, Packet size, Bandwidth utilization, Timestamp}.
[0044] Next, a portion of the standardized traffic records from the CICFlowMeter public dataset are selected to expand scenario coverage. The standardized traffic record format is as follows: Standardized traffic record = {flow ID, source IP, destination IP, source port, destination port, protocol type, flow duration, total number of packets, total number of bytes, forward and reverse traffic characteristics, timestamp, tag}.
[0045] Then, raw traffic packets are captured using Wireshark and NetFlow tools. They are first stored in HDFS as raw partitions in PCAP format, then converted to standardized traffic records and stored in Parquet format. Combined with Hive / Spark, efficient querying and analysis are achieved, ensuring low-latency synchronization of data across multiple nodes. During the collection process, IP / MAC addresses are hashed and anonymized, while actively covering traffic states during peak / off-peak hours and for mixed application types, forming an unprocessed raw data pool. The format of this part is as follows: Raw Data Collection and Storage Format = {Collection Tool, Storage Format (HDFS / PCAP / Parquet), Partitioning Strategy, Query and Analysis Tool (Hive / Spark), Synchronization Features, Anonymized Fields (IP / MAC), Traffic Coverage (Peak / Off-Peak / Application Type), Data Pool Type}.
[0046] Finally, given the problems of insufficient data volume, inconsistent data distribution across categories, and inconsistent device sampling frequencies, this application obtains intelligently generated records by inserting data. The format of the intelligently generated records is as follows: Intelligently generated record = {flow ID, source IP (composite), destination IP (composite), source port, destination port, protocol type, generation timestamp, number of composite packets, number of composite bytes, tag (balanced category)}.
[0047] The processing of the multi-source traffic data obtained above can be simplified into several steps: unified encoding, desensitization, and fusion.
[0048] First, perform hash-based de-identification on the IP / MAC address: During the fusion phase, a 5-tuple (source IP, destination IP, source port, destination port, protocol) is used as the key. Multiple source values for the same field are summed using a weighted average to generate the standardized view as follows: V={(stream ID, , Source port, destination port, protocol, number of packets, number of bytes, tag)}.
[0049] When the data is class imbalanced, synthetic samples can be generated by sampling from the minority class and perturbing it.
[0050] in, For minority class samples, Slight perturbations in message count, byte count, or timestamps are controlled to generate records with valid and balanced labels. It should be noted that if the amount of raw data collected is sufficient, the raw traffic data collected from the substation network can be directly used as the raw data pool. However, collecting a large amount of raw data poses a significant challenge to hardware resources. Preferably, a small or appropriate amount of raw traffic data is collected, and the synthetic samples are generated based on the perturbations in the raw traffic data. The raw traffic data and the synthetic samples together constitute the raw data pool, which is used as input in actual prediction and for training the model.
[0051] Ultimately, the raw data, standardized views, and synthetic samples together constitute a complete data system that supports efficient analysis and privacy protection.
[0052] Step Two: Data Definition and Processing The initial data is defined as the aggregation constructed using the aforementioned data system. The initial data... D ori Recorded as:
[0053] in, Indicates that each network node is t Flow characteristics at any given time F Let R be a positive integer, R represent the set of real numbers, N represent the number of nodes in graph G, and D represent the dimension of traffic features. It is a topological structure composed of network nodes expressed using graph structure data, where V represents the set of nodes in the graph and E represents the set of edges in the graph.
[0054] The raw data is preprocessed, including time alignment, missing value imputation, and normalization.
[0055] Time alignment involves resampling the data from all network nodes to make the sampling step size of the time-series data from each node the same. For example, if the original data is recorded once every 0.1 seconds by some devices and once every 1 minute by others, time alignment can unify the sampling frequency of all devices, for example, setting them all to once per minute.
[0056] If the sampling step size is set to The initial time is Time alignment can then be represented as follows:
[0057] in, The time sampling time point sequence is the target time set mentioned above. t k Indicates the first k Each sampling time point t 0Indicates the initial time. Indicates the time interval between two samples. k Take 0 to T -1 is an integer, and L represents the sequence length.
[0058] Missing value imputation can solve the problem of missing data values at certain points in time. This method designs a missing value imputation method as follows: first, obtain the distribution of the existing original data and generate the original data, and then perform interpolation processing on the original data.
[0059] For the i The node, the first j Traffic characteristics in each dimension, if If a value is missing, the imputation method is as follows:
[0060] in, express t k Time of the first i The node, the first j Traffic characteristics in multiple dimensions x The parametric form representing the characteristic matrix, This represents the distribution estimated from existing data. Indicates at time Expected value under the given conditions This is the interpolated data.
[0061] Data normalization employs deviation z-score standardization. For each feature dimension... Calculate its mean across all nodes. with standard deviation :
[0062]
[0063] in, N For the number of nodes, T It is the timing length. The coefficient of variation is... i Take 1 to N integers, t Take 1 to T Integers.
[0064] The standardized flow characteristic values are:
[0065] yes t time( i ,j The original traffic characteristic value of the node. These correspond to the processed standard traffic feature values, and the final dataset of traffic time-series features is... The data after data processing for: ; in, It is the topology structure composed of network nodes.
[0066] Preferably, in the historical traffic time-series characteristics, a time point distant from a preset point is selected. t Historical flow characteristics at periodic intervals To obtain the true traffic time-series characteristics, the true traffic time-series characteristics It is expressed as follows:
[0067] in, t express t time, The interval length, L Indicates the sequence length. The historical time series representing the traffic temporal characteristics of multiple nodes. express Historical traffic characteristics of each node at any given time. R Represents the set of real numbers. N This indicates the number of nodes in the substation network. D This represents the dimension of traffic characteristics.
[0068] After determining the time-series characteristics of the actual traffic H The historical flow time series features at each time step are used to predict the target sequence:
[0069] in, yes The corresponding predicted target sequence, Indicates at time t The historical traffic time series characteristics of each node in the subsequent 1st to Hth time steps.
[0070] In one embodiment of the present invention, in order to improve the training accuracy of the model and the accuracy of the prediction results, this application uses windows of different sizes to segment the data, dividing the data into short-term data according to the window size. D s and long-term data D l Using short-term data D s and long-term dataD l The teacher's basic model and the student's basic model were trained separately.
[0071] In one embodiment of the present invention, the teacher model is constructed and pre-trained in the following manner.
[0072] like Figure 2 As shown, this invention sets up multiple teacher model groups for pattern learning with different window lengths, such as long-term teacher model groups and short-term teacher model groups. Each teacher model group includes a backbone network (first encoder), a clean teacher head (N1), and a noisy teacher head (R1). The clean teacher head and the noisy teacher head are configured as two equivalent decoders (a first decoder and a second decoder connected to the output of the first encoder, respectively).
[0073] The backbone network can be encoded using an adaptive graph convolutional network to capture spatial dependencies. Its input consists of multi-timestep node feature sequences and topological structures. The encoder models spatial dependencies in static or dynamic topologies by introducing learnable graph structure representations, specifically in the following form:
[0074] in, Represents the adaptive normalized adjacency matrix. This is the node table for the m-th level. For trainable weight matrix, For activation function, Encoder depth. Initial representation. That is, the time-series characteristics of the input traffic.
[0075] Adaptive Adjacency Matrix The specific construction method is as follows:
[0076] in, This indicates that the node embedding matrix is initialized randomly. for The transpose of the matrix, This indicates that each row of the bias matrix represents the embedding of a node. For the image The adjacency matrix representation, It is a topology structure composed of network nodes represented by graph-structured data. This is the activation function.
[0077] The high-dimensional feature representation obtained after encoding by the first encoder is as follows High-dimensional features Z tThe input is fed into the teacher head. The clean teacher head N1, based on the real, unperturbed input—that is, the actual temporal features of the traffic—predicts future traffic sequences through temporal convolution or attention mechanisms. The objective is to minimize the prediction loss between the predicted sequence and the true label, i.e., the target prediction sequence; while the noisy teacher head R1 accepts noisy data with added random noise or adversarial perturbation, i.e., the perturbation flow time series features, and its output... This is used to enhance the model's sensitivity and ability to identify input interference, while minimizing the prediction loss between the model and the true label. It also utilizes consistency loss to align with the output of the clean teacher head N1 to improve the stability of feature representation.
[0078] During the training of the teacher base model, the output of the clean teacher head is constrained in the following way:
[0079] in, L pred Denotes the first loss function. The clean teacher's head is aimed at the first i Each node t Predicted value at time, Indicates the first i Each node t The true value of a moment This refers to element-wise difference operations, where N represents the number of nodes. This represents the L2 norm.
[0080] The noise teacher head R1 receives the disturbance input and generates the prediction result. This application introduces an entropy regularization term to improve the stability of the teacher model's expression for anomalous perturbation samples, and uses Mahalanobis distance to improve the model's fitting ability to perturbation samples:
[0081] in, L adv This represents the second loss function. Indicates noise teacher head to the first i Each node t Predicted value at time, Indicates the first i Each node t The true label value at any given moment. T Represents the transpose matrix. R Represents the set of real numbers. For Mahalanobis distance, To predict entropy, αIt is a balance coefficient used to adjust the loss between Mahalanobis distance and prediction entropy.
[0082] The expression for predicting entropy is: This encourages models to retain prediction entropy under uncertainty, in order to maintain the model's expressive power. Indicates an event i The probability of occurrence.
[0083] The output of the noisy teacher head is constrained using the following formula to align it with the output of the clean teacher head:
[0084] in, L cons Represents the consistency loss function. β To control the proportion of the energy alignment portion, The clean teacher's head is aimed at the first i Each node t Predicted value at time, Indicates noise teacher head to the first i Each node t Predicted value at time, Let N be the energy function, N represent the number of nodes, and |·| represent the absolute value. This represents the L2 norm.
[0085] The consistency loss not only compares the outputs of the two heads, but also constrains the consistency of their energy function outputs to improve the overall decision boundary stability. This method introduces an energy function... The energy function, as an indicator of uncertainty in the model output, is expressed as follows:
[0086] in, A reference set constructed for cluster centers or historical means. This represents the predicted value output by the model. This refers to adjusting hyperparameters. `log` represents the logarithmic function, and the `exp(·)` function is used to calculate the exponent of e (the base of the natural logarithm). j This represents the cluster center number or the reference set constructed from historical means. CN represents the set of all cluster center numbers or reference sets constructed from historical means.
[0087] In this application, an uncertainty-guided dynamic weighting mechanism is used to combine different loss terms for the total loss of the teacher model, which can be expressed as:
[0088] in, σk It is a learnable uncertainty variable for each loss function, learns the task difficulty through gradient backpropagation, and automatically balances the contribution of different losses to optimization. L k This refers to the sub-loss function, which includes the consistency loss function. L cons First loss function L pred Second loss function L adv .
[0089] In one embodiment of the present invention, the construction and training of the student model are as follows. The student model architecture is more lightweight, using an encoder and a decoder architecture. The student model training employs multi-end distillation and adversarial training methods to enhance robustness. Figure 3 As shown, after the data undergoes adversarial perturbation processing and multi-scale window segmentation, multiple sets of training data are obtained and input into the corresponding teacher model group and student model.
[0090] For example, existing processed data (These represent clean data, i.e., real data samples; adversarial data, i.e., perturbation data samples; and real labels, i.e., target prediction labels, respectively), which are input into the model to obtain the corresponding output.
[0091] ; ; ; ; in, This represents the output / predicted value of the noisy teacher head R1 based on adversarial data. This represents the output / predicted value of the clean teacher head N1 based on clean data. This indicates the output / predicted value of the student model based on clean data. This represents the output / predicted value of the student model based on adversarial data; These represent the noisy teacher head R1, the clean teacher head N1 model, and the student model, respectively. This represents the trainable parameters of the student model. Here, the student model is trained while the teacher model parameters are fixed, so the teacher model parameters are not emphasized.
[0092] In this embodiment, the student model is trained using prediction loss, adversarial loss, and distillation loss for model optimization.
[0093] During the training of the student's basic model, the prediction results are constrained by the following fourth loss function:
[0094] in, The student model represents the nodes based on real traffic time-series features. i time t The prediction results It is based on the true labels of the target predicted sequence, where N represents the number of nodes. i Choose natural numbers from 1 to N.
[0095] Furthermore, it also includes constraining the prediction results through the following fifth loss function constraint, namely the MSE loss:
[0096] in, The student model represents the nodes based on the temporal characteristics of the perturbation flow. i time t The prediction results It is based on the true label of the target predicted sequence.
[0097] In this embodiment, the output of the student model is constrained by a third loss function based on the distillation loss as follows:
[0098] in, This represents the third loss function. This indicates the calculation of KL divergence. It is the output of the student model based on the real traffic time-series characteristics. It is the output of the student model based on the time-series characteristics of the perturbation flow. It's the output of a clean-cut teacher's head. This is the output of the noise teacher head.
[0099] Through the above training process, the resulting student model can effectively predict the traffic of each node in the substation network. It has high prediction accuracy and robustness, and can adapt to fluctuations and changes in network traffic, providing strong support for the management and optimization of the substation network.
[0100] A trained student model can be embedded into a decision-making method to obtain the corresponding decision results:
[0101] in This indicates recent traffic changes. It indicates a prediction for a period of time in the future. The decision-making method is represented by ACT, which represents the decision action output by the method. The decisions are diverse and depend on the application scenario. In a specific embodiment of this invention, the student model is applied to bandwidth allocation in a substation network.
[0102] In one embodiment of the present invention, a substation network bandwidth allocation method based on multi-terminal distillation and adversarial training is provided, comprising the following steps: obtaining the prediction output results of each node in the substation network based on the substation network traffic prediction method based on multi-terminal distillation and adversarial training as described in any of the preceding embodiments; Based on the following formula, the corresponding bandwidth is allocated to each link in the substation network according to the traffic prediction results:
[0103] in, This represents the final bandwidth allocation for each link, where Q indicates the total number of links in the substation network. It is the first i The predicted output of each node, where M represents the total number of links. i Take integers from 1 to M. It is the total bandwidth capacity of the link. This is the equilibrium disturbance coefficient, where U is the number of nodes on a link. This represents the predicted demand vector for each link in the future.
[0104] Based on the following formula, the corresponding bandwidth is allocated to each link / flow in the substation network according to the traffic prediction results:
[0105] in, This represents the final bandwidth allocation for each link, where Q indicates the total number of links in the substation network. It is the first i The predicted output results for each link, It is the total bandwidth capacity of the link. It is an equalization perturbation coefficient to prevent numerical values. This represents the predicted demand vector for each link in the future.
[0106] Based on the above bandwidth allocation results, a set of directly executable bandwidth adjustment actions is obtained. ACT , means as follows:
[0107] in, It is the first The identifier of the stream, Is assigned to the first The bandwidth of the stream.
[0108] This bandwidth allocation method fully leverages the high accuracy of the traffic prediction method described in the above embodiments. It can dynamically adjust bandwidth allocation based on predicted traffic demand, avoiding the resource waste problem in traditional static bandwidth allocation methods. Furthermore, due to the strong robustness of the prediction model, it can maintain the rationality and effectiveness of bandwidth allocation even under conditions of significant network traffic fluctuations.
[0109] In practical applications, this bandwidth allocation method can be dynamically adjusted based on traffic forecast results for different time periods, thereby optimizing the utilization of substation network resources, improving network transmission efficiency, reducing congestion, and ensuring the stable operation of substation automation systems.
[0110] In one embodiment of the present invention, a substation network bandwidth allocation system is provided, including a processor configured to determine the bandwidth allocation of each flow in a substation network band according to the substation network bandwidth allocation method based on multi-terminal distillation and adversarial training as described in the above embodiment.
[0111] The substation network bandwidth allocation system may further include a memory, a communication interface, and a data acquisition module. The memory is used to store bandwidth allocation algorithms and historical data; the communication interface is used to exchange data with various devices in the substation network; and the data acquisition module is used to collect network traffic data in real time, providing the processor with the latest network status information.
[0112] This system can be deployed on the central control server of a substation or operate as a standalone network management device. By dynamically adjusting bandwidth allocation, the system improves the utilization rate of substation network resources, reduces network congestion, ensures the timely transmission of critical business data, and provides strong support for the stable operation of the substation automation system.
[0113] It should be noted that the above embodiments of the substation network bandwidth allocation method and substation network bandwidth allocation system based on multi-terminal distillation and adversarial training are based on the same inventive concept as the embodiments of the substation network traffic prediction method based on multi-terminal distillation and adversarial training. All contents of the embodiments of the substation network traffic prediction method based on multi-terminal distillation and adversarial training are incorporated into the embodiments of the substation network bandwidth allocation method and substation network bandwidth allocation system based on multi-terminal distillation and adversarial training by reference.
[0114] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0115] The above description is only a specific embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A substation network traffic prediction method based on multi-terminal distillation and adversarial training, characterized in that, Includes the following steps: The graph structure data of the substation network is determined, and the flow data of the substation network is obtained. The graph structure data and flow data are input into a pre-trained student model to obtain the flow prediction results of each node in the substation network. The student model is trained in the following way: A teacher base model and a student base model are pre-built, wherein the teacher base model includes a clean teacher head and a noisy teacher head; Obtain a learning sample set, which includes network topology data and multiple sets of real data samples, perturbation data samples and target prediction labels with corresponding relationships; The learning sample set is input into the teacher base model for training. The clean teacher head outputs the traffic prediction value of each node in the network based on real data samples, and the noisy teacher head outputs the traffic prediction value of each node in the network based on perturbed data samples. On the basis of constraining the output of the clean teacher head to align with the target prediction label, the consistency loss is used to constrain the output of the noisy teacher head to align with the output of the clean teacher head, so as to obtain the trained teacher model. The student model is obtained by training the student base model using the trained teacher model and the learning sample set based on the KL divergence loss function.
2. The substation network traffic prediction method based on multi-terminal distillation and adversarial training according to claim 1, characterized in that, The output of the noisy teacher head is aligned to the output of the clean teacher head using the following formula, based on the consistency loss constraint: ; in, L cons Represents the consistency loss function. β To control the proportion of the energy alignment portion, The clean teacher's head is aimed at the first i Each node t Predicted value at time, Indicates noise teacher head to the first i Each node t Predicted value at time, i Take natural numbers from 1 to N. Let N be the energy function, N represent the number of nodes, and |·| represent the absolute value. This represents the L2 norm.
3. The substation network traffic prediction method based on multi-terminal distillation and adversarial training according to claim 1, characterized in that, The total loss function for training the teacher base model is expressed as follows: ; in, σ k It is the learnable uncertainty variable for each loss function. L k This refers to the sub-loss function, which includes the consistency loss function. L cons First loss function L pred Second loss function L adv , L pred Used to constrain the output of the clean teacher head. L adv Used to constrain the output of the noise-generating teacher head; And / or, The teacher base model includes multiple teacher model groups, each of which includes a clean teacher head and a noisy teacher head. Different teacher model groups are trained using learning sample sets of different data lengths.
4. The substation network traffic prediction method based on multi-terminal distillation and adversarial training according to claim 1, characterized in that, The output of the clean teacher head is constrained in the following way: ; in, L pred Denotes the first loss function. The clean teacher's head is aimed at the first i Each node t Predicted value at time, Indicates the first i Each node t The true value of a moment This refers to element-wise difference operations, where N represents the number of nodes. i Take natural numbers from 1 to N. Represents the L2 norm; And / or, The training process for the teacher base model also includes constraining the output of the noisy teacher head in the following ways: ; in, L adv This represents the second loss function. Indicates noise teacher head to the first i Each node t Predicted value at time, Indicates the first i Each node t The actual value at time, where N represents the number of nodes. i Take natural numbers from 1 to N. T Represents the transpose matrix. R Let α represent the set of real numbers, and α be the balance coefficient. The Mahalanobis distance, To predict entropy.
5. The substation network traffic prediction method based on multi-terminal distillation and adversarial training according to claim 1, characterized in that, During the training of the student's basic model, the output of the student model is constrained by a third loss function based on distillation loss as follows: ; in, This represents the third loss function. This indicates the calculation of KL divergence. It is the output of the student model based on real data samples. It is the output of the student model based on perturbation data samples. It's the output of a clean-cut teacher's head. This is the output of the noise teacher head.
6. The substation network traffic prediction method based on multi-terminal distillation and adversarial training according to claim 1, characterized in that, The training process for the student's basic model also includes constraining its prediction results through the following fourth loss function: ; in, This represents the fourth loss function. The student model represents nodes based on real data samples. i time t The prediction results It is the true label based on the target predicted label, where N represents the number of nodes. i Take natural numbers from 1 to N. This indicates element-wise difference operation. Represents the L2 norm; And / or, The training process for the student's basic model also includes constraining its prediction results through the following fifth loss function: ; in, This represents the fifth loss function. The student model represents nodes based on perturbation data samples. i time t The prediction results It is the true label based on the target predicted label, where N represents the number of nodes. i Take natural numbers from 1 to N. This indicates element-wise difference operation. This represents the L2 norm.
7. The substation network traffic prediction method based on multi-terminal distillation and adversarial training according to claim 1, characterized in that, The learning sample set is obtained through the following methods: Historical flow time-series characteristics of each node in the substation network are collected based on a preset sampling frequency. The traffic features corresponding to the target time set in the historical traffic time series features are determined to obtain the real traffic time series features, and the real traffic time series features are configured as the real data samples. In the historical traffic time-series features, the historical traffic time-series features at several time steps after the actual traffic time-series features are determined as the target prediction sequence, and the target prediction sequence is configured as the target prediction label; The real traffic time-series characteristics are perturbed to obtain perturbed traffic time-series characteristics, which are then configured as perturbed data samples.
8. The substation network traffic prediction method based on multi-terminal distillation and adversarial training according to claim 7, characterized in that, It also includes the following steps: From the historical traffic time-series characteristics, select a time point that is a preset distance away. t Historical flow characteristics at periodic intervals To obtain the true traffic time-series characteristics, the true traffic time-series characteristics It is expressed as follows: ; in, t express t time, The interval length, L Indicates the sequence length. The historical time series representing the traffic temporal characteristics of multiple nodes. express Historical traffic characteristics of each node at any given time. R Represents the set of real numbers. N This indicates the number of nodes in the substation network. D Represents the dimensions of traffic characteristics; After determining the time-series characteristics of the actual traffic H The historical flow time series features at each time step are used to predict the target sequence: ; in, It is to predict the target sequence. Indicates at time t The historical traffic time series characteristics of each node in the subsequent 1st to Hth time steps.
9. A substation network bandwidth allocation method based on multi-terminal distillation and adversarial training, characterized in that, Includes the following steps: The prediction output results of each node in the substation network are obtained based on the substation network traffic prediction method based on multi-terminal distillation and adversarial training as described in any one of claims 1 to 8. Based on the following formula, the corresponding bandwidth is allocated to each link in the substation network according to the traffic prediction results: ; in, This represents the final bandwidth allocation for each link, where Q indicates the total number of links in the substation network. It is the first i The predicted output for each link, where M represents the total number of links. i Take integers from 1 to M. It is the total bandwidth capacity of the link. It is an equalization perturbation coefficient to prevent numerical values. This represents the predicted demand vector for each link in the future.
10. A substation network bandwidth allocation system, characterized in that, Includes a processor configured to determine the bandwidth allocation of each link in a substation network band according to the substation network bandwidth allocation method based on multi-terminal distillation and adversarial training as described in claim 9.
Citation Information
Patent Citations
Method for predicting power distribution / utilization service communication bandwidth of transformer substation
CN105071992A
Lightweight Internet of Things malicious traffic identification method based on knowledge distillation space-time neural network
CN116260642A
Traffic prediction method and device, storage medium and electronic equipment
CN120151219A
Self-learning-based self-adaptive mixed precision quantization network generation method
CN120449946A
Power industry dynamic knowledge base construction method and system based on large language model
CN120705130A