Packet data generation method and device based on stream data guidance
Through the packet data generation method based on stream data guidance, the packet characteristics problem in the prior art that is difficult to simulate complex network environments is solved. The generated data more accurately reflects the actual network traffic pattern, and improves the reliability of network performance testing and network Planning efficiency.
Patent Information
- Application Number
- CN202411169064.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-23
- Publication Date
- 2025-02-18
AI Technical Summary
The existing technology is difficult to effectively simulate data packet characteristics across multiple network environments, resulting in large deviations from the actual network environment, and it is impossible to realize data packet generation based on information interaction of complex network environments, making it difficult to design a new network architecture or evaluate the network. performance.
The packet data generation method based on stream data guidance is adopted, and the target user's preset service usage sequence and network environment information are obtained, and the data is input to the data generation model to generate packet data reflecting the real communication mode. The method includes steps such as IP graph generation, IP node feature extraction, and denoising module training. It uses graph convolution network and a two-layer Transformer model to capture the connection relationship between IP addresses and ports and its communication frequency.
The generated data more accurately reflects the traffic patterns in the actual network, improves the reliability of network performance testing and network equipment stress testing, obtains a more realistic network model, improves network planning and management efficiency, and improves user experience.
Smart Images

Figure CN119484318A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network communication technology, and in particular to a method and device for generating packet data based on stream data guidance. Background Art
[0002] Network packet data generation refers to the simulation of data packets transmitted in the network. Network packet data reflects the interaction between various nodes and services in the network, and plays a vital role in network security analysis, performance evaluation, and the formulation of traffic management strategies. Specific network configurations and protocols, such as router settings and firewall rules, will directly affect the transmission performance of network packets and their behavior patterns in the network. By analyzing the characteristics of network packet data, it is helpful to optimize the network architecture and improve the efficiency of data transmission.
[0003] Most of the existing methods for network traffic simulation cannot effectively simulate the characteristics of data packets across multiple network environments; these methods are usually based on simple traffic models and use traditional data generation techniques, which cannot capture the fine-grained characteristics of network packet data, resulting in a large deviation between the generated data and the actual network environment; at the same time, these methods are also unable to achieve data packet generation based on complex network environment information interaction, which makes it difficult to design new network architectures or evaluate network performance. If network environment information is taken into account, existing data generation methods can often only meet the needs of small-scale networks.
[0004] When simulating data packet transmission in a complex network environment, there is a lack of actual network traffic data. Network design and performance testing based solely on simulation often cannot accurately reflect the actual situation, and the effect is poor and wastes resources. Therefore, how to generate network packet data with actual network characteristics has become an urgent problem that needs to be solved. Summary of the invention
[0005] The present invention provides a packet data generation method and device based on flow data guidance, which is used to solve the defects in the prior art that due to the lack of actual network traffic data, network design and performance testing based on simulation means cannot accurately reflect the actual situation, the effect is poor and resources are wasted, and can generate packet data reflecting the actual communication mode.
[0006] The present invention provides a method for generating packet data based on stream data guidance, comprising: Obtaining a preset service usage sequence of a target user and network environment information of the target user, wherein the service usage sequence includes the order in which the target user uses multiple target services and the duration of using each of the target services, and the network environment information includes a source IP address, a source port, a target IP address, and a target port; Inputting the service usage sequence and the network environment information into a data generation model to obtain target flow data and target packet data output by the data generation model; The data generation model is obtained by obtaining a sample IP graph through a sample service usage sequence of a sample user, obtaining a sample IP embedding vector through the sample IP graph, and based on the diffusion processing of the real target flow data, combining it with the initial sample virtual target flow data into a first noise, taking the IP embedding vector as a first condition input, and iteratively training the preset first denoising module; and after the diffusion processing of the real target packet data, combining it with the initial sample virtual target packet data into a second noise, guiding the final sample virtual target flow data output by the trained first denoising module without a classifier, and taking the IP embedding vector as a second condition input, and training the preset second denoising module; the IP graph is used to characterize the communication relationship between each service IP in the source network environment where the target user is located; the real target flow data and the real target packet data are obtained through the sample service usage sequence and the sample network environment information of the sample user, and the initial sample virtual target flow data is obtained by inputting the IP embedding vector and the real target flow data into the first denoising module before training; the initial sample virtual target packet data is obtained by inputting the IP embedding vector, the real target packet data and the sample virtual target flow data into the second denoising module before training.
[0007] According to the packet data generation method based on flow data guidance provided by the present invention, the data generation model specifically includes an IP graph generation module, an IP node feature extraction module, a first denoising module and a second denoising module; Correspondingly, the step of inputting the service usage sequence and the network environment information into a data generation model to obtain the target flow data and target packet data output by the data generation model specifically includes: Inputting the service usage sequence and the network environment information into the IP map generation module to obtain the IP map of the target user output by the IP map generation module; Input the IP graph into the IP node feature extraction module for processing, and obtain an IP embedding vector corresponding to the IP graph output by the IP node feature extraction module; Inputting the IP embedding vector into the first denoising module for denoising processing, and obtaining the target flow data corresponding to the service usage sequence and the network environment information output by the first denoising module, wherein the first denoising module is obtained by pre-training; The target flow data is input into the second denoising module together with the IP embedding vector through a classifier-free guidance method for denoising processing to obtain the target packet data output by the second denoising module, wherein the second denoising module is obtained through pre-training.
[0008] According to the packet data generation method based on flow data guidance provided by the present invention, the steps of inputting the service usage sequence and the network environment information into the IP map generation module to obtain the IP map of the target user output by the IP map generation module specifically include: The address of each service IP in the source network environment where the target user is located and the port corresponding to the address are represented as IP nodes of the IP graph, and the connection relationship and information transmission frequency of each service IP are represented as IP edges between corresponding nodes to establish the IP graph of the target user.
[0009] According to the packet data generation method based on flow data guidance provided by the present invention, the IP node feature extraction module is a graph convolutional network GCN; The step of inputting the IP graph into the IP node feature extraction module for processing to obtain the IP embedding vector corresponding to the IP graph output by the IP node feature extraction module specifically includes: Inputting the IP graph into the graph convolutional network, embedding each IP node into a high-dimensional network space, so as to obtain a high-dimensional feature representation of each IP node, wherein the high-dimensional feature representation includes node features of each IP node and context information of each IP node in the graph convolutional network; Based on the high-dimensional feature representation of each IP node, an IP embedding vector of each IP node in the IP graph is obtained.
[0010] According to the packet data generation method based on flow data guidance provided by the present invention, the training process of the first denoising module specifically includes: Acquire real target flow data and real target packet data corresponding to a sample service usage sequence of a sample user and sample network environment information; Processing the real target stream data through a temporal attention mechanism to obtain first real target stream feature data of the real target stream data; Processing the first real target stream feature through a feature attention mechanism to obtain second real target stream feature data of the real target stream data; Inputting the IP embedding vector into the first denoising module to obtain initial simulated target flow data output by the first denoising module; The second real target flow feature data and the initial simulated target flow data are used as the first noise, and the IP embedding vector is used as a conditional input to iteratively train the first denoising module.
[0011] According to the packet data generation method based on flow data guidance provided by the present invention, the training process of the second denoising module specifically includes: Processing the real target package data through a temporal attention mechanism to obtain first real target package feature data of the real target package data; Processing the first real target package feature data through a feature attention mechanism to obtain second real target package feature data of the real target package data; The simulated target flow data output by the trained first denoising module is processed without classifier guidance, and is input into the second denoising module together with the IP embedding vector for processing, so as to obtain the initial simulated target packet data output by the second denoising module; The second real target packet feature data and the initial simulated target packet data are used as the second noise, and the simulated target flow data processed by the non-classifier guided method and the IP embedding vector are used as conditional inputs to iteratively train the second denoising module.
[0012] According to the packet data generation method based on flow data guidance provided by the present invention, the processing process of inputting the second denoising module without classifier guidance specifically includes: Noise adding process: ; Denoising process: ; Optimization goal: ; in, is the real noise; is the prediction noise of the model; is the learning parameter; After denoising, Data before denoising; is a parameter related to time t, which controls the weight of the previous step and the noise; y represents additional conditional information; the optimization target is the mean square error between the noise predicted by the model and the actual noise.
[0013] The present invention also provides a packet data generating device based on stream data guidance, comprising: an acquisition module, used to acquire a preset service usage sequence of a target user and network environment information of the target user, wherein the service usage sequence includes the order in which the target user uses multiple target services and the duration of using each of the target services, and the network environment information includes a source IP address, a source port, a target IP address, and a target port; A data generation module, used for inputting the service usage sequence and the network environment information into a data generation model to obtain target flow data and target packet data output by the data generation model; The data generation model is obtained by obtaining a sample IP graph through a sample service usage sequence of a sample user, obtaining a sample IP embedding vector through the sample IP graph, and based on the diffusion processing of the real target flow data, combining it with the initial sample virtual target flow data into a first noise, taking the IP embedding vector as a first condition input, and iteratively training the preset first denoising module; and after the diffusion processing of the real target packet data, combining it with the initial sample virtual target packet data into a second noise, guiding the final sample virtual target flow data output by the trained first denoising module without a classifier, and taking the IP embedding vector as a second condition input, and training the preset second denoising module; the IP graph is used to characterize the communication relationship between each service IP in the source network environment where the target user is located; the real target flow data and the real target packet data are obtained through the sample service usage sequence and the sample network environment information of the sample user, and the initial sample virtual target flow data is obtained by inputting the IP embedding vector and the real target flow data into the first denoising module before training; the initial sample virtual target packet data is obtained by inputting the IP embedding vector, the real target packet data and the sample virtual target flow data into the second denoising module before training.
[0014] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the packet data generation method based on flow data guidance as described in any one of the above is implemented.
[0015] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for generating packet data based on flow data guidance as described in any one of the above is implemented.
[0016] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the above-mentioned methods for generating packet data based on flow data guidance.
[0017] The packet data generation method and device based on flow data guidance provided by the present invention obtains the preset service usage sequence of the target user and the network environment information of the target user; inputs the service usage sequence and the network environment information into the data generation model to obtain the target flow data and target packet data output by the data generation model. By simulating real user behavior, the data generated by the present invention can more accurately reflect the traffic pattern in the actual network, and can ensure the reliability of the network performance test and the stress test results of the network equipment, thereby obtaining a more realistic network model, improving network planning and management efficiency, and improving user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0019] Figure 1 This is one of the flow charts of the method for generating packet data based on stream data guidance provided by an embodiment of the present invention.
[0020] Figure 2 It is a structural diagram of a data generation model provided by an embodiment of the present invention.
[0021] Figure 3 It is a diagram of the training process of the data generation model provided by an embodiment of the present invention.
[0022] Figure 4 It is a structural block diagram of an IP graph provided by an embodiment of the present invention.
[0023] Figure 5 It is a diagram of the relationship between packet data and stream data provided by an embodiment of the present invention.
[0024] Figure 6 This is the second flow chart of the packet data generation method based on stream data guidance provided by an embodiment of the present invention.
[0025] Figure 7 It is a network structure diagram of a diffusion model provided by an embodiment of the present invention.
[0026] Figure 8 It is a structural schematic diagram of a packet data generating device based on stream data guidance provided by the present invention.
[0027] Fig. 9 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0028] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0029] In the modern network environment, a large amount of diverse network traffic is generated by different types of devices and applications, including but not limited to personal computers, servers, mobile devices, and various applications. These devices and applications communicate with each other through the network, generating network packets with specific patterns and characteristics.
[0030] There are three main ways to generate fine-grained business traffic. The first is to configure the characteristic attributes of network data flows in each time window, and use batch processing to configure each set of characteristic attributes and parameters, and construct the network packet sequence layer by layer according to the network protocol. The key to this invention is to introduce the characteristic attribute values of network data flows in a unit time window into the network traffic generation method, so as to generate network data traffic that fluctuates over time and conforms to the specific attribute characteristics in a unit time. Specifically, by configuring the characteristic values such as the number of newly added network data flows in a unit time window, the duration distribution of network data flows, the number distribution of messages of various types of network data flows, the message transmission time distribution and the message size distribution, the network data traffic in a unit time window is constructed, and the network data traffic generation is realized, so that the characteristic attributes of the network traffic generated in each time window conform to the various characteristic attribute values of the configured network data flows; the second is to first build an application template library, and there are multiple application templates in the template library, and each application template contains application meta information and corresponding data packets, and the meta information can be mapped to a subdivided action in an application. When synthesizing traffic, input the serialized description obtained by the application name and the subdivided action type pair, use the automated script to batch obtain the corresponding data packets in the template library according to the specified application name and subdivided action type, and combine them into a data packet sequence, which is the synthesized traffic packet; the third is: first, model the network traffic according to the business attributes and generation rules of the network traffic; secondly, select the wavelet basis function, design the generation algorithm based on the multi-fractal wavelet model, and improve the multi-fractal wavelet model in parallel; finally, the self-similarity of the network model is detected by the variance time method and the multi-fractal spectrum.
[0031] However, the above three methods all have certain defects: the first business traffic generation method generates traffic based on protocol rules or manually designed rules to synthesize traffic. The synthesized traffic is not real network traffic, and due to the limitations of the rules, it is difficult to highly simulate complex interaction scenarios in the real network; the second business traffic generation method relies on the template pool, and the scenario data in the template pool is not rich and detailed enough. First, in the existing network, users use the same segmented actions of the same app at different times, on different terminals, or under different network conditions, such as clicking on iQiyi to open the homepage, and the traffic sequences generated are different. It is difficult for the template pool to cover a variety of existing network situations; secondly, this template pool method cannot capture the behavioral preferences of different users, lacks fine division at the user level, and is difficult to model in complex scenarios; finally, when the template pool is constructed, if the existing network user data is used, the user privacy will be exposed. The third business traffic generation method is implemented based on a wavelet model. First, this type of model is suitable for predicting data trends and has limitations in generation tasks. The patent uses the variance time method to test the self-similarity of the model, which cannot guarantee that the distribution of generated traffic data fits the distribution of actual traffic data. Secondly, there are many choices for selecting wavelet basis functions. It is difficult to find a suitable wavelet basis function in a short time for simultaneously generating traffic data corresponding to different apps. Finally, the training efficiency and effect of this model are related to the wavelet basis function. When faced with traffic generation from multiple apps and multiple behaviors, it will lead to low training efficiency and poor training effect.
[0032] From the above analysis, it can be seen that most of the existing methods for network traffic simulation cannot effectively simulate the characteristics of data packets across multiple network environments; these methods are usually based on simple traffic models and use traditional data generation technology, which cannot capture the fine-grained characteristics of network packet data, resulting in a large deviation between the generated data and the actual network environment; at the same time, these methods cannot realize data packet generation based on complex network environment information interaction, which makes it difficult to design new network architectures or evaluate network performance; if network environment information is considered, existing data generation methods can often only meet the needs of small-scale networks. If you want to expand to the entire network level, the environmental information involved is richer, and the requirements for the data generation model are higher; in order to achieve network-level information extraction and network packet data generation, a more advanced information extraction technology and a more effective data generation model are needed.
[0033] In view of this, an embodiment of the present invention provides a packet data generation method based on flow data guidance to solve the problem in the prior art that the communication relationship between IPs in a specific network environment cannot be accurately simulated, thereby generating packet data that reflects the actual communication mode.
[0034] Combine the following Figure 1-Figure 7The packet data generation method based on stream data guidance of the present invention is described.
[0035] In some specific embodiments of the present invention, Figure 1 As shown, this solution provides a packet data generation method based on stream data guidance, the method comprising the following steps: Step 100: Obtain a preset service usage sequence of a target user and network environment information of the target user, wherein the service usage sequence includes the order in which the target user uses multiple target services and the duration of using each target service, and the network environment information includes a source IP address, a source port, a target IP address, and a target port; Step 200: Input the service usage sequence and the network environment information into a data generation model to obtain target flow data and target packet data output by the data generation model; The data generation model is obtained by obtaining a sample IP graph through a sample service usage sequence of a sample user, obtaining a sample IP embedding vector through the sample IP graph, and based on the diffusion processing of the real target flow data, combining it with the initial sample virtual target flow data into a first noise, taking the IP embedding vector as a first condition input, and iteratively training the preset first denoising module; and after the diffusion processing of the real target packet data, combining it with the initial sample virtual target packet data into a second noise, guiding the final sample virtual target flow data output by the trained first denoising module without a classifier, and taking the IP embedding vector as a second condition input, and training the preset second denoising module; the IP graph is used to characterize the communication relationship between each service IP in the source network environment where the target user is located; the real target flow data and the real target packet data are obtained through the sample service usage sequence and the sample network environment information of the sample user, and the initial sample virtual target flow data is obtained by inputting the IP embedding vector and the real target flow data into the first denoising module before training; the initial sample virtual target packet data is obtained by inputting the IP embedding vector, the real target packet data and the sample virtual target flow data into the second denoising module before training.
[0036] It should be noted that in the field of network trace generation, network flow traces and network packet traces represent key aspects of understanding and simulating network behavior. Network flow traces aggregate information from multiple packets to provide a macro view of network traffic. Network flow traces typically include aggregated attributes such as source and destination IP addresses, ports, protocol types, total packet counts, and byte counts. Network packet traces capture detailed information about each individual packet transmitted over the network, including specific attributes such as packet size, timestamp, and header information.
[0037] To generate a packet trace corresponding to a given flow trace, each network flow trace can correspond to multiple network packets, and different flows may have different numbers of corresponding packets.
[0038] In a possible embodiment, if a given user The business sequence used is expressed as = { , }: A sequence representing the order in which the apps are used; Represents the usage time of the corresponding APP; on this basis, we hope to obtain the flow data that satisfies this service information sequence and packet data To achieve this, the data generation task is based on a given service sequence , synthetic network flow data and related packet data This requires accurately representing the complex dynamics and interactions observed in real-world network service usage patterns. This involves capturing the essence of user service sequences, such as the order and duration of application usage, and then generating flow data that reflects these behaviors, further extended to produce packet data that conforms to real-world network conditions. This includes detailed characteristics of flows, such as the duration of the flow and the average packet length, as well as the size and arrival time of packets, maintaining fidelity to the user's original service sequence.
[0039] The embodiments of the present invention can more accurately reflect the traffic patterns in a real network by simulating real user behaviors (such as the order and duration of APP usage). Since network performance tests and stress tests of network equipment rely on real traffic conditions to ensure the reliability of the results, the above method is particularly important for such network performance tests and stress tests of network equipment, and a more realistic network model can be obtained through the above method.
[0040] In some possible embodiments of the present invention, Figure 2 is a schematic diagram of the structure of the data generation model provided by an embodiment of the present invention, such as Figure 2 As shown, the data generation model includes: an IP graph generation module, an IP node feature extraction module, a first denoising module and a second denoising module; Correspondingly, the step of inputting the service usage sequence and the network environment information into a data generation model to obtain the target flow data and target packet data output by the data generation model specifically includes: Inputting the service usage sequence and the network environment information into the IP map generation module to obtain the IP map of the target user output by the IP map generation module; Input the IP graph into the IP node feature extraction module for processing, and obtain an IP embedding vector corresponding to the IP graph output by the IP node feature extraction module; Inputting the IP embedding vector into the first denoising module for denoising processing, and obtaining the target flow data corresponding to the service usage sequence and the network environment information output by the first denoising module, wherein the first denoising module is obtained by pre-training; The target flow data is input into the second denoising module together with the IP embedding vector through a classifier-free guidance method for denoising processing to obtain the target packet data output by the second denoising module, wherein the second denoising module is obtained through pre-training.
[0041] Specifically, this embodiment provides a data generation model and an implementation method for obtaining target flow data and target packet data through the data generation model, obtaining the IP map of the target user through the IP map generation module; obtaining the IP embedding vector corresponding to the IP map through the IP node feature extraction module; obtaining the target flow data through the first denoising module; and obtaining the target packet data output by the second denoising module by inputting the target flow data together with the IP embedding vector into the second denoising module for denoising through a classifier-free guidance method.
[0042] In some possible implementations, Figure 3 is a diagram of the training process of the data generation model provided by an embodiment of the present invention, such as Figure 3 As shown, the data generation model obtains the IP embedding vector through the IP graph, and after diffusion processing of the real target flow data, it is combined with the initial sample virtual target flow data into the first noise, and the IP embedding vector is used as the first condition input to iteratively train the preset first denoising module; and after diffusion processing of the real target packet data, it is combined with the initial sample virtual target packet data into the second noise, and the final sample virtual target flow data output by the trained first denoising module is guided by a classifier-free method, and is used together with the IP embedding vector as the second condition input to train the preset second denoising module to obtain the obtained result.
[0043] Specifically, the construction of the first denoising module and the second denoising module can adopt a two-layer Transformer model, and the diffusion processing of the real target flow data and the diffusion processing of the real target package data can also essentially adopt a conditional diffusion model processed by a two-layer attention mechanism.
[0044] Specifically, this embodiment relates to a source network environment including network flow data and a target network environment. This embodiment provides an implementation method for obtaining an IP graph of a target user and an IP embedding vector corresponding to the IP graph, specifically including: constructing an IP graph based on the network flow data of the source network environment to characterize the communication relationship between IPs, and obtaining an IP embedding vector from the IP graph using a graph convolutional network (GCN); explicitly capturing communication behavior patterns by clustering the communication patterns of IPs in the source network environment; and a conditional diffusion model that uses a conditional mechanism to guide the generation of packet data to reflect the communication relationship between IPs in the target network environment.
[0045] Among them, the conditional diffusion model includes a packet data generation mechanism based on a specific communication mode and a communication mode generation mechanism based on a time series. Both generation mechanisms are based on the IP embedding vector extracted from the source network environment as a conditional input to the generation model to obtain packet data samples that conform to the target communication mode; then, the real packet data and the generated packet data samples are adversarially trained through the discriminant model, where the real packet data comes from the real communication records in the source network environment.
[0046] In some possible implementations, the step of inputting the service usage sequence and the network environment information into the IP map generation module to obtain the IP map of the target user output by the IP map generation module specifically includes: The address of each service IP in the source network environment where the target user is located and the port corresponding to the address are represented as IP nodes of the IP graph, and the connection relationship and information transmission frequency of each service IP are represented as IP edges between corresponding nodes to establish the IP graph of the target user.
[0047] In some possible implementations, the IP node feature extraction module is a graph convolutional network GCN; The step of inputting the IP graph into the IP node feature extraction module for processing to obtain the IP embedding vector corresponding to the IP graph output by the IP node feature extraction module specifically includes: Inputting the IP graph into the graph convolutional network, embedding each IP node into a high-dimensional network space, so as to obtain a high-dimensional feature representation of each IP node, wherein the high-dimensional feature representation includes node features of each IP node and context information of each IP node in the graph convolutional network; Based on the high-dimensional feature representation of each IP node, the IP embedding vector of each IP node in the IP graph is obtained.
[0048] Specifically, Figure 4 is a structural block diagram of an IP diagram provided by an embodiment of the present invention, such as Figure 4As shown, in order to construct an IP graph based on flow data, an embodiment of the present invention represents IP addresses and their associated ports as nodes in a graph; then, the edges of the graph are established based on the connection relationship between these nodes and the information transmission frequency; the graph structure can complexly represent the topological structure of the network and the dynamics of data flow.
[0049] Furthermore, the weights of the edges in the IP graph are crucial, and the weights represent the strength and nature of the connection. For example, a higher weight may indicate more frequent or larger amounts of data transfer between two nodes, reflecting a stronger relationship or dependency. Optionally, the weights used in the embodiments of the present invention are derived from flow data analysis, including indicators such as the total number of packets transmitted, the amount of data, and the duration of the connection between a specific IP address and a port.
[0050] In some possible embodiments, such as Figure 5 As shown, Figure 5 It is a diagram of the relationship between packet data and flow data provided by an embodiment of the present invention. In order to solve the problem of guiding the generation of network packet data based on network flow data, this embodiment designs a framework that can capture the connection relationship between different ports based on flow data, including the connection between IP addresses and ports, the connection between source IP and destination IP, and the relationship between source port and destination port. When constructing an IP graph, the statistical information in the flow data is incorporated into the weight of the edge, reflecting the flow statistical data. This structure allows the IP connection and data transmission relationship in the network flow data to be represented, ensuring that the connection relationship of the packet data is consistent with the graph structure data.
[0051] Furthermore, once the IP graph is constructed, a graph convolutional network (GCN) is used to analyze and process this specific graph structure data. GCN can effectively capture the structural information and complex relationships between nodes in the graph. Therefore, GCN is particularly suitable for parsing graph data, and its specially designed convolutional layer completes the task of parsing graph data, which is difficult to achieve with traditional feedforward neural networks.
[0052] In the process of training GCN on IP graphs, we not only focus on learning the high-dimensional feature representation of nodes, but also explore how nodes influence each other through the network structure. Through in-depth network insights, we help users understand network behaviors and characteristics more accurately, such as identifying key nodes and paths in the network or predicting dynamic changes in network traffic.
[0053] During GCN training, each node in the graph (representing an IP address or port) is embedded into a higher-dimensional space. Such embeddings are learned representations that encapsulate the individual characteristics of the nodes and their contextual information in the network, such as their roles, connection patterns, and overall network structure. The resulting node embeddings provide a comprehensive and profound perspective on the state and dynamics of the network, and can therefore be used as a set of features to input into the conditioning mechanism.
[0054] In some possible implementations, the training process of the first denoising module specifically includes: Acquire real target flow data and real target packet data corresponding to a sample service usage sequence of a sample user and sample network environment information; Processing the real target stream data through a temporal attention mechanism to obtain first real target stream feature data of the real target stream data; Processing the first real target stream feature through a feature attention mechanism to obtain second real target stream feature data of the real target stream data; Inputting the IP embedding vector into the first denoising module to obtain initial simulated target flow data output by the first denoising module; The second real target flow feature data and the initial simulated target flow data are used as the first noise, and the IP embedding vector is used as a conditional input to iteratively train the first denoising module.
[0055] In some possible implementations, the training process of the second denoising module specifically includes: Processing the real target package data through a temporal attention mechanism to obtain first real target package feature data of the real target package data; Processing the first real target package feature data through a feature attention mechanism to obtain second real target package feature data of the real target package data; The simulated target flow data output by the trained first denoising module is processed without classifier guidance, and is input into the second denoising module together with the IP embedding vector for processing, so as to obtain the initial simulated target packet data output by the second denoising module; The second real target packet feature data and the initial simulated target packet data are used as the second noise, and the simulated target flow data processed by the non-classifier guided method and the IP embedding vector are used as conditional inputs to iteratively train the second denoising module.
[0056] Based on the above embodiments, the overall system flow of the embodiment of the present invention is as follows: Figure 6 As shown, the diffusion model network structure is as follows Figure 7 As shown, Figure 6 FIG2 is a flow chart of a method for generating packet data based on flow data guidance provided by an embodiment of the present invention. Figure 7 is a network structure diagram of a diffusion model provided by an embodiment of the present invention, such as Figure 6 , 7As shown, the framework proposed in this embodiment effectively captures the connection relationship between IP addresses and ports and their communication frequency from network flow data by constructing an IP graph and adopting a two-layer Transformer model, thereby generating network packet data with high relevance and logic; by utilizing the node embedding extracted by the graph convolutional network and the conditional diffusion model processed by the two-layer attention mechanism, the data generation model can accurately simulate the communication pattern in the network flow, providing a new method for network security analysis and traffic management.
[0057] That is, in order to address the challenge of guiding network packet data generation based on network flow data, a framework is designed that can capture the connection relationship between different ports based on flow data, including communication connections and information transmission frequency relationships, to generate network packet data that meets the flow data conditions.
[0058] The above framework consists of two parts: IP graph and two-layer Transformer. The first part involves building an IP graph based on streaming data: in the IP graph, IP addresses and their related ports are represented as nodes, and the edges between nodes are established based on their connection relationships and information transmission frequencies. The embedding of each node is obtained by training with a graph convolutional network (GCN); the second part is a conditional diffusion model: in order to ensure that the generated network packet data has a logical sequence, a two-layer attention mechanism is used in the denoising process to capture the temporal correlation and feature correlation between packets. Finally, network packet data is generated based on the input streaming data.
[0059] Specifically, in the diffusion model of the second layer, considering that flow data is a statistical representation of packet data, the embodiment of the present invention uses the existing statistical information in the flow data as a condition to guide the generation of packet data, which is essentially a conditional mechanism based on flow data. Given that both flow data and packet data describe network connections and data transmission relationships, the embodiment of the present invention proposes to build an IP graph structure of network connections, which is enriched by the embedded vectors captured by the graph convolutional network (GCN) to represent the connection and data transmission relationship between ports. The obtained embedded vectors serve as a condition to bridge the generation from flow data to packet data, focusing on shared port connections and data transmission relationships. In addition, before obtaining the final output, the embodiment of the present invention adopts a set of rules to verify and adjust the generated packet data when necessary to ensure logical consistency, such as packet length.
[0060] The embodiment of the present invention introduces a classifier-free guidance CFG (classifier-free guidance) in the denoising process. The specific process is as follows: Noise adding process: (1); Denoising process: (2); Optimization goal: (3); in, is the real noise; is the prediction noise of the model; is the learning parameter; After denoising, Data before denoising; is a parameter related to time t, which controls the weight of the previous step and the noise; y represents additional conditional information; the optimization target is the mean square error between the noise predicted by the model and the actual noise.
[0061] Specifically, CFG can reduce the model's dependence on classifiers during the generation process, and control the trade-off between the diversity and accuracy of generated data by adjusting the model's bootstrap ratio, which helps to improve the quality of generated data; CFG allows the model to be trained and inferred without a classifier, which reduces the burden of the model's dependence on specific classifiers and enables the model to exhibit better adaptability when facing different network flow environments; removing the classifier reduces the complexity of the model, making the model easier to train and adjust, while also reducing the computational burden in actual deployment.
[0062] Taking network flow data as a condition and introducing a diffusion model without classifier guidance can not only improve the quality and relevance of the generated data, but also enhance the applicability and practicality of the model, thereby supporting a variety of research and application needs in complex network environments. The above method brings an effective new approach to the field of network data generation, especially in scenarios where data generation under highly accurate and specific conditions is required.
[0063] More specifically, in order to further illustrate the method for solving the correlation between generated packages, the design scheme of the embodiment of the present invention includes a two-layer Transformer architecture for time and feature correlation, see Figure 5 , the two-layer Transformer architecture is supported by two distinct but interrelated layers, each of which focuses on a specific aspect of correlation, thus uniquely disentangling the temporal and feature-related dependencies inherent in the data.
[0064] The first layer of Transformer is dedicated to capturing temporal correlations. It operates by analyzing packet sequences, taking into account the order and time in which transactions occur. This is critical to understanding the dynamics of packet flows over time, allowing the model to identify patterns and anomalies in the temporal domain.
[0065] On the other hand, the second layer aims to disentangle feature correlations, which involves examining the characteristics of each packet, such as size and length. By focusing on these features, this layer can identify complex interactions and dependencies that are not immediately apparent from the time series itself.
[0066] Since network packets are multifaceted in nature, they require a detailed understanding of both temporal and feature-based dependencies. Through the above two layers of Transformer, a comprehensive analysis of network packet data is possible. The temporal layer ensures that the sequential nature of the data is not overlooked, while the feature layer delves into the details of each packet. Therefore, this dual attention approach has great advantages in the context of network packets.
[0067] Based on the analysis of the above embodiments, it can be seen that the packet data generation method based on flow data guidance provided by the embodiments of the present invention can achieve the following beneficial effects: In terms of augmented reality traffic simulation, by imitating real user behavior (such as the order and duration of APP usage), the generated data can more accurately reflect the traffic patterns in the actual network. This is especially important for network performance testing and stress testing of network equipment, because these tests rely on real-world traffic conditions to ensure the reliability of the results, thereby achieving a more realistic network model.
[0068] In terms of network planning and management, for traffic engineering, by analyzing network flow and packet data generated based on user behavior, network engineers can better understand the distribution and behavior of traffic, and then optimize routing protocols and bandwidth allocation; for capacity planning, the generated data of network flows and data packets help network planners predict the load of the network in a specific time period, supporting more effective network capacity planning and resource management.
[0069] In terms of improving user experience, for performance optimization, generating data can help network providers simulate the impact of different network conditions on APP performance, thereby optimizing the performance of these applications on the network and improving user satisfaction; for quality of service (QoS) assurance, understanding the needs of different applications for network resources can help provide more personalized service quality assurance, especially in high traffic density and multi-service environments.
[0070] Based on this algorithm model, more accurate network data generation can be achieved. If there is no rich network traffic data set, the following introduces a process for creating a network data set based on open source tools.
[0071] In real applications, in order to simulate the network data generated by users using the APP, users select the network traffic simulation program independently developed based on the Python programming language and the open source Wireshark traffic capture tool as the network data generation and capture tools referred to in the present invention. The former is used to generate network traffic data based on the user behavior model, and the latter is used to capture and analyze the generated network data in real time.
[0072] Because the packet data generation method based on flow data guidance provided by the embodiment of the present invention has the above-mentioned beneficial effects, the scenarios and significances of network packet data and network flow data generated by the method include: Network security analysis: By generating network traffic for specific app usage scenarios, security analysts can simulate possible malicious behavior or detect security vulnerabilities in applications, such as detecting whether an app is vulnerable to DDoS attacks under high traffic conditions; Performance testing: Network engineers can use this data to test the performance of network devices, such as routers and firewalls, to ensure that they can still operate stably under high traffic loads; Optimize network configuration: Based on the simulated data, the network architecture or configuration can be adjusted to optimize data transmission efficiency and reduce latency, especially for video streaming or large data transmission applications; Education and Research: Academic researchers can use this detailed network data to teach and experiment with network science, data communications, and computer network courses. Product development: App developers can use this data to test new apps or updated versions of existing apps to evaluate their performance in actual network environments and optimize them accordingly.
[0073] The method provided by the embodiment of the present invention can not only provide network environment simulation in practical applications, but also help users make more intelligent decisions in product development, network maintenance, security protection, education research, etc.
[0074] The packet data generating device based on flow data guidance provided by the present invention is described below. The packet data generating device based on flow data guidance described below and the packet data generating method based on flow data guidance described above can refer to each other.
[0075] Figure 8 Schematic diagram of the structure of the packet data generating device based on stream data guidance provided by the present invention, such as Figure 8 As shown, the device includes the following modules: The acquisition module 810 is used to acquire a preset service usage sequence of a target user and network environment information of the target user, wherein the service usage sequence includes the order in which the target user uses multiple target services and the duration of using each of the target services, and the network environment information includes a source IP address, a source port, a target IP address, and a target port; A data generation module 820, configured to input the service usage sequence and the network environment information into a data generation model, and obtain target flow data and target packet data output by the data generation model; The data generation model is obtained by obtaining a sample IP graph through a sample service usage sequence of a sample user, obtaining a sample IP embedding vector through the sample IP graph, and based on the diffusion processing of the real target flow data, combining it with the initial sample virtual target flow data into a first noise, taking the IP embedding vector as a first condition input, and iteratively training the preset first denoising module; and after the diffusion processing of the real target packet data, combining it with the initial sample virtual target packet data into a second noise, guiding the final sample virtual target flow data output by the trained first denoising module without a classifier, and taking the IP embedding vector as a second condition input, and training the preset second denoising module; the IP graph is used to characterize the communication relationship between each service IP in the source network environment where the target user is located; the real target flow data and the real target packet data are obtained through the sample service usage sequence and the sample network environment information of the sample user, and the initial sample virtual target flow data is obtained by inputting the IP embedding vector and the real target flow data into the first denoising module before training; the initial sample virtual target packet data is obtained by inputting the IP embedding vector, the real target packet data and the sample virtual target flow data into the second denoising module before training.
[0076] The implementation principle and beneficial effects of the packet data generation device based on stream data guidance provided in the embodiment of the present invention are similar to the implementation principle and beneficial effects of the packet data generation method based on stream data guidance shown in the above embodiment. Please refer to the implementation principle and beneficial effects of the packet data generation method based on stream data guidance shown in the above embodiment, and no further details will be given here.
[0077] Fig. 9 An example of a physical structure diagram of an electronic device is shown in FIG. Fig. 9As shown, the electronic device may include: a processor (processor) 910 , a communication interface (Communications Interface) 920 , a memory (memory) 930 and a communication bus 940 , wherein the processor 910 , the communication interface 920 , and the memory 930 communicate with each other through the communication bus 840 . The processor 910 can call the logic instructions in the memory 930 to execute the packet data generation method based on the flow data guidance, which method includes: obtaining the preset service usage sequence of the target user and the network environment information of the target user, wherein the service usage sequence includes the order in which the target user uses multiple target services and the duration of using each of the target services, and the network environment information includes the source IP address, source port, target IP address and target port; inputting the service usage sequence and the network environment information into the data generation model to obtain the target flow data and target packet data output by the data generation model; wherein the data generation model obtains a sample IP graph through the sample service usage sequence of the sample user, obtains a sample IP embedding vector through the sample IP graph, and based on the diffusion processing of the real target flow data, combines it with the initial sample virtual target flow data into the first noise, inputs the IP embedding vector as the first condition, and performs the preset The first denoising module is iteratively trained; and after diffusion processing of the real target packet data, it is combined with the initial sample virtual target packet data to form a second noise, and the final sample virtual target flow data output by the trained first denoising module is guided by a classifier-free method and used together with the IP embedding vector as a second condition input to train the preset second denoising module; the IP graph is used to characterize the communication relationship between each service IP in the source network environment where the target user is located; the real target flow data and the real target packet data are obtained through the sample service usage sequence and the sample network environment information of the sample user, and the initial sample virtual target flow data is obtained by inputting the IP embedding vector and the real target flow data into the first denoising module before training; the initial sample virtual target packet data is obtained by inputting the IP embedding vector, the real target packet data and the sample virtual target flow data into the second denoising module before training.
[0078] In addition, the logic instructions in the above-mentioned memory 930 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0079] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the packet data generation method based on flow data guidance provided by the above methods, the method comprising: obtaining a preset service usage sequence of a target user and the network environment information of the target user, wherein the service usage sequence includes the order in which the target user uses multiple target services and the duration of use of each target service, and the network environment information includes a source IP address, a source port, a target IP address and a target port; inputting the service usage sequence and the network environment information into a data generation model to obtain target flow data and target packet data output by the data generation model; wherein the data generation model obtains a sample IP graph through a sample service usage sequence of a sample user, obtains a sample IP embedding vector through the sample IP graph, and based on diffusion processing of the real target flow data, obtains a sample IP embedding vector with an initial sample virtual target. The flow data is combined into a first noise, the IP embedding vector is used as a first condition input, and a preset first denoising module is iteratively trained; and after the real target packet data is diffused, it is combined with the initial sample virtual target packet data into a second noise, and the final sample virtual target flow data output by the trained first denoising module is guided by a classifier-free method and used together with the IP embedding vector as a second condition input to train the preset second denoising module; the IP graph is used to characterize the communication relationship between each service IP in the source network environment where the target user is located; the real target flow data and the real target packet data are obtained through the sample service usage sequence and the sample network environment information of the sample user, and the initial sample virtual target flow data is obtained by inputting the IP embedding vector and the real target flow data into the first denoising module before training; the initial sample virtual target packet data is obtained by inputting the IP embedding vector, the real target packet data and the sample virtual target flow data into the second denoising module before training.
[0080] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the packet data generation method based on flow data guidance provided by the above-mentioned methods, the method comprising: obtaining a preset service usage sequence of a target user and network environment information of the target user, wherein the service usage sequence comprises the order in which the target user uses multiple target services and the duration of use of each of the target services, and the network environment information comprises a source IP address, a source port, a target IP address and a target port; inputting the service usage sequence and the network environment information into a data generation model to obtain target flow data and target packet data output by the data generation model; wherein the data generation model obtains a sample IP graph through a sample service usage sequence of a sample user, obtains a sample IP embedding vector through the sample IP graph, and based on diffusion processing of the real target flow data, combines the real target flow data with the initial sample virtual target flow data into a first noise, and transforms the I The P embedding vector is used as the first condition input to iteratively train the preset first denoising module; and after the real target packet data is diffused, it is combined with the initial sample virtual target packet data to form the second noise, and the final sample virtual target flow data output by the trained first denoising module is guided by a classifier-free method and used together with the IP embedding vector as the second condition input to train the preset second denoising module; the IP graph is used to characterize the communication relationship between each service IP in the source network environment where the target user is located; the real target flow data and the real target packet data are obtained through the sample service usage sequence and the sample network environment information of the sample user, and the initial sample virtual target flow data is obtained by inputting the IP embedding vector and the real target flow data into the first denoising module before training; the initial sample virtual target packet data is obtained by inputting the IP embedding vector, the real target packet data and the sample virtual target flow data into the second denoising module before training.
[0081] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0082] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0083] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A packet data generation method based on stream data guidance, characterized in that: include: Obtaining a preset service usage sequence of a target user and network environment information of the target user, wherein the service usage sequence includes the order in which the target user uses multiple target services and the duration of using each of the target services, and the network environment information includes a source IP address, a source port, a target IP address, and a target port; Inputting the service usage sequence and the network environment information into a data generation model to obtain target flow data and target packet data output by the data generation model; The data generation model is obtained by obtaining a sample IP graph through a sample service usage sequence of a sample user, obtaining a sample IP embedding vector through the sample IP graph, and based on the diffusion processing of the real target flow data, combining it with the initial sample virtual target flow data into a first noise, taking the IP embedding vector as a first condition input, and iteratively training the preset first denoising module; and after the diffusion processing of the real target packet data, combining it with the initial sample virtual target packet data into a second noise, guiding the final sample virtual target flow data output by the trained first denoising module without a classifier, and taking the IP embedding vector as a second condition input, and training the preset second denoising module; the IP graph is used to characterize the communication relationship between each service IP in the source network environment where the target user is located; the real target flow data and the real target packet data are obtained through the sample service usage sequence and the sample network environment information of the sample user, and the initial sample virtual target flow data is obtained by inputting the IP embedding vector and the real target flow data into the first denoising module before training; the initial sample virtual target packet data is obtained by inputting the IP embedding vector, the real target packet data and the sample virtual target flow data into the second denoising module before training.
2. The method for generating packet data based on stream data guidance according to claim 1, characterized in that: The data generation model specifically includes an IP graph generation module, an IP node feature extraction module, a first denoising module and a second denoising module; Correspondingly, the step of inputting the service usage sequence and the network environment information into a data generation model to obtain the target flow data and target packet data output by the data generation model specifically includes: Inputting the service usage sequence and the network environment information into the IP map generation module to obtain the IP map of the target user output by the IP map generation module; Input the IP graph into the IP node feature extraction module for processing, and obtain an IP embedding vector corresponding to the IP graph output by the IP node feature extraction module; Inputting the IP embedding vector into the first denoising module for denoising processing, and obtaining the target flow data corresponding to the service usage sequence and the network environment information output by the first denoising module, wherein the first denoising module is obtained by pre-training; The target flow data is input into the second denoising module together with the IP embedding vector through a classifier-free guidance method for denoising processing to obtain the target packet data output by the second denoising module, wherein the second denoising module is obtained through pre-training.
3. The method for generating packet data based on stream data guidance according to claim 2, characterized in that: The step of inputting the service usage sequence and the network environment information into the IP map generation module to obtain the IP map of the target user output by the IP map generation module specifically includes: The address of each service IP in the source network environment where the target user is located and the port corresponding to the address are represented as IP nodes of the IP graph, and the connection relationship and information transmission frequency of each service IP are represented as IP edges between corresponding nodes to establish the IP graph of the target user.
4. The method for generating packet data based on stream data guidance according to claim 3, characterized in that: The IP node feature extraction module is a graph convolutional network GCN; The step of inputting the IP graph into the IP node feature extraction module for processing to obtain the IP embedding vector corresponding to the IP graph output by the IP node feature extraction module specifically includes: Inputting the IP graph into the graph convolutional network, embedding each IP node into a high-dimensional network space, so as to obtain a high-dimensional feature representation of each IP node, wherein the high-dimensional feature representation includes node features of each IP node and context information of each IP node in the graph convolutional network; Based on the high-dimensional feature representation of each IP node, an IP embedding vector of each IP node in the IP graph is obtained.
5. The method for generating packet data based on stream data guidance according to claim 4, characterized in that: The training process of the first denoising module specifically includes: Acquire real target flow data and real target packet data corresponding to a sample service usage sequence of a sample user and sample network environment information; Processing the real target stream data through a temporal attention mechanism to obtain first real target stream feature data of the real target stream data; Processing the first real target stream feature through a feature attention mechanism to obtain second real target stream feature data of the real target stream data; Inputting the IP embedding vector into the first denoising module to obtain initial simulated target flow data output by the first denoising module; The second real target flow feature data and the initial simulated target flow data are used as the first noise, and the IP embedding vector is used as a conditional input to iteratively train the first denoising module.
6. The method for generating packet data based on stream data guidance according to claim 5, characterized in that: The training process of the second denoising module specifically includes: Processing the real target package data through a temporal attention mechanism to obtain first real target package feature data of the real target package data; Processing the first real target package feature data through a feature attention mechanism to obtain second real target package feature data of the real target package data; The simulated target flow data output by the trained first denoising module is processed without classifier guidance, and is input into the second denoising module together with the IP embedding vector for processing, so as to obtain the initial simulated target packet data output by the second denoising module; The second real target packet feature data and the initial simulated target packet data are used as the second noise, and the simulated target flow data processed by the non-classifier guided method and the IP embedding vector are used as conditional inputs to iteratively train the second denoising module.
7. The method for generating packet data based on stream data guidance according to claim 6, characterized in that: The processing of the second denoising module without classifier guidance processing specifically includes: Noise adding process: ; Denoising process: ; Optimization goal: ; in, is the real noise; is the prediction noise of the model; is the learning parameter; After denoising, Data before denoising; is a parameter related to time t, which controls the weight of the previous step and the noise; y represents additional conditional information; the optimization target is the mean square error between the noise predicted by the model and the actual noise.
8. A packet data generating device based on stream data guidance, characterized in that: include: An acquisition module, used to acquire a preset service usage sequence of a target user and network environment information of the target user, wherein the service usage sequence includes the order in which the target user uses multiple target services and the duration of using each of the target services; A data generation module, used for inputting the service usage sequence and the network environment information into a data generation model to obtain target flow data and target packet data output by the data generation model; The data generation model is obtained by obtaining a sample IP graph through a sample service usage sequence of a sample user, obtaining a sample IP embedding vector through the sample IP graph, and based on the diffusion processing of the real target flow data, combining it with the initial sample virtual target flow data into a first noise, taking the IP embedding vector as a first condition input, and iteratively training the preset first denoising module; and after the diffusion processing of the real target packet data, combining it with the initial sample virtual target packet data into a second noise, guiding the final sample virtual target flow data output by the trained first denoising module without a classifier, and taking the IP embedding vector as a second condition input, and training the preset second denoising module; the IP graph is used to characterize the communication relationship between each service IP in the source network environment where the target user is located; the real target flow data and the real target packet data are obtained through the sample service usage sequence and the sample network environment information of the sample user, and the initial sample virtual target flow data is obtained by inputting the IP embedding vector and the real target flow data into the first denoising module before training; the initial sample virtual target packet data is obtained by inputting the IP embedding vector, the real target packet data and the sample virtual target flow data into the second denoising module before training.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method for generating packet data based on stream data guidance according to any one of claims 1 to 7 is implemented.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for generating packet data based on stream data guidance according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Network flow generation method and device based on knowledge enhancement generative adversarial network
CN113726545A
Service-driven network flow simulation method and device
CN114244725A