Network traffic generation method, device, electronic device and storage medium

By performing functional simulation and performance simulation on the framework execution diagram of network simulation tasks, extracting the set communication operations and training the spatio-temporal graph convolutional neural network model, the problem of difficulty in capturing the complexity and dynamicity of network traffic during training in large models is solved in the prior art, and higher flexibility and simulation of network traffic generation are achieved.

CN118984281BActive Publication Date: 2025-06-24CHINA TELECOM CORP LTD TECHNOLOGY INNOVATION CENTER +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410977800.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-19
Publication Date
2025-06-24
Estimated Expiration
2044-07-19

AI Technical Summary

Technical Problem

The prior art is difficult to fully capture the complexity and dynamics of real network traffic during large model training, resulting in low flexibility and simulation of network traffic generation.

Method used

By obtaining the framework execution diagram of each target communication stage in the target network simulation task, performing functional simulation and performance simulation, obtaining the execution trajectory diagram, extracting the set communication operations, training the spatio-temporal graph convolutional neural network model, and performing reinforcement learning feedback based on the model to generate network traffic at the next moment.

Benefits of technology

Effectively capture the complexity and dynamicity of network traffic during model training, and improve the flexibility and simulation of network traffic generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118984281B_ABST
    Figure CN118984281B_ABST
Patent Text Reader

Abstract

The present disclosure provides a network traffic generation method, apparatus, electronic device, and storage medium, relating to the field of computer technologies. The method includes: obtaining a framework execution graph corresponding to each target communication phase in a target network simulation task; performing function simulation and performance simulation on each framework execution graph to obtain an execution trace graph, where the execution trace graph is used to describe the execution locations, sequence, and execution durations of each operation in the target communication phase; extracting collective communication operations in the execution trace graph for training a spatio-temporal graph convolutional neural network model; obtaining a current collective communication sequence during the running of the target network simulation task, and performing reinforcement learning feedback based on the trained spatio-temporal graph convolutional neural network model to generate network traffic for the next moment. The present disclosure can effectively capture the complexity and dynamics of network traffic during model training, and effectively improve the flexibility and simulation degree of network traffic generation.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] Traffic generation refers to simulating the data stream transmission process in a network to generate data similar to actual network traffic. These generated traffic data are injected into a simulation environment to simulate the data transmission, exchange, and processing processes in the network, thereby enabling the testing and verification of the performance of network design.

[0003] In the related art, load generation tools or network traffic generators can be used to achieve network traffic generation. These tools or generators can generate a large amount of network traffic, simulate various protocols and traffic patterns, and can also simulate the traffic characteristics of applications by adjusting the parameters of these tools. However, in the related art, only a specified traffic model can be used to simulate network traffic according to specific traffic characteristics, making it difficult to fully capture the complexity and dynamics of real network traffic during large model training, resulting in very low flexibility and simulation degree of network traffic generation.

[0004] It should be noted that the information disclosed in the above background art section is only used to enhance the understanding of the background of the present disclosure, and thus may include information that does not constitute the prior art known to those of ordinary skill in the art. Summary of the Invention

[0005] The present disclosure provides a network traffic generation method, apparatus, electronic device, and storage medium, which at least to some extent overcome the problem that in the related art, it is difficult to fully capture the complexity and dynamics of real network traffic during large model training, resulting in very low flexibility and simulation degree of network traffic generation.

[0006] Other features and advantages of the present disclosure will become apparent through the following detailed description, or will be learned in part through the practice of the present disclosure.

[0007] According to one aspect of the present disclosure, a network traffic generation method is provided, including: obtaining a frame execution graph corresponding to each target communication stage in a target network simulation task, where the target communication stage is used to represent a network transmission stage; performing functional simulation and performance simulation on each frame execution graph to obtain an execution trace graph, where the execution trace graph is used to describe the execution location, sequence, and execution duration of each operation in the target communication stage; extracting collective communication operations in the execution trace graph for training a spatio-temporal graph convolutional neural network model; obtaining a current collective communication sequence during the operation of the target network simulation task, and performing reinforcement learning feedback based on the trained spatio-temporal graph convolutional neural network model to generate network traffic for the next moment.

[0008] In some embodiments, obtaining the framework execution graphs corresponding to the respective target communication phases in a target network simulation task includes: segmenting the target communication phases of the target network simulation task based on communication characteristics; and generating the framework execution graphs corresponding to the respective target communication phases according to a framework tool.

[0009] In some embodiments, performing functional simulation and performance simulation on each of the framework execution graphs to obtain an execution trace graph includes: performing data flow-level functional simulation on each of the framework execution graphs to obtain a data flow trace graph, where the data flow trace graph is used to describe the execution locations and the sequence of execution of each operation in the target communication phase; calculating the execution duration of each operation through full-system performance simulation to convert the data flow trace graph into an execution trace graph, and the execution trace graph is used to describe the execution locations, the sequence of execution, and the execution duration of each operation in the target communication phase.

[0010] In some embodiments, performing data flow-level functional simulation on each of the framework execution graphs to obtain a data flow trace graph includes: inputting the framework execution graph and auxiliary input data into a data flow-level functional simulator to obtain a first operation result, where the first operation result includes the types of each operation, and at least one of the operand scale, operation timing relationship, spatial distribution, and operation repetition times of each operation, and the auxiliary input data includes at least one of a network topology graph, a parallel strategy, a data set scale, and training hyperparameters, and the operations include communication operations and non-communication operations, and the communication operations include collective communication operations; and obtaining the data flow trace graph according to the first operation result.

[0011] In some embodiments, calculating the execution duration of each operation through full-system performance simulation to convert the data flow trace graph into an execution trace graph includes: calculating the execution duration of each operation through full-system performance simulation; marking the execution duration of each operation on the data flow trace graph to calculate the execution time of each operation in the data flow trace graph; and obtaining the execution trace graph according to the execution time of each operation.

[0012] In some embodiments, extracting the collective communication operations in the execution trace graph for training a spatio-temporal graph convolutional neural network model includes: sequentially processing the execution trace graph in chronological order to obtain a collective communication sequence corresponding to the execution trace graph; and training the spatio-temporal graph convolutional neural network model through the collective communication sequence corresponding to the execution trace graph.

[0013] In some embodiments, obtaining the current collective communication sequence during the running of the target network simulation task includes: sequentially processing the framework execution graph in chronological order as follows to obtain the current collective communication sequence: If a collective communication operation occurs at the first moment, obtain the framework execution graph corresponding to the first moment, where the first moment is any moment; extract the spatio-temporal characteristics of the collective communication operation from the framework execution graph corresponding to the first moment; add the spatio-temporal characteristics to the network topology graph to obtain the collective communication graph feature representation corresponding to the first moment, and add the collective communication graph feature representation corresponding to the first moment to the end of the historical collective communication sequence to obtain the current collective communication sequence.

[0014] In some embodiments, the network traffic generation method provided by the embodiments of the present disclosure further includes: adding a plurality of pseudo nodes to the network topology graph to obtain an updated network topology graph, and any pseudo node corresponds to a collective communication operation type; where adding the spatio-temporal characteristics to the network topology graph to obtain the collective communication graph feature representation corresponding to the first moment includes: adding the spatio-temporal characteristics to the updated network topology graph to obtain the collective communication graph feature representation corresponding to the first moment.

[0015] In some embodiments, performing reinforcement learning feedback based on the trained spatio-temporal graph convolutional neural network model to generate the network traffic at the next moment includes: inputting the current collective communication sequence into the pre-trained generation model to obtain the collective communication graph feature representation corresponding to the next moment to achieve the generation of network traffic, where the pre-trained generation model performs reinforcement learning feedback through the trained spatio-temporal graph convolutional neural network model.

[0016] In some embodiments, the network traffic generation method provided by the embodiments of the present disclosure further includes: obtaining a training task, obtaining each target communication stage in the training task through a data flow-level function simulator; obtaining a plurality of collective communication operation pairs by running a full-system performance simulator on each target communication stage in the training task; and pre-training the generation model through the plurality of collective communication operation pairs.

[0017] According to another aspect of the present disclosure, there is also provided a network traffic generation device, including: a framework execution graph acquisition module, configured to acquire a framework execution graph corresponding to each target communication phase in a target network simulation task, where the target communication phase is used to represent a network transmission phase; an execution trace graph determination module, configured to perform functional simulation and performance simulation on each framework execution graph to obtain an execution trace graph, where the execution trace graph is used to describe the execution location, sequence, and duration of each operation in the target communication phase; a collective communication operation extraction module, configured to extract collective communication operations in the execution trace graph for training a spatio-temporal graph convolutional neural network model; and a network traffic generation module, configured to obtain a current collective communication sequence during the running of the target network simulation task, and perform reinforcement learning feedback based on the trained spatio-temporal graph convolutional neural network model to generate network traffic at the next moment.

[0018] In some embodiments, the framework execution graph acquisition module is configured to segment the target communication phase of the target network simulation task based on communication characteristics; and generate a framework execution graph corresponding to each target communication phase according to a framework tool.

[0019] In some embodiments, the execution trace graph determination module is configured to perform data flow-level functional simulation on each framework execution graph to obtain a data flow trace graph, where the data flow trace graph is used to describe the execution location and sequence of each operation in the target communication phase; and calculate the execution duration of each operation through full-system performance simulation to convert the data flow trace graph into an execution trace graph, where the execution trace graph is used to describe the execution location, sequence, and duration of each operation in the target communication phase.

[0020] In some embodiments, the execution trace graph determination module is configured to input the framework execution graph and auxiliary input data into a data flow-level functional simulator to obtain a first operation result, where the first operation result includes the type of each operation, and at least one of the operand scale, operation timing relationship, spatial distribution, and operation repetition times of each operation, the auxiliary input data includes at least one of a network topology graph, a parallel strategy, a dataset scale, and training hyperparameters, the operations include communication operations and non-communication operations, and the communication operations include collective communication operations; and obtain a data flow trace graph according to the first operation result.

[0021] In some embodiments, the execution trace graph determination module is configured to calculate the execution duration of each operation through full-system performance simulation; mark the execution duration of each operation on the data flow trace graph to calculate the execution time of each operation in the data flow trace graph; and obtain an execution trace graph according to the execution time of each operation.

[0022] In some embodiments, the collective communication operation extraction module is configured to process the execution trace graph in chronological order to obtain a collective communication sequence corresponding to the execution trace graph; and train the spatio-temporal graph convolutional neural network model with the collective communication sequence corresponding to the execution trace graph.

[0023] In some embodiments, the network traffic generation module is configured to perform the following processing on the framework execution graph in chronological order to obtain the current collective communication sequence: If a collective communication operation occurs at a first moment, obtain the framework execution graph corresponding to the first moment, where the first moment is any moment; extract the spatio-temporal features of the collective communication operation from the framework execution graph corresponding to the first moment; add the spatio-temporal features to the network topology graph to obtain the collective communication graph feature representation corresponding to the first moment, and add the collective communication graph feature representation corresponding to the first moment to the end of the historical collective communication sequence to obtain the current collective communication sequence.

[0024] In some embodiments, the network traffic generation module is further configured to add a plurality of pseudo nodes to the network topology graph to obtain an updated network topology graph, where any pseudo node corresponds to a collective communication operation type; and the network traffic generation module is configured to add spatio-temporal features to the updated network topology graph to obtain the collective communication graph feature representation corresponding to the first moment.

[0025] In some embodiments, the network traffic generation module is configured to input the current collective communication sequence into a pre-trained generation model to obtain the collective communication graph feature representation corresponding to the next moment, so as to realize the generation of network traffic, where the pre-trained generation model performs reinforcement learning feedback through the trained spatio-temporal graph convolutional neural network model.

[0026] In some embodiments, the network traffic generation device provided by the embodiments of the present disclosure further includes: a training module, configured to obtain a training task, and obtain each target communication stage in the training task through a data flow-level function simulator; run a full-system performance simulator on each target communication stage in the training task to obtain a plurality of collective communication operation pairs; and pre-train the generation model with the plurality of collective communication operation pairs.

[0027] According to another aspect of the present disclosure, there is also provided an electronic device, including: a processor; and a memory for storing executable instructions of the processor; wherein, the processor is configured to execute the network traffic generation method of any one of the above through executing the executable instructions.

[0028] According to another aspect of the present disclosure, there is also provided a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the network traffic generation method of any one of the above is implemented.

[0029] According to another aspect of the present disclosure, there is provided a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device executes the network traffic generation method provided in any of the various alternative manners in the embodiments of the present disclosure.

[0030] In the technical solutions provided in the embodiments of the present disclosure, the execution positions, execution sequences, and execution durations of the operations in the target network simulation task can be determined by performing functional simulation and performance simulation on the framework execution graph, and the spatio-temporal graph convolutional neural network model can be trained based on the collective communication operations with network traffic representativeness among them. Therefore, the present disclosure can effectively capture the complexity and dynamics of network traffic during model training, and perform reinforcement learning feedback based on the trained spatio-temporal graph convolutional neural network model to generate network traffic at the next moment, which can effectively improve the flexibility and simulation degree of network traffic generation.

[0031] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present disclosure, and are used together with the specification to explain the principles of the present disclosure. Obviously, the drawings in the following description are only some embodiments of the present disclosure, and those of ordinary skill in the art can obtain other drawings based on these drawings without creative efforts.

[0033] Figure 1 A schematic diagram showing a system architecture in an embodiment of the present disclosure;

[0034] Figure 2 A flowchart showing a network traffic generation method in an embodiment of the present disclosure;

[0035] Figure 3 A schematic diagram showing a data flow trajectory diagram in an embodiment of the present disclosure;

[0036] Figure 4 A schematic diagram showing an execution trajectory diagram in an embodiment of the present disclosure;

[0037] Figure 5 A schematic diagram showing a network traffic generation system in an embodiment of the present disclosure;

[0038] Figure 6 A schematic diagram showing a network traffic generation device in an embodiment of the present disclosure;

[0039] Figure 7 Shows a structural block diagram of an electronic device in an embodiment of the present disclosure;

[0040] Figure 8 Shows a schematic diagram of a computer-readable storage medium in an embodiment of the present disclosure. Detailed implementation manners

[0041] Example embodiments will now be described more fully with reference to the accompanying drawings. However, the example embodiments can be implemented in various forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be more complete and comprehensive, and will fully convey the concept of the example embodiments to those skilled in the art. The features, structures, or characteristics described may be combined in any suitable manner in one or more embodiments.

[0042] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus repeated descriptions thereof will be omitted. Some of the block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0043] The following will describe in detail the specific implementation manners of the embodiments of the present disclosure with reference to the accompanying drawings.

[0044] Figure 1 Shows an exemplary application system architecture diagram to which the network traffic generation method in the embodiments of the present disclosure can be applied. As Figure 1 shown, the system architecture 100 may include a terminal device 101, a network 102, and a server 103.

[0045] Among them, the terminal device 101 can obtain the frame execution diagrams corresponding to the respective target communication phases in the target network simulation task, and the target communication phases are used to represent the network transmission phases. Then, the terminal device 101 performs functional simulation and performance simulation on each frame execution diagram to obtain an execution trace diagram, which is used to describe the execution positions, sequence, and execution durations of the respective operations in the target communication phase. Then, the terminal device 101 extracts the collective communication operations in the execution trace diagram for training the spatio-temporal graph convolutional neural network model. And the trained spatio-temporal graph convolutional neural network model can perform reinforcement learning feedback on the baseline model to enable the pre-trained baseline model to generate network traffic during the operation of the target network simulation task. Finally, the terminal device 101 can send the generated network traffic to the server 103.

[0046] Alternatively, the server 103 may obtain the framework execution diagrams corresponding to the respective target communication phases in the target network simulation task, where the target communication phases are used to represent the network transmission phases. Then, the server 103 performs functional simulation and performance simulation on each framework execution diagram to obtain an execution trace diagram, which is used to describe the execution locations, the order of execution, and the execution durations of the respective operations in the target communication phase. Then, the server 103 extracts the collective communication operations in the execution trace diagram for training the spatio-temporal graph convolutional neural network model. And reinforcement learning feedback can be performed on the pre-trained generation model through the trained spatio-temporal graph convolutional neural network model to enable the pre-trained generation model to generate network traffic during the operation of the target network simulation task. Finally, the server 103 may send the generated network traffic to the terminal device 101.

[0047] The network 102 is a medium for providing a communication link between the terminal device 101 and the server 103, and may be a wired network or a wireless network. Optionally, the above-mentioned wireless network or wired network uses standard communication technologies and / or protocols. The network is usually the Internet, but may also be any network, including but not limited to any combination of a local area network (LAN), a metropolitan area network (MAN), a wide area network (WAN), a mobile, wired or wireless network, a private network or a virtual private network). In some embodiments, technologies and / or formats including Hyper Text Mark-up Language (HTML), Extensible Markup Language (XML), etc. are used to represent the data exchanged through the network. In addition, conventional encryption technologies such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), Internet Protocol Security (IPSec), etc. may be used to encrypt all or some of the links. In other embodiments, customized and / or dedicated data communication technologies may be used to replace or supplement the above data communication technologies.

[0048] The terminal device 101 may be various electronic devices, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, smart speakers, smart watches, wearable devices, augmented reality devices, virtual reality devices, etc.

[0049] The server 103 can be a server that provides various services. For example, it can be a background management server that supports the devices operated by users using the terminal device 101. The background management server can analyze and process data such as received requests, and feedback the processing results to the terminal device. Optionally, the server 103 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.

[0050] Those skilled in the art can understand that Figure 1 the numbers of the terminal device 101, network 102, and server 103 in [[ ]] are merely illustrative. According to actual needs, there can be any number of terminal devices, networks, and servers. The embodiments of the present disclosure do not limit this.

[0051] Under the above system architecture, an embodiment of the present disclosure provides a network traffic generation method, which can be executed by any electronic device with computing and processing capabilities.

[0052] Figure 2 The flowchart of a network traffic generation method in an embodiment of the present disclosure is shown. As Figure 2 shown, the network traffic generation method provided in the embodiment of the present disclosure includes the following steps S202 to S208.

[0053] S202, obtain the framework execution diagrams corresponding to the respective target communication phases in the target network simulation task, where the target communication phases are used to represent the network transmission phases.

[0054] The embodiments of the present disclosure do not limit this target network simulation task. Exemplarily, this target network simulation task can be English-to-Chinese translation, information retrieval, audio playback, model training, etc. The target communication phases can be various typical phases in the target network simulation task where network transmission is relatively concentrated. Taking model training as an example, the target communication phases can be the model and data loading phase, the training iteration phase, and the error recovery phase. Among them, the training iteration phase can include forward inference, backpropagation, gradient synchronization, and model update.

[0055] In some embodiments, obtaining the framework execution diagrams corresponding to the respective target communication phases in the target network simulation task includes: segmenting the target communication phases of the target network simulation task based on communication characteristics; generating the framework execution diagrams corresponding to the respective target communication phases according to the framework tool.

[0056] In an exemplary embodiment, the target communication phase in the target network simulation task can be segmented into stages to obtain the codes corresponding to each target communication phase. Afterwards, the corresponding framework execution graph can be generated by the framework tool from the codes corresponding to each target communication phase. Exemplarily, the framework tool can be, for example, an execution graph output by pytorch (a deep learning framework library), or it can also be other types of framework tools, which are not limited in the embodiments of the present disclosure.

[0057] S204, performing function simulation and performance simulation on each framework execution graph to obtain an execution trajectory graph, which is used to describe the execution position, sequence and execution duration of each operation in the target communication phase.

[0058] In an exemplary embodiment, the functional simulation can be implemented based on a data flow-level functional simulator, and the performance simulation can be implemented based on a full-system performance simulator. The data flow-level functional simulator and the full-system performance simulator can be prepared in advance through an offline process. Among them, the data flow-level functional simulator can generate an execution trajectory through an execution graph simulation tool on a deep learning framework. The computing nodes and storage nodes in the full-system performance simulator can be configured according to the computing power deployed in the actual environment and the performance of the storage nodes. Exemplarily, the full-system performance simulator can simulate the operation of the entire multi-node system, and support type customization of various types of equipment and specify parallelization strategies.

[0059] In a possible implementation, the full-system performance simulator may be ASTRA-SIM (a full-system simulator), and a GPU (Graphics Processing Unit) simulator GPGPU-Sim, a CPU (Central Processing Unit) simulator SimpleScalar, and a network simulator provided by ASTRA-SIM may be integrated on ASTRA-SIM to simulate the execution of trajectory diagrams at each stage to estimate the duration of each operation.

[0060] Exemplarily, after preparing the data flow level functional simulator and the full system performance simulator in advance through an offline process, the relevant configurations in the data flow level functional simulator and the full system performance simulator can be adaptively adjusted based on the current environment, the network topology diagram of the target network simulation task, etc., and then S204 is executed.

[0061] In some embodiments, functional simulation and performance simulation are performed on each framework execution graph to obtain an execution trace graph, including: performing data flow-level functional simulation on each framework execution graph to obtain a data flow trace graph, where the data flow trace graph is used to describe the execution locations and the sequence of each operation in the target communication phase; calculating the execution duration of each operation through full-system performance simulation to convert the data flow trace graph into an execution trace graph, and the execution trace graph is used to describe the execution locations, the sequence, and the execution duration of each operation in the target communication phase.

[0062] In an exemplary embodiment, each framework execution graph can be input into a data flow-level functional simulator to obtain a corresponding data flow trace graph. Figure 3 A schematic diagram of a data flow trace graph is shown. Among them, the data flow trace graph includes four nodes, and each node records the operation type. The operation type is, for example, a calculation operation, a communication operation, or a memory emulation operation. And each node can record the corresponding operand scale.

[0063] Taking the node corresponding to the calculation operation as an example, the calculation operation is A2 = A0 + A1, the ID (Identity) corresponding to this node can be 10, the Type can be compute, and the operand scale tensor size can be 4M. In addition, if a node corresponds to a collective communication operation, the operation type and the nodes included in the communication group can also be recorded.

[0064] In some embodiments, performing data flow-level functional simulation on each framework execution graph to obtain a data flow trace graph, including: inputting the framework execution graph and auxiliary input data into a data flow-level functional simulator to obtain a first operation result, the first operation result including the type of each operation, and at least one of the operand scale, operation timing relationship, spatial distribution, and operation repetition times of each operation, the auxiliary input data including at least one of a network topology graph, a parallel strategy, a data set scale, and training hyperparameters, and the operations may include communication operations and non-communication operations, and the communication operations include collective communication operations; obtaining the data flow trace graph according to the first operation result.

[0065] In an exemplary embodiment, the network topology graph can represent the connection relationship between nodes in the network. The parallel strategy can represent the strategy for distributing and coordinating computing tasks among multiple nodes. The data set scale can represent the size of the data volume used in the network simulation process. The training hyperparameters can, for example, include the batch size, the number of iterations, etc.

[0066] Exemplarily, the data flow-level function simulator can simulate and run on the input framework execution graph to obtain a first running result, that is, the type of each operation, the operand scale, and the timing relationship between operations. Moreover, the execution node of each operation, that is, the spatial distribution, can also be obtained according to the network topology graph and the parallel strategy, and then the repetition times of each operation can be obtained according to the setting of the training data scale, the number of epochs, and the batch size.

[0067] In an exemplary embodiment, the operations may include communication operations and non-communication operations, and the communication operations include collective communication operations. Then, a data flow trace graph can be obtained according to the first running result. It should be noted that although each operation, as well as the execution location and sequence of each operation, have been recorded, the execution time corresponding to the start of the operation is still lacking. Therefore, all operations including communication operations and non-communication operations can be recorded, and then the execution duration of each operation can be predicted through performance simulation to determine the execution time of each operation.

[0068] In some embodiments, the execution duration of each operation is calculated through full-system performance simulation to convert the data flow trace graph into an execution trace graph, including: calculating the execution duration of each operation through full-system performance simulation; marking the execution duration of each operation on the data flow trace graph to calculate the execution time of each operation in the data flow trace graph; obtaining the execution trace graph according to the execution time of each operation.

[0069] Exemplarily, the data flow trace graph can be input into the full-system performance simulator. The full-system performance simulator can execute each operation based on the type of each operation, the operand scale, the timing relationship between operations, etc., so as to calculate the execution duration of each operation through full-system performance simulation, and expand the loop operations on the data flow trace graph, thereby deducing the execution time of each operation to obtain the execution trace graph.

[0070] Figure 4 Shows a schematic diagram of an execution trace graph. Among them, the execution trace graph can be obtained based on Figure 3 the shown data flow trace graph. Exemplarily, the ID, type, operand scale, latency, and the execution time of each operation in each iteration process are recorded on the execution trace graph. Among them, the IDs corresponding to each computing node are 10.0, 10.1, and 10.2 respectively. The types are all compute. The operand scale is represented by tensor size and is 4M for all. The Latency (delay) is 10 ns (nanoseconds), 11 ns, and 10 ns respectively. The execution time (Start) of each operation is 117, 250, and 367 respectively.

[0071] In a possible implementation, since the speed of the full system performance simulation is relatively slow, only partial sampling may be performed. Taking the model training stage as an example, the full system performance simulation may be iterated twice and the execution time of the operation may be calculated.

[0072] S206, extracting the collective communication operations in the execution trajectory graph to train the spatiotemporal graph convolutional neural network model.

[0073] It should be noted that, since the collective communication characteristics can better represent the characteristics of network traffic, the spatiotemporal distribution of collective communication can be defined as the main fitting target of the present disclosure. Among them, large model training relies on distributed parallel computing, including data parallelism, pipeline parallelism, and tensor parallelism. Collective communication plays a key role in distributed training. In distributed training, each GPU is only responsible for processing part of the model or data. Different GPUs in the cluster complete gradient synchronization and parameter update operations through collective communication, so that all GPUs can accelerate model training as a whole. Studies have shown that network traffic during large model training mainly comes from collective communication. The performance of collective communication directly affects the speed of distributed tasks and determines whether all GPUs in the cluster can work together to accelerate model training.

[0074] In some embodiments, the collective communication operations in the execution trajectory graph are extracted to train the spatiotemporal graph convolutional neural network model, including: processing the execution trajectory graph in chronological order to obtain the collective communication sequence corresponding to the execution trajectory graph; and training the spatiotemporal graph convolutional neural network model through the collective communication sequence corresponding to the execution trajectory graph.

[0075] Exemplarily, the collective communication operations can be extracted from the execution trajectory graph in chronological order, and the collective communication operation types can be added to the network topology graph as node features. Among them, each moment when a collective communication operation occurs can correspond to a network topology graph with node features. Then, the network topology graphs with node features are sorted in chronological order, and the collective communication sequence corresponding to the execution trajectory graph can be obtained. The collective communication sequence can represent the spatiotemporal characteristics of the collective communication operation, wherein the time domain distribution of the collective communication operation refers to the time when the collective communication operation occurs, and the spatial domain distribution of the collective communication operation refers to the set of nodes participating in the collective communication operation. Finally, the spatiotemporal graph convolutional neural network model can be trained through the collective communication sequence corresponding to the execution trajectory graph.

[0076] In some embodiments, the types of collective communication operations may include at least one of Broadcast, Gather, Scatter, Reduce, All-gather, All-reduce, and Reduce-scatter. Therefore, the spatio-temporal distribution characteristics of at least one collective communication primitive among Broadcast, Gather, Scatter, Reduce, All-gather, All-reduce, and Reduce-scatter can be used as node features.

[0077] Among them, Broadcast can be that the Root node sends messages to all other nodes. Gather can be that all nodes send messages to the Root node. Scatter can be that the Root node sends different message segments to all other nodes. Reduce can be that all nodes send messages to the Root node, and the Root node performs a certain reduction operation on these messages, such as summation, maximum value, etc. All-gather can be that each node receives messages sent by all other nodes. All-reduce can be that each node performs a reduction operation and receives the result. Reduce-scatter can be to first perform a reduction operation and then distribute the result in segments to other nodes in the group.

[0078] The spatio-temporal graph convolutional neural network model in the embodiments of the present disclosure can be represented as STGCN (Spatio-Temporal Graph Convolutional Network), and STGCN can be used to process data containing spatial and temporal dimensions. The STGCN can include two spatio-temporal graph convolutional blocks and an output layer. The spatio-temporal convolutional block includes two temporal convolutional layers and one spatial convolutional layer. The output layer includes one temporal convolutional layer and a fully connected layer. The temporal convolutional layer maps the output of the last spatio-temporal block to a single-step prediction, and the fully connected layer converts it into the probability of the feature prediction value of N + M nodes, where N + M represents the number of nodes including various types of collective communication operations.

[0079] In an exemplary embodiment, after obtaining the collective communication sequence corresponding to the execution trace graph, the collective communication sequence corresponding to the execution trace graph can be used as a training sample to fit the conditional probability P. The definition of P can be the probability that node r performs a collective communication operation of type c at time t, and P can be expressed as P(t, c, r, n1:ni|X t-w:t , G).

[0080] Among them, t can represent any moment. c can represent the type of collective communication operation, r can represent the root node, (n1, …, ni) can represent the set of nodes r, and i is a positive integer. X t-w:t can represent the spatio-temporal features with a historical time window of t-w:t, where both w and t are positive numbers. G can represent a given network topology.

[0081] In addition, during the training process of the spatio-temporal graph convolutional neural network model, MAE (Mean Absolute Error) can be used as the loss function, and the weights of the model can be updated based on the Adam (Adaptive Moment Estimation) optimizer.

[0082] It should be noted that the input of the trained spatio-temporal graph convolutional neural network model is the feature representation of the collective communication graph at the previous w moments, and the output result is the feature representation of the collective communication graph at the t moment. Since the present disclosure integrates the type of collective communication operation into the graph node feature representation, the mature training method of the spatio-temporal graph convolutional neural network model in the field of traffic flow prediction can be directly adopted.

[0083] In an exemplary embodiment, in order to reduce the training difficulty, corresponding STGCN models can be trained for each target communication stage. Therefore, in the prediction of future collective communication operations, the trained spatio-temporal graph convolutional neural network model can utilize the spatial structure and time dynamics in the network to accurately predict the change of collective communication traffic in the future for a period of time.

[0084] S208, obtain the current collective communication sequence during the operation of the target network simulation task, and perform reinforcement learning feedback based on the trained spatio-temporal graph convolutional neural network model to generate the network traffic at the next moment.

[0085] In this case, performing reinforcement learning feedback based on the trained spatio-temporal graph convolutional neural network model to generate the network traffic at the next moment includes: inputting the current collective communication sequence into the pre-trained generation model to obtain the corresponding collective communication graph feature representation at the next moment to realize the generation of network traffic, where the pre-trained generation model performs reinforcement learning feedback through the trained spatio-temporal graph convolutional neural network model.

[0086] In an exemplary embodiment, the generation model can be a generative large model, and the generation model can be constructed based on the GPT-2.0 architecture.

[0087] Exemplarily, since the pre-trained generation model may only be applicable to the scenarios and tasks selected during pre-training, fine-tuning is required for the scenario of the current target network simulation task. However, compared with the offline pre-training process, the online network traffic generation process cannot perform long-term full-system performance simulations. Therefore, this disclosure refers to RLHF (Reinforcement Learning from Human Feedback) in the large model training process, and thus fine-tunes the generation model based on the feedback reinforcement learning method of the STGCN (Spatio-Temporal Graph Convolutional Network) to make the generation model adapt to the current target network simulation task. Among them, scoring can be performed through the spatio-temporal graph convolutional neural network model, and the proximal policy optimization (PPO) algorithm is used for the reinforcement learning method. The preference model provides the probability of the generation model output by the spatio-temporal graph convolutional neural network model as the reward signal in the PPO algorithm.

[0088] In an exemplary embodiment, the PPO algorithm can be implemented based on a simple policy network and a value network, that is, a two-layer fully connected network with a policy layer plus a softmax output layer. Exemplarily, it can be trained based on the mean squared error (MSE) loss function and the Adam optimizer.

[0089] In an exemplary embodiment, a specific component for the next sentence prediction (NSP) task can be added to the generation model. The specific component includes an additional classification layer to predict the label of the sentence pair.

[0090] In an exemplary embodiment, after constructing the pre-trained generation model and the reinforcement learning feedback based on the spatio-temporal graph convolutional neural network model, the current collective communication sequence containing the collective communication graph feature representation can be input to obtain the corresponding collective communication graph feature representation at the next moment. Thus, network traffic generation for the target network simulation task is achieved.

[0091] In some embodiments, obtaining the current collective communication sequence during the operation of the target network simulation task may include: sequentially processing the frame execution graph in chronological order as follows to obtain the current collective communication sequence: if a collective communication operation occurs at the first moment, obtain the frame execution graph corresponding to the first moment, where the first moment is any moment; extract the spatio-temporal features of the collective communication operation from the frame execution graph corresponding to the first moment; add the spatio-temporal features to the network topology graph to obtain the collective communication graph feature representation corresponding to the first moment, and add the collective communication graph feature representation corresponding to the first moment to the end of the historical collective communication sequence to obtain the current collective communication sequence.

[0092] In some embodiments, the network traffic generation method provided by the embodiments of the present disclosure may further include: adding a plurality of pseudo nodes to the network topology map to obtain an updated network topology map, and any pseudo node corresponds to a set communication operation type. Among them, adding spatio-temporal features to the network topology map to obtain the set communication graph feature representation corresponding to the first moment includes: adding spatio-temporal features to the updated network topology map to obtain the set communication graph feature representation corresponding to the first moment.

[0093] Exemplarily, it may be assumed that the network topology map is G0, and M pseudo nodes are added on the basis of G0 to obtain the updated network topology map G1. Then, the set communication operations in the execution trace graph can be extracted, and the extracted set communication operations are added to the updated network topology map G1 as the node features of each node in the updated network topology map G1.

[0094] Exemplarily, for multiple trajectories generated corresponding to a certain moment, the node feature representation corresponding to this moment may be a two-dimensional matrix I of [N+M, K]. Where I[i, j]=1 if node i∈set(CC_OP j); else: =0. K[i, j]=t if node i∈set(CC_OP j), i is a CC type node, t is cc start-time; else: =0.

[0095] N may be the number of nodes in the network topology map G0, M is the number of pseudo nodes added on the basis of G0. i represents any node corresponding to a set communication operation, and j represents any set communication operation. K may be the maximum number of set communication operations supported at the same time, and t is the execution moment of the set communication operation. When node i is in the point set of set communication operation j, the corresponding element of I is 1, otherwise the corresponding element of I is 0. When node i is in the point set of set communication operation j, the corresponding element of K is t, otherwise the corresponding element of K is 0.

[0096] Based on the above method for representing node features, the collective communication operation type can be used as a node and added to the graph. The unified trajectory representation is utilized for differentiation, avoiding an increase in the complexity of feature representation and facilitating the processing of subsequent generation models. Moreover, each moment when a collective communication operation occurs can correspond to a topology graph with node features, which is referred to as G2. For example, the G2 corresponding to the first moment is the feature representation of the collective communication graph corresponding to the first moment. Subsequently, arranging all the G2s of different moments in chronological order can obtain the current collective communication sequence. Finally, inputting this current collective communication sequence into the generation model can obtain the feature representation of the collective communication graph corresponding to the next moment. As the target network simulation task runs, after determining the feature representation of the collective communication graph corresponding to the next moment, the feature representation of the collective communication graph corresponding to the next moment can be added to the end of the current collective communication sequence, thereby obtaining the collective communication sequence corresponding to the next moment. Inputting the collective communication sequence corresponding to the next moment into the generation model can obtain the feature representation of the collective communication graph corresponding to the moment after that. Therefore, by repeatedly executing this disclosure, network traffic can be generated in real time and online. Additionally, the reason for not generating all collective communication sequences at once is that there may be a deviation between the specific communication completion moments obtained in the actual network simulation process and the estimated values in the execution trajectory graph. Therefore, online inference has higher accuracy as the simulation process progresses.

[0097] Exemplarily, before generating network traffic based on the target network simulation task according to this generation model, a data flow-level functional simulator and a full-system performance simulator can be prepared in advance based on a one-time offline process and the generation model can be trained.

[0098] In some embodiments, the network traffic generation method provided by the embodiments of the present disclosure may further include: obtaining a training task, and obtaining each target communication stage in the training task through the data flow-level functional simulator; running the full-system performance simulator on each target communication stage in the training task to obtain multiple collective communication operation pairs; and pre-training the generation model through the multiple collective communication operation pairs.

[0099] Exemplarily, a data flow trace graph can be extracted based on a faster data flow level function simulator, and then the time domain features can be sampled by a slower full system performance simulator, and the data flow trace graph can be converted into an execution trace graph. After that, a typical network structure and a typical training task scenario can be selected and simulated on the data flow level function simulator. Exemplarily, the typical network structure is, for example, a transformer (a neural network architecture), and the typical training task scenario is, for example, English to Chinese translation. This data flow level simulation run is used to determine the codes corresponding to each target communication stage in the training task, and the codes are segmented according to the target communication stage, and the first collective communication operation in each target communication stage is recorded and handed over to the full system performance simulator for execution respectively. The full system performance simulator simulates and runs on each target communication stage, obtains the execution node of each operation based on the type of each operation, the scale of the operands, and the timing relationship between the operations, and at the same time according to the network topology and the arrangement of the parallel strategy, and repeats the execution of each operation according to the setting of the training data scale, the number of epochs, and the batch size. The execution duration of each operation will be calculated during the simulation to determine the execution time of each collective communication operation. The full system performance simulator finally outputs the spatio-temporal distribution feature representation of all collective communication sequences in the entire training process and transmits it to the generation model for pre-training.

[0100] In an exemplary embodiment, a traffic generator baseline model can be trained based on GPT-2.0. Its pre-training process mainly uses NSP to complete. First, for the NSP task, an arbitrary real collective communication operation can be selected from the output of the full system performance simulator, and then a randomly selected subsequent collective communication operation is added to form it, and the subsequent collective communication operation can be forged. Then, corresponding labels can be generated for each pair of collective communication operations. The label of the real subsequent pair is 1, and the label of the random subsequent pair is 0. After that, the generation model can be constructed and the model can be trained through optimization algorithms such as gradient descent. In each iteration, the model receives a pair of collective communication operations as input and tries to predict the label of the subsequent collective communication operation. The parameters of the model are updated by calculating the loss between the predicted label and the actual label. When the model training is completed, the generation model can be used to generate collective communication sequences. When an initial collective communication operation is input, the generation model can generate coherent subsequent collective communication operations.

[0101] The method provided by the embodiments of the present disclosure can determine the execution locations, order, and execution durations of various operations in a target network simulation task by performing functional simulation and performance simulation on the framework execution graph, and train the spatio-temporal graph convolutional neural network model based on the collective communication operations with network traffic representativeness among them. Therefore, the present disclosure can effectively capture the complexity and dynamics of network traffic during model training, and perform reinforcement learning feedback based on the trained spatio-temporal graph convolutional neural network model to generate network traffic at the next moment, which can effectively improve the flexibility and simulation degree of network traffic generation.

[0102] Exemplarily, a schematic diagram of a network traffic generation system provided by the embodiments of the present disclosure can be as Figure 5 shown.

[0103] Among them, the overall architecture in the schematic diagram of the network traffic generation system can include four parts: a data flow-level function simulator, a full-system performance simulator, a generation model, and a spatio-temporal graph convolutional neural network model. In addition, the running process can be divided into an offline stage and an online stage. Among them, the offline stage of the running process is used to prepare the data flow-level function simulator and the full-system performance simulator in advance and train the generation model. The data flow-level function simulator sends the code of each target communication stage to the full-system performance simulator, and the full-system performance simulator outputs the spatio-temporal distribution feature representation of all collective communication sequences for NSP pre-training of the generation model. This offline stage takes a long time, but it is a one-time process and has no impact on the actual running cost and time. The online part fine-tunes the model for specific scenarios where traffic needs to be generated, and the actual increase in running cost and time is also small.

[0104] In the online stage of the running process, first, a framework execution graph, a network topology graph, a dataset scale, training hyperparameters, etc. can be input to the network traffic generation system. Then, the simulator of the data flow-level function simulator can be reconfigured, and the framework execution graph can be simulated and run through the data flow-level function simulator to obtain a data flow trajectory graph. Then, the simulator of the full-system performance simulator can be reconfigured, and each target communication stage can be simulated and sampled through the full-system performance simulator, and the execution duration can be recorded and the data flow trajectory graph can be returned. Finally, the full-system performance simulator can output an execution trajectory graph, and the spatio-temporal graph convolutional neural network model is used to train a collective communication sequence predictor and output a probability as a reward signal, so as to fine-tune the generation model based on the feedback reinforcement learning method of the spatio-temporal graph convolutional network. The generation model can output a real-time collective communication graph feature representation, that is, real-time collective communication traffic is output to the real network simulation environment.

[0105] It should be noted that in the embodiments of the present disclosure, the generative model is combined with the spatio-temporal graph convolutional neural network model. First, the generative model is trained with the traffic data in the training process, and then fine-tuned based on reinforcement learning for the actual application scenario, and the reinforcement learning feedback is carried out based on the spatio-temporal graph convolutional neural network model, so that the entire training process loop of the model can be applied to network traffic prediction.

[0106] Secondly, the present disclosure solves the problem of the amount of data required for model training through two-stage simulations of functions and performance. The training of deep models, especially generative models, requires a large amount of data support, but the application scenarios of intelligent computing centers, whether simulated or actually collected, incur high costs. Therefore, the present disclosure first divides the tasks through rapid data flow function simulations, and trains the stages with different communication characteristics in a targeted manner, reducing unnecessary simulation overhead. At the same time, the present disclosure also conducts full-system performance simulation sampling during actual application to obtain the execution duration of operations, thereby generating an execution trajectory graph with spatio-temporal information, and then extracting collective communication operations to train the spatio-temporal graph convolutional neural network model.

[0107] In addition, the embodiments of the present disclosure use collective communication characteristics to represent network traffic characteristics, and at the same time adopt a node feature graph integrating collective communication types and execution times, enabling the spatio-temporal graph convolutional neural network model for oriented communication traffic prediction to be seamlessly used for the prediction of collective communication traffic. This feature representation method also unifies the generative model and the spatio-temporal graph convolutional neural network model into the same generative-discriminative framework, realizing the effective interaction between the two technologies. Moreover, the traffic generation method based on collective communication characteristics can more accurately reflect the network traffic characteristics during the training of large models, effectively avoiding errors and biases.

[0108] It should be noted that in the technical solutions of the present disclosure, the acquisition, storage, use, processing, etc. of data all comply with the relevant regulations of national laws and regulations. For various types of data such as personal identity data, operation data, and behavior data related to individuals, customers, and populations obtained in the embodiments of the present disclosure, authorization has been obtained.

[0109] Based on the same inventive concept, an embodiment of the present disclosure also provides a network traffic generation device as described in the following embodiments. Since the principle of problem-solving in this device embodiment is similar to that of the above method embodiment, the implementation of this device embodiment can refer to the implementation of the above method embodiment, and the repeated parts will not be elaborated.

[0110] Figure 6 As shown in the schematic diagram of a network traffic generation device in an embodiment of the present disclosure, as Figure 6 shown, the device includes:

[0111] A framework execution graph acquisition module 601, configured to acquire a framework execution graph corresponding to each target communication phase in a target network simulation task, where the target communication phase is used to represent a network transmission phase;

[0112] An execution trace graph determination module 602, configured to perform functional simulation and performance simulation on each framework execution graph to obtain an execution trace graph, where the execution trace graph is used to describe the execution location, sequence, and duration of each operation in the target communication phase;

[0113] A collective communication operation extraction module 603, configured to extract collective communication operations in the execution trace graph for training a spatio-temporal graph convolutional neural network model;

[0114] A network traffic generation module 604, configured to obtain a current collective communication sequence during the running of the target network simulation task, and perform reinforcement learning feedback based on the trained spatio-temporal graph convolutional neural network model to generate network traffic for the next moment.

[0115] In some embodiments, the framework execution graph acquisition module 601 is configured to segment the target communication phase of the target network simulation task based on communication characteristics; and generate a framework execution graph corresponding to each target communication phase according to a framework tool.

[0116] In some embodiments, the execution trace graph determination module 602 is configured to perform data flow-level functional simulation on each framework execution graph to obtain a data flow trace graph, where the data flow trace graph is used to describe the execution location and sequence of each operation in the target communication phase; calculate the execution duration of each operation through full-system performance simulation to convert the data flow trace graph into an execution trace graph, and the execution trace graph is used to describe the execution location, sequence, and duration of each operation in the target communication phase.

[0117] In some embodiments, the execution trace graph determination module 602 is configured to input the framework execution graph and auxiliary input data into a data flow-level functional simulator to obtain a first operation result, where the first operation result includes the type of each operation, and at least one of the operand scale, operation timing relationship, spatial distribution, and operation repetition times of each operation. The auxiliary input data includes at least one of a network topology graph, a parallel strategy, a dataset scale, and training hyperparameters. The operations include communication operations and non-communication operations, and the communication operations include collective communication operations; and obtain a data flow trace graph according to the first operation result.

[0118] In some embodiments, the execution trace graph determination module 602 is configured to calculate the execution duration of each operation through full-system performance simulation; mark the execution duration of each operation on the data flow trace graph to calculate the execution time of each operation in the data flow trace graph; and obtain an execution trace graph according to the execution time of each operation.

[0119] In some embodiments, the collective communication operation extraction module 603 is configured to process the execution trace graph in chronological order to obtain a collective communication sequence corresponding to the execution trace graph; and train the spatio-temporal graph convolutional neural network model through the collective communication sequence corresponding to the execution trace graph.

[0120] In some embodiments, the network traffic generation module 604 is configured to perform the following processing on the framework execution graph in chronological order to obtain the current collective communication sequence: if a collective communication operation occurs at the first moment, obtain the framework execution graph corresponding to the first moment, where the first moment is any moment; extract the spatio-temporal features of the collective communication operation from the framework execution graph corresponding to the first moment; add the spatio-temporal features to the network topology graph to obtain the collective communication graph feature representation corresponding to the first moment, and add the collective communication graph feature representation corresponding to the first moment to the end of the historical collective communication sequence to obtain the current collective communication sequence.

[0121] In some embodiments, the network traffic generation module 604 is further configured to add a plurality of pseudo nodes to the network topology graph to obtain an updated network topology graph, and any pseudo node corresponds to a collective communication operation type.

[0122] The network traffic generation module 604 is configured to add spatio-temporal features to the updated network topology graph to obtain the collective communication graph feature representation corresponding to the first moment.

[0123] In some embodiments, the network traffic generation module 604 is configured to input the current collective communication sequence into a pre-trained generation model to obtain the collective communication graph feature representation corresponding to the next moment, so as to realize the generation of network traffic, where the pre-trained generation model performs reinforcement learning feedback through the trained spatio-temporal graph convolutional neural network model.

[0124] In some embodiments, the network traffic generation device provided by the embodiments of the present disclosure further includes:

[0125] A training module, configured to obtain a training task, and obtain each target communication stage in the training task through a data flow level function simulator; obtain a plurality of collective communication operation pairs by running a full system performance simulator on each target communication stage in the training task; and pre-train the generation model through the plurality of collective communication operation pairs.

[0126] The device provided by the embodiments of the present disclosure can determine the execution locations, execution order, and execution duration of various operations in a target network simulation task by performing functional simulation and performance simulation on a framework execution graph, and train a spatio-temporal graph convolutional neural network model based on the collective communication operations with network traffic representativeness among them. Therefore, the present disclosure can effectively capture the complexity and dynamics of network traffic during model training, perform reinforcement learning feedback based on the trained spatio-temporal graph convolutional neural network model to generate network traffic at the next moment, and can effectively improve the flexibility and simulation degree of network traffic generation.

[0127] It should be noted here that the above-mentioned framework execution graph acquisition module 601, execution trajectory graph determination module 602, collective communication operation extraction module 603, and network traffic generation module 604 correspond to S202 - S208 in the method embodiments. The examples and application scenarios implemented by the above modules and the corresponding steps are the same, but are not limited to the content disclosed in the above method embodiments. It should be noted that the above modules, as part of the device, can be executed in a computer system such as a set of computer-executable instructions.

[0128] Those skilled in the art of the relevant technical field can understand that various aspects of the present disclosure can be implemented as a system, method, or program product. Therefore, various aspects of the present disclosure can be specifically implemented in the following forms, namely: a complete hardware implementation manner, a complete software implementation manner (including firmware, microcode, etc.), or an implementation manner combining hardware and software aspects, which can be collectively referred to as "circuit", "module", or "system" here.

[0129] The embodiments of the present disclosure provide an electronic device. Exemplarily, the electronic device includes: a processor and a memory. The memory can be used to store executable instructions of the processor. Among them, the processor is configured to execute the network traffic generation method provided by the embodiments of the present disclosure via the above-mentioned executable instructions.

[0130] Next, refer to Figure 7 to describe the electronic device 700 according to this embodiment of the present disclosure. Figure 7 The shown electronic device 700 is only an example and should not bring any limitation to the functions and usage scope of the embodiments of the present disclosure.

[0131] As Figure 7 shown, the electronic device 700 is presented in the form of a general computing device. The components of the electronic device 700 may include but are not limited to: at least one processing unit 710, at least one storage unit 720, and a bus 730 connecting different system components (including the storage unit 720 and the processing unit 710).

[0132] Among them, the storage unit stores program code that can be executed by the processing unit 710, enabling the processing unit 710 to execute the steps according to various exemplary embodiments of the present disclosure described in the "Exemplary Method" section of this specification. For example, the processing unit 710 can execute each step in the above method embodiments.

[0133] The storage unit 720 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 7201 and / or a cache storage unit 7202, and may further include a read-only storage unit (ROM) 7203.

[0134] The storage unit 720 may also include a program / utilities 7204 having a set (at least one) of program modules 7205. Such program modules 7205 include, but are not limited to: an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include the implementation of a network environment.

[0135] The bus 730 may represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus structures.

[0136] The electronic device 700 can also communicate with one or more external devices 740 (such as a keyboard, a pointing device, a Bluetooth device, etc.), can also communicate with one or more devices that enable a user to interact with the electronic device 700, and / or can communicate with any device that enables the electronic device 700 to communicate with one or more other computing devices (such as a router, a modem, etc.). Such communication can be carried out through an input / output (I / O) interface 750. Moreover, the electronic device 700 can also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 760. As shown in the figure, the network adapter 760 communicates with other modules of the electronic device 700 through the bus 730. It should be understood that although not shown in the figure, other hardware and / or software modules can be used in combination with the electronic device 700, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.

[0137] Through the description of the above embodiments, those skilled in the art can easily understand that the exemplary embodiments described herein can be implemented by software or by a combination of software and necessary hardware. Therefore, the technical solutions according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.

[0138] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer program product, which includes: a computer program that, when executed by a processor, implements the above network traffic generation method.

[0139] In an exemplary embodiment of the present disclosure, there is also provided a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, it can implement the network traffic generation method provided by the embodiments of the present disclosure. The computer-readable storage medium can be a readable signal medium or a readable storage medium.

[0140] Figure 8 The schematic diagram of a computer-readable storage medium in an embodiment of the present disclosure is shown. As Figure 8 shown, a program product capable of implementing the above method of the present disclosure is stored on the computer-readable storage medium 800. In some possible implementation manners, various aspects of the present disclosure can also be implemented in the form of a program product, which includes program code. When the program product runs on a terminal device, the program code is used to cause the terminal device to execute the steps according to various exemplary embodiments of the present disclosure described in the "Exemplary Method" section of this specification.

[0141] More specific examples of the computer-readable storage medium in the present disclosure may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0142] In the present disclosure, a computer-readable storage medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries readable program code. Such a propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. The readable signal medium may also be any readable medium other than the readable storage medium, which can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0143] Optionally, the program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0144] In a specific implementation, the program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and also including conventional procedural programming languages such as the "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, executed as a stand-alone software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., by connecting through the Internet using an Internet service provider).

[0145] It should be noted that although several modules or units of a device for action execution are mentioned in the above detailed description, such a division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more of the above-described modules or units may be embodied in one module or unit. Conversely, the features and functions of one module or unit described above may be further divided and embodied by multiple modules or units.

[0146] In addition, although the steps of the methods in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step for execution, and / or one step may be decomposed into multiple steps for execution, etc.

[0147] From the description of the above embodiments, those skilled in the art can easily understand that the exemplary embodiments described herein can be implemented by software or by a combination of software and necessary hardware. Therefore, the technical solutions according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (such as a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.

[0148] After considering the specification and practicing the invention disclosed herein, those skilled in the art will readily conceive of other embodiments of the present disclosure. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure, which follow the general principles of the present disclosure and include well-known common general knowledge or conventional technical means in the technical field not disclosed by the present disclosure. The specification and the embodiments are only regarded as exemplary, and the true scope of the present disclosure is pointed out by the appended claims.

Claims

1. A network traffic generation method, characterized in that: include: Obtaining a framework execution graph corresponding to each target communication phase in a target network simulation task, wherein the target communication phase is used to represent a network transmission phase; Performing functional simulation and performance simulation on each framework execution graph to obtain an execution trajectory graph, wherein the execution trajectory graph is used to describe the execution position, sequence and execution duration of each operation in the target communication phase; Extracting the collective communication operations in the execution trajectory graph to train a spatiotemporal graph convolutional neural network model; During the operation of the target network simulation task, the current collective communication sequence is obtained, and reinforcement learning feedback is performed based on the trained spatiotemporal graph convolutional neural network model to generate network traffic at the next moment.

2. The network traffic generation method according to claim 1, characterized in that: The obtaining of the framework execution graph corresponding to each target communication phase in the target network simulation task includes: Segmenting the target network simulation task into target communication phases based on communication characteristics; Generate the framework execution graph corresponding to each target communication stage according to the framework tool.

3. The network traffic generation method according to claim 1 or 2, characterized in that: The function simulation and performance simulation of each framework execution graph are performed to obtain an execution trajectory graph, including: Performing data flow level functional simulation on each framework execution graph to obtain a data flow trajectory graph, wherein the data flow trajectory graph is used to describe the execution position and sequence of each operation in the target communication phase; The execution time of each operation is calculated through full system performance simulation to convert the data flow trajectory diagram into an execution trajectory diagram, and the execution trajectory diagram is used to describe the execution position, the sequence and the execution time of each operation in the target communication stage.

4. The network traffic generation method according to claim 3, characterized in that: The data flow level function simulation is performed on each framework execution graph to obtain a data flow trajectory graph, including: Inputting the framework execution graph and the auxiliary input data into a data flow-level function simulator to obtain a first operation result, wherein the first operation result includes the type of each operation, and at least one of the scale of operands of each operation, the timing relationship of operations, the spatial distribution, and the number of operation repetitions, the auxiliary input data includes at least one of a network topology diagram, a parallel strategy, a data set scale, and a training hyperparameter, the operations include communication operations and non-communication operations, and the communication operations include collective communication operations; The data flow trajectory diagram is obtained according to the first operation result.

5. The network traffic generation method according to claim 3, characterized in that: The calculation of the execution time of each operation through the full system performance simulation to convert the data flow trajectory graph into an execution trajectory graph includes: Calculate the execution time of each operation through full system performance simulation; Marking the execution time of each operation on the data flow trajectory diagram to calculate the execution time of each operation in the data flow trajectory diagram; The execution trajectory diagram is obtained according to the execution time of each operation.

6. The network traffic generation method according to claim 1, characterized in that: The extracting the collective communication operation in the execution trajectory graph to train the spatiotemporal graph convolutional neural network model includes: Processing the execution trajectory graph in sequence according to the time sequence to obtain a collective communication sequence corresponding to the execution trajectory graph; The spatiotemporal graph convolutional neural network model is trained through the collective communication sequence corresponding to the execution trajectory graph.

7. The network traffic generation method according to claim 1, characterized in that: The obtaining of the current collective communication sequence during the running of the target network simulation task includes: The framework execution graph is processed in chronological order as follows to obtain the current collective communication sequence: if a collective communication operation occurs at the first moment, the framework execution graph corresponding to the first moment is obtained, and the first moment is any moment; the spatiotemporal features of the collective communication operation are extracted from the framework execution graph corresponding to the first moment; the spatiotemporal features are added to the network topology graph to obtain the feature representation of the collective communication graph corresponding to the first moment, and the feature representation of the collective communication graph corresponding to the first moment is added to the end of the historical collective communication sequence to obtain the current collective communication sequence.

8. The network traffic generation method according to claim 7, characterized in that: The method further comprises: Add multiple pseudo nodes to the network topology diagram to obtain an updated network topology diagram, where any pseudo node corresponds to a collective communication operation type; The adding of the spatiotemporal features into the network topology graph to obtain the collective communication graph feature representation corresponding to the first moment includes: The spatiotemporal features are added to the updated network topology graph to obtain a collective communication graph feature representation corresponding to the first moment.

9. The network traffic generation method according to claim 1 or 7, characterized in that: The reinforcement learning feedback is performed based on the trained spatiotemporal graph convolutional neural network model to generate network traffic at the next moment, including: The current collective communication sequence is input into the pre-trained generation model to obtain the corresponding collective communication graph feature representation at the next moment to realize the generation of network traffic, wherein the pre-trained generation model performs reinforcement learning feedback through the trained spatiotemporal graph convolutional neural network model.

10. The network traffic generation method according to claim 9, characterized in that: The method further comprises: Obtaining a training task, and obtaining each target communication phase in the training task through a data stream-level functional simulator; By running a full system performance simulator at each target communication stage in the training task, a plurality of collective communication operation pairs are obtained; The generative model is pre-trained through multiple collective communication operations.

11. A network traffic generating device, characterized in that: include: A framework execution graph acquisition module is used to acquire the framework execution graph corresponding to each target communication phase in the target network simulation task, wherein the target communication phase is used to represent the network transmission phase; An execution trajectory diagram determination module is used to perform functional simulation and performance simulation on each framework execution diagram to obtain an execution trajectory diagram, wherein the execution trajectory diagram is used to describe the execution position, sequence and execution duration of each operation in the target communication phase; A collective communication operation extraction module, used to extract the collective communication operations in the execution trajectory graph to train the spatiotemporal graph convolutional neural network model; The network traffic generation module is used to obtain the current collective communication sequence during the operation of the target network simulation task, and perform reinforcement learning feedback based on the trained spatiotemporal graph convolutional neural network model to generate the network traffic at the next moment.

12. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to execute the network traffic generating method according to any one of claims 1 to 10 by executing the executable instructions.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the network traffic generating method according to any one of claims 1 to 10 is implemented.

14. A computer program product, characterized in that The computer program product includes computer instructions, which are stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device executes the network traffic generation method as described in any one of claims 1 to 10.

Citation Information

Patent Citations

  • Network traffic prediction method and device, electronic equipment and readable storage medium

    CN115987816A

  • Network congestion control method, system and device, electronic equipment and storage medium

    CN117692390A