A method and device for sending sample data stream

By establishing a traffic generation model based on the characteristics of the training data packet, and generating sample data streams matching the demand information, the problem of inaccurate data flow feature simulation in the prior art is solved, and the detection accuracy and accuracy of network performance analysis are improved.

CN115333963BActive Publication Date: 2025-01-14HUAWEI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110441829.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-23
Publication Date
2025-01-14
Estimated Expiration
2041-04-23

AI Technical Summary

Technical Problem

Existing sample data flow generation methods are difficult to accurately simulate data flow characteristics in complex networks, especially in different service types and packet lengths, resulting in low detection accuracy.

Method used

By obtaining the interval time and feature information of the training data packet, establishing a traffic generation model, combining Poisson and typed Brownian motion models, etc., a sample data flow matching the demand information is generated, and the arrival time and feature information of the data packet are taken into account. Markov arrives and marks Markov modulation processes and other models, selecting appropriate algorithms to improve the accuracy and efficiency of the model.

Benefits of technology

The generated sample data flow can more accurately simulate the data flow characteristics in actual application scenarios, improve the accuracy of network performance analysis and resource scheduling management, and enhance the ability to detect network congestion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115333963B_ABST
    Figure CN115333963B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a method and device for sending a sample data stream, which takes into account both the arrival time of the training data packet and the data packet characteristic information of the training data packet, and can accurately simulate the traffic characteristics of each data stream in the network system when the demand information is met. Among them, the sample data stream sending method includes: a first device obtains demand information of multiple sample data packets, and the multiple sample data packets belong to one or more sample data streams. The demand information includes characteristic information of the sample data packets and the interval time of the sample data packets, and the interval time is the interval time between outputting the sample data packets. The first device inputs the demand information into a traffic generation model to obtain the multiple sample data packets that match the demand information, and the traffic generation model reflects the correlation between the interval time of the sample data packets and the characteristic information of the sample data packets.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a method and device for sending a sample data stream. Background Art

[0002] A terminal device or server in a network can send data packets to a destination device through a network device. When a device continuously sends multiple data packets to the same destination device, these data packets can be called a data stream. In the process of forwarding data packets, network devices in the network may experience network congestion and other problems.

[0003] In order to solve these problems, the network system can be tested by simulating the data flow in the actual application scenario through sample data flow. The sample data flow includes multiple data packets that continuously arrive at the same destination device, which is used to simulate the traffic characteristics of the data flow in the actual application scenario. The sample data flow can be used to simulate the process of the network system transmitting data flow in the actual application scenario. That is, by sending sample data flow to the network device in the network system, the process of the network system transmitting data flow in the actual application scenario can be simulated, so as to perform performance analysis and evaluation and resource scheduling management on the network system, and solve potential network congestion and other problems.

[0004] Since the role of the sample data stream is to simulate the data stream in the actual application scenario, the closer the sending rules of each data packet in the sample data stream are to the sending rules of each data packet in the actual data stream, the more accurate the test results obtained through the sample data stream will be. Therefore, currently, the sample data stream can be generated according to the arrival time of the data packet in the data stream through models such as the Poisson model and the Fractal Brownian Motion model (FBM), or through tools such as Iperf.

[0005] However, with the expansion and development of the network, the characteristics of each data flow in the network are becoming more and more complex, and the sample data flows generated by the existing generation methods are becoming increasingly difficult to simulate the data flows in actual application scenarios. Summary of the invention

[0006] The embodiment of the present application provides a method for sending a sample data stream, which can generate a sample data stream according to the demand information of the sample data packet and the traffic generation model. It takes into account both the transmission characteristics of the data packet in the training data stream and the characteristics of the data packet itself, and the generated model can fully reflect the traffic characteristics of the training data stream.

[0007] In the first aspect, an embodiment of the present application provides a method for sending a sample data stream, which can be applied to a first device in a network system. When generating a sample data stream, the first device can first obtain demand information of multiple sample data packets, which can belong to one or more sample data streams. The demand information of the sample data packets can include characteristic information and interval time of the sample data packets, and the interval time is the interval time between output sample data packets. Then, the first device can input the demand information into a traffic generation model to obtain multiple sample data packets that match the demand information, and the traffic generation model can reflect the correlation between the interval time of the sample data packets and the characteristic information of the sample data packets. In this way, when generating a sample data stream, both the output time of each sample data packet in the sample data stream and the characteristic information of the sample data stream itself are taken into account. In this way, by combining the interval time and characteristic information of the data packet to generate a sample data stream, the generated sample data stream can accurately simulate the traffic characteristics of the data stream in the actual application scenario, and the degree of matching with the demand information is higher.

[0008] In the second aspect, the embodiment of the present application provides a model establishment method, which can be applied to a first device in a network system, and is used to establish a traffic generation model in the aforementioned sample data stream sending method. When establishing the traffic generation model, the first device can first obtain the interval time and feature information of multiple training data packets, and then train the traffic generation model according to the interval time and feature information of these training data packets to obtain a model parameter set. In this way, when establishing the traffic generation model, the traffic characteristics of the data stream in the network system can be learned according to the interval time and packet feature information of the training data packets in the training data stream, so as to train the traffic generation model to obtain a model parameter set. Since both the arrival time of the training data packet and the packet feature information of the training data packet are taken into account, the trained traffic generation model can accurately simulate the traffic characteristics of the data stream. When generating a sample data stream, by adopting a traffic generation model that matches the demand information of the sample data packet, the first device can generate a sample data stream that meets the demand information, thereby accurately simulating the traffic characteristics of each data stream in the network system when the demand information is met.

[0009] In some possible implementations, the characteristic information of the aforementioned training data packet may include the packet length and / or service type of the training data packet. The first device may determine the type of the traffic generation model to be trained before training the traffic generation model. Specifically, when the characteristic information of the training data packet includes the packet length of the training data packet, the first device may determine the traffic generation model, and the function from the model includes a batch Markov arrival process (Batch Markov Arrival Process, BMAP) model. When the characteristic information of the training data packet includes the service type of the training data packet, the first device may determine the traffic generation model, and the traffic generation model includes a marked Markov modulation process (Marked Markov Arrival Processes, MMAP) model.

[0010] In some possible implementations, after the first device obtains the traffic generation model through training, it can save the correspondence between the model parameter set and the interval time and feature information of the training data stream. The model parameter set includes various parameters in the traffic generation model. In this way, when generating the sample data stream, the first device can search for the model parameter set corresponding to the demand information of the sample data packet from the correspondence, thereby determining the traffic generation model that matches the demand information of the sample data packet according to the model parameter set, so as to generate the sample data stream that meets the demand information using the traffic generation model.

[0011] In some possible implementations, the first device may determine the algorithm used for training the sample data stream according to the stationarity of the sample data stream. Specifically, the first device may first determine the stationarity of the training data stream according to the interval time of multiple training data packets. Then, the first device may determine whether the stationarity of the training data stream meets the first preset condition. If the stationarity of the training data stream meets the first preset condition, the first device may use the expectation maximization (EM) algorithm combined with moment matching (MM) as the algorithm for training the traffic generation model. If the stationarity of the training data stream does not meet the first preset condition, the first device may use the EM algorithm as the algorithm for training the traffic generation model. The EM algorithm combined with MM has a higher efficiency, and the EM algorithm has a higher accuracy. In this way, when the stationarity of the training data stream is better, the first device may select the EM algorithm combined with MM with a higher efficiency to train the traffic generation model; and when the stationarity of the training data stream is poor, the first device may select the EM algorithm with a higher accuracy to train the traffic generation model. In this way, the training efficiency is improved under the premise of ensuring the accuracy of the traffic generation model.

[0012] In some possible implementations, if the stationarity of the training data stream does not meet the first preset condition, the first device may further determine whether the stationarity of the training data stream meets the second preset condition. If the stationarity of the training data stream meets the second preset condition, the first device may determine the EM algorithm as the algorithm for training the traffic generation model. If the stationarity of the training data stream does not meet the second preset condition, the first device may select multiple training data packets from the aforementioned multiple training data packets, and use these sample data packets as target data packets, thereby training the traffic generation model according to the interval time of the multiple target data packets and the characteristic information of the multiple target data packets.

[0013] In some possible implementations, the model parameter set may include a first model parameter set and a second model parameter set. When the first device uses the EM algorithm combined with MM to train the sample data stream, the first model parameter set may be obtained by using the EM algorithm according to the interval time of multiple training data packets. Then, the first device may construct a minimization function, and solve the second model parameter set that minimizes the minimization function according to the constraint condition. Among them, the minimization function is a function that minimizes the difference between the first theoretical value and the first statistical value, and minimizes the difference between the second theoretical value and the second statistical value. The first theoretical value is a theoretical value expressing the hysteresis of the time interval of multiple training data packets, the first statistical value is a statistical value expressing the hysteresis of the time interval of multiple training data packets, the second theoretical value is a theoretical value expressing the hysteresis of the characteristic information of multiple training data packets, the second statistical value is a statistical value expressing the hysteresis of the characteristic information of multiple training data packets, and the first theoretical value and the second theoretical value can be obtained according to the first model parameter set.

[0014] In some possible implementations, the first model parameter set may include a D0 matrix, the second model parameter set includes a D1 matrix to a Dk matrix, where k is an integer greater than or equal to 1, the D0 matrix represents the state transition rate when no arrival event occurs, and the Dk matrix represents the state transition rate when the kth type of arrival event occurs.

[0015] In some possible implementations, when the characteristic information of a training data packet or a sample data packet includes the packet length of the data packet, the first device may determine the characteristic information of the data packet according to the type of the data packet. Specifically, the first device may first obtain the packet length of each training data packet in a plurality of training data packets, and then cluster the packet lengths of these training data packets. For example, the packet lengths may be clustered according to the service type corresponding to the training data packets to obtain the cluster center of each type of packet length. Then, the first device may determine the cluster center of the category to which the packet length of each training data packet belongs as the characteristic information of the training data packet.

[0016] In a third aspect, an embodiment of the present application provides a sample data stream sending device, the device comprising: an acquisition unit, used to acquire demand information of multiple sample data packets, the multiple sample data packets belong to one or more sample data streams, the demand information comprises characteristic information of the sample data packets and an interval time of the sample data packets, the interval time being the interval time between outputting the sample data packets; a generation unit, used to input the demand information into a traffic generation model to obtain the multiple sample data packets matching the demand information, the traffic generation model embodies the correlation between the interval time of the sample data packets and the characteristic information of the sample data packets.

[0017] In some possible implementations, the device also includes a training unit; the acquisition unit is further used to obtain the interval time of multiple training data packets and characteristic information of the multiple training data packets, the multiple training data packets belong to one or more training data streams, the interval time of multiple training data packets is determined according to the arrival time of the multiple training data packets, and the characteristic information of the training data packets is the same as the characteristic information of the sample data packets; the training unit is used to train the traffic generation model according to the interval time of the multiple training data packets and the characteristic information of the multiple training data packets to obtain a model parameter set of the traffic generation model; the generation unit is used to input the demand information and the model parameter set into the traffic generation model, and use the traffic generation model using the model parameter set to output the multiple sample data packets that match the demand information.

[0018] In some possible implementations, the characteristic information includes packet length, and the traffic generation model includes a batch Markov arrival process (BMAP) model.

[0019] In some possible implementations, the characteristic information includes a service type, and the traffic generation model includes a marked Markov arrival process (MMAP) model.

[0020] In some possible implementations, the model parameter set includes a first model parameter set and a second model parameter set; the training unit is used to obtain the first model parameter set using an expected maximum EM algorithm based on the interval time of the multiple training data packets; construct a minimization function, the minimization function is used to minimize the first theoretical value and the first statistical value, and minimize the second theoretical value and the second statistical value; wherein the first theoretical value is a theoretical value expressing the hysteresis of the time interval of the multiple training data packets, the first statistical value is a statistical value expressing the hysteresis of the time interval of the multiple training data packets, the second theoretical value is a theoretical value expressing the hysteresis of the characteristic information of the multiple training data packets, the second statistical value is a statistical value expressing the hysteresis of the characteristic information of the multiple training data packets, and the first theoretical value and the second theoretical value are obtained according to the first model parameter set; the minimization function is solved according to the constraint conditions to obtain the second model parameter set.

[0021] In some possible implementations, the first model parameter set includes a D0 matrix, the second model parameter set includes a D1 matrix to a Dk matrix, where k is an integer greater than or equal to 1, the D0 matrix represents the state transition rate when no arrival event occurs, and the Dk matrix represents the state transition rate when the kth type of arrival event occurs.

[0022] In some possible implementations, the training unit is used to determine the stationarity of the training data stream according to the interval time of the multiple training data packets; in response to the stationarity of the training data stream satisfying a first preset condition, construct a minimization function.

[0023] In some possible implementations, the training unit is used to determine the stationarity of the training data stream based on the interval time of the multiple training data packets; in response to the stationarity of the training data stream satisfying a second preset condition, extract a target data stream from the training data stream, wherein the length of the target data stream is less than the length of the training data stream, and the target data stream includes multiple target data packets; and train the traffic generation model based on the interval time of the multiple target data packets and the characteristic information of the multiple target data packets.

[0024] In some possible implementations, the acquisition unit is used to obtain the packet length of each training data packet in the multiple training data packets; cluster the packet lengths of the multiple training data packets to obtain the cluster center of each category of packet lengths; and determine the cluster center of the category to which the packet length of each training data packet belongs as the characteristic information of the training data packet.

[0025] In a fourth aspect, an embodiment of the present application provides a device, comprising a processor chip and a memory, the memory being used to store instructions or program codes, and the processor chip being used to call and run the instructions or program codes from the memory to execute the sample data stream sending method as described in the first aspect above, or to execute the model building method as described in the second aspect above.

[0026] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, including instructions, programs or codes, which, when executed on a computer, enables the computer to execute the sample data stream sending method as described in the first aspect, or execute the model building method as described in the second aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 A schematic diagram of the structure of a network system 100 provided in an embodiment of the present application;

[0028] Figure 2 A flow chart of a method for establishing a model provided in an embodiment of the present application;

[0029] Figure 3 Method flow chart of the sample data stream sending method provided in the embodiment of the present application

[0030] Figure 4 A schematic diagram of the structure of a model building device 400 provided in an embodiment of the present application;

[0031] Figure 5 A schematic diagram of the structure of a sample data stream sending device 500 provided in an embodiment of the present application;

[0032] Figure 6 A schematic diagram of the structure of a device 600 provided in an embodiment of the present application;

[0033] Figure 7 A schematic diagram of the structure of a device 700 provided in an embodiment of the present application. DETAILED DESCRIPTION

[0034] The following introduces the model building method and sample data stream sending method provided by the conventional technology and the embodiments of the present application in conjunction with the accompanying drawings.

[0035] See also Figure 1, which is a schematic diagram of the structure of the system 100 provided in an embodiment of the present application. In the system 100, a terminal device 110, a server 120, a network device 131, a network device 132, a network device 133 and a device 140 are included. Among them, the terminal device 110 is connected to the network device 131, the network device 132 is connected to the network device 131 and the network device 133 respectively, the server 120 is connected to the network device 133, and the device 140 is connected to the network device 131, the network device 132 and the network device 133 respectively.

[0036] When sending a data packet to the server 120, the terminal device 110 may send a data packet to the network device 131, and the data packet finally reaches the server 120 through the forwarding of the network device 131, the network device 132, and the network device 133. When the terminal device 110 sends multiple data packets to the server 120 through the network device 131, the network device 132, and the network device 133, these data packets may be referred to as a data stream. In the embodiment of the present application, the data stream composed of multiple data packets sent by the terminal device 110 to the server 120 may be referred to as data stream A.

[0037] In order to test the network system composed of network device 131, network device 132 and network device 133, a sample data stream can be generated according to the arrival time of each data packet in data stream A. The arrival time of the data packet is the time when the network device 131 receives the data packet, or the time when the data packet enters the sending queue of the network device 133. Accordingly, the generated sample data stream can also include multiple data packets, and the interval time of each data packet is determined according to the time when each data packet in data stream A arrives at the network device 131. In this way, inputting the sample data stream into the network device 131 is equivalent to simulating the regularity of sending data packets of the terminal device 110 to send data packets to the network device 131, thereby determining the performance of the network system. It can be seen that the sample data stream can be used to perform performance analysis and evaluation and resource scheduling management on the performance of the network system, and can also solve potential network congestion and other problems.

[0038] In the above process, the closer the generation time of each data packet in the sample data stream is to the arrival time of each data packet in data stream A, the closer the sample data stream is to the real data stream A. Therefore, in order to improve the degree of fit between the sample data stream and the data stream in the actual application scenario, the sample data stream can be generated through models such as poission model and FBM, thereby improving the detection accuracy.

[0039] With the development of the network, the differences between the data flows carried by the network system are becoming larger and larger. For example, the arrival time and traffic burst of data packets in data flows of different business types are often different, and the packet lengths of data packets may also be different. Therefore, since the traditional sample data flow sending method only considers the arrival time of the data packet, it is difficult to accurately and comprehensively simulate the rules of data flows in actual application scenarios.

[0040] In order to solve the above problems, the embodiments of the present application provide a model building method and a sample data stream sending method, which can generate a sample data stream according to the demand information of the sample data packet and the traffic generation model. Among them, the traffic generation model used to generate the sample data stream can be obtained by the arrival time of each training data packet in the training data stream and the characteristic information of the data packet. In this way, both the transmission characteristics of the data packet in the training data stream and the characteristics of the data packet itself are taken into account, and the generated model can fully reflect the traffic characteristics of the training data stream.

[0041] The method provided in the embodiment of the present application can be applied to Figure 1 The system 100 shown in FIG. 1 may be a device 140 for generating samples (ie, the first device described below). The device 140 may send the generated sample data stream to the corresponding network device through the connection with the network device 131 , the network device 132 or the network device 133 .

[0042] Device 140 may be a server or controller, a software platform running on a server, or other computer devices with data processing functions. Network devices 131, 132, and 133 may be physical devices supporting routing functions such as routers and switches, or servers deploying virtual routers or virtual switches for transmitting data streams.

[0043] See also Figure 2 , which is a flow chart of a model building method provided in an embodiment of the present application. The model building method provided in an embodiment of the present application may include the following steps:

[0044] S201: The first device obtains the interval time and data packet characteristic information of each training data packet included in the training data stream.

[0045] The model building method provided in the embodiment of the present application can establish a traffic generation model, which can reflect the correlation between the arrival time of the data packet and the characteristic information of the data packet, and can be used to simulate the traffic characteristics of the training data stream to generate a sample data stream.

[0046] When establishing a traffic generation model, the first device may first obtain the interval time and feature information of multiple training data packets. The first device may be a controller or a server in a network system, for example, Figure 1 The plurality of training data packets may come from the same training data stream or from multiple training data streams. When the plurality of training data packets come from different training data streams, the training data packets may pass through the same network device or have the same destination device.

[0047] In the embodiment of the present application, the interval time and characteristic information of the training data packet can be collected by the network device in the network system, for example, Figure 1 The information may be collected by the network device 131, the network device 131 or the network device 133, or may be obtained by the server 120. Optionally, in the process of transmitting the data stream, the network device may record the arrival time and feature information of each data packet in one or more data streams passing through the network device, so that the first device uses these data streams as training data streams, thereby obtaining the interval time and feature information of the training data packets according to the information recorded by the network device.

[0048] The interval time of the training data packets and the characteristic information of the training data packets are introduced below respectively.

[0049] The interval time of the training data packets indicates the time interval between two adjacent training data packets, and can reflect the time regularity of the network device receiving the training data packets. For example, the interval time of the N+1th training data packet can be the time interval from the time when the Nth training data packet arrives at the network device to the time when the N+1th training data packet arrives at the network device. Wherein N is a positive integer greater than or equal to 1. It should be noted that the Nth training data packet and the N+1th training data packet can come from the same training data stream or from different training data streams. For example, assuming that the terminal device 110 sends two training data streams, data stream A and data stream B, to the server 120, then when the Nth training data packet comes from data stream A, the N+1th training data packet can come from data stream B.

[0050] Optionally, the interval time of the training data packets can be calculated based on the arrival time of the training data packets. The arrival time can be, for example, the time when the network device receives the training data packet, or the time when the training data packet enters the sending queue of the network device 133. The network device can record the arrival time of the training data packet when transmitting the training data stream, and send the arrival time of the training data packet to the first device, so that the first device calculates the interval time of the training data packets based on the arrival time. For example. Assume that the arrival time of the Nth training data packet is expressed as T[N], and the arrival time of the N+1th training data packet is expressed as T[N+1], then the interval time between the Nth training data packet and the N+1th training data packet can be expressed as T[N+1]-T[N]. In some possible implementations, when the first device is a device that transmits training data packets in a network system, the first device can record the arrival time of the training data packet, and calculate the interval time of the training data packets based on the arrival time of the training data packets.

[0051] The characteristic information of the training data packet may include data packet characteristics of the training data packet, which may reflect the characteristics of the training data packet, for example, the packet length of the training data packet, and / or the service type of the training data packet and other information. Among them, the packet length of the training data packet indicates the size of the training data packet, for example, it may be the number of bytes of the training data packet. The service type of the training data packet indicates the service type corresponding to the training data stream where the training data packet is located, that is, the type of service carried by the training data stream. For example, assuming that a data stream is used to transmit data generated in a voice call service, then when this data stream is used as a training data stream, the service type corresponding to each training data packet in the training data stream is a voice call service.

[0052] In the embodiment of the present application, in order to avoid overfitting, the user can also actively adjust the training time and / or training accuracy of the traffic generation model. Accordingly, the first device can receive the training time and / or training accuracy sent by the user, so as to train the traffic generation model according to the training time and / or training accuracy set by the user in subsequent steps.

[0053] S202: The first device trains the traffic generation model according to the interval time of the multiple training data packets and the characteristic information of the multiple training data packets to obtain a model parameter set of the traffic generation model.

[0054] After obtaining the interval time and characteristic information of multiple training data packets, the first device can learn the traffic characteristics of the network system according to the interval time and characteristic information of the training data packets, thereby determining the model parameter set of the traffic generation model by training the traffic generation model. The input of the traffic generation model is the characteristic information of the sample data packets and the required information of the interval time, and the output is the sample data stream including multiple sample data packets. The model parameter set of the traffic generation model is the parameters required by the traffic generation model to generate the sample data stream. For information on how to use the traffic generation model, please refer to Figure 3 The description of the illustrated embodiment will not be repeated here.

[0055] In an embodiment of the present application, traffic characteristics may include any one or more of traffic correlation, traffic burstiness, and traffic self-similarity. Traffic correlation refers to the dependency between the interval time and feature information of a training data packet at a certain moment and the interval time and feature information of a training data packet at other moments during the process of a network device receiving a training data packet. Traffic burstiness refers to the characteristic of a network system experiencing a traffic burst. Traffic burst refers to the phenomenon that the arrival amount of training data packets at certain moments is particularly large or particularly small relative to the average arrival amount of data packets of the entire network system. Traffic self-similarity refers to the consistency between the local structure and the overall structure of a network system, that is, a certain degree of consistency is achieved compared to the similarity relationship between a certain part of a network device and the entire network system. A self-similar process is a random process with scale invariance in a statistical sense. Based on the interval time and feature information of the training data stream, the traffic generation model can learn the traffic characteristics of the training data stream, thereby generating a sample data stream that can simulate the traffic characteristics of the training data stream.

[0056] Before training to obtain the model parameter set, the first device may first determine the type of the traffic generation model to be trained and determine the algorithm used when training the traffic generation model. These two steps are introduced below.

[0057] First, a method for a first device to determine the type of a traffic generation model is introduced.

[0058] According to the above introduction, the characteristic information of the training data packet may include the packet length of the training data packet and / or the service type corresponding to the training data packet. Optionally, the type of the traffic generation model may include a Marked Markov Arrival Processes (MMAP) model and a Batch Markov Arrival Process (BMAP) model. Among them, the MMAP model has a better fitting effect on the service type of the data packet, while the BMAP model has a better fitting effect on the size of the data packet. Then, when the characteristic information of the training data packet includes the packet length of the training data packet, the first device can select the BMAP model as the type of the traffic generation model. Accordingly, when training the traffic generation model, the BMAP model can be trained according to the arrival time of the training data packet and the packet length of the training data packet, so as to determine the model parameter set of the BMAP model. As a traffic generation model; and when the characteristic information of the training data packet includes the service type corresponding to the training data packet, the first device can select the MMAP model as the type of the traffic generation model. Accordingly, when training the traffic generation model, the BMAP model can be trained according to the arrival time of the training data packet and the packet length of the training data packet, so as to determine the model parameter set of the BMAP model. In an embodiment of the present application, after determining the type of the traffic generation model, the first device may also determine the order of the traffic generation model to be fitted based on the arrival time of the training data packet and the characteristic information of the training data packet. Specifically, after determining the type of the traffic generation model, the first device may use the arrival time and characteristic information of some training data packets in the aforementioned multiple training data packets to train traffic generation models of different orders, thereby obtaining a set of model parameters for traffic generation models of multiple orders. Next, the first device may compare the fitting accuracy and efficiency of each traffic generation model, and select the traffic generation model with the highest fitting accuracy and efficiency from these traffic generation models, thereby determining the order of the traffic generation model to be trained. In an embodiment of the present application, the order of the traffic generation model corresponds to the parameter N in the formula provided later, which is the number of model states of the traffic generation model.

[0059] For example. Assume that the type of traffic generation model is a BMAP model. The first device can first create multiple BMAP models of different orders, and select some training data packets from the aforementioned multiple training data packets, for example, one tenth of the training data packets can be selected from all the training data packets. Then, the first device can train each BMAP model of the multiple BMAP models of different orders according to the interval time and feature information of these selected sample data packets, thereby obtaining multiple trained BMAP models and a corresponding model parameter set for each BMAP model. After obtaining multiple BMAP models of different orders, the first device can select a BMAP model from these BMAP models, and use the order of the BMAP model as the order of the traffic generation model to be trained. Specifically, the first device can select the order of the BAMP model with the highest accuracy as the order of the traffic generation model. For example, the first device can select the BMAP model with the highest accuracy from multiple fitted BMAP models based on criteria such as the Akaike Information Criterion (AIC) or the Bayesian Information Criterion (BIC). By training the model with the interval time and characteristic information of some training data packets, the results obtained by training with the information of all training data packets can be simulated, so as to select a model with a suitable order as the traffic generation model. In this way, by simulating the characteristics of all data with partial data, the efficiency of training the traffic generation model is improved while ensuring that a suitable order can be found.

[0060] The following describes a method for the first device to determine a training algorithm.

[0061] In an embodiment of the present application, the first device can train the traffic generation model through a variety of different training algorithms. Different training algorithms may have different characteristics and are suitable for different situations. For example, some training algorithms may have the advantage of high training accuracy, but the training speed is relatively slow, so this training algorithm may be more suitable for training relatively stable data. Some training algorithms may have relatively low training accuracy, but the training speed is fast, so this training algorithm may be more suitable for training data with poor stability. Then, in order to select a suitable training algorithm to train the traffic generation model, the first device can select a suitable fitting algorithm according to the actual situation of the training data stream. In an embodiment of the present application, the first device can determine the fitting algorithm used by the traffic generation model according to the stability of the training data stream. Among them, the stability of the training data stream refers to the degree of stability of the time interval between two adjacent training data packets in the training data stream arriving at the network device.

[0062] Before determining the fitting algorithm, the first device may first determine a time interval sequence according to the interval time of the training data packets, where the time interval sequence includes the time interval of at least one training data packet arranged in sequence. Assuming that {T[n]} represents the time interval sequence, the time interval of the i-th training data packet may be represented as T[i], where i is a positive integer greater than or equal to 1.

[0063] After obtaining the time interval sequence, the first device can determine the stability of the aforementioned one or more training data streams according to the time interval sequence, and determine the algorithm of the training traffic generation model according to the stability of the training data stream. In this way, according to the stability of the training data stream, the first device can understand the transmission status of each data stream in the network system, so as to find an algorithm that meets the traffic characteristics of the entire network system. In this way, it can be ensured that the trained traffic generation model matches the working status of each network device in the network system, and can accurately and efficiently simulate the traffic characteristics of the network system.

[0064] In the embodiment of the present application, when determining the stationarity of the training data stream, the first device may determine the stationarity of the training data stream, for example, by means of an Augmented Dickey-Fuller (ADF) test, a coefficient of variation threshold judgment, etc. The smaller the difference between each time interval in the time interval sequence, the smaller the variation range of the time interval between any two adjacent training data packets in the training data stream, the more regular the arrival time of the training data packets in the training data stream, and the higher the stationarity of the training data stream.

[0065] Among them, the ADF test is a type of unit root test, which can determine the stationarity of a sequence by judging whether the sequence has a unit root. When determining the stationarity of a training data stream through the ADF test, the first device can determine whether the training data stream to which the training data packet belongs is stationary by judging whether the time interval sequence has a unit root.

[0066] After determining the stability of the training data stream, the first device can determine whether an accurate traffic generation model can be efficiently trained through these training data packets according to the stability of the training data stream. Specifically, the first device can determine whether the stability of the training data stream meets a first preset condition. The first preset condition indicates that the stability of the training data stream is strong.

[0067] If the first device determines that the stability of the training data stream meets the first preset condition, it means that the interval time and feature information of the training data packets are sufficient to train an accurate traffic generation model. Then the first device can further determine the algorithm used when training the traffic generation model based on the stability of the training data stream. If the stability of the training data stream does not meet the first preset condition, the first device can continue to determine whether the stability of the training data stream meets the second preset condition. The second preset condition indicates that the stability of the training data stream is poor. If the first device determines that the stability of the training data stream meets the second preset condition, it means that the interval time and feature information of the training data packets are insufficient to train an accurate traffic generation model, or it takes a long time to train a stable traffic generation model. Then the first device can first process multiple training data packets, and then train the traffic generation model through the interval time and feature information of the processed training data packets.

[0068] In an embodiment of the present application, the first preset condition may include that the stability of the training data stream is higher than a first threshold. The second preset condition may include that the stability of the training data stream is lower than a second threshold. Wherein, the first threshold is greater than the second threshold.

[0069] The two situations are introduced below.

[0070] In a first possible implementation, the smoothness of the training data stream satisfies the first preset condition, indicating that the arrival time of each data packet in the training data stream is relatively regular, the training data stream is relatively smooth, and the traffic characteristics of the training data stream are relatively obvious. Then the first device can determine the parameters used to generate the training traffic model based on the smoothness of the training data stream.

[0071] Specifically, when the stability of the training data stream is better, it is less difficult to determine the traffic characteristics of the network system based on the interval time and characteristic information of the training data packet. In this way, the first device can select an algorithm with higher training efficiency to train the traffic generation model. Then, even if the model accuracy obtained by training with the algorithm is not high, since the training data stream is relatively stable, the traffic generation model finally obtained can still better simulate the traffic characteristics of the network system. In this way, on the basis of ensuring the accuracy of the traffic generation model, the efficiency of training the traffic generation model is improved.

[0072] Accordingly, when the stability of the training data stream is poor and the aforementioned first preset condition is met, the first device can select a higher-precision algorithm to train the traffic generation model. In this way, since the interval time of each data packet in the training data stream is not stable, the difficulty of the first device to determine the model parameter set based on the training data packet and the characteristic information is relatively high. Then, in order to ensure the accuracy of the traffic generation model, the first device can give priority to the accuracy of the algorithm and select a suitable algorithm from the algorithms with higher accuracy to train the traffic generation model.

[0073] Optionally, the first device may determine whether the stability of the training data stream is greater than a third threshold. The third threshold is greater than the aforementioned first threshold. When the stability of the training data stream is greater than the third threshold, the first device may use an algorithm with higher training efficiency to train the traffic generation model; when the stability of the training data stream is less than the third threshold and greater than the aforementioned first threshold, the first device may use an algorithm with higher training accuracy to train the traffic generation model.

[0074] In an embodiment of the present application, the aforementioned algorithm with higher training accuracy may include, for example, an expectation maximization (EM) algorithm. The aforementioned algorithm with higher training efficiency may include, for example, an EM algorithm combined with moment matching (MM). Among them, the EM algorithm combined with MM combines the idea of ​​the EM algorithm on the basis of the MM algorithm, and can obtain a traffic generation model at a faster speed while ensuring the fitting accuracy. For a detailed description of the EM algorithm combined with MM, please refer to the following text, which will not be repeated here.

[0075] In the second possible implementation, the training data stream has poor stability, so even if an algorithm with high fitting accuracy such as the EM algorithm is used, it is still difficult for the first device to learn accurate traffic characteristics. In other words, when the training data stream has poor stability, it may be difficult for the first device to train the traffic generation model according to the arrival time of the training data packet and the characteristic information of the training data packet. In this case, the first device may first process the training data stream, and then train the traffic generation model according to the traffic characteristics of the processed training data stream.

[0076] Specifically, if the stability of the training data stream is poor, for example, the stability of the training data stream meets the second preset condition, the first device can extract the target data stream from the training data stream, the target data stream includes multiple target data packets, and the number of target data packets in the target data stream is less than the number of training data packets in the training data stream. That is, the first device extracts some training data packets from the training data stream, and uses these training data packets as target data packets to train the traffic generation model. The data stream composed of the training data packets is the target data stream.

[0077] When extracting a target data packet from a training data stream, the first device may select one or more training data packets with better stability from a plurality of training data packets included in the training data stream as the target data packet. For example, assuming that the entire training data stream includes 200 data packets. The difference in the time intervals between the arrival times of the first 100 training data packets is small, while the difference in the time intervals between the arrival times of the last 100 training data packets is large, then the first device may select the first 100 data packets from the 200 data packets as target data packets to form the target data stream. Of course, the first device may also select one or more training data packets that are closer to the current time as the target data packet from a plurality of training data packets.

[0078] In some possible implementations, the user can set the ratio of the target data stream in the training data packet. For example, assuming that the entire training data stream includes 200 training data packets and the ratio set by the user is 10%, the first device can select 20 training data packets from the 200 training data packets as target data packets.

[0079] After determining the target data stream, the first device may use the target data stream instead of the training data stream to train the traffic generation model, thereby obtaining a set of model parameters. Specifically, the first device may learn the traffic characteristics of the target data stream according to the interval time and characteristic information of each target data packet in the target data stream, thereby training the traffic generation model to obtain a set of model parameters. The method by which the first device trains the traffic generation model using the interval time and characteristic information of the target data packet may be the same as or similar to the method by which the first device trains the traffic generation model using the interval time and characteristic information of the training data packet, and will not be described in detail here.

[0080] After determining the algorithm used by the traffic generation model, the first device can train the selected traffic generation model according to the selected algorithm based on the interval time of the training data packets and the characteristic information of the training data packets, thereby determining each parameter in the traffic generation model and obtaining a model parameter set.

[0081] According to the foregoing introduction, the characteristic information of the training data packet may include the packet length of the training data packet and / or the service type of the training data packet. The following introduces the method for fitting the traffic generation model of the first device for three cases: the characteristic information of the training data packet includes the packet length of the training data packet, the characteristic information of the training data packet includes the service type of the training data packet, and the characteristic information of the training data packet includes the packet length and service type of the training data packet.

[0082] In a first possible implementation, the characteristic information of the training data packet includes the packet length of the training data packet. Then, before the training traffic generation model is generated, the first device may first determine the average packet length of the training data packet. Specifically, the first device may cluster the packet lengths of the training data packets according to the types of the training data packets to obtain the cluster centers. Then, the first device may determine the average packet length of the training data stream according to the cluster centers, and the average packet length represents the average length of each type of training data packet in the training data stream. After obtaining the average packet length of the training data stream, the first device may learn the traffic characteristics of the training data stream according to the average packet length of the training data stream and the arrival time of each training data packet, thereby determining the model parameter set through the training traffic generation model. In this way, before the training traffic generation model is generated, the average packet length of the training data stream is first determined, which is equivalent to standardizing each training data packet in the training data stream, so that the characteristic information of the data packet used in the training traffic generation model is consistent with the standard object form of the fitting algorithm. In this way, on the one hand, the efficiency of the training traffic generation model can be improved, and on the other hand, the accuracy of the model parameter set finally obtained can be improved.

[0083] In a second possible implementation, the characteristic information of the training data packet includes the service type of the training data packet, indicating the data generated by the service for which the training data packet is used to transmit. Then before the training traffic generation model is generated, the first device can first obtain the probability of the training data packet of each service type appearing in the training data stream. For example, assume that the training data stream includes 200 training data packets. Among them, the service type of 100 training data packets is service A, the service type of 60 training data packets is service B, and the service type of the remaining 40 training data packets is service C. Then the first device can determine that the probability of the training data packet with service type A appearing in the training data stream is 50%, the probability of the training data packet with service type B appearing in the training data stream is 30%, and the probability of the training data packet with service type C appearing in the training data stream is 20%.

[0084] After determining the probability of a training data packet of each service type appearing in the training data stream, the first device can learn the traffic characteristics of the training data stream based on the obtained probability and the arrival time of the training data packet, thereby training the traffic generation model to obtain a set of model parameters.

[0085] In a third possible implementation, the characteristic information of the training data packet includes both the packet length of the training data packet and the service type of the training data packet. Then the first device can use the method described above to respectively determine the average packet length of the training data stream and the probability of the training data packet of each service type appearing in the training data stream, thereby learning the traffic characteristics of the training data stream according to the average packet length of the training data stream, the probability of the training data packet of each service type appearing in the training data stream and the arrival time of the training data packet, thereby obtaining a model parameter set.

[0086] According to the above introduction, in order to avoid overfitting, the first device can receive the training time and / or training accuracy sent by the user. Then, when training the traffic generation model, the first device can train the traffic generation model according to the training time and / or training accuracy set by the user, thereby ensuring that the obtained traffic generation model can meet the user's needs.

[0087] After completing the training of the traffic generation model, the first device can record each parameter in the traffic generation model to obtain a set of model parameters. Then, the first device can generate and store a correspondence, which includes the correspondence between the interval time of the training data packets, the characteristic information of the training data packets, and the model parameters of the traffic generation model. In this way, after receiving the demand information input by the user, the device using the traffic generation model can search for the model parameter set corresponding to the demand information from the stored correspondence based on the interval time of the sample data packets and the characteristic information of the sample data packets included in the demand information, thereby determining the traffic generation model used to generate the sample data stream. For a description of this part, please refer to the following, which will not be repeated here.

[0088] The above describes the model establishment method provided by the embodiment of the present application, which is used to establish a traffic generation model. Accordingly, the embodiment of the present application also provides a sample data stream sending method, which can generate and send a sample data stream through a pre-established traffic generation model. The following is a detailed introduction.

[0089] It should be noted that the sample data stream sending method provided in the embodiment of the present application can be implemented by a device (i.e. Figure 2 In the embodiment shown, the method is executed by a "first device" or other devices. The following takes the method for sending a sample data stream executed by a first device as an example for description.

[0090] See also Figure 3 , which is a flow chart of a method for sending a sample data stream provided in an embodiment of the present application. The method for sending a sample data stream provided in an embodiment of the present application may include the following steps:

[0091] S301: The first device obtains demand information of multiple sample data packets.

[0092] Before generating a sample data stream, the first device may first obtain demand information of multiple sample data packets. The multiple sample data packets may come from the same sample data stream or from multiple different sample data streams. In other words, the first device may generate one sample data stream or multiple sample data streams. The sample data stream is the data stream that the technician needs to generate first, and can be used to simulate the traffic characteristics of the network system under a specific environment. Accordingly, the demand information of the sample data packets may represent the characteristics of each sample data packet in the sample data stream, that is, the technician's demand for each sample data packet in the sample data stream.

[0093] In an embodiment of the present application, the demand information of the sample data packet may include the interval time and characteristic information of the sample data packet. The interval time is the time interval between two adjacent sample data packets in the aforementioned multiple sample data packets being sent. For example, the interval time of the i-th sample data packet may be the time interval between the first device sending the i-1-th sample data packet and the first device sending the i-th sample data packet. i is a positive integer greater than or equal to 2.

[0094] The characteristic information of the sample data packet may include, for example, information such as the packet length of the sample data packet and the service type of the sample data packet, indicating other requirements of the technician for the sample data packet except the sending time.

[0095] In some possible implementations, the technician may not only have requirements for specific sample data packets in the sample data stream, but also have requirements for the entire sample data stream. Then, the first device may also obtain the requirement information of the sample data stream, and the requirement information of the sample data stream may include, for example, any one or more of the mixed ratio of sample data packets of multiple service types, the number of sample data packets, the rate of the sample data stream, and the output time of the sample data stream.

[0096] Among them, the mixed ratio of sample data packets of multiple business types represents the ratio of sample data packets of various business types in the sample data stream to all sample data packets in the sample data stream, for example, it can be the ratio of sample data packets of a certain business type in the sample data stream to all sample data packets. The number of sample data packets represents the number of all sample data packets in the sample data stream, indicating how many sample data packets the technician needs the first device to generate. The rate of the sample data stream is the rate at which the first device sends sample data packets, for example, it can be the number of sample data packets sent by the first device per unit time. The output time of the sample data stream represents the total time for the first device to send sample data packets. That is, the output time of the sample data stream is the time interval from the time when the first device sends the first sample data packet to the time when the first device sends the last sample data packet.

[0097] S302: The first device inputs demand information of multiple sample data packets into a traffic generation model to obtain a sample data flow matching the demand information.

[0098] After obtaining the demand information of the plurality of sample data packets, the first device may input the demand information of the plurality of sample data packets into the traffic generation model, thereby generating a sample data stream matching the demand information through the traffic generation model. The traffic generation model may be executed Figure 2 The traffic generation model obtained by the model building method provided in the illustrated embodiment.

[0099] According to the foregoing introduction, after establishing the traffic generation model, the first device can record the correspondence between the interval time of the sample data packet, the characteristic information of the sample data packet and the model parameter set, and store the correspondence. Accordingly, when the demand information of the sample data packet includes the interval time of the sample data packet and the characteristic information of the sample data packet, the first device can search for the model parameter set corresponding to the interval time and characteristic information of the sample data packet according to the stored correspondence, and establish a traffic generation model corresponding to the demand information of the sample data packet according to the found model parameter set, thereby generating a sample data stream matching the demand information through the traffic generation model. The number of sample data streams can be one or more.

[0100] According to the above introduction, when the characteristic information of the training data packet includes different contents, the type of the traffic generation model may be different. Then, when establishing the traffic generation model, the first device can first determine the type of the traffic generation model according to the content included in the characteristic information in the demand information of the sample data packet, and then determine the model parameter set that matches the demand information according to the corresponding relationship.

[0101] Specifically, Figure 2The examples in the corresponding embodiments are used for illustration. When the type of the traffic generation model includes a BMAP model or an MMAP model, the first device may first determine whether the characteristic information of the demand information of the sample data packet includes the packet length or service type of the sample data packet. If the characteristic information of the sample data packet includes the packet length of the sample data packet, the first device may determine that the traffic generation model is a model of the type "BMAP model"; if the characteristic information of the sample data packet includes the service type of the sample data packet, the first device may determine that the traffic generation model is a model of the type "MMAP model". After determining the type of the traffic generation model, the first device may construct a traffic generation model of this type according to a set of model parameters so as to generate a sample data packet that matches the demand information through the traffic generation model. The data stream composed of these sample data packets is the sample data stream.

[0102] When sending a sample data stream, the first device can determine the packet length and / or service type of each sample data packet based on the characteristic information of the sample data packet, and determine the time interval between the times when two sample data packets are sent based on the interval time of the sample data packets. Specifically, assuming that the characteristic information of the sample data packet includes the packet length of the sample data packet, and the packet length of the i-th sample data packet is b[i], the interval time between the i-1-th sample data packet and the i-th sample data packet is t[i], and the first device sends the i-1-th sample data packet at t=0, where i is a positive integer greater than 1. Then, the first device can generate a data packet of length b[i], for example, it can generate a random number sequence of length b[i], and send the data packet at t=t[i].

[0103] According to the above description, the demand information can be the demand information of sample data packets in multiple sample data streams. Then, when the sample data packet generated by the first device comes from multiple different sample data packets, the first device can also add the stream identifier of the sample data stream where the sample data packet is located in the sample data packet. The stream identifier is used to identify which sample data stream the sample data packet comes from.

[0104] After generating the sample data stream, the first device may send the generated sample data stream to a network device or other device in the network system. Figure 1 In the embodiment shown, when the device 140 is connected to the network device 131, the device 140 can send the sample data stream to the network device 131 through the connection between the device 140 and the network device 131, or send the sample data stream to the network device 132 through the connection between the device 140 and the network device 132. Optionally, when the device 140 is also connected to the terminal device 110 (the connection relationship between the two is shown in FIG. Figure 1(not shown), the device 140 may also send a sample data stream to the terminal device 110 through the connection between the device 140 and the terminal device 110, thereby sending the sample data stream to each network device in the network system through the terminal device 110.

[0105] In the embodiment of the present application, the aforementioned multiple sample data packets may belong to multiple different sample data streams. Then, when sending the sample data stream, the first device may send the sample data packets in the sample data stream to the destination device of the sample data stream.

[0106] In some possible implementations, the first device may also calculate statistical information of the sample data stream. Specifically, when sending the sample data stream, the first device may record the information of each sample data packet in the sample data stream, thereby calculating the statistical information of the sample data stream. In an embodiment of the present application, the statistical information of the sample data stream may include the expectation of each order moment of the sample data stream, i.e., the high power of the random variable, the probability density function (Probability Density Function, PDF), the probability distribution function (Cumulative Density Function, CDF), the logarithm of the complementary cumulative distribution function (logarithm Cumulative Density Function, logCCDF) and the flow rate. Among them, the flow rate is the total number of bytes of the data packets sent by the first device per unit time.

[0107] In the above possible implementations, each parameter in the traffic generation model is obtained by training based on the interval time and feature information of multiple training data packets. In some other implementations, each parameter in the traffic generation model can also be actively set by the user, that is, the first device establishes a traffic generation model based on the parameters input by the user, and sends a sample data stream through the traffic generation model. Of course, the first device can also generate a sample data stream based on pre-stored parameters, which will not be described here.

[0108] In an embodiment of the present application, the traffic generation model may be an MMAP model or a BMAP model, and the algorithm used to fit the traffic generation model may be an EM algorithm combined with MM or an EM algorithm. When establishing the traffic generation model, the traffic characteristics of the data flow in the network system may be learned based on the interval time of the training data packets in the training data stream and the data packet characteristic information, thereby training the traffic generation model to obtain a set of model parameters. Since both the arrival time of the training data packet and the data packet characteristic information of the training data packet are taken into account, the trained traffic generation model can accurately simulate the traffic characteristics of the data flow. When generating a sample data stream, by adopting a traffic generation model that matches the demand information of the sample data packet, the first device may be able to generate a sample data stream that meets the demand information, thereby accurately simulating the traffic characteristics of each data stream in the network system when the demand information is met.

[0109] In this way, since the characteristic information of the training data packet is used when establishing the traffic generation model, and the characteristic information of the sample data packet is also used when generating the sample data stream, compared with the existing technology, not only the arrival time of the data packet is taken into account, but also the characteristic information of the data packet itself is taken into account, and the traffic characteristics of each data stream in the network system can be more comprehensively learned and restored, so that the interval time and characteristic information of the sample data packet in the final generated sample data stream can match the interval time and characteristic information of the data packet in the data stream in the actual application scenario. In this way, by combining the interval time and characteristic information of the data packet to train the traffic generation model and generate the sample data stream, the final generated sample data stream can accurately simulate the traffic characteristics of the data stream in the actual application scenario, and the degree of matching with the demand information is higher.

[0110] According to the foregoing introduction, when establishing the traffic generation model, the first device can first determine the stability of the training data stream, and then use the EM algorithm or the EM algorithm combined with MM to fit the traffic generation model according to the stability of the training data stream. The EM algorithm combined with MM is introduced below.

[0111] In an embodiment of the present application, the model parameter set may include a first model parameter set and a second model parameter set. Accordingly, the EM algorithm combined with MM can be divided into two processes: determining the first model parameter set and determining the second model parameter set. Among them, the solution process of the first model parameter set is based on the EM algorithm, and the solution process of the second model parameter set is based on the idea of ​​the MM algorithm. In this way, combined with the ideas of the MM algorithm and the like, new constraints can be determined on the basis of the EM algorithm and the like, thereby improving the speed of solving the model parameter set and improving the efficiency of training the traffic generation model. In this way, compared with the traditional EM algorithm, the EM algorithm combined with MM can increase the training speed by 2-10 times.

[0112] The two processes are introduced below. First, the process of determining the first model parameter set is introduced.

[0113] When determining the first model parameter set, the first device may use the EM algorithm to obtain the first model parameter set according to the interval time of multiple training data packets. In an embodiment of the present application, the first model parameter set may include a D0 matrix and a π vector. The D0 matrix represents the state transition rate when no arrival time occurs, that is, the state transition rate when the data packet does not arrive at the network device. The π vector represents the state stable distribution of the system embedding process.

[0114] Specifically, the first device may first calculate the arrival time of each training data packet in the plurality of training data packets and initialize the model parameter set. Specifically, assuming that the interval time of the mth training data packet is t m , then the arrival time of the kth data packet can be expressed as Wherein, m and k are positive integers greater than or equal to 1. The first device may initialize a model parameter set. Optionally, the model parameter set includes a matrix sequence {D0, D1, D2, . . . D K} and vector π = (π0, π1, π2...π N ). Wherein, K is the number of types of training data packet sizes, for example, the number of types of packet lengths of training data packets; N is the order of the traffic generation model, that is, the number of model states, and also the order of the matrix in the matrix sequence. According to the previous introduction, N can be obtained by testing traffic generation models of different orders through some training data packets in multiple training data packets.

[0115] Next, the first device may execute the expectation (E) step in the EM algorithm to calculate the likelihood function and the conditional expectation of the likelihood function. Optionally, the first device may respectively calculate the likelihood function of the first k steps and the likelihood function of the last k steps of the training data packet, and calculate the conditional expectation of the number of state transitions in the kth time interval, the conditional expectation of the state stay time in the kth time interval, and the conditional expectation of the arrival time at the kth time point based on the likelihood function of the first k steps and the likelihood function of the last k steps. The kth time interval refers to the time interval from the arrival time of the k-1th training data packet to the arrival time of the kth training data packet.

[0116] After calculating the conditional expectation, the first device can perform the maximization (Maximization, M) step in the EM algorithm. The π vector, matrix D0 and matrix D1 obtained in the E step are optimized by solving a system of linear equations. Optionally, the first device can first inversely solve the values ​​of each element in matrix D0 and matrix D1 through conditional expectations in multiple time intervals, and then determine the π vector by solving a system of linear equations.

[0117] After calculating the values ​​of the π vector, matrix D0, and matrix D1, the first device can use the newly obtained values ​​of the π vector, matrix D0, and matrix D1 to return to step E for calculation, and repeat step E and step M until the values ​​of the π vector, matrix D0, and matrix D1 do not change. That is, when the first device executes step E of the EM algorithm for the first time, the values ​​of each element in the π vector, matrix D0, and matrix D1 can be a preset initial value, and in the subsequent step E of the EM algorithm, the values ​​of each element in the π vector, matrix D0, and matrix D1 can be the result obtained by the previous iterative operation.

[0118] Optionally, the first device may calculate the first k-step likelihood function and the last k-step likelihood function of the training data packet by the following formula:

[0119] f k (u) = π s exp(D0t1)D1…exp(D0t k )D1exp(D0u)

[0120] b k (u) = exp(D0u)exp(D0t k+1 )D1…exp(D0t K )D1e

[0121] Among them, f k (u) is the likelihood function of the first k steps of the training data packet, b k (u) is the likelihood function of the training data packet after k steps. s is the steady-state distribution probability of the system state s of the embedded process (at the time of data packet arrival) in the BMAP\MMAP statistical model, and u is the independent variable of the likelihood function, which can be any positive real number.

[0122] Optionally, the first device may calculate the conditional expectation of the likelihood function using the following formula.

[0123]

[0124]

[0125]

[0126] in, represents the number of phase transitions from state i to state j in the kth time interval, represents the time spent in state i during the th time interval; Indicates k At this moment, a phase transition from state i to state j occurs, accompanied by the arrival of a training data packet.i,j represents the element value of the i-th row and j-th column in the matrix D0; i,j Represents the element value in the i-th row and j-th column of matrix D1.

[0127] Optionally, the first device can calculate the values ​​of each element in D0 and matrix D1 respectively by the following formula:

[0128]

[0129]

[0130] Optionally, the first device may solve the following linear equations to obtain a π vector that satisfies the equations.

[0131]

[0132] Through continuous iterative operations, the first device can determine the π vector, the matrix D0 and the matrix D1, that is, the first model parameter set. After calculating the first model parameter set, the first device can determine the second model parameter set based on the first model parameter set, thereby obtaining a complete model parameter set.

[0133] The process of determining the second model parameter set is described below.

[0134] After calculating the π vector, the matrix D0 and the matrix D1, the first device can calculate the first statistical value, the first theoretical value, the second statistical value and the second theoretical value. Among them, the first theoretical value is a theoretical value expressing the hysteresis of the time interval of the multiple training data packets; the first statistical value is a statistical value expressing the hysteresis of the time interval of the multiple training data packets; the second theoretical value is a theoretical value expressing the hysteresis of the characteristic information of the multiple training data packets, and the second statistical value is a statistical value expressing the hysteresis of the characteristic information of the multiple training data packets. Among them, the first statistical value and the second statistical value can be calculated according to the interval time and characteristic information of the multiple training data packets by statistical formulas. The first theoretical value and the second theoretical value can be obtained according to the model parameter set. In an embodiment of the present application, the first statistical value and the second statistical value can be obtained by calculating the arrival time and characteristic information of the training data stream by statistical means.

[0135] Since the model parameter set includes the first model parameter set and the second model parameter set, and the first model parameter set has been determined by the EM algorithm, then the first device can minimize the difference between the theoretical value and the statistical value, solve the second model parameter set, and thus obtain the model parameter set. That is, the first device can calculate the difference between the first theoretical value and the first statistical value and the difference between the second theoretical value and the second statistical value, respectively, and find the second model parameter that minimizes the sum of the two differences to obtain the model parameter set. Optionally, when finding the second model parameter that minimizes the sum of the two differences, the first device can use the least squares method or other methods to solve, and the specific solution process is not described in detail in the embodiment of the present application.

[0136] According to the above introduction, the characteristic information of the training data packet may include the packet length of the training data packet and the service type of the training data packet. The following takes the case where the characteristic information of the training data packet includes the packet length of the training data packet as an example to describe the above process in detail. Assume that the packet length of the i-th training data packet is represented by b i It means that the first device can calculate the first theoretical value and the second theoretical value by the following formula.

[0137]

[0138]

[0139] Among them, ρ T (r) is the first theoretical value; ρ B (r) is the second theoretical value; r is the order of the hysteresis coefficient, which can be 1, 2 or 3 in the embodiment of the present application; D -1 =D0+D1···D K-1 .

[0140] Optionally, the first device may determine the constraint conditions for solving the second model parameter set as follows:

[0141]

[0142] Among them, β1 is the first-order moment of the packet length of the training data packet, and β2 is the second-order moment of the packet length of the training data packet.

[0143] Optionally, after determining the constraint condition, the first device may determine a second model parameter set that meets the condition by using the following formula, thereby obtaining a model parameter set.

[0144]

[0145] in, represents the first statistical value, Represents the second statistical value.

[0146] See also Figure 4 The present application also provides a model building device 400, which can implement Figure 2 The model building device 400 includes an acquisition unit 401 and a training unit 403. The acquisition unit 401 is used to implement Figure 2 In S201 of the embodiment shown, the training unit 402 is used to implement Figure 2 S202 in the illustrated embodiment.

[0147] Specifically, the acquisition unit 401 is used to acquire the interval time and data packet feature information of each training data packet included in the training data stream.

[0148] The training unit 402 is used to train the traffic generation model according to the interval time of the multiple training data packets and the characteristic information of the multiple training data packets to obtain a model parameter set of the traffic generation model.

[0149] For the specific implementation process, please refer to the above Figure 2 The detailed description of the corresponding steps in the illustrated embodiment will not be repeated here one by one.

[0150] It should be noted that the division of units in the embodiments of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. The functional units in the embodiments of the present application may be integrated into a processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. For example, in the above embodiments, the acquisition unit and the processing unit may be the same unit or different units. The above integrated units may be implemented in the form of hardware or in the form of software functional units.

[0151] See also Figure 5 The present application also provides a sample data stream sending device 500, which can implement Figure 3 The sample data stream sending device 500 includes an acquisition unit 501 and a generation unit 503. The acquisition unit 501 is used to implement Figure 3 In S301 of the embodiment shown, the generating unit 502 is used to implement Figure 3 S302 in the illustrated embodiment.

[0152] Specifically, the acquisition unit 501 is used to obtain demand information of multiple sample data packets, where the multiple sample data packets belong to one or more sample data streams. The demand information includes characteristic information of the sample data packets and an interval time of the sample data packets, where the interval time is the interval time between outputting the sample data packets.

[0153] The training unit 502 is used to input the demand information into the traffic generation model to obtain the multiple sample data packets matching the demand information, and the traffic generation model reflects the correlation between the interval time of the sample data packets and the characteristic information of the sample data packets.

[0154] For the specific implementation process, please refer to the above Figure 3 The detailed description of the corresponding steps in the illustrated embodiment will not be repeated here one by one.

[0155] It should be noted that the division of units in the embodiments of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. The functional units in the embodiments of the present application may be integrated into a processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. For example, in the above embodiments, the acquisition unit and the processing unit may be the same unit or different units. The above integrated units may be implemented in the form of hardware or in the form of software functional units.

[0156] In some possible implementations, Figure 4 Therefore, in the embodiment, the model building device 400 may be included in Figure 5 In the sample data stream sending device 500 in the illustrated embodiment, in addition to the acquisition unit 501 and the training unit 502 , the sample data stream sending device 500 may also include a model building device 400 .

[0157] Model building methods or sample data stream generation Figure 6 600 is a schematic diagram of a structure of a device 600 provided in an embodiment of the present application. The model building device 400 or the sample data stream generating device 500 described above can be Figure 6 See the device shown in Figure 6 The device 600 includes at least one processor 601 , a communication bus 602 , and at least one network interface 604 . Optionally, the device 600 may also include a memory 603 .

[0158] The processor 601 may be a general-purpose central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits (ICs) for controlling the execution of the program of the present application. The processor may be used to process the configuration file to implement the model building method or the sample data stream generation method provided in the embodiments of the present application.

[0159] For example, when Figure 2 The first device in Figure 6 When implemented by the device shown in the figure, the processor can be used to obtain the interval time of each training data packet included in the training data stream; train the traffic generation model according to the interval time of multiple training data packets and the characteristic information of multiple training data packets to obtain a model parameter set of the traffic generation model. Figure 3 The first device in Figure 6 When implemented by the device shown, the processor can be used to obtain demand information of multiple sample data packets, where the multiple sample data packets belong to one or more sample data streams, and the demand information includes characteristic information of the sample data packets and an interval time of the sample data packets, where the interval time is the interval time between outputting the sample data packets; input the demand information into a traffic generation model to obtain the multiple sample data packets matching the demand information, and the traffic generation model reflects the correlation between the interval time of the sample data packets and the characteristic information of the sample data packets.

[0160] The communication bus 602 is used to transmit information between the processor 601 , the network interface 604 , and the memory 603 .

[0161] The memory 603 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions. The memory 603 may also be a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions. It may also be a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 603 may exist independently and be connected to the processor 601 via the communication bus 602. The memory 603 may also be integrated with the processor 601.

[0162] Optionally, the memory 603 is used to store program codes or instructions for executing the solution of the present application, and the execution is controlled by the processor 601. The processor 601 is used to execute the program codes or instructions stored in the memory 603. The program code may include one or more software modules. Optionally, the processor 601 may also store program codes or instructions for executing the solution of the present application, in which case the processor 601 does not need to read the program codes or instructions from the memory 603.

[0163] The network interface 604 may be a device such as a transceiver, used to communicate with other devices or communication networks, and the communication network may be Ethernet, a radio access network (RAN), or a wireless local area network (WLAN), etc. In an embodiment of the present application, the network interface 604 may be used to receive messages sent by other nodes in the segment routing network, and may also send messages to other nodes in the segment routing network. The network interface 604 may be an Ethernet interface, a fast Ethernet (FE) interface, or a gigabit Ethernet (GE) interface, etc.

[0164] In a specific implementation, as an embodiment, the device 600 may include multiple processors, such as Figure 6 601 and processor 406 shown in FIG. Each of these processors may be a single-CPU processor or a multi-CPU processor. A processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).

[0165] Figure 7 It is a structural diagram of a device 700 provided in an embodiment of the present application. Figure 2 or Figure 3 The first device in Figure 7 See the device shown in Figure 7In the schematic diagram of the device structure shown in FIG. 7 , the device 700 includes a main control board and one or more interface boards. The main control board is connected to the interface board in communication. The main control board is also called a main processing unit (MPU) or a route processing card. The main control board includes a CPU and a memory. The main control board is responsible for controlling and managing each component in the device 700, including routing calculation, device management and maintenance functions. The interface board is also called a line processing unit (LPU) or a line card, which is used to receive and send messages. In some embodiments, the main control board and the interface board or the interface board and the interface board communicate through a bus. In some embodiments, the interface boards communicate through a switching fabric board. In this case, the device 700 also includes a switching fabric board, which is connected to the main control board and the interface board in communication. The switching fabric board is used to forward data between the interface boards. The switching fabric board can also be called a switch fabric unit (SFU). The interface board includes a CPU, a memory, a forwarding engine and an interface card (IC), wherein the interface card may include one or more network interfaces. The network interface may be an Ethernet interface, a FE interface or a GE interface, etc. The CPU is connected to the memory, the forwarding engine and the interface card in communication with each other. The memory is used to store the forwarding table. The forwarding engine is used to forward the received message based on the forwarding table stored in the memory. If the destination address of the received message is the IP address of the device 700, the message is sent to the CPU of the main control board or the interface board for processing; if the destination address of the received message is not the IP address of the device 700, the forwarding table is checked according to the destination. If the next hop and the outgoing interface corresponding to the destination address are found in the forwarding table, the message is forwarded to the outgoing interface corresponding to the destination address. The forwarding engine can be a network processor (NP). The interface card is also called a daughter card, which can be installed on the interface board and is responsible for converting the photoelectric signal into a data frame, and forwarding the data frame to the forwarding engine for processing or the interface board CPU after checking the legitimacy. In some embodiments, the CPU can also perform the functions of the forwarding engine, such as realizing soft forwarding based on a general-purpose CPU, so that the forwarding engine is not required in the interface board. In some embodiments, the forwarding engine can be implemented by an ASIC or a field programmable gate array (FPGA). In some embodiments, the memory storing the forwarding table can also be integrated into the forwarding engine as a part of the forwarding engine.

[0166] The embodiment of the present application also provides a chip system, comprising: a processor, the processor is coupled to a memory, the memory is used to store programs or instructions, when the program or instruction is executed by the processor, the chip system realizes the above Figure 2 or Figure 3 The method of the first device in the illustrated embodiment.

[0167] Optionally, the processor in the chip system may be one or more. The processor may be implemented by hardware or by software. When implemented by hardware, the processor may be a logic circuit, an integrated circuit, etc. When implemented by software, the processor may be a general-purpose processor implemented by reading the software code stored in the memory. Optionally, the memory in the chip system may also be one or more. The memory may be integrated with the processor or may be separately provided from the processor, which is not limited in the present application. Exemplarily, the memory may be a non-transient processor, such as a read-only memory ROM, which may be integrated with the processor on the same chip or may be provided on different chips respectively. The present application does not specifically limit the type of memory and the manner in which the memory and the processor are provided.

[0168] Exemplarily, the chip system can be an FPGA, an ASIC, a system on chip (SoC), a CPU, an NP, a digital signal processor (DSP), a microcontroller unit (MCU), a programmable logic device (PLD), or other integrated chips.

[0169] It should be understood that each step in the above method embodiment can be completed by an integrated logic circuit of hardware in a processor or by instructions in the form of software. The method steps disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware processor, or by a combination of hardware and software modules in a processor.

[0170] An embodiment of the present application also provides a computer-readable storage medium, including instructions, which, when executed on a computer, enables the computer to execute the model building method or sample data stream generating method provided by the above method embodiment and executed by the first device.

[0171] An embodiment of the present application also provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the model building method or sample data stream generating method provided in the above method embodiment and executed by the first device.

[0172] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0173] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0174] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical module division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0175] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be obtained according to actual needs to achieve the purpose of the solution of this embodiment.

[0176] In addition, each module unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software module unit.

[0177] If the integrated unit is implemented in the form of a software module unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or 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 to enable 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 application. 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 code.

[0178] Those skilled in the art will appreciate that in one or more of the above examples, the functions described in the present invention may be implemented in hardware, software, firmware, or any combination thereof. When implemented using software, the functions may be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any media that facilitates the transmission of a computer program from one place to another. The storage medium may be any available medium that a general or special-purpose computer can access.

[0179] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above descriptions are only specific implementation methods of the present invention.

[0180] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application 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 cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for sending a sample data stream, characterized in that: The method comprises: The first device obtains demand information of a plurality of sample data packets, where the plurality of sample data packets belong to one or more sample data streams, the demand information includes characteristic information of the sample data packets and an interval time of the sample data packets, the characteristic information includes a packet length of the sample data packets and / or a service type of the sample data packets, and the interval time is an interval time between outputting the sample data packets; The first device inputs the demand information into a traffic generation model to obtain the multiple sample data packets matching the demand information, and the traffic generation model reflects the correlation between the interval time of the sample data packets and the characteristic information of the sample data packets.

2. The method according to claim 1, characterized in that The method further comprises: The first device obtains intervals of a plurality of training data packets and characteristic information of the plurality of training data packets, the plurality of training data packets belong to one or more training data streams, the intervals of the plurality of training data packets are determined according to arrival times of the plurality of training data packets, and the characteristic information of the training data packets is the same as the characteristic information of the sample data packets; The first device trains the traffic generation model according to the interval time of the multiple training data packets and the characteristic information of the multiple training data packets to obtain a model parameter set of the traffic generation model; The first device inputs the demand information into a traffic generation model, and obtains the plurality of sample data packets matching the demand information, including: The first device inputs the demand information and the model parameter set into a traffic generation model, and uses the traffic generation model using the model parameter set to output the multiple sample data packets matching the demand information.

3. The method according to claim 2, characterized in that The characteristic information includes packet length, and the traffic generation model includes a batch Markov arrival process BMAP model.

4. The method according to claim 2, characterized in that: The characteristic information includes the service type, and the traffic generation model includes a marked Markov arrival process (MMAP) model.

5. The method according to any one of claims 2 to 4, characterized in that: The model parameter set includes a first model parameter set and a second model parameter set; The first device training the traffic generation model according to the interval time of the multiple training data packets and the characteristic information of the multiple training data packets includes: The first device obtains the first model parameter set using an expected maximum (EM) algorithm according to intervals between the plurality of training data packets; The first device constructs a minimization function, the minimization function is used to minimize the first theoretical value and the first statistical value, and minimize the second theoretical value and the second statistical value; wherein the first theoretical value is a theoretical value expressing the hysteresis of the time interval of the multiple training data packets, the first statistical value is a statistical value expressing the hysteresis of the time interval of the multiple training data packets, the second theoretical value is a theoretical value expressing the hysteresis of the characteristic information of the multiple training data packets, the second statistical value is a statistical value expressing the hysteresis of the characteristic information of the multiple training data packets, and the first theoretical value and the second theoretical value are obtained according to the first model parameter set; The first device solves the minimization function according to the constraint conditions to obtain the second model parameter set.

6. The method according to claim 5, characterized in that The first model parameter set includes a D0 matrix, and the second model parameter set includes a D1 matrix to a Dk matrix, where k is an integer greater than or equal to 1. The D0 matrix represents the state transition rate when no arrival event occurs, and the Dk matrix represents the state transition rate when the kth type of arrival event occurs.

7. The method according to claim 5, characterized in that The first device constructs a minimization function including: The first device determines the stability of the training data stream according to the interval time of the plurality of training data packets; In response to the stationarity of the training data stream satisfying a first preset condition, the first device constructs a minimization function.

8. The method according to any one of claims 2 to 4, characterized in that: The first device training the traffic generation model according to the interval time of the multiple training data packets and the characteristic information of the multiple training data packets includes: The first device determines the stationarity of the training data stream according to the interval time of the plurality of training data packets; In response to the stationarity of the training data stream satisfying a second preset condition, the first device extracts a target data stream from the training data stream, the length of the target data stream being smaller than the length of the training data stream, and the target data stream comprising a plurality of target data packets; The first device trains the traffic generation model according to the interval time of the multiple target data packets and the characteristic information of the multiple target data packets.

9. The method according to any one of claims 2 to 4, characterized in that: The first device acquiring the characteristic information of the plurality of training data packets includes: The first device obtains a packet length of each training data packet in the multiple training data packets; The first device clusters the packet lengths of the plurality of training data packets to obtain a cluster center of each type of packet length; The first device determines the cluster center of the category to which the packet length of each training data packet belongs as the feature information of the training data packet.

10. A sample data stream sending device, characterized in that: The device comprises: an acquisition unit, configured to acquire demand information of a plurality of sample data packets, the plurality of sample data packets belonging to one or more sample data streams, the demand information including characteristic information of the sample data packets and an interval time of the sample data packets, the characteristic information including a packet length of the sample data packets and / or a service type of the sample data packets, and the interval time being an interval time between outputting the sample data packets; The generating unit is used to input the demand information into a traffic generating model to obtain the multiple sample data packets matching the demand information, wherein the traffic generating model reflects the correlation between the interval time of the sample data packets and the characteristic information of the sample data packets.

11. The device according to claim 10, characterized in that The device also includes a training unit; The acquisition unit is further used to acquire the interval time of multiple training data packets and the characteristic information of the multiple training data packets, the multiple training data packets belong to one or more training data streams, the interval time of the multiple training data packets is determined according to the arrival time of the multiple training data packets, and the characteristic information of the training data packets is the same as the characteristic information of the sample data packets; The training unit is used to train the traffic generation model according to the interval time of the multiple training data packets and the characteristic information of the multiple training data packets to obtain a model parameter set of the traffic generation model; The generating unit is used to input the demand information and the model parameter set into the traffic generation model, and output the multiple sample data packets matching the demand information using the traffic generation model using the model parameter set.

12. The device according to claim 11, characterized in that The characteristic information includes packet length, and the traffic generation model includes a batch Markov arrival process BMAP model.

13. The device according to claim 11, characterized in that The characteristic information includes the service type, and the traffic generation model includes a marked Markov arrival process (MMAP) model.

14. The device according to any one of claims 11 to 13, characterized in that: The model parameter set includes a first model parameter set and a second model parameter set; The training unit is used to obtain the first model parameter set using the expected maximum EM algorithm according to the interval time of the multiple training data packets; construct a minimization function, the minimization function is used to minimize the first theoretical value and the first statistical value, and minimize the second theoretical value and the second statistical value; wherein the first theoretical value is a theoretical value expressing the hysteresis of the time interval of the multiple training data packets, the first statistical value is a statistical value expressing the hysteresis of the time interval of the multiple training data packets, the second theoretical value is a theoretical value expressing the hysteresis of the characteristic information of the multiple training data packets, the second statistical value is a statistical value expressing the hysteresis of the characteristic information of the multiple training data packets, and the first theoretical value and the second theoretical value are obtained according to the first model parameter set; the minimization function is solved according to the constraint conditions to obtain the second model parameter set.

15. The device according to claim 14, characterized in that The first model parameter set includes a D0 matrix, and the second model parameter set includes a D1 matrix to a Dk matrix, where k is an integer greater than or equal to 1. The D0 matrix represents the state transition rate when no arrival event occurs, and the Dk matrix represents the state transition rate when the kth type of arrival event occurs.

16. The device according to claim 14, characterized in that The training unit is used to determine the stationarity of the training data stream according to the interval time of the multiple training data packets; in response to the stationarity of the training data stream satisfying the first preset condition, construct a minimization function.

17. The device according to any one of claims 11 to 13, characterized in that: The training unit is used to determine the stationarity of the training data stream according to the interval time of the multiple training data packets; in response to the stationarity of the training data stream satisfying a second preset condition, extract a target data stream from the training data stream, the length of the target data stream is less than the length of the training data stream, and the target data stream includes multiple target data packets; The traffic generation model is trained according to the interval time of the multiple target data packets and the feature information of the multiple target data packets.

18. The device according to any one of claims 11 to 13, characterized in that: The acquisition unit is used to acquire the packet length of each training data packet in the multiple training data packets; cluster the packet lengths of the multiple training data packets to obtain the cluster center of each type of packet length; The cluster center of the category to which the packet length of each training data packet belongs is determined as the feature information of the training data packet.

19. A device, characterized in that The device includes a processor chip and a memory, the memory is used to store instructions or program codes, and the processor chip is used to call and run the instructions or program codes from the memory to execute the sample data stream sending method according to any one of claims 1-9.

20. A computer-readable storage medium, characterized in that: The method comprises instructions, programs or codes, which, when executed on a computer, enable the computer to execute the sample data stream sending method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Method and apparatus for network traffic simulation

    CN102204168A