A method and system for filling missing network traffic matrix based on diffusion model

Through the missing network traffic matrix filling method based on the diffusion model, gradient correction and posterior probability distribution are used to solve the problem of hypothesis dependence and low accuracy in filling the network traffic matrix, achieving higher distribution consistency and accuracy, and adapting to Strong filling effect.

CN118555215BActive Publication Date: 2024-10-01HEFEI UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411018540.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-29
Publication Date
2024-10-01
Estimated Expiration
2044-07-29

AI Technical Summary

Technical Problem

Existing technologies are difficult to effectively fill in the missing network traffic matrix, especially when a complete data set cannot be obtained, and rely too much on assumptions and statistical techniques, resulting in low filling accuracy.

Method used

A missing network traffic matrix filling method based on the diffusion model is adopted. By constructing a diffusion model, combined with the reconstruction network and the identification network, gradient correction and posterior probability distribution are used to estimate the traffic matrix, and the known parts are gradually replaced to generate the final network traffic matrix. .

Benefits of technology

The distribution consistency and accuracy of the filled traffic matrix are significantly improved, and the problems of strong assumptions and poor quality in existing methods are solved. It has strong adaptability and robust effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118555215B_ABST
    Figure CN118555215B_ABST
Patent Text Reader

Abstract

In order to overcome the defect that the diffusion model in the above-mentioned prior art cannot be applied to solve the problem of filling a network traffic matrix with a large number of missing items, the present invention proposes a method for filling a missing network traffic matrix based on a diffusion model. When filling a missing network traffic matrix, the conditional distribution of the noisy traffic matrix is ​​corrected by calculating the gradient, which solves the problem of filling the network traffic matrix in combination with the generation process of the diffusion model, and updates the marginal distribution of the known part of the noisy traffic matrix again by replacing the known part of the noisy traffic. The present invention comprehensively considers the scenario where a complete network traffic matrix data set cannot be obtained, and combines the diffusion model to fill the network traffic matrix, which can effectively solve many problems of the existing methods, such as strong filling assumptions and poor quality of the source point pairs generated after filling.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of network engineering and machine learning, and in particular to a method and system for filling a missing network traffic matrix based on a diffusion model. Background Art

[0002] Traffic Matrix (TM) is used to represent the traffic demand between all possible network nodes. The traffic between network nodes is often called OD-pairs traffic. It is a crucial input for distributed system management and can provide a lot of help in routing selection, network resource planning, network debugging, and even network anomaly detection and network security. However, with the continuous increase in the scale of modern networks, it is no longer practical to directly collect the traffic size between all OD-pairs.

[0003] Given its importance in many areas of the network, how to obtain a complete network traffic matrix from measured OD-pairs, i.e., traffic matrix filling, has received extensive attention and research. A widely used method for matrix filling is low-rank matrix filling, which covers techniques such as norm minimization, singular value thresholding, and alternating minimization. The classic one is the sparse regularized matrix factorization (SRMF) proposed by Roughan et al. These methods all assume that the entire traffic matrix has a low-rank property. At the same time, some studies have found that traffic matrices often have obvious spatiotemporal characteristics. Based on spatial properties, Zhou et al. divide TM into multiple clusters through spectral clustering, and then identify sub-matrices with similar behaviors to estimate missing traffic data. In addition, many literatures focus on spatiotemporal tensor (multidimensional array) filling methods. For example, Zhou et al. use low-rank tensor decomposition to extract hidden low-dimensional spatiotemporal features of network traffic. Recently, neural networks have been applied to tensor filling methods. They first embed different fields of tensor data into latent factor vectors, then fuse these vectors into a feature map by concatenating or performing outer products between vectors, and finally use neural networks to extract nonlinear features for missing data recovery. However, the above solutions rely too much on assumptions and statistical techniques, have large differences in accuracy, and do not consider the role of network traffic matrix distribution.

[0004] The diffusion model has demonstrated profound performance advantages in tasks such as video prediction and image restoration, and the results can take into account both accuracy and distribution similarity. In addition, unlike the above solutions, this deep learning-based method does not rely on any assumptions or statistical techniques. However, how to use the diffusion model to fill in high-dimensional and complex network traffic matrices has not yet been explored. In related technologies, the training of diffusion models also requires sufficient and complete data to support the training of the model, which is almost impossible to meet in real scenarios. Therefore, how to apply the diffusion model to solve the problem of filling in network traffic matrices with a large number of missing data is an important problem that needs to be solved urgently. Summary of the invention

[0005] In order to overcome the defect that the diffusion model in the above-mentioned prior art cannot be applied to solve the problem of filling a network traffic matrix with a large number of missing points, the present invention proposes a method for filling a missing network traffic matrix based on a diffusion model, which comprehensively considers the scenario where a complete network traffic matrix data set cannot be obtained, and combines the diffusion model to realize network traffic matrix filling, which can effectively solve many problems of the existing method such as strong filling assumptions and poor quality of source point pairs generated after filling.

[0006] The present invention proposes a method for filling a missing network traffic matrix based on a diffusion model, comprising the following steps:

[0007] S1. Obtain the diffusion model. The diffusion model processes the input traffic matrix in combination with the diffusion step and outputs a traffic matrix containing all source point pairs of traffic. Construct the initial traffic matrix X and the corresponding mask Mc. Input the initial traffic matrix X into the diffusion model. The part of the traffic matrix output by the diffusion model that corresponds to the missing source point pair traffic of the initial traffic matrix X is recorded as the unknown part X. un ; The known part of the initial traffic matrix X is denoted as X ob ;

[0008] S2, randomly sample standard Gaussian noise as the noise sequence X T ; T is the maximum diffusion step set;

[0009] S3, to X t+1 Perform noise reduction generation to obtain the noisy traffic matrix X' t ;The initial value of t is T-1;

[0010] S4. According to X t+1 Calculate the posterior probability distribution P(X0|X t+1 ) 0,v , from X 0,v Extract the flow corresponding to the known part of X as X ob The estimated value of X ob,v , based on the posterior distribution and gradient correction, the traffic matrix is ​​estimated X''t ;

[0011] S5. Estimate X'' from the traffic matrix t Extract the traffic distribution X'' of the unknown source point pair corresponding to the mask Mc un,t , for X ob Add noise to generate X ob,t , splicing X'' un,t and X ob,t Construct the denoised traffic matrix X t ;

[0012] S6, loop steps S3-S5 until the denoised traffic matrix X0 is obtained, and replace the traffic distribution of the known source point pairs in the mask Mc in X0 with X ob , and then output as the final network traffic matrix.

[0013] Preferably, the training process of the diffusion model includes the following steps:

[0014] St1. Collect the source point pair traffic in the network and organize it into an initial traffic matrix X containing some known source point pair traffic, and use the initial traffic matrix X as a training sample; build a basic model and initialize it. The basic model includes: noise prediction network, reconstruction network and identification network; the noise prediction network is used to add noise to the input traffic matrix, and the output of the noise prediction network is the original noise when the traffic matrix is ​​noised; the reconstruction network reconstructs the input traffic matrix; the identification network is used to identify whether the input traffic matrix is ​​a true value or a reconstructed value output by the reconstruction network;

[0015] St2, extract multiple training samples X, let the output of the reconstruction network for the training sample X be recorded as R(X); the input of the identification network is the known part X from the training sample X ob The spliced ​​traffic matrix composed of the unknown part from the reconstructed traffic matrix; the output of the identification network is: the predicted probability D(X) that the traffic of each source point pair in the spliced ​​traffic matrix is ​​the true value; calculate the first loss function L1 and the second loss function L2; the first loss function L1 is the adversarial loss function of the known source point pairs and the unknown source point pairs in the predicted probability D(X); the second loss function is the mean square error between the actual traffic of the known source point pairs and the reconstructed traffic;

[0016] St3, fix the identification network, and use stochastic gradient descent to update the parameters of the reconstruction network in combination with the target loss; the target loss is calculated in combination with the first loss function and the second loss function;

[0017] St4, fix the reconstruction network, and use stochastic gradient descent combined with the first loss function to update the parameters of the identification network;

[0018] St5, loop steps St2-St4 until the number of network reconstruction and network identification updates reaches the set value n1;

[0019] St6. Extract multiple training samples X, let the reconstruction network reconstruct the training samples X, record the reconstructed samples of X as R(X), and obtain the source point flow combination matrix X'= M⊙X+M⊙R(X); uniformly sample the diffusion step t from the integer set {1,2,…,T}, combine the diffusion step t and the randomly sampled Gaussian noise ε to add noise to X', and obtain the flow matrix X t ;

[0020] St7, X t and diffusion step t is input into the noise prediction network, and the noise prediction network outputs ε θ (X t ,t); Calculate the loss of the noise prediction network L3=||ε-ε θ (X t ,t)||;||·|| represents the 1 norm; gradient descent is used in combination with L3 to update the noise prediction network;

[0021] St8, loop steps St6-St7 until the update times of the noise prediction network reaches the set value n2, then fix the noise prediction network as the diffusion model.

[0022] Preferably, the noise prediction network includes N down-sampling modules, intermediate transition modules and N up-sampling modules connected in sequence; it also includes a position encoding module and a multi-layer perceptron, the output of the position encoding module is connected to the input of the multi-layer perceptron, and the output of the multi-layer perceptron is respectively embedded in the input of each down-sampling module, the intermediate transition module and each up-sampling module; the N down-sampling modules are connected in sequence from the first down-sampling module to the Nth down-sampling module, and the N up-sampling modules are connected in sequence from the first up-sampling module to the Nth up-sampling module; the input of the first down-sampling module is the input of the noise prediction network, the output of the Nth up-sampling module is the output of the noise prediction network, and the position encoding module is used to access the diffusion step t; the input of the i-th up-sampling module is also connected to the output of the N+1-i-th down-sampling module.

[0023] Preferably, the downsampling module is composed of two residual modules and a downsampling layer; in the downsampling module, the inputs of the two residual modules are connected to the input of the downsampling module, the outputs of the two residual modules are connected to the input of the downsampling layer, and the output of the downsampling layer is the output of the downsampling module;

[0024] The intermediate transition module is composed of two residual modules, wherein the inputs of the two residual modules are connected to the input of the intermediate transition module, and the output data of the intermediate transition module is formed by concatenating the residual data output by the two residual modules;

[0025] The upsampling module consists of two residual modules and an upsampling layer, wherein the input of the upsampling layer is the input of the upsampling module, the output of the upsampling layer is connected to the input of the two residual modules, and the residual data output by the two residual modules are concatenated to form the output data of the upsampling module.

[0026] Preferably, the residual module includes a first group of normalization layers, a first activation function, a first convolutional layer, a diffusion step embedding layer, a second group of normalization layers, a second activation function and a second convolutional layer connected in sequence; the input of the first group of normalization layers is the input of the residual module, and the output of the second convolutional layer is the output of the residual module; the input of the diffusion step embedding layer is also connected to the output of the multi-layer perceptron to access the diffusion step information.

[0027] Preferably, the first loss function L1 is:

[0028] ;

[0029] Among them, R represents the reconstruction network, D represents the identification network, ⊙ represents the Hadamard product, M is the mask corresponding to the training sample X; E represents the expectation.

[0030] Preferably, the second loss function is:

[0031] ;

[0032] Among them, R represents the reconstruction network, ⊙ represents the Hadamard product, M is the mask corresponding to the training sample X; E represents the expectation; ||·||2 is the two-norm.

[0033] Preferably, in S3, t+1 Perform noise reduction generation to obtain the noisy traffic matrix X' t The formula is:

[0034] ;

[0035] Among them, ε θ (X t+1 ,t+1) represents the diffusion model combining the diffusion step t+1 and the input X t+1 The noise predicted and output; 0≤t≤T-1; z is a random variable sampled from a standard Gaussian distribution; α t , α t+1 , β t+1 , α' t+1 All represent constants; 0≤t≤T-1, β t+1 The value is taken from the setting array {β t |0≤t≤ T-1};0<β0<β1<β2<β3<…<β t <…<β T-1 <1; α' t+1 =∏t+1 r=1 α r ; α r =1-β r β r ∈{β t |0≤t≤ T-1}; α t =1-β t ; α t+1 =1-β t+1 .

[0036] Preferably, in S4, the traffic matrix estimate X'' t The calculation formula is:

[0037] ;

[0038] Among them, ρ t is a constant that controls the influence of the reaction gradient and is related to the diffusion step t, ρ t =(1-α t ) / α t 1 / 2 ; ||X ob -X ob,v ||2 means ||X ob -X ob,v ||2About X t+1 The gradient of X t+1 Perform posterior mean sampling to obtain X 0,v , X ob,v For X 0,v The flow rate corresponding to the known part of X;

[0039] ;

[0040] Among them, ε θ (X t+1 ,t+1) represents the diffusion model combining the diffusion step t+1 and the input X t+1 The traffic matrix generated and output;

[0041] In S5, X ob Add noise to generate X ob,t The method is: X ob,t =α' t 1 / 2 X ob +(1-α' t ) 1 / 2 ε t ; α' t =∏ t r=1 α r ; where ε t is a randomly sampled Gaussian noise.

[0042] The present invention proposes a system for filling a missing network traffic matrix based on a diffusion model, comprising a memory and a processor, wherein a computer program is stored in the memory, and the processor is connected to the memory, and the processor is used to execute the computer program to implement the method for filling a missing network traffic matrix based on a diffusion model.

[0043] The advantages of the present invention are:

[0044] (1) The method for filling the missing network traffic matrix based on the diffusion model proposed in the present invention solves the problem of filling the network traffic matrix in combination with the generation process of the diffusion model by calculating the conditional distribution of the noisy traffic matrix with gradient correction when filling the missing network traffic matrix, and updates the marginal distribution of the known part of the noisy traffic matrix again by replacing the known part of the noisy traffic. The filling method proposed in the present invention has better maximum mean difference (MMD) score and relative error score, and significantly surpasses the existing technology in distribution consistency and accuracy.

[0045] (2) In the process of diffusion model training, the present invention adds an additional reconstruction network and a discrimination network, and adopts a reconstruction adversarial strategy to pre-train the reconstruction network and the discrimination network to construct a network traffic combination matrix to train the diffusion model. Therefore, the present invention does not need to manually measure the traffic of all source points, and realizes an unsupervised model training method, which solves the problem of diffusion model distribution learning offset caused by the lack of training data sets that exists in large quantities in real life.

[0046] (3) The missing network traffic matrix filling method based on the diffusion model proposed in the present invention is different from the existing methods in that it does not require additional low-rank assumptions, so it has the characteristics of strong adaptability and robust effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 A flow chart of a missing network traffic matrix filling method based on diffusion model;

[0048] Figure 2 It is a schematic diagram of the diffusion model;

[0049] Figure 3 Schematic diagram of residual module;

[0050] Figure 4 Training flowchart for diffusion model;

[0051] Figure 5 The adversarial pre-training flow chart provided by the present invention;

[0052] Figure 6 A training flow chart of a noise prediction network under missing conditions provided by the present invention;

[0053] Figure 7 This is a schematic diagram of traffic matrix denoising and de-noising provided by the present invention. DETAILED DESCRIPTION

[0054] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. 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 creative work are within the scope of protection of the present invention.

[0055] Reference Figure 1 , Figure 7 , a method for filling a missing network traffic matrix based on a diffusion model proposed in this embodiment includes the following steps:

[0056] S1. Construct the initial traffic matrix X and the corresponding mask Mc. The initial traffic matrix X contains the known values ​​of the traffic of some source points. Let the known part of the initial traffic matrix X be recorded as X ob ; Input the initial traffic matrix X into the diffusion model. The diffusion model generates and outputs a traffic matrix containing all source point pairs of traffic in combination with the input diffusion step. The part of the traffic matrix output by the diffusion model that corresponds to the missing source point pair of traffic in the initial traffic matrix X is recorded as the unknown part X un .

[0057] The mask Mc corresponds to the traffic distribution of the initial traffic matrix X, that is, the mask Mc corresponds to the known part X ob The source point pairs are assigned a value of 1, and the remaining elements are assigned a value of 0.

[0058] S2, randomly sample standard Gaussian noise as the noise sequence X T ; T is the maximum diffusion step set;

[0059] S3, to X t+1 Perform noise reduction generation to obtain the noisy traffic matrix X' t ;The initial value of t is T-1;

[0060] ;

[0061] Among them, ε θ (X t+1 ,t+1) represents the diffusion model combining the diffusion step t+1 and the input X t+1 The noise predicted and output; 0≤t≤T-1; z is a random variable sampled from a standard Gaussian distribution; α t , α t+1 , β t+1 , α' t+1 All represent constants; 0≤t≤T-1, βt+1 The value is taken from the setting array {β t |0≤t≤ T-1};0<β0<β1<β2<β3<…<β t <…<β T-1 <1; α' t+1 =∏ t+1 r=1 α r ; α r =1-β r β r ∈{β t |0≤t≤ T-1}; α t =1-β t ;

[0062] In specific implementation, β0=10 -4 , β T-1 =0.02.

[0063] S4. According to X t+1 Calculate the posterior probability distribution P(X0|X t+1 ) 0,v , from X 0,v Extract the flow corresponding to the known part of X as X ob The estimated value of X ob,v , based on the posterior distribution and gradient correction, the traffic matrix is ​​estimated X'' t ;

[0064] ;

[0065] ;

[0066] Among them, ρ t is a constant that controls the influence of the reaction gradient and is related to the diffusion step t, ρ t =(1-α t ) / α t 1 / 2 ; ||X ob -X ob,v ||2 means ||X ob -X ob,v ||2About X t+1 The gradient of ||X ob -X ob,v ||2 pairs of X t+1 The derivative of ; ||·||2 means taking the second norm;

[0067] S5. Estimate X'' from the traffic matrix t Extract the traffic distribution X'' of the unknown source point pair corresponding to the mask Mc un,t, calculate the denoised traffic matrix X t ;

[0068] ;

[0069] Among them, X ob,t For X t Corresponding to the traffic distribution of known source pairs in the mask Mc, X un,t For X t The traffic distribution of the unknown source point pair in the corresponding mask Mc; X ob is the known part of the initial traffic matrix X; ε t is randomly sampled Gaussian noise;

[0070] S6, determine whether t≤0 is satisfied; if not, update t+1 to t, and then return to step S3; if yes, replace the traffic distribution of the known source point pair in the mask Mc in X0 with X ob , and then output the final network traffic matrix X0.

[0071] Reference Figure 2 , Figure 3 The diffusion model adopts the UNet backbone network. The diffusion model includes a first downsampling module, a second downsampling module, a third downsampling module, an intermediate transition module, a first upsampling module, a second upsampling module and a third upsampling module connected in sequence; it also includes a position encoding module and a multi-layer perceptron. The output of the position encoding module is connected to the input of the multi-layer perceptron. The position encoding module can specifically use sinusoidal position encoding; the output of the multi-layer perceptron is respectively connected to the input of the first downsampling module, the second downsampling module, the third downsampling module, the intermediate transition module, the first upsampling module, the second upsampling module and the third upsampling module. The input of the first downsampling module is the input of the diffusion model, the output of the third upsampling module is the output of the diffusion model, and the position encoding module is used to access the diffusion step t; the input of the i-th upsampling module is also connected to the output of the 4-i-th downsampling module.

[0072] The first downsampling module, the second downsampling module and the third downsampling module have the same structure and are collectively referred to as downsampling modules. The downsampling module consists of two residual modules and a downsampling layer. The inputs of the two residual modules are connected to the input of the downsampling module. After the two residual modules process the input data, they output residual data; the downsampling layer samples the two residual data to form downsampling data output; the output of the downsampling layer is the output of the downsampling module.

[0073] The intermediate transition module is composed of two residual modules. The residual module performs residual processing on the input of the intermediate transition module and then outputs it. The residual data output by the two residual modules are concatenated to form the output data of the intermediate transition module.

[0074] The first upsampling module, the second upsampling module and the third upsampling module have the same structure and are collectively referred to as upsampling modules. The upsampling module consists of two residual modules and an upsampling layer. The input of the upsampling layer is the input of the upsampling module. In the upsampling module, the residual module performs residual processing on the upsampling data output by the upsampling layer, and the residual data output by the two residual modules are spliced ​​to form the output data of the upsampling module.

[0075] The above residual modules have the same structure, and the output of the multi-layer perceptron is embedded in the input of all residual modules. The residual module includes a first group of normalization layers, a first activation function, a first convolutional layer, a diffusion step embedding layer, a second group of normalization layers, a second activation function, and a second convolutional layer connected in sequence. The input of the first group of normalization layers is the input of the residual module, and the output of the second convolutional layer is the output of the residual module; the input of the diffusion step embedding layer is also connected to the output of the multi-layer perceptron to access the diffusion step information.

[0076] The first activation function and the second activation function can specifically adopt ReLU activation layers or other existing activation layers. The first convolution layer adopts a 3×3 one-dimensional convolution network, and the second convolution layer adopts a 3×3 one-dimensional convolution network.

[0077] It is worth noting that in the diffusion model, the number of downsampling modules and upsampling modules is equal. In specific implementation, the number of downsampling modules and upsampling modules can be set to 1 or more, not necessarily 4; when the number of downsampling modules and upsampling modules is N, the downsampling modules are connected in series in the order of 1-N, and the upsampling modules are connected in series in the order of 1-N, and the input of the i-th upsampling module is also connected to the output of the N+1-i-th downsampling module.

[0078] Reference Figure 4 , Figure 5 , Figure 6 ,The training process of the diffusion model includes the following steps.

[0079] St1. Collect the source point pair traffic in the network and organize it into an initial traffic matrix X containing some known source point pair traffic. The initial traffic matrix X is used as a training sample. Build and initialize the basic model. The basic model includes: noise prediction network, reconstruction network and identification network. The structure of the noise prediction network is the same as that of the diffusion model.

[0080] The noise prediction network is used to add noise to the input traffic matrix, and the output of the noise prediction network is the original noise when the traffic matrix is ​​noised; the reconstruction network reconstructs the input traffic matrix; the identification network is used to identify whether the input traffic matrix is ​​the true value or the reconstructed value output by the reconstruction network.

[0081] Specifically, in this implementation, the reconstruction network and the identification network sample the same network structure. Taking the reconstruction network as an example, the reconstruction network includes three parts: an encoder, a decoder and an output layer.

[0082] The encoder includes a first downsampling convolution block, a second downsampling convolution block, a third downsampling convolution block, a first normalization layer, and a first ReLU activation layer connected in sequence. The downsampling convolution block includes a 3×3 convolution layer, a second normalization layer, and a second ReLU activation layer connected in sequence.

[0083] The decoder includes the following sequentially connected layers: a first upsampling convolution block, a second upsampling convolution block, a third upsampling convolution block, a third normalization layer, and a third ReLU activation layer. The upsampling convolution block includes the following sequentially connected layers: a 3×3 deconvolution layer, a fourth normalization layer, and a fourth ReLU activation layer.

[0084] The output layer consists of a fully connected layer and a Sigmoid activation layer in sequence.

[0085] St2, extract multiple training samples X, let the output of the reconstruction network for the training sample X be recorded as R(X); the input of the identification network is the known part X from the training sample X ob The output of the identification network is: the predicted probability D(X) that the flow of each source point pair in the spliced ​​flow matrix is ​​the true value; the unknown part from the reconstructed flow matrix R(X) refers to the flow distribution of the unknown source point pairs in the training sample X corresponding to R(X).

[0086] Calculate the first loss function L1 and the second loss function L2; construct the target loss function L=λL1+ L2, where λ is the trade-off coefficient;

[0087] The first loss function L1 is the adversarial loss function between known source point pairs and unknown source point pairs in the predicted probability D(X);

[0088] ;

[0089] Where R represents the reconstruction network, D represents the identification network, ⊙ represents the Hadamard product, M represents the mask corresponding to the training sample X, E represents the expectation, and [1] represents the unit matrix.

[0090] The second loss function is the mean square error between the actual flow and the reconstructed flow of the known source point pair, which is recorded as:

[0091] ;

[0092] Among them, ||·||2 is the two-norm.

[0093] St3, fix the identification network, and use stochastic gradient descent to update the parameters of the reconstruction network in combination with the target loss. The formula is expressed as:

[0094] ;

[0095] Among them, θ R n+1 Represents the updated parameters of the reconstructed network, θ R n Represents the parameters before the reconstruction network update, represents the function about θ R n The gradient of ; η is the learning rate;

[0096] St4, fix the reconstruction network, and use stochastic gradient descent combined with the first loss function to update the parameters of the identification network. The formula is expressed as:

[0097] ;

[0098] Among them, θ D n+1 represents the updated parameters of the discriminator network, θ D n Indicates the parameters before identifying the network update. represents the function about θ D n The gradient of

[0099] St5, determine whether the number of network reconstruction and identification network update times reaches the set value n1; if not, return to step St2; if yes, execute step St6;

[0100] St6. Extract multiple training samples X, let the reconstruction network reconstruct the training samples X, record the reconstructed samples of X as R(X), and obtain the source point flow combination matrix X'= M⊙X+M⊙R(X); uniformly sample the diffusion step t from the integer set {1,2,…,T}, combine the diffusion step t and the randomly sampled Gaussian noise ε to add noise to X', and obtain the flow matrix X t ;

[0101] The process formula of adding noise to X' combined with the diffusion step t is expressed as follows:

[0102] ;

[0103] St7, X t and diffusion step t is input into the noise prediction network, and the noise prediction network outputs ε θ (X t ,t); Calculate the loss of the noise prediction network L3=||ε-ε θ (X t,t)||;||·|| represents the 1 norm; gradient descent is used in combination with L3 to update the noise prediction network;

[0104] St8, determine whether the update times of the noise prediction network reaches the set value n2; if not, return to step St6; if yes, fix the noise prediction network as the diffusion model.

[0105] In this implementation, the value range of n1 is [30, 50]; the value range of n2 is [50, 100].

[0106] The following is a verification of the above-mentioned method for filling the missing network traffic matrix based on the diffusion model in conjunction with a specific embodiment.

[0107] In this embodiment, in combination with real network traffic datasets Abilene and GÉANT, under various unknown traffic ratios, the diffusion model-based missing network traffic matrix filling method provided by the present invention (hereinafter referred to as the present invention method) is compared with five other existing deep learning models as comparison models, namely DATC (Deep adversarial tensor completion), NTC (Neural tensor completion), NTM (Neural tensor model), NTF (Neural tensor factorization) and CoSTCo (Convolutional Sparse Tensor Completion).

[0108] In this embodiment, for each data set, the first 3000 TM data are randomly divided into known and unknown source point pairs according to a set ratio to serve as training samples. In this embodiment, the training samples are divided into a training set and a test set, the diffusion model and each comparison model in the method of the present invention are trained on the training set, and the method of the present invention and the trained comparison model are tested on the test set.

[0109] In this embodiment, the method of the present invention and each comparative model were developed under the Pytorch framework, and trained and tested on an NVIDIA GTX3090 graphics card. During training, the Adam optimizer was used to optimize the model parameters, the batch size was set to 64, the initial learning rate was 8e-4, and then the cosine annealing algorithm was used for adjustment.

[0110] In this embodiment, when the diffusion model proposed in the present invention is trained on the data set Abilene, the trade-off coefficient λ is set to 0.01; when the diffusion model proposed in the present invention is trained on the data set GÉANT, the trade-off coefficient λ is set to 0.002.

[0111] In this embodiment, the normalized mean absolute error (NMAE), normalized root mean square error (NRMSE) and maximum mean difference (MMD) are used as the filling accuracy and distribution evaluation indicators of the model. The lower the value of the indicator, the better the filling effect. The test results of the method of the present invention and the comparison model after training on the data set are shown in the following table.

[0112] Table 1: Performance statistics of each model

[0113] ;

[0114] Combined with the results, it can be seen that the accuracy of all models is inversely proportional to the unknown ratio, and the NMAE of the method of the present invention is better than all the comparison models under any unknown ratio of any data set. And the lower the unknown ratio of the training set, the greater the difference in accuracy of the comparison model relative to the method of the present invention. Combined with the distribution fit reflected by the evaluation index MMD, it can be seen that the network traffic proposed by the method of the present invention shows stronger robustness and rationality. In the absence of source traffic in the training set, the diffusion model of the present invention retains the learning of the network traffic matrix distribution to the greatest extent and the performance is still ahead of the prior art. Therefore, with the continuous expansion of the current network scale, it is becoming increasingly unrealistic to directly measure network traffic, and traffic behavior is becoming more and more complex. The method of the present invention better fits the development trend.

[0115] Of course, it is obvious to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, but also includes the same or similar structures that can be implemented in other specific forms without departing from the spirit or essential features of the present invention. Therefore, no matter from which point of view, the embodiments should be regarded as exemplary and non-limiting, and the scope of the present invention is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any reference numerals in the claims should not be regarded as limiting the claims involved.

[0116] In addition, it should be understood that although the present specification is described according to implementation modes, not every implementation mode contains only one independent technical solution. This description of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment may also be appropriately combined to form other implementation modes that can be understood by those skilled in the art.

[0117] The techniques, shapes, and structural parts not described in detail in the present invention are all well-known techniques.

Claims

1. A method for filling missing network traffic matrix based on diffusion model, characterized in that: The following steps are involved: S1. Obtain the diffusion model. The diffusion model processes the input traffic matrix in combination with the diffusion step and outputs a traffic matrix containing all source point pairs of traffic. Construct the initial traffic matrix X and the corresponding mask Mc. Input the initial traffic matrix X into the diffusion model. The part of the traffic matrix output by the diffusion model that corresponds to the missing source point pairs of traffic in the initial traffic matrix X is recorded as the unknown part X. un ; The known part of the initial traffic matrix X is denoted as X ob ; S2, randomly sample standard Gaussian noise as the noise sequence X T ; T is the maximum diffusion step set; S3, X t+1 Perform noise reduction generation to obtain the noisy traffic matrix X' t ;The initial value of t is T-1; S4. According to X t+1 Calculate the posterior probability distribution P(X0|X t+1 ) 0,v , from X 0,v Extract the flow corresponding to the known part of X as X ob The estimated value of X ob,v , based on the posterior distribution and gradient correction calculation flow matrix estimate X'' t ; S5. Estimate X'' from the traffic matrix t Extract the traffic distribution X'' of the unknown source point pair corresponding to the mask Mc un,t , for X ob Add noise to generate X ob,t , splicing X'' un,t and X ob,t Construct the denoised traffic matrix X t ; S6, loop steps S3-S5 until the denoised traffic matrix X0 is obtained, and replace the traffic distribution of the known source point pairs in the mask Mc in X0 with X ob , and then output as the final network traffic matrix.

2. The method for filling missing network traffic matrix based on diffusion model according to claim 1, characterized in that: The training process of the diffusion model includes the following steps: St1. Collect the source point pair traffic in the network and organize it into an initial traffic matrix X containing some known source point pair traffic, and use the initial traffic matrix X as a training sample; build and initialize the basic model, which includes: noise prediction network, reconstruction network and identification network; the noise prediction network is used to add noise to the input traffic matrix, and the output of the noise prediction network is the original noise when the traffic matrix is ​​noisy; the reconstruction network reconstructs the input traffic matrix; the identification network is used to identify whether the input traffic matrix is ​​the real value or the reconstructed value output by the reconstruction network; St2, extract multiple training samples X, let the output of the reconstruction network for the training sample X be recorded as R(X); the input of the identification network is the known part X from the training sample X ob The output of the identification network is: the predicted probability D(X) that the flow of each source point pair in the spliced ​​flow matrix is ​​the true value; the first loss function L1 and the second loss function L2 are calculated; the first loss function L1 is the adversarial loss function between the known source point pairs and the unknown source point pairs in the predicted probability D(X); the second loss function is the mean square error between the actual flow of the known source point pairs and the reconstructed flow; St3, fix the identification network and use stochastic gradient descent to update the parameters of the reconstruction network in combination with the target loss; the target loss is calculated by combining the first loss function and the second loss function; St4, fix the reconstruction network and use stochastic gradient descent combined with the first loss function to update the parameters of the identification network; St5, loop steps St2-St4 until the number of times the reconstruction network and identification network are updated reaches the set value n1; St6. Extract multiple training samples X and let the reconstruction network reconstruct the training samples X. The reconstructed samples of X are recorded as R(X) to obtain the source point flow combination matrix X'= M⊙X+M⊙R(X); uniformly sample the diffusion step t from the integer set {1,2,…,T}, combine the diffusion step t and the randomly sampled Gaussian noise ε to add noise to X', and obtain the flow matrix X t ; St7, X t And diffusion step t is input into the noise prediction network, and the noise prediction network outputs ε θ (X t ,t); calculate the loss L3=||ε-ε of the noise prediction network θ (X t ,t)||;||·|| represents the 1 norm; gradient descent is used in combination with L3 to update the noise prediction network; St8, loop steps St6-St7 until the number of updates of the noise prediction network reaches the set value n2, then fix the noise prediction network as the diffusion model.

3. The method for filling missing network traffic matrix based on diffusion model according to claim 2, characterized in that: The noise prediction network includes N downsampling modules, intermediate transition modules and N upsampling modules connected in sequence; it also includes a position encoding module and a multi-layer perceptron, the output of the position encoding module is connected to the input of the multi-layer perceptron, and the output of the multi-layer perceptron is respectively embedded in the input of each downsampling module, the intermediate transition module and the input of each upsampling module; the N downsampling modules are connected in sequence from the first downsampling module to the Nth downsampling module, and the N upsampling modules are connected in sequence from the first upsampling module to the Nth upsampling module; the input of the first downsampling module is the input of the noise prediction network, the output of the Nth upsampling module is the output of the noise prediction network, and the position encoding module is used to access the diffusion step t; the input of the i-th upsampling module is also connected to the output of the N+1-i-th downsampling module.

4. The method for filling missing network traffic matrix based on diffusion model according to claim 3, characterized in that: The downsampling module consists of two residual modules and a downsampling layer. In the downsampling module, the inputs of the two residual modules are connected to the input of the downsampling module, the outputs of the two residual modules are connected to the input of the downsampling layer, and the output of the downsampling layer is the output of the downsampling module. The intermediate transition module consists of two residual modules, where the inputs of the two residual modules are connected to the input of the intermediate transition module, and the output data of the intermediate transition module is formed by splicing the residual data output by the two residual modules; The upsampling module consists of two residual modules and an upsampling layer. The input of the upsampling layer is the input of the upsampling module, the output of the upsampling layer is connected to the input of the two residual modules, and the residual data output by the two residual modules are concatenated to form the output data of the upsampling module.

5. The method for filling missing network traffic matrix based on diffusion model according to claim 4, characterized in that: The residual module includes a first set of normalization layers, a first activation function, a first convolutional layer, a diffusion step embedding layer, a second set of normalization layers, a second activation function, and a second convolutional layer, which are connected sequentially. The input of the first set of normalization layers is the input of the residual module, and the output of the second convolutional layer is the output of the residual module. The input of the diffusion step embedding layer is also connected to the output of the multi-layer perceptron to access the diffusion step information.

6. The method for filling missing network traffic matrix based on diffusion model according to claim 2, characterized in that: The first loss function L1 is: ; Among them, R represents the reconstruction network, D represents the identification network, ⊙ represents the Hadamard product, M is the mask corresponding to the training sample X; E represents the expectation.

7. The method for filling missing network traffic matrix based on diffusion model according to claim 2, characterized in that: The second loss function is: ; Where R represents the reconstruction network, ⊙ represents the Hadamard product, M represents the mask corresponding to the training sample X, E represents the expectation, and ||·||2 represents the two-norm.

8. The method for filling missing network traffic matrix based on diffusion model according to claim 1, characterized in that: In S3, X t+1 Perform noise reduction generation to obtain the noisy traffic matrix X' t The formula is: ; Among them, ε θ (X t+1 ,t+1) represents the diffusion model combining the diffusion step t+1 and the input X t+1 The noise predicted and output; 0≤t≤T-1; z is a random variable sampled from a standard Gaussian distribution; α t , α t+1 , β t+1 ,α' t+1 All represent constants; 0≤t≤ T-1, β t+1 The value is taken from the setting array {β t |0≤t≤ T-1};0<β0<β1<β2<β3<…<β t <…<β T-1 <1;α' t+1 =∏ t+1 r=1 α r ; α r =1-β r β r ∈{β t |0≤t≤ T-1};α t =1-β t ; α t+1 =1-β t+1 .

9. The method for filling missing network traffic matrix based on diffusion model according to claim 8, characterized in that: In S4, the traffic matrix is ​​estimated X'' t The calculation formula is: ; Among them, ρ t is a constant that controls the influence of the gradient and is related to the diffusion step t, ρ t =(1-α t ) / α t 1 / 2 ; ||X ob -X ob,v ||2 means ||X ob -X ob,v ||2 About X t+1 The gradient of X t+1 Perform posterior mean sampling to obtain X 0,v , X ob,v For X 0,v The flow rate corresponding to the known part of X; ; Among them, ε θ (X t+1 ,t+1) represents the diffusion model combining the diffusion step t+1 and the input X t+1 Generate and output the traffic matrix; In S5, X ob Add noise to generate X ob,t The method is: X ob,t =α' t 1 / 2 X ob +(1-α' t ) 1 / 2 ε t ;α' t =∏ t r=1 α r ; where ε t is randomly sampled Gaussian noise.

10. A missing network traffic matrix filling system based on a diffusion model, characterized in that: The invention comprises a memory and a processor, wherein a computer program is stored in the memory, the processor is connected to the memory, and the processor is used to execute the computer program to implement the method for filling the missing network traffic matrix based on the diffusion model as described in any one of claims 1 to 9.