Traffic playback comparison test method, device and equipment and readable storage medium

By using the target interface to record and clean the traffic playback data in the traffic playback comparison test, and generating filter conditions for comparison, the problem of low testing efficiency in the existing technology is solved and more efficient and accurate evaluation is achieved.

CN119557228AActive Publication Date: 2025-03-04GUANGZHOU PINWEI SOFTWARE CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411741713.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-03-04
Estimated Expiration
2044-11-29

AI Technical Summary

Technical Problem

The prior art is less efficient when performing traffic playback comparison tests because all traffic playbacks of pre-release programs need to be compared with all traffic playbacks of the original program, although the pre-release programs may only update some functions.

Method used

By obtaining the first program to be published and the second program for comparison, determining their target interface, triggering and recording traffic playback data, cleaning data, generating filtering conditions based on program differences, filtering out the differential data for comparison, and evaluating the advantages and disadvantages of the program.

Benefits of technology

This method reduces interference factors, improves the targetedness of data comparison, removes redundant data, improves the testing efficiency and accuracy of evaluation results, and thus improves the efficiency of online verification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119557228A_ABST
    Figure CN119557228A_ABST
Patent Text Reader

Abstract

The invention discloses a traffic playback comparison test method, apparatus and device, and a readable storage medium. The method comprises the steps of obtaining a to-be-issued first program and a to-be-issued second program; recording first traffic playback data corresponding to the first program and second traffic playback data corresponding to the second program; obtaining a screening condition generated based on the difference between the first program and the second program; on the basis, the matching between the screening condition and the comparison test and the coverage rate of traffic playback are guaranteed; screening from the cleaned first traffic playback data by using a screening condition to obtain first traffic playback comparison data, and screening from the cleaned second traffic playback data to obtain second traffic playback comparison data; and performing traffic playback comparison on the first traffic playback comparison data and the second traffic playback comparison data, and evaluating the quality of the first program. Visibly, in the flow playback comparison test process, interference factors can be reduced, the pertinence of the comparison data is improved, and the online verification efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of testing technology, and more specifically, to a flow playback comparison test method, device, equipment and readable storage medium. Background Art

[0002] In the product iteration process, before the pre-released program is put online to replace the original program, it is usually necessary to conduct online verification to compare the pre-released program with the original program to ensure that the pre-released program can be used normally and that the functions of the pre-released program are better than those of the original program. There are many ways to conduct online verification, and traffic playback comparison is the most common one.

[0003] However, in the process of traffic playback comparison, the prior art usually needs to compare all traffic playbacks of the pre-released program with all traffic playbacks of the original program. Even if the pre-released program may be the original program with some functions updated, the prior art still uses all traffic playback comparison to perform online verification, resulting in low online verification efficiency. Summary of the invention

[0004] In view of this, the present application provides a traffic playback comparison test method, device, equipment and readable storage medium to solve the shortcomings of low online verification efficiency in the prior art.

[0005] In order to achieve the above objectives, the proposed solution is as follows:

[0006] A traffic playback comparison test method, comprising:

[0007] Acquire a first program to be released and a second program for comparative testing with the first program;

[0008] Determine a target interface for calling the first program and the second program;

[0009] Using the target interface, triggering the first program, recording first flow playback data corresponding to the first program, and cleaning the first flow playback data;

[0010] Using the target interface, triggering the second program, recording second flow playback data corresponding to the second program, and cleaning the second flow playback data;

[0011] Obtaining a screening condition generated based on a difference between the first program and the second program;

[0012] Using the screening condition, the first flow playback comparison data is screened from the cleaned first flow playback data;

[0013] Using the screening condition, the second flow playback comparison data is screened from the cleaned second flow playback data;

[0014] Perform a traffic playback comparison on the first traffic playback comparison data and the second traffic playback comparison data to evaluate the pros and cons of the first program.

[0015] Optionally, the obtaining a screening condition generated based on the difference between the first program and the second program includes:

[0016] Comparing the first program with the second program, and determining a difference function between the first program and the second program;

[0017] Based on the difference function, a screening condition is constructed.

[0018] Optionally, constructing a screening condition based on the difference function includes:

[0019] Based on the functional type of the difference function, determining all parameter types that need to be compared;

[0020] Construct filtering conditions based on each parameter type.

[0021] Optionally, the filtering conditions are constructed based on various parameter types, including:

[0022] Construct a parameter setting window corresponding to each parameter type, each parameter setting window is used to input a filter dependency of the corresponding parameter type;

[0023] Construct filter conditions based on each parameter type and filter dependencies.

[0024] Optionally, performing traffic playback comparison on the first traffic playback comparison data and the second traffic playback comparison data to evaluate the pros and cons of the first program includes:

[0025] Comparing a first data volume of the first traffic playback comparison data with a second data volume of the second traffic playback comparison data, and determining a data volume score of the first program;

[0026] Comparing a first generation duration of the first traffic playback comparison data with a second generation duration of the second traffic playback comparison data, and determining a duration score of the first program;

[0027] Comparing a first coverage rate of the first traffic playback comparison data with a second coverage rate of the second traffic playback comparison data to determine a coverage rate score of the first program;

[0028] Calculate the total score of the first program by combining the data volume score, the coverage score and the duration score;

[0029] Based on the total score, the quality of the first program is evaluated.

[0030] Optionally, the calculating a total score of the first program by integrating the data volume score, the coverage score, and the duration score includes:

[0031] Determine a data volume weight based on the ability of the traffic playback data volume to characterize the quality of the first program;

[0032] The product of the data volume score and the data volume weight is taken as the data volume product;

[0033] Determine the weight of the duration based on the ability of the program processing duration to characterize the pros and cons of the first program;

[0034] The product of the duration score and the duration weight is taken as the duration product;

[0035] Determining a coverage weight based on the ability of the traffic coverage to characterize the pros and cons of the first program;

[0036] Taking the product of the coverage score and the coverage weight as the coverage product;

[0037] The sum of the product of the data volume, the product of the coverage rate and the product of the duration is taken as the total score of the first program.

[0038] Optionally, the evaluating the pros and cons of the first program based on the total score includes:

[0039] The total score is compared with a preset score threshold to evaluate the quality of the first program.

[0040] A flow playback comparison test device, comprising:

[0041] An acquisition module, used for acquiring a first program to be released, and a second program for comparative testing with the first program;

[0042] A determination module, used to determine a target interface for calling the first program and the second program;

[0043] A recording module, used to trigger the first program by using the target interface, and record the first flow playback data corresponding to the first program, clean the first flow playback data, and trigger the second program by using the target interface, and record the second flow playback data corresponding to the second program, and clean the second flow playback data;

[0044] A generating module, used for obtaining a screening condition generated based on the difference between the first program and the second program;

[0045] A screening module, used to use the screening condition to screen the first flow playback data after cleaning to obtain the first flow playback comparison data; and use the screening condition to screen the second flow playback data after cleaning to obtain the second flow playback comparison data;

[0046] An evaluation module is used to perform traffic playback comparison on the first traffic playback comparison data and the second traffic playback comparison data to evaluate the pros and cons of the first program.

[0047] A flow replay comparison test device comprises a memory and a processor;

[0048] The memory is used to store programs;

[0049] The processor is used to execute the program to implement each step of the above-mentioned traffic playback comparison test method.

[0050] 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 above-mentioned traffic playback comparison test method is implemented.

[0051] It can be seen from the above technical scheme that the traffic replay test method provided by the present application can obtain a first program to be released, and a second program for comparative testing with the first program; determine a target interface for calling the first program and the second program; use the target interface to trigger the first program, and record the first traffic replay data corresponding to the first program, and clean the first traffic replay data; use the target interface to trigger the second program, and record the second traffic replay data corresponding to the second program, and clean the second traffic replay data; on this basis, the present application uses the same interface to obtain the first traffic replay data and the second traffic replay data. In the present application, the method for obtaining the first traffic replay data corresponding to the first program is the same as the method for obtaining the second traffic replay data corresponding to the second program, so as to minimize interference factors; at the same time, the present application cleans the two types of traffic replay data to avoid redundant data in the two types of traffic replay data. The evaluation result is affected; subsequently, the present application can obtain the screening conditions generated based on the difference between the first program and the second program; based on this, the screening conditions are set based on the first program and the second program that need to be compared and tested, which ensures the matching of the screening conditions and the comparison test and the coverage of the traffic playback during the comparison test; using the screening conditions, the first traffic playback comparison data is screened from the cleaned first traffic playback data; using the screening conditions, the second traffic playback comparison data is screened from the cleaned second traffic playback data; the first traffic playback comparison data and the second traffic playback comparison data are compared for traffic playback to evaluate the advantages and disadvantages of the first program and the second program; on this basis, the present application adopts the same screening conditions to screen the two types of traffic playback data, and based on the screening results, evaluates the advantages and disadvantages of the program, ensures the pertinence of the comparison data, reduces redundant data in the subsequent comparison process, and improves the accuracy of the evaluation results while achieving efficient testing. It can be seen that the present application can reduce interference factors, improve the pertinence of comparison data, and remove redundant data during the flow playback comparison test, thereby improving the reliability and accuracy of the evaluation results while improving the test efficiency. Further, the efficiency of online verification is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] 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.

[0053] Figure 1A flow chart of a traffic playback comparison test method disclosed in an embodiment of the present application;

[0054] Figure 2 A structural block diagram of a flow playback comparison test device disclosed in an embodiment of the present application;

[0055] Figure 3 This is a hardware structure block diagram of a traffic playback comparison test device disclosed in an embodiment of the present application. DETAILED DESCRIPTION

[0056] 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.

[0057] The traffic playback comparison test method of the present application can be used in many general or special computing device environments or configurations, such as personal computers, server computers, handheld devices or portable devices, tablet devices, multi-processor devices, and distributed computing environments including any of the above devices or equipment.

[0058] The traffic replay comparison test method of the present application can be applied to a traffic replay platform.

[0059] Next, combine Figure 1 The traffic playback comparison test method of this application is introduced in detail, including the following steps:

[0060] Step S1, obtaining a first program to be released and a second program for comparative testing with the first program.

[0061] Specifically, the first program may be a program to be released or a newly coded program, and the second program may be a program used for performing a comparative test with the first program to verify the superiority or inferiority of the first program.

[0062] The first program may be an updated second program.

[0063] The functions of the first program and the second program may be the same or different.

[0064] Step S2: determining a target interface for calling the first program and the second program.

[0065] Specifically, an interface that can call the first program and the second program at the same time can be used as the target interface.

[0066] Step S3: Use the target interface to trigger the first program, record first traffic playback data corresponding to the first program, and clean the first traffic playback data.

[0067] Specifically, the first program may be triggered by a call request generated by the target interface, and the traffic playback of the first program in response to the call request may be recorded to form first traffic playback data.

[0068] Subsequently, the first flow playback data may be cleaned to remove duplicate data and reduce redundant data.

[0069] Step S4: Use the target interface to trigger the second program, record the second flow playback data corresponding to the second program, and clean the second flow playback data.

[0070] Specifically, the second program can be triggered by a call request generated by the target interface, and the traffic playback of the second program in response to the call request can be recorded to form second traffic playback data.

[0071] Subsequently, the second traffic playback data may be cleaned to remove duplicate data and reduce redundant data.

[0072] Step S5: Obtain screening conditions generated based on the difference between the first program and the second program.

[0073] Specifically, the first program and the second program may be identified, the difference between the first program and the second program may be determined, and based on the difference between the first program and the second program, a screening condition may be constructed.

[0074] The filtering conditions can be composed of one or more of the following: interface type, platform type, version type, input parameter value type, output parameter return value type, and product type.

[0075] Step S6: Using the screening condition, screen the cleaned first flow playback data to obtain first flow playback comparison data.

[0076] Specifically, data matching the screening condition may be selected from the first traffic playback data as the first traffic playback comparison data.

[0077] Step S7: Using the screening condition, screen the cleaned second flow playback data to obtain second flow playback comparison data.

[0078] Specifically, data matching the screening condition may be selected from the second traffic playback data as the second traffic playback comparison data.

[0079] Step S8: Perform a traffic playback comparison on the first traffic playback comparison data and the second traffic playback comparison data to evaluate the pros and cons of the first program.

[0080] Specifically, the difference between the first traffic playback comparison data and the second traffic playback comparison data may be analyzed in multiple dimensions to evaluate the pros and cons of the first program.

[0081] It can be seen from the above technical scheme that the traffic replay test method provided in the embodiment of the present application can obtain the first program to be released, and the second program for comparative testing with the first program; determine the target interface for calling the first program and the second program; use the target interface to trigger the first program, and record the first traffic replay data corresponding to the first program, and clean the first traffic replay data; use the target interface to trigger the second program, and record the second traffic replay data corresponding to the second program, and clean the second traffic replay data; on this basis, the present application uses the same interface to obtain the first traffic replay data and the second traffic replay data. In the present application, the method for obtaining the first traffic replay data corresponding to the first program is the same as the method for obtaining the second traffic replay data corresponding to the second program, so as to minimize interference factors; at the same time, the present application cleans two types of traffic replay data to avoid two types of traffic The redundant data in the playback data affects the evaluation results; subsequently, the present application can obtain the screening conditions generated based on the difference between the first program and the second program; based on this, the screening conditions are set based on the first program and the second program that need to be compared and tested, which ensures the matching of the screening conditions and the comparison test and the coverage of the traffic playback during the comparison test; using the screening conditions, the first traffic playback comparison data is screened from the first traffic playback data after cleaning; using the screening conditions, the second traffic playback comparison data is screened from the second traffic playback data after cleaning; the first traffic playback comparison data and the second traffic playback comparison data are compared for traffic playback to evaluate the advantages and disadvantages of the first program and the second program; on this basis, the present application uses the same screening conditions to screen the two types of traffic playback data, and based on the screening results, evaluates the advantages and disadvantages of the program, ensures the pertinence of the comparison data, removes redundant data, and improves the accuracy of the evaluation results. It can be seen that the present application can reduce interference factors, improve the pertinence of the comparison data, and remove redundant data during the traffic playback comparison test, thereby improving the reliability and accuracy of the evaluation results while improving the test efficiency.

[0082] Furthermore, the traffic playback comparison test is one of the verification methods of online verification, and therefore, the present application also improves the efficiency of online verification.

[0083] In some embodiments of the present application, the process of step S5, obtaining the screening condition generated based on the difference between the first program and the second program, is described in detail, and the steps are as follows:

[0084] S50: Compare the first program and the second program to determine a difference function that distinguishes the first program from the second program.

[0085] Specifically, a variety of program comparison tools may be used to compare the first program and the second program, and to mark the difference functions between the first program and the second program.

[0086] S51. Constructing screening conditions based on the difference function.

[0087] Specifically, the functionality of the difference function may be analyzed, and based on the functionality of the difference function, a screening condition may be constructed.

[0088] It can be seen from the above technical solution that this embodiment provides an optional way to construct screening conditions. Through the above method, the differences between the first program and the second program can be further better utilized to construct screening conditions and improve the specificity of the screening conditions.

[0089] In some embodiments of the present application, step S51, the process of constructing a screening condition based on the difference function is described in detail, and the steps are as follows:

[0090] S510: Based on the functional type of the difference function, determine all parameter types that need to be compared.

[0091] Specifically, the functional type of the difference function may be determined.

[0092] Get a table containing the correspondence between each function category and each parameter category.

[0093] Select all parameter categories corresponding to the function type from the table as the parameter types to be compared.

[0094] S511. Construct filtering conditions based on various parameter types.

[0095] Specifically, the conditions corresponding to each parameter type may be constructed and the respective conditions may be combined to form a screening condition.

[0096] It can be seen from the above technical solution that this embodiment provides an optional way to construct screening conditions based on the difference function. Through the above method, the function of the difference function can be used to construct matching screening conditions, thereby better completing the construction of the screening conditions.

[0097] In some embodiments of the present application, step S511, the process of constructing a screening condition based on each parameter type is described in detail, and the steps are as follows:

[0098] S5110. Construct a parameter setting window corresponding to each parameter type, each parameter setting window is used to input a filter dependency of the corresponding parameter type.

[0099] Specifically, a parameter setting window template corresponding to each parameter category may be preset.

[0100] Determine a parameter setting window template corresponding to each parameter type, and construct a parameter setting window corresponding to each parameter type.

[0101] The parameter setting window can contain fixed parameter items and a window for entering filter dependencies.

[0102] S5111. Construct filtering conditions based on various parameter types and filtering dependencies.

[0103] Specifically, based on the fixed parameter items and filter dependencies in each parameter setting window, the conditions corresponding to each parameter type can be constructed, and the various conditions can be combined to form a filter condition.

[0104] It can be seen from the above technical solution that this embodiment provides an optional way to construct screening conditions based on various parameter types. Through the above method, the screening conditions can be personalized through the parameter setting window, thereby improving the pertinence of the screening conditions.

[0105] In some embodiments of the present application, step S8, performing traffic playback comparison on the first traffic playback comparison data and the second traffic playback comparison data to evaluate the pros and cons of the first program, is described in detail, and the steps are as follows:

[0106] S80. Compare a first data volume of the first traffic playback comparison data with a second data volume of the second traffic playback comparison data to determine a data volume score of the first program.

[0107] Specifically, the amount of data included in the first flow playback comparison data may be determined as the first data amount;

[0108] The amount of data included in the second flow playback comparison data may be determined as the second data amount;

[0109] Calculating a data volume difference between the first data volume and the second data volume;

[0110] Calculate the percentage of the data volume difference to the second data volume as the data volume percentage;

[0111] Based on the data volume percentage, a data volume score for the first program is determined.

[0112] S81. Compare a first generation duration of the first traffic playback comparison data with a second generation duration of the second traffic playback comparison data to determine a duration score of the first program.

[0113] Specifically, the generation time of the first traffic playback comparison data may be determined as the first generation time, and the first generation time is used to indicate the time for the first program to respond to the target interface;

[0114] The generation duration included in the second traffic playback comparison data may be determined as the second generation duration, where the second generation duration is used to indicate the duration of the second program responding to the target interface;

[0115] Calculate the duration difference between the first generation duration and the second generation duration;

[0116] Calculate the percentage of the duration difference to the second generated duration as the duration percentage;

[0117] Based on the duration percentage, a duration score for the first program is determined.

[0118] S82. Compare the first coverage rate of the first traffic playback comparison data with the second coverage rate of the second traffic playback comparison data to determine the coverage rate score of the first program.

[0119] Specifically, the coverage rate of the first traffic playback comparison data may be determined as the first coverage rate, where the first coverage rate is used to represent the information richness of the first traffic playback comparison data;

[0120] The coverage rate of the second traffic playback comparison data may be determined as a second coverage rate, where the second coverage rate is used to represent the information richness of the second traffic playback comparison data;

[0121] Calculating a coverage difference between the first coverage and the second coverage;

[0122] Calculate the percentage of the coverage difference to the second coverage as the coverage percentage;

[0123] Based on the coverage percentage, a coverage score for the first program is determined.

[0124] S83. Calculate the total score of the first program by combining the data volume score, the coverage score and the duration score.

[0125] Specifically, the data volume score, the coverage score and the duration score may be integrated to calculate the total score of the first program in a variety of ways. For example, the sum of the data volume score, the coverage score and the duration score may be used as the total score of the first program.

[0126] The data volume score, the coverage score and the duration score may also be weighted to obtain a total score for the first program.

[0127] S84. Based on the total score, evaluate the pros and cons of the first program.

[0128] Specifically, the quality of the first program can be evaluated based on the total score in a variety of ways. For example, multiple quality levels can be pre-set to determine the quality level of the first program based on the total score; or a threshold can be set to compare the total score with the threshold to evaluate the quality of the first program.

[0129] It can be seen from the above technical solution that this embodiment provides an optional method for evaluating the pros and cons of the first program. Through the above method, the pros and cons of the first program can be evaluated from multiple perspectives, thereby improving the reliability of the evaluation result.

[0130] In some embodiments of the present application, the process of calculating the total score of the first program by combining the data volume score, the coverage score and the duration score in step S83 is described in detail, and the steps are as follows:

[0131] S830. Determine a data volume weight based on the ability of the traffic playback data volume to characterize the quality of the first program.

[0132] Specifically, a data volume weight indicating the ability of the traffic playback data volume to characterize the quality of the first program may be determined.

[0133] S831. Take the product of the data volume score and the data volume weight as the data volume product.

[0134] Specifically, the product of the data volume score and the data volume weight may be calculated and used as the data volume product.

[0135] S832. Determine a duration weight based on the ability of the program processing duration to characterize the pros and cons of the first program.

[0136] Specifically, the duration weight of the program processing duration on the ability to characterize the superiority of the first program may be determined.

[0137] S833: Taking the product of the duration score and the duration weight as the duration product.

[0138] Specifically, the product of the duration score and the duration weight may be calculated, and the product may be used as the duration product.

[0139] S834. Determine a coverage weight based on the ability of the traffic coverage to characterize the pros and cons of the first program.

[0140] Specifically, a coverage weight indicating the ability of the flow coverage to characterize the superiority of the first program can be determined.

[0141] S835. Take the product of the coverage score and the coverage weight as the coverage product.

[0142] Specifically, the product of the coverage score and the coverage weight can be calculated and used as the coverage product.

[0143] S836. Take the sum of the product of the data volume, the product of the coverage rate and the product of the duration as the total score of the first program.

[0144] Specifically, the product of the data volume, the product of the coverage rate, and the product of the duration may be added together to obtain the total score of the first program.

[0145] It can be seen from the above technical solution that this embodiment provides an optional method for calculating the total score of the first program by comprehensively combining the data volume score, the coverage score and the duration score. The total score can be weighted by the above method, thereby improving the ability of the total score to characterize the advantages and disadvantages of the first program and further improving the accuracy of the present application.

[0146] In some embodiments of the present application, step S84, the process of evaluating the quality of the first program based on the total score, is described in detail, and the steps are as follows:

[0147] S840: Compare the total score with a preset score threshold to evaluate the quality of the first program.

[0148] Specifically, one or more score thresholds may be preset, score ranges may be set based on the respective score thresholds, and an evaluation result corresponding to each score range may be determined.

[0149] The total score is compared with each score threshold to determine the target score range corresponding to the total score.

[0150] The evaluation result corresponding to the target score range is used as the target evaluation result that characterizes the quality of the first program.

[0151] It can be seen from the above technical solution that this embodiment provides an optional method for evaluating the pros and cons of the first program based on the total score. The above method can be used to further evaluate the first program and improve the accuracy of online verification.

[0152] Next, we will combine Figure 2 The traffic replay comparison test device provided in the present application is introduced in detail. The traffic replay comparison test device provided below can be compared with the traffic replay comparison test method provided above.

[0153] See also Figure 2 It can be found that the traffic playback comparison test device may include:

[0154] An acquisition module 10, used for acquiring a first program to be released, and a second program for comparative testing with the first program;

[0155] A determination module 20, used to determine a target interface for calling the first program and the second program;

[0156] The recording module 30 is used to trigger the first program by using the target interface, and record the first flow playback data corresponding to the first program, clean the first flow playback data, and trigger the second program by using the target interface, and record the second flow playback data corresponding to the second program, and clean the second flow playback data;

[0157] A generating module 40, configured to obtain a screening condition generated based on the difference between the first program and the second program;

[0158] The screening module 50 is used to screen the first flow playback comparison data from the cleaned first flow playback data using the screening condition; and to screen the second flow playback comparison data from the cleaned second flow playback data using the screening condition;

[0159] The evaluation module 60 is used to perform a traffic playback comparison on the first traffic playback comparison data and the second traffic playback comparison data to evaluate the quality of the first program.

[0160] Generate modules can include:

[0161] a difference function obtaining unit, configured to compare the first program with the second program and determine a difference function that distinguishes the first program from the second program;

[0162] The screening condition building unit is used to build the screening condition based on the difference function.

[0163] Filter condition building blocks can include:

[0164] A parameter type determination subunit, used to determine all parameter types that need to be compared based on the functional type of the difference function;

[0165] Parameter types use subunits to build filter conditions based on each parameter type.

[0166] Parameter type utilization subunits may include:

[0167] A parameter setting window building component is used to build a parameter setting window corresponding to each parameter type, and each parameter setting window is used to input a filter dependency of the corresponding parameter type;

[0168] Filter dependencies utilize components to build filter conditions based on individual parameter types and filter dependencies.

[0169] Assessment modules may include:

[0170] a data volume score determination unit, configured to compare a first data volume of the first flow playback comparison data with a second data volume of the second flow playback comparison data to determine a data volume score of the first program;

[0171] a duration score determination unit, configured to compare a first generated duration of the first flow playback comparison data with a second generated duration of the second flow playback comparison data to determine a duration score of the first program;

[0172] a coverage score determination unit, configured to compare a first coverage of the first flow playback comparison data with a second coverage of the second flow playback comparison data to determine a coverage score of the first program;

[0173] a total score calculation unit, configured to calculate a total score of the first program by combining the data volume score, the coverage score and the duration score;

[0174] A program evaluation unit is used to evaluate the quality of the first program based on the total score.

[0175] The total score calculation unit may include:

[0176] A data volume weight determination subunit, configured to determine a data volume weight based on a capability of the traffic playback data volume to characterize the superiority or inferiority of the first program;

[0177] a data volume product calculation subunit, configured to take the product of the data volume score and the data volume weight as the data volume product;

[0178] A duration weight determination subunit, configured to determine a duration weight based on the ability of the program processing duration to characterize the superiority or inferiority of the first program;

[0179] a duration product calculation subunit, configured to take the product of the duration score and the duration weight as the duration product;

[0180] A coverage weight determination subunit, configured to determine a coverage weight based on the ability of the flow coverage to characterize the pros and cons of the first program;

[0181] A coverage product calculation subunit, used for taking the product of the coverage score and the coverage weight as the coverage product;

[0182] The product addition subunit is used to take the sum of the product of the data volume, the product of the coverage rate and the product of the duration as the total score of the first program.

[0183] Program assessment units may include:

[0184] The total score comparison subunit is used to compare the total score with a preset score threshold to evaluate the quality of the first program.

[0185] The flow replay comparison test device provided in the embodiment of the present application can be applied to flow replay comparison test equipment, such as PC terminals, cloud platforms, servers and server clusters. Figure 3 The hardware structure diagram of the traffic playback comparison test equipment is shown in FIG. Figure 3 ,The hardware structure of the traffic playback comparison test 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;

[0186] 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;

[0187] 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.;

[0188] 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;

[0189] The memory stores a program, and the processor can call the program stored in the memory, wherein the program is used to:

[0190] Acquire a first program to be released and a second program for comparative testing with the first program;

[0191] Determine a target interface for calling the first program and the second program;

[0192] Using the target interface, triggering the first program, recording first flow playback data corresponding to the first program, and cleaning the first flow playback data;

[0193] Using the target interface, triggering the second program, recording second flow playback data corresponding to the second program, and cleaning the second flow playback data;

[0194] Obtaining a screening condition generated based on a difference between the first program and the second program;

[0195] Using the screening condition, the first flow playback comparison data is screened from the cleaned first flow playback data;

[0196] Using the screening condition, the second flow playback comparison data is screened from the cleaned second flow playback data;

[0197] Perform a traffic playback comparison on the first traffic playback comparison data and the second traffic playback comparison data to evaluate the pros and cons of the first program.

[0198] Optionally, the detailed functions and extended functions of the program may refer to the above description.

[0199] 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:

[0200] Acquire a first program to be released and a second program for comparative testing with the first program;

[0201] Determine a target interface for calling the first program and the second program;

[0202] Using the target interface, triggering the first program, recording first flow playback data corresponding to the first program, and cleaning the first flow playback data;

[0203] Using the target interface, triggering the second program, recording second flow playback data corresponding to the second program, and cleaning the second flow playback data;

[0204] Obtaining a screening condition generated based on a difference between the first program and the second program;

[0205] Using the screening condition, the first flow playback comparison data is screened from the cleaned first flow playback data;

[0206] Using the screening condition, the second flow playback comparison data is screened from the cleaned second flow playback data;

[0207] Perform a traffic playback comparison on the first traffic playback comparison data and the second traffic playback comparison data to evaluate the pros and cons of the first program.

[0208] Optionally, the detailed functions and extended functions of the program may refer to the above description.

[0209] 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.

[0210] 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.

[0211] 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 traffic playback comparison test method, characterized in that: include: Acquire a first program to be released and a second program for comparative testing with the first program; Determine a target interface for calling the first program and the second program; Using the target interface, triggering the first program, recording first flow playback data corresponding to the first program, and cleaning the first flow playback data; Using the target interface, triggering the second program, recording second flow playback data corresponding to the second program, and cleaning the second flow playback data; Obtaining a screening condition generated based on a difference between the first program and the second program; Using the screening condition, the first flow playback comparison data is screened from the cleaned first flow playback data; Using the screening condition, the second flow playback comparison data is screened from the cleaned second flow playback data; Perform a traffic playback comparison on the first traffic playback comparison data and the second traffic playback comparison data to evaluate the pros and cons of the first program.

2. The flow playback comparison test method according to claim 1 is characterized in that: The obtaining of a screening condition generated based on the difference between the first program and the second program includes: Comparing the first program with the second program, and determining a difference function between the first program and the second program; Based on the difference function, a screening condition is constructed.

3. The flow playback comparison test method according to claim 2 is characterized in that: The step of constructing a screening condition based on the difference function includes: Based on the functional type of the difference function, determining all parameter types that need to be compared; Construct filtering conditions based on each parameter type.

4. The flow playback comparison test method according to claim 3 is characterized in that: The filtering conditions are constructed based on various parameter types, including: Construct a parameter setting window corresponding to each parameter type, each parameter setting window is used to input a filter dependency of the corresponding parameter type; Construct filter conditions based on each parameter type and filter dependencies.

5. The flow playback comparison test method according to claim 1 is characterized in that: The performing traffic playback comparison on the first traffic playback comparison data and the second traffic playback comparison data to evaluate the pros and cons of the first program includes: Comparing a first data volume of the first traffic playback comparison data with a second data volume of the second traffic playback comparison data, and determining a data volume score of the first program; Comparing a first generation duration of the first traffic playback comparison data with a second generation duration of the second traffic playback comparison data, and determining a duration score of the first program; Comparing a first coverage rate of the first traffic playback comparison data with a second coverage rate of the second traffic playback comparison data to determine a coverage rate score of the first program; Calculate the total score of the first program by combining the data volume score, the coverage score and the duration score; Based on the total score, the quality of the first program is evaluated.

6. The flow playback comparison test method according to claim 5 is characterized in that: The step of calculating the total score of the first program by integrating the data volume score, the coverage score and the duration score includes: Determine a data volume weight based on the ability of the traffic playback data volume to characterize the quality of the first program; The product of the data volume score and the data volume weight is taken as the data volume product; Determine the weight of the duration based on the ability of the program processing duration to characterize the pros and cons of the first program; The product of the duration score and the duration weight is taken as the duration product; Determining a coverage weight based on the ability of the traffic coverage to characterize the pros and cons of the first program; Taking the product of the coverage score and the coverage weight as the coverage product; The sum of the product of the data volume, the product of the coverage rate and the product of the duration is taken as the total score of the first program.

7. The flow playback comparison test method according to claim 5 is characterized in that: The step of evaluating the pros and cons of the first program based on the total score includes: The total score is compared with a preset score threshold to evaluate the quality of the first program.

8. A flow playback comparison test device, characterized in that: include: An acquisition module, used for acquiring a first program to be released, and a second program for comparative testing with the first program; A determination module, used to determine a target interface for calling the first program and the second program; A recording module, used to trigger the first program by using the target interface, and record the first flow playback data corresponding to the first program, clean the first flow playback data, and trigger the second program by using the target interface, and record the second flow playback data corresponding to the second program, and clean the second flow playback data; A generating module, used for obtaining a screening condition generated based on the difference between the first program and the second program; A screening module, used to screen the first flow playback comparison data from the cleaned first flow playback data by using the screening condition; Using the screening condition, the second flow playback comparison data is screened from the cleaned second flow playback data; An evaluation module is used to perform a traffic playback comparison on the first traffic playback comparison data and the second traffic playback comparison data to evaluate the pros and cons of the first program.

9. A flow playback comparison test 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 playback comparison test method as described in any one of claims 1-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 playback comparison test method as described in any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Method and system for improving flow playback coverage, and storage medium

    CN112631921A

  • Regression testing method and device, equipment and storage medium

    CN115495332A

  • Software code performance testing method and device and electronic equipment

    CN115495337A

  • Traffic recording and playback test method and device and electronic equipment

    CN116955156A

  • Program interface performance analysis method, electronic equipment, storage medium and program product

    CN118260206A