A network modeling method based on a GNN and a transformer model

By combining GNN and Transformer models in network modeling, the computational efficiency problem of traditional models in complex traffic and large-scale network optimization is solved, achieving accurate modeling of complex traffic characteristics and efficient network optimization.

CN119558346BActive Publication Date: 2025-10-21HANGZHOU DIANZI UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411641589.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-18
Publication Date
2025-10-21
Estimated Expiration
2044-11-18

AI Technical Summary

Technical Problem

Traditional network models suffer from high computational costs, slow speeds, and impracticality when simulating complex traffic characteristics and large-scale network optimization, making it difficult to meet the needs of real-time network optimization.

Method used

We employ a network modeling approach based on GNN and Transformer models. By constructing a message-passing neural network and combining GNN and Transformer cascade modules, we utilize a self-attention mechanism to capture long-distance dependencies in the network, thereby reducing feature dimensions and improving computational efficiency.

Benefits of technology

It achieves accurate modeling of complex traffic characteristics, extends to large-scale real-world networks, improves the model's generalization ability and computational efficiency, and reduces the risk of overfitting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119558346B_ABST
    Figure CN119558346B_ABST
Patent Text Reader

Abstract

The application relates to a network modeling method based on a GNN and a Transformer model, which comprises the following steps: firstly, generating and preprocessing a data set, and constructing a message passing neural network; the message passing neural network comprises three parts of a GNN cascade module, a Transformer cascade module and a specific index reading module; then, training the network; finally, inputting a preprocessed test set image into the trained network model to obtain a prediction graph, comparing the prediction graph with a true value, and calculating various evaluation indexes. The application can better capture global dependency relationships, thereby obtaining more comprehensive data representation, and can improve the model generalization capability and the calculation efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a network modeling method based on GNN and Transformer models, and belongs to the technical field of computer networks. Background Art

[0002] Network models are key tools for designing, building, and evaluating computer networks. By simulating network behavior, they help designers evaluate protocol performance and predict protocol behavior, as well as conduct network performance assessments, network topology design, network resource allocation, and network optimization. For example, designers can use network models to assess the latency, throughput, and packet loss of different protocols in a network; predict how routing protocols select paths; evaluate the performance of different network topologies; select optimal resource allocation schemes; and optimize network configurations to improve performance.

[0003] Traditional network models, such as queuing theory and packet-level models, while widely used, have several limitations. Queuing theory models make overly strict assumptions about traffic patterns, making them difficult to simulate the complex traffic characteristics of real networks. While packet-level models can accurately simulate network behavior, they are computationally expensive and difficult to meet the demands of real-time network optimization. For example, on a single 1Gbps link, the number of packets per second can range from millions. Therefore, this approach is slow and impractical when considering large networks with real-world traffic. The processing time constraints of these models severely restrict their applicability to online network optimization. Summary of the Invention

[0004] In order to overcome the problem of how to invent a more advanced technology for certain specific scenarios through neural networks, the present invention provides a network modeling method based on GNN and Transformer models that can accurately model complex traffic characteristics and expand to large real-world networks.

[0005] A network modeling method based on GNN and Transformer model, comprising the following steps:

[0006] Step 1: Data Collection: Collect network samples generated in simulation or in real-world scenarios, containing different network topologies, traffic models, routing configurations, and queue scheduling policies. Record the average latency, jitter, and packet loss rate of all flows in each network sample, as well as queue-level statistics.

[0007] Step 2: Data preprocessing: The network samples are converted into a graph structure, where nodes represent network devices and edges represent links between connected devices. Features are extracted for each node and edge, such as traffic characteristics, link capacity, queue size, and queue priority.

[0008] Step 3: Construct a message passing neural network: The message passing neural network consists of three parts: a GNN cascade module, a Transformer cascade module, and a specific indicator readout module. Different functions are used to initialize the hidden states of flows, queues, and links. The flow, queue, and link features are encoded into fixed-size vectors representing feature embeddings. The GNN network is used to perform T message passing iterations. Each iteration consists of three stages: message passing and updating the hidden state of the flow, message passing and updating the hidden state of the queue, and message passing and updating the hidden state of the link. These features are then input into the Transformer network, which uses its self-attention mechanism to further process the dependencies between features or learning graphs. The readout function is used to calculate the performance indicators of each flow.

[0009] Step 4: Training the network: The preprocessed training set is divided into a training set and a validation set for training the model and evaluating model performance. The training set images are input into the message passing neural network. After passing through the GNN cascade module, the Transformer cascade module, and the specific indicator readout module, a prediction of the performance indicator of each flow is generated. The validation set is then used to calculate the mean square error and coefficient to determine the loss calculation. Backpropagation is performed, and the weights are optimized using the selected optimizer and corresponding parameters. After multiple training cycles, the network model is obtained.

[0010] Step 5: Model Evaluation: Evaluate the model’s generalization ability to predict network performance using unseen network samples, including different topologies, traffic models, and routing configurations, and compare with the true values ​​to calculate various evaluation metrics.

[0011] The second step specifically includes:

[0012] To construct a network graph, consider the devices in the network as nodes and the connections between them as edges. We extract relevant feature information from each node and edge, including device type, function, traffic characteristics, queue information, link capacity, and queue information. We then normalize the numerical features and combine the extracted features with the connections between nodes and edges to construct a network graph dataset.

[0013] The step three specifically includes:

[0014] The GNN cascade module is constructed by multiple recurrent neural networks to form a flow queue, and uses an autoregressive algorithm to perform multiple cycles inside and outside the network and then outputs it to the Transformer cascade module.

[0015] Each input feature of the recurrent neural network is first input into the network one by one. There is a trainable hidden state inside the network, which is updated when processing each element in the sequence. In the recurrent neural network, a specific hidden state plays the role of a potential embedding space. Each input feature is fed into the network one by one and passes through a trainable linear layer together with the hidden state of the previous moment. The linear layer maps the input feature and the hidden state of the previous moment to a new hidden state. The hidden state contains information about the current input and the previous input. Recurrent neural networks usually do not explicitly learn position information, but implicitly capture the order information in the sequence through recursive structures. In recurrent neural networks, there is no explicit query vector matrix, key vector matrix, and value vector matrix. The hidden state itself is updated in each time step to reflect the information of the current position in the sequence. This process can be described as:

[0016] H t =f(W*X t +U*H t-1 +b)

[0017] Among them H t is the hidden state at the current time step, X t is the current input feature, W is the weight matrix of the input feature, U is the weight matrix of the hidden state, b is the bias term, and f is a nonlinear activation function;

[0018] The graph features extracted by the GNN cascade module are then input into the Transformer cascade module. The cascade Transformer module consists of several Transformer blocks with shared parameters. The Transformer block consists of a multi-head self-attention mechanism network and a feedforward network. The self-attention mechanism is used to calculate the long-distance dependencies of the features. Each input feature is first expanded into a one-dimensional sequence. Each sequence is mapped to a potential D-dimensional embedding space through a trainable linear projection layer. Specific position embeddings are learned and added to the patch embedding to retain position information. The patch with added position information passes through the linear layer to generate three matrices: query vector matrix, key vector matrix and value vector matrix. The three matrices are then sent to the multi-head attention mechanism operation to calculate the attention between each other:

[0019] Att(Q,K,V)=ω(QK T )V

[0020] Where Att(Q,K,V) is the obtained attention value, Q, K, and V are the query vector matrix, key vector matrix, and value vector matrix respectively, and each row in these three matrices represents a corresponding vector;

[0021] The information containing more long-distance dependencies in long sequences after Transformer processing is sent to the specific indicator readout module, and parameters such as link load, end-to-end flow delay, and the sum of all link delays are calculated.

[0022]

[0023]

[0024]

[0025]

[0026] in, is the link load, Is flow f on link l j The load on f is the average flow rate of flow f, is the queue delay, is the transmission delay, is the readout function, x fps is the average packet size, x lc is the link capacity, d link is the link delay.

[0027] The step 4 specifically includes:

[0028] The network samples in the training set are input into the message passing neural network. After passing through the GNN cascade module, the Transformer cascade module and the specific indicator readout module, the performance indicators of the corresponding network samples are generated. Then, the mean square error and coefficient are calculated using the validation set to determine the loss calculation:

[0029]

[0030] Mean squared error is a method to measure the difference between the model's predicted value and the actual value. It calculates the average of the squares of the differences between the predicted value and the actual value. MSE gives higher weight to larger errors and is very sensitive to outliers.

[0031]

[0032] The coefficient of determination, often called R2 or coefficient of determination, measures how well the model explains the total variation;

[0033]

[0034] Among them, SS res is the residual sum of squares, SS tot is the total sum of squares, and the value of R2 ranges from 0 to 1. The closer the value is to 1, the better the model fits the data;

[0035] After the loss calculation is completed, back propagation is performed, and the connection weights are optimized through the selected optimizer and corresponding parameters. The final network model is obtained after 150 rounds of training.

[0036] The step five specifically includes:

[0037] The evaluation process criteria are mean square error, mean absolute error, mean absolute percentage error, and coefficient determination;

[0038] The mean absolute error is the average of the absolute differences between the predicted and actual values. The mathematical formula is:

[0039]

[0040] Mean absolute percentage error is another indicator to measure the accuracy of the forecast. It calculates the average of the ratio of the absolute value of the difference between each predicted value and the actual value to its actual value. MAPE is used to measure the accuracy of the forecast. When the actual value range is large, when the actual value is zero or close to zero, MAPE will become unstable. The mathematical formula is:

[0041]

[0042] Based on the above indicators, calculate the error between the input network samples of Poisson, Deterministic, On-Off, A.exponentials, M.exponentials, and Mixed and the simulation results.

[0043] Compared with the prior art, the present invention has the following beneficial effects:

[0044] The present invention relates to a network modeling method based on GNN and Transformer models, which uses a cascaded Transformer module and embeds it into a GNN-based network modeling model to enhance feature representation. It is composed of several Transformer blocks with shared parameters, which are serially fused with the GNN cascade network and use the Transformer's multi-head attention mechanism to better capture long-distance dependencies in the network model. Serial fusion allows the model to first capture local graph structure information through GNN, and then the Transformer further processes this information to capture global dependencies, thereby obtaining a more comprehensive data representation. The serial structure can be regarded as a process of feature selection and combination, which helps to reduce the risk of overfitting and improve the generalization ability of the model. Compared with directly applying the Transformer on the graph data, the serial structure can first reduce the feature dimension through GNN, thereby reducing the number of parameters in the Transformer and improving computational efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0046] Figure 1 This is a message passing neural network structure diagram of a network modeling method based on GNN and Transformer models in the present invention. DETAILED DESCRIPTION

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

[0048] Reference Figure 1 , a network modeling method based on GNN and Transformer model, including the following steps:

[0049] Step 1: Data Collection: Collect network samples generated in simulation or in actual work, containing different network topologies, traffic models, routing configurations, and queue scheduling policies. Record the average delay, jitter, and packet loss rate of all flows in each network sample, as well as queue-level statistics (such as average occupancy, average packet loss rate, or average packet size).

[0050] To construct a sample set encompassing diverse network scenarios for training and testing network models, data was generated using both random generation via a network simulator and real-world data generated using a physical testbed. The omnet++ network simulator was used for data generation in the network simulator-based generation. During the simulation, various network characteristics, including topology, routing configuration, traffic model, and its intensity, were input, with the delay for each path being the output. The article employed a variety of traffic models to simulate network traffic, including Poisson, On-Off, Autocorrelated Exponential, and Modulated Exponential, along with queue scheduling strategies such as FIFO, WFQ, DRR, and SP. Random sampling was performed from all possible values ​​of the input variables to generate the configuration parameters for the network scenario, such as the number of nodes, connection method, traffic model type, parameters, traffic intensity, queue size, and scheduling strategy.

[0051] To further evaluate the model's performance in real-world environments, we used a data generation method based on a physical testbed. We constructed a physical testbed containing Huawei equipment (routers, switches, and servers) and generated network traffic using the TRex traffic generator. After traffic generation, we used PF_RING software to capture and analyze the network traffic, recording metrics such as average latency, jitter, and packet loss rate for each flow, as well as average queue occupancy, average packet loss rate, and average packet size. Finally, we generated a dataset from these metrics to evaluate the model's performance in real-world environments.

[0052] Step 2: Data preprocessing: The network samples are converted into a graph structure, where nodes represent network devices and edges represent links between connected devices. Features are extracted for each node and edge, such as traffic characteristics, link capacity, queue size, and queue priority.

[0053] First, a network graph is constructed, with devices in the network as nodes and connections between devices as edges. Next, relevant feature information is extracted from each node and edge, including device type, function, traffic characteristics (such as traffic volume, type, and model parameters), queue information (such as queue size, priority, and scheduling policy), link capacity (such as bandwidth and latency), and queue information (such as queue size, priority, and scheduling policy). The numerical features are then normalized and the extracted features are combined with the connectivity between nodes and edges to construct a network graph dataset.

[0054] Step 3: Construct a message passing neural network: The message passing neural network consists of three parts: a GNN cascade module, a Transformer cascade module, and a specific indicator readout module. First, different functions are used to initialize the hidden states of the flow, queue, and link, and the flow, queue, and link features are encoded into fixed-size vectors to represent feature embedding. Then, the GNN network is used to perform T message passing iterations. Each iteration includes three stages: hidden state message passing and updating of the flow, hidden state message passing and updating of the queue, and hidden state message passing and updating of the link, so as to achieve the purpose of extracting graph features. These features are then input into the Transformer network, and its self-attention mechanism is used to further process the features or learn the dependencies between graphs. Finally, the readout function is used to calculate the performance indicators of each flow, such as delay, jitter, and packet loss rate.

[0055] The GNN cascade module is constructed by multiple RNNs to form a flow queue, and uses an autoregressive algorithm to perform multiple cycles inside and outside the network and then outputs it to the Transformer cascade module.

[0056] A recurrent neural network (RNN) is a type of neural network that processes sequential data. It uses a recursive structure to maintain memory of previous information and thus compute long-range dependencies between features. Specifically, each input feature is first fed into the network one by one. The network internally maintains a trainable hidden state, which is updated with each element in the sequence. In an RNN, this hidden state acts as a latent embedding space. Each input feature is fed into the network one by one and, along with the previous hidden state, passes through a trainable linear layer (often called a weight matrix). This linear layer maps the input feature and the previous hidden state to a new hidden state that incorporates information about the current and previous inputs. The hidden state can be viewed as an encoding of the previous sequence information in the latent embedding space. Unlike the positional embeddings in Transformers, RNNs typically do not learn positional information explicitly. Instead, they implicitly capture the sequential nature of the sequence through their recursive structure. In RNNs, there are no explicit query, key, or value vector matrices. Instead, the hidden state itself is updated at each time step to reflect the information about the current position in the sequence. This process can be described as:

[0057] H t =f(W*X t +U*H t-1 +b)

[0058] Among them H t is the hidden state at the current time step, X tis the current input feature, W is the weight matrix of the input feature, U is the weight matrix of the hidden state, b is the bias term, and f is a nonlinear activation function (such as tanh or ReLU).

[0059] The graph features extracted by the GNN cascade module are then input into the Transformer cascade module. The cascade Transformer module consists of several Transformer blocks with shared parameters. The Transformer block consists of a multi-head self-attention mechanism network and a feedforward network, which calculates the long-distance dependencies of the features through the self-attention mechanism. Specifically, each input feature is first expanded into a one-dimensional sequence. Each sequence is mapped to a potential D-dimensional embedding space through a trainable linear projection layer. In addition, specific position embeddings are learned and added to the patch embedding to retain position information. The patch with added position information passes through the linear layer to generate three matrices: query vector matrix, key vector matrix and value vector matrix, and then the three matrices are sent to the multi-head attention mechanism operation to calculate the attention between each other:

[0060] Att(Q,K,V)=ω(QK T )V

[0061] Where Att(Q,K,V) is the obtained attention value, Q, K, and V are the query vector matrix, key vector matrix, and value vector matrix respectively, and each row in these three matrices represents a corresponding vector.

[0062] Finally, the information containing more long-distance dependencies in long sequences after Transformer processing is sent to the specific indicator readout module, and parameters such as link load, end-to-end flow delay, and the sum of all link delays are calculated.

[0063]

[0064]

[0065]

[0066]

[0067] in, is the link load, Is flow f on link l j The load on f is the average flow rate of flow f, is the queue delay, is the transmission delay, is the readout function, x fps is the average packet size, x lc is the link capacity, dlink is the link delay.

[0068] Step 4: Network Training: First, the preprocessed training set is divided into a training set and a validation set for model training and performance evaluation. The training set images are then fed into a message passing neural network. After passing through the GNN cascade module, the Transformer cascade module, and the specific indicator readout module, predictions for each stream's performance indicators are generated. The validation set is then used to calculate the mean squared error and coefficients for loss calculation. Backpropagation is then performed, and weights are optimized using the selected optimizer and corresponding parameters. After multiple training cycles, the network model is obtained.

[0069] The network samples in the training set are input into the message passing neural network. After passing through the GNN cascade module, the Transformer cascade module and the specific indicator readout module, the performance indicators of the corresponding network samples are generated. Then, the validation set is used to calculate the mean square error and coefficient to determine the loss calculation:

[0070]

[0071] The mean squared error (MSE) is a measure of how different a model's predictions are from the actual values. It calculates the average of the squares of the differences between the predicted and actual values. MSE places a higher weight on larger errors, making it very sensitive to outliers.

[0072]

[0073] The coefficient of determination, often called R2 or coefficient of determination, measures how well the model explains the total variation.

[0074]

[0075] Among them, SS res is the residual sum of squares (the sum of squares of the differences between the predicted and actual values), SS tot It is the total sum of squares (the sum of the squares of the differences between the actual values ​​and the mean of the actual values). R2 values ​​range from 0 to 1, with values ​​closer to 1 indicating a better fit of the model to the data.

[0076] After the loss calculation is complete, backpropagation is performed to optimize the connection weights using the selected optimizer and corresponding parameters. The final network model is obtained after 150 rounds of training.

[0077] Step 5: Model Evaluation: Evaluate the model’s generalization ability to predict network performance using unseen network samples, including different topologies, traffic models, and routing configurations, and compare with the true values ​​to calculate various evaluation metrics.

[0078] The evaluation process criteria are mean square error (MSE), mean absolute error (MAE), mean absolute percentage error (MAPE), coefficient of determination (R2)

[0079] The mean square error and coefficient determination have been mentioned above and will not be repeated here.

[0080] The mean absolute error calculates the average of the absolute values ​​of the differences between the predicted values ​​and the actual values. Compared with MSE, MAE is less sensitive to outliers because it only considers the magnitude of the error rather than the square of the error. Its mathematical formula is:

[0081]

[0082] The mean absolute percentage error (MAPE) is another metric for measuring forecast accuracy. It calculates the average of the absolute value of the difference between each predicted value and the actual value, divided by the actual value. MAPE is often used to measure forecast accuracy, especially when the actual value range is large. However, when the actual value is zero or close to zero, MAPE may become unstable. The mathematical formula is:

[0083]

[0084] Based on the above indicators, calculate the error between the input network samples of Poisson, Deterministic, On-Off, A.exponentials, M.exponentials, and Mixed and the simulation results.

[0085] The embodiments of the present invention are described in detail above with reference to the accompanying drawings, but the present invention is not limited to the described embodiments. It is apparent to those skilled in the art that various changes, modifications, substitutions, and variations to these embodiments may be made without departing from the principles and spirit of the present invention, and these changes and modifications still fall within the scope of protection of the present invention.

Claims

1. A network modeling method based on GNN and Transformer model, characterized by: The following steps are involved: Step 1: Data Collection: Collect network samples generated in simulation or in real-world scenarios, containing different network topologies, traffic models, routing configurations, and queue scheduling policies. Record the average latency, jitter, and packet loss rate of all flows in each network sample, as well as queue-level statistics. Step 2: Data preprocessing: The network samples are converted into a graph structure, where nodes represent network devices and edges represent links between connected devices. Features are extracted for each node and edge, such as traffic characteristics, link capacity, queue size, and queue priority. Step 3: Construct a message passing neural network: The message passing neural network consists of three parts: a GNN cascade module, a Transformer cascade module, and a specific indicator readout module. Different functions are used to initialize the hidden states of flows, queues, and links. The flow, queue, and link features are encoded into fixed-size vectors representing feature embeddings. The GNN network is used to perform T message passing iterations. Each iteration consists of three stages: message passing and updating the hidden state of the flow, message passing and updating the hidden state of the queue, and message passing and updating the hidden state of the link. These features are then input into the Transformer network, which uses its self-attention mechanism to further process the dependencies between features or learning graphs. The readout function is used to calculate the performance indicators of each flow. The GNN cascade module is constructed by multiple recurrent neural networks to form a flow queue, and uses an autoregressive algorithm to perform multiple cycles inside and outside the network and then outputs it to the Transformer cascade module. The graph features extracted by the GNN cascade module are input into the Transformer cascade module. The cascade Transformer module consists of several Transformer blocks with shared parameters. The Transformer block consists of a multi-head self-attention mechanism network and a feedforward network. The self-attention mechanism is used to calculate the long-distance dependencies of the features. Each input feature is first expanded into a one-dimensional sequence. Each sequence is mapped to a potential D-dimensional embedding space through a trainable linear projection layer. The specific position embedding is learned and added to the patch embedding to retain the position information. The patch with the position information added passes through the linear layer to generate three matrices: query vector matrix, key vector matrix and value vector matrix. The three matrices are then sent to the multi-head attention mechanism operation to calculate the attention between each other. Step 4: Training the network: The preprocessed training set is divided into a training set and a validation set. The model is trained and its performance is evaluated. The training set images are input into the message passing neural network. After passing through the GNN cascade module, the Transformer cascade module, and the specific indicator readout module, a prediction of the performance indicator of each flow is generated. Then use the validation set to calculate the mean square error and coefficient to determine the loss calculation, backpropagate, optimize the weights through the selected optimizer and corresponding parameters, and obtain the network model after multiple trainings; Step 5: Model Evaluation: Evaluate the model’s generalization ability to predict network performance using unseen network samples, including different topologies, traffic models, and routing configurations, and compare with the true values ​​to calculate various evaluation metrics.

2. A network modeling method based on GNN and Transformer model according to claim 1, characterized in that: The second step specifically includes: Construct a network graph, treating the devices in the network as nodes in the graph and the connections between devices as edges in the graph. Extract relevant feature information from each node and edge, including device type, function, traffic characteristics, queue information, link capacity, and queue information. Then normalize the numerical features, combine the extracted features with the connection relationships between nodes and edges, and construct a network graph dataset.

3. The network modeling method based on GNN and Transformer model according to claim 1, characterized in that: The step three specifically includes: The GNN cascade module uses an autoregressive algorithm to perform multiple cycles inside and outside the network and then outputs it to the Transformer cascade module. Each input feature of the recurrent neural network is first input into the network one by one. There is a trainable hidden state inside the network, which is updated when processing each element in the sequence. In the recurrent neural network, a specific hidden state plays the role of a potential embedding space. Each input feature is fed into the network one by one and passes through a trainable linear layer together with the hidden state of the previous moment. The linear layer maps the input feature and the hidden state of the previous moment to a new hidden state. The hidden state contains information about the current input and the previous input. Recurrent neural networks usually do not explicitly learn position information, but implicitly capture the order information in the sequence through recursive structures. In recurrent neural networks, there is no explicit query vector matrix, key vector matrix, and value vector matrix. The hidden state itself is updated in each time step to reflect the information of the current position in the sequence. This process can be described as: H t =f(W*X t +U*H t-1 +b) Among them H t is the hidden state at the current time step, X t is the current input feature, W is the weight matrix of the input feature, U is the weight matrix of the hidden state, b is the bias term, and f is a nonlinear activation function; Feed the three matrices into the multi-head attention mechanism operation to calculate the mutual attention: That(Q,K,V)=ω(QK T )V Where Att(Q,K,V) is the obtained attention value, Q, K, and V are the query vector matrix, key vector matrix, and value vector matrix respectively, and each row in these three matrices represents a corresponding vector; The information containing long-distance dependencies in long sequences after Transformer processing is sent to the specific indicator readout module, and the link load, end-to-end flow delay, and the sum parameter of all link delays are calculated. in, is the link load, Is flow f on link l j The load on f is the average flow rate of flow f, is the queue delay, is the transmission delay, is the readout function, x fps is the average packet size, x lc is the link capacity, d link is the link delay.

4. The network modeling method based on GNN and Transformer model according to claim 1, characterized in that: The step 4 specifically includes: The network samples in the training set are input into the message passing neural network. After passing through the GNN cascade module, the Transformer cascade module and the specific indicator readout module, the performance indicators of the corresponding network samples are generated. Then, the mean square error and coefficient are calculated using the validation set to determine the loss calculation: The mean square error calculates the average of the squares of the differences between the predicted value and the actual value. MSE gives higher weights to larger errors and is very sensitive to outliers. The coefficient is determined, usually called R 2 or coefficient of determination, which measures how well the model explains the total variation; Among them, SS res is the residual sum of squares, SS tot is the total sum of squares, R 2 The value ranges from 0 to 1, and the closer the value is to 1, the better the model fits the data; After the loss calculation is completed, back propagation is performed, and the connection weights are optimized through the selected optimizer and corresponding parameters. The final network model is obtained after 150 rounds of training.

5. The network modeling method based on GNN and Transformer model according to claim 1, characterized in that: The step five specifically includes: The evaluation indicators are mean square error, mean absolute error, mean absolute percentage error, and coefficient determination; The mean absolute error is the average of the absolute differences between the predicted and actual values. The mathematical formula is: The mean absolute percentage error (MAPE) is the average of the ratios of the absolute value of the difference between each predicted value and the actual value. MAPE is used to measure the accuracy of predictions. When the range of actual values ​​is large, when the actual value is zero or close to zero, MAPE becomes unstable. The mathematical formula is: Based on the above indicators, calculate the error between the input network samples of Poisson, Deterministic, On-Off, A.exponentials, M.exponentials, and Mixed and the simulation results.

Citation Information

Patent Citations

  • Communication network traffic prediction method and system, storage medium and computer equipment

    CN114422381A

  • Dose distribution optimization method based on brain-like calculation and multi-modal attention

    CN118940808A