Network traffic generation method and device, electronic equipment and storage medium
By performing functional simulation and performance simulation of the framework execution diagram in network simulation tasks, the space-time graph convolutional neural network model is trained, and reinforcement learning is used to generate network traffic, which solves the problem of difficulty in capturing the real network traffic during training of large models in the existing technology. The problem of sexual and dynamics improves the flexibility and simulation of network traffic generation.
Patent Information
- Application Number
- CN202410977800.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-19
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2044-07-19
AI Technical Summary
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.
By obtaining the framework execution diagram in the target network simulation task, performing functional simulation and performance simulation, extracting the execution trajectory diagram, training the spatio-temporal graph convolutional neural network model, and performing reinforcement learning feedback based on the trained model to generate network traffic.
Effectively capture the complexity and dynamics of network traffic, improving the flexibility and simulation of network traffic generation.
Smart Images

Figure CN118984281A_ABST
Abstract
Description
Background Art
[0002] Traffic generation refers to simulating the data flow transmission process in the network to generate data similar to the actual network traffic. These generated traffic data are injected into the simulation environment to simulate the data transmission, exchange and processing process in the network, so as to test and verify the performance of the 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 and 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 specified traffic models can be used to simulate network traffic according to specific traffic characteristics, which makes it 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.
[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0005] The present disclosure provides a network traffic generation method, device, electronic device and storage medium, which at least to a certain extent overcomes the problem that related technologies are 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.
[0006] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by 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 framework execution graph corresponding to each target communication stage in a target network simulation task, the target communication stage being used to represent a network transmission stage; performing functional simulation and performance simulation on each framework execution graph to obtain an execution trajectory graph, the execution trajectory graph being used to describe the execution position, sequence and execution duration of each operation in the target communication stage; extracting the collective communication operations in the execution trajectory graph to train a spatiotemporal graph convolutional neural network model; obtaining the current collective communication sequence during the running of the target network simulation task, and performing reinforcement learning feedback based on the trained spatiotemporal graph convolutional neural network model to generate network traffic at the next moment.
[0008] In some embodiments, obtaining a framework execution graph corresponding to each target communication phase in a target network simulation task includes: segmenting the target network simulation task into target communication phases based on communication characteristics; and generating a framework execution graph corresponding to each target communication phase according to a framework tool.
[0009] In some embodiments, functional simulation and performance simulation are performed on each framework execution graph 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 stage; calculating the execution time of each operation through full system performance simulation to convert the data flow trajectory graph into an execution trajectory graph, wherein the execution trajectory graph is used to describe the execution position, sequence and execution time of each operation in the target communication stage.
[0010] In some embodiments, data flow level functional simulation is performed on each framework execution graph to obtain a data flow trajectory graph, including: inputting the framework execution graph and auxiliary input data into the data flow level functional simulator to obtain a first operation result, 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 the network topology diagram, the parallel strategy, the data set scale, and the training hyperparameters, the operations include communication operations and non-communication operations, and the communication operations include collective communication operations; the data flow trajectory graph is obtained according to the first operation result.
[0011] In some embodiments, the execution time of each operation is calculated through full system performance simulation to convert the data flow trajectory graph into an execution trajectory graph, including: calculating the execution time of each operation through full system performance simulation; marking the execution time of each operation on the data flow trajectory graph to calculate the execution time of each operation in the data flow trajectory graph; and obtaining the execution trajectory graph according to the execution time of each operation.
[0012] 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.
[0013] In some embodiments, the current collective communication sequence is obtained during the execution of the target network simulation task, including: 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, obtaining the framework execution graph corresponding to the first moment, where the first moment is any moment; extracting the spatiotemporal features of the collective communication operation on the framework execution graph corresponding to the first moment; adding the spatiotemporal features to the network topology graph to obtain a feature representation of the collective communication graph corresponding to the first moment, and adding the feature representation of the collective communication graph 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 also includes: adding multiple pseudo nodes to the network topology map to obtain an updated network topology map, and any pseudo node corresponds to a collective communication operation type; wherein, adding time and space features to the network topology map to obtain a characteristic representation of the collective communication map corresponding to the first moment includes: adding time and space features to the updated network topology map to obtain a characteristic representation of the collective communication map corresponding to the first moment.
[0015] In some embodiments, reinforcement learning feedback is performed based on the trained spatiotemporal graph convolutional neural network model to generate network traffic at the next moment, including: 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 achieve the generation of network traffic, wherein the pre-trained generation model performs reinforcement learning feedback through the trained spatiotemporal graph convolutional neural network model.
[0016] In some embodiments, the network traffic generation method provided by the embodiments of the present disclosure also includes: obtaining a training task, and obtaining each target communication stage in the training task through a data flow-level functional simulator; obtaining multiple 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 multiple collective communication operation pairs.
[0017] According to another aspect of the present disclosure, a network traffic generation device is also provided, including: a framework execution graph acquisition module, used to obtain the framework execution graph corresponding to each target communication stage in the target network simulation task, the target communication stage is used to represent the network transmission stage; an execution trajectory graph determination module, used to perform functional simulation and performance simulation on each framework execution graph to obtain an execution trajectory graph, the execution trajectory graph is used to describe the execution position, sequence and execution duration of each operation in the target communication stage; 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; a network traffic generation module, 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.
[0018] In some embodiments, the framework execution graph acquisition module is used to segment the target network simulation task into target communication stages based on communication characteristics; and generate framework execution graphs corresponding to each target communication stage according to the framework tool.
[0019] In some embodiments, an execution trajectory graph determination module is used to perform 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 graph into an execution trajectory graph, wherein the execution trajectory graph is used to describe the execution position, sequence and execution time of each operation in the target communication phase.
[0020] In some embodiments, an execution trajectory graph determination module is used to input 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 includes the type of each operation, and at least one of the operand scale, operation timing relationship, spatial distribution and operation repetition number of each operation. The auxiliary input data includes at least one of a network topology graph, 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 graph is obtained according to the first operation result.
[0021] In some embodiments, an execution trajectory graph determination module is used to calculate the execution time of each operation through full system performance simulation; mark the execution time of each operation on the data flow trajectory graph to calculate the execution time of each operation in the data flow trajectory graph; and obtain the execution trajectory graph according to the execution time of each operation.
[0022] In some embodiments, the collective communication operation extraction module is used to process the execution trajectory graph in sequence in chronological order to obtain a collective communication sequence corresponding to the execution trajectory graph; and train the spatiotemporal graph convolutional neural network model through the collective communication sequence corresponding to the execution trajectory graph.
[0023] In some embodiments, a network traffic generation module is used to process the framework execution graph in sequence as follows in chronological order to obtain a current collective communication sequence: if a collective communication operation occurs at the first moment, then 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 a feature representation of the collective communication graph corresponding to the first moment, and the feature representation of the corresponding collective communication graph at the first moment is added 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 also used to add multiple pseudo nodes to the network topology map to obtain an updated network topology map, and any pseudo node corresponds to a collective communication operation type; the network traffic generation module is used to add spatiotemporal features to the updated network topology map to obtain a collective communication map feature representation corresponding to the first moment.
[0025] In some embodiments, a network traffic generation module is used to input the current collective communication sequence into a pre-trained generation model to obtain the corresponding collective communication graph feature representation at the next moment to achieve network traffic generation, wherein the pre-trained generation model performs reinforcement learning feedback through a trained spatiotemporal graph convolutional neural network model.
[0026] In some embodiments, the network traffic generation device provided by the embodiments of the present disclosure also includes: a training module, used to obtain training tasks, and obtain each target communication stage in the training task through a data flow-level functional simulator; obtain multiple 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 multiple collective communication operation pairs.
[0027] According to another aspect of the present disclosure, an electronic device is also provided, which includes: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute any one of the above-mentioned network traffic generation methods by executing the executable instructions.
[0028] According to another aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, any one of the above-mentioned network traffic generation methods is implemented.
[0029] According to another aspect of the present disclosure, a computer program product or a computer program is provided, the computer program product or the computer program including computer instructions, the computer instructions being 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 various optional ways in any embodiment of the present disclosure.
[0030] The technical solution provided in the embodiments of the present disclosure can determine the execution position, sequence and execution duration of each operation in the target network simulation task by performing functional simulation and performance simulation on the framework execution graph, and train the spatiotemporal graph convolutional neural network model based on the representative set of network traffic. 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 spatiotemporal graph convolutional neural network model to generate network traffic at the next moment, which can effectively improve the flexibility and simulation of network traffic generation.
[0031] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.
[0033] Figure 1 A schematic diagram showing a system architecture in an embodiment of the present disclosure;
[0034] Figure 2 A flow chart of a method for generating network traffic in an embodiment of the present disclosure is shown;
[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 of a network traffic generation system in an embodiment of the present disclosure is shown;
[0038] Figure 6 A schematic diagram of a network traffic generation device in an embodiment of the present disclosure is shown;
[0039] Figure 7 A structural block diagram of an electronic device according to an embodiment of the present disclosure is shown;
[0040] Figure 8 A schematic diagram of a computer-readable storage medium in an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0041] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the disclosure will be more comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics 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 figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0043] The specific implementation of the embodiment of the present disclosure is described in detail below with reference to the accompanying drawings.
[0044] Figure 1 FIG. 1 shows an exemplary application system architecture diagram to which the network traffic generation method in the embodiment of the present disclosure can be applied. Figure 1 As 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 framework execution graph corresponding to each target communication stage in the target network simulation task, and the target communication stage is used to represent the network transmission stage. Then, the terminal device 101 performs functional 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 stage. Then, the terminal device 101 extracts the collective communication operation in the execution trajectory graph to train the spatiotemporal graph convolutional neural network model. And the baseline model can be reinforced with learning feedback through the trained spatiotemporal graph convolutional neural network model to achieve the generation of network traffic by the pre-trained baseline model 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 can obtain the framework execution graph corresponding to each target communication stage in the target network simulation task, and the target communication stage is used to represent the network transmission stage. Then, the server 103 performs functional 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 stage. Then, the server 103 extracts the collective communication operations in the execution trajectory graph to train the spatiotemporal graph convolutional neural network model. And the pre-trained generation model can be reinforced with learning feedback through the trained spatiotemporal 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 can send the generated network traffic to the terminal device 101.
[0047] The network 102 is used to provide a medium for a communication link between the terminal device 101 and the server 103, which can be a wired network or a wireless network. Optionally, the above-mentioned wireless network or wired network uses standard communication technology and / or protocols. The network is usually the Internet, but it can also be any network, including but not limited to 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 any combination of a virtual private network). In some embodiments, the data exchanged through the network is represented by technologies and / or formats including Hyper Text Mark-up Language (HTML), Extensible Markup Language (XML), etc. In addition, conventional encryption technologies such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), Internet Protocol Security (IPSec), etc. can also be used to encrypt all or some links. In other embodiments, customized and / or dedicated data communication technologies may be used to replace or supplement the above-mentioned data communication technologies.
[0048] The terminal device 101 can be various electronic devices, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, smart speakers, smart watches, wearable devices, augmented reality devices, virtual reality devices, etc.
[0049] The server 103 may be a server that provides various services, such as a background management server that provides support for the device operated by the user using the terminal device 101. The background management server may analyze and process the received request and other data, and feed back the processing results to the terminal device. Optionally, the server 103 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or 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 will know that Figure 1 The number of terminal devices 101, networks 102 and servers 103 is only illustrative, and any number of terminal devices, networks and servers may be provided according to actual needs. This embodiment of the present disclosure does not limit this.
[0051] Under the above system architecture, a network traffic generation method is provided in an embodiment of the present disclosure, and the method can be executed by any electronic device with computing and processing capabilities.
[0052] Figure 2 A flow chart of a network traffic generation method according to an embodiment of the present disclosure is shown as follows: Figure 2 As shown, the network traffic generation method provided in the embodiment of the present disclosure includes the following steps S202 to S208.
[0053] S202, obtaining a framework execution graph corresponding to each target communication phase in the target network simulation task, where the target communication phase is used to represent a network transmission phase.
[0054] The target network simulation task is not limited in the disclosed embodiments. Exemplarily, the target network simulation task may be English-Chinese translation, information retrieval, audio playback, model training, etc. The target communication stage may be each typical stage in which network transmission is relatively concentrated during the target network simulation task. Taking model training as an example, the target communication stage may be a model and data loading stage, a training iteration stage, and an error recovery stage. Among them, the training iteration stage may include forward reasoning, back propagation, gradient synchronization, and model updating.
[0055] In some embodiments, obtaining a framework execution graph corresponding to each target communication phase in a target network simulation task includes: segmenting the target network simulation task into target communication phases based on communication characteristics; and generating a framework execution graph corresponding to each target communication phase according to a 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 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 stage; calculating the execution time of each operation through full system performance simulation to convert the data flow trajectory graph into an execution trajectory graph, wherein the execution trajectory graph is used to describe the execution position, sequence and execution time of each operation in the target communication stage.
[0062] In an exemplary embodiment, each framework execution graph may be input into a data flow level functional simulator to obtain a corresponding data flow trajectory graph. Figure 3 A schematic diagram of a data flow trajectory diagram is shown. The data flow trajectory diagram includes four nodes, each of which records an operation type. The operation type is, for example, a computing operation, a communication operation, and a simulated storage operation. In addition, each node can record the corresponding operation number scale.
[0063] For example, the node corresponding to the computing operation is A2=A0+A1, the ID (Identity) corresponding to the node can be 10, the Type can be compute, and the 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, data flow level functional simulation is performed on each framework execution graph to obtain a data flow trajectory graph, including: inputting the framework execution graph and auxiliary input data into the data flow level functional simulator to obtain a first operation result, 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 the network topology diagram, the parallel strategy, the data set scale, and the training hyperparameters, the operations may include communication operations and non-communication operations, and the communication operations include collective communication operations; the data flow trajectory graph is obtained according to the first operation result.
[0065] In an exemplary embodiment, the network topology diagram may represent the connection relationship between nodes in the network. The parallel strategy may represent the strategy for distributing and coordinating computing tasks among multiple nodes. The data set size may represent the amount of data used for the network simulation process. The training hyperparameters may include, for example, batch size, number of iterations, etc.
[0066] Exemplarily, the data flow-level function simulator can simulate the operation on the input framework execution graph to obtain the first operation result, that is, the type of each operation, the scale of the number of operations, and the timing relationship between the operations. In addition, the execution node of each operation, that is, the spatial distribution, can be obtained according to the network topology diagram and the parallel strategy, and then the number of repetitions of each operation can be obtained according to the scale of training data and the settings of epoch (round) and batch (batch) size.
[0067] In an exemplary embodiment, the operation may include communication operations and non-communication operations, and the communication operation includes collective communication operations. Afterwards, a data flow trajectory diagram can be obtained based on the first operation result. It should be noted that although each operation, as well as the execution position 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 time of each operation can be predicted through performance simulation to determine the execution time of each operation.
[0068] In some embodiments, the execution time of each operation is calculated through full system performance simulation to convert the data flow trajectory graph into an execution trajectory graph, including: calculating the execution time of each operation through full system performance simulation; marking the execution time of each operation on the data flow trajectory graph to calculate the execution time of each operation in the data flow trajectory graph; and obtaining the execution trajectory graph according to the execution time of each operation.
[0069] Exemplarily, the data flow trajectory diagram 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 scale of the number of operations, the timing relationship between the operations, etc., so as to calculate the execution time of each operation through the full system performance simulation, and expand the loop operation on the data flow trajectory diagram, so as to deduce the execution time of each operation to obtain the execution trajectory diagram.
[0070] Figure 4 A schematic diagram of an execution trajectory diagram is shown. The execution trajectory diagram can be based on Figure 3 The data flow trajectory diagram shown in the figure is obtained. The execution trajectory diagram exemplarily records the ID, type, operand scale, latency, and execution time of each operation for the computing nodes in each iteration process. 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, which is 4M. The latency is 10ns (nanoseconds), 11ns, and 10ns 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 collective communication operation type may include at least one of Broadcast, Gather, Scatter, Reduce, All-gather, All-reduce, and Reduce-scatter. Therefore, the spatiotemporal distribution characteristics of at least one collective communication primitive among Broadcast, Gather, Scatter, Reduce, All-gather, All-reduce, and Reduce-scatter may be used as node characteristics.
[0077] Broadcast can send messages from the Root node to all other nodes. Gather can send messages from all nodes to the Root node. Scatter can send different message fragments from the Root node to all other nodes. Reduce can send messages from all nodes to the Root node, and the Root node performs some reduction operations on these messages, such as summing, finding the maximum value, etc. All-gather can receive messages from all other nodes for each node. All-reduce can perform reduction operations for each node and receive the results. Reduce-scatter can perform reduction operations first, and then distribute the results in segments to other nodes in the group.
[0078] The spatio-temporal graph convolutional neural network model in the embodiment of the present disclosure can be expressed as STGCN (Spatio-TemporalGraph Convolutional Network), which can be used to process data containing spatial and temporal dimensions. The STGCN may include two spatio-temporal graph convolution blocks and an output layer. The spatio-temporal convolution block includes two temporal convolution layers and one spatial convolution layer. The output layer includes a temporal convolution layer and a fully connected layer. The temporal convolution layer maps the output of the last spatio-temporal block to a single-step prediction, and the fully connected layer converts it into a feature prediction value probability 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 trajectory graph, the collective communication sequence corresponding to the execution trajectory graph can be used as a training sample to fit the conditional probability P. P can be defined as the probability that node r executes a collective communication operation of type c at time t. P can be expressed as P(t, c, r, n1: ni|X t-w:t , G).
[0080] Where t can represent any time. c can represent the collective communication operation type, r can represent the root node, (n1,…,ni) can represent the set of node r, and i is a positive integer. t-w:t It can represent the spatiotemporal features of the historical time window tw:t, where w and t are both positive numbers. G can represent a given network topology.
[0081] In addition, during the training process of the spatiotemporal 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 spatiotemporal graph convolutional neural network model is the collective communication graph feature representation of the previous w moments, and the output result is the collective communication graph feature representation at moment t. Since the present disclosure integrates the type of collective communication operation into the graph node feature representation, the mature spatiotemporal graph convolutional neural network model training method in the field of traffic flow prediction can be directly adopted.
[0083] In an exemplary embodiment, in order to reduce the difficulty of training, a corresponding STGCN model can be trained for each target communication stage. Therefore, in the prediction of future collective communication operations, the trained spatiotemporal graph convolutional neural network model can accurately predict the changes in collective communication traffic in the future period by utilizing the spatial structure and temporal dynamics in the network.
[0084] S208, obtaining the current collective communication sequence during the operation of the target network simulation task, and performing reinforcement learning feedback based on the trained spatiotemporal graph convolutional neural network model to generate network traffic at the next moment.
[0085] In this case, reinforcement learning feedback is performed based on the trained spatiotemporal graph convolutional neural network model to generate network traffic at the next moment, including: 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 achieve the generation of network traffic, wherein the pre-trained generation model performs reinforcement learning feedback through the trained spatiotemporal graph convolutional neural network model.
[0086] In an exemplary embodiment, the generative model may be a generative large model, which may be constructed based on the GPT-2.0 architecture.
[0087] Exemplarily, since the pre-trained generative model may only be applicable to the scenarios and tasks selected during pre-training, fine-tuning is required for the scenarios of the current target network simulation tasks. However, compared with the offline pre-training process, the online network traffic generation process cannot perform a long full-system performance simulation. Therefore, the present disclosure refers to the RLHF (Reinforcement Learning from Human Feedback) of the large model training process, so as to fine-tune the generative model based on the feedback reinforcement learning method of the STGCN spatiotemporal graph convolutional network to adapt the generative model to the current target network simulation task. Among them, scoring can be performed by the spatiotemporal graph convolutional neural network model, and the reinforcement learning method adopts the PPO (Proximal Policy Optimization) algorithm. The preference model is the probability of the output of the generative model provided by the spatiotemporal graph convolutional neural network model, which serves 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, a policy layer plus a softmax output layer. Exemplarily, training can be performed based on the MSE (Mean Squared Error) loss function and the Adam optimizer.
[0089] In an exemplary embodiment, a specific component for the NSP (Next Sentence Prediction) task may be added to the generative model, which includes an additional classification layer to predict the label of a sentence pair.
[0090] In an exemplary embodiment, after constructing the pre-trained generation model and the reinforcement learning feedback based on the spatiotemporal graph convolutional neural network model, the current collective communication sequence containing the collective communication graph feature representation can be input to obtain the collective communication graph feature representation corresponding to the next moment, thereby realizing the network traffic generation for the target network simulation task.
[0091] In some embodiments, obtaining the current collective communication sequence during the execution of the target network simulation task may include: 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, obtaining the framework execution graph corresponding to the first moment, where the first moment is any moment; extracting the spatiotemporal features of the collective communication operation on the framework execution graph corresponding to the first moment; adding the spatiotemporal features to the network topology graph to obtain a feature representation of the collective communication graph corresponding to the first moment, and adding the feature representation of the collective communication graph 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 multiple pseudo nodes to the network topology diagram to obtain an updated network topology diagram, wherein any pseudo node corresponds to a collective communication operation type. Wherein, adding spatiotemporal features to the network topology diagram to obtain a feature representation of the collective communication diagram corresponding to the first moment includes: adding spatiotemporal features to the updated network topology diagram to obtain a feature representation of the collective communication diagram corresponding to the first moment.
[0093] For example, the network topology graph can be G0, and M pseudo nodes can be added to G0 to obtain an updated network topology graph G1. After that, the collective communication operations in the execution trajectory graph can be extracted, and the extracted collective communication operations can be added to the updated network topology graph G1 as the node features of each node in the updated network topology graph G1.
[0094] For example, for multiple trajectories generated at a certain moment, the node feature representation corresponding to the moment can 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), iis a CC type node, t is cc start-time; else: = 0.
[0095] N can be the number of nodes in the network topology graph G0, and M is the number of pseudo nodes added on the basis of G0. i represents the node corresponding to any collective communication operation, and j represents any collective communication operation. K can be the maximum number of collective communication operations supported at the same time, and t is the execution time of the collective communication operation. When node i is in the point set of collective 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 collective communication operation j, the corresponding element of K is t, otherwise the corresponding element of K is 0.
[0096] Based on the above method to represent the node features, the collective communication operation type can be added to the graph as a node, and a unified trajectory representation can be used to distinguish it, so as to avoid increasing the complexity of the feature representation and facilitate the subsequent processing of the generated model. In addition, each moment of generating a collective communication operation can correspond to a topological graph with node features, which is called G2. For example, the G2 corresponding to the first moment is the feature representation of the collective communication graph corresponding to the first moment. After that, the current collective communication sequence can be obtained by arranging the G2 of all moments in chronological order. Finally, the current collective communication sequence is input into the generation model, and the feature representation of the collective communication graph corresponding to the next moment can be obtained. With the operation of the target network simulation task, 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, and the collective communication sequence corresponding to the next moment can be obtained. The collective communication sequence corresponding to the next moment is input into the generation model, and the feature representation of the collective communication graph corresponding to the next moment can be obtained. Therefore, the network traffic can be generated online in real time by executing the present disclosure in a loop. In addition, the reason why all collective communication sequences are not generated at once is that the specific communication completion time obtained during the actual network simulation process may deviate from the estimated value in the execution trajectory diagram, so online reasoning during the simulation process is more accurate.
[0097] Exemplarily, before generating network traffic based on a target network simulation task according to the generative model, a data flow-level functional simulator and a full-system performance simulator may be prepared in advance based on a one-time offline process and the generative model may be trained.
[0098] In some embodiments, the network traffic generation method provided by the embodiments of the present disclosure may also include: obtaining a training task, and obtaining each target communication stage in the training task through a data flow-level functional simulator; obtaining multiple 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 multiple collective communication operation pairs.
[0099] Exemplarily, a data flow trajectory diagram can be extracted based on a faster data flow level functional simulator, and then the time domain features can be sampled through a slower full system performance simulator, and the data flow trajectory diagram can be converted into an execution trajectory diagram. After that, a typical network structure and a typical training task scenario can be selected and simulated on the data flow level functional simulator. Exemplarily, the typical network structure is, for example, a transfomer (a neural network architecture), and the typical training task scenario is, for example, English-Chinese translation. This data flow level functional simulation operation is used to determine the code corresponding to each target communication stage in the training task, and to segment the code according to the target communication stage, record the first collective communication operation in each target communication stage, and hand it over to the full system performance simulator for execution. The full system performance simulator simulates and runs on each target communication stage, based on the type of each operation, the scale of the number of operations, and the timing relationship between the operations, and obtains the execution node of each operation according to the arrangement of the network topology and parallel strategy, and then repeats each operation according to the scale of the training data and the setting of the epoch and batch size. During the simulation, the execution time of each operation will be calculated to determine the execution time of each collective communication operation. The full system performance simulator finally outputs the spatiotemporal distribution feature representation of all the collective communication sequences in the entire training process, which is passed to the generative model for pre-training.
[0100] In an exemplary embodiment, the traffic generator baseline model can be trained based on GPT-2.0. Its pre-training process is mainly completed using NSP. 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 can be added to form it, and the subsequent collective communication operation can be forged. Then, a corresponding label can be generated for each collective communication operation pair. The label of the real subsequent pair is 1, and the label of the random subsequent pair is 0. After that, the generative model can be constructed and the model can be trained through optimization algorithms such as gradient descent. In each iteration, the model receives a collective communication operation pair as input and attempts 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 generative model can be used to generate a collective communication sequence. When an initial collective communication operation is input, the generative model can generate a coherent subsequent collective communication operation.
[0101] The method provided by the embodiment of the present disclosure can determine the execution position, sequence and execution duration of each operation in the target network simulation task by performing functional simulation and performance simulation on the framework execution graph, and train the spatiotemporal graph convolutional neural network model based on the representative set of network traffic. 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 spatiotemporal graph convolutional neural network model to generate network traffic at the next moment, which can effectively improve the flexibility and simulation of network traffic generation.
[0102] For example, a schematic diagram of a network traffic generation system provided by an embodiment of the present disclosure can be as follows: 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 functional simulator, a full-system performance simulator, a generation model, and a spatiotemporal graph convolutional neural network model. In addition, the operation process can be divided into an offline stage and an online stage. Among them, the offline stage of the operation process is used to prepare the data flow-level functional simulator and the full-system performance simulator in advance and train the generation model. The data flow-level functional simulator sends the code of each target communication stage to the full-system performance simulator, and the full-system performance simulator outputs the spatiotemporal 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 effect on the actual operation cost and time. The online part fine-tunes the model for specific scenarios where traffic needs to be generated, and the actual increase in operating cost and time is also small.
[0104] In the online phase of the operation process, the framework execution graph, network topology graph, data set size, training hyperparameters, etc. can first be input into the network traffic generation system. Then, the data flow-level functional simulator can be reconfigured, and the framework execution graph can be simulated and run through the data flow-level functional simulator to obtain the data flow trajectory graph. Then, the full system performance simulator is reconfigured, and the full system performance simulator is used to simulate and sample each target communication stage, record the execution time, and return the data flow trajectory graph. Finally, the full system performance simulator can output the execution trajectory graph, and the spatiotemporal graph convolutional neural network model is used to train the collective communication sequence predictor and output the probability as a reward signal, so as to fine-tune the generation model based on the feedback reinforcement learning method of the spatiotemporal graph convolutional network. The generation model can output the real-time collective communication graph feature representation, that is, it realizes the output of real-time collective communication traffic to the real network simulation environment.
[0105] It should be noted that the embodiment of the present disclosure combines the generative model with the spatiotemporal graph convolutional neural network model. The generative model is first trained with the traffic data of the training process, and then fine-tuned based on reinforcement learning for actual application scenarios, and reinforcement learning feedback is performed based on the spatiotemporal graph convolutional neural network model, so that the entire training process closed 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 simulation of two stages: function and performance. Deep model training, especially generative model training, requires a large amount of data support, but the application scenarios of the intelligent computing center require high costs for both simulation and actual sampling. Therefore, the present disclosure first divides the task into stages through fast data flow function simulation, and conducts targeted training on stages with different communication characteristics, reducing unnecessary simulation overhead. At the same time, the present disclosure also performs full system performance simulation sampling in actual application to obtain the execution time of the operation, thereby generating an execution trajectory graph with spatiotemporal information, and then extracts the collective communication operation to train the spatiotemporal graph convolutional neural network model.
[0107] In addition, the disclosed embodiment uses collective communication features to represent network traffic features, and uses a node feature graph that integrates collective communication types and execution time, so that the spatiotemporal graph convolutional neural network model for communication traffic prediction can be seamlessly used for collective communication traffic prediction. This feature representation method also unifies the generative model and the spatiotemporal graph convolutional neural network model into the same generation-discrimination framework to achieve effective interaction between the two technologies. Moreover, the traffic generation method based on collective communication features can more accurately reflect the network traffic characteristics during large model training, effectively avoiding errors and deviations.
[0108] It should be noted that the acquisition, storage, use, and processing of data in the technical solution disclosed in this disclosure are in compliance with the relevant provisions of national laws and regulations, and various types of data such as personal identity data, operation data, behavioral data, etc. related to individuals, customers, and groups obtained in the embodiments of this disclosure have all been authorized.
[0109] Based on the same inventive concept, the present disclosure also provides a network traffic generation device, as described in the following embodiments. Since the principle of solving the problem in the device embodiment is similar to that in the above method embodiment, the implementation of the device embodiment can refer to the implementation of the above method embodiment, and the repeated parts will not be repeated.
[0110] Figure 6 A schematic diagram of a network traffic generation device in an embodiment of the present disclosure is shown. Figure 6 As shown, the device comprises:
[0111] The framework execution graph acquisition module 601 is used to acquire the framework execution graph corresponding to each target communication phase in the target network simulation task, where the target communication phase is used to represent the network transmission phase;
[0112] An execution trajectory diagram determination module 602 is used to perform functional simulation and performance simulation on each framework execution diagram to obtain an execution trajectory diagram, which is used to describe the execution position, sequence and execution duration of each operation in the target communication phase;
[0113] A collective communication operation extraction module 603 is used to extract collective communication operations in the execution trajectory graph to train the spatiotemporal graph convolutional neural network model;
[0114] The network traffic generation module 604 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.
[0115] In some embodiments, the framework execution graph acquisition module 601 is used to segment the target network simulation task into target communication stages based on communication characteristics; and generate framework execution graphs corresponding to each target communication stage according to the framework tool.
[0116] In some embodiments, the execution trajectory graph determination module 602 is used to perform 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 graph into an execution trajectory graph, wherein the execution trajectory graph is used to describe the execution position, sequence and execution time of each operation in the target communication phase.
[0117] In some embodiments, the execution trajectory diagram determination module 602 is used to input the framework execution diagram and auxiliary input data into the data flow level function simulator to obtain a first operation result, 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 number of each operation, the auxiliary input data includes at least one of the network topology diagram, parallel strategy, data set scale, and training hyperparameters, 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.
[0118] In some embodiments, the execution trajectory graph determination module 602 is used to calculate the execution time of each operation through full system performance simulation; mark the execution time of each operation on the data flow trajectory graph to calculate the execution time of each operation in the data flow trajectory graph; and obtain the execution trajectory graph according to the execution time of each operation.
[0119] In some embodiments, the collective communication operation extraction module 603 is used to process the execution trajectory graph in sequence according to the time sequence to obtain the collective communication sequence corresponding to the execution trajectory graph; and train the spatiotemporal graph convolutional neural network model through the collective communication sequence corresponding to the execution trajectory graph.
[0120] In some embodiments, the network traffic generation module 604 is used to process the framework execution graph in sequence as follows in chronological order to obtain the current collective communication sequence: if a collective communication operation occurs at the first moment, then 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 corresponding collective communication graph at the first moment is added 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 used to add multiple pseudo nodes to the network topology map to obtain an updated network topology map, and any pseudo node corresponds to a collective communication operation type;
[0122] The network traffic generation module 604 is used to add the spatiotemporal features to the updated network topology diagram to obtain the characteristic representation of the collective communication diagram corresponding to the first moment.
[0123] In some embodiments, the network traffic generation module 604 is used to input the current collective communication sequence into a pre-trained generation model to obtain the corresponding collective communication graph feature representation at the next moment to achieve network traffic generation, wherein the pre-trained generation model performs reinforcement learning feedback through the trained spatiotemporal 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] The training module is used to obtain the training task, obtain each target communication stage in the training task through the data flow level functional simulator; obtain multiple collective communication operation pairs by running the full system performance simulator on each target communication stage in the training task; and pre-train the generation model through multiple collective communication operations.
[0126] The device provided by the embodiment of the present disclosure can determine the execution position, sequence and execution duration of each operation in the target network simulation task by performing functional simulation and performance simulation on the framework execution graph, and train the spatiotemporal graph convolutional neural network model based on the collective communication operations that are representative of the network traffic. 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 spatiotemporal graph convolutional neural network model to generate the network traffic at the next moment, which can effectively improve the flexibility and simulation of network traffic generation.
[0127] It should be noted that the framework execution graph acquisition module 601, the execution trajectory graph determination module 602, the collective communication operation extraction module 603, and the network traffic generation module 604 correspond to S202 to S208 in the method embodiment, and the examples and application scenarios implemented by the above modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above method embodiment. 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 will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as "circuits", "modules" or "systems".
[0129] The embodiment of the present disclosure provides an electronic device, which exemplarily includes: a processor and a memory. The memory can be used to store executable instructions of the processor. The processor is configured to perform the network traffic generation method provided by the embodiment of the present disclosure by executing the above executable instructions.
[0130] Refer to the following Figure 7 An electronic device 700 according to this embodiment of the present disclosure is described. Figure 7 The electronic device 700 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0131] like Figure 7 As shown, the electronic device 700 is 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] The storage unit stores a program code, which can be executed by the processing unit 710, so that the processing unit 710 performs the steps of various exemplary embodiments of the present disclosure described in the above “Exemplary Method” section of this specification. For example, the processing unit 710 can perform each step in the above method embodiment.
[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 / utility 7204 having a set (at least one) of program modules 7205, such program modules 7205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0135] Bus 730 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0136] The electronic device 700 may also communicate with one or more external devices 740 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 700, and / or communicate with any device that enables the electronic device 700 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 750. Furthermore, the electronic device 700 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 760. As shown, the network adapter 760 communicates with other modules of the electronic device 700 via a bus 730. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction 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 implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation 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 implementation of the present disclosure.
[0138] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart may be implemented as a computer program product, which includes: a computer program, which implements the above network traffic generation method when executed by a processor.
[0139] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a computer program is stored, and when the computer program is executed by a processor, the network traffic generation method provided in the embodiment of the present disclosure can be implemented. The computer-readable storage medium can be a readable signal medium or a readable storage medium.
[0140] Figure 8 A schematic diagram of a computer-readable storage medium in an embodiment of the present disclosure is shown. Figure 8 As 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 implementations, various aspects of the present disclosure may also be implemented in the form of a program product, which includes a program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary implementations of the present disclosure described in the above “Exemplary Method” section of this specification.
[0141] More specific examples of computer-readable storage media in the present disclosure may include, but are not limited to, an electrical connection having one or more conductors, 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), 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 foregoing.
[0142] In the present disclosure, a computer readable storage medium may include a data signal propagated in baseband or as part of a carrier wave, wherein a readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A readable signal medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0143] Alternatively, 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 cable, RF, etc., or any suitable combination of the foregoing.
[0144] In a specific implementation, the program code for performing the operation 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 conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate 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., using an Internet service provider to connect through the Internet).
[0145] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0146] In addition, although the steps of the method 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 this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0147] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation 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 mobile terminal, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0148] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. 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 common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The description and examples are to be regarded as exemplary only, and the true scope of the present disclosure is indicated by the appended claims.
Claims
1. A network traffic generation method, It is 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, the sequence and the 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, It is 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, It is 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, It is 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 the 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, It is 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, It is 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, It is 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, It is 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, It is 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, It is 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, It is 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, the sequence and the 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, It is 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, It is 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, It is 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
Techniques for cursor trail capture using generative neural networks
US20230109260A1
Cited By
Network traffic simulation method and device for large model training, equipment and medium
CN119728454A
Wireless traffic prediction method and system based on mGPT
CN120151867A
