Traffic description method, device and equipment and readable storage medium
By extracting the common incoming and outgoing parameters of the target test object and generating a differential description of network traffic, the problem that testers find it difficult to quickly identify differences in different network traffic is solved, and the testing efficiency is improved.
Patent Information
- Application Number
- CN202411741695.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-02-25
AI Technical Summary
During the testing process of software development, the same test object often corresponds to multiple network traffic, making it difficult for testers to quickly identify the differences between different network traffic, thereby reducing testing efficiency.
By obtaining multiple network traffic of the target test object, extracting common incoming parameters descriptions and common outgoing parameters descriptions, generating incoming parameters difference descriptions and outgoing parameters key descriptions for each network traffic, and combining them to form a scene description, so as to quickly identify and understand the differences in different network traffic.
By refining shared descriptions and generating differential descriptions, testers can quickly identify and understand the differences in incoming and outgoing parameters of different network traffic, and improve testing efficiency.
Smart Images

Figure CN119520354A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of testing technology, and more specifically, to a flow description method, device, equipment and readable storage medium. Background Art
[0002] In the field of software development, testing is an indispensable part. After generating a new device or updating the original device, the device needs to be tested to evaluate whether the device's code logic is running normally.
[0003] During the test process, the correctness of the test object code logic can be verified with the help of traffic recording and traffic playback. However, in this process, the same test object often corresponds to multiple network flows, which makes it difficult for testers to quickly understand the differences between different network flows, which in turn makes it difficult for testers to quickly understand the specific situation of the test object, ultimately resulting in a low test efficiency. Summary of the invention
[0004] In view of this, the present application provides a traffic description method, apparatus, device and readable storage medium to address the shortcomings of low testing efficiency in the prior art.
[0005] In order to achieve the above objectives, the proposed solution is as follows:
[0006] A flow description method, comprising:
[0007] Obtain multiple target network flows corresponding to the target test object;
[0008] Extract the common input parameter description of the target test object according to the input parameter data of each target network flow;
[0009] Extract the common output parameter description of the target test object according to the input parameter data and output parameter data of each target network flow;
[0010] Based on the input parameter data of each target network flow and the common input parameter description, generate an input parameter difference description of the corresponding target network flow;
[0011] Based on the output parameter data of each target network flow and the common output parameter description, generate an output parameter key description of the corresponding target network flow;
[0012] The input parameter difference description and output parameter key description of the same target network traffic are combined to form a scenario description of the corresponding target network traffic.
[0013] Optionally, the obtaining of multiple target network flows corresponding to the target test object includes:
[0014] All network flows of the target test object are obtained, and each network flow is deduplicated, and after deduplication, each target network flow corresponding to the target test object is obtained.
[0015] Optionally, extracting the common input parameter description of the target test object according to the input parameter data of each target network traffic includes:
[0016] Generate the input parameter structure mode corresponding to each input parameter data;
[0017] Parse the input parameter structure pattern of each target network traffic and extract the common input parameter descriptions that indicate the required fields of the input parameters.
[0018] Optionally, the generating of the input parameter difference description of the corresponding target network traffic based on the input parameter data of each target network traffic and the common input parameter description includes:
[0019] The input parameter data of each target network flow is compared with the common input parameter description, and the difference set between the input parameter data of each target network flow and the common input parameter description is used as the input parameter difference description of the corresponding target network flow.
[0020] Optionally, extracting the common output parameter description of the target test object according to the input parameter data and output parameter data of each target network traffic includes:
[0021] Generate the output parameter structure mode corresponding to each output parameter data;
[0022] Based on the input parameter data of each target network traffic, each target network traffic is grouped;
[0023] Parse the output parameter structure mode of the target network traffic in the same group and extract the common output parameter description of the target network traffic in the same group.
[0024] Optionally, the generating of the output parameter key description of the corresponding target network traffic based on the output parameter data of each target network traffic and the shared output parameter description includes:
[0025] For each target network flow, analyzing whether there is a language description in the output parameter data of the target network flow;
[0026] If there is a language description, generating a key description of the output parameter of the target network traffic based on the language description in the output parameter data of the target network traffic;
[0027] If there is no language description, compare the output parameter data of the target network traffic with the common output parameter description of the corresponding group to determine whether there is a difference between the output parameter data of the target network traffic and the common output parameter description of the corresponding group;
[0028] If there is a difference, the difference set between the target network traffic output parameter data and the corresponding group common output parameter description is used as the output parameter key description of the target network traffic;
[0029] If there is no difference, the common output parameter description of the group corresponding to the target network traffic is used as the output parameter key description of the target network traffic.
[0030] Optionally, the generating of the output parameter key description of the corresponding target network traffic based on the language description in the output parameter data of each target network traffic includes:
[0031] Compare the character lengths of all language descriptions in the output parameter data of the same target network traffic, and use the language description with the longest character length as the output parameter key description of the corresponding target network traffic.
[0032] A flow description device, comprising:
[0033] A target network traffic acquisition module is used to acquire multiple target network traffic corresponding to the target test object;
[0034] A common input parameter description extraction module is used to extract the common input parameter description of the target test object according to the input parameter data of each target network flow;
[0035] A common output parameter description extraction module is used to extract the common output parameter description of the target test object according to the input parameter data and output parameter data of each target network flow;
[0036] An input parameter difference description generating module, used for generating an input parameter difference description of the corresponding target network flow based on the input parameter data of each target network flow and the common input parameter description;
[0037] An output parameter key description generation module, used to generate an output parameter key description of the corresponding target network traffic based on the output parameter data of each target network traffic and the common output parameter description;
[0038] The scenario description generation module is used to combine the input parameter difference description and output parameter key description of the same target network traffic to form a scenario description of the corresponding target network traffic.
[0039] A traffic description device, comprising a memory and a processor;
[0040] The memory is used to store programs;
[0041] The processor is used to execute the program to implement each step of the above-mentioned traffic description method.
[0042] A readable storage medium stores a computer program thereon, characterized in that when the computer program is executed by a processor, each step of the above-mentioned traffic description method is implemented.
[0043] It can be seen from the above technical scheme that the traffic description method provided by the present application can obtain multiple target network flows corresponding to the target test object; according to the input parameter data of each target network flow, extract the common input parameter description of the target test object; according to the input parameter data and output parameter data of each target network flow, extract the common output parameter description of the target test object; based on this, the present application can first parse the input parameter data and output parameter data of each target network flow of the same target test object, and obtain the common input parameter description and common output parameter description corresponding to the target test object, thereby determining the required fields of the input parameter data and the key fields of the output parameter data of the target test object. Subsequently, based on the input parameter data of each target network flow and the common input parameter description, an input parameter difference description of the corresponding target network flow can be generated; based on this, the present application can determine the existence of differentiated input parameter data by analyzing each input parameter data and the common input parameter description of the corresponding target test object, thereby ensuring that the tester can quickly identify the difference between different input parameter data of the same target test object through the input parameter difference description; then, based on the output parameter data of each target network flow and the common output parameter description, an output parameter key description of the corresponding target network flow can be generated; based on this, the present application can determine the existence of differentiated input parameter data by analyzing each input parameter data and the common input parameter description of the corresponding target test object, thereby ensuring that the tester can quickly identify the difference between different input parameter data of the same target test object through the input parameter difference description; And the common output parameter description of the corresponding target test object, determine the key points of each output parameter data, ensure that the tester can quickly refine the key information of different network traffic through the key description of the output parameters, and quickly identify the differences between different output parameter data of the same target test object; finally, the input parameter difference description and the key description of the output parameters of the same target network traffic can be combined to form a scenario description of the corresponding target network traffic; based on this, the scenario description of each target network traffic can be used to quickly identify the input parameter differences and key information of the output parameters of different target network traffic, accelerate the tester's understanding of different target network traffic, and further improve the test efficiency. It can be seen that the present application can generate a scenario description of each target network traffic by refining the common input parameter description and the common output parameter description of the same target test object, and accelerate the tester's understanding of different target network traffic with the help of the scenario description of each target network traffic, and further improve the test efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0045] Figure 1 A flow chart of a traffic description method disclosed in an embodiment of the present application;
[0046] Figure 2 A structural block diagram of a flow description device disclosed in an embodiment of the present application;
[0047] Figure 3 This is a hardware structure block diagram of a traffic description device disclosed in an embodiment of the present application. DETAILED DESCRIPTION
[0048] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0049] The embodiment of the present application provides a flow description method, which can be applied to various test systems or test platforms, and can also be applied to various computer terminals or intelligent terminals. The execution subject can be a processor or server of the computer terminal or intelligent terminal. The flow chart of the flow description method is as follows: Figure 1 As shown, specifically including:
[0050] Next, combine Figure 1 The flow description method of this application is introduced in detail, including the following steps:
[0051] Step S1, obtaining multiple target network flows corresponding to the target test object.
[0052] Specifically, the target test object may be an object that needs to be tested.
[0053] An object can be any entity constructed through code logic, for example, it can be software or a module.
[0054] Multiple target network flows corresponding to the target test object can be obtained in a variety of ways.
[0055] For example, a network monitoring tool may be used to collect multiple target network flows corresponding to the target test object.
[0056] It is also possible to collect multiple target network flows corresponding to the target test object by monitoring the application programming interface.
[0057] Step S2: extract the common input parameter description of the target test object according to the input parameter data of each target network flow.
[0058] Specifically, the input parameter data of each target network flow can be comprehensively analyzed, and the common parts of the input parameter data of each target network flow can be extracted as the common input parameter description.
[0059] Step S3: extract the common output parameter description of the target test object according to the input parameter data and output parameter data of each target network traffic.
[0060] Specifically, each target network flow can be grouped according to the input parameter data of each target network flow;
[0061] The output parameter data of the same group of target network traffic can be compared, and the key data of the same group of output parameter data can be extracted as the common output parameter description.
[0062] Among them, the key data of each output parameter data can be the business results, data body content or prompt information used to characterize the corresponding output parameter data.
[0063] Step S4: Based on the input parameter data of each target network flow and the common input parameter description, generate an input parameter difference description of the corresponding target network flow.
[0064] Specifically, the input parameter data of each target network flow can be compared with the common input parameter description to obtain a comparison result;
[0065] According to the comparison result corresponding to each target network flow, a description of the input parameter difference of the corresponding target network flow can be generated.
[0066] Step S5: Based on the output parameter data of each target network flow and the common output parameter description, generate a key output parameter description of the corresponding target network flow.
[0067] Specifically, the parameter data of each target network traffic may be analyzed to obtain an analysis result for characterizing whether the corresponding target network traffic contains key character content;
[0068] If any analysis result indicates that the corresponding target network traffic does not contain key character content, then the output parameter data of the target network traffic is compared with the common output parameter description of the same group to generate the output parameter key description of the corresponding target network traffic;
[0069] If any analysis result indicates that the corresponding target network traffic has key character content, then based on the key character content of the target network traffic, the output parameter key description of the corresponding target network traffic is determined.
[0070] Step S6: The input parameter difference description and the output parameter key description of the same target network traffic are combined to form a scenario description of the corresponding target network traffic.
[0071] Specifically, the input parameter difference description and the output parameter key description corresponding to the same target network traffic may be combined to obtain a scenario description of the corresponding target network traffic.
[0072] It can be seen from the above technical scheme that the traffic description method provided by the present application can obtain multiple target network traffic corresponding to the target test object; according to the input parameter data of each target network traffic, extract the common input parameter description of the target test object; according to the input parameter data and output parameter data of each target network traffic, extract the common output parameter description of the target test object; based on this, the present application can first parse the input parameter data and output parameter data of each target network traffic of the same target test object, and obtain the common input parameter description and common output parameter description corresponding to the target test object, and the common input parameter description is the input parameter description commonly included in each input parameter data of the same target test object, and belongs to the required field of the input parameter data of the target test object; similarly, the common output parameter description is the output parameter description commonly included in each output parameter data of the same target test object, and belongs to the key field of the output parameter data of the target test object; thus, the present application can first determine the required fields of the input parameter data of the target test object and the key fields of the output parameter data. Subsequently, based on the input parameter data of each target network flow and the common input parameter description, an input parameter difference description of the corresponding target network flow can be generated; based on this, the present application can determine the existence of differentiated input parameter data by analyzing each input parameter data and the common input parameter description of the corresponding target test object, thereby ensuring that the tester can quickly identify the difference between different input parameter data of the same target test object through the input parameter difference description; then, based on the output parameter data of each target network flow and the common output parameter description, an output parameter key description of the corresponding target network flow can be generated; based on this, the present application can determine the existence of differentiated input parameter data by analyzing each input parameter data and the common input parameter description of the corresponding target test object, thereby ensuring that the tester can quickly identify the difference between different input parameter data of the same target test object through the input parameter difference description; And the common output parameter description of the corresponding target test object, determine the key points of each output parameter data, ensure that the tester can quickly refine the key information of different network traffic through the key description of the output parameters, and quickly identify the differences between different output parameter data of the same target test object; finally, the input parameter difference description and the key description of the output parameters of the same target network traffic can be combined to form a scenario description of the corresponding target network traffic; based on this, the input parameter difference and the key information of the output parameters of different target network traffic can be quickly identified with the help of the scenario description of each target network traffic, which can accelerate the tester's understanding of different target network traffic and further improve the test efficiency. It can be seen that the present application can generate a scenario description of each target network traffic by refining the common input parameter description and the common output parameter description of the same target test object, and accelerate the tester's understanding of different target network traffic with the help of the scenario description of each target network traffic, thereby further improving the test efficiency.
[0073] In some embodiments of the present application, the process of step S1, obtaining multiple target network flows corresponding to the target test object, is described in detail, and the steps are as follows:
[0074] S10. Acquire all network flows of the target test object, and deduplicate each network flow, and obtain each target network flow corresponding to the target test object after deduplication.
[0075] Specifically, all network traffic of the target test object may be collected through a network monitoring tool or an application programming interface;
[0076] Can generate shcema of each network flow;
[0077] Clean each network flow with consistent shcema, and use the obtained network flow as each target network flow corresponding to the target test object.
[0078] It can be seen from the above technical solution that this embodiment provides an optional method for obtaining multiple target network flows of the target test object. Through the above method, the network flow of the target test object can be further screened, redundant network flow can be reduced, and the test efficiency can be further improved.
[0079] In some embodiments of the present application, the process of extracting the common input parameter description of the target test object according to the input parameter data of each target network flow in step S2 is described in detail, and the steps are as follows:
[0080] S20. Generate an input parameter structure pattern corresponding to each input parameter data.
[0081] Specifically, the shcema corresponding to each input parameter data can be generated;
[0082] Based on the structure definition contained in the shcema of each input parameter data, determine the input parameter structure mode corresponding to each input parameter data.
[0083] S21. Parse the input parameter structure pattern of each target network traffic, and extract the common input parameter description used to indicate the required input parameter fields.
[0084] Specifically, the input parameter structure patterns of all target network traffic can be parsed to determine the common structure definition of each target network traffic input parameter structure pattern, and the common structure definition of each input parameter structure pattern can be used as a common input parameter description.
[0085] It can be seen from the above technical solution that this embodiment provides an optional method for extracting the common input parameter description of the target test object based on the input parameter data of each target network flow. Through the above method, the common input parameter fields of each target network flow can be extracted through each input parameter structure pattern, so as to subsequently determine the input parameter difference description of each target network flow.
[0086] In some embodiments of the present application, step S3, the process of extracting the common output parameter description of the target test object according to the input parameter data and output parameter data of each target network flow, is described in detail, and the steps are as follows:
[0087] S30. Generate an output parameter structure pattern corresponding to each output parameter data.
[0088] Specifically, the shcema corresponding to each output parameter data can be generated;
[0089] Based on the structure definition contained in the shcema of each output parameter data, determine the output parameter structure mode corresponding to each output parameter data.
[0090] S31. Group each target network traffic based on the input parameter data of each target network traffic.
[0091] Specifically, the shcema corresponding to each input parameter data can be generated;
[0092] The target network traffic with the same shcema can be divided into the same group.
[0093] S32. Analyze the output parameter structure pattern of the target network traffic in the same group, and extract the common output parameter description of the target network traffic in the same group.
[0094] Specifically, the output parameter structure patterns of the same group of target network traffic can be parsed to determine the common structure definitions of the output parameter structure patterns of the same group of target network traffic, and the common structure definitions of the output parameter structure patterns can be used as common output parameter descriptions.
[0095] It can be seen from the above technical solution that this embodiment provides an optional method for extracting the common output parameter description of the target test object based on the input parameter data and output parameter data of each target network traffic. Through the above method, each target network traffic can be grouped according to the input parameter data of each target network traffic, and then the common output parameter description of different groups can be determined.
[0096] In some embodiments of the present application, step S4, a process of generating a description of input parameter differences of corresponding target network traffic based on the input parameter data of each target network traffic and the common input parameter description, is described in detail, and the steps are as follows:
[0097] S40. Compare the input parameter data of each target network flow with the common input parameter description, and use the difference set between the input parameter data of each target network flow and the common input parameter description as the input parameter difference description of the corresponding target network flow.
[0098] Specifically, the input parameter data of each target network flow and the common input parameter description may be compared in turn, and the difference set between the input parameter data of each target network flow and the common input parameter description may be extracted;
[0099] The difference set between the input parameter data of each target network flow and the common input parameter description can be used as the input parameter difference description of each target network flow.
[0100] It can be seen from the above technical solution that this embodiment provides an optional method for generating an input parameter difference description of the corresponding target network traffic based on the input parameter data of each target network traffic and the common input parameter description. The above method can better highlight the input parameter differences between each target network traffic, further improve the distinction between different target network traffic, and speed up the test personnel to distinguish between each target network traffic, thereby improving the test efficiency.
[0101] In some embodiments of the present application, step S5, a process of generating a key description of the output parameters of the corresponding target network traffic based on the output parameter data of each target network traffic and the common output parameter description, is described in detail, and the steps are as follows:
[0102] S50. For each target network flow, analyze whether there is a language description in the output parameter data of the target network flow; if so, execute step S51; if not, execute step S52.
[0103] Specifically, it is possible to analyze whether the output parameter data in each target network traffic contains a language description;
[0104] If there is a language description, execute step S51;
[0105] If no language description exists, execute step S52.
[0106] S51. Generate a key description of the output parameters of the target network traffic based on the language description in the output parameter data of the target network traffic.
[0107] Specifically, considering that the language description is more convenient for testers to understand the content contained in the corresponding output parameter data and speed up the test efficiency, the present application can extract all the language descriptions in the output parameter data of the target network traffic;
[0108] Based on the language descriptions in the same output parameter data, determine the output parameter key description of the corresponding output parameter data.
[0109] S52, compare the output parameter data of the target network traffic with the common output parameter description of the corresponding group to determine whether there is a difference between the output parameter data of the target network traffic and the common output parameter description of the corresponding group. If yes, execute step S53; if no, execute step S54.
[0110] Specifically, it is possible to determine the common output parameter description of the group corresponding to each target network flow output parameter data, and determine whether there is a difference set between each target network flow and the common output parameter description of the same group;
[0111] If there is a difference set, execute step S53;
[0112] If there is no difference set, execute step S54.
[0113] S53: Use the difference between the target network traffic output parameter data and the corresponding group's common output parameter description as the output parameter key description of the target network traffic.
[0114] Specifically, the difference set between the output parameter data of the target network traffic and the common output parameter description of the same group can be extracted as the output parameter key description of the target network traffic.
[0115] S54. Use the common output parameter description of the group corresponding to the target network traffic as the output parameter key description of the target network traffic.
[0116] Specifically, when there is no difference between the output parameter data of the target network traffic and the common output parameter description of the same group, it indicates that the key field in the output parameter data is the common output parameter description. Therefore, the common output parameter description of the group corresponding to the target network traffic can be used as the output parameter key description of the target network traffic.
[0117] It can be seen from the above technical solution that this embodiment provides an optional method for generating the output parameter key description of the corresponding target network traffic based on the output parameter data of each target network traffic and the common output parameter description. Through the above method, the output parameter key description of each target network traffic can be better determined, further accelerating the test efficiency.
[0118] In some embodiments of the present application, the process of generating the output parameter key description of the target network traffic based on the language description in the output parameter data of the target network traffic in step S51 is described in detail, and the steps are as follows:
[0119] S510. Compare the character lengths of all language descriptions in the output parameter data of the same target network traffic, and use the language description with the longest character length as the output parameter key description of the corresponding target network traffic.
[0120] Specifically, all language descriptions of each output parameter data can be extracted;
[0121] The character length of each language description in the same output parameter data can be determined;
[0122] From various language descriptions of the same output parameter data, the language description with the longest character length can be selected as the output parameter key description of the corresponding target network traffic.
[0123] It can be seen from the above technical solution that this embodiment provides an optional method for generating a key description of the output parameters of the target network traffic based on the language description in the output parameter data of the target network traffic. The above method can select the key language description according to the character length.
[0124] Next, we will combine Figure 2 The flow description device provided in the present application is introduced in detail. The flow description device provided below can be compared with the flow description method provided above.
[0125] See also Figure 2 It can be found that the flow description device may include:
[0126] The target network flow acquisition module 10 is used to acquire multiple target network flows corresponding to the target test object;
[0127] A common input parameter description extraction module 20 is used to extract the common input parameter description of the target test object according to the input parameter data of each target network flow;
[0128] A common output parameter description extraction module 30 is used to extract the common output parameter description of the target test object according to the input parameter data and output parameter data of each target network flow;
[0129] An input parameter difference description generating module 40, configured to generate an input parameter difference description of the corresponding target network flow based on the input parameter data of each target network flow and the common input parameter description;
[0130] An output parameter key description generating module 50, configured to generate an output parameter key description of the corresponding target network traffic based on the output parameter data of each target network traffic and the common output parameter description;
[0131] The scenario description generation module 60 is used to combine the input parameter difference description and the output parameter key description of the same target network traffic to form a scenario description corresponding to the target network traffic.
[0132] Furthermore, the target network traffic acquisition module may include:
[0133] The network traffic deduplication unit is used to obtain all network traffic of the target test object and deduplicate each network traffic to obtain each target network traffic corresponding to the target test object after deduplication.
[0134] Furthermore, the common input parameter description extraction module may include:
[0135] An input parameter structure pattern generating unit, used to generate an input parameter structure pattern corresponding to each input parameter data;
[0136] The input parameter structure pattern parsing unit is used to parse the input parameter structure pattern of each target network flow and extract the common input parameter description used to indicate the required fields of the input parameter.
[0137] Furthermore, the input parameter difference description generation module may include:
[0138] An input parameter data comparison unit is used to compare the input parameter data of each target network flow with the common input parameter description, and use the difference set between the input parameter data of each target network flow and the common input parameter description as the input parameter difference description of the corresponding target network flow.
[0139] Furthermore, the common output parameter description extraction module may include:
[0140] An output parameter structure mode generating unit, used to generate an output parameter structure mode corresponding to each output parameter data;
[0141] A target network traffic grouping unit, used for grouping each target network traffic based on input parameter data of each target network traffic;
[0142] The output parameter structure pattern parsing unit is used to parse the output parameter structure pattern of the same group of target network traffic and extract the common output parameter description of the same group of target network traffic.
[0143] Furthermore, the parameter key description generation module may include:
[0144] The language description judgment unit is used to analyze whether there is a language description in the output parameter data of each target network traffic; if there is a language description, the language description utilization unit is called; if there is no language description, the output parameter data comparison unit is called.
[0145] A language description utilizing unit, configured to generate an output parameter key description of the target network traffic based on the language description in the output parameter data of the target network traffic;
[0146] The output parameter data comparison unit is used to compare the output parameter data of the target network traffic with the common output parameter description of the corresponding group to determine whether there is a difference between the output parameter data of the target network traffic and the common output parameter description of the corresponding group; if there is a difference, the difference set extraction unit is called; if there is no difference, the common output parameter description utilization unit is called.
[0147] A difference set extraction unit, used for taking the difference set of the target network traffic output parameter data and the output parameter description shared by the corresponding group as the output parameter key description of the target network traffic;
[0148] The common output parameter description utilizing unit is used to use the common output parameter description of the corresponding group of the target network traffic as the output parameter key description of the target network traffic.
[0149] Furthermore, the language description utilizing unit may include:
[0150] The character length comparison component is used to compare the character lengths of all language descriptions in the output parameter data of the same target network traffic, and use the language description with the longest character length as the output parameter key description of the corresponding target network traffic.
[0151] The flow description device provided in the embodiment of the present application can be applied to flow description devices, such as PC terminals, cloud platforms, servers and server clusters. Figure 3 The hardware structure diagram of the flow description device is shown in FIG. Figure 3 ,The hardware structure of the traffic description device may include: at least one processor 1, at least one communication interface 2, at least one memory 3, and at least one communication bus 4;
[0152] In the embodiment of the present application, the number of the processor 1, the communication interface 2, the memory 3, and the communication bus 4 is at least one, and the processor 1, the communication interface 2, and the memory 3 communicate with each other through the communication bus 4;
[0153] The processor 1 may be a central processing unit CPU, or an application-specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present invention, etc.;
[0154] The memory 3 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), etc., such as at least one disk memory;
[0155] The memory stores a program, and the processor can call the program stored in the memory, wherein the program is used to:
[0156] Obtain multiple target network flows corresponding to the target test object;
[0157] Extract the common input parameter description of the target test object according to the input parameter data of each target network flow;
[0158] Extract the common output parameter description of the target test object according to the input parameter data and output parameter data of each target network flow;
[0159] Based on the input parameter data of each target network flow and the common input parameter description, generate an input parameter difference description of the corresponding target network flow;
[0160] Based on the output parameter data of each target network flow and the common output parameter description, generate an output parameter key description of the corresponding target network flow;
[0161] The input parameter difference description and output parameter key description of the same target network traffic are combined to form a scenario description of the corresponding target network traffic.
[0162] Optionally, the detailed functions and extended functions of the program may refer to the above description.
[0163] The embodiment of the present application further provides a readable storage medium, which may store a program suitable for execution by a processor, wherein the program is used to:
[0164] Obtain multiple target network flows corresponding to the target test object;
[0165] Extract the common input parameter description of the target test object according to the input parameter data of each target network flow;
[0166] Extract the common output parameter description of the target test object according to the input parameter data and output parameter data of each target network flow;
[0167] Based on the input parameter data of each target network flow and the common input parameter description, generate an input parameter difference description of the corresponding target network flow;
[0168] Based on the output parameter data of each target network flow and the common output parameter description, generate an output parameter key description of the corresponding target network flow;
[0169] The input parameter difference description and output parameter key description of the same target network traffic are combined to form a scenario description of the corresponding target network traffic.
[0170] Optionally, the detailed functions and extended functions of the program may refer to the above description.
[0171] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0172] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0173] The above description of the disclosed embodiments enables professionals and technicians in the field to implement or use the present application. Various modifications to these embodiments will be apparent to professionals and technicians in the field, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. The various embodiments of the present application can be combined with each other. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A flow description method, characterized in that: include: Obtain multiple target network flows corresponding to the target test object; Extract the common input parameter description of the target test object according to the input parameter data of each target network flow; Extract the common output parameter description of the target test object according to the input parameter data and output parameter data of each target network flow; Based on the input parameter data of each target network flow and the common input parameter description, generate an input parameter difference description of the corresponding target network flow; Based on the output parameter data of each target network flow and the common output parameter description, generate an output parameter key description of the corresponding target network flow; The input parameter difference description and output parameter key description of the same target network traffic are combined to form a scenario description of the corresponding target network traffic.
2. The flow description method according to claim 1, characterized in that: The obtaining of multiple target network flows corresponding to the target test object includes: All network flows of the target test object are obtained, and each network flow is deduplicated, and after deduplication, each target network flow corresponding to the target test object is obtained.
3. The flow description method according to claim 1, characterized in that: The step of extracting the common input parameter description of the target test object according to the input parameter data of each target network flow includes: Generate the input parameter structure mode corresponding to each input parameter data; Parse the input parameter structure pattern of each target network traffic and extract the common input parameter descriptions used to indicate the required fields of the input parameters.
4. The flow description method according to claim 1, characterized in that: The step of generating a description of input parameter differences of the corresponding target network traffic based on the input parameter data of each target network traffic and the shared input parameter description includes: The input parameter data of each target network flow is compared with the common input parameter description, and the difference set between the input parameter data of each target network flow and the common input parameter description is used as the input parameter difference description of the corresponding target network flow.
5. The flow description method according to claim 1, characterized in that: The extracting the common output parameter description of the target test object according to the input parameter data and output parameter data of each target network flow includes: Generate the output parameter structure mode corresponding to each output parameter data; Based on the input parameter data of each target network traffic, each target network traffic is grouped; Parse the output parameter structure mode of the target network traffic in the same group and extract the common output parameter description of the target network traffic in the same group.
6. The flow description method according to claim 5, characterized in that: The generating of the output parameter key description of the corresponding target network traffic based on the output parameter data of each target network traffic and the common output parameter description includes: For each target network flow, analyzing whether there is a language description in the output parameter data of the target network flow; If there is a language description, generating a key description of the output parameter of the target network traffic based on the language description in the output parameter data of the target network traffic; If there is no language description, compare the output parameter data of the target network traffic with the common output parameter description of the corresponding group to determine whether there is a difference between the output parameter data of the target network traffic and the common output parameter description of the corresponding group; If there is a difference, the difference set between the target network traffic output parameter data and the corresponding group common output parameter description is used as the output parameter key description of the target network traffic; If there is no difference, the common output parameter description of the group corresponding to the target network traffic is used as the output parameter key description of the target network traffic.
7. The flow description method according to claim 6, characterized in that: The generating, based on the language description in the output parameter data of the target network traffic, a key description of the output parameter of the target network traffic comprises: Compare the character lengths of all language descriptions in the output parameter data of the same target network traffic, and use the language description with the longest character length as the output parameter key description of the corresponding target network traffic.
8. A flow description device, characterized in that: include: A target network traffic acquisition module is used to acquire multiple target network traffic corresponding to the target test object; A common input parameter description extraction module is used to extract the common input parameter description of the target test object according to the input parameter data of each target network flow; A common output parameter description extraction module is used to extract the common output parameter description of the target test object according to the input parameter data and output parameter data of each target network flow; An input parameter difference description generating module, used for generating an input parameter difference description of the corresponding target network flow based on the input parameter data of each target network flow and the common input parameter description; An output parameter key description generation module, used to generate an output parameter key description of the corresponding target network traffic based on the output parameter data of each target network traffic and the common output parameter description; The scenario description generation module is used to combine the input parameter difference description and output parameter key description of the same target network traffic to form a scenario description of the corresponding target network traffic.
9. A flow description device, characterized in that: including memory and processor; The memory is used to store programs; The processor is used to execute the program to implement each step of the traffic description method as described in any one of claims 1 to 7.
10. A readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, each step of the traffic description method according to any one of claims 1 to 7 is implemented.