A method, apparatus, electronic device, and storage medium for predicting network traffic.

CN121125529BActive Publication Date: 2026-09-01CHINA UNIONPAY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511310203.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-12
Publication Date
2026-09-01
Estimated Expiration
2045-09-12

AI Technical Summary

Technical Problem

[0006]为了解决网络流量预测准确性低的问题,本申请实施例提供了一种网络流量预测方法、装置、电子设备及存储介质

Benefits of technology

[0061]The network traffic prediction method, apparatus, electronic device, and storage medium provided in this application embodiment receive a network traffic prediction request for a target network sent by a terminal; acquire a topology map and a regional topology map of the target network, wherein the topology map of the target network is a connection relationship map of the nodes included in the target network, and the regional topology map of the target network is a connection relationship map of regional nodes obtained based on the local dependencies between the nodes included in the target network; acquire historical network traffic information of each node included in the target network as the node features of the corresponding nodes, and determine the corresponding regional node features based on the node features of each regional node; and convert the topology map of the target network into a network topology map. The network traffic prediction model is input with the features of each node, the regional topology of the target network, and the features of each regional node to obtain the network traffic prediction result. The network traffic prediction model includes a graph structure construction module, a convolutional encoder, and a recurrent decoder. The graph structure construction module is used to construct the graph structure corresponding to the target network and the regional graph structure corresponding to the target network. The convolutional encoder is used to extract the spatiotemporal feature representation of each node based on the graph structure and the features of each node, and to extract the spatiotemporal feature representation of each regional node based on the regional graph structure and the features of each regional node. The recurrent encoder is used to determine the network traffic prediction result based on the spatiotemporal feature representation of each node and the spatiotemporal feature representation of each regional node. In this embodiment, a connection relationship graph of the corresponding regional nodes of the network is obtained in advance based on the local dependency relationship between the nodes contained in different networks, that is, the regional topology graph of the network. When a network traffic prediction request sent by the terminal is received, the topology graph of the target network and the regional topology graph of the target network are obtained, and the historical network traffic information of each node contained in the target network is used as node features. The regional node features of each region are determined according to the node features of each node in each regional node. The graph structure and regional graph structure corresponding to the target network are constructed hierarchically through the trained network traffic prediction model. The cross-regional correlation between the original graph structure features and the coarsened regional graph structure features is captured. The local spatiotemporal features of the two-layer graph structure are extracted, and the non-local spatiotemporal features are captured by identifying the influence of regional and cross-regional features on nodes. The network traffic of each network node is predicted by representing the spatiotemporal features of each extracted node and the spatiotemporal features of each regional node, which effectively improves the accuracy of network traffic prediction and is applicable to complex network architectures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121125529B_ABST
    Figure CN121125529B_ABST
Patent Text Reader

Abstract

This application discloses a network traffic prediction method, apparatus, electronic device, and storage medium to solve the problem of low accuracy in network traffic prediction. The method includes: receiving a network traffic prediction request for a target network sent by a terminal; acquiring a topology map and a regional topology map of the target network, wherein the topology map of the target network is a connection relationship diagram of the nodes contained in the target network, and the regional topology map of the target network is a connection relationship diagram of regional nodes obtained by dividing the nodes contained in the target network based on the local dependencies between them; acquiring historical network traffic information of each node in the target network as node features of the corresponding nodes, and determining the features of the corresponding regional nodes based on the node features of each regional node; inputting the topology map of the target network, the node features, the regional topology map of the target network, and the regional node features into a network traffic prediction model to obtain a network traffic prediction result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a network traffic prediction method, apparatus, electronic device, and storage medium. Background Technology

[0002] As network layer architectures continue to expand, the complex network structures present significant challenges to troubleshooting network traffic anomalies during daily operations and maintenance. Therefore, accurately predicting the network traffic of each network device is crucial for identifying fault locations and optimizing resources in advance. Network traffic prediction is a typical spatiotemporal prediction problem. Given existing historical network traffic data for network layer nodes (i.e., network devices) and external spatial condition data (such as network topology), it predicts the future dynamic network traffic status of each network device in the network architecture, thereby determining whether a network device is faulty based on the predicted network traffic.

[0003] Complex spatiotemporal dependencies exist between different network device nodes. Spatial dependencies can be categorized into local and non-local dependencies based on the physical distance between network devices. Physically adjacent or topologically adjacent network devices typically exhibit stronger correlations; this dependency is called local dependency. Two network devices traversed by the same traffic flow often display similar network traffic patterns, even if they are physically and topologically far apart; this dependency is called non-local dependency. Compared to local spatial dependencies, non-local dependencies are more difficult to predict.

[0004] In related technologies, one approach is to use a data-driven method to handle the spatiotemporal dependencies of node network traffic, such as using LSTM (Long Short-Term Memory) models or GRU (Gated Recurrent Unit) to handle complex time-related problems with long sequences. However, this approach only considers time dependencies and ignores the mutual influence between spatial node topologies, resulting in low accuracy in network traffic prediction. Another approach is to combine CNN (Convolutional Neural Network) with spatial datasets, applying GNN (Graph Neural Networks) to path structure datasets for network traffic prediction. This can aggregate local spatial nodes while considering time dependencies. However, GNNs are only suitable for small-scale spatial aggregation dependencies and not for long-distance and multi-node network architectures. Simply increasing the network depth can lead to over-smoothing of the neural network, and directly expanding GNNs in dense node scenarios can result in low accuracy in network traffic prediction.

[0005] Therefore, improving the accuracy of network traffic prediction under complex network architectures is one of the technical problems that urgently need to be solved in the existing technology. Summary of the Invention

[0006] To address the issue of low accuracy in network traffic prediction, embodiments of this application provide a network traffic prediction method, apparatus, electronic device, and storage medium.

[0007] In a first aspect, embodiments of this application provide a network traffic prediction method, including:

[0008] Receive a network traffic prediction request for the target network sent by the receiving terminal;

[0009] Obtain the topology graph of the target network and the regional topology graph of the target network, wherein the topology graph of the target network is a connection relationship graph of the nodes contained in the target network, and the regional topology graph of the target network is a connection relationship graph of regional nodes obtained by dividing the nodes based on the local dependencies between the nodes contained in the target network;

[0010] The historical network traffic information of each node in the target network is obtained as the node characteristics of the corresponding node, and the corresponding regional node characteristics are determined based on the node characteristics of each node in each regional node.

[0011] The topology graph of the target network, the features of each node, the regional topology graph of the target network, and the features of each regional node are input into the network traffic prediction model to obtain the network traffic prediction result. The network traffic prediction model includes a graph structure construction module, a convolutional encoder, and a recurrent decoder. The graph structure construction module is used to construct the graph structure corresponding to the target network and the regional graph structure corresponding to the target network. The convolutional encoder is used to extract the spatiotemporal feature representation of each node based on the graph structure and the features of each node, and to extract the spatiotemporal feature representation of each regional node based on the regional graph structure and the features of each regional node. The recurrent encoder is used to determine the network traffic prediction result based on the spatiotemporal feature representation of each node and the spatiotemporal feature representation of each regional node.

[0012] In one embodiment, the convolutional encoder includes a first spatiotemporal convolutional block, a second spatiotemporal convolutional block, a feature fusion module, and a projection layer;

[0013] The topology of the target network, the characteristics of each node, the regional topology of the target network, and the characteristics of each regional node are input into the network traffic prediction model to obtain the network traffic prediction results, specifically including:

[0014] The topology of the target network, the features of each node, the regional topology of the target network, and the features of each regional node are input into the graph structure construction module. The graph structure construction module constructs a corresponding graph structure based on the topology of the target network and the features of each node, and constructs a corresponding regional graph structure based on the regional topology of the target network and the features of each regional node.

[0015] The graph structure is input into the first spatiotemporal convolutional block to extract the spatiotemporal feature representations of each node;

[0016] The region graph structure is input into the second spatiotemporal convolutional block to extract the spatiotemporal feature representations of each region node;

[0017] The spatiotemporal feature representations of each node and the spatiotemporal feature representations of each region node are input into the feature fusion module for feature fusion to obtain the fused spatiotemporal feature representations of each node;

[0018] The fused spatiotemporal feature representations of each node are input into the projection layer, and a one-dimensional convolution is performed on the fused spatiotemporal feature representations of each node to obtain the target spatiotemporal coding sequence.

[0019] The fused spatiotemporal feature representations of each node and the target spatiotemporal encoded sequence are input into the cyclic decoder for decoding, and the network traffic prediction results of each node are output.

[0020] In one implementation, the first spatiotemporal convolutional block includes a first spatial graph convolutional layer and a first temporal gated convolutional layer;

[0021] The graph structure is input into the first spatiotemporal convolutional block, and the spatiotemporal feature representations of each node are extracted, specifically including:

[0022] The graph structure is input into the first spatial graph convolutional layer to extract the spatial feature representation of each node;

[0023] The spatial feature representations of each node are input into the first temporally gated convolutional layer to extract the temporal feature representations of each node.

[0024] The spatiotemporal feature representation of each node is obtained based on the spatial feature representation and the temporal feature representation of each node.

[0025] In one embodiment, the second spatiotemporal convolutional block includes a second spatial graph convolutional layer and a second temporally gated convolutional layer;

[0026] The region graph structure is input into the second spatiotemporal convolutional block to extract the spatiotemporal feature representations of each region node, specifically including:

[0027] The region graph structure is input into the second spatial graph convolutional layer to extract the spatial feature representation of each region node;

[0028] The spatial feature representations of each region node are input into the second temporally gated convolutional layer to extract the temporal feature representations of each region node.

[0029] The spatiotemporal feature representation of each region node is obtained based on the spatial feature representation and the temporal feature representation of each region node.

[0030] In one implementation, the loop decoder is a gated loop unit that includes a multi-head attention mechanism;

[0031] The fused spatiotemporal feature representations of each node and the target spatiotemporal encoded sequence are input into the cyclic decoder for decoding, and the network traffic prediction results of each node are output, specifically including:

[0032] The target spatiotemporal encoded sequence is used as the hidden state of the recurrent decoder. The fused spatiotemporal feature representation and the hidden state of the recurrent decoder are projected onto h attention head subspaces respectively to generate query vector, key vector and value vector of each attention head.

[0033] For each attention head, the corresponding attention weight is determined based on the query vector and key vector of the attention head;

[0034] The context representation of the attention head is determined based on the key vector, value vector, and attention weights of the attention head;

[0035] The context representations of each attention head are merged to obtain the context representation of the multi-head attention mechanism;

[0036] The context representation of the multi-head attention mechanism is input into the gated loop unit, and the network traffic prediction results of each node are output.

[0037] In one implementation, the characteristics of a corresponding region node are determined based on the characteristics of each node in each region node, specifically including:

[0038] For each region node, the features of each node in the region node are aggregated using a pooling operation to obtain the region node features.

[0039] In one implementation, the spatiotemporal feature representations of each node and the spatiotemporal feature representations of each region node are input into the feature fusion module for feature fusion to obtain the fused spatiotemporal feature representations of each node, specifically including:

[0040] Based on the spatiotemporal feature representations of each node, the spatiotemporal feature representations of each region node, and the activation function, the attention score between each node and each region node is determined.

[0041] The attention scores between each node and each region node are normalized using the Softmax function to obtain the contribution matrix;

[0042] The contribution matrix is ​​multiplied by the spatiotemporal feature representation of each region node, and then concatenated with the spatiotemporal feature representation of each node to obtain the fused spatiotemporal feature representation of each node.

[0043] Secondly, embodiments of this application provide a network traffic prediction device, comprising:

[0044] The receiving module is used to receive network traffic prediction requests for the target network sent by the terminal.

[0045] The first acquisition module is used to acquire the topology map of the target network and the regional topology map of the target network, wherein the topology map of the target network is a connection relationship map of the nodes contained in the target network, and the regional topology map of the target network is a connection relationship map of regional nodes obtained by dividing the local dependency relationships between the nodes contained in the target network.

[0046] The second acquisition module is used to acquire the historical network traffic information of each node in the target network as the node characteristics of the corresponding node, and to determine the corresponding regional node characteristics based on the node characteristics of each node in each regional node.

[0047] The prediction module is used to input the topology graph of the target network, the features of each node, the regional topology graph of the target network, and the features of each regional node into the network traffic prediction model to obtain the network traffic prediction result. The network traffic prediction model includes a graph structure construction module, a convolutional encoder, and a recurrent decoder. The graph structure construction module is used to construct the graph structure corresponding to the target network and the regional graph structure corresponding to the target network. The convolutional encoder is used to extract the spatiotemporal feature representation of each node based on the graph structure and the features of each node, and to extract the spatiotemporal feature representation of each regional node based on the regional graph structure and the features of each regional node. The recurrent encoder is used to determine the network traffic prediction result based on the spatiotemporal feature representation of each node and the spatiotemporal feature representation of each regional node.

[0048] In one embodiment, the convolutional encoder includes a first spatiotemporal convolutional block, a second spatiotemporal convolutional block, a feature fusion module, and a projection layer;

[0049] The prediction module is specifically used to input the topology of the target network, the features of each node, the regional topology of the target network, and the features of each regional node into the graph structure construction module; the graph structure construction module constructs a corresponding graph structure based on the topology of the target network and the features of each node, and constructs a corresponding regional graph structure based on the regional topology of the target network and the features of each regional node; the graph structure is input into the first spatiotemporal convolutional block to extract the spatiotemporal feature representation of each node; the regional graph structure is input into the second spatiotemporal convolutional block to extract the spatiotemporal feature representation of each regional node; the spatiotemporal feature representation of each node and the spatiotemporal feature representation of each regional node are input into the feature fusion module for feature fusion to obtain the fused spatiotemporal feature representation of each node; the fused spatiotemporal feature representation of each node is input into the projection layer, and a one-dimensional convolution is performed on the fused spatiotemporal feature representation of each node to obtain the target spatiotemporal encoding sequence; the fused spatiotemporal feature representation of each node and the target spatiotemporal encoding sequence are input into the recurrent decoder for decoding to output the network traffic prediction result of each node.

[0050] In one implementation, the first spatiotemporal convolutional block includes a first spatial graph convolutional layer and a first temporal gated convolutional layer;

[0051] The prediction module is specifically used to input the graph structure into the first spatial graph convolutional layer to extract the spatial feature representation of each node; input the spatial feature representation of each node into the first temporally gated convolutional layer to extract the temporal feature representation of each node; and obtain the spatiotemporal feature representation of each node based on the spatial feature representation and the temporal feature representation of each node.

[0052] In one embodiment, the second spatiotemporal convolutional block includes a second spatial graph convolutional layer and a second temporally gated convolutional layer;

[0053] The prediction module is specifically used to input the region graph structure into the second spatial graph convolutional layer to extract the spatial feature representation of each region node; input the spatial feature representation of each region node into the second temporally gated convolutional layer to extract the temporal feature representation of each region node; and obtain the spatiotemporal feature representation of each region node based on the spatial feature representation and the temporal feature representation of each region node.

[0054] In one implementation, the loop decoder is a gated loop unit that includes a multi-head attention mechanism;

[0055] The prediction module is specifically used to use the target spatiotemporal encoded sequence as the hidden state of the recurrent decoder, project the fused spatiotemporal feature representation and the hidden state of the recurrent decoder onto h attention head subspaces respectively, and generate query vector, key vector and value vector for each attention head; for each attention head, determine the corresponding attention weight based on the query vector and key vector of the attention head; determine the context representation of the attention head based on the key vector, value vector and attention weight of the attention head; merge the context representations of each attention head to obtain the context representation of the multi-head attention mechanism; input the context representation of the multi-head attention mechanism into the gated recurrent unit, and output the network traffic prediction results of each node.

[0056] In one implementation, the second acquisition module is specifically used to aggregate the features of each node in the region node by pooling operations for each region node to obtain the region node features.

[0057] In one implementation, the prediction module is specifically used to determine the attention score between each node and each region node based on the spatiotemporal feature representation of each node, the spatiotemporal feature representation of each region node, and the activation function; normalize the attention score between each node and each region node using the Softmax function to obtain a contribution matrix; multiply the contribution matrix by the spatiotemporal feature representation of each region node and then concatenate it with the spatiotemporal feature representation of each node to obtain the fused spatiotemporal feature representation of each node.

[0058] Thirdly, embodiments of this application provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the network traffic prediction method described in this application.

[0059] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the network traffic prediction method described in this application.

[0060] The beneficial effects of this application are as follows:

[0061] The network traffic prediction method, apparatus, electronic device, and storage medium provided in this application embodiment receive a network traffic prediction request for a target network sent by a terminal; acquire a topology map and a regional topology map of the target network, wherein the topology map of the target network is a connection relationship map of the nodes included in the target network, and the regional topology map of the target network is a connection relationship map of regional nodes obtained based on the local dependencies between the nodes included in the target network; acquire historical network traffic information of each node included in the target network as the node features of the corresponding nodes, and determine the corresponding regional node features based on the node features of each regional node; and convert the topology map of the target network into a network topology map. The network traffic prediction model is input with the features of each node, the regional topology of the target network, and the features of each regional node to obtain the network traffic prediction result. The network traffic prediction model includes a graph structure construction module, a convolutional encoder, and a recurrent decoder. The graph structure construction module is used to construct the graph structure corresponding to the target network and the regional graph structure corresponding to the target network. The convolutional encoder is used to extract the spatiotemporal feature representation of each node based on the graph structure and the features of each node, and to extract the spatiotemporal feature representation of each regional node based on the regional graph structure and the features of each regional node. The recurrent encoder is used to determine the network traffic prediction result based on the spatiotemporal feature representation of each node and the spatiotemporal feature representation of each regional node. In this embodiment, a connection relationship graph of the corresponding regional nodes of the network is obtained in advance based on the local dependency relationship between the nodes contained in different networks, that is, the regional topology graph of the network. When a network traffic prediction request sent by the terminal is received, the topology graph of the target network and the regional topology graph of the target network are obtained, and the historical network traffic information of each node contained in the target network is used as node features. The regional node features of each region are determined according to the node features of each node in each regional node. The graph structure and regional graph structure corresponding to the target network are constructed hierarchically through the trained network traffic prediction model. The cross-regional correlation between the original graph structure features and the coarsened regional graph structure features is captured. The local spatiotemporal features of the two-layer graph structure are extracted, and the non-local spatiotemporal features are captured by identifying the influence of regional and cross-regional features on nodes. The network traffic of each network node is predicted by representing the spatiotemporal features of each extracted node and the spatiotemporal features of each regional node, which effectively improves the accuracy of network traffic prediction and is applicable to complex network architectures.

[0062] Other features and advantages of this application will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings. Attached Figure Description

[0063] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0064] Figure 1 This is a schematic diagram illustrating an application scenario of the network traffic prediction method provided in the embodiments of this application;

[0065] Figure 2 A flowchart of the network traffic prediction method provided in the embodiments of this application;

[0066] Figure 3 Example diagrams of the topology of target network nodes and region topology provided in embodiments of this application;

[0067] Figure 4 Specific example diagrams of historical network traffic data provided in the embodiments of this application;

[0068] Figure 5 This is a schematic diagram of the network traffic prediction model provided in the embodiments of this application;

[0069] Figure 6 A flowchart for obtaining network traffic prediction results provided in an embodiment of this application;

[0070] Figure 7 A schematic diagram illustrating the temporal feature representation of the region nodes extracted by the second time-gated convolutional layer, as provided in an embodiment of this application;

[0071] Figure 8 A schematic diagram illustrating the fusion process of node spatiotemporal features and regional node spatiotemporal features provided in an embodiment of this application;

[0072] Figure 9 A schematic diagram illustrating the fusion process of node features of the graph structure corresponding to the target network and regional node features of the regional graph structure provided in this embodiment of the application.

[0073] Figure 10 This is a schematic diagram of the decoding process provided in an embodiment of this application;

[0074] Figure 11 This is a schematic diagram of the network traffic prediction device provided in the embodiments of this application;

[0075] Figure 12 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0076] To address the issue of low accuracy in network traffic prediction, embodiments of this application provide a network traffic prediction method, apparatus, electronic device, and storage medium.

[0077] The preferred embodiments of this application are described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit this application. Furthermore, the embodiments and features in the embodiments of this application can be combined with each other without conflict.

[0078] First refer to Figure 1 This is a schematic diagram of an application scenario of the network traffic prediction method provided in this application embodiment. It may include a terminal 101, a server 102, and a network traffic monitoring system 103. The server 102 receives a network traffic prediction request for a target network sent by the terminal 101. The server 102 obtains the topology map and the regional topology map of the target network. The topology map of the target network is a connection relationship diagram of the nodes contained in the target network. The regional topology map of the target network is a connection relationship diagram of regional nodes obtained based on the local dependency relationship between the nodes contained in the target network. The server 102 obtains the historical network traffic information of each node contained in the target network from the network traffic monitoring system 103 as the node features of the corresponding nodes, and determines the corresponding regional node features based on the node features of each regional node. The topology map of the target network, the node features, the regional topology map of the target network, and the regional node features are input into the network traffic prediction model to obtain the network traffic prediction result.

[0079] Terminal 101 may be, but is not limited to, tablet computers, laptops, desktop computers, smartphones, etc. Server 102 may be an independent physical server or a cloud server providing basic cloud computing services such as cloud servers, cloud databases, and cloud storage. Network traffic monitoring system 103 may be, but is not limited to, servers, server clusters, etc. Server 102 and terminal 101 can be connected via a network, and server 102 and network traffic monitoring system 103 can be connected via a network. This application embodiment does not limit the specific connection.

[0080] The network traffic prediction method provided in this application can be applied to the following fields: banking, video, image processing, network security, and any other internet-related technical fields. This application does not limit the application to these fields.

[0081] Based on the above application scenarios, the following will refer to the appendix. Figures 2-10 The exemplary embodiments of this application are described in more detail below. It should be noted that the above application scenarios are shown only to facilitate understanding of the spirit and principles of this application, and the implementation methods of this application are not limited in any way. On the contrary, the implementation methods of this application can be applied to any applicable scenario.

[0082] like Figure 2The diagram shown illustrates the implementation flow of the network traffic prediction method provided in this application embodiment. This network traffic prediction method can be applied to the server 102 described above, and specifically includes the following steps:

[0083] S21. The server receives a network traffic prediction request for the target network sent by the terminal.

[0084] In practice, the network traffic prediction request carries the identification information of the target network. The target network can be any network architecture, such as an enterprise intranet or extranet. The identifier of an independent network refers to the network address or number that can uniquely identify the identity and boundary of this network. The identifier of the target network can, but is not limited to, use CIDR (Classless Inter-Domain Routing) address blocks. CIDR address blocks are used to identify the IP address range of an independent subnet or autonomous network, and consist of a network prefix (such as 192.168.1.0) and a prefix length (such as / 24).

[0085] S22. Obtain the topology map of the target network and the regional topology map of the target network.

[0086] In practice, the server can obtain the target network's topology map and regional topology map corresponding to the target network's identification information, based on the correspondence between the network's identification information and the network's topology map and regional topology map. The target network's topology map is a graph showing the connection relationships between the nodes within the target network, while the regional topology map is a graph showing the connection relationships between regional nodes obtained by partitioning the target network based on the local dependencies between the nodes within the target network.

[0087] In this embodiment, network administrators can pre-divide the connection relationship diagrams of regional nodes corresponding to different networks based on the local dependencies between nodes contained in the topology diagrams of the different networks they manage, and then link the network identification information with the network topology diagram and the network's regional topology. Figure 3The correspondence between nodes is stored in the server. Each node represents a network device, which may include, but is not limited to, the following devices: servers, terminals, computers, routers, switches, firewalls, base stations, etc., but this application embodiment does not limit this. The network topology diagram is a graphical representation of the nodes (network devices) and their connection relationships (edges) in the network, which can intuitively show the network structure, connectivity, and organization. A region node is a region composed of at least one node in the network. The nodes in the same region node have local dependencies or non-local dependencies. For example, nodes that are physically adjacent or topologically adjacent have local dependencies and can be classified as the same region node. Nodes that are traversed by the same service flow have non-local dependencies, and even if these nodes are physically and topologically far apart, they can still be classified as the same region node.

[0088] When the server receives a network traffic prediction request for a target network from the terminal, it can look up the target network's topology map and regional topology map based on the target network's identification information and the correspondence between the network's identification information and the network's topology map and regional topology map.

[0089] like Figure 3 As shown, this is an example diagram of the topology of the target network nodes and the regional topology. It illustrates the process of dividing the topology of the target network into regional topologies. Figure 3 As can be seen, the topology of the target network is divided into 7 regions. From top to bottom and from left to right, the number of original nodes in each region is 3, 4, 3, 2, 2, 3, 3. By treating each region as a region node, the regional topology of the target network can be obtained, which includes 7 region nodes.

[0090] S23. Obtain the historical network traffic information of each node in the target network as the node characteristics of the corresponding node, and determine the corresponding regional node characteristics based on the node characteristics of each regional node.

[0091] Time dependence can manifest in three patterns: proximity, daily periodicity, and weekly periodicity. Proximity refers to the strong influence of a network device's recent network traffic performance on future network traffic. For example, network traffic at 10:00 AM during a marketing event will affect the traffic trend after 11:00 AM. Daily periodicity means that network traffic of a network device changes periodically every day. For example, if a single service experiences a sharp increase in network traffic during a certain period on a weekday, the network traffic during that period on all weekdays will be consistent. Weekly periodicity means that network traffic changes periodically every weekday. For example, if a marketing campaign is fixed on every Friday, the network traffic on Fridays during the marketing campaign period will be consistent.

[0092] Based on this, in order to more accurately mine the temporal characteristics of network traffic, this application considers the above three time-dependency patterns when obtaining the historical network traffic of each node in the target network. For each node, it obtains the network traffic data of the same time period of the previous week, the same time period of the previous day, and the first two hours of the current time of the current day as historical network traffic, that is, the time series corresponding to the network traffic, to predict the network traffic of the node in the next hour. Figure 4 As shown, this is a specific example of historical network traffic data, used to model the time dependence of nodes (i.e., proximity, daily periodicity, weekly periodicity), and a length of T can be extracted along the time cycle. C ×T f (adjacent segment), T w ×T f (Weekly periodic segment), and T d ×T f Three network traffic sequence segments (T) of the daily periodic segment C =T d =T w =2, indicating the number of data sets), assuming a sampling frequency q = 300s / day (i.e., 5-minute intervals / day), the current time step is t, and the historical window interval is set to 1 hour: T f =12(1h).

[0093] The network traffic sequence segment of a node proximity segment is specifically as follows: Intuitively, it is a time series directly adjacent to the prediction time step (e.g., Figure 4 (Sampling data from 6:00 AM to 8:00 AM on June 6, 2025).

[0094] The specific network traffic sequence segment of a node's daily periodic segment is as follows:

[0095] The specific network traffic sequence segment of a node in a weekly periodic segment is as follows:

[0096]

[0097] The above three network traffic sequence segments are concatenated to form the historical network traffic X of this node: X = X c ||X d ||X w ∈R n×T Where || denotes the concatenation operation, and T = (T c +T d +T w )×T f The historical network traffic X of a node is used as its node characteristic. Through this method, the node characteristics of each node in the target network can be obtained.

[0098] Furthermore, the characteristics of the corresponding regional nodes are determined based on the node characteristics of each node contained in each regional node.

[0099] In practice, for each regional node, the features of each node in the regional node are aggregated using a pooling operation to obtain the regional node features.

[0100] Specifically, but not limited to, average pooling or max pooling operations can be performed on the node features of each node contained in the region node to obtain the region node features.

[0101] S24. Input the topology of the target network, the characteristics of each node, the regional topology of the target network, and the characteristics of each regional node into the network traffic prediction model to obtain the network traffic prediction results.

[0102] The structure of the network traffic prediction model provided in this application embodiment is as follows: Figure 5 As shown, the network traffic prediction model includes a graph structure construction module 301, a convolutional encoder 302, and a recurrent decoder 303. The graph structure construction module 301 is used to construct the graph structure corresponding to the target network and the regional graph structure corresponding to the target network. The convolutional encoder 302 is used to extract the spatiotemporal feature representation of each node based on the graph structure and the features of each node, and to extract the spatiotemporal feature representation of each regional node based on the regional graph structure and the features of each regional node. The recurrent encoder 303 is used to determine the network traffic prediction result based on the spatiotemporal feature representation of each node and the spatiotemporal feature representation of each regional node. The convolutional encoder 302 includes two spatiotemporal convolutional blocks (ST-Conv blocks): a first spatiotemporal convolutional block (ST-Conv block 1) and a second spatiotemporal convolutional block (ST-Conv block 2). The convolutional encoder 302 also includes a feature fusion module and a projection layer. The projection layer can use two fully connected layers. The first spatiotemporal convolutional block includes a first spatial graph convolutional layer and a first temporally gated convolutional layer, and the second spatiotemporal convolutional block includes a second spatial graph convolutional layer and a second temporally gated convolutional layer. The loop decoder 303 is a gated loop unit that includes a multi-head attention mechanism.

[0103] When implementing, it can be done according to the following: Figure 6 The process shown to obtain network traffic prediction results includes the following steps:

[0104] S41. Input the topology of the target network, the characteristics of each node, the regional topology of the target network, and the characteristics of each regional node into the graph structure construction module. The graph structure construction module constructs the corresponding graph structure based on the topology of the target network and the characteristics of each node, and constructs the corresponding regional graph structure based on the regional topology of the target network and the characteristics of each regional node.

[0105] In this step, the server inputs the topology of the target network, the characteristics of each node, the regional topology of the target network, and the characteristics of each regional node into the graph structure construction module in the network traffic prediction model, so as to construct the graph structure corresponding to the topology of the target network and the regional graph structure corresponding to the regional topology of the target network, respectively.

[0106] In practical implementation, the graph structure corresponding to the topology of the target network can be represented by G, where G = (V, E, A), and V represents the set of nodes in the target network, E represents the set of edges between nodes, and A represents the adjacency matrix, where A ∈ {0, 1}. n×n Where n is the number of nodes in the target network, and the current node's characteristic is the historical network traffic of each node at the current moment: X t ∈R n The region topology of the target network corresponds to the region graph structure, which can be G. R This refers to the region graph structure after coarsening the topology of the target network using the aforementioned node clustering method, G. R =(V R E R A R ), G R =(V R E R A R =NodeClustering(G,X), V R For the set of region nodes (also known as the coarsened node set), E R Let A be the set of edges between nodes in the region (also known as the coarsened edge set). R This is the region adjacency matrix (also known as the coarsened adjacency matrix). n R The region node number (i.e., the number of coarsened nodes) and the region node feature X R =f pool (X,V→V R ), V→V R This represents the membership relationship between nodes and region nodes. The overall objective of network traffic prediction is to learn a mapping function f, using given nodes and historical network traffic to predict future trends in network traffic. The specific objective function is shown below:

[0107] Y = (Y t+1 ,…,Y t+p ) = f(G,X;G R ,X R )

[0108] Where t represents the current time and p represents the prediction time step.

[0109] Geographic correlation indicates that adjacent nodes have local spatial dependencies. The topology graph G of the target network can be constructed by connecting geographically proximate nodes to ensure information flows along the edges. The adjacency matrix A = {A...} ij}, Where, d ij The distance between node i and node j is represented by the number of nodes between them. If the distance between them exceeds 2 nodes, they can be considered to have no direct relationship.

[0110] In one implementation, in order to enable the generated region graph structure to simultaneously capture topological adjacency and temporal correlation, this application uses the adjacency matrix {A} ij Replace} with the new adjacency constraint similarity matrix {SA} ij}, SA ij =A ij ⊙W ij Where ⊙ represents the element-level Hadamard product, W ij The weight matrix is ​​obtained by calculating the similarity of time series between nodes.

[0111] Specifically, the Dynamic Time Warping (DTW) algorithm can be used to calculate the similarity between the time series of two nodes, given the time series of two nodes. and Its distance matrix D∈R m×n Defined as The minimum DTW distance is:

[0112] D min (m,n)=D u,v +min{D min (u-1,v),D min (u,v-1),D min (u-1,v-1)}

[0113] Among them, D min (m,n) represents the minimum DTW distance between S1 and S2, which represents the time distance; the smaller the value, the greater the similarity. The weight matrix is:

[0114] W ij =exp(-D min (S i ,S j ) / σ)

[0115] Where σ is and All paths are at or below the standard deviation.

[0116] After calculating the new adjacency constraint similarity matrix {SA ijAfterwards, spectral clustering is applied to it, and each cluster is regarded as the region graph structure G corresponding to the region topology graph of the target network's region nodes. R A region node, also known as a coarsening node, can perform pooling operations on the historical network traffic of nodes within the region to obtain the region node characteristics. For example, an average pooling operation can be performed to take the average historical network traffic of each node within the region as the region node characteristics.

[0117] To model the local spatial dependencies of regional nodes, the topological adjacency relationships between regional nodes, also known as the regional adjacency matrix, are defined based on the geographical distance between them:

[0118]

[0119] The connection relationships between region nodes are determined by the region adjacency matrix of the region graph structure.

[0120] S42. Input the graph structure into the first spatiotemporal convolutional block and extract the spatiotemporal feature representations of each node.

[0121] In this embodiment, the first spatiotemporal convolutional block of the convolutional encoder is a node-level spatiotemporal convolutional block. The first spatial graph convolutional layer in the first spatiotemporal convolutional block and the second spatial graph convolutional layer in the second spatiotemporal convolutional block can both be implemented using a Graph Convolutional Network (GCN). The first temporally gated convolutional layer in the first spatiotemporal convolutional block and the second temporally gated convolutional layer in the second spatiotemporal convolutional block are one-dimensional convolutions along the time dimension, and can both be implemented using a gated linear unit (GLU). This embodiment does not limit the implementation of these features.

[0122] In one embodiment, the first spatial graph convolutional layer and the second spatial graph convolutional layer may also employ HGNN (Hierarchical Graph Neural Network), but this application does not limit this aspect.

[0123] In specific implementation, the graph structure is input into the first spatial graph convolutional layer to extract the spatial feature representation of each node, and the spatial feature representation of each node is input into the first temporal gated convolutional layer to extract the temporal feature representation of each node. Based on the spatial feature representation and the temporal feature representation of each node, the spatiotemporal feature representation of each node is obtained.

[0124] Specifically, after constructing the graph structure corresponding to the topology graph of the target network, the graph structure construction module inputs the graph structure into the first spatial graph convolutional layer to extract the local spatial feature representation of each node, and inputs the features of each node into the first time-gated convolutional layer to extract the temporal feature representation of each node, where the feature representation is the feature vector.

[0125] As a filter for nodes in an undirected graph, the original GCN relies on the decomposition of the graph Laplacian matrix and performs filtering in the frequency domain, as shown in the following formula:

[0126] Θ *G X=Θ(L)X=UΘ(Λ)U T X

[0127] Where Θ is the convolution kernel, L is the graph Laplacian matrix, U is the Fourier basis (i.e., the eigenvectors of L), and Λ is a diagonal matrix composed of the eigenvalues ​​of L. Since the original GCN has a large computational cost, a Chebyshev polynomial approximation is used to reduce the computational burden. The specific formula is as follows:

[0128]

[0129] Where, θ∈R k Here are the learnable polynomial parameters, and K⁻¹ is the order of the Chebyshev polynomial. This is a scaled graph Laplacian matrix to enhance representational power.

[0130] The historical network traffic X∈R of a node n×T Applying the same GCN at each time step yields the local spatial feature representation F of each node. s The first spatial graph convolutional layer can be represented as:

[0131] F s =SpatialGraphConv(X)=ReLU(Θ *A X)∈R n×T×D

[0132] Where A is the adjacency matrix of the graph structure, and D is the hidden layer dimension of the first spatial graph convolutional layer.

[0133] The first spatial graph convolutional layer outputs the local spatial features F of each node. s The input is passed to the first temporally gated convolutional layer. For each node, the temporally gated convolutional layer explores the input elements of adjacent time steps, while the size of the temporal dimension remains unchanged.

[0134] The input to the first-time gated convolutional layer is The usable core size is K t =3 one-dimensional convolution kernel The convolution output is [P,Q]∈R n×T×D The feature dimension is split into two parts as input to GLU. The first time-gated convolutional layer can be represented as:

[0135]

[0136] Where F represents the spatiotemporal features of each node, ⊙ represents the element-level Hadamard product, and σ(Q) is the sigmoid gate function, which determines how much of the feature information in P can be gated.

[0137] S43. Input the region graph structure into the second spatiotemporal convolutional block and extract the spatiotemporal feature representations of each region node.

[0138] In specific implementation, the regional graph structure is input into the second spatial graph convolutional layer to extract the spatial feature representation of each regional node. The spatial feature representation of each regional node is then input into the second temporally gated convolutional layer to extract the temporal feature representation of each regional node. Based on the spatial feature representation and the temporal feature representation of each regional node, the spatiotemporal feature representation of each regional node is obtained.

[0139] The second spatiotemporal convolutional block is a region-level spatiotemporal convolutional block. Its extraction of spatial, temporal, and spatiotemporal feature representations of region nodes is similar to that of the node-level spatiotemporal convolutional block, and will not be elaborated here.

[0140] Regional node characteristics Applying the same GCN at each time step yields the local spatial feature representation F of each region node. s R The second spatial graph convolutional layer can be represented as:

[0141]

[0142] Where D is the region adjacency matrix. R is the hidden layer dimension of the second spatial graph convolutional layer.

[0143] The second-time gated convolutional layer can be represented as:

[0144]

[0145] Among them, F R Let ⊙ represent the spatiotemporal characteristics of each region node, ⊙ represent the element-level Hadamard product, and σ(Q) represent the spatiotemporal characteristics of each region node. R ) is the sigmoid gate function, which determines P R How much of the feature information in the data can be gated?

[0146] like Figure 7 As shown, it is a schematic diagram of the temporal feature representation of the region nodes extracted by the second temporal gated convolutional layer.

[0147] S44. Input the spatiotemporal feature representations of each node and the spatiotemporal feature representations of each region node into the feature fusion module for feature fusion to obtain the fused spatiotemporal feature representations of each node.

[0148] When implementing, it can be done according to the following: Figure 8The process shown obtains the fused spatiotemporal feature representation of each node, including the following steps:

[0149] S51. Based on the spatiotemporal feature representations of each node, the spatiotemporal feature representations of each region node, and the activation function, determine the attention score between each node and each region node.

[0150] In implementation, to capture the nonlocal spatial dependencies of nodes, it is necessary to identify the associations between regional node features and node features. However, the associations between multi-level features are difficult to define and are not limited by geographical distance. For example, nodes i and j are both located in a DMZ (demilitarized zone), while region k is located in the intranet. Although nodes i and j are geographically far apart, based on similar network traffic distributions, the feature pattern of node i may be closer to node j than region k. Therefore, this application proposes a feature fusion module based on an attention mechanism. During the training of the network traffic prediction model, it learns the association strength between all nodes and regional nodes, and after converting the regional node features into the same form as the node features, it concatenates them with the node features to enhance the nonlocal spatial feature representation.

[0151] Specifically, the feature fusion module can calculate the attention score between each node and each region node using the following formula:

[0152]

[0153] Where, α ij This represents the attention score between node i and region node j, reflecting the degree of influence of node i on region node j; W and b are node parameters, where W... R b R σ represents the region node parameters, and the activation function σ is ReLU.

[0154] S52. Normalize the attention scores between each node and each region node using the Softmax function to obtain the contribution matrix.

[0155] In practice, the feature fusion module normalizes the attention scores between each node and each region node using the Softmax function to obtain the contribution matrix S. con ,

[0156] S53. Multiply the contribution matrix by the spatiotemporal feature representation of each region node and then concatenate the result with the spatiotemporal feature representation of each node to obtain the fused spatiotemporal feature representation of each node.

[0157] The spatiotemporal features of each node are specifically represented as follows:

[0158]

[0159] Among them, F out This represents the fused spatiotemporal characteristics of each node;

[0160] F represents the spatiotemporal characteristics of each node;

[0161] F R S represents the spatiotemporal characteristics of a region node. con F R This represents the spatiotemporal characteristics of the transformed regional nodes;

[0162] D represents the feature dimension of the node, D R Represents the feature dimension of a region node.

[0163] like Figure 9 As shown, it is a schematic diagram of the fusion process of node features of the graph structure corresponding to the target network and regional node features of the regional graph structure.

[0164] S45. Input the fused spatiotemporal feature representation of each node into the projection layer, and perform one-dimensional convolution on the fused spatiotemporal feature representation of each node to obtain the target spatiotemporal coding sequence.

[0165] In implementation, the two fully connected layers in the projection layer are used for linear mapping to reduce or transform the fused spatiotemporal feature representation, mapping the fused spatiotemporal features to a new representation space, making it more suitable for subsequent tasks. The output after the projection process is the state representation of the system.

[0166] The projection layer is essentially a one-dimensional convolution along the time dimension, and the kernel size can be set to K. p =T, representing the fused spatiotemporal features of each node F out Perform one-dimensional convolution to map it into the target spatiotemporal encoded sequence. The projection layer can cover a wide receptive field of the entire spatiotemporal coding sequence and can aggregate information from the feature fusion module.

[0167] In this embodiment, a graph structure construction module is used to design a spatiotemporal node clustering method to construct a hierarchical structure, which fully captures the cross-regional correlation of the original feature layer and the coarsened feature layer. A convolutional encoder is used to extract the local spatiotemporal features of the two layers, and a novel feature fusion module based on the attention mechanism is constructed. By identifying the influence of intra-regional and cross-regional features on nodes, non-local spatiotemporal features that are topologically distant but highly similar are effectively extracted, thereby improving the accuracy of spatiotemporal feature extraction.

[0168] S46. Input the fused spatiotemporal feature representation of each node and the target spatiotemporal encoded sequence into the loop decoder for decoding, and output the network traffic prediction results of each node.

[0169] like Figure 10 The diagram shown illustrates the decoding process, which may include the following steps:

[0170] S61. The target spatiotemporal encoded sequence is used as the hidden state of the recurrent decoder. The fused spatiotemporal feature representation and the hidden state of the recurrent decoder are projected onto h attention head subspaces respectively to generate the query vector, key vector and value vector of each attention head.

[0171] In specific implementation, the target spatiotemporal encoded sequence As the first hidden state of the recurrent decoder, the recurrent decoder uses a gated recurrent unit (GRUA-MH) with multi-head attention mechanism to dynamically construct the multi-dimensional temporal correlation between historical time steps and future time steps. The impact of historical network traffic status at different time steps on future states may be reflected in various modes (such as short-term fluctuations and long-term cycles). Using multi-head attention mechanism for parallel subspace processing can capture richer dependencies.

[0172] In this step, the fused spatiotemporal feature representation F of each node is... out and the hidden state s of the loop decoder j-1 Project the vectors onto h independent attention head subspaces to generate the query vector Q for each attention head. h Key vector K h Sum vector V h .

[0173] In this embodiment, by introducing multi-attention head projection, a single attention is decomposed into h subspaces for computation. Each head can learn different temporal dependency patterns (such as short-term proximity effect, long-term periodicity, etc.), and can simultaneously capture multiple temporal patterns in network traffic (such as short-term dependency of "morning peak-evening peak", "weekday-weekend", "marketing start-marketing end" periodic dependency). The number of attention heads is controlled by the parameter h, balancing model complexity and representation ability. Multi-head attention is computed in parallel, improving training and prediction efficiency.

[0174] S62. For each attention head, determine the corresponding attention weight based on the query vector and key vector of the attention head.

[0175] In practice, the time-step relevance is calculated independently for each attention head, and the corresponding attention weight of the attention head is determined based on the query vector and key vector of the attention head.

[0176] Specifically, the attention weight corresponding to the attention head can be calculated using the following formula.

[0177]

[0178] Among them, head-level projection is defined: Vi h =F i W v h , For the head-level projection matrix; F i This is the fused spatiotemporal feature representation of each node at the i-th time step, which is shared across all heads and is obtained by combining it with the projection matrix. Multiplication, and with the projection matrix Multiply, F i The key is projected onto the subspace of the h-th attention head to obtain the key specific to that head. Sum V i h ;d k This is the scaling factor, also known as the key vector dimension, used to scale the dot product and prevent the softmax gradient from vanishing due to an excessively large dot product result.

[0179] S63. Determine the contextual representation of the attention head based on the key vector, value vector, and attention weights of the attention head.

[0180] In practice, the contextual representation of the attention head can be calculated using the following formula.

[0181]

[0182] in, Let h be the context representation of the h-th attention head;

[0183] The subspace features obtained through projection are essentially obtained through the keys of the head. Sum V i h reflect.

[0184] S64. Merge the context representations of each attention head to obtain the context representation of the multi-head attention mechanism.

[0185] In practice, the context representations output by each attention head are concatenated and then linearly transformed to obtain the final context representation (i.e., attention state) z of the multi-head attention mechanism. j :

[0186]

[0187] Among them, W O To output the projection matrix, the context representation of the concatenated multi-head attention mechanism is mapped to the decoder's hidden state space.

[0188] S65. Input the context representation of the multi-head attention mechanism into the gated recurrent unit and output the network traffic prediction results of each node.

[0189] In practice, the GRU computation process incorporating multi-head attention is as follows: The input of the traditional GRU is replaced with the context representation of the multi-head attention mechanism (multi-head attention output). j Other gating mechanisms remain unchanged:

[0190]

[0191] in, The reset function is the prediction result from the previous time step (initially a vector of all zeros). j To reset the door, update j To update the gate, the context representation z is obtained through a multi-head attention mechanism. j Dynamically adjust the retention and forgetting of historical information.

[0192] The output of the gated loop unit is the network traffic prediction result for each node at each time step in the next prediction period:

[0193] During the training phase of the network traffic prediction model, model optimization can be performed by preserving external features (such as weekdays, holidays, weekends, device health, etc.). The encoding and concatenation logic of these external features are retained, and attention only needs to be paid to the dimensionality matching of the multi-head attention output.

[0194]

[0195] The loss function can be the mean absolute error (MAE):

[0196]

[0197] Among them, parameter θ adds the projection matrix of each attention head. Parameter optimization can be performed through backpropagation.

[0198] After predicting the network traffic for each node, the actual network traffic at each time step is compared. If the difference between the two is greater than a set threshold, the node is marked as a fault point. The set threshold can be set according to the actual service type, and this application embodiment does not limit it.

[0199] The network traffic prediction model provided in this application combines a novel architecture of hierarchical GCN, Seq2Seq (sequence-to-sequence) architecture, and multi-head attention mechanism. This novel model uses a multilayer perceptron (MLP) mechanism to map network traffic time series to an embedding space, capturing non-local spatial dependencies through the similarity of node embeddings to ensure the effectiveness of long-distance topology. This novel model has low time and space complexity (O(n×n)). R•d)) This effectively avoids the dramatic increase in node computation caused by the addition of network devices. Using this novel model for network traffic prediction and fault diagnosis solves the complex spatiotemporal dependencies within network topology nodes. To construct a hierarchical structure, a special topology graph node clustering method based on spectral clustering is involved, preserving the complexity of the original topology.

[0200] In the network traffic prediction method provided in this application embodiment, a connection relationship graph of the corresponding regional nodes of the network is obtained in advance based on the local dependency relationship between the nodes contained in different networks, that is, the regional topology graph of the network. When a network traffic prediction request sent by the terminal is received, the topology graph of the target network and the regional topology graph of the target network are obtained, and the historical network traffic information of each node contained in the target network is used as node features. The regional node features of each region are determined according to the node features of each node in each regional node. The graph structure and regional graph structure corresponding to the target network are constructed hierarchically through the trained network traffic prediction model. The cross-regional correlation between the original graph structure features and the coarsened regional graph structure features is captured. The local spatiotemporal features of the two-layer graph structure are extracted, and the non-local spatiotemporal features are captured by identifying the influence of regional and cross-regional features on nodes. The network traffic of each network node is predicted by representing the spatiotemporal features of each node and the spatiotemporal features of each regional node, which effectively improves the accuracy of network traffic prediction and is applicable to complex network architectures.

[0201] Based on the same inventive concept, this application also provides a network traffic prediction device. Since the principle of the network traffic prediction device in solving the problem is similar to that of the network traffic prediction method, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.

[0202] like Figure 11 The diagram shown is a structural schematic of the network traffic prediction device provided in this application embodiment, which can be applied to... Figure 1 In the server 102 shown, the network traffic prediction device may include:

[0203] The receiving module 71 is used to receive a network traffic prediction request for the target network sent by the terminal;

[0204] The first acquisition module 72 is used to acquire the topology map of the target network and the regional topology map of the target network, wherein the topology map of the target network is a connection relationship map of the nodes contained in the target network, and the regional topology map of the target network is a connection relationship map of regional nodes obtained by dividing the local dependency relationship between the nodes contained in the target network.

[0205] The second acquisition module 73 is used to acquire the historical network traffic information of each node in the target network as the node characteristics of the corresponding node, and to determine the corresponding regional node characteristics based on the node characteristics of each node in each regional node.

[0206] The prediction module 74 is used to input the topology graph of the target network, the features of each node, the regional topology graph of the target network, and the features of each regional node into the network traffic prediction model to obtain the network traffic prediction result. The network traffic prediction model includes a graph structure construction module, a convolutional encoder, and a recurrent decoder. The graph structure construction module is used to construct the graph structure corresponding to the target network and the regional graph structure corresponding to the target network. The convolutional encoder is used to extract the spatiotemporal feature representation of each node based on the graph structure and the features of each node, and to extract the spatiotemporal feature representation of each regional node based on the regional graph structure and the features of each regional node. The recurrent encoder is used to determine the network traffic prediction result based on the spatiotemporal feature representation of each node and the spatiotemporal feature representation of each regional node.

[0207] In one embodiment, the convolutional encoder includes a first spatiotemporal convolutional block, a second spatiotemporal convolutional block, a feature fusion module, and a projection layer;

[0208] The prediction module 74 is specifically used to input the topology graph of the target network, the features of each node, the regional topology graph of the target network, and the features of each regional node into the graph structure construction module; the graph structure construction module constructs a corresponding graph structure based on the topology graph of the target network and the features of each node, and constructs a corresponding regional graph structure based on the regional topology graph of the target network and the features of each regional node; the graph structure is input into the first spatiotemporal convolutional block to extract the spatiotemporal feature representation of each node; the regional graph structure is input into the second spatiotemporal convolutional block to extract the spatiotemporal feature representation of each regional node; the spatiotemporal feature representation of each node and the spatiotemporal feature representation of each regional node are input into the feature fusion module for feature fusion to obtain the fused spatiotemporal feature representation of each node; the fused spatiotemporal feature representation of each node is input into the projection layer to perform one-dimensional convolution on the fused spatiotemporal feature representation of each node to obtain the target spatiotemporal encoding sequence; the fused spatiotemporal feature representation of each node and the target spatiotemporal encoding sequence are input into the recurrent decoder for decoding to output the network traffic prediction result of each node.

[0209] In one implementation, the first spatiotemporal convolutional block includes a first spatial graph convolutional layer and a first temporal gated convolutional layer;

[0210] The prediction module 74 is specifically used to input the graph structure into the first spatial graph convolutional layer to extract the spatial feature representation of each node; input the spatial feature representation of each node into the first temporally gated convolutional layer to extract the temporal feature representation of each node; and obtain the spatiotemporal feature representation of each node based on the spatial feature representation and the temporal feature representation of each node.

[0211] In one embodiment, the second spatiotemporal convolutional block includes a second spatial graph convolutional layer and a second temporally gated convolutional layer;

[0212] The prediction module 74 is specifically used to input the region graph structure into the second spatial graph convolutional layer to extract the spatial feature representation of each region node; input the spatial feature representation of each region node into the second temporally gated convolutional layer to extract the temporal feature representation of each region node; and obtain the spatiotemporal feature representation of each region node based on the spatial feature representation and the temporal feature representation of each region node.

[0213] In one implementation, the loop decoder is a gated loop unit that includes a multi-head attention mechanism;

[0214] The prediction module 74 is specifically used to use the target spatiotemporal encoded sequence as the hidden state of the recurrent decoder, project the fused spatiotemporal feature representation and the hidden state of the recurrent decoder onto h attention head subspaces respectively, and generate query vector, key vector and value vector for each attention head; for each attention head, determine the corresponding attention weight based on the query vector and key vector of the attention head; determine the context representation of the attention head based on the key vector, value vector and attention weight of the attention head; merge the context representations of each attention head to obtain the context representation of the multi-head attention mechanism; input the context representation of the multi-head attention mechanism into the gated recurrent unit, and output the network traffic prediction results of each node.

[0215] In one embodiment, the second acquisition module 73 is specifically used to aggregate the features of each node in the region node by pooling operations for each region node to obtain the region node features.

[0216] In one implementation, the prediction module 74 is specifically used to determine the attention score between each node and each region node based on the spatiotemporal feature representation of each node, the spatiotemporal feature representation of each region node, and the activation function; normalize the attention score between each node and each region node using the Softmax function to obtain a contribution matrix; multiply the contribution matrix by the spatiotemporal feature representation of each region node and then concatenate it with the spatiotemporal feature representation of each node to obtain the fused spatiotemporal feature representation of each node.

[0217] Based on the same technical concept, this application also provides an electronic device 800, referring to... Figure 12 As shown, the electronic device 800 is used to implement the network traffic prediction method described in the above-described method embodiments. The electronic device 800 in this embodiment may include: a memory 801, a processor 802, and a computer program stored in the memory and executable on the processor, such as a network traffic prediction program. When the processor executes the computer program, it implements the steps in the various network traffic prediction method embodiments described above.

[0218] This application embodiment does not limit the specific connection medium between the memory 801 and the processor 802. This application embodiment... Figure 12 The memory 801 and the processor 802 are connected via a bus 803, and the bus 803 is in Figure 12 The connections between other components are shown in bold and are for illustrative purposes only, not as limiting information. The bus 803 can be divided into address bus, data bus, control bus, etc. For ease of illustration, Figure 12 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0219] Memory 801 may be volatile memory, such as random-access memory (RAM); memory 801 may also be non-volatile memory, such as read-only memory, flash memory, hard disk drive (HDD), or solid-state drive (SSD); or memory 801 may be any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but is not limited thereto. Memory 801 may be a combination of the above-described memories.

[0220] The processor 802 is used to implement the network traffic prediction method provided in the embodiments of this application.

[0221] This application also provides a computer-readable storage medium storing computer-executable instructions required to execute the processor, including a program required to execute the processor.

[0222] In some possible implementations, various aspects of the network traffic prediction method provided in this application can also be implemented as a program product comprising program code that, when the program product is run on an electronic device, causes the electronic device to perform the steps of the network traffic prediction method according to the various exemplary embodiments of this application described above.

[0223] Those skilled in the art will understand that embodiments of this application can be provided as methods, apparatus, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0224] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (devices), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0225] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0226] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0227] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.

[0228] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A network traffic prediction method, characterized in that, include: Receive a network traffic prediction request for the target network sent by the receiving terminal; Obtain the topology graph of the target network and the regional topology graph of the target network, wherein the topology graph of the target network is a connection relationship graph of the nodes contained in the target network, and the regional topology graph of the target network is a connection relationship graph of regional nodes obtained by dividing the nodes based on the local dependencies between the nodes contained in the target network; The historical network traffic information of each node in the target network is obtained as the node characteristics of the corresponding node, and the corresponding regional node characteristics are determined based on the node characteristics of each node in each regional node. The topology graph of the target network, the features of each node, the regional topology graph of the target network, and the features of each regional node are input into the network traffic prediction model to obtain the network traffic prediction result. The network traffic prediction model includes a graph structure construction module, a convolutional encoder, and a recurrent decoder. The graph structure construction module is used to construct the graph structure corresponding to the target network and the regional graph structure corresponding to the target network. The convolutional encoder is used to extract the spatiotemporal feature representation of each node based on the graph structure and the features of each node, and to extract the spatiotemporal feature representation of each regional node based on the regional graph structure and the features of each regional node. The recurrent decoder is used to determine the network traffic prediction result based on the spatiotemporal feature representation of each node and the spatiotemporal feature representation of each regional node. The convolutional encoder includes a first spatiotemporal convolutional block, a second spatiotemporal convolutional block, a feature fusion module, and a projection layer; it inputs the topology of the target network, the features of each node, the regional topology of the target network, and the features of each regional node into the network traffic prediction model to obtain the network traffic prediction result, specifically including: The topology of the target network, the features of each node, the regional topology of the target network, and the features of each regional node are input into the graph structure construction module. The graph structure construction module constructs a corresponding graph structure based on the topology of the target network and the features of each node, and constructs a corresponding regional graph structure based on the regional topology of the target network and the features of each regional node. The graph structure is input into the first spatiotemporal convolutional block to extract the spatiotemporal feature representations of each node; The region graph structure is input into the second spatiotemporal convolutional block to extract the spatiotemporal feature representations of each region node; The spatiotemporal feature representations of each node and the spatiotemporal feature representations of each region node are input into the feature fusion module for feature fusion to obtain the fused spatiotemporal feature representations of each node; The fused spatiotemporal feature representations of each node are input into the projection layer, and a one-dimensional convolution is performed on the fused spatiotemporal feature representations of each node to obtain the target spatiotemporal coding sequence. The fused spatiotemporal feature representations of each node and the target spatiotemporal encoded sequence are input into the cyclic decoder for decoding, and the network traffic prediction results of each node are output.

2. The method as described in claim 1, characterized in that, The first spatiotemporal convolutional block includes a first spatial graph convolutional layer and a first temporal gated convolutional layer; The graph structure is input into the first spatiotemporal convolutional block, and the spatiotemporal feature representations of each node are extracted, specifically including: The graph structure is input into the first spatial graph convolutional layer to extract the spatial feature representation of each node; The spatial feature representations of each node are input into the first temporally gated convolutional layer to extract the temporal feature representations of each node. The spatiotemporal feature representation of each node is obtained based on the spatial feature representation and the temporal feature representation of each node.

3. The method as described in claim 1, characterized in that, The second spatiotemporal convolutional block includes a second spatial graph convolutional layer and a second temporally gated convolutional layer; The region graph structure is input into the second spatiotemporal convolutional block to extract the spatiotemporal feature representations of each region node, specifically including: The region graph structure is input into the second spatial graph convolutional layer to extract the spatial feature representation of each region node; The spatial feature representations of each region node are input into the second temporally gated convolutional layer to extract the temporal feature representations of each region node. The spatiotemporal feature representation of each region node is obtained based on the spatial feature representation and the temporal feature representation of each region node.

4. The method as described in claim 1, characterized in that, The loop decoder is a gated loop unit that includes a multi-head attention mechanism; The fused spatiotemporal feature representations of each node and the target spatiotemporal encoded sequence are input into the cyclic decoder for decoding, and the network traffic prediction results of each node are output, specifically including: The target spatiotemporal encoded sequence is used as the hidden state of the recurrent decoder. The fused spatiotemporal feature representation and the hidden state of the recurrent decoder are projected onto h attention head subspaces respectively to generate query vector, key vector and value vector of each attention head. For each attention head, the corresponding attention weight is determined based on the query vector and key vector of the attention head; The context representation of the attention head is determined based on the key vector, value vector, and attention weights of the attention head; The context representations of each attention head are merged to obtain the context representation of the multi-head attention mechanism; The context representation of the multi-head attention mechanism is input into the gated loop unit, and the network traffic prediction results of each node are output.

5. The method as described in claim 1, characterized in that, The characteristics of each region node are determined based on the characteristics of each node in each region node, specifically including: For each region node, the features of each node in the region node are aggregated using a pooling operation to obtain the region node features.

6. The method as described in claim 1, characterized in that, The spatiotemporal feature representations of each node and the spatiotemporal feature representations of each region node are input into the feature fusion module for feature fusion to obtain the fused spatiotemporal feature representations of each node, specifically including: Based on the spatiotemporal feature representations of each node, the spatiotemporal feature representations of each region node, and the activation function, the attention score between each node and each region node is determined. The attention scores between each node and each region node are normalized using the Softmax function to obtain the contribution matrix; The contribution matrix is ​​multiplied by the spatiotemporal feature representation of each region node, and then concatenated with the spatiotemporal feature representation of each node to obtain the fused spatiotemporal feature representation of each node.

7. A network traffic prediction device, characterized in that, include: The receiving module is used to receive network traffic prediction requests for the target network sent by the terminal. The first acquisition module is used to acquire the topology map of the target network and the regional topology map of the target network, wherein the topology map of the target network is a connection relationship map of the nodes contained in the target network, and the regional topology map of the target network is a connection relationship map of regional nodes obtained by dividing the local dependency relationships between the nodes contained in the target network. The second acquisition module is used to acquire the historical network traffic information of each node in the target network as the node characteristics of the corresponding node, and to determine the corresponding regional node characteristics based on the node characteristics of each node in each regional node. The prediction module is used to input the topology graph of the target network, the features of each node, the regional topology graph of the target network, and the features of each regional node into the network traffic prediction model to obtain the network traffic prediction result. The network traffic prediction model includes a graph structure construction module, a convolutional encoder, and a recurrent decoder. The graph structure construction module is used to construct the graph structure corresponding to the target network and the regional graph structure corresponding to the target network. The convolutional encoder is used to extract the spatiotemporal feature representation of each node based on the graph structure and the features of each node, and to extract the spatiotemporal feature representation of each regional node based on the regional graph structure and the features of each regional node. The recurrent decoder is used to determine the network traffic prediction result based on the spatiotemporal feature representation of each node and the spatiotemporal feature representation of each regional node. The convolutional encoder includes a first spatiotemporal convolutional block, a second spatiotemporal convolutional block, a feature fusion module, and a projection layer; the prediction module is specifically used for: The topology of the target network, the features of each node, the regional topology of the target network, and the features of each regional node are input into the graph structure construction module. The graph structure construction module constructs a corresponding graph structure based on the topology of the target network and the features of each node, and constructs a corresponding regional graph structure based on the regional topology of the target network and the features of each regional node. The graph structure is input into the first spatiotemporal convolutional block to extract the spatiotemporal feature representations of each node; The region graph structure is input into the second spatiotemporal convolutional block to extract the spatiotemporal feature representations of each region node; The spatiotemporal feature representations of each node and the spatiotemporal feature representations of each region node are input into the feature fusion module for feature fusion to obtain the fused spatiotemporal feature representations of each node; The fused spatiotemporal feature representations of each node are input into the projection layer, and a one-dimensional convolution is performed on the fused spatiotemporal feature representations of each node to obtain the target spatiotemporal coding sequence. The fused spatiotemporal feature representations of each node and the target spatiotemporal encoded sequence are input into the cyclic decoder for decoding, and the network traffic prediction results of each node are output.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the network traffic prediction method as described in any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps in the network traffic prediction method as described in any one of claims 1 to 6.