A method, device, equipment and medium for accurately screening playback traffic
By filtering and comparing the historical request data of the first server, the problem of the replay data cannot be accurately filtered, and the accurate test of the functions of the releasing server and the efficient use of the replay data is achieved.
Patent Information
- Application Number
- CN202410947695.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-16
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2044-07-16
AI Technical Summary
The existing technology cannot accurately screen the playback data, resulting in the inability to use the playback data effectively or the test results are meaningless, affecting the precise test of the server to be released.
By obtaining the historical request data of the first server, filtering the data in response to the filtering instruction, the playback data is obtained, and sending it to the first server and the second server at the same time, comparing the response results of the two to determine the response consistency.
The precise screening of playback traffic is realized, so that the playback traffic can accurately test the functions of the server to be released, improve the efficiency of the playback data, and realize the accurate matching of the playback data and the functions to be tested.
Smart Images

Figure CN118802616B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of Internet technology, and specifically relates to a method, device, equipment and medium for accurately screening playback traffic. Background Art
[0002] With the rapid development of science and technology, various types of applications have emerged. At present, for some applications, they are often updated at fixed intervals during user use, such as once every two weeks.
[0003] For some applications, the number of requests from the client often increases dramatically as the number of users increases. In this case, more servers need to be added to respond to the requests from users in a timely manner to ensure the user experience. In some cases, playback data is often used in the process of performance testing of new servers. For example, a new server will be in the grayscale pending release stage, or when a new function is added to an existing server, it will also enter the pending release stage. At this time, grayscale data is needed to complete the test of the server in the pending release stage. Among them, playback data is often the request data that actually occurred. However, there is currently no accurate screening and processing of playback data, resulting in either the playback data being unusable or the use of playback data not bringing useful test results, affecting the accurate testing of the server in the pending release stage. Therefore, how to achieve accurate screening of playback data has also become one of the key factors in testing. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a method, device, equipment and medium for accurately screening playback traffic, and the purpose is to provide a method for accurately screening playback traffic, so that the playback traffic can accurately test the functions of the server to be released, and obtain response results with comparative significance, thereby improving the efficiency of using playback data and achieving accurate matching of playback data with the functions to be tested.
[0005] In a first aspect, an embodiment of the present application provides a method for accurately screening playback traffic, the method comprising:
[0006] Obtain historical request data of the first server;
[0007] In response to a filtering instruction, the historical request data is filtered to obtain playback data; wherein the filtering instruction is obtained by the user adding filtering items based on a filtering page;
[0008] Sending the playback data to the first server and the second server at the same time, and obtaining a first response result after execution by the first server and a second response result after execution by the second server respectively;
[0009] The first response result is compared with the second response result to obtain response result comparison data, and the response consistency between the second server and the first server is determined based on the response result comparison data.
[0010] Further, in response to the filtering instruction, the historical request data is filtered to obtain playback data, including:
[0011] Displaying a filtering page for historical request data; wherein the filtering page is used to provide at least one filtering item in a time dimension, a quantity dimension, a request type dimension, a device dimension, and a user dimension;
[0012] receiving a user's input operation on at least one filter item in the filter page to obtain a filter condition of at least one dimension;
[0013] The historical request data is filtered based on the filtering condition to obtain playback data.
[0014] Furthermore, the filter item of the time dimension is used to input the start time and end time of the historical request data;
[0015] The filter item of the quantity dimension is used to input the total quantity of historical request data;
[0016] The filter item of the request type dimension is used to input at least one of a request target domain name, a target application, and a target function of the historical request data;
[0017] The filter item of the device dimension is used to input device range information and / or IP address information of historical request data;
[0018] The filter item of the user dimension is used to input user identity type information of historical request data.
[0019] Furthermore, after obtaining the historical request data of the first server, the method further includes:
[0020] In response to the shielding instruction, the historical request data is shielded to obtain playback data; wherein the shielding instruction is obtained by the user adding shielding items based on the filtering page.
[0021] Further, in response to the masking instruction, the historical request data is masked to obtain playback data, including:
[0022] In response to the request type dimension being a mask item adding operation for a write request type, a mask condition for the write request type is obtained;
[0023] Among the historical request data, historical request data of a write request type is filtered out to obtain playback data.
[0024] Further, in response to the request type dimension adding an operation for a shielding item of a write request type, before obtaining a shielding condition for the write request type, the method further includes:
[0025] Classify the write request types to obtain data write-in affecting business functions and data write-in not affecting business functions;
[0026] Accordingly, in response to the masking item adding operation for the write request type in the request type dimension, a masking condition for the write request type is obtained, including:
[0027] In response to the request type dimension being a mask item adding operation for a write request type, a mask condition for the write request type is obtained;
[0028] or,
[0029] In response to the operation of adding a masking item of the data writing affecting the business function class in the write request type dimension, a masking condition for the data writing affecting the business function class is obtained.
[0030] Further, after determining the consistency of the response of the second server and the first server based on the response result comparison data, the method further includes:
[0031] If the response consistency is consistent, a functional test pass instruction for the second server is generated.
[0032] In a second aspect, an embodiment of the present application provides a precise screening device for playback traffic, the device comprising:
[0033] A historical request data acquisition module, used to acquire historical request data of the first server;
[0034] A playback data determination module, configured to filter the historical request data in response to a filter instruction to obtain playback data; wherein the filter instruction is obtained by a user adding filter items based on a filter page;
[0035] A response result acquisition module, used to send the playback data to the first server and the second server at the same time, and obtain a first response result after the first server executes the playback data, and a second response result after the second server executes the playback data;
[0036] The consistency comparison module is used to compare the first response result with the second response result to obtain response result comparison data, and determine the response consistency between the second server and the first server based on the response result comparison data.
[0037] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect.
[0038] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0039] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.
[0040] In an embodiment of the present application, historical request data of the first server is obtained; in response to a filtering instruction, the historical request data is filtered to obtain playback data; wherein the filtering instruction is obtained by the user adding filtering items based on a filtering page; the playback data is sent to the first server and the second server at the same time, and a first response result after execution by the first server and a second response result after execution by the second server are obtained respectively; the first response result is compared with the second response result to obtain response result comparison data, and the response consistency between the second server and the first server is determined based on the response result comparison data. The technical solution provided by the present application can reasonably filter the historical request data, so that the playback traffic can accurately test the functions of the server to be released, and obtain response results with comparison significance, thereby improving the use efficiency of the playback data and achieving accurate matching of the playback data with the functions to be tested. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 It is a flowchart of the precise screening method for playback traffic provided in Example 1 of the present application;
[0042] Figure 2 It is a flowchart of a method for accurately screening playback traffic provided in Example 2 of the present application;
[0043] Figure 3 It is a schematic diagram of the precise screening process of playback traffic provided in the second embodiment of the present application;
[0044] Figure 4 It is a structural schematic diagram of a precise screening device for playback traffic provided in Example 3 of the present application;
[0045] Figure 5It is a schematic diagram of the structure of the electronic device provided in Example 4 of the present application. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical scheme and advantages of the present application clearer, the specific embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. It is understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for the convenience of description, only the part related to the present application but not all of the content is shown in the accompanying drawings. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow chart describes each operation (or step) as a sequential process, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of each operation can be rearranged. The process can be terminated when its operation is completed, but it can also have additional steps not included in the accompanying drawings. The process can correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.
[0047] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0048] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0049] In conjunction with the accompanying drawings, the following describes in detail the precise screening method, device, equipment and medium for playback traffic provided by the embodiments of the present application through specific embodiments and their application scenarios.
[0050] Embodiment 1
[0051] Figure 1 Schematic diagram of the process of the accurate screening method of playback traffic provided in the first embodiment of the present application. Figure 1 As shown, the specific steps include:
[0052] S101, obtaining historical request data of the first server;
[0053] First, the present application is applicable to the scenario of filtering playback data based on historical request data for server-side testing. Based on the above scenario, it can be understood that the execution subject of the present application can be a server, or a terminal device used alone to filter historical request data.
[0054] The first server may be an online server, such as a server, which can be used to respond to user requests, such as login requests, recharge requests, item purchase requests, and permission purchase requests issued by the client.
[0055] The historical request data may be request data of different business types issued by the user during the use of the client. Here, the historical request data may be login request data, item purchase request data, recharge request data, etc. Since the first server is an online deployed server, it can respond in time after receiving the request data, for example, responding to the recharge request and increasing the recharge amount for the current balance of the user's current account.
[0056] S102, in response to a filtering instruction, filtering the historical request data to obtain playback data; wherein the filtering instruction is obtained by the user adding filtering items based on a filtering page;
[0057] The filtering instruction may be issued by the user based on certain filtering requirements. The generation of the filtering instruction may be suitable for the user to add filtering items on the filtering page. For example, if a time range is added on the filtering page, all historical request data may be filtered according to the time range to obtain historical request data within the last week or the last 10 days as playback data.
[0058] In this solution, the playback data can be used to re-submit to the server for execution to test whether the responses of the server to be released and the online server to the request are consistent, so as to obtain the improvement plan of the server to be released. The playback data can cover many functions, such as covering all functions of the application, or only some functions can be tested, in which case the playback data only covers some functions, such as the login function or the recharge function.
[0059] S103, sending the playback data to the first server and the second server at the same time, and obtaining a first response result after execution by the first server and a second response result after execution by the second server respectively;
[0060] The second server can be a server to be released. For example, when some functions need to be upgraded, they can be run in grayscale after completing the upgrade of some servers, and then released online after verification that there are no problems. In this solution, the playback of traffic data can be used for automatic regression testing, that is, using online traffic to simultaneously request the online deployed server and the server to be launched, and by comparing the response results, it is determined whether the iterative version meets expectations, thereby discovering possible problems.
[0061] It is understandable that after determining the playback data, the first server and the second server can be requested at the same time through the playback data, and the first response result after the first server executes and the second response result after the second server executes can be obtained respectively. For example, if the playback data is a request data for recharging 10 yuan, then after requesting the first server, the first response result after the first server executes is that the account balance was originally 3 yuan, and after execution, it becomes 13 yuan, and the second response result obtained after the second server executes is also that the account balance was originally 3 yuan, and after execution, it becomes 13 yuan, then there is no problem with the second server executing the recharge request. If the second response result obtained after the second server executes is also that the account balance was originally 3 yuan, and after execution, it is still 3 yuan, or recharging cannot be done and an error is returned, then there is a problem with the second server executing the recharge request, and further improvement is needed.
[0062] S104: Compare the first response result with the second response result to obtain response result comparison data, and determine the consistency of responses of the second server end and the first server end based on the response result comparison data.
[0063] This solution can compare the first response result with the second response result to obtain response result comparison data. For example, the response result comparison data can be comparison data of the amount before and after recharge, or comparison data of the number of logins, and so on.
[0064] In this solution, after determining the response result comparison data, the consistency between the second server and the first server can be determined. For example, after receiving a playback data, the first server and the second server respectively perform a login operation, and in the login record data, the number of logins of both is increased by one, then it is determined that the second server is consistent with the first server.
[0065] In one embodiment, optionally, after determining the consistency of the response of the second server and the first server based on the response result comparison data, the method further includes:
[0066] If the response consistency is consistent, a functional test pass instruction for the second server is generated.
[0067] Among them, if the response consistency is consistent, that is, both can respond to the request correctly, then a functional test pass instruction for the second server can be generated to test other functions, or the server can be deployed online.
[0068] In another example, the second server may need to perform a preset number of response operations on a certain function, and if the response consistency is consistent, the function test is determined to have passed. For example, for the recharge function, the execution results must be consistent with the execution results of the first server after 1,000 executions, and the function test is determined to have passed.
[0069] The technical solution provided in this embodiment can give a function test pass instruction when the response consistency is consistent, so as to perform tests on other functions or perform online deployment, thereby improving the test efficiency for the second server.
[0070] The technical solution provided in this embodiment obtains the historical request data of the first server; in response to the filtering instruction, filters the historical request data to obtain playback data; wherein the filtering instruction is obtained by the user adding filtering items based on the filtering page; the playback data is sent to the first server and the second server at the same time, and the first response result after the execution of the first server and the second response result after the execution of the second server are obtained respectively; the first response result is compared with the second response result to obtain response result comparison data, and the response consistency between the second server and the first server is determined based on the response result comparison data. This technical solution can reasonably filter the historical request data, so that the playback traffic can accurately test the functions of the server to be released, and obtain response results with comparison significance, thereby improving the use efficiency of the playback data and achieving accurate matching of the playback data with the functions to be tested.
[0071] Embodiment 2
[0072] Figure 2 It is a flow chart of the precise screening method for playback traffic provided in Example 2 of the present application. This solution makes a better improvement on the above-mentioned embodiment, and the specific improvement is: in response to the screening instruction, the historical request data is screened to obtain playback data, including: displaying a screening page for historical request data; wherein the screening page is used to provide at least one screening item in the time dimension, quantity dimension, request type dimension, device dimension and user dimension; receiving the user's information filling operation for at least one screening item in the screening page, and obtaining the screening condition of at least one dimension; based on the screening condition, the historical request data is screened to obtain playback data.
[0073] like Figure 2As shown, the specific steps include:
[0074] S201, obtaining historical request data of the first server;
[0075] S202, displaying a filtering page for historical request data; wherein the filtering page is used to provide at least one filtering item among a time dimension, a quantity dimension, a request type dimension, a device dimension, and a user dimension;
[0076] Among them, the time dimension can be used to provide a selected time range, such as within the last week, or from the 1st to the 10th of this month, etc. The quantity dimension can be the quantity used to filter historical request data, such as 1,000, 10,000, or the quantity for different functions, such as 100 login functions, 300 recharge functions, etc. The request type dimension can include login request type, recharge request type, password change request type, item purchase request type, etc. The device dimension can be the client's installed device, such as the device's hardware parameter information, such as disk space size, operating system, etc., or the device model, such as the model of a smartphone, tablet computer, desktop computer, etc. It can also be the network information of the installed device, such as the IP address, etc. The user dimension can include the user's age group, work attributes, work location, daily login time, etc.
[0077] It is understandable that the historical request data may include information of the above dimensions, and in the process of filtering the historical request data, filtering may be performed based on one or more of the above dimensions.
[0078] Based on the above technical solutions, optionally, the filter item of the time dimension is used to input the start time and end time of the historical request data;
[0079] The filter item of the quantity dimension is used to input the total quantity of historical request data;
[0080] The filter item of the request type dimension is used to input at least one of a request target domain name, a target application, and a target function of the historical request data;
[0081] The filter item of the device dimension is used to input device range information and / or IP address information of historical request data;
[0082] The filter item of the user dimension is used to input user identity type information of historical request data.
[0083] Among them, the start time and the end time can be selected by providing a drop-down window for the user. It should be noted that the start time should be before the end time, so after the start time is selected, the end time can only be selected within the range after the start time. The total number of historical request data can be the total number used for the return data screening this time. The user can determine this number according to actual needs. When the total number entered by the user exceeds the total number of the current historical request data, all historical request data are deemed to meet the total number of return data screening. The filter item of the request type dimension is used to input at least one of the request target domain name, target application and target function of the historical request data; for example, the request target domain name is 37.com, and the target application can refer to when the first server serves multiple applications at the same time, and the historical request data can be filtered for one or more target applications. In addition, it can also be the channel to enter the application. The target function is as described above and will not be repeated here. The filter item of the device dimension is used to input the device range information and / or IP address information of the historical request data, wherein the device range information can be the address range of the device, such as a certain city, and the IP address information can be the network address information of the user using the device to connect to the network. The filter items of the user dimension are used to input the user identity type information of the historical request data. For example, the user inputs his / her work attributes, leisure time period and other information. The above information can be input by the user and used to select the historical request data.
[0084] Through such a setting, this solution can make the information that can be input for each filter item more flexible, and can achieve more fine-grained filtering of historical request data, thereby achieving accurate filtering of historical request data.
[0085] S203, receiving a user's input operation on at least one filter item in the filter page, and obtaining a filter condition of at least one dimension;
[0086] After the user fills in information for one or more filter items in the filter page, the filter information of the dimension can be determined. For example, in the time dimension, if the user enters 00:00:00 on June 1 to 23:59:59 on June 10, the filter condition in the time dimension can be obtained as all historical request data between June 1 and June 10. Similarly, the user can also fill in information for other filter items to obtain filter conditions for other dimensions.
[0087] It is understandable that if the user does not fill in the information for a certain filtering item, it can be determined that the user does not need to filter the information of this dimension. In subsequent filtering operations, the information of this dimension can be ignored, and the historical request data can be filtered only based on the dimension information that has been filled in.
[0088] S204, filtering the historical request data based on the filtering condition to obtain playback data;
[0089] After clarifying the filtering conditions, you can filter the historical request data to obtain playback data. It should be noted that if a dimension of a filtering condition does not have information of that dimension in some historical request data, it can be determined that the historical request data does not meet the filtering conditions, which can avoid affecting subsequent testing links.
[0090] S205, sending the playback data to the first server and the second server at the same time, and obtaining a first response result after execution by the first server and a second response result after execution by the second server respectively;
[0091] S206: Compare the first response result with the second response result to obtain response result comparison data, and determine the consistency of responses of the second server and the first server based on the response result comparison data.
[0092] The technical solution provided in this embodiment provides a method for users to input specific filter items on the filter page. Through such a setting, this solution can achieve accurate filtering of historical request data, making the obtained playback data more practical and providing more accurate data for subsequent playback execution and comparison between the server.
[0093] Based on the above technical solutions, optionally, after obtaining the historical request data of the first server, the method further includes:
[0094] In response to the shielding instruction, the historical request data is shielded to obtain playback data; wherein the shielding instruction is obtained by the user adding shielding items based on the filtering page.
[0095] In this solution, you can enter the shielding items while entering the filtering items, where the shielding line can also be displayed in the filtering page, and you can enter the shielding content to generate shielding conditions based on the shielding content to shield the historical request data.
[0096] For example, the upper part of the filter page is an input interface for filter items, and the lower part of the filter page is an input interface for mask items. Specifically, the adding method can be the same as the adding method for filter items.
[0097] Through such a setting, this solution can shield some unnecessary historical request data to avoid playback of this part of data and cause errors in the information on the server.
[0098] On the basis of the above technical solution, optionally, in response to a masking instruction, the historical request data is masked to obtain playback data, including:
[0099] In response to the request type dimension being a mask item adding operation for a write request type, a mask condition for the write request type is obtained;
[0100] Among the historical request data, historical request data of a write request type is filtered out to obtain playback data.
[0101] The request type dimension may include a read request type and a write request type. The read request type may be for reading data on the server, such as reading the current account balance, reading the equipment information of the current account, etc., while the write request type requires writing information, such as writing the number of historical logins, writing the recharge result obtained after the user issues a recharge request, etc.
[0102] In this solution, in order to ensure that the data on the server side is accurate during traffic playback, the user can be supported to choose to add a write request type in the shielded item adding operation to ensure the accuracy of the server-side database information. Otherwise, if a user recharges 20 yuan and gets an account balance of 25 yuan, after completing the playback of a recharge request, the account balance becomes 45 yuan, which will cause financial losses on the operator side.
[0103] Through such a setting, this solution can shield the write request type so that the data on the server side remains safe and accurate after playback, thus avoiding financial losses to users or operators due to improper write operations.
[0104] Based on the above technical solution, optionally, before obtaining the shielding condition for the write request type in response to the request type dimension adding a shielding item operation for the write request type, the method further includes:
[0105] Classify the write request types to obtain data write-in affecting business functions and data write-in not affecting business functions;
[0106] Accordingly, in response to the masking item adding operation for the write request type in the request type dimension, a masking condition for the write request type is obtained, including:
[0107] In response to the request type dimension being a mask item adding operation for a write request type, a mask condition for the write request type is obtained;
[0108] or,
[0109] In response to the operation of adding a masking item of the data writing affecting the business function class in the write request type dimension, a masking condition for the data writing affecting the business function class is obtained.
[0110] Among them, the write request types can be classified to obtain data writing affecting business functions, such as recharge requests, equipment purchase requests, equipment sale requests, etc., and data writing not affecting business functions, such as login count write requests, online time statistics write requests, etc.
[0111] Furthermore, in the process of adding shielding items, users can determine to shield all write request types according to test requirements, or only shield write requests that affect business functions. It can be understood that through such subdivision, compared with the previous method of completely shielding write requests, this solution not only provides users with multiple options, but also allows users to choose to use the historical request data of some write requests as playback data, making the playback data more comprehensive and more in line with the user's testing requirements for the server to be released.
[0112] Through such a setting, this solution can provide users with more detailed selection content while subdividing the write request types, and support the historical request data of some write requests to be used as playback data, so as to better meet the user's testing needs and realize accurate screening of playback data.
[0113] Figure 3 This is a schematic diagram of the precise screening process of playback traffic provided by Example 2 of the present application. In a specific embodiment, this solution can adopt the following steps:
[0114] Step 1: Traffic collection: collect real historical online requests, such as the last week or the last half month.
[0115] Step 2: Traffic screening: according to the input conditions, block unreasonable requests, unnecessary requests, and screen the specified requests and quantities;
[0116] Step 3: Traffic playback: request the online service and the service to be tested at the same time through the filtered requests to obtain the return results;
[0117] Step 4: Compare the results. Compare the results returned by the online service and the service to be released to find problems with the service to be released.
[0118] In the past, traffic replay tools could only be used to replay read traffic. By blocking and specifying, they can also be used to replay write traffic, because some write requests will not cause problems after replay.
[0119] In this solution, by blocking unreasonable requests, we can prevent the request from reaching the online service, which would result in dirty data after the online service is executed. In addition, this solution filters requests based on domain name, URL, and input parameters to improve the accuracy of traffic.
[0120] Embodiment 3
[0121] Figure 4 Schematic diagram of the structure of the accurate screening device for playback traffic provided in the third embodiment of the present application. Figure 4 As shown, the device comprises:
[0122] A historical request data acquisition module 401 is used to acquire historical request data of the first server;
[0123] The playback data determination module 402 is used to filter the historical request data in response to a filtering instruction to obtain playback data; wherein the filtering instruction is obtained by the user adding filtering items based on the filtering page;
[0124] A response result acquisition module 403 is used to send the playback data to the first server and the second server at the same time, and obtain a first response result after the first server executes the playback data, and a second response result after the second server executes the playback data;
[0125] The consistency comparison module 404 is used to compare the first response result with the second response result to obtain response result comparison data, and determine the response consistency between the second server and the first server based on the response result comparison data.
[0126] The technical solution provided in this embodiment obtains the historical request data of the first server; in response to the filtering instruction, filters the historical request data to obtain playback data; wherein the filtering instruction is obtained by the user adding filtering items based on the filtering page; the playback data is sent to the first server and the second server at the same time, and the first response result after the execution of the first server and the second response result after the execution of the second server are obtained respectively; the first response result is compared with the second response result to obtain response result comparison data, and the response consistency between the second server and the first server is determined based on the response result comparison data. This technical solution can reasonably filter the historical request data, so that the playback traffic can accurately test the functions of the server to be released, and obtain response results with comparison significance, thereby improving the use efficiency of the playback data and achieving accurate matching of the playback data with the functions to be tested.
[0127] The precise screening device for playback traffic in the embodiment of the present application can be a device, or a component, integrated circuit or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and the non-mobile electronic device can be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0128] The precise screening device for playback traffic in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an IOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0129] The precise screening device for playback traffic provided in the embodiment of the present application can implement each process implemented in the above method embodiment, and will not be described again here to avoid repetition.
[0130] Embodiment 4
[0131] Figure 5 Schematic diagram of the structure of the electronic device provided in the fourth embodiment of the present application. Figure 5 As shown, an embodiment of the present application also provides an electronic device 500, including a processor 501, a memory 502, and a program or instruction stored in the memory 502 and executable on the processor 501. When the program or instruction is executed by the processor 501, each process of the above-mentioned embodiment of the precise screening device for playback traffic is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.
[0132] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0133] Embodiment 5
[0134] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned embodiment of the precise screening device for playback traffic is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0135] The processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0136] Embodiment 6
[0137] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned embodiment of the precise screening device for playback traffic, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0138] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0139] It should be noted that, in this article, the terms "comprise", "include" or any other variant 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, an element defined by the sentence "comprises one..." does not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the method and device in the embodiment of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0140] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0141] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
[0142] The above are only preferred embodiments of the present application and the technical principles used. The present application is not limited to the specific embodiments described herein, and various obvious changes, readjustments and substitutions that can be made by those skilled in the art will not deviate from the scope of protection of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the claims.
Claims
1. A precise screening method for playback traffic, characterized in that: The method comprises: Obtain historical request data of the first server; In response to a filtering instruction, the historical request data is filtered to obtain playback data; wherein the filtering instruction is obtained by the user adding filtering items based on a filtering page; Sending the playback data to the first server and the second server at the same time, and obtaining a first response result after execution by the first server and a second response result after execution by the second server respectively; Comparing the first response result with the second response result to obtain response result comparison data, and determining the consistency of responses of the second server and the first server based on the response result comparison data; After obtaining the historical request data of the first server, the method further includes: In response to the shielding instruction, the historical request data is shielded to obtain playback data; wherein the shielding instruction is obtained by the user adding shielding items based on the filtering page; Wherein, in response to the shielding instruction, the historical request data is shielded to obtain the playback data, including: In response to the request type dimension being a mask item adding operation for a write request type, a mask condition for the write request type is obtained; Filter out the historical request data of the write request type from the historical request data to obtain playback data; Wherein, before obtaining the shielding condition for the write request type in response to the request type dimension adding a shielding item operation for the write request type, the method further includes: The write request types are classified into data writing affecting business functions and data writing not affecting business functions; wherein the data writing affecting business functions includes: recharge request, equipment purchase request and equipment sale request, and the data writing not affecting business functions includes login times writing request and online time statistics writing request; Accordingly, in response to the masking item adding operation for the write request type in the request type dimension, a masking condition for the write request type is obtained, including: In response to the operation of adding a masking item for a write request type in the request type dimension, a masking condition for the write request type is obtained to mask only the write requests of the business function class that affect data writing.
2. The accurate screening method for playback traffic according to claim 1 is characterized in that: In response to the filtering instruction, the historical request data is filtered to obtain playback data, including: Displaying a filtering page for historical request data; wherein the filtering page is used to provide at least one filtering item in a time dimension, a quantity dimension, a request type dimension, a device dimension, and a user dimension; receiving a user's input operation on at least one filter item in the filter page to obtain a filter condition of at least one dimension; The historical request data is filtered based on the filtering condition to obtain playback data.
3. The accurate screening method for playback traffic according to claim 2 is characterized in that: The filter item of the time dimension is used to input the start time and end time of historical request data; The filter item of the quantity dimension is used to input the total quantity of historical request data; The filter item of the request type dimension is used to input at least one of a request target domain name, a target application, and a target function of the historical request data; The filter item of the device dimension is used to input device range information and / or IP address information of historical request data; The filter item of the user dimension is used to input user identity type information of historical request data.
4. The accurate screening method for playback traffic according to claim 1 is characterized in that: In response to the request type dimension being a shielding item adding operation for a write request type, obtaining a shielding condition for the write request type further includes: In response to the operation of adding a masking item of the data writing affecting the business function class in the write request type dimension, a masking condition for the data writing affecting the business function class is obtained.
5. The accurate screening method of playback traffic according to claim 1 is characterized in that: After determining the consistency of the response of the second server and the first server based on the response result comparison data, the method further includes: If the response consistency is consistent, a functional test pass instruction for the second server is generated.
6. A precise screening device for playback traffic, characterized in that: The device comprises: A historical request data acquisition module, used to acquire historical request data of the first server; A playback data determination module, configured to filter the historical request data in response to a filter instruction to obtain playback data; wherein the filter instruction is obtained by a user adding filter items based on a filter page; A response result acquisition module, used to send the playback data to the first server and the second server at the same time, and obtain a first response result after the first server executes the playback data, and a second response result after the second server executes the playback data; a consistency comparison module, configured to compare the first response result with the second response result to obtain response result comparison data, and determine the consistency of the response of the second server end with that of the first server end based on the response result comparison data; After obtaining the historical request data of the first server, the method further includes: In response to the shielding instruction, the historical request data is shielded to obtain playback data; wherein the shielding instruction is obtained by the user adding shielding items based on the filtering page; Wherein, in response to the shielding instruction, the historical request data is shielded to obtain the playback data, including: In response to the request type dimension being a mask item adding operation for a write request type, a mask condition for the write request type is obtained; Filter out the historical request data of the write request type from the historical request data to obtain playback data; Wherein, in response to the request type dimension being a shielding item adding operation for writing the request type, before obtaining the shielding condition for the writing request type, the method further includes: The write request types are classified into data writing affecting business functions and data writing not affecting business functions; wherein the data writing affecting business functions includes: recharge request, equipment purchase request and equipment sale request, and the data writing not affecting business functions includes login times writing request and online time statistics writing request; Accordingly, in response to the masking item adding operation for the write request type in the request type dimension, a masking condition for the write request type is obtained, including: In response to the operation of adding a masking item for a write request type in the request type dimension, a masking condition for the write request type is obtained to mask only the write requests of the business function class that affect data writing.
7. An electronic device, characterized in that: It includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein when the program or instruction is executed by the processor, the accurate screening method for playback traffic as described in any one of claims 1 to 5 is implemented.
8. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the accurate screening method for playback traffic according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Performance testing method and device
CN110457199A
Interface test method based on flow data, electronic device and storage medium
CN112214395A
Big data comparison test method and device, electronic equipment and storage medium
CN115203017A
Service system test method, system, equipment and medium
CN116974948A