Data analysis method, device, computer equipment and medium for batch task testing
By comparing the batch task test results of the current and historical versions, exception prompt information is generated, which solves the problem of inaccurate processing efficiency analysis after system update, ensuring that the system performance meets the requirements.
Patent Information
- Application Number
- CN202211005015.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-22
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2042-08-22
AI Technical Summary
The prior art cannot accurately reflect the improvement or reduction of processing efficiency after system version update, resulting in the system that may not meet data processing requirements after update.
By obtaining the online test data of the current version of the system, real-time batch results are determined, and compared with the batch test results of each historical version, baseline data and time-consuming data are collected, and prompt information is generated to display abnormal historical versions and time-consuming data.
Accurate analysis of the system after updating is achieved, avoiding the situation where the processing efficiency cannot be improved after the system is launched, and ensuring that the system performance meets the requirements.
Smart Images

Figure CN115344495B_ABST
Abstract
Description
Technical Field
[0001] This application is applicable to the technical field of test analysis, and particularly relates to a data analysis method, device, computer device and medium for batch task testing. Background Art
[0002] At present, with the explosive growth of the data volume of data management, the processing volume of data in a business system increases. Especially for the banking system, the daily batch entry and on-time processing is the basic requirement of bank entry. The growth of banking business has a linear impact on the batch-processed data. Billions of data volumes need to be analyzed by the system. Therefore, the processing efficiency of the system has become the main factor affecting the daily on-time entry and real-time change of the business. In this regard, the system needs to be updated frequently to avoid the situation of efficiency decline caused by long-term operation of the system. However, after the system version is updated, it is necessary to test the current application scenario to determine whether the updated system can meet the corresponding data processing requirements, such as batch data processing. The existing test process is relatively simple, and the analysis of test results cannot accurately reflect the problems of the updated system, which may lead to the situation that the processing efficiency cannot be improved after the updated system is put on the market. Therefore, how to accurately analyze the test results of the new version system has become an urgent problem to be solved. Summary of the Invention
[0003] In view of this, the embodiments of this application provide a data analysis method, device, computer device and medium for batch task testing to solve the problem of how to accurately analyze the test results of the new version system.
[0004] In a first aspect, the embodiments of this application provide a data analysis method for batch task testing. The data analysis method includes:
[0005] Obtain the online test data of the system of the current version, and determine the real-time batch result according to the mapping relationship between the online test data and the batch task. The real-time batch result is the test result of batch testing of the system of the current version using the batch task collected offline;
[0006] Take the historical test results of batch testing the batch task in the systems of each historical version as a historical batch result to obtain a historical batch result set, and compare the real-time batch result with each historical batch result in the historical batch result set respectively;
[0007] Take each comparison as a comparison task. After obtaining the comparison result, collect the task time consumption of each comparison task, and extract the baseline data and time consumption data used when the first N comparison tasks are executed. N is an integer greater than zero;
[0008] Determine a time-consuming range according to the baseline data and the time-consuming data. If there is a comparison task among the task time consumptions of each comparison task that exceeds the time-consuming range, generate a prompt message, where the prompt message is used to display the historical version, task time consumption, and corresponding baseline data and time-consuming data when the comparison task is executed.
[0009] In one embodiment, determining the time-consuming range according to the baseline data and the time-consuming data includes:
[0010] Determine a variance baseline value according to the baseline data, and determine an average time consumption according to the time-consuming data;
[0011] Take the range corresponding to the average time consumption fluctuating up and down by the variance baseline value as the time-consuming range.
[0012] In one embodiment, extracting the baseline data and time-consuming data used when the previous N comparison tasks are executed includes:
[0013] Take the historical batch results corresponding to the previous N comparison tasks as the target batch results, and obtain the test time consumption and test data volume of each task in the batch tasks in the target batch results;
[0014] Take the average value of the test time consumption of each task as the time-consuming data corresponding to the comparison task, and take the average value of the test data volume of each task as the baseline data corresponding to the comparison task.
[0015] In one embodiment, comparing the real-time batch result with each historical batch result in the historical batch result set includes:
[0016] Compare the real-time processing duration in the real-time batch result with the historical processing duration in each historical batch result in the historical batch result set respectively;
[0017] Display the historical batch results whose historical processing duration is less than the real-time processing duration.
[0018] In one embodiment, after comparing the real-time processing duration in the real-time batch result with the historical processing duration in each historical batch result in the historical batch result set respectively, it further includes:
[0019] Obtain the test time consumption of each task in the real-time batch result and the test time consumption of each task in the historical batch result;
[0020] Calculate the real-time average time consumption corresponding to the real-time batch result and the historical average time consumption corresponding to the historical batch result;
[0021] Determine that the historical average time consumption less than the real-time average time consumption corresponds to the historical batch result as the first abnormal batch result;
[0022] Displaying the historical batch results with the historical processing duration less than the real-time processing duration includes:
[0023] From the first abnormal batch results, determine and display the historical batch results with the historical processing duration less than the real-time processing duration.
[0024] In one embodiment, comparing the real-time batch result with each historical batch result in the historical batch result set includes:
[0025] Compare the real-time resource consumption in the real-time batch result with the historical resource consumption in each historical batch result in the historical batch result set respectively;
[0026] Display the historical batch results with the historical resource consumption less than the real-time resource consumption.
[0027] In one embodiment, after comparing the real-time resource consumption in the real-time batch result with the historical resource consumption in each historical batch result in the historical batch result set respectively, it further includes:
[0028] Obtain the real-time test data volume in the real-time batch result and the historical test data volume in the historical batch result;
[0029] Calculate the real-time average consumption according to the real-time resource consumption and the real-time test data volume, and calculate the historical average consumption according to the historical resource consumption and the historical test data volume;
[0030] Determine that the historical batch result corresponding to the historical average consumption less than the real-time average consumption is the second abnormal batch result;
[0031] Displaying the historical batch results with the historical resource consumption less than the real-time resource consumption includes:
[0032] From the second abnormal batch results, determine and display the historical batch results with the historical resource consumption less than the real-time resource consumption.
[0033] In a second aspect, an embodiment of the present application provides a data analysis device for batch task testing, and the data analysis device includes:
[0034] A real-time result acquisition module, which is used to acquire online test data of the current version of the system, and determine a real-time batch result according to the mapping relationship between the online test data and the batch task, where the real-time batch result is a test result of offline collection for batch testing the current version of the system using the batch task;
[0035] A batch result comparison module, which is used to take the historical test result of batch testing the batch task in each historical version of the system as a historical batch result, obtain a historical batch result set, and compare the real-time batch result with each historical batch result in the historical batch result set respectively;
[0036] A comparison task calculation module, which is used to take each comparison as a comparison task. After obtaining the comparison result, collect the task duration of each comparison task, and extract the baseline data and duration data used when the first N comparison tasks are executed, where N is an integer greater than zero;
[0037] A task data analysis module, which is used to determine a duration range according to the baseline data and the duration data. If there is a comparison task whose task duration exceeds the duration range among the task durations of each comparison task, generate a prompt message, where the prompt message is used to display the historical version, task duration, and corresponding baseline data and duration data when the comparison task is executed.
[0038] In an embodiment, the task data analysis module includes:
[0039] An average duration determination unit, which is used to determine a variance baseline value according to the baseline data, and determine an average duration according to the duration data;
[0040] A duration range determination unit, which is used to take the range corresponding to floating the average duration by the variance baseline value as the duration range.
[0041] In an embodiment, the comparison task calculation module includes:
[0042] A data acquisition unit, which is used to take the historical batch results corresponding to the first N comparison tasks as target batch results, and acquire the test duration and test data volume of each task in the batch task in the target batch results;
[0043] A data determination unit, which is used to take the average value of the test duration of each task as the duration data corresponding to the comparison task, and take the average value of the test data volume of each task as the baseline data corresponding to the comparison task.
[0044] In an embodiment, the batch result comparison module includes:
[0045] A first comparison unit for comparing the real-time processing duration in the real-time batch result with the historical processing duration in each historical batch result in the historical batch result set respectively;
[0046] A first display unit for displaying the historical batch results whose historical processing duration is less than the real-time processing duration.
[0047] In one embodiment, the batch result comparison module further includes:
[0048] A time-consuming acquisition unit for obtaining the test time-consuming of each task in the real-time batch result and the test time-consuming of each task in the historical batch result after comparing the real-time processing duration in the real-time batch result with the historical processing duration in each historical batch result in the historical batch result set respectively;
[0049] An average time-consuming determination unit for calculating the real-time average time-consuming corresponding to the real-time batch result and the historical average time-consuming corresponding to the historical batch result;
[0050] A first anomaly determination unit for determining the historical batch results whose historical average time-consuming is less than the real-time average time-consuming as the first anomaly batch results;
[0051] The first display unit is specifically configured to:
[0052] Determine and display the historical batch results whose historical processing duration is less than the real-time processing duration from the first anomaly batch results.
[0053] In one embodiment, the batch result comparison module includes:
[0054] A second comparison unit for comparing the real-time resource consumption in the real-time batch result with the historical resource consumption in each historical batch result in the historical batch result set respectively;
[0055] A second display unit for displaying the historical batch results whose historical resource consumption is less than the real-time resource consumption.
[0056] In one embodiment, the batch result comparison module further includes:
[0057] A data volume acquisition unit for obtaining the real-time test data volume in the real-time batch result and the historical test data volume in the historical batch result after comparing the real-time resource consumption in the real-time batch result with the historical resource consumption in each historical batch result in the historical batch result set respectively;
[0058] A consumption determination unit is configured to calculate a real-time average consumption according to the real-time resource consumption and the real-time test data volume, and calculate a historical average consumption according to the historical resource consumption and the historical test data volume;
[0059] A second anomaly determination unit is configured to determine that a historical batch result corresponding to the historical average consumption being less than the real-time average consumption is a second abnormal batch result;
[0060] The second display unit is specifically configured to:
[0061] Determine and display, from the second abnormal batch results, historical batch results in which the historical resource consumption is less than the real-time resource consumption.
[0062] In a third aspect, an embodiment of the present application provides a computer device, which includes a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the data analysis method as described in the first aspect and its improvements.
[0063] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the data analysis method as described in the first aspect and its improvements.
[0064] The beneficial effects of the embodiments of the present application compared with the prior art are as follows: By obtaining the online test data of the current version of the system and determining the real-time batch result according to the mapping relationship between the online test data and the batch task, taking the historical test results of batch testing the batch task in each historical version of the system as a historical batch result to obtain a set of historical batch results, comparing the real-time batch result with each historical batch result in the set of historical batch results respectively, taking each comparison as a comparison task, after obtaining the comparison results, collecting the task time consumption of each comparison task, extracting the baseline data and time consumption data used when the first N comparison tasks are executed, determining the time consumption range according to the baseline data and the time consumption data, and if there is a comparison task whose task time consumption exceeds the time consumption range among the task time consumptions of each comparison task, generating a prompt message, the embodiments of the present application realize the analysis of the test results, can generate the historical version corresponding to the anomaly and its corresponding data, so as to accurately reflect the problems of the updated system, and avoid the situation that the processing efficiency cannot be improved after the updated system is put on the line. Description of the Drawings
[0065] To more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the accompanying drawings required for use in the embodiments or the description of the prior art. Obviously, the accompanying drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0066] Figure 1 It is a schematic diagram of an application environment of a data analysis method for batch task testing provided in the first embodiment of the present application;
[0067] Figure 2 It is a schematic flowchart of a data analysis method for batch task testing provided in the second embodiment of the present application;
[0068] Figure 3 It is a schematic flowchart of a data analysis method for batch task testing provided in the third embodiment of the present application;
[0069] Figure 4 It is a schematic structural diagram of a data analysis device for batch task testing provided in the fifth embodiment of the present application;
[0070] Figure 5 It is a schematic structural diagram of a computer device provided in the sixth embodiment of the present application. Detailed implementation manners
[0071] In the following description, for the purpose of illustration rather than limitation, specific details such as specific system structures and technologies are presented to thoroughly understand the embodiments of the present application. However, those skilled in the art should clearly understand that the present application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from interfering with the description of the present application.
[0072] It should be understood that when used in the specification of the present application and the appended claims, the term "comprising" indicates the presence of the described features, wholes, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their combinations.
[0073] It should also be understood that the term " / and" as used in the specification of the present application and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0074] As used in the specification and the appended claims of this application, the term "if" can be interpreted as "when" or "once" or "in response to determining" or "in response to detecting" depending on the context. Similarly, the phrase "if determined" or "if [the described condition or event] is detected" can be interpreted as meaning "once determined" or "in response to determining" or "once [the described condition or event] is detected" or "in response to detecting [the described condition or event]" depending on the context.
[0075] In addition, in the description of the specification and the appended claims of this application, the terms "first", "second", "third", etc. are only used for distinguishing descriptions and cannot be construed as indicating or implying relative importance.
[0076] The reference to "one embodiment" or "some embodiments" or the like described in the specification of this application means that a specific feature, structure, or characteristic described in connection with that embodiment is included in one or more embodiments of this application. Thus, statements such as "in one embodiment", "in some embodiments", "in other some embodiments", "in still other embodiments", etc. that appear in different places in this specification do not necessarily all refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in another way. The terms "comprising", "including", "having", and their variants all mean "including but not limited to", unless otherwise specifically emphasized in another way.
[0077] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is a theory, method, technology, and application system that uses a digital computer or a machine controlled by a digital computer to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use knowledge to obtain the best results.
[0078] Artificial intelligence basic technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. Artificial intelligence software technologies mainly include several major directions such as computer vision technology, robotics, biometric technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0079] It should be understood that the magnitudes of the sequence numbers of the steps in the following embodiments do not mean the order of execution is prior or subsequent. The order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of this application.
[0080] In order to illustrate the technical solutions of this application, specific embodiments will be used for illustration below.
[0081] A data analysis method for batch task testing provided in Embodiment 1 of this application can be applied in an application environment such as Figure 1 where the client communicates with the server. The client includes, but is not limited to, computer devices such as a palm computer, a desktop computer, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a cloud computer device, and a personal digital assistant (PDA). The server can be implemented by an independent server or a server cluster composed of multiple servers.
[0082] See Figure 2 , which is a schematic flowchart of a data analysis method for batch task testing provided in Embodiment 2 of this application. The above data analysis method can be applied to Figure 1 the computer device corresponding to the server or the client in Figure 2 . If it is executed in the server, the server needs to connect to the corresponding system, system database, test result library, etc. to obtain the data in the system and the corresponding data in the database. If it is executed in the client, the client needs to connect to the corresponding system, system database, test result library, etc. through the server to obtain the data in the system and the corresponding data in the database. As
[0083] Step S201: Obtain the online test data of the current version of the system, and determine the real-time batch result according to the mapping relationship between the online test data and the batch task.
[0084] In this application, the system can be any business system that needs to be updated and tested. The business system can process data according to its own operation logic, including calculation, transmission, statistics, etc. For example, the system of a bank needs to perform batch account entry and has high requirements for timeliness. Therefore, for batch account entry, high efficiency is required, and the time consumption and resource occupancy of account entry are the basis for measuring the capabilities of the bank system.
[0085] The current version is the version that needs to be updated and launched. Before the system is updated and launched, it needs to analyze the test results through the data analysis method of this application, and then it can enter the stage of update and launch.
[0086] The online test data can refer to the test data used during pre-operation for the system (i.e., running in a container before the system goes online). This test data is for a single task and is the data used to execute the task.
[0087] The mapping relationship between test data and tasks is stored in the corresponding database. When the test data on the production line is determined, a series of corresponding tasks can be determined. For offline tasks, for the current version of the system, when the system is developed, each task corresponds to an execution result of the task. Among them, the execution result can include the execution accuracy rate, recall rate, execution duration, resource occupancy, etc., and the content of the execution result is filled according to the actual test requirements.
[0088] All tasks corresponding to the online test data can be determined. All tasks constitute batch tasks. The set of execution results of all tasks is the batch execution result. Therefore, the real-time batch result is the test result of the batch test of the current version of the system collected offline using batch tasks. Among them, the above batch execution result can be used as the test result. Of course, in one implementation, it is necessary to perform statistical analysis on the batch execution result and use the result of the statistical analysis as the test result.
[0089] Statistical analysis can refer to the statistics of the content of the above execution results, including calculating the mean value, variance, regression analysis, etc.
[0090] Step S202: Use the historical test results of batch testing the batch tasks in each historical version of the system as a historical batch result to obtain a set of historical batch results, and compare the real-time batch result with each historical batch result in the set of historical batch results respectively.
[0091] In this application, the historical version is a series of versions of the system before the current time. Since batch testing is performed for each version of the system before it is updated and launched, correspondingly, the result of the batch test is the historical test result, that is, the historical batch result.
[0092] The set of historical batch results of all historical versions forms a set of historical batch results. The real-time batch result is compared with each historical batch result. Among them, the comparison is to compare each item or each type of result in the batch result one by one. Combining the preset conditions, the comparison result can be given.
[0093] The batch tasks used in the batch testing of the above historical version of the system are the same as those corresponding to the batch tasks of the current version of the system, otherwise there is no comparison for execution. The batch testing of the historical version of the system can refer to, before the corresponding historical version of the system is updated and launched, according to the mapping relationship between its online data and batch tasks, combined with the test results collected offline.
[0094] In one embodiment, the batch testing of the historical version of the system may refer to making the system of the corresponding historical version actually execute batch tasks after it is updated and launched online, obtaining the results of the batch testing, so that the test results of the current version of the system can be compared with the test results of the real historical version of the system, which can better and more accurately reflect the performance of the current version of the system.
[0095] Optionally, comparing the real-time batch result with each historical batch result in the historical batch result set includes:
[0096] Comparing the real-time processing duration in the real-time batch result with the historical processing duration in each historical batch result in the historical batch result set respectively;
[0097] Displaying the historical batch results with the historical processing duration less than the real-time processing duration.
[0098] Among them, for comparison, a comparison result needs to be finally obtained. In order to better and more intuitively let developers see the differences between the current version of the system and the historical version of the system, therefore, the differences need to be displayed.
[0099] At this time, taking the processing duration as the object of comparison means comparing the real-time processing duration in the real-time batch result with the historical processing duration in the historical batch result. If the historical processing duration is less than the real-time processing duration, it means that the performance of the current version of the system corresponding to this real-time processing duration is inferior to that of the historical version of the system. Therefore, it can be determined as abnormal, and the historical batch result corresponding to the historical version of the system can be displayed so that developers can observe the differences.
[0100] In addition, the code for processing batch tasks in the corresponding historical version of the system can also be displayed, so that developers can improve the code of the current version of the system according to this historical code.
[0101] Optionally, after comparing the real-time processing duration in the real-time batch result with the historical processing duration in each historical batch result in the historical batch result set respectively, it further includes:
[0102] Obtaining the test duration of each task in the real-time batch result and the test duration of each task in the historical batch result;
[0103] Calculating the real-time average duration corresponding to the real-time batch result and the historical average duration corresponding to the historical batch result;
[0104] Determining the historical batch result corresponding to the historical average duration less than the real-time average duration as the first abnormal batch result;
[0105] Displaying the historical batch results with the historical processing duration less than the real-time processing duration includes:
[0106] Determine and display the historical batch results in the first abnormal batch results whose historical processing duration is less than the real-time processing duration.
[0107] Among them, in order to obtain refined differences, it is necessary to sort out the test time consumption of each task to determine the average time consumption. In the case where the historical average time consumption is less than the real-time average time consumption, if there is a situation where the historical processing duration is less than the real-time processing duration, it is determined as an abnormal situation.
[0108] In one implementation, it is also possible to compare the test time consumption of each task one by one, determine the historical version corresponding to the abnormality and the corresponding task, and display the historical version and its corresponding task, which can help developers adjust the current version of the system according to the actual situation of the task.
[0109] Optionally, comparing the real-time batch result with each historical batch result in the historical batch result set includes:
[0110] Compare the real-time resource consumption in the real-time batch result with the historical resource consumption in each historical batch result in the historical batch result set respectively;
[0111] Display the historical batch results with historical resource consumption less than the real-time resource consumption.
[0112] Among them, for comparison, a comparison result needs to be obtained ultimately. In order to enable developers to better and more intuitively see the differences between the current version of the system and the historical version of the system, therefore, the differences need to be displayed.
[0113] At this time, taking the resource consumption as the object of comparison, that is, comparing the real-time resource consumption in the real-time batch result with the historical resource consumption in the historical batch result. If the historical resource consumption is less than the real-time resource consumption, it means that the performance of the current version of the system corresponding to this real-time resource consumption is inferior to the performance of the historical version of the system. Therefore, it can be determined as abnormal, and the historical batch result corresponding to the historical version of the system can be displayed, enabling developers to observe the differences.
[0114] In addition, the code for processing batch tasks in the corresponding historical version of the system can also be displayed, enabling developers to improve the code of the current version of the system based on this historical code.
[0115] Optionally, after comparing the real-time resource consumption in the real-time batch result with the historical resource consumption in each historical batch result in the historical batch result set respectively, it further includes:
[0116] Obtain the real-time test data volume in the real-time batch result and the historical test data volume in the historical batch result;
[0117] Calculate the real-time average consumption based on the real-time resource consumption and the real-time test data volume, and calculate the historical average consumption based on the historical resource consumption and the historical test data volume;
[0118] Determine that the historical batch result corresponding to the historical average consumption being less than the real-time average consumption is the second abnormal batch result;
[0119] The historical batch results showing that the historical resource consumption is less than the real-time resource consumption include:
[0120] Determine and display the historical batch results in which the historical resource consumption is less than the real-time resource consumption from the second abnormal batch result.
[0121] Among them, in order to obtain refined differences, it is necessary to sort out the test data volume of each task to determine the average consumption. In the case where the historical average consumption is less than the real-time average consumption, if the historical resource consumption is less than the real-time resource consumption, it is determined as an abnormal situation.
[0122] In one embodiment, the test data volumes of each task can also be compared one by one to determine the historical version corresponding to the abnormality and the corresponding task, and display the historical version and its corresponding task, which can help developers adjust the current version of the system according to the actual situation of the task.
[0123] Step S203: Take each comparison as a comparison task. After obtaining the comparison result, collect the task duration of each comparison task, and extract the baseline data and duration data used when the first N comparison tasks are executed.
[0124] In this application, N is an integer greater than zero. Taking each comparison as a comparison task and calculating the task duration of the comparison task helps to understand the degree of difference between the current version and the historical version. When the task duration is long, the corresponding degree of difference is higher, and when the task duration is short, the corresponding degree of difference is lower.
[0125] In order to accurately judge the task duration, this application does not use a preset threshold, but needs to collect real-time data to determine the threshold. Among them, the baseline data and duration data can be used to effectively calculate the duration threshold.
[0126] The baseline data is a reference data, which is used to represent the test data volume, so as to reflect the difficulty of the task. The duration data is a real duration, which is used to represent the duration during the test, so as to also reflect the difficulty of the task.
[0127] According to the execution order of comparison tasks, the first N comparison tasks can be determined, and then the reference data and time-consuming data when the first N comparison tasks are executed can be obtained. When a comparison task is executed, it is based on both sides of the comparison, that is, the real-time batch result and the historical batch result. Therefore, the reference data and time-consuming data during execution need to be obtained from the real-time batch result and the historical batch result.
[0128] Optionally, the baseline data and time-consuming data used when the first N comparison tasks are executed include:
[0129] Taking the historical batch results corresponding to the first N comparison tasks as the target batch results, obtaining the test time-consuming and test data volume of each task in the batch tasks in the target batch results;
[0130] Taking the average value of the test time-consuming of each task as the time-consuming data corresponding to the comparison task, and taking the average value of the test data volume of each task as the baseline data corresponding to the comparison task.
[0131] Among them, the test time-consuming and test data volume of each task in the N historical batch results are averaged to determine the corresponding baseline data and time-consuming data.
[0132] Step S204, determine the time-consuming range according to the baseline data and time-consuming data. If there is a comparison task whose task time-consuming exceeds the time-consuming range among the task time-consuming of each comparison task, a prompt message is generated.
[0133] In this application, the prompt message is used to display the historical version corresponding to the comparison task, the task time-consuming, and the baseline data and time-consuming data corresponding to the task execution. In addition, the prompt message can also include other content, that is, set according to requirements, to help developers understand abnormal situations.
[0134] In the above step S203, N baseline data and N time-consuming data are obtained. Retaining the essence of the time-consuming data for this part of the data, normalizing the baseline data can obtain a floating range, and combining the floating range with the time-consuming data can obtain the time-consuming range.
[0135] In the embodiment of the present application, online test data of the current version of the system is obtained, and according to the mapping relationship between the online test data and the batch task, the real-time batch result is determined. The historical test result of batch testing the batch task in each historical version of the system is used as a historical batch result to obtain a set of historical batch results. The real-time batch result is compared with each historical batch result in the set of historical batch results respectively. Each comparison is regarded as a comparison task. After obtaining the comparison result, the task duration of each comparison task is collected, and the baseline data and duration data used when the previous N comparison tasks are executed are extracted. According to the baseline data and the duration data, the duration range is determined. If there is a comparison task whose task duration exceeds the duration range among the task durations of each comparison task, a prompt message is generated, realizing the analysis of the test result, and being able to generate the historical version corresponding to the anomaly and its corresponding data, so as to accurately reflect the problems of the updated system and avoid the situation that the processing efficiency cannot be improved after the updated system is put on the line.
[0136] See Figure 3 , which is a schematic flowchart of a data analysis method for batch task testing provided in Embodiment 3 of the present application. As Figure 3 shown, the data analysis method may include the following steps:
[0137] Step S301, obtain the online test data of the current version of the system, and determine the real-time batch result according to the mapping relationship between the online test data and the batch task.
[0138] Step S302, use the historical test result of batch testing the batch task in each historical version of the system as a historical batch result to obtain a set of historical batch results, and compare the real-time batch result with each historical batch result in the set of historical batch results respectively.
[0139] Step S303, regard each comparison as a comparison task. After obtaining the comparison result, collect the task duration of each comparison task, and extract the baseline data and duration data used when the previous N comparison tasks are executed.
[0140] Among them, the content of Step S301 to Step S303 is the same as that of the above Step S201 to Step S203, and the description of Step S201 to Step S203 can be referred to and will not be elaborated here.
[0141] Step S304, determine the variance baseline value according to the baseline data, and determine the average duration according to the duration data.
[0142] Step S305, use the range corresponding to floating the average duration by the variance baseline value as the duration range.
[0143] In the present application, the variance of the first N baseline data is calculated, and the calculation formula is as follows:
[0144]
[0145] where s is the variance baseline value, and x k represents the k-th baseline data, and x represents the average value of N baseline data. Taking the average time-consuming as the benchmark, a time-consuming range is formed.
[0146] Step S306: If there is a comparison task whose task time-consuming exceeds the time-consuming range among the task time-consumings of each comparison task, a prompt message is generated.
[0147] Among them, the content of step S306 is the same as that of the above step S204. For the description of step S204, reference can be made, and it will not be elaborated here.
[0148] In the embodiment of the present application, by obtaining the online test data of the current version of the system, and according to the mapping relationship between the online test data and the batch tasks, the real-time batch result is determined. The historical test result of batch testing the batch tasks in each historical version of the system is used as a historical batch result to obtain a set of historical batch results. The real-time batch result is respectively compared with each historical batch result in the set of historical batch results, and each comparison is used as a comparison task. After obtaining the comparison result, the task time-consuming of each comparison task is collected, the baseline data and time-consuming data used when the previous N comparison tasks are executed are extracted. According to the baseline data, the variance baseline value is determined, and according to the time-consuming data, the average time-consuming is determined. The range corresponding to the variance baseline value floating up and down the average time-consuming is used as the time-consuming range. If there is a comparison task whose task time-consuming exceeds the time-consuming range among the task time-consumings of each comparison task, a prompt message is generated, which can accurately and simply obtain the time-consuming range without manual setting, reducing the subjective influence, realizing the analysis of the test results, and being able to generate the historical version corresponding to the exception and its corresponding data, so as to accurately reflect the problems of the updated system and avoid the situation that the processing efficiency cannot be improved after the updated system is put on the line.
[0149] Corresponding to the data analysis method in the above embodiment, Figure 4 shows the structural block diagram of the data analysis device for batch task testing provided in the fifth embodiment of the present application. The above data analysis device can be applied to Figure 1 the server in. The computer device corresponding to the server is connected to the corresponding database, rule library, etc. to obtain the corresponding data in the database. The above computer device can also be connected to the client to collect the data and control instructions sent by the client users. For the sake of simplicity, only the parts related to the embodiment of the present application are shown.
[0150] See Figure 4 , and this data analysis device includes:
[0151] The real-time result acquisition module 41 is used to obtain the online test data of the current version of the system, and determine the real-time batch result according to the mapping relationship between the online test data and the batch task. The real-time batch result is the test result of batch testing the current version of the system using the batch task collected offline;
[0152] The batch result comparison module 42 is used to use the historical test result of batch testing the batch task in each historical version of the system as a historical batch result to obtain a historical batch result set, and compare the real-time batch result with each historical batch result in the historical batch result set respectively;
[0153] The comparison task calculation module 43 is used to take each comparison as a comparison task. After obtaining the comparison result, collect the task duration of each comparison task, and extract the baseline data and duration data used when the first N comparison tasks are executed, where N is an integer greater than zero;
[0154] The task data analysis module 44 is used to determine the duration range according to the baseline data and the duration data. If there is a comparison task whose task duration exceeds the duration range among the task durations of each comparison task, a prompt message is generated. The prompt message is used to display the historical version corresponding to the comparison task, the task duration, and the baseline data and duration data corresponding to the task execution.
[0155] Optionally, the task data analysis module 44 includes:
[0156] The average duration determination unit is used to determine the variance baseline value according to the baseline data and determine the average duration according to the duration data;
[0157] The duration range determination unit is used to use the range obtained by floating the average duration by the variance baseline value as the duration range.
[0158] Optionally, the comparison task calculation module 43 includes:
[0159] The data acquisition unit is used to use the historical batch results corresponding to the first N comparison tasks as the target batch results, and obtain the test duration and test data volume of each task in the batch task in the target batch results;
[0160] The data determination unit is used to use the average value of the test duration of each task as the duration data corresponding to the comparison task, and use the average value of the test data volume of each task as the baseline data corresponding to the comparison task.
[0161] Optionally, the batch result comparison module 42 includes:
[0162] The first comparison unit is used to compare the real-time processing duration in the real-time batch result with the historical processing duration in each historical batch result in the historical batch result set respectively;
[0163] The first display unit is used to display historical batch results with historical processing duration less than real-time processing duration.
[0164] Optionally, the batch result comparison module 42 further includes:
[0165] The time-consuming acquisition unit is used to obtain the test time-consuming of each task in the real-time batch result and the test time-consuming of each task in the historical batch result after comparing the real-time processing duration in the real-time batch result with the historical processing duration in each historical batch result in the historical batch result set;
[0166] The average time-consuming determination unit is used to calculate the real-time average time-consuming corresponding to the real-time batch result and the historical average time-consuming corresponding to the historical batch result;
[0167] The first anomaly determination unit is used to determine the historical batch result corresponding to the historical average time-consuming less than the real-time average time-consuming as the first abnormal batch result;
[0168] Specifically, the first display unit is used for:
[0169] Determine and display the historical batch results with historical processing duration less than real-time processing duration from the first abnormal batch results.
[0170] Optionally, the batch result comparison module 42 includes:
[0171] The second comparison unit is used to compare the real-time resource consumption in the real-time batch result with the historical resource consumption in each historical batch result in the historical batch result set;
[0172] The second display unit is used to display the historical batch results with historical resource consumption less than real-time resource consumption.
[0173] Optionally, the batch result comparison module 42 further includes:
[0174] The data volume acquisition unit is used to obtain the real-time test data volume in the real-time batch result and the historical test data volume in the historical batch result after comparing the real-time resource consumption in the real-time batch result with the historical resource consumption in each historical batch result in the historical batch result set;
[0175] The consumption determination unit is used to calculate the real-time average consumption according to the real-time resource consumption and the real-time test data volume, and calculate the historical average consumption according to the historical resource consumption and the historical test data volume;
[0176] The second anomaly determination unit is used to determine the historical batch result corresponding to the historical average consumption less than the real-time average consumption as the second abnormal batch result;
[0177] The second display unit is specifically configured to:
[0178] Determine and display, from the second batch of abnormal results, the historical batch results where the historical resource consumption is less than the real-time resource consumption.
[0179] It should be noted that for the information interaction, execution process, etc. between the above modules, since they are based on the same concept as the method embodiments of this application, for their specific functions and the technical effects brought, reference can be specifically made to the method embodiment part, and details are not elaborated here.
[0180] Figure 5 It is a schematic structural diagram of a computer device provided in Embodiment 6 of this application. As Figure 5 shown, the computer device of this embodiment includes: at least one processor ( Figure 5 only one is shown in the figure), a memory, and a computer program stored in the memory and executable on at least one processor. When the processor executes the computer program, it implements the steps in any of the above method embodiments for data analysis.
[0181] The computer device may include, but is not limited to, a processor and a memory. Those skilled in the art can understand that Figure 5 this is only an example of a computer device and does not constitute a limitation on the computer device. The computer device may include more or fewer components than shown in the figure, or combine certain components, or different components. For example, it may also include a network interface, a display screen, and an input device, etc.
[0182] The so-called processor may be a CPU, and this processor may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or this processor may also be any conventional processor, etc.
[0183] The memory includes a readable storage medium, an internal memory, etc. Among them, the internal memory can be the memory of a computer device, and the internal memory provides an environment for the operation of the operating system and computer-readable instructions in the readable storage medium. The readable storage medium can be the hard disk of a computer device, and in some other embodiments, it can also be an external storage device of a computer device, such as a plug-in hard disk equipped on a computer device, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. Further, the memory can also include both the internal storage unit of a computer device and an external storage device. The memory is used to store an operating system, application programs, a BootLoader, data, and other programs, such as the program code of a computer program. The memory can also be used to temporarily store data that has been output or will be output.
[0184] Those skilled in the art can clearly understand that, for the convenience and conciseness of description, only the above division of each functional unit and module is used as an example. In actual applications, the above functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiments can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit. In addition, the specific names of each functional unit and module are only for the convenience of mutual distinction and do not limit the protection scope of this application. The specific working processes of the units and modules in the above device can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated here. If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, to implement all or part of the processes in the above method embodiments of this application, a computer program can be used to instruct the relevant hardware to complete. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form, etc. The computer-readable medium can at least include: any entity or device that can carry the computer program code, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disc, etc. In some jurisdictions, according to legislation and patent practice, the computer-readable medium cannot be an electrical carrier signal and a telecommunication signal.
[0185] All or part of the processes in the above method embodiments of this application can also be completed by a computer program product. When the computer program product runs on a computer device, it enables the computer device to execute and implement the steps in the above method embodiments.
[0186] In the above embodiments, the descriptions of each embodiment have their own emphases. For the parts not detailed or recorded in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0187] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. A professional technician can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.
[0188] In the embodiments provided in this application, it should be understood that the disclosed device / computer device and method can be implemented in other ways. For example, the device / computer device embodiments described above are merely illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of devices or units can be in electrical, mechanical or other forms.
[0189] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they can be located in one place, or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0190] The above embodiments are only used to illustrate the technical solutions of this application, rather than to limit them; although this application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included in the protection scope of this application.
Claims
1. A data analysis method for batch task testing, characterized in that, The data analysis method includes: Obtaining online test data of the system of the current version, and determining a real-time batch result according to the mapping relationship between the online test data and the batch task, where the real-time batch result is a test result of offline collection for batch testing the system of the current version using the batch task; Taking the historical test results of batch testing the batch task in the systems of each historical version as a historical batch result, obtaining a set of historical batch results, and comparing the real-time batch result with each historical batch result in the set of historical batch results respectively; Regarding each comparison as a comparison task, after obtaining the comparison result, collecting the task duration of each comparison task, and extracting the baseline data and duration data used when the first N comparison tasks are executed, where N is an integer greater than zero; Determining a duration range according to the baseline data and the duration data. If there is a comparison task whose task duration exceeds the duration range among the task durations of each comparison task, generating a prompt message, where the prompt message is used to display the historical version corresponding to the comparison task, the task duration, and the baseline data and duration data corresponding to the task execution; The determining a duration range according to the baseline data and the duration data includes: Determining a variance baseline value according to the baseline data, and determining an average duration according to the duration data; Taking the range corresponding to the average duration fluctuating up and down by the variance baseline value as the duration range; The extracting the baseline data and duration data used when the first N comparison tasks are executed includes: Taking the historical batch results corresponding to the first N comparison tasks as target batch results, and obtaining the test duration and test data volume of each task in the batch task in the target batch results; Taking the average value of the test durations of each task as the duration data corresponding to the corresponding comparison task, and taking the average value of the test data volumes of each task as the baseline data corresponding to the corresponding comparison task.
2. The data analysis method according to claim 1, wherein The comparing the real-time batch result with each historical batch result in the set of historical batch results respectively includes: Comparing the real-time processing duration in the real-time batch result with the historical processing duration in each historical batch result in the set of historical batch results respectively; Displaying the historical batch results whose historical processing duration is less than the real-time processing duration.
3. The data analysis method according to claim 2, wherein After comparing the real-time processing duration in the real-time batch result with the historical processing duration in each historical batch result in the set of historical batch results respectively, it further includes: Obtaining the test duration of each task in the real-time batch result and the test duration of each task in the historical batch result; Calculating the real-time average duration corresponding to the real-time batch result and the historical average duration corresponding to the historical batch result; Determining the historical batch result whose historical average duration is less than the real-time average duration as the first abnormal batch result; The displaying the historical batch results whose historical processing duration is less than the real-time processing duration includes: Determining and displaying, from the first abnormal batch results, the historical batch results whose historical processing duration is less than the real-time processing duration.
4. The data analysis method according to claim 1, characterized in that Comparing the real-time batch results with each historical batch result in the historical batch result set respectively includes: Comparing the real-time resource consumption amounts in the real-time batch results with the historical resource consumption amounts in each historical batch result in the historical batch result set respectively; Displaying the historical batch results where the historical resource consumption amount is less than the real-time resource consumption amount.
5. The data analysis method according to claim 4, wherein After comparing the real-time resource consumption amounts in the real-time batch results with the historical resource consumption amounts in each historical batch result in the historical batch result set respectively, it further includes: Obtaining the real-time test data volume in the real-time batch results and the historical test data volume in the historical batch results; Calculating the real-time average consumption amount according to the real-time resource consumption amount and the real-time test data volume, and calculating the historical average consumption amount according to the historical resource consumption amount and the historical test data volume; Determining the historical batch results where the historical average consumption amount is less than the real-time average consumption amount as the second abnormal batch results; Displaying the historical batch results where the historical resource consumption amount is less than the real-time resource consumption amount includes: Determining and displaying, from the second abnormal batch results, the historical batch results where the historical resource consumption amount is less than the real-time resource consumption amount.
6. A data analysis device for batch task testing, characterized in that, The data analysis device includes: A real-time result acquisition module, configured to acquire online test data of the system of the current version, and determine real-time batch results according to the mapping relationship between the online test data and the batch tasks, where the real-time batch results are test results of batch testing the system of the current version using the batch tasks collected offline; A batch result comparison module, configured to use the historical test results of batch testing the batch tasks in the systems of each historical version as a historical batch result to obtain a historical batch result set, and compare the real-time batch results with each historical batch result in the historical batch result set respectively; A comparison task calculation module, configured to regard each comparison as a comparison task, after obtaining the comparison results, collect the task consumption time of each comparison task, and extract the baseline data and consumption time data used when the first N comparison tasks are executed, where N is an integer greater than zero; A task data analysis module, configured to determine a consumption time range according to the baseline data and the consumption time data, and if there is a comparison task whose task consumption time exceeds the consumption time range among the task consumption times of each comparison task, generate a prompt message, where the prompt message is used to display the historical version, task consumption time, and corresponding baseline data and consumption time data when the comparison task is executed; The task data analysis module includes: An average consumption time determination unit, configured to determine a variance baseline value according to the baseline data, and determine the average consumption time according to the consumption time data; A consumption time range determination unit, configured to use the range corresponding to floating the average consumption time up and down by the variance baseline value as the consumption time range; The comparison task calculation module includes: A data acquisition unit, configured to use the historical batch results corresponding to the first N comparison tasks as target batch results, and acquire the test consumption time and test data volume of each task in the batch tasks in the target batch results; A data determination unit, configured to use the average value of the test time consumption of each task as the time consumption data of the corresponding comparison task, and use the average value of the test data volume of each task as the baseline data of the corresponding comparison task.
7. A computer device, characterized in that, The computer device includes a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the data analysis method according to any one of claims 1 to 5 is implemented.
8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, the data analysis method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Batch task arrangement method and device
CN110287018A
Batch task processing method and device, computing equipment and storage medium
CN110457159A