A testing method, device and system

By analyzing the message structure and data characteristics to generate test messages that are close to the real network environment, and combining the performance comparison of message forwarding and DPI devices, the problem of difficult to accurately test the performance of DPI devices is solved, and a more accurate and detailed performance analysis is achieved. .

CN114268571BActive Publication Date: 2024-09-03SIEMENS AG
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111584682.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2017-02-15
Publication Date
2024-09-03
Estimated Expiration
2037-02-15

AI Technical Summary

Technical Problem

Existing deep packet inspection (DPI) device performance testing methods cannot accurately reflect the real network environment, affecting detection accuracy and data transmission performance.

Method used

By analyzing the structural characteristics of the message and the value characteristics of the data block, a test message is generated that approximates the real network environment, and the performance of the message forwarding device and the DPI device is compared to obtain the message transmission characteristics to evaluate the performance of the DPI device.

Benefits of technology

It improves the accuracy and objectivity of DPI device performance testing, can more truly reflect the transmission characteristics of DPI devices after processing packets, and provides more detailed performance analysis results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114268571B
    Figure CN114268571B
Patent Text Reader

Abstract

The present invention relates to a testing method, a device and a system, and also to the field of network technology, and in particular to a message generation method, a device and a system, comprising: obtaining a fourth group of messages (104) belonging to the first protocol; analyzing the message structure characteristics (106) of the protocol data unit PDU of the fourth group of messages (104) and the value characteristics (107) of the data blocks of the same length and located at the same position in the PDU of each message; generating a group of first protocol messages (1011) belonging to the first protocol, wherein the generated group of first protocol messages (1011) have the message structure characteristics (106), and the data in the group of first protocol messages (1011) have the value characteristics (107).
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This invention is a divisional application of the invention patent application with application number 201710081974.0, application date February 15, 2017, and invention name “A testing method, device and system”. Technical Field

[0002] The present invention relates to the field of network technology, and in particular to a testing method, equipment and system. Background Art

[0003] Deep packet inspection (DPI), also known as "full packet inspection and information extraction", is a computer network packet analysis and detection technology. Devices that use DPI technology (referred to as "DPI devices") can detect the data portion of a packet (data), and optionally, the header portion of the packet (header) to obtain packet-related information.

[0004] The obtained message-related information can be used for further in-depth message analysis or network behavior analysis, for example, to determine whether there are protocol inconsistencies, viruses, spam, etc., whether the message involves network intrusion, etc.

[0005] The performance of a DPI device will affect the accuracy of DPI detection and data transmission performance, etc. How to test the performance of a DPI device has become an urgent problem to be solved. Summary of the invention

[0006] In view of this, the present invention provides a testing method, device and system for testing the performance of a DPI device.

[0007] In a first aspect, a message generation method is provided. The method can be executed by a message generation device. In the method, the message generation device obtains a fourth group of messages belonging to the first protocol, analyzes the message structure characteristics of the protocol data unit PDU of the fourth group of messages and the value characteristics of the data blocks of the same length located at the same position in the PDU of each message; and generates a group of first protocol messages belonging to the first protocol, wherein the generated group of first protocol messages has the message structure characteristics, and the data in the group of first protocol messages has the value characteristics.

[0008] Since the message structure characteristics and data block value characteristics of the message can be effectively extracted, the generated test message can be closer to the acquired message, and a test message closer to the real network environment can be constructed, thereby ensuring that the performance test results of the DPI device are more accurate.

[0009] Optionally, after obtaining the fourth group of messages belonging to the first protocol, the message generating device also analyzes the first position relationship characteristics between messages of different message types in the fourth group of messages, and when generating the group of first protocol messages, it also generates the group of first protocol messages according to the first position relationship characteristics.

[0010] In this way, not only the internal PDU structure and value characteristics of the message are taken into consideration, but also the position characteristics between messages of different message types are taken into consideration, so that the position relationship between the messages in the generated fourth group of messages is closer to the actual network environment, further ensuring the accuracy of the performance test results of the DPI device.

[0011] One possible scenario is that the messages in the first group of messages belong to different protocols. In this case, the message generating device may optionally further obtain a fifth group of messages, wherein the fifth group of messages includes messages belonging to the first protocol and messages belonging to other protocols. The message generating device determines the second position relationship feature between the messages belonging to the first protocol and the messages belonging to the other protocols in the fifth group of messages, and generates messages belonging to the other protocols. Furthermore, after generating the group of first protocol messages and messages belonging to the other protocols, the message generating device places the group of first protocol messages and the generated messages belonging to the other protocols according to the second position relationship feature to generate the first group of messages.

[0012] For the situation where a group of messages to be generated belong to different protocols, the message generation device further obtains the positional relationship characteristics between messages of different protocols, and takes the positional relationship characteristics into consideration when generating messages. In this way, the positional relationship between messages of different protocols in a group of messages generated is closer to the actual network environment, further ensuring the accuracy of the performance test results of the DPI device.

[0013] Optionally, before generating the first group of messages, the message generating device sets protocol parameters of the first group of messages. The message generating device generates the first group of messages according to the protocol parameters.

[0014] In this way, protocol parameters can be flexibly configured according to test requirements, making the test more targeted.

[0015] In a second aspect, a test method is provided, which can be used to test the performance of a deep packet inspection (DPI) device. In the method, on the one hand, a packet forwarding device forwards a received first group of packets and outputs a second group of packets, wherein the packet forwarding device does not perform DPI detection on the first group of packets. A performance analysis device receives the second group of packets from the packet forwarding device and counts the packet transmission characteristics of the second group of packets. On the other hand, a DPI device processes the same first group of packets received and outputs a third group of packets, and the performance analysis device receives the third group of packets from the DPI device and counts the packet transmission characteristics of the third group of packets. The performance analysis device compares the packet transmission characteristics of the second group of packets with the packet transmission characteristics of the third group of packets to obtain the first performance of the DPI device.

[0016] Among them, the performance analysis device respectively obtains the message transmission characteristics when the message is directly forwarded, and the message transmission characteristics after the message is processed by the DPI device. By comparing the two message transmission characteristics, taking into account that DPI devices with different performances have different impacts on the message transmission characteristics after processing the message, and taking the message transmission characteristics of the message output after the message is directly forwarded as a reference, a test result that can more truly reflect the performance of the DPI device can be obtained.

[0017] Optionally, after receiving the third group of messages, the message forwarding device may also compare the first group of messages with the third group of messages to determine the second performance of the DPI device. For example, the number of messages included in the third group of messages may be counted, and the second performance of the DPI device may be determined based on the number of messages included in the third group of messages and the number of messages included in the first group of messages. Alternatively, the second performance of the DPI device may be further determined by comparing the first group of messages with the third group of messages to determine the integrity of the third group of messages, the correctness of the message content, and whether the message order of the third group of messages is disrupted compared with the original first group of messages.

[0018] In this way, the performance analysis device can obtain more complete and detailed test results of the DPI device performance.

[0019] Optionally, the first group of messages received by the message forwarding device and the DPI device are generated by adopting the first aspect, or any possible implementation manner of the first aspect.

[0020] In this way, it is ensured that the first group of messages used in the test is closer to the messages in the real network environment, and an effective performance analysis method is adopted, so that the performance of the DPI device obtained by the test is more accurate.

[0021] In a third aspect, a message generation device is provided, comprising: a message acquisition module, used to acquire a fourth group of messages belonging to the first protocol; a message generation module, used to: analyze the message structure characteristics of the protocol data unit PDU of the fourth group of messages and the value characteristics of data blocks of the same length located at the same position in the PDU of each message, and generate a group of first protocol messages belonging to the first protocol, wherein the generated group of first protocol messages has the message structure characteristics, and the data in the group of first protocol messages has the value characteristics.

[0022] Since the message structure characteristics and data block value characteristics of the message can be effectively extracted, the generated test message can be closer to the acquired message, and a test message closer to the real network environment can be constructed, thereby ensuring that the performance test results of the DPI device are more accurate.

[0023] Optionally, the message generation module is also used to analyze the first position relationship characteristics between messages of different message types in the fourth group of messages after the message acquisition module acquires the fourth group of messages belonging to the first protocol; when generating the group of first protocol messages, the message generation module is specifically used to: generate the group of first protocol messages according to the first position relationship characteristics.

[0024] In this way, not only the internal PDU structure and value characteristics of the message are taken into consideration, but also the position characteristics between messages of different message types are taken into consideration, so that the position relationship between the messages in the generated fourth group of messages is closer to the actual network environment, further ensuring the accuracy of the performance test results of the DPI device.

[0025] Optionally, the message acquisition module is also used to obtain a fifth group of messages when the messages in the first group of messages belong to different protocols, wherein the fifth group of messages includes messages belonging to the first protocol and messages belonging to other protocols; the message generation module is also used to: determine the second position relationship characteristics between the messages belonging to the first protocol and the messages belonging to the other protocols in the fifth group of messages, generate messages belonging to the other protocols, and after generating the group of first protocol messages and messages belonging to the other protocols, place the group of first protocol messages and the generated messages belonging to the other protocols according to the second position relationship characteristics to generate the first group of messages.

[0026] For the situation where a group of messages to be generated belong to different protocols, the message generation device further obtains the positional relationship characteristics between messages of different protocols, and takes the positional relationship characteristics into consideration when generating messages. In this way, the positional relationship between messages of different protocols in a group of messages generated is closer to the actual network environment, further ensuring the accuracy of the performance test results of the DPI device.

[0027] Optionally, the message generation module is further used to: before generating the first group of messages, set the protocol parameters of the first group of messages; when generating the first group of messages, the message generation module is specifically used to: generate the first group of messages according to the protocol parameters.

[0028] In this way, protocol parameters can be flexibly configured according to test requirements, making the test more targeted.

[0029] In a fourth aspect, a message generation device is provided, comprising: at least one memory for storing machine-readable instructions; and at least one processor for calling the machine-readable instructions to execute the message generation method provided in the first aspect or any possible implementation of the first aspect.

[0030] In a fifth aspect, a performance analysis device is provided, comprising: a message acquisition module, used to receive a second group of messages from a message forwarding device, the second group of messages is output by the message forwarding device after forwarding the first group of messages, and the message forwarding device does not perform DPI detection on the first group of messages; a performance statistics module, used to count the message transmission characteristics of the second group of messages; the message acquisition module is also used to receive a third group of messages from the DPI device, the third group of messages is output by the DPI device after processing the first group of messages; the performance statistics module is also used to count the message transmission characteristics of the third group of messages; the performance statistics module is also used to compare the message transmission characteristics of the second group of messages with the message transmission characteristics of the third group of messages to obtain the first performance of the DPI device.

[0031] Among them, the performance analysis device respectively obtains the message transmission characteristics when the message is directly forwarded, and the message transmission characteristics after the message is processed by the DPI device. By comparing the two message transmission characteristics, taking into account that DPI devices with different performances have different impacts on the message transmission characteristics after processing the message, and taking the message transmission characteristics of the message output after the message is directly forwarded as a reference, a test result that can more truly reflect the performance of the DPI device can be obtained.

[0032] Optionally, the performance statistics module is further used to compare the first group of messages and the third group of messages after the message acquisition module receives the third group of messages, so as to determine the second performance of the DPI device. For example, the number of messages included in the third group of messages can be counted; the second performance of the DPI device can be determined according to the number of messages included in the third group of messages and the number of messages included in the first group of messages. Alternatively, the second performance of the DPI device can be further determined by comparing the first group of messages with the third group of messages to determine the integrity of the third group of messages, the correctness of the message content, and whether the message order of the third group of messages is disrupted compared with the original first group of messages.

[0033] In this way, the performance analysis device can obtain more complete and detailed test results of the DPI device performance.

[0034] In a sixth aspect, a performance analysis device is provided, comprising: at least one memory for storing machine-readable instructions; and at least one processor for calling the machine-readable instructions to execute a method as provided in the second aspect or any possible implementation of the second aspect.

[0035] In the seventh aspect, a test system is provided, which is used to test the performance of a deep packet inspection (DPI) device. The system may include the packet generation device and the performance analysis device involved in any of the previous aspects. The packet generation device is used to generate a first group of packets, and send the generated first group of packets to a packet forwarding device and the DPI device respectively; the performance analysis device is used to respectively obtain the second group of packets output after the packet forwarding device forwards the first group of packets, and the third group of packets output after the DPI device processes the first group of packets; count the packet transmission characteristics of the second group of packets and the packet transmission characteristics of the third group of packets; compare the packet transmission characteristics of the second group of packets with the packet transmission characteristics of the third group of packets to obtain the first performance of the DPI device.

[0036] Among them, the performance analysis device respectively obtains the message transmission characteristics when the message is directly forwarded, and the message transmission characteristics after the message is processed by the DPI device. By comparing the two message transmission characteristics, taking into account that DPI devices with different performances have different impacts on the message transmission characteristics after processing the message, and taking the message transmission characteristics of the message output after the message is directly forwarded as a reference, a test result that can more truly reflect the performance of the DPI device can be obtained.

[0037] In an eighth aspect, a machine-readable medium is provided, on which machine-readable instructions are stored. When the machine-readable instructions are executed by a processor, the processor executes the method provided by the first aspect, the second aspect, any possible implementation of the first aspect, or any possible implementation of the second aspect.

[0038] In a ninth aspect, a machine-readable instruction is provided, which, when executed by a processor, causes the processor to execute the method provided by the first aspect, the second aspect, any possible implementation of the first aspect, or any possible implementation of the second aspect.

[0039] In combination with any of the preceding aspects or a possible implementation manner of any of the aspects, the message transmission characteristics include at least one of the following characteristics: message transmission rate; message transmission delay; message transmission jitter.

[0040] In combination with any of the foregoing aspects or a possible implementation of any of the aspects, wherein the messages in the first group of messages belong to different protocols, or the messages in the first group of messages belong to the same protocol. Among them, the protocols involved in the embodiments of the present invention may refer to protocols in the same protocol layer, and these protocol layers may be physical layer, data link layer, network layer, transport layer, session layer, presentation layer or application layer. Taking the case where the messages in the first group of messages belong to different protocols as an example, for example: for the transport layer, these different protocols may include Transmission Control Protocol (TCP), User Datagram Protocol (UDP), etc. For another example: for the application layer, these different protocols may include Hypertext Transfer Protocol (HTTP), File Transfer Protocol (FTP), etc.

[0041] In addition, the definition of the same protocol may also be different based on different message generation requirements. For example: the generated message is used to test the performance difference of the DPI device when processing FTP messages and HTTP messages. Then, when generating the message, the message generation device may only consider the differences in structure and field values ​​between FTP and HTTP messages, while ignoring different FTP protocol versions and different HTTP protocol versions. For another example: if the generated message is used to test the performance difference of the DPI device when processing messages of different FTP protocol versions, then when generating the message, the message generation device may deeply analyze the differences in structure and field values ​​between messages of different FTP protocol versions. At this time, different protocols may refer to different versions of the same type of protocol.

[0042] In combination with any of the previous aspects or a possible implementation of any of the aspects, wherein the message structure characteristics include at least one of the following characteristics: a structure with type, length, and value TLV; a structure with type and value TV; a data block has a fixed tail mark; a data block has a fixed value; the data block value belongs to one of a group of values; the data block has a fixed length; the data block has a boundary mark; and the structure is nested.

[0043] In combination with any of the previous aspects or a possible implementation of any of the aspects, wherein the value characteristics include at least one of the following characteristics: the PDUs of at least two messages in the fourth group of messages are located at the same position and have the same data block values ​​of the same length; the values ​​are within a value range but do not include visible characters; the values ​​are random; the values ​​are the same and the length exceeds a preset length threshold; at least one preset special character is contained; the values ​​increase in message order; the values ​​decrease in message order. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1A and Figure 1B The connection relationship between the test system provided by the embodiment of the present invention and other devices when testing the performance of the DPI device is shown;

[0045] Figure 2 A flow chart of a testing method provided by an embodiment of the present invention;

[0046] Figure 3 A schematic diagram of a testing process provided by an embodiment of the present invention;

[0047] Figure 4 A flowchart of a message generation method provided by an embodiment of the present invention;

[0048] Figure 5 A schematic diagram of a message generation process provided by an embodiment of the present invention;

[0049] Figure 6 A schematic diagram of the structure of a first performance analysis device provided by an embodiment of the present invention;

[0050] Figure 7 A schematic diagram of the structure of a second performance analysis device provided by an embodiment of the present invention;

[0051] Figure 8 A schematic diagram of the structure of a first message generating device provided in an embodiment of the present invention;

[0052] Fig. 9 A schematic diagram of the structure of a second performance analysis device provided in an embodiment of the present invention.

[0053] List of reference numerals:

[0054] 100: Test system 10: DPI equipment 20: Message forwarding equipment

[0055] 30: Message generation device 40: Performance analysis device

[0056] 201: Forward, no DPI detection 202: Perform DPI detection

[0057] 101: The first group of messages 102: The second group of messages 103: The third group of messages

[0058] 104: The fourth group of messages 105: The fifth group of messages

[0059] 106: Message structure characteristics 107: Value characteristics

[0060] 108: Second positional relationship feature 109: First positional relationship feature

[0061] 110: Protocol parameters 1011: A group of first protocol messages

[0062] S201: Acquire the fourth group of messages 104 belonging to the first protocol

[0063] S202: Analyze the message structure feature 106 and the data value feature 107, as well as the first position relationship feature 109 between messages of different message types

[0064] S203: Generate a group of first protocol messages 1011 of the first protocol that meets the characteristics

[0065] S204: Get the fifth group of messages 105

[0066] S205: Determine the second position relationship feature 108 between different protocol messages

[0067] S206: Generate messages belonging to other protocols

[0068] S207: placing different protocol messages according to the position relationship feature 108 to generate a first group of messages 101

[0069] S208: Send the first group of messages 101 to the message forwarding device 20

[0070] S209: Send the first group of messages 101 to the DPI device 10

[0071] S210: forward the first group of messages 101 and then output the second group of messages 102

[0072] S211: After processing the first group of messages 101, output a third group of messages 103

[0073] S212: Collecting statistics on the message transmission characteristics of the second group of messages 102

[0074] S213: Collecting statistics on the message transmission characteristics of the third group of messages 103

[0075] S214: Compare the message transmission characteristics of the second group of messages 102 with the message transmission characteristics of the third group of messages 103 to obtain the first performance of the DPI device 10

[0076] S215: Counting the number of messages included in the third group of messages 103

[0077] S216: Determine the second performance of the DPI device 10 according to the number of messages included in the third group of messages 103 and the number of messages included in the first group of messages 101.

[0078] S301: Baseline test

[0079] S302: Single protocol test

[0080] S303: Baseline test

[0081] S304: Mixed Protocol Test

[0082] A: Results of single protocol testing

[0083] B: Results of mixed protocol tests

[0084] S401: Obtain the fourth group of messages 104 belonging to the first protocol

[0085] S402: Analyze the message structure feature 106, the data value feature 107 and the first position relationship feature 109

[0086] S403: Generate a group of first protocol messages 1011 belonging to the first protocol

[0087] S404: Get the fifth group of messages 105

[0088] S405: Determine the second positional relationship feature 108

[0089] S406: Generate a message belonging to other protocols

[0090] S407: Generate a first group of messages 101 according to the second position relationship feature 108

[0091] 301: Message acquisition module 302: Message generation module

[0092] 303: Memory 304: Processor

[0093] 401: Message acquisition module 402: Performance statistics module

[0094] 403: Memory 404: Processor DETAILED DESCRIPTION

[0095] As mentioned above, the performance of a DPI device will affect the accuracy of DPI detection and data transmission performance, etc. The embodiment of the present invention mainly adopts the following two aspects of processing, so that the solution of the embodiment of the present invention can effectively test the performance of a DPI device.

[0096] First, provide a valid test message.

[0097] Get a group of messages, extract the message structure features and data value features of the PDU of the group of messages, and further, if the group of messages belongs to different protocols, the position relationship features between the messages of different protocols in the group of messages can also be extracted. Then generate a group of test messages according to these extracted features. Since the message features can be effectively extracted, the generated test messages can be closer to the acquired messages, and the test messages closer to the real network environment can be constructed, thereby ensuring that the performance test results of the DPI equipment are more accurate.

[0098] The second aspect is to adopt effective performance analysis methods.

[0099] The message transmission characteristics when the message is directly forwarded and the message transmission characteristics after the message is processed by the DPI device are obtained respectively. By comparing the two message transmission characteristics, a more meaningful DPI device performance test result is obtained.

[0100] Furthermore, the messages before and after being processed by the DPI device can be compared to further analyze the test results of the DPI device performance.

[0101] The test method, message generation method, message generation device, performance analysis device, and test system of the present invention are described in detail below with reference to the accompanying drawings.

[0102] Figure 1A and Figure 1B The figure shows the connection relationship between the test system 100 provided by the embodiment of the present invention and other devices when testing the performance of the DPI device.

[0103] On the one hand, the test system 100 generates a first group of messages 101, and outputs the first group of messages 101 to the message forwarding device 20 and the DPI device 10 respectively.

[0104] On the other hand, the test system 100 receives the third group of messages 103 output by the DPI device 10 after processing the first group of messages 101, and the second group of messages 102 output by the message forwarding device 20 after forwarding the first group of messages 101, and compares the message transmission characteristics of the second group of messages 102 with the message transmission characteristics of the third group of messages 103 to obtain the first performance of the DPI device 10. Furthermore, the number of messages included in the third group of messages 103 can be counted; according to the number of messages included in the third group of messages 103 and the number of messages included in the first group of messages 101, the second performance of the DPI device 10 is determined.

[0105] Figure 1A and Figure 1B The difference is:

[0106] Figure 1A In the figure, the DPI device 10 and the message forwarding device 20 are two unused devices. The first group of messages 101 are output to the DPI device 10 and the message forwarding device 20 respectively. The test system 100 obtains the second group of messages 102 from the message forwarding device 20 and the third group of messages 103 from the DPI device 10 respectively.

[0107] Figure 1B In the example, the DPI device 10 and the message forwarding device 20 are the same message processing device, and the DPI detection function of the message processing device can be enabled and disabled by setting a switch. If the DPI detection function is enabled, the message processing device is the DPI device 10, and if the DPI detection function is disabled, the message processing device is the message forwarding device 20.

[0108] The following two possible implementations are given as examples for setting the switch, but the actual implementation is not limited to these:

[0109] Method 1:

[0110] The switch is set manually by the tester.

[0111] Accordingly, when the switch is set to turn off the DPI detection function of the message processing device, the performance analysis device 40 receives the second group of messages 102, and when calculating the message transmission characteristics, the message transmission characteristics of the second group of messages 102 are calculated. When the switch is set to enable the DPI detection function of the message processing device, the performance analysis device 40 receives the third group of messages 103, and when calculating the message transmission characteristics, the message transmission characteristics of the third group of messages 103 are calculated.

[0112] Method 2:

[0113] The switch is set by the test system 100 .

[0114] The message generating device 30 in the test system 100 may send instruction information to the message processing device, where the instruction information is used to set the switch.

[0115] For example: before sending the first group of messages 101 for the first time, the message generation device 30 sends a first indication message to the message processing device, setting the switch to turn off the DPI detection function of the message processing device. After receiving the first indication message, the message processing device turns off its own DPI detection function. After completing the first sending of the first group of messages 101, the message generation device 30 sends a second indication message to the message processing device, setting the switch to enable the DPI detection function of the message processing device. After receiving the second indication message, the message processing device enables its own DPI detection function.

[0116] Accordingly, after sending the first indication information and before sending the first group of messages 101 for the first time, the message generation device 30 may notify the performance analysis device 40 that the DPI detection function of the message processing device has been turned off. The performance analysis device 40 can then determine that the second group of messages 102 are received subsequently, and the message transmission characteristics of the second group of messages 102 are counted. After completing the sending of the first group of messages 101 and before sending the second group of messages 102 for the second time, the message generation device 30 may notify the performance analysis device 40 that the DPI detection function of the message processing device has been enabled. The performance analysis device 40 can then determine that the third group of messages 103 are received subsequently, and the message transmission characteristics of the third group of messages 103 are counted.

[0117] like Figure 1A and Figure 1B As shown, the test system 100 may include: a message generating device 30 and a performance analyzing device 40.

[0118] The message generating device 30 is used to generate a first group of messages 101 and send the generated first group of messages 101 to the message forwarding device 20 and the DPI device 10 respectively.

[0119] The performance analysis device 40 is used for:

[0120] Acquire the second group of messages 102 output by the message forwarding device 20 after forwarding the first group of messages 101;

[0121] Obtain a third group of messages 103 output by the DPI device 10 after processing the first group of messages 101;

[0122] Statistics on the message transmission characteristics of the second group of messages 102

[0123] Collect statistics on the message transmission characteristics of the third group of messages 103;

[0124] The message transmission characteristic of the second group of messages 102 is compared with the message transmission characteristic of the third group of messages 103 to obtain the first performance of the DPI device 10 .

[0125] The aforementioned message transmission characteristics include at least one of the following characteristics: message transmission rate, message transmission delay, and message transmission jitter. By comparing the message transmission characteristics of the second group of messages 102 and the message transmission characteristics of the third group of messages 103, the message processing speed of the DPI device 10 during DPI detection can be measured. A group of messages is forwarded without DPI detection, and the message transmission characteristics of the output messages are used as a reference. The same group of messages is subjected to DPI detection, and the message transmission characteristics of the messages output after DPI detection are compared with the reference message transmission characteristics. The performance of the DPI device 10 obtained is more objective and accurate.

[0126] Optionally, the test system 100 provided by the embodiment of the present invention may be used to perform performance tests on at least two different DPI devices 10, and during the test, the same first group of messages 101 and the same message forwarding device 20 may be used. In this way, the performance test results of the at least two different DPI devices 10 are obtained under the same test environment and message input, and can be compared with each other.

[0127] Optionally, the performance of the DPI device 10 obtained by comparing the message transmission characteristics may be used as the first performance of the DPI device 10 .

[0128] Optionally, after the performance analysis device 40 receives the third group of messages 103, the number of messages included in the third group of messages 103 may be counted, and the second performance of the DPI device 10 may be determined based on the number of messages included in the third group of messages 103 and the number of messages included in the first group of messages 101. Since the performance analysis device 40 and the message generation device 30 belong to the same test system 100, the performance analysis device 40 may know in advance the number of messages included in the first group of messages 101 generated by the message generation device 30. Alternatively, since the message forwarding device 20 forwards the first group of messages 101 and does not perform DPI detection, the possibility of losing messages is small, and the performance analysis device 40 may also count the received second group of messages 102 as the number of messages included in the first group of messages 101.

[0129] The second performance can be used to measure the ability of the DPI device 10 to correctly identify a message. If the DPI device 10 cannot identify a message when performing DPI detection on the message, the DPI device 10 will not output the message, which will cause the loss of the message. The ability of the DPI device 10 to correctly identify the message can be measured by counting the number of messages included in the third group of messages 103.

[0130] For example: the number of messages included in the first group of messages 101 is N, where N is a positive integer; the number of messages included in the third group of messages 103 received by the performance analysis device 40 is M, where M is not greater than N and is a positive integer. Then M / N can be used to measure the ability of the DPI device 10 to correctly identify messages. The larger the M / N, the stronger the ability of the DPI device 10 to correctly identify messages, and the better the second performance; the smaller the M / N, the weaker the ability of the DPI device 10 to correctly identify messages, and the worse the second performance.

[0131] Among them, the messages in the first group of messages 101 may belong to different protocols, or the messages in the first group of messages 101 may belong to the same protocol. A type of protocol may have different protocol versions. Since the message structures and / or the values ​​of the fields in the messages of different protocol versions may be different, in the embodiment of the present invention, as described above, the same protocol may be defined differently according to different message generation requirements. For example, the same type of protocol is regarded as the same protocol, or different protocol versions of the same type of protocol are regarded as different protocols.

[0132] If the messages in the first group of messages 101 belong to the same protocol, the result of the test on the DPI device 10 can be used to measure the performance of the DPI device 10 when performing DPI detection on the messages of the same protocol.

[0133] If the messages in the first group of messages 101 belong to different protocols, the result of the test on the DPI device 10 can be used to measure the performance of the DPI device 10 when performing DPI detection on mixed messages of different protocols.

[0134] The message generation device 30 and the performance analysis device 40 included in the test system 100 may be located in the same device and implemented as different functional modules of the same device. The functional module may be implemented by software programming, by hardware, or by software running on hardware.

[0135] The test system 100 may be implemented by one or more local servers, or may be located in the cloud and provided as a service. The service may be called by a local client to implement performance testing of the DPI device 10 .

[0136] Figure 2 A flow chart of a testing method provided by an embodiment of the present invention. Figure 2 As shown, the method may include the following steps:

[0137] S201: The message generation device 30 obtains the fourth group of messages 104 belonging to the first protocol. Here, taking the application layer protocol as an example, the first protocol and other protocols involved in the fifth group of messages 105 described later may be Hyper Text Transfer Protocol (HTTP), File Transfer Protocol (FTP) or Domain Name System (DNS), etc.

[0138] The fourth group of messages 104 and the fifth group of messages 105 described later obtained by the message generation device 30 may be messages captured from a real network, so that the message structure features 106, data value features 107 and position relationship features 108 extracted can better reflect the situation of messages in a real network.

[0139] S202: The message generation device 30 analyzes the message structure feature 106 of the PDU of the fourth group of messages 104, the value feature 107 of the data of the same length at the same position in the PDU of each message, and the first position relationship feature 109 between messages of different message types.

[0140] The message structure feature 106 may include at least one of the features listed in Table 1. The feature may be used to describe the structure feature of a PDU, or may be used to describe the structure feature of a segment of data in a PDU. In the small table, the segment of data and the PDU are collectively referred to as a "data block".

[0141] Table 1. Message structure features 106

[0142]

[0143]

[0144] The value feature 107 may include at least one of the features listed in Table 2. The feature may be used to describe the value feature of a data block of the same length and located at the same position in the PDU of each message of the fourth group of messages 104 .

[0145] Table 2. Value characteristics 107

[0146]

[0147] Here, HTTP messages are taken as an example. Usually, the message types included in each HTTP message may be different. For example, an HTTP message includes a GET message, which can be used by a client to obtain a HyperText Markup Language (HTML) web page from a server; another HTTP message includes a POST message, which is used by a client to send information to a server. For example, a client receives an HTML web page from a server via a GET message, and the web page requires a user name and password to be entered. The client can send the user name and password entered by the user to the server via a POST message. Then the positions between different messages have certain characteristics. In an embodiment of the present invention, the message generation device 30 analyzes the first position relationship feature 109 between messages of different message types in the fourth group of messages 104, so that a message that conforms to the first position relationship 109 can be generated, and the generated message is closer to the actual network situation.

[0148] By extracting the above-mentioned message structure feature 106, value feature 107 and / or first position relationship feature 109, the message generation device 30 can generate a message having at least one of the above-mentioned features, and can effectively imitate the message in the real network.

[0149] When executing step S202, the message generating device 30 may first identify an Internet Protocol (IP) header of a message, then identify a Transmission Control Protocol (TCP) or User Datagram Protocol (UDP) header, and then identify the PDU, and identify the above-mentioned message structure feature 106, the data block value feature 107 and / or the above-mentioned first position relationship feature 109 of the PDU.

[0150] S203: The message generating device 30 generates a group of first protocol messages 1011 belonging to the first protocol, wherein the PDU of the generated group of first protocol messages 1011 has a message structure feature 106, and the data in the PDU of the group of first protocol messages 1011 has a value feature 107, and the messages have the above-mentioned first position relationship feature 109.

[0151] S204: The message generating device 30 obtains a fifth group of messages 105, wherein the fifth group of messages 105 includes messages belonging to the first protocol and messages belonging to other protocols.

[0152] Optionally, if the first group of messages 101 including different protocols is to be generated, the following steps S205 to S207 may also be performed.

[0153] S205: The message generating device 30 determines a second position relationship feature 108 between messages belonging to the first protocol and messages belonging to other protocols in the fifth group of messages 105, wherein the fifth group of messages 105 includes messages belonging to different protocols.

[0154] The position relationship feature 108 may include at least one of the following features shown in Table 3.

[0155] Table 3. Second position relationship feature 108

[0156]

[0157] S206: The message generation device 30 generates messages belonging to other protocols. Step S206 can be implemented similarly to the above steps S201 to S203.

[0158] S207 : The message generating device 30 places a group of first protocol messages 1011 and generated messages belonging to other protocols according to the second position relationship feature 108 to generate a first group of messages 101 .

[0159] Optionally, before generating the message in steps S203, S206 and S207, the protocol parameters 110 of the first group of messages 101 may be set, such as at least one of the protocol type, IP address, port number, message transmission rate and message length. For example, the IP address may be set; or the IP address and port number may be set.

[0160] S208 : The message generating device 30 sends the first group of messages 101 to the message forwarding device 20 .

[0161] S209 : The message generating device 30 sends the first group of messages 101 to the DPI device 10 .

[0162] Among them, if Figure 1A As shown, the message forwarding device 20 and the DPI device 10 are different devices, and the message generating device 30 can send the first group of messages 101 to the message forwarding device 20 and the DPI device 10 respectively.

[0163] If Figure 1B As shown, the message forwarding device 20 and the DPI device 10 are the same message processing device, and whether the DPI detection function is enabled is controlled by a switch. Then the message generating device 30 can use the aforementioned switch setting method 2 to control the switch and send the first group of messages 101.

[0164] S210 : the message forwarding device 20 forwards the first group of messages 101 and then outputs the second group of messages 102 .

[0165] S211: The DPI device 10 processes the first group of messages 101 and outputs a third group of messages 103.

[0166] S212 : the performance analysis device 40 receives the second group of messages 102 from the message generation device 30 , and collects statistics on message transmission characteristics of the second group of messages 102 .

[0167] S213 : the performance analysis device 40 receives the third group of messages 103 from the DPI device 10 , and collects statistics on message transmission characteristics of the third group of messages 103 .

[0168] S214 : The performance analysis device 40 compares the message transmission characteristics of the second group of messages 102 with the message transmission characteristics of the third group of messages 103 to obtain the first performance of the DPI device 10 .

[0169] Optionally, in addition to obtaining the first performance of the DPI device 10, which can be used to measure the message processing speed of the DPI device 10 when performing DPI detection, the performance analysis device 40 can also execute the following steps S215 to S216 to determine the DPI device 10, which can be used to measure the ability of the DPI device 10 to correctly identify messages.

[0170] S215 : The performance analysis device 40 counts the number of messages included in the third group of messages 103 .

[0171] S216 : The performance analysis device 40 determines the second performance of the DPI device 10 according to the number of packets included in the third group of packets 103 and the number of packets included in the first group of packets 101 .

[0172] Figure 3 A schematic diagram of a testing process provided by an embodiment of the present invention. Figure 3 The test process shown may consist of two parts:

[0173] Part 1: Single protocol test, the test obtains result A of the single protocol test.

[0174] Part 2: Mixed protocol test, the test obtains the result B of the mixed protocol test.

[0175] The first part of the test may include the following steps:

[0176] S301: Baseline test.

[0177] In step S301 , the test system 100 inputs the first group of messages 101 to the message forwarding device 20 , and the messages in the first group of messages 101 belong to the same protocol. The message forwarding device 20 forwards the first group of messages 101 and then outputs the second group of messages 102 . The test system 100 collects statistics on the message transmission characteristics of the second group of messages 102 .

[0178] S302: Single protocol test.

[0179] In step S302, the first group of messages 101 input by the test system 100 to the DPI device 10 are the same as the messages input to the message forwarding device 20 in step S301. The DPI device 10 processes the first group of messages 101 and outputs a third group of messages 103. The test system 100 collects statistics on the message transmission characteristics of the third group of messages 103.

[0180] The test system 100 obtains the result A of the single protocol test by comparing the message transmission characteristics of the second group of messages 102 obtained in step S301 with the message transmission characteristics of the third group of messages 103 obtained in step S302 .

[0181] The second part of the test may include the following steps:

[0182] S303: Baseline test.

[0183] In step S303 , the test system 100 inputs the first group of messages 101 to the message forwarding device 20 , the messages belong to different protocols, the message forwarding device 20 forwards the first group of messages 101 and then outputs the second group of messages 102 , and the test system 100 collects statistics on the message transmission characteristics of the second group of messages 102 .

[0184] S304: Mixed protocol test.

[0185] In step S304, the first group of messages 101 input by the test system 100 to the DPI device 10 are the same as the messages input to the message forwarding device 20 in step S303. The DPI device 10 processes the first group of messages 101 and outputs a third group of messages 103. The test system 100 collects statistics on the message transmission characteristics of the third group of messages 103.

[0186] The test system 100 obtains the result B of the single protocol test by comparing the message transmission characteristics of the second group of messages 102 obtained in step S303 and the message transmission characteristics of the third group of messages 103 obtained in step S304.

[0187] Furthermore, the test system 100 can combine the result A and the result B to compare the performance of the DPI device 10 in processing single-protocol messages and the performance of the DPI device 10 in processing mixed-protocol messages, and further analyze the reasons based on the difference between the two performances.

[0188] Figure 4 A flow chart of a message generation method provided by an embodiment of the present invention. Figure 4 As shown, the message generation method may include the following steps:

[0189] S401: Acquire a fourth group of messages 104 belonging to the first protocol.

[0190] S402: Analyze the message structure feature 106 of the PDU of the fourth group of messages 104, the value feature 107 of the data of the same length and located at the same position in the PDU of each message, and the first position relationship feature 109 between messages of different message types.

[0191] S403: Generate a group of first protocol messages 1011 belonging to the first protocol, wherein the PDU of the generated group of first protocol messages 1011 has a message structure feature 106, and data in the PDU of the group of first protocol messages 1011 has a value feature 107.

[0192] S404: Acquire a fifth group of messages 105, wherein the fifth group of messages 105 includes messages belonging to the first protocol and messages belonging to other protocols.

[0193] S405: Determine the position relationship feature 108 between the messages belonging to the first protocol and the messages belonging to other protocols in the fifth group of messages 105.

[0194] S406: Generate a message belonging to other protocols.

[0195] S407 : placing a group of first protocol messages 1011 and generated messages belonging to other protocols according to the position relationship feature 108 to generate a first group of messages 101 .

[0196] Optionally, before steps S403, S406 and S407, the protocol parameters 110 of the message to be generated may be set, such as at least one of the protocol type, IP address, port number, message transmission rate and message length. For example, the IP address may be set; another example, the IP address and port number may be set.

[0197] Figure 5 A schematic diagram of a message generation process provided by an embodiment of the present invention. Figure 5 As shown, sampled messages such as the fourth group of messages 104 and the fifth group of messages 105 are input into the message generating device 30, and the message generating device 30 analyzes and obtains the message structure characteristics 106 of the PDU of the sampled messages and the value characteristics 107 of the data in the PDU. Optionally, if the sampled messages include messages of different protocols, the message generating device 30 may also analyze and obtain the position relationship characteristics 108 between the messages of different protocols. Based on these characteristics, optionally, the protocol parameters 110 for generating the first group of messages 101 may also be configured, and finally the first group of messages 101 is generated.

[0198] Figure 6 FIG. 4 is a schematic diagram of the structure of the first performance analysis device 40 provided in an embodiment of the present invention. Figure 6 As shown, the performance analysis device 40 may include:

[0199] A message acquisition module 401, configured to receive a second group of messages 102 from a message forwarding device 20, where the second group of messages 102 are output after the message forwarding device 20 forwards the first group of messages 101, and the message forwarding device 20 does not perform DPI detection on the first group of messages 101;

[0200] A performance statistics module 402, used to count the message transmission characteristics of the second group of messages 102;

[0201] The message acquisition module 401 is further used to receive a third group of messages 103 from the DPI device 10, where the third group of messages 103 are output by the DPI device 10 after processing the first group of messages 101;

[0202] The performance statistics module 402 is also used to count the message transmission characteristics of the third group of messages 103;

[0203] The performance statistics module 402 is further configured to compare the message transmission characteristics of the second group of messages 102 with the message transmission characteristics of the third group of messages 103 to obtain the first performance of the DPI device 10 .

[0204] Optionally, the performance statistics module 402 is further configured to count the number of messages included in the third group of messages 103 after the message acquisition module 401 receives the third group of messages 103;

[0205] The second performance of the DPI device 10 is determined according to the number of messages included in the third group of messages 103 and the number of messages included in the first group of messages 101 .

[0206] For other optional implementations of the performance analysis device 40, reference may be made to the implementations of the performance analysis device 40 in the previous embodiments, which will not be described in detail here.

[0207] Figure 7 FIG. 4 is a schematic diagram of the structure of a second performance analysis device 40 provided in an embodiment of the present invention. Figure 7 As shown, the second performance analysis device 40 includes:

[0208] at least one memory 403 for storing machine-readable instructions;

[0209] At least one processor 404 is used to call machine-readable instructions to execute the testing method provided by the embodiment of the present invention.

[0210] Figure 7 The second performance analysis device 40 shown can be regarded as Figure 6A specific implementation of the first performance analysis device 40 is shown, wherein the message acquisition module 401 and the performance statistics module 402 can be program modules stored in the memory 403 as machine-readable instructions, and the processor 404 calls these program modules to implement the functions of these program modules.

[0211] Figure 8 FIG. 1 is a schematic diagram of the structure of a first message generating device 30 provided in an embodiment of the present invention. Figure 8 As shown, the first message generating device 30 may include:

[0212] A message acquisition module 301, used to acquire a fourth group of messages 104 belonging to the first protocol;

[0213] A message generation module 302, used for:

[0214] Analyze the message structure feature 106 of the protocol data unit PDU of the fourth group of messages 104 and the value feature 107 of the data block of the same length and located at the same position in the PDU of each message, and

[0215] A group of first protocol messages 1011 belonging to the first protocol is generated, wherein the generated group of first protocol messages 1011 has a message structure feature 106 , and data in the group of first protocol messages 1011 has a value feature 107 .

[0216] Optionally, the message generation module 302 is also used to analyze the first position relationship characteristics 109 between messages of different message types in the fourth group of messages 104 after the message acquisition module 301 acquires the fourth group of messages 104 belonging to the first protocol; when generating a group of first protocol messages 1011, the message generation module 302 is specifically used to: generate a group of first protocol messages 1011 according to the first position relationship characteristics 109.

[0217] Optionally, the message acquisition module 301 is further configured to acquire a fifth group of messages 105 when the messages in the first group of messages 101 belong to different protocols, wherein the fifth group of messages 105 includes messages belonging to the first protocol and messages belonging to other protocols;

[0218] The message generation module 302 is also used to: determine the second position relationship feature 108 between the messages belonging to the first protocol and the messages belonging to other protocols in the fifth group of messages 105, generate messages belonging to other protocols, and after generating a group of first protocol messages 1011 and messages belonging to other protocols, place a group of first protocol messages 1011 and the generated messages belonging to other protocols according to the second position relationship feature 108 to generate a first group of messages 101.

[0219] Optionally, the message generation module 302 is further used to: before generating the first group of messages 101, set the protocol parameters 110 of the first group of messages 101; when generating the first group of messages 101, the message generation module 302 is specifically used to: generate the first group of messages 101 according to the protocol parameters 109.

[0220] For other optional implementations of the message generating device 30, reference may be made to the implementations of the message generating device 30 in the previous embodiments, which will not be described in detail here.

[0221] Fig. 9 Schematic diagram of the structure of the second message generating device 30 provided in the embodiment of the present invention. Fig. 9 As shown, the second message generating device 30 may include:

[0222] at least one memory 303 for storing machine-readable instructions;

[0223] At least one processor 304 is used to call machine-readable instructions to execute the message generation method provided by the embodiment of the present invention.

[0224] Fig. 9 The second message generating device 30 shown can be regarded as Figure 8 A specific implementation of the first message generation device 30 is shown, wherein a message acquisition module 301 and a message generation module 302 can be program modules stored in a memory 303 as machine-readable instructions, and a processor 304 calls these program modules to implement the functions of these program modules.

[0225] An embodiment of the present invention further provides a machine-readable medium, on which machine-readable instructions are stored. When the machine-readable instructions are executed by a processor, the processor performs the message generation method and / or testing method provided by the embodiment of the present invention.

[0226] The embodiment of the present invention further provides a machine-readable instruction. When the machine-readable instruction is executed by a processor, the processor performs the message generation method and / or testing method provided by the embodiment of the present invention.

[0227] The machine-readable medium provided in the embodiment of the present invention stores machine-readable instructions, and when the machine-readable instructions are executed by the processor, the processor executes any of the aforementioned methods. Specifically, a system or device equipped with a machine-readable medium can be provided, on which a software program code for implementing the functions of any of the aforementioned embodiments is stored, and a computer or processor of the system or device reads and executes the machine-readable instructions stored in the machine-readable medium.

[0228] In this case, the program code itself read from the machine-readable medium can realize the function of any one of the above embodiments, and thus the machine-readable code and the machine-readable medium storing the machine-readable code constitute a part of the present invention.

[0229] Examples of machine-readable media include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), magnetic tapes, non-volatile memory cards, and ROMs. Alternatively, the program code may be downloaded from a server computer or a cloud via a communications network.

[0230] It should be noted that not all steps and modules in the above-mentioned processes and system structure diagrams are necessary, and some steps or modules can be ignored according to actual needs. The execution order of each step is not fixed and can be adjusted as needed. The system structure described in the above-mentioned embodiments can be a physical structure or a logical structure, that is, some modules may be implemented by the same physical entity, or some modules may be implemented by multiple physical entities, or some components in multiple independent devices may be implemented together.

[0231] In the above embodiments, the hardware unit can be realized by mechanical means or electrical means. For example, a hardware unit can include permanent dedicated circuits or logic (such as special processors, FPGA or ASIC) to complete the corresponding operation. The hardware unit can also include programmable logic or circuits (such as general-purpose processors or other programmable processors), which can be temporarily set by software to complete the corresponding operation. Concrete implementation (mechanical means or dedicated permanent circuits or temporarily set circuits) can be determined based on cost and time considerations.

[0232] The present invention is shown and described in detail above through the accompanying drawings and preferred embodiments. However, the present invention is not limited to these disclosed embodiments. Based on the above multiple embodiments, those skilled in the art can know that the code review methods in the above different embodiments can be combined to obtain more embodiments of the present invention, and these embodiments are also within the protection scope of the present invention.

Claims

1. A message generation method, characterized in that: include: Obtaining a fourth group of messages belonging to the first protocol (104); Analyzing the message structure characteristics (106) of the protocol data unit PDU of the fourth group of messages (104) and the value characteristics (107) of the data blocks of the same length and located at the same position in the PDU of each message; A group of first protocol messages (1011) belonging to the first protocol is generated, wherein the generated group of first protocol messages (1011) have the message structure characteristics (106), and the data in the group of first protocol messages (1011) have the value characteristics (107).

2. The method according to claim 1, characterized in that After obtaining a fourth group of messages (104) belonging to the first protocol, the method further includes: analyzing a first position relationship feature (109) between messages of different message types in the fourth group of messages (104); Generating the set of first protocol messages (1011) also includes: generating the set of first protocol messages (1011) according to the first position relationship feature (109).

3. The method according to claim 1 or 2, characterized in that The message structure feature (106) includes at least one of the following features: Structure with type, length, value TLV; A structure with type, value TV; The data block has a fixed end marker; Data blocks have fixed values; The data block value belongs to one of a set of values; Data blocks have fixed length; Data blocks have boundary markers; Structures are nested.

4. The method according to claim 1 or 2, characterized in that: The value feature (107) includes at least one of the following features: The PDUs of at least two messages in the fourth group of messages (104) are located at the same position and have the same data blocks with the same length and have the same value; The value is within a range of values, but does not include visible characters; The value is random; The values ​​are the same and the length exceeds the preset length threshold; Contain at least one preset special character; The value increases in the order of the messages; The value is in descending order according to the message sequence.

5. The method according to claim 1 or 2, characterized in that: The method further comprises: Acquire a fifth group of messages (105), wherein the fifth group of messages (105) includes messages belonging to the first protocol and messages belonging to other protocols; Determining a second position relationship feature (108) between the messages belonging to the first protocol and the messages belonging to the other protocols in the fifth group of messages (105); generating a message belonging to the other protocol; After generating the group of first protocol messages (1011) and messages belonging to the other protocols, the group of first protocol messages (1011) and the generated messages belonging to the other protocols are placed according to the second position relationship feature (108) to generate a first group of messages (101).

6. The method according to claim 5, characterized in that Before generating the first group of messages (101), the method further includes: Setting protocol parameters (110) of the first group of messages (101); The first group of messages (101) is generated according to the protocol parameters (110).

7. The method according to claim 5, characterized in that The first group of messages generated is used to perform the following test method, which is used to test the performance of a deep packet inspection (DPI) device (10). receiving a second group of messages (102) from a message forwarding device (20), wherein the second group of messages (102) is output after the message forwarding device (20) forwards the first group of messages (101), and the message forwarding device (20) does not perform DPI detection on the first group of messages (101); Counting the message transmission characteristics of the second group of messages (102); receiving a third group of messages (103) from the DPI device (10), wherein the third group of messages (103) is output by the DPI device (10) after processing the first group of messages (101); Counting the message transmission characteristics of the third group of messages (103); The message transmission characteristic of the second group of messages (102) is compared with the message transmission characteristic of the third group of messages (103) to obtain a first performance of the DPI device (10).

8. A message generating device (30), characterized in that: include: A message acquisition module (301) for acquiring a fourth group of messages (104) belonging to the first protocol; A message generation module (302) is used to: Analyzing the message structure characteristics (106) of the protocol data unit PDU of the fourth group of messages (104) and the value characteristics (107) of the data blocks of the same length and located at the same position in the PDU of each message, and A group of first protocol messages (1011) belonging to the first protocol is generated, wherein the generated group of first protocol messages (1011) have the message structure characteristics (106), and the data in the group of first protocol messages (1011) have the value characteristics (107).

9. The device according to claim 8, characterized in that The message generation module (302) is further configured to analyze, after the message acquisition module (301) acquires a fourth group of messages (104) belonging to the first protocol, a first position relationship feature (109) between messages of different message types in the fourth group of messages (104); When generating the group of first protocol messages (1011), the message generation module (302) is specifically used to: generate the group of first protocol messages (1011) according to the first position relationship feature (109).

10. The device according to claim 8 or 9, characterized in that The message acquisition module (301) is further used to acquire a fifth group of messages (105), wherein the fifth group of messages (105) includes messages belonging to the first protocol and messages belonging to other protocols; The message generation module (302) is also used for: determining a second position relationship feature (108) between the messages belonging to the first protocol and the messages belonging to the other protocols in the fifth group of messages (105), generating a message belonging to said other protocol, and After generating the group of first protocol messages (1011) and messages belonging to the other protocols, the group of first protocol messages (1011) and the generated messages belonging to the other protocols are placed according to the second position relationship feature (108) to generate a first group of messages (101).

11. The device according to claim 10, characterized in that The message generation module (302) is further used to: before generating the first group of messages (101), set the protocol parameters (110) of the first group of messages (101); When generating the first group of messages (101), the message generation module (302) is specifically used to: generate the first group of messages (101) according to the protocol parameters (110).

12. The device according to claim 10, characterized in that The first group of messages generated is used to perform the following test method, which is used to test the performance of a deep packet inspection (DPI) device (10). receiving a second group of messages (102) from a message forwarding device (20), wherein the second group of messages (102) is output after the message forwarding device (20) forwards the first group of messages (101), and the message forwarding device (20) does not perform DPI detection on the first group of messages (101); Counting the message transmission characteristics of the second group of messages (102); receiving a third group of messages (103) from the DPI device (10), wherein the third group of messages (103) is output by the DPI device (10) after processing the first group of messages (101); Counting the message transmission characteristics of the third group of messages (103); The message transmission characteristic of the second group of messages (102) is compared with the message transmission characteristic of the third group of messages (103) to obtain a first performance of the DPI device (10).

13. A message generating device (30), characterized in that: include: at least one memory (303) for storing machine-readable instructions; At least one processor (304), configured to call the machine-readable instructions to execute the method according to any one of claims 1 to 7.

14. A machine-readable medium, characterized in that The machine-readable medium stores machine-readable instructions, and when the machine-readable instructions are executed by a processor, the processor executes the method according to any one of claims 1 to 7.

15. A computer program product, characterized in that When the computer program product is executed by a processor, the processor is caused to execute the method according to any one of claims 1 to 7.