Network traffic prediction method and device

The sample matrix is ​​converted into a grayscale image through a single-sample generative adversarial network model, and the generative adversarial network is trained to generate a predicted image, which solves the problem of insufficient accuracy in IP network traffic prediction and achieves high-precision prediction with few samples.

CN116976471BActive Publication Date: 2025-09-19CHINA TELECOM CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210383977.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-13
Publication Date
2025-09-19
Estimated Expiration
2042-04-13

AI Technical Summary

Technical Problem

Existing IP network traffic prediction methods have the problem of insufficient prediction accuracy when dealing with network traffic with strong burstiness and volatility. Especially when the number of samples is small, deep learning-based solutions cannot effectively improve the prediction accuracy.

Method used

A single-sample generative adversarial network model is used to convert the sample matrix into a grayscale image. The predicted image is generated by training the generative adversarial network, and the network traffic prediction results are generated through splicing and weighted superposition, achieving high-precision prediction with less sample data.

Benefits of technology

The accuracy of network traffic prediction is improved, and accurate traffic prediction can be achieved with less sample data, adapting to the suddenness and volatility of traffic in IP networks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116976471B_ABST
    Figure CN116976471B_ABST
Patent Text Reader

Abstract

The present disclosure provides a network traffic prediction method and device. The network traffic prediction method includes: converting a sample matrix into a corresponding sample matrix grayscale image; using the sample matrix grayscale image to train each layer of the generative adversarial network in a single-sample generative adversarial network model; selecting a target generator for inputting a grayscale image to be predicted in the single-sample generative adversarial network model; splicing the grayscale image blocks in the 2-Nth row of the sample matrix grayscale image and the preset grayscale image blocks corresponding to the preset row matrix to generate a grayscale image to be predicted, wherein the preset grayscale image blocks are located in the Nth row of the grayscale image to be predicted; inputting the grayscale image to be predicted into the target generator so that the generator in the first layer of the generative adversarial network of the single-sample generative adversarial network model outputs a predicted grayscale image; converting the grayscale image blocks in the Nth row of the predicted grayscale image into traffic data to serve as the network traffic prediction result at the N+1th sampling moment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of network technology, and in particular to a network traffic prediction method and device. Background Art

[0002] Network traffic forecasting has become an increasingly critical research topic as the number of IP network users rapidly increases. Accurate and reliable predictions of future network link traffic trends are crucial for network operators in handling traffic bursts, providing line fault alerts, and optimizing network topologies.

[0003] Currently, traffic forecasting primarily relies on linear regression and autoregression. For example, algorithms such as ARIMA (Autoregressive Integrated Moving Average model) can be used to predict traffic demand for a single OD (source node-destination node) pair. Deep learning-based traffic forecasting solutions, such as CNN (Convolutional Neural Network), RNN (Recurrent Neural Network), and LSTM (Long Short-Term Memory), can also be used for network traffic forecasting. Summary of the Invention

[0004] The inventors noticed that the existing IP network traffic is highly sudden and volatile, the fluctuation range of the traffic sampling value sequence is relatively drastic, and the random error of sampling is obvious. The traffic change trend often shows a nonlinear law. Therefore, the research ideas based on existing linear regression and autoregression perform poorly when dealing with the existing IP network traffic prediction problem.

[0005] The traffic prediction solution based on deep learning has relatively stable prediction performance, but it requires the construction of a large amount of sample data for model training. Too small a number of samples will lead to insufficient sample generalization ability of the model, thus failing to improve the prediction accuracy.

[0006] Based on this, the present disclosure provides a network traffic prediction solution that can obtain more accurate prediction results using fewer samples.

[0007] According to the first aspect of the embodiments of the present disclosure, a network traffic prediction method is provided, including: converting a sample matrix into a corresponding sample matrix grayscale image, where the i-th row of the sample matrix includes traffic data collected at the i-th sampling moment, 1 ≤ i ≤ N, and N is the number of rows of the sample matrix; training each layer of the generative adversarial network in the single-sample generative adversarial network model using the sample matrix grayscale image; selecting a target generator in the single-sample generative adversarial network model for inputting the grayscale image to be predicted; splicing the grayscale image blocks of the 2-N rows in the sample matrix grayscale image and a preset grayscale image block corresponding to a preset row matrix to generate the grayscale image to be predicted, where the preset grayscale image block is located in the N-th row of the grayscale image to be predicted; inputting the grayscale image to be predicted into the target generator so that the generator in the first-layer generative adversarial network of the single-sample generative adversarial network model outputs a predicted grayscale image; converting the grayscale image block in the N-th row of the predicted grayscale image into traffic data as the network traffic prediction result at the N+1-th sampling moment.

[0008] In some embodiments, the inputting the grayscale image to be predicted into the target generator includes: if the target generator G p is not the generator G1 in the first-layer generative adversarial network of the single-sample generative adversarial network model, then inputting the grayscale image to be predicted into the target generator G p to output a predicted image Inputting the predicted image into the generator G q-1 to output a predicted image 1 < q ≤ p; using the predicted image output by the generator G1 as the predicted grayscale image.

[0009] In some embodiments, the inputting the grayscale image to be predicted into the target generator includes: if the target generator G p is the generator G1, then inputting the grayscale image to be predicted into the generator G1, and using the predicted image output by the generator G1 as the predicted grayscale image.

[0010] In some embodiments, the selecting a target generator in the single-sample generative adversarial network model for inputting the grayscale image to be predicted includes: replacing the grayscale image block in the N-th row of the sample matrix grayscale image with a preset grayscale image block to generate a to-be-fused image, and using the to-be-fused image as the current processing image; respectively performing downsampling on the current processing image to generate M images, where the size of the k-th image corresponds to the generator G k in the single-sample generative adversarial network model, 1 ≤ k ≤ M; inputting the k-th image into the corresponding initial generator G kTo output the predicted image The predicted image Input generator G k-1 To output the predicted image Until the generator G1 outputs the predicted image until; among the M predicted images output by the generator G1, the initial generator corresponding to the optimal predicted image with the smallest deviation from the sample matrix grayscale image is used as the target generator; the optimal predicted image is weightedly superimposed with the image to be fused to generate an updated current processed image; and the steps of downsampling the current processed image are cyclically executed until the preset loop end condition is met.

[0011] In some embodiments, the preset loop end condition includes: the deviation of the optimal prediction image obtained from two adjacent loops is less than a preset threshold, or the number of loops is greater than a preset threshold.

[0012] In some embodiments, the training of each layer of the generative adversarial network in the single-sample generative adversarial network model using the sample matrix grayscale image includes: in the single-sample generative adversarial network model, inputting random noise into the generator G in the M-th layer of the generative adversarial network M To generate the predicted image The discriminator D in the M-th layer of the generative adversarial network M Identify the predicted image and the preset sample image X M The similarity of the generator G is determined based on the discriminant results. M and the discriminator D M For training, the sample image X M is randomly extracted from the sample matrix grayscale image and the predicted image The single-sample generative adversarial network model includes an M-layer generative adversarial network; random noise and the generator G in the j+1th layer generative adversarial network are combined. j+1 Output predicted image Input the generator G in the j-th layer of the generative adversarial network j To generate the predicted image By generating the discriminator D in the adversarial network at the jth layer j Identify the predicted image and the preset sample image X j The similarity of the generator G is determined based on the discriminant results. j and the discriminator D j For training, the sample image X j is randomly extracted from the sample matrix grayscale image and the predicted image Images of the same size, 1≤j <M。

[0013] In some embodiments, the predicted image has a size greater than that of the predicted image .

[0014] According to a second aspect of the embodiments of the present disclosure, a network traffic prediction device is provided, including: a first processing module configured to convert a sample matrix into a corresponding grayscale image of the sample matrix, where the i-th row of the sample matrix includes traffic data collected at the i-th sampling moment, 1≤i≤N, and N is the number of rows of the sample matrix; a second processing module configured to train each layer of the generative adversarial network in the single-sample generative adversarial network model using the grayscale image of the sample matrix; a third processing module configured to select a target generator for inputting a grayscale image to be predicted in the single-sample generative adversarial network model; a fourth processing module configured to splice the grayscale image blocks of the 2-Nth rows in the grayscale image of the sample matrix and a preset grayscale image block corresponding to a preset row matrix to generate the grayscale image to be predicted, where the preset grayscale image block is located in the Nth row of the grayscale image to be predicted; a fifth processing module configured to input the grayscale image to be predicted into the target generator so that the generator in the first layer of the generative adversarial network of the single-sample generative adversarial network model outputs a predicted grayscale image; a sixth processing module configured to convert the grayscale image block of the Nth row in the predicted grayscale image into traffic data as the network traffic prediction result at the N+1th sampling moment.

[0015] In some embodiments, the fifth processing module is configured to, if the target generator G p is not the generator G1 in the first layer of the generative adversarial network of the single-sample generative adversarial network model, input the grayscale image to be predicted into the target generator G p to output a predicted image Input the predicted image into the generator G q-1 to output a predicted image 1<q≤p, and use the predicted image output by the generator G1 as the predicted grayscale image.

[0016] In some embodiments, the fifth processing module is configured to, if the target generator G p is the generator G1, input the grayscale image to be predicted into the generator G1 and use the predicted image output by the generator G1 as the predicted grayscale image.

[0017] In some embodiments, the third processing module is configured to replace the grayscale image block of the Nth row of the sample matrix grayscale image with a preset grayscale image block to generate an image to be fused, and use the image to be fused as the current processing image, and downsample the current processing image to generate M images, where the size of the kth image is the same as the size of the generator G in the single sample generative adversarial network model. k Correspondingly, 1≤k≤M, the kth image is input into the corresponding initial generator G k To output the predicted image The predicted image Input generator G k-1 To output the predicted image Until the generator G1 outputs the predicted image So far, among the M predicted images output by the generator G1, the initial generator corresponding to the optimal predicted image with the smallest deviation from the sample matrix grayscale image is used as the target generator, and the optimal predicted image is weightedly superimposed with the image to be fused to generate an updated current processed image, and the steps of downsampling the current processed image are cyclically executed until the preset loop end condition is met.

[0018] In some embodiments, the preset loop end condition includes: the deviation of the optimal prediction image obtained from two adjacent loops is less than a preset threshold, or the number of loops is greater than a preset threshold.

[0019] In some embodiments, the second processing module is configured to input random noise into the generator G in the M-th layer of the generative adversarial network in the single-sample generative adversarial network model. M To generate the predicted image The discriminator D in the M-th layer of the generative adversarial network M Identify the predicted image and the preset sample image X M The similarity of the generator G is determined based on the discriminant results. M and the discriminator D M For training, the sample image X M is randomly extracted from the sample matrix grayscale image and the predicted image The single-sample generative adversarial network model includes an M-layer generative adversarial network, which combines random noise with the generator G in the j+1th layer generative adversarial network. j+1 Output predicted image Input the generator G in the j-th layer of the generative adversarial network j To generate the predicted image By generating the discriminator D in the adversarial network at the jth layer j Identify the predicted image and the preset sample image X j The similarity of the generator G is determined based on the discriminant results. j and the discriminator D j For training, the sample image X j is randomly extracted from the sample matrix grayscale image and the predicted image Images of the same size, 1≤j <M。

[0020] In some embodiments, the predicted image The size is larger than the predicted image size.

[0021] According to a third aspect of an embodiment of the present disclosure, a network traffic prediction device is provided, comprising: a memory configured to store instructions; a processor coupled to the memory, the processor being configured to execute a method as described in any of the above embodiments based on the instructions stored in the memory.

[0022] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and when the instructions are executed by a processor, the method described in any of the above embodiments is implemented.

[0023] Other features and advantages of the present disclosure will become apparent from the following detailed description of exemplary embodiments of the present disclosure with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the embodiments of the present disclosure 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 disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0025] Figure 1 A flowchart of a network traffic prediction method according to an embodiment of the present disclosure is provided;

[0026] Figure 2 A schematic diagram of a sample matrix grayscale image according to an embodiment of the present disclosure;

[0027] Figure 3 A schematic diagram of a single-sample generative adversarial network model according to an embodiment of the present disclosure;

[0028] Figure 4 A schematic diagram of target generator selection for one embodiment of the present disclosure;

[0029] Figure 5 A- Figure 5C is a schematic diagram of a grayscale image of some embodiments of the present disclosure;

[0030] Figure 6 A schematic diagram of network traffic prediction according to an embodiment of the present disclosure;

[0031] Figure 7 This is a schematic diagram of the structure of a network traffic prediction device according to an embodiment of the present disclosure;

[0032] Figure 8 This is a schematic diagram of the structure of a network traffic prediction device according to another embodiment of the present disclosure. DETAILED DESCRIPTION

[0033] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments. The following description of at least one exemplary embodiment is actually only illustrative and is in no way intended to limit the present disclosure and its application or use. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present disclosure.

[0034] Unless specifically stated otherwise, the relative arrangement of components and steps, the numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the present disclosure.

[0035] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.

[0036] Technologies, methods and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, such technologies, methods and equipment should be considered part of the authorization specification.

[0037] In all examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not limiting. Therefore, other examples of the exemplary embodiments may have different values.

[0038] It should be noted that like reference numerals and letters refer to like items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.

[0039] Figure 1 FIG2 is a flow chart of a network traffic prediction method according to an embodiment of the present disclosure. In some embodiments, the following network traffic prediction method is performed by a network traffic prediction device.

[0040] In step 101, the sample matrix is ​​converted into a corresponding sample matrix grayscale image, wherein the i-th row of the sample matrix includes the flow data collected at the i-th sampling moment, 1≤i≤N, and N is the number of rows of the sample matrix.

[0041] For example, a sample matrix is ​​generated based on the traffic data of four ODs in the IP network collected at sampling time T1-T7. Next, each item in the sample matrix is ​​mapped into a grayscale graphic block according to the traffic data, such as Figure 2 shown.

[0042] It should be noted that since the traffic values ​​on different links are at different orders of magnitude, the traffic values ​​on each link need to be standardized and normalized first. On this basis, each value in the traffic matrix is ​​mapped to a grayscale image block.

[0043] For example, each value is multiplied by 255 to obtain the grayscale value of the corresponding image block.

[0044] return Figure 1 In step 102, each layer of the generative adversarial network in the single-sample generative adversarial network model is trained using the sample matrix grayscale image.

[0045] It should be noted that the single-sample generative adversarial network model includes multiple layers of generative adversarial networks, where each layer of the generative adversarial network includes a generator and a discriminator.

[0046] like Figure 3 As shown in Figure 1, the single-sample generative adversarial network model includes M layers of generative adversarial networks.

[0047] During training, random noise is input into the generator G in the M-th layer of the generative adversarial network. M To generate the predicted image Generate the discriminator D in the adversarial network through the Mth layer M Identify predicted images and the preset sample image X M The similarity of the generator G is determined based on the discriminant results. M and the discriminator D M Perform training. Sample image X M The predicted image is randomly extracted from the sample matrix grayscale image For images of the same size, the single-sample generative adversarial network model includes M layers of generative adversarial networks.

[0048] After the M-th layer of the generative adversarial network is trained, the random noise and the generator G in the j+1-th layer of the generative adversarial network are combined. j+1 Output predicted image Input the generator G in the j-th layer of the generative adversarial network jTo generate the predicted image Generate the discriminator D in the adversarial network through the jth layer j Identify predicted images and the preset sample image X j The similarity of the generator G is determined based on the discriminant results. j and the discriminator D j For training, the sample image X j The predicted image is randomly extracted from the sample matrix grayscale image Images of the same size, 1≤j <M。

[0049] For example, after the training of the M-th layer of the generative adversarial network is completed, the M-1-th layer of the generative adversarial network is trained. After the training of the M-1-th layer of the generative adversarial network is completed, the M-2-th layer of the generative adversarial network is trained, and so on, until the training of the 1-th layer of the generative adversarial network is completed.

[0050] It should be noted that the sizes of the predicted images output by the generators at different layers are different. For example, the generator G at layer j is j Output predicted image The size is larger than the generator G at the j+1th layer j+1 Output predicted image size.

[0051] In some embodiments, it is necessary to convert the generator G in the j+1th layer of the generative adversarial network j+1 Output predicted image Upsampling is performed so that the size of the predicted image after upsampling is equal to the size of the generator G in the j-th layer generative adversarial network j Output predicted image The size of is the same or similar, so that the generator G j Generate predicted image

[0052] return Figure 1 In step 103, a target generator for inputting the grayscale image to be predicted is selected in the single-sample generative adversarial network model.

[0053] In some embodiments, the grayscale image block in the Nth row of the sample matrix grayscale image is replaced with a preset grayscale image block to generate an image to be fused, and the image to be fused is used as the current processing image.

[0054] Next, the current processed image is downsampled to generate M images, where the size of the kth image is the same as the generator G in the single-sample generative adversarial network model. k Correspondingly, 1≤k≤M.

[0055] Next, the kth image is input into the corresponding initial generator G k To output the predicted image The predicted image Input generator G k-1 To output the predicted image Until the generator G1 outputs the predicted image until.

[0056] Among the M predicted images output by the generator G1, the initial generator corresponding to the optimal predicted image with the smallest deviation from the sample matrix grayscale image is used as the target generator.

[0057] Next, the optimal predicted image and the image to be fused are weightedly superimposed to generate an updated current processed image.

[0058] For example, let the optimal predicted image be Output epoch , the image to be fused is Input0, then the updated current processed image Output epoch+1 for:

[0059] Output epoch+1 =αOutput epoch +(1-α)Input0

[0060] For example, the parameter α is 0.9.

[0061] Next, the steps of downsampling the currently processed image are executed in a loop until a preset loop termination condition is satisfied. For example, the preset loop termination condition includes: the deviation of the optimal prediction image obtained from two consecutive loops is less than a preset threshold, or the number of loops exceeds a preset threshold.

[0062] The embodiment is described below through specific examples.

[0063] The grayscale image block in the Nth row of the sample matrix grayscale image is replaced with a preset grayscale image block to generate an image to be fused, and the image to be fused is used as the current processing image.

[0064] The current processed image is downsampled respectively to generate M images.

[0065] Next, the Mth image is input into the corresponding initial generator G M To output the predicted image The predicted image Input generator G M-1 To output the predicted image And so on, until the generator G1 outputs the predicted image until.

[0066] Next, the M-1th image is input into the corresponding initial generator G M-1 To output the predicted image The predicted image Input generator G M-2 To output the predicted image And so on, until the generator G1 outputs the predicted image until.

[0067] Repeat the above steps, and the generator G1 outputs a total of M predicted images. It should be noted that in these M predicted images, the grayscale image block in the Nth row is the prediction result.

[0068] Next, among these M predicted images, the initial generator corresponding to the optimal predicted image with the smallest deviation from the sample matrix grayscale image is used as the target generator.

[0069] Next, the optimal predicted image and the image to be fused are weightedly superimposed to generate an updated current processed image.

[0070] The process then loops through the steps of downsampling the currently processed image to proceed to the next processing cycle. If, after a cycles, the deviation between the optimal predicted image obtained in the ath cycle and the optimal predicted image obtained in the a-1th cycle is less than a preset threshold, the loop is terminated and the initial generator corresponding to the optimal predicted image obtained in the ath cycle is used as the target generator.

[0071] Alternatively, after a cycles, the deviation between the optimal predicted image obtained in the a-th cycle and the optimal predicted image obtained in the a-1-th cycle is still greater than the preset threshold, but at this time a is greater than the preset number threshold. In this case, the cycle can also be terminated, and the initial generator corresponding to the optimal predicted image obtained in the a-th cycle can be used as the target generator.

[0072] In step 104, the grayscale image blocks in the 2nd to Nth rows of the sample matrix grayscale image and the preset grayscale image blocks corresponding to the preset row matrix are spliced ​​to generate a grayscale image to be predicted, wherein the preset grayscale image blocks are located in the Nth row of the grayscale image to be predicted.

[0073] For example, the sample matrix grayscale image is as follows Figure 5 As shown in A. The grayscale image blocks in rows 2-N of the sample matrix grayscale image are moved up one row at a time, and the Nth row is filled with the preset grayscale image blocks. Figure 5 As shown in B. Next, the single-sample generative adversarial network model is used to Figure 5 The image shown in B is processed to predict the grayscale image block in the Nth row, such as Figure 5 As shown in C.

[0074] return Figure 1. In step 105, the grayscale image to be predicted is input into the target generator so that the generator in the first layer of the single-sample generative adversarial network model outputs a predicted grayscale image.

[0075] In some embodiments, if the target generator G p is not the generator G1 in the first layer of the single-sample generative adversarial network model, the grayscale image to be predicted is input into the target generator G p to output a predicted image The predicted image is input into the generator G q-1 to output a predicted image 1 < q ≤ p. The predicted image output by the generator G1 is used as the predicted grayscale image.

[0076] If the target generator G p is the generator G1, the grayscale image to be predicted is input into the generator G1, and the predicted image output by the generator G1 is used as the predicted grayscale image.

[0077] For example, as Figure 6 shown, there are 5 generators in the single-sample generative adversarial network model. Through the above processing, the generator G3 is determined as the target generator. Next, Figure 5 the grayscale image to be predicted shown in B is input into the generator G3, the output result of the generator G3 is input into the generator G2, and the output result of the generator G2 is input into the generator G1 to obtain Figure 5 the predicted grayscale image shown in C.

[0078] In step 106, the grayscale image block in the Nth row of the predicted grayscale image is converted into traffic data as the network traffic prediction result at the (N + 1)th sampling moment.

[0079] Figure 7 is a schematic structural diagram of a network traffic prediction device according to an embodiment of the present disclosure. As Figure 7 shown, the network traffic prediction device includes a first processing module 71, a second processing module 72, a third processing module 73, a fourth processing module 74, a fifth processing module 75, and a sixth processing module 76.

[0080] The first processing module 71 is configured to convert the sample matrix into a corresponding sample matrix grayscale image, where the i-th row of the sample matrix includes the traffic data collected at the i-th sampling moment, 1 ≤ i ≤ N, and N is the number of rows of the sample matrix.

[0081] The second processing module 72 is configured to train each layer of the generative adversarial network in the single-sample generative adversarial network model using the sample matrix grayscale image.

[0082] In some embodiments, the second processing module 72 is configured to input random noise into the generator G in the M-th layer of the generative adversarial network in the single-sample generative adversarial network model. M To generate the predicted image Generate the discriminator D in the adversarial network through the Mth layer M Identify predicted images and the preset sample image X M The similarity of the generator G is determined based on the discriminant results. M and the discriminator D M For training, the sample image X M is randomly extracted from the sample matrix grayscale image and the predicted image For images of the same size, the single-sample generative adversarial network model includes M layers of generative adversarial networks, which combine random noise with the generator G in the j+1th layer of the generative adversarial network. j+1 Output predicted image Input the generator G in the j-th layer of the generative adversarial network j To generate the predicted image Generate the discriminator D in the adversarial network through the jth layer j Identify predicted images and the preset sample image X j The similarity of the generator G is determined based on the discriminant results. j and the discriminator D j For training, the sample image X j is randomly extracted from the sample matrix grayscale image and the predicted image Images of the same size, 1≤j <M。

[0083] In some embodiments, the predicted image The size is larger than the predicted image size.

[0084] The third processing module 73 is configured to select a target generator for inputting a grayscale image to be predicted in the single-sample generative adversarial network model.

[0085] In some embodiments, the third processing module 73 is configured to replace the grayscale image block of the Nth row of the sample matrix grayscale image with a preset grayscale image block to generate an image to be fused, and use the image to be fused as the current processing image, and downsample the current processing image to generate M images, where the size of the kth image is the same as the size of the generator G in the single sample generative adversarial network model. k Correspondingly, 1≤k≤M, the kth image is input into the corresponding initial generator G k To output the predicted image The predicted image Input generator Gk-1 to output a predicted image until the generator G1 outputs a predicted image At this point, among the M predicted images output by the generator G1, the initial generator corresponding to the optimal predicted image with the smallest deviation from the sample matrix grayscale image is used as the target generator, and the optimal predicted image and the image to be fused are weighted and superimposed to generate an updated current processed image. The steps of downsampling the current processed image are cyclically executed

[0086] For example, the preset loop end conditions include: the deviation between the optimal predicted images obtained in two adjacent loops is less than a preset threshold, or the number of loops is greater than a preset number threshold

[0087] The fourth processing module 74 is configured to splice the grayscale image blocks of the 2-Nth rows in the sample matrix grayscale image and the preset grayscale image blocks corresponding to the preset row matrix to generate a grayscale image to be predicted, where the preset grayscale image blocks are located in the Nth row of the grayscale image to be predicted

[0088] The fifth processing module 75 is configured to input the grayscale image to be predicted into the target generator, so that the generator in the first-layer generative adversarial network of the single-sample generative adversarial network model outputs a predicted grayscale image

[0089] In some embodiments, the fifth processing module 75 is configured to, if the target generator G p is not the generator G1 in the first-layer generative adversarial network of the single-sample generative adversarial network model, input the grayscale image to be predicted into the target generator G p to output a predicted image Input the predicted image into the generator G q-1 to output a predicted image 1 < q ≤ p, use the predicted image output by the generator G1 as the predicted grayscale image

[0090] In addition, the fifth processing module 75 is configured to, if the target generator G p is the generator G1, input the grayscale image to be predicted into the generator G1, and use the predicted image output by the generator G1 as the predicted grayscale image

[0091] [[ID=四十二]]The sixth processing module 76 is configured to convert the grayscale image block in the Nth row of the predicted grayscale image into traffic data as the network traffic prediction result at the (N + 1)th sampling moment

[0092] Figure 8 This is a schematic structural diagram of a network traffic prediction device according to another embodiment of the present disclosure. As Figure 8As shown, the network traffic prediction device includes a memory 81 and a processor 82.

[0093] The memory 81 is used to store instructions. The processor 42 is coupled to the memory 81. The processor 82 is configured to execute the instructions stored in the memory. Figure 1 The method according to any one of the embodiments.

[0094] like Figure 8 As shown, the network traffic prediction device further includes a communication interface 83 for exchanging information with other devices. At the same time, the network traffic prediction device further includes a bus 84 through which the processor 82, the communication interface 83, and the memory 81 communicate with each other.

[0095] Memory 81 may include high-speed RAM memory, or may also include non-volatile memory, such as at least one disk storage. Memory 81 may also be a memory array. Memory 41 may also be divided into blocks, and the blocks may be combined into virtual volumes according to certain rules.

[0096] Furthermore, the processor 82 may be a central processing unit (CPU), or may be an application-specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the present disclosure.

[0097] The present disclosure also relates to a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, which, when executed by a processor, implement the following Figure 1 The method according to any one of the embodiments.

[0098] The present disclosure is described below through specific examples.

[0099] 1) The first 23 sampling times of the 23 links outgoing from the node on January 1, 2005, are selected from the GEANT dataset as training data and constructed into a 23×23 traffic matrix. Furthermore, a 460×460 grayscale image is drawn, which is divided into a 23×23 square grid. Each square corresponds to an element at the same position in the traffic matrix, and the 20×20 pixel area within the grid is filled with grayscale values ​​mapped from normalized traffic values ​​to color space.

[0100] 2) The 460-pixel × 460-pixel grayscale image of the flow matrix was used as a single training example to train a single-shot generative adversarial network model. The model consists of 13 GAN layers. The lowest-level GAN ​​generates images of 25 × 25 pixels, and the next higher-level GAN ​​generates images 1.25 times the size of the images generated by the previous GAN. Each level of GAN is trained with 2,000 randomly cropped image patches from the original sample, matching the output size of the GAN at that level. Training of the single-shot generative adversarial network model begins with the lowest-level GAN. Each level of GAN learns how to optimize its parameters to achieve deconvolution upsampling of the image, generating a larger and more informative imitation image than the input image, until the imitation image is the same size as the original training image.

[0101] 3) The traffic matrix consisting of the traffic values ​​of the corresponding links from time 2 to 24 on January 1, 2005, in the GEANT dataset was used as validation data, and the traffic matrix consisting of the traffic values ​​from time 3 to 25 was used as test data to demonstrate how to adaptively select a multi-round generation path. Here, the last row of squares in the validation matrix (corresponding to the traffic values ​​of all links at time 24) was filled with a grayscale value of 128. The resulting grayscale image to be filled was then fed into the generator module of a single-shot generative adversarial network using different GAN layers as the starting generation layer for generation. Different starting generation layers mean different sizes of the generated image, thus varying the extent to which the GAN affects the texture of the image region during data convolution. Therefore, setting an appropriate GAN starting generation layer can better control the extent to which the single-shot generative adversarial network generator module modifies the global and local features of the image. We calculated the L2 loss function between the generated filled region and the ground-truth region filling value for each starting generation layer setting and found that setting the starting generation layer to 3 yielded the lowest L2 loss. By testing different fusion coefficients, the simulated traffic value grayscale image obtained when the initial GAN ​​generation level is set to 3 and the original grayscale image of the traffic value to be filled are linearly superimposed according to the fusion coefficient. The results show that when the fusion coefficient α = 0.9, the fused grayscale image has the minimum L2 loss function between the fused grayscale image and the true traffic value grayscale image. Therefore, α = 0.9 is selected for fusion. The resulting fused image serves as the input image for the generator module in the next generation cycle, and so on. A total of five generation cycles are performed. At this point, the loss between the predicted traffic values ​​obtained by the inverse transform of the filled area and the true traffic values ​​has decreased very slowly. Generation is stopped to prevent model overfitting. Finally, the starting generation GAN layers and fusion coefficients corresponding to the five generation cycles are obtained. The iterative generation path formed by these coefficients is applied to the test data consisting of time points 3 to 25. The true traffic values ​​from time points 3 to 24 are used to predict the traffic values ​​of all 23 links at time point 25.

[0102] In some embodiments, the functional units described above may be implemented as general-purpose processors, programmable logic controllers (PLC), digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or any appropriate combination thereof, for performing the functions described in the present disclosure.

[0103] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or by a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, which may be a read-only memory, a disk, or an optical disk, etc.

[0104] The description of the present disclosure is provided for purposes of illustration and description and is not intended to be exhaustive or to limit the disclosure to the disclosed form. Many modifications and variations will be apparent to those skilled in the art. The embodiments are selected and described in order to better illustrate the principles and practical applications of the present disclosure and to enable those skilled in the art to understand the present disclosure and design various embodiments with various modifications suitable for specific applications.

Claims

1. A network traffic prediction method, comprising: The sample matrix is ​​converted into a corresponding sample matrix grayscale image, wherein the i-th row of the sample matrix includes the flow data collected at the i-th sampling time, , N is the number of rows of the sample matrix; Using the sample matrix grayscale image to train each layer of the generative adversarial network in the single-sample generative adversarial network model; Selecting a target generator for inputting a grayscale image to be predicted in the single-sample generative adversarial network model; splicing the grayscale image blocks in the 2nd to Nth rows of the sample matrix grayscale image and the preset grayscale image blocks corresponding to the preset row matrix to generate the grayscale image to be predicted, wherein the preset grayscale image blocks are located in the Nth row of the grayscale image to be predicted; Inputting the grayscale image to be predicted into the target generator so that the generator in the first layer of the generative adversarial network of the single-sample generative adversarial network model outputs a predicted grayscale image; Converting the grayscale image block in the Nth row of the predicted grayscale image into traffic data as the network traffic prediction result at the N+1th sampling moment; Wherein, inputting the grayscale image to be predicted into the target generator comprises: If the target generator Not the generator in the first layer of the single-shot generative adversarial network model , then the grayscale image to be predicted is input into the target generator To output the predicted image ; The predicted image Input Generator To output the predicted image , reduce the parameter p by 1 to update the parameter p, and repeat the process of Input Generator To output the predicted image , until the generator Output predicted image until; The generator The predicted image output As the predicted grayscale image.

2. The method according to claim 1, wherein The inputting the grayscale image to be predicted into the target generator comprises: If the target generator For the generator , then the grayscale image to be predicted is input into the generator , and the generator Output predicted image As the predicted grayscale image.

3. The method according to claim 1, wherein The target generator selected for inputting the grayscale image to be predicted in the single-sample generative adversarial network model includes: Replacing the grayscale image block in the Nth row of the sample matrix grayscale image with a preset grayscale image block to generate an image to be fused, and using the image to be fused as the current processing image; The current processed image is downsampled to generate M images, where the size of the kth image is the same as the generator in the single-sample generative adversarial network model. Correspondingly, ; Input the kth image into the corresponding initial generator To output the predicted image , the predicted image Input Generator To output the predicted image , until the generator Output predicted image until; In the generator Among the M predicted images output, the initial generator corresponding to the optimal predicted image with the smallest deviation from the sample matrix grayscale image is used as the target generator; Performing weighted superposition on the optimal predicted image and the image to be fused to generate an updated current processed image; The steps of downsampling the currently processed image are executed cyclically until a preset loop end condition is met.

4. The method according to claim 3, wherein: The preset cycle end condition includes: the deviation of the optimal prediction image obtained from two adjacent cycles is less than a preset threshold, or the number of cycles is greater than a preset number threshold.

5. The method according to claim 1, wherein The training of each layer of the generative adversarial network in the single-sample generative adversarial network model using the sample matrix grayscale image includes: In the single-sample generative adversarial network model, random noise is input into the generator in the M-th layer generative adversarial network. To generate the predicted image , through the discriminator in the M-th layer generative adversarial network Identify the predicted image and preset sample images The similarity of the generator is determined based on the discriminant results. and the discriminator For training, the sample images is randomly extracted from the sample matrix grayscale image and the predicted image For images of the same size, the single-sample generative adversarial network model includes an M-layer generative adversarial network; Combine random noise with the generator in the j+1th layer of the generative adversarial network Output predicted image Input the generator in the j-th layer of the generative adversarial network To generate the predicted image , through the discriminator in the j-th layer generative adversarial network Identify the predicted image and preset sample images The similarity of the generator is determined based on the discriminant results. and the discriminator For training, the sample images is randomly extracted from the sample matrix grayscale image and the predicted image Images of the same size, .

6. The method according to claim 5, wherein: The predicted image The size is larger than the predicted image size.

7. A network traffic prediction device, comprising: The first processing module is configured to convert the sample matrix into a corresponding sample matrix grayscale image, wherein the i-th row of the sample matrix includes the flow data collected at the i-th sampling moment, , N is the number of rows of the sample matrix; A second processing module is configured to train each layer of the generative adversarial network in the single-sample generative adversarial network model using the sample matrix grayscale image; A third processing module is configured to select a target generator for inputting a grayscale image to be predicted in the single-sample generative adversarial network model; a fourth processing module configured to concatenate the grayscale image blocks in rows 2-N of the sample matrix grayscale image with the preset grayscale image blocks corresponding to the preset row matrix to generate the grayscale image to be predicted, wherein the preset grayscale image blocks are located in row N of the grayscale image to be predicted; The fifth processing module is configured to input the grayscale image to be predicted into the target generator so that the generator in the first layer of the generative adversarial network of the single sample generative adversarial network model outputs a predicted grayscale image, wherein if the target generator Not the generator in the first layer of the single-shot generative adversarial network model , then the grayscale image to be predicted is input into the target generator To output the predicted image , the predicted image Input Generator To output the predicted image , reduce the parameter p by 1 to update the parameter p, and repeat the process of Input Generator To output the predicted image , until the generator Output predicted image So far, the generator The predicted image output As the predicted grayscale image; The sixth processing module is configured to convert the grayscale image block in the Nth row of the predicted grayscale image into traffic data as the network traffic prediction result at the N+1th sampling moment.

8. The device according to claim 7, wherein The fifth processing module is configured as a target generator For the generator , then the grayscale image to be predicted is input into the generator , and the generator Output predicted image As the predicted grayscale image.

9. The device according to claim 7, wherein The third processing module is configured to replace the grayscale image block of the Nth row of the sample matrix grayscale image with a preset grayscale image block to generate an image to be fused, and use the image to be fused as the current processing image, and downsample the current processing image to generate M images, wherein the size of the kth image is the same as the size of the generator in the single sample generative adversarial network model. Correspondingly, , input the kth image into the corresponding initial generator To output the predicted image , the predicted image Input Generator To output the predicted image , until the generator Output predicted image So far, in the generator Among the M predicted images output, the initial generator corresponding to the optimal predicted image with the smallest deviation from the sample matrix grayscale image is used as the target generator, and the optimal predicted image is weightedly superimposed with the image to be fused to generate an updated current processed image. The steps of downsampling the current processed image are executed cyclically until the preset loop end condition is met.

10. The device according to claim 9, wherein The preset cycle end condition includes: the deviation of the optimal prediction image obtained from two adjacent cycles is less than a preset threshold, or the number of cycles is greater than a preset number threshold.

11. The device according to claim 7, wherein The second processing module is configured to input random noise into the generator in the M-th layer of the generative adversarial network in the single-sample generative adversarial network model. To generate the predicted image , through the discriminator in the M-th layer generative adversarial network Identify the predicted image and preset sample images The similarity of the generator is determined based on the discriminant results. and the discriminator For training, the sample images is randomly extracted from the sample matrix grayscale image and the predicted image The single-sample generative adversarial network model includes an M-layer generative adversarial network, which combines random noise with the generator in the j+1th layer generative adversarial network. Output predicted image Input the generator in the j-th layer of the generative adversarial network To generate the predicted image , through the discriminator in the j-th layer generative adversarial network Identify the predicted image and preset sample images The similarity of the generator is determined based on the discriminant results. and the discriminator For training, the sample images is randomly extracted from the sample matrix grayscale image and the predicted image Images of the same size, .

12. The device according to claim 11, wherein The predicted image The size is larger than the predicted image size.

13. A network traffic prediction device, comprising: a memory configured to store instructions; A processor is coupled to the memory, and the processor is configured to execute the method according to any one of claims 1 to 6 based on instructions stored in the memory.

14. A computer-readable storage medium, wherein: The computer-readable storage medium stores computer instructions, and when the instructions are executed by a processor, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Flow data generation method, device and system based on improved DCGAN model

    CN112906019A

  • Data enhancement system for RD time-frequency data

    CN113902627A