End time determination method and device, storage medium and electronic equipment
By using the decreasing coefficient in project testing to predict the number of new and closed defects until the cumulative number is equal, the problem of low accuracy of project test end time is solved, and a more accurate test end time prediction is achieved.
Patent Information
- Application Number
- CN202510022904.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-06
- Publication Date
- 2025-05-27
AI Technical Summary
The prior art is less accurate when determining the end time of project testing and cannot effectively deal with the impact of uncertain factors during the testing process.
By obtaining the initial new defect data and initial closed defect data, perform multiple rounds of tests until the cumulative number of new defects is equal to the cumulative number of closed defects, determine the end time of the project test. The new defect data and closed defect data for each round of test are predicted based on the decreasing coefficient of the previous round of test.
Improves the accuracy of project test end time, and dynamically adjusts the recursive coefficients to enable the prediction process to be updated in real time based on the results of each round.
Smart Images

Figure CN120045452A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computers, and more particularly, to a method and apparatus for determining an end time, a storage medium, and an electronic device. Background Art
[0002] Project testing is an important part of the project development process. For example, in the software development process, through software testing, risks are identified and software defects are repaired to improve software performance and ensure compliance with the expected functions.
[0003] The software testing process requires a large amount of resources, including manpower, equipment, and time. Moreover, the testing process is usually affected by some uncertain factors, resulting in the need to invest more resources and consume more testing time in the software testing process. For example, requirement changes, test plan changes, software defect conditions, etc.
[0004] In order to reduce the impact of uncertain factors on the overall testing process, in the related art, a manual statistics method is usually adopted. An estimated total duration required for a project test is predicted based on experience, and then the test time is reserved for the project according to the predicted total duration. However, this manual estimation method does not consider the correlation between each round of testing in the testing process. It only roughly calculates the possible duration of the current project test by using the similarity between the testing processes of similar projects.
[0005] Therefore, there may be a large deviation between the end time of the project test determined by the traditional method and the actual end time, resulting in the technical problem of inaccurate test end time of the project test.
[0006] For the above problems, no effective solution has been proposed yet. Summary of the Invention
[0007] Embodiments of this application provide a method and apparatus for determining an end time, a storage medium, and an electronic device, so as to at least solve the technical problem of low accuracy in the process of determining the test end time of a project test.
[0008] According to one aspect of the embodiments of the present application, a method for determining an end time is provided, including: obtaining initial newly added defect data and initial closed defect data, where the initial newly added defect data includes defects newly added during each round of project testing before the current moment, and the initial closed defect data includes defects closed during each round of project testing before the current moment; based on the initial newly added defect data and the initial closed defect data, performing multiple rounds of testing until the number of accumulated newly added defects obtained after the current round of testing is equal to the number of accumulated closed defects, and ending the testing, where the newly added defect data in each round of testing is determined based on a first decreasing coefficient in the previous round of testing, and the closed defect data in each round of testing is determined based on a second decreasing coefficient in the previous round of testing, the first decreasing coefficient is used to represent the growth rate of newly added defects in the next round of testing, and the second decreasing coefficient is used to represent the growth rate of closed defects in the next round of testing; determining the time at the end of the current round of testing as the end time of the current project testing.
[0009] Optionally, the above-mentioned performing multiple rounds of testing based on the initial newly added defect data and the initial closed defect data until the number of accumulated newly added defects obtained after the current round of testing is equal to the number of accumulated closed defects includes: in the case where the initial newly added defect data and the initial closed defect data are data obtained after batch rounds of testing, determining a current first decreasing coefficient and a current second decreasing coefficient for the current round of testing after the batch rounds of testing based on the newly added defect data and the closed defect data in each round of testing in the batch rounds, where the number of batch rounds is greater than or equal to a preset number; predicting a first set of newly added defect data newly added during the current round of testing based on the current first decreasing coefficient; predicting a first set of closed defect data closed during the current round of testing based on the current second decreasing coefficient;
[0010] In the case where the number of accumulated newly added defects including the first set of newly added defect data is equal to the number of accumulated closed defects including the first set of closed defect data, determining the end time of the current project testing as the time at the end of the current round.
[0011] Optionally, determining a current first decreasing coefficient and a current second decreasing coefficient for the current round of testing after the batch rounds of testing based on the newly added defect data and the closed defect data in each round of the batch rounds of testing includes: determining a first set of coordinate points based on the largest first element in the first array corresponding to the newly added defect data in each round of the batch rounds of testing, where one element in the first array represents the number of newly added defects in one round of the batch rounds of testing; determining a second set of coordinate points based on the largest second element in the second array corresponding to the closed defect data in each round of the batch rounds of testing, where one element in the second array represents the number of closed defects in one round of the batch rounds of testing; determining the current first decreasing coefficient based on the first set of coordinate points; and determining the current second decreasing coefficient based on the second set of coordinate points.
[0012] Optionally, determining the current first decreasing coefficient based on the first set of coordinate points includes: fitting a first straight line based on each coordinate point in the first set of coordinate points; determining the slope of the first straight line as the first fractal dimension; and determining the difference between 1 and the first fractal dimension as the current first decreasing coefficient.
[0013] Optionally, determining the current second decreasing coefficient based on the second set of coordinate points includes: fitting a second straight line based on each coordinate point in the second set of coordinate points; determining the slope of the second straight line as the second fractal dimension; and determining the difference between 1 and the second fractal dimension as the current second decreasing coefficient.
[0014] Optionally, predicting a first set of newly added defect data in the current round of testing based on the current first decreasing coefficient includes: determining the product of the current first decreasing coefficient and the first defect quantity of the newly added defects in the last round of testing in the batch rounds of testing as the second defect quantity of the newly added defects in the current round of testing; summarizing the newly added defects that have accumulated during the batch rounds of testing to obtain the total first defect quantity; calculating the ratio of the defect quantity of each level to the total first defect quantity respectively to obtain a first set of ratios; and determining the defect quantity of each level newly added in the current round of testing based on the first set of ratios and the second defect quantity, where the first set of newly added defect data includes the defect quantity of each level newly added in the current round of testing.
[0015] Optionally, predicting the first set of closed defect data closed during the current round of testing based on the current second decreasing coefficient includes: determining the product of the current second decreasing coefficient and the third defect quantity of the defects closed during the last round of testing in the batch rounds as the fourth defect quantity of the defects closed during the current round of testing; summarizing the closed defects that have occurred cumulatively during the batch rounds of testing to obtain the total second defect quantity; calculating the ratios between the defect quantities of each level and the total second defect quantity respectively to obtain the second set of ratios; and determining the defect quantities of each level closed during the current round of testing based on the second set of ratios and the fourth defect quantity, where the first set of closed defect data includes the defect quantities of each level closed during the current round of testing.
[0016] Optionally, in the case where the cumulative number of newly added defects including the first set of newly added defect data is equal to the cumulative number of closed defects including the first set of closed defect data, determining the end time of the current project test as the time at the end of the current round includes: determining the repair duration from after the end of the last round of testing in the batch rounds to before the start of the current round of testing; determining the first test duration required for the batch rounds of testing; and determining the time at the end of the current round of testing based on the first test duration, the repair duration, and the second test duration of the current round of testing.
[0017] According to another aspect of the embodiments of the present application, there is also provided an end time determination device, including: a first acquisition unit configured to acquire initial newly added defect data and initial closed defect data, where the initial newly added defect data includes the defects newly added during each round of project testing before the current moment, and the initial closed defect data includes the defects closed during each round of project testing before the current moment; a first processing unit configured to perform multiple rounds of testing based on the initial newly added defect data and the initial closed defect data until the cumulative number of newly added defects obtained after the current round of testing is equal to the cumulative number of closed defects, and end the testing, where the newly added defect data in each round of testing is determined based on the first decreasing coefficient in the previous round of testing, and the closed defect data in each round of testing is determined based on the second decreasing coefficient in the previous round of testing, the first decreasing coefficient is used to represent the growth rate of newly added defects in the next round of testing, and the second decreasing coefficient is used to represent the growth rate of closed defects in the next round of testing; and a second processing unit configured to determine the time at the end of the current round of testing as the end time of the current project test.
[0018] According to another aspect of the embodiments of the present application, there is also provided a computer-readable storage medium storing a computer program, where the computer program, when run by an electronic device, is configured to execute the above end time determination method.
[0019] According to another aspect of the embodiments of the present application, there is also provided a computer program product, including a computer program which, when executed by a processor, implements the steps of the above method.
[0020] According to another aspect of the embodiments of the present application, there is also provided an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to execute the above end time determination method through the computer program.
[0021] Through the above embodiments provided by the present application, using the box counting method of fractal geometry, the decreasing coefficient of newly added defects and the decreasing coefficient of closed defects in each round are calculated respectively. According to the decreasing coefficient of newly added defects, the data of newly added defects in the next round of testing is determined, and according to the decreasing coefficient of closed defects, the data of closed defects in the next round of testing is determined. Then, when the condition that the cumulative number of newly added defects is equal to the cumulative number of closed defects is met, it is determined that the current round of testing is completed and the testing can be stopped, and the end time of the project testing is determined according to the end time of the current round of testing. In other words, by dynamically adjusting the recursion coefficient, the prediction process can be updated in real time according to the results of each round, achieving the technical effect of improving the accuracy of the prediction results. Description of the Drawings
[0022] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation to the present application.
[0023] Figure 1 is a schematic diagram of an application scenario of an optional end time determination method according to an embodiment of the present application;
[0024] Figure 2 is a flowchart of an optional end time determination method according to an embodiment of the present application;
[0025] Figure 3 is an overall flowchart of an optional end time determination method according to an embodiment of the present application;
[0026] Figure 4 is an example of an optional determination of the decreasing coefficient of newly added defects in the next round of testing process according to an embodiment of the present application;
[0027] Figure 5 is an example of an optional determination of the decreasing coefficient of closed defects in the next round of testing process according to an embodiment of the present application;
[0028] Figure 6 is a schematic diagram of the relationship between the repair time between adjacent rounds of testing processes and the test duration of each round of testing according to an embodiment of the present application;
[0029] Figure 7 is a schematic structural diagram of an optional end time determination device according to an embodiment of the present application;
[0030] Figure 8 is a schematic structural diagram of an optional electronic device according to an embodiment of the present application. Detailed implementation manners
[0031] In order to enable those skilled in the art to better understand the solution of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0032] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units does not necessarily need to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0033] The technical solutions in the embodiments of the present application will comply with legal regulations during the implementation process. When operating according to the technical solutions in the embodiments, the data used will not involve user privacy, ensuring the compliance and legality of the operation process while guaranteeing the security of the data.
[0034] In addition, when the above embodiments of the present application are applied to specific products or technologies, user permission or consent needs to be obtained, and the collection, use, and processing of relevant data need to comply with the relevant regulations and standards of the relevant country or region.
[0035] According to one aspect of the embodiments of the present application, an end time determination method is provided. As an optional implementation manner, the above end time determination method can be but is not limited to being applied to, for example, Figure 1 the application scenarios shown. In Figure 1In the application scenario shown, the target terminal 102 can, but is not limited to, communicate with the server 106 through the network 104. The server 106 can, but is not limited to, perform operations on the database 108, such as write data operations or read data operations. The above-mentioned target terminal 102 can, but is not limited to, include a human-computer interaction screen, a processor, and a memory. The above-mentioned human-computer interaction screen can, but is not limited to, be used to display the screen of the project test process on the target terminal 102 and the display screen of the test results, etc. The above-mentioned processor can, but is not limited to, be used to respond to the above-mentioned human-computer interaction operations, execute corresponding operations, or generate corresponding instructions and send the generated instructions to the server 106. The above-mentioned memory is used to store relevant processing data, such as initial new defect data, initial closed defect data, and the first decreasing coefficient, etc.
[0036] Optionally, in this embodiment, the above-mentioned target terminal can be a terminal configured with a target client, and can include, but is not limited to, at least one of the following: mobile phones (such as Android phones, iOS phones, etc.), laptop computers, tablet computers, handheld computers, MIDs (Mobile Internet Devices), PADs, desktop computers, smart TVs, etc. The target client can be a video client, an instant messaging client, a browser client, an education client, etc. The above-mentioned network can include, but is not limited to: wired networks, wireless networks, where the wired network includes: local area networks, metropolitan area networks, and wide area networks, and the wireless network includes: Bluetooth, WIFI, and other networks that implement wireless communication. The above-mentioned server can be a single server, or a server cluster composed of multiple servers, or a cloud server.
[0037] To solve the above problem of relatively low accuracy in determining the end time of the project test, an end time determination method is proposed in the embodiments of the present application. Figure 2 It is a flowchart of the end time determination method according to the embodiments of the present application, and this process includes the following steps S202 to step S206.
[0038] It should be noted that the end time determination method shown in steps S202 to step S206 can, but is not limited to, be executed by an electronic device, where the electronic device can, but is not limited to, be such as Figure 1 the target terminal or server shown.
[0039] Step S202, obtain the initial new defect data and the initial closed defect data, where the initial new defect data includes the defects newly added in each round of project test before the current moment, and the initial closed defect data includes the defects closed in each round of project test before the current moment;
[0040] Step S204: Based on the initial newly added defect data and the initial closed defect data, perform multiple rounds of testing until the number of accumulated newly added defects after the current round of testing is equal to the number of accumulated closed defects, and then end the testing. Among them, the newly added defect data in each round of testing is determined based on the first decreasing coefficient in the previous round of testing, and the closed defect data in each round of testing is determined based on the second decreasing coefficient in the previous round of testing. The first decreasing coefficient is used to represent the growth rate of newly added defects in the next round of testing, and the second decreasing coefficient is used to represent the growth rate of closed defects in the next round of testing;
[0041] Step S206: Determine the time at the end of the current round of testing as the end time of the current project testing.
[0042] The technical solution in the embodiment of the present application can be but is not limited to being applied to the development process of software projects, and is particularly suitable for the prediction process of the end time of software testing. Among them, using a recursive algorithm, by obtaining the data of newly added defects and closed defects in each round of testing, predicting the situation of newly added defects and closed defects in the next round of testing until it is determined that the number of accumulated newly added defects is equal to the number of accumulated closed defects, then ending the testing process and predicting the end time of the project testing.
[0043] It should be noted that the test system in the embodiment of the present application includes but is not limited to 3 modules: a data module, a calculation module, and a prediction module. First, a brief introduction to the 3 modules is given respectively.
[0044] (1) Data module: This module needs to maintain a defect data pool, including the number of newly added defects, the number of closed defects in each round, as well as the severity level (high, medium, low) of each defect, and the time difference from the new addition to the closure of the defect;
[0045] (2) Calculation module: According to the data in the data pool of the data module, calculate the fractal dimension and the repair speeds of high, medium, and low defects. Among them, the fractal dimension is used as a decreasing coefficient to predict the newly added, closed defects and severity level in the next round, so as to predict the end time of the project testing;
[0046] (3) Prediction module: First, add the predicted number of newly added and closed defects in the next round in the calculation module to the defect data pool, count the total number of newly added defects and the total number of closed defects, and obtain the number of accumulated newly added defects and the number of accumulated closed defects. If the number of accumulated newly added defects <= the number of accumulated closed defects, it indicates that the testing can be completed in the next round. If the number of accumulated newly added defects > the number of accumulated closed defects, it means that the testing cannot be ended yet. Add the current prediction data to the defect data pool and perform recursive calculation until the result is that the testing can be completed in the next round, and at the same time count the number of recursive times.
[0047] In an optional example, the above-mentioned initial newly added defect data can be determined, but not limited to, in the following manner:
[0048] Using a data module, obtain the above-mentioned initial newly added defect data and initial closed defect data obtained through the first n - 1 rounds of testing, where n is a positive integer greater than or equal to 3. Specifically, during the software testing process, after a project is submitted for testing, testers will start the first round of testing. Suppose X defects are newly added in this round. Since it is the first round, there will be no closed defects.
[0049] After the first round of testing is completed, if the test fails, time will be left for developers to resolve the defects. When the defects meet the criteria for advancing to the next round of testing, testers will proceed to the second round of testing. In the second round, Y defects are newly added. At the same time, it will be verified whether the defects resolved by the developers are truly resolved. If they are resolved, the defect will be closed. Therefore, the number of defects closed in the second round must be less than or equal to X.
[0050] When n is equal to 3, the above-mentioned initial newly added defect data includes, but is not limited to, the defects X newly added during the first round of testing and the defects Y newly added during the second round of testing. The initial closed defect data includes, but is not limited to, the defects confirmed to have been resolved during the second round of testing.
[0051] When n is greater than 3, the above-mentioned initial newly added defect data includes, but is not limited to, the defects newly added in each round of the first n - 1 rounds of testing. The initial closed defect data includes, but is not limited to, the defects confirmed to have been resolved during the first n - 1 rounds of testing.
[0052] Using the above-mentioned initial newly added defect data and initial closed defect data, continue to perform multiple rounds of testing, and in real-time, count whether the number of cumulative newly added defects obtained after the next round of testing is equal to the number of cumulative closed defects after each round of testing ends. If, after one of the next rounds of testing (which can also be understood as the current round of testing), the number of cumulative newly added defect data is equal to the number of cumulative closed defect data, it is determined that the testing can be ended after the current round of testing is completed, and the time when the current round of testing ends is determined as the end time of the current project's testing.
[0053] In the above manner, using the box - counting method of fractal geometry, calculate the decreasing coefficient of newly added defects and the decreasing coefficient of closed defects for each round respectively. According to the decreasing coefficient of newly added defects, determine the newly added defect data for the next round of testing, and according to the decreasing coefficient of closed defects, determine the closed defect data for the next round of testing. Then, when the condition that the cumulative number of newly added defects is equal to the cumulative number of closed defects is met, determine that the current round of testing is completed and the testing can be stopped, and determine the end time of the project testing according to the end time of the current round of testing. In other words, by dynamically adjusting the recursion coefficient, the prediction process can be updated in real - time according to the results of each round, achieving the technical effect of improving the accuracy of the prediction results.
[0054] As an optional example, the above - mentioned execution of multiple rounds of testing based on the initial newly added defect data and the initial closed defect data until the cumulative number of newly added defects obtained after the current round of testing is equal to the cumulative number of closed defects includes:
[0055] When the initial newly added defect data and the initial closed defect data are the data obtained after a batch of rounds of testing, based on the newly added defect data and the closed defect data in each round of the batch of rounds of testing, determine the current first decreasing coefficient and the current second decreasing coefficient for the current round of testing after the batch of rounds of testing, where the number of rounds in the batch is greater than or equal to the preset quantity;
[0056] Based on the current first decreasing coefficient, predict the first set of newly added defect data newly added during the current round of testing;
[0057] Based on the current second decreasing coefficient, predict the first set of closed defect data closed during the current round of testing;
[0058] When the cumulative number of newly added defects including the first set of newly added defect data is equal to the cumulative number of closed defects including the first set of closed defect data, determine the end time of the current project testing as the time at the end of the current round.
[0059] When the batch of rounds is n - 1 rounds and the current round of testing is the nth round of testing after the first n - 1 rounds of testing, the end time of the current project testing can be determined, but is not limited to, by the following method:
[0060] S11, obtain the initial newly added defect data and the initial closed defect data obtained after the first n - 1 rounds of testing, where n is a positive integer greater than or equal to 3;
[0061] S12. Based on the newly added defect data and closed defect data in each of the previous n - 1 rounds of testing, determine the nth first decreasing coefficient and the nth second decreasing coefficient for the nth round of testing, where the nth first decreasing coefficient is used to represent the growth rate of newly added defects during the nth round of testing, and the nth second decreasing coefficient is used to represent the growth rate of closed defects during the nth round of testing;
[0062] S13. Based on the nth first decreasing coefficient, predict the nth group of newly added defect data during the nth round of testing;
[0063] S14. Based on the nth second decreasing coefficient, predict the nth group of closed defect data during the nth round of testing;
[0064] S15. When the number of cumulative newly added defects including the nth group of newly added defect data is equal to the number of cumulative closed defects including the nth group of closed defect data, determine that the end time of the current project testing is the time at the end of the nth round of testing.
[0065] Specifically, using the above calculation module, obtain the newly added defect data and closed defect data in each of the previous n - 1 rounds of testing, and determine the newly added defect decreasing coefficient (which can also be understood as the current first decreasing coefficient or the nth first decreasing coefficient) and the closed defect decreasing coefficient (which can also be understood as the current second decreasing coefficient or the nth second decreasing coefficient) for the current round (i.e., the nth round) of testing.
[0066] Among them, the decreasing coefficient mainly has the following functions in relevant algorithms or data models:
[0067] (1) Smooth data changes: When predicting values that change over time, such as the number of defects and resource consumption, the decreasing coefficient can make the growth or decay of the predicted value smoother. For example, when predicting the number of newly added defects in the next round, without the decreasing coefficient, the predicted value may fluctuate violently, while the decreasing coefficient can make the prediction gradually tend to a stable value, avoiding large fluctuations in the prediction result due to the abnormality of individual data points;
[0068] (2) Reflect trend changes: The decreasing coefficient can adjust the predicted value according to the historical trend of the data. If the historical data shows that the growth trend is slowing down, the decreasing coefficient can be adjusted accordingly, so that the subsequent predicted values also reflect this trend change, thus more accurately reflecting the actual trend of the data.
[0069] After determining the current first decreasing coefficient and the current second decreasing coefficient, use the above prediction module to predict the number of newly added defects and the number of closed defects during the current round of testing, add them to the defect data pool, and count the total number of newly added defects and the total number of closed defects. If the cumulative number of newly added defects is equal to the cumulative number of closed defects, it means that the current round of testing can be completed; if the cumulative number of newly added defects is greater than the cumulative number of closed defects, it means that the testing cannot be ended yet. Add the current prediction data to the defect data pool and perform recursive calculations until the result indicates that the next round of testing can be completed, and at the same time count the number of recursions.
[0070] As an alternative implementation, determining the current first decreasing coefficient and the current second decreasing coefficient for the current round of testing after batch rounds of testing based on the newly added defect data and closed defect data in each round of testing during the batch rounds includes:
[0071] Based on the largest first element in the first array corresponding to the newly added defect data in each round of testing during the batch rounds, determine the first set of coordinate points, where one element in the first array represents the number of newly added defects in one round of testing during the batch rounds;
[0072] Based on the largest second element in the second array corresponding to the closed defect data in each round of testing during the batch rounds, determine the second set of coordinate points, where one element in the second array represents the number of closed defects in one round of testing during the batch rounds;
[0073] Based on the first set of coordinate points, determine the current first decreasing coefficient; based on the second set of coordinate points, determine the current second decreasing coefficient.
[0074] Still taking the batch rounds as n - 1 rounds and the current round of testing as the nth round of testing after the first n - 1 rounds of testing as an example, the method for determining the current first decreasing coefficient and the current second decreasing coefficient will be explained.
[0075] Specifically, it includes the following steps:
[0076] S21, based on the first array corresponding to the newly added defect data in each round of testing in the first n - 1 rounds of testing, create a first scatter plot, where one element in the first array represents the number of newly added defects in one round of testing in the first n - 1 rounds of testing;
[0077] S22, based on the second array corresponding to the closed defect data in each round of testing in the first n - 1 rounds of testing, create a second scatter plot, where one element in the second array represents the number of closed defects in one round of testing in the first n - 1 rounds of testing;
[0078] S23. Based on the first scatter plot, determine the nth first decreasing coefficient; based on the second scatter plot, determine the nth second decreasing coefficient.
[0079] First, a brief introduction to the basic process of calculating the decreasing coefficient is given. First, calculate the fractal dimension. Using the box-counting method, a series of different scales (the size of the boxes) are first selected. For each scale, cover the data space, use "boxes" or "intervals" to measure the distribution of the data, count the differences between data points, and calculate how many pairs of data points have differences less than or equal to the current box size. For each scale, record the number of boxes or intervals that meet the conditions. Plot the box size against the corresponding count on a logarithmic graph. The fractal dimension is the slope of this logarithmic graph. Subtract the calculated fractal dimension from 1 and use it as the decreasing coefficient for subsequent calculations. Since the number of newly added and closed defects changes in each round of execution, this decreasing coefficient changes dynamically with the number of test rounds, improving the prediction accuracy. The box-counting method will be explained below with specific embodiments.
[0080] For example, assume n = 6. The newly added defect data in each round of the first n - 1 rounds of testing is as Figure 4 shown in the array A = [10, 8, 6, 4, 3]. Here, 10 represents the number of newly added defects in the first round of testing, 8 represents the number of newly added defects in the second round of testing, 6 represents the number of newly added defects in the third round of testing, and so on.
[0081] Similarly, the closed defect data in each round of the first n - 1 rounds of testing is as Figure 5 shown in the array B = [2, 3, 4, 5, 6]. Here, 2 represents the number of closed defects in the first round of testing, 3 represents the number of closed defects in the second round of testing, 4 represents the number of closed defects in the third round of testing, and so on.
[0082] According to the above first array, create the first scatter plot, and according to the second array, create the second scatter plot. Then, based on the first scatter plot, determine the current first decreasing coefficient, and based on the second scatter plot, determine the current second decreasing coefficient.
[0083] Obviously, the above first array A is only an example and is not limited to it. For example, when the current round of testing is the 3rd round of testing, the dimension of the first array A is 1×2, and when the current round of testing is the 10th round of testing, the dimension of the first array A is 1×9. That is to say, when predicting the number of newly added defects in the current round of testing, the number of newly added defects in each round of the historical rounds of testing is used.
[0084] As an alternative implementation, creating the first scatter plot based on the first array corresponding to the newly added defect data in each of the previous n - 1 rounds of testing includes: determining the first element with the largest value from the first set of elements corresponding to the first array; based on the first element, determining the first set of parameters, where the first set of parameters includes the first set of positive integers between 1 and N, N being the value of the first element, and N being a positive integer greater than or equal to 1; and determining the first scatter plot based on the first set of parameters and the first set of elements.
[0085] Still taking the above A = [10, 8, 6, 4, 3] as the first array as an example, the first element with the largest value determined from the 5 elements is 10. Then, according to the box - counting method, a series of different scales (box size) are selected, specifically 10 parameters between 1 and 10 (which can also be understood as 10 scales).
[0086] Among them, the box - counting method is a geometric measure method for estimating the fractal dimension, which is achieved by covering the fractal object with boxes of different sizes. In this method, the size of the box is the key parameter, which determines the number of boxes that can cover the fractal graph.
[0087] The box size refers to the side length of the square grid (or box) used to cover the fractal object. In the box - counting method, a series of boxes of different sizes are usually used to cover the fractal object, and then the number of boxes required for each size is calculated.
[0088] To understand the box size more intuitively, assume there is a line segment. It can be covered with line segments of different lengths (i.e., one - dimensional boxes). First, use a line segment of length 1 to cover it, and then use a line segment of length 0.5 to cover it. Here, 1 and 0.5 are the box sizes. The box size needs to be set according to the actual situation of your project. If the number of newly added defects in each round is approximately within 20, then set 1 to 20, these 20 scales are sufficient.
[0089] During the application process, by plotting the relationship graph (abbreviated as the logarithmic graph) between the logarithm of the box size and the logarithm of the number of boxes, the fractal dimension can be estimated. The fractal dimension can be determined by the slope of this log - log graph.
[0090] The choice of box size has a great influence on the results of the box - counting method. Smaller boxes can provide more detailed details, but the computational amount is also larger. In practical applications, it is necessary to balance the computational efficiency and the result accuracy and select an appropriate range of box sizes. The scatter plot in this embodiment can be, but is not limited to, understood as the above - mentioned logarithmic graph.
[0091] By using the box-counting method of fractal geometry, the newly added defect data and the closed defect data in each round of the test process are calculated, realizing the quantification process in the prediction process and improving the accuracy of the prediction result of the test end time.
[0092] As an alternative implementation, determining the first scatter plot based on the first set of parameters and the first set of elements includes: sequentially obtaining a positive integer from the first set of positive integers as the first current parameter; sequentially comparing the first current parameter with each element in the first set of elements, and counting the first number of elements in the first set of elements that are greater than or equal to the first current parameter; taking the logarithm of the first current parameter to obtain the first logarithmic value; taking the logarithm of the first number of elements to obtain the second logarithmic value; using the first logarithmic value as the abscissa and the second logarithmic value as the ordinate to determine the current scatter point in the first scatter plot (the current scatter point corresponds to the current coordinate point in the first set of coordinate points).
[0093] For example, assume the first array is Figure 4 A = [10, 8, 6, 4, 3] as shown, and the number of newly added defects in each round (e.g., 10, 8, etc.) is regarded as data points in a one-dimensional space (which can be imagined as distributed on a straight line).
[0094] Based on the 5 elements in the above array A, it can be determined that the box sizes are 10 positive integers from 1 to 10.
[0095] Starting from the first element 10, assume the current box size is box_size. If the current element is less than or equal to box_size, it means that this data point can be covered by a box of size box_size, and the counter count1 is incremented by 1. For example, when the box size is 1, all elements in A are greater than 1 and cannot be covered; when the box size is 2, all elements in A are still greater than 2 and cannot be covered; when the box size is 3, the 5th element (the element is 3) is greater than 3 and can be covered. At this time, the counter count1 is incremented by 1; similarly, when the box size is 4, count1 is equal to 2; when the box size is 5, count1 is still 2. And so on until the box size is 10.
[0096] Taking the logarithm of the box sizes (1 to 10), the logarithmized box size value log_box_size1 is Figure 4 as shown, where in the embodiments of the present application, the logarithm with base 10 is taken.
[0097] Take the logarithm of the count count1 corresponding to each box size to obtain the logarithmized count. Use the logarithmized box size as the abscissa and the logarithmized count as the ordinate to obtain the first set of coordinate points. Based on the first set of coordinate points, draw the first scatter plot. Obviously, one of the coordinate points in the first set of coordinate points is a scatter point in the first scatter plot.
[0098] As an alternative example, the above-mentioned determining a current first decreasing coefficient based on the first set of coordinate points includes:
[0099] Based on each coordinate point in the first set of coordinate points, fit to obtain the first straight line;
[0100] Determine the slope of the first straight line as the first fractal dimension;
[0101] Determine the difference between 1 and the first fractal dimension as the current first decreasing coefficient.
[0102] After determining the first scatter plot according to the technical solution in the above embodiment, fit these logarithmized scatter points (the first set of coordinate points) by methods such as linear regression. The slope of the fitted straight line is the first fractal dimension. For example, use relevant libraries in Python (such as numpy and scikit-learn) for linear regression fitting.
[0103] Then subtract the first fractal dimension from 1 to obtain the nth first decreasing coefficient. The reason for using 1 minus the first fractal dimension to calculate the nth first decreasing coefficient is that the fractal dimension reflects the filling degree of data in space or the complexity of distribution. When the fractal dimension is large, it means that the data distribution is relatively dense or complex; when the fractal dimension is small, the data distribution is relatively sparse or simple. And 1 - fractal dimension can describe this distribution characteristic from the opposite angle.
[0104] For example, when the fractal dimension is close to 1, 1 - fractal dimension is close to 0, indicating that the data distribution is relatively simple. At this time, the decreasing coefficient is small, which means that when predicting the number of newly added defects in the next round, the growth rate should be small.
[0105] As another alternative example, the above-mentioned creating a second scatter plot based on the second array corresponding to the closed defect data in each round of the previous n - 1 rounds of tests includes:
[0106] Determine the second element with the largest value from the second set of elements corresponding to the second array;
[0107] Based on the second element, determine the second set of parameters, where the second set of parameters includes a second set of positive integers from 1 to M, M is the value of the second element, and M is a positive integer greater than or equal to 1;
[0108] Determine the second scatter plot based on the second set of parameters and the second set of elements.
[0109] Taking Figure 5 the shown array B = [2, 3, 4, 5, 6] as the second array as an example, among the 5 elements, the second element with the largest value is determined to be 6. Then, according to the box-counting method, a series of different scales (box size box_size2) are selected, specifically 6 parameters between 1 and 6 (which can also be understood as 6 scales).
[0110] Among them, the basic principle of the box-counting method can be combined with the description in the above embodiments and will not be elaborated here.
[0111] During the application process, by plotting the relationship graph between the logarithm of the box size and the logarithm of the number of boxes (abbreviation: logarithmic graph), the second fractal dimension can be estimated.
[0112] By using the box-counting method of fractal geometry to calculate the closed defect data in each round of the test process, the quantization process in the prediction process is realized, and the accuracy of the prediction result of the test end time is improved.
[0113] As an optional implementation manner, the above determination of the second scatter plot based on the second set of parameters and the second set of elements includes:
[0114] Successively obtain a positive integer from the second set of positive integers as the second current parameter;
[0115] Successively compare the second current parameter with each element in the second set of elements, and count the second element quantity of the elements in the second set of elements that are greater than or equal to the second current parameter;
[0116] Take the logarithm of the second current parameter to obtain the third logarithmic value;
[0117] Take the logarithm of the second element quantity to obtain the fourth logarithmic value;
[0118] Taking the third logarithmic value as the abscissa and the fourth logarithmic value as the ordinate, determine the current scatter point in the second scatter plot (the current scatter point here corresponds to the current coordinate point in the second set of coordinate points).
[0119] For example, assume the second array is Figure 5 the shown B = [2, 3, 4, 5, 6], and regard the number of closed defects in each round (for example, 2, 3, 4, etc.) as data points in a one-dimensional space (which can be imagined as distributed on a straight line).
[0120] Based on the 5 elements in the above array B, it can be determined that the box size is 6 positive integers between 1 and 6.
[0121] Starting from the first element 2, assume the current box size is box_size2. If the current element is less than or equal to box_size2, it means this data point can be covered by a box of size box_size2, and the counter count1 is incremented by 1.
[0122] For example, when the box size is 1, all elements in B are greater than 1 and cannot be covered; when the box size is 2, the first element in B is equal to 2 and can be covered, and the counter count2 is incremented by 1; when the box size is 3, the first and second elements are greater than or equal to 3 and can be covered, and the counter count2 is incremented by 2; similarly, when the box size is 4, there are 3 elements in A greater than or equal to 4, and the counter count2 is incremented by 3, and so on until the box size is 6.
[0123] Take the logarithm of the box size (1 to 6) to obtain the value of the logarithmized box size as log_box_size2. In this embodiment of the present application, the logarithm with base 10 is taken.
[0124] Take the logarithm of the count conut2 corresponding to each box size to obtain the logarithmized count. Using the logarithmized box size as the abscissa and the logarithmized count as the ordinate, draw the second scatter plot.
[0125] As an alternative example, the above determination of a current second decreasing coefficient based on the second set of coordinate points includes:
[0126] Based on each coordinate point in the second set of coordinate points, fit to obtain a second straight line;
[0127] Determine the slope of the second straight line as the second fractal dimension;
[0128] Determine the difference between 1 and the second fractal dimension as the current second decreasing coefficient.
[0129] After determining the second scatter plot according to the technical solution in the above embodiment, fit these logarithmized scatter points by methods such as linear regression. The slope of the fitted straight line is the second fractal dimension. For example, use relevant libraries in Python (such as numpy and scikit - learn) for linear regression fitting.
[0130] Then, subtracting the second fractal dimension from 1 gives the current second decreasing coefficient (which can also be understood as the nth second decreasing coefficient). The reason for calculating the nth second decreasing coefficient by subtracting the second fractal dimension from 1 is that the fractal dimension reflects the filling degree of data in space or the complexity of the distribution. Second, when the fractal dimension is large, it indicates that the data distribution is relatively dense or complex; when the second fractal dimension is small, the data distribution is relatively sparse or simple. And 1 - fractal dimension can describe this distribution characteristic from the opposite perspective.
[0131] In the embodiments of the present application, the fractal dimension can capture the complexity and self - similarity of data and is suitable for dealing with the fluctuations and irregularities of defective data. In addition, through the fractal dimension of newly added defects and the fractal dimension of closed defects, the obtained first decreasing coefficient and second decreasing coefficient can dynamically adjust the prediction and reflect the actual change trend of the data.
[0132] As an optional example, predicting the first group of newly added defective data in the current round of testing based on the current first decreasing coefficient includes:
[0133] Determining the second defective quantity of newly added defects in the current round of testing as the product of the current first decreasing coefficient and the first defective quantity of newly added defects in the last round of testing in the batch rounds;
[0134] Summarizing the newly added defects that have accumulated during the batch rounds of testing to obtain the total number of first defects;
[0135] Calculating the ratio between the defective quantity of each level and the total number of first defects respectively to obtain the first group of ratios;
[0136] Based on the first group of ratios and the second defective quantity, determining the defective quantity of each level newly added in the current round of testing, where the first group of newly added defective data includes the defective quantity of each level newly added in the current round of testing.
[0137] In the case where the batch rounds are n - 1 rounds and the current round of testing is the nth round of testing after the first n - 1 rounds of testing, it is possible but not limited to predicting the nth group of newly added defective data in the nth round of testing based on the nth first decreasing coefficient. The detailed steps are as follows:
[0138] S31, determining the second defective quantity of newly added defects in the nth round of testing as the product of the nth first decreasing coefficient and the first defective quantity of newly added defects in the (n - 1)th round of testing;
[0139] S32, summarizing the newly added defects that have accumulated during the first n - 1 rounds of testing to obtain the total number of first defects;
[0140] S33. Calculate the ratio between the number of defects in each level and the total number of the first defects respectively to obtain the first group ratio.
[0141] S34. Based on the first group ratio and the number of the second defects, determine the number of defects in each level newly added during the nth round of testing. Among them, the newly added defect data in the nth group includes the number of defects in each level newly added during the nth round of testing.
[0142] Among them, the next round of newly added defects and their severity can be predicted by, but not limited to, the following methods:
[0143] (1) The decreasing coefficient of newly added defects × the number of newly added defects in the previous round = the number of predicted newly added defects in the next round. In this way, the number of newly added defects in the next round of testing can be predicted.
[0144] (2) Calculate the total number of newly added defects accumulated during the previous n - 1 rounds of testing to obtain the total number of the first defects.
[0145] (3) According to the total number of the first defects and the number of defects in each severity level, calculate the proportion of defects in each severity level respectively to obtain the first group ratio.
[0146] (4) Use the first group ratio to allocate the number of defects in each severity level predicted to be newly added during the nth round of testing.
[0147] For example, assume that before this round of testing, there are 10 accumulated defects. Among them, the numbers of high, medium, and low defects are 1, 3, and 6 respectively. Calculate that the number of predicted newly added defects in the next round is 20. Then, the numbers of defects in the high, medium, and low severity levels predicted to be newly added in the next round are 2, 6, and 12 respectively.
[0148] As an optional example, the above prediction of the first group of closed defect data closed during the current round of testing based on the current second decreasing coefficient includes:
[0149] Determine the fourth number of defects closed during the current round of testing as the product of the current second decreasing coefficient and the third number of defects closed during the last round of testing in the batch rounds.
[0150] Summarize the closed defects that have occurred cumulatively during the batch rounds of testing to obtain the total number of the second defects.
[0151] Calculate the ratio between the number of defects in each level and the total number of the second defects respectively to obtain the second group ratio.
[0152] Based on the second group ratio and the fourth defect quantity, determine the defect quantities of each level closed during the current round of testing, where the first group of closed defect data includes the defect quantities of each level closed during the current round of testing.
[0153] In the case where the batch round is the (n - 1)th round and the current round of testing is the nth round of testing after the first (n - 1) rounds of testing, it is possible but not limited to predict the nth group of closed defect data closed during the nth round of testing based on the nth second decreasing coefficient. The detailed steps are as follows:
[0154] S41, determine the fourth defect quantity of the defects closed during the nth round of testing by multiplying the nth second decreasing coefficient by the third defect quantity of the defects closed during the (n - 1)th round of testing;
[0155] S42, summarize the defects including the accumulated closed defects during the first (n - 1) rounds of testing to obtain the total second defect quantity;
[0156] S43, calculate the ratio between the defect quantity of each level and the total second defect quantity respectively to obtain the second group ratio;
[0157] S44, based on the second group ratio and the fourth defect quantity, determine the defect quantities of each level closed during the nth round of testing, where the nth group of closed defect data includes the defect quantities of each level closed during the nth round of testing.
[0158] Referring to the calculation method of the newly added defects during the next round of testing in the above embodiments, the predicted number of closed defects and the number of defects closed at each severity level during the next round of testing can be calculated, and this process will not be elaborated here.
[0159] In addition to predicting the defect quantities of each level closed during the nth round of testing in the manner of this embodiment, the defect data closed during the nth round of testing can also be determined by the following method.
[0160] First, use the closed defect decreasing coefficient × the number of closed defects in the previous round = the number of closed defects in the next round to determine the predicted number of closed defects during the nth round of testing.
[0161] If it is set that all defects are repaired and enter the next round, then calculate the remaining defect quantity of each severity level in the previous round × the repair time of each severity level respectively, take the longest time, and add it to the end time of the previous round to obtain the time to enter the next round of testing. Since it is set that all defects are repaired and enter the next round, the predicted number of closed defects in the next round is the net remaining defect quantity after the end of the current round. If it is set to enter the next round at a fixed time, then use the fixed time / the defect repair time of each severity level = the number of repaired defects of each severity level respectively.
[0162] In an optional example, when it is set that all defects are repaired and the next round enters, in the first round (the end time is 00:00 on January 1st), 20 new defects are added, with 2 high-severity, 6 medium-severity, and 12 low-severity. The net number of defects is 20, and the number of defects closed in this round is 0. Assuming that the speed of repairing defects of each severity level is 1 hour, taking the longest duration of 12, it means that all can be repaired in 12 hours.
[0163] In the second round (the start time is 12:00 on January 1st, and the end time is 15:00 on January 1st), where the end time is the start time plus the time required for this round of testing. Assuming that the time required for this round of testing is set to 3 hours, then in the second round, 10 new defects are added, with 1 high-severity, 3 medium-severity, and 6 low-severity. The net number of defects is 10, and the number of defects closed in this round is 20.
[0164] Based on the above data in the first and second rounds, predict the defect data for the third round. Among them, the number of defects closed is also 10, and the time takes the longest duration, that is, 6 hours. The end time of the second round is 15:00, so the start time of the third round is 15:00 plus 6 hours, that is, testing for the third round can start at 21:00.
[0165] For the convenience of calculation, in the embodiments of the present application, it is assumed that one day has 24 working hours. Under normal circumstances, it can be set to 8 working hours, and if it exceeds 8 hours, it will be postponed to the next day.
[0166] In another optional example, when it is set to enter the next round at a fixed time, the defect data for the nth round of testing process can be predicted by, but not limited to, the following methods.
[0167] Assume that the fixed repair time is set to 8 hours. After 8 hours, regardless of whether all defects are resolved, the next round will enter. Among them, in the first round (the end time is 00:00 on January 1st), 20 new defects are added, with 2 high-severity, 6 medium-severity, and 12 low-severity. The net number of defects in this round is 20, and the number of defects closed is 0. Assume that the speed of repairing defects of each severity level is 1 hour to determine the longest duration.
[0168] The start time of the second round is 8:00 on January 1st, and the end time is 11:00. Among them, the end time is the start time plus the time required for this round of testing. Assume that the time required for this round of testing is set to 3 hours. In the second round of testing, 10 new defects are added, with 1 high-severity, 3 medium-severity, and 6 low-severity. The defect resolution situation in the previous round is that for high and medium, both are less than 8 hours, so they have been all resolved. For low, it is 12, and 8 hours are given to resolve the defects. So when entering the second round, there are still 4 defects remaining. After the second round ends, the net number of defects is 10 + 4 = 14; the number of defects closed is 2 + 6 + 8 = 16, and the distribution is 1 high-severity, 3 medium-severity, and 10 low-severity.
[0169] When predicting the third round, the next round is predicted 8 hours later. Therefore, the distribution of closed defect levels in the third round of prediction is 1 high, 3 medium, and 8 low. Thus, a total of 12 defects are closed in the third round.
[0170] After predicting the defect data newly added and the defect data closed during the next round of testing, the cumulative newly added defects are also determined to be equal to the cumulative closed defects through recursive prediction.
[0171] If the two are equal, it means the test passes, the prediction ends, and the prediction result is the next round; if the current round is the third round, the prediction result is that the fourth round can pass the test. If the two are not equal, the newly added defect data and closed data of each severity level predicted for the next round are added to the defect data pool of the data module, the prediction count is incremented by 1, and the next prediction continues. If the current round is still the third round, after the prediction count is incremented by 5, if the cumulative newly added defects are determined to be equal to the cumulative closed defects, then the prediction result is that the 8th round can pass the test.
[0172] Among them, for the case where the two are not equal, the newly added defect data and closed data of each severity level predicted for the next round are added to the defect data pool of the data module. The following is an example: Assume the initial defect pool is: Round 1: 2 high, 6 medium, 12 low; Round 2: 1 high, 3 medium, 6 low; The prediction result for the third round is 0 high, 1 medium, 3 low; Then when predicting the fourth round, the data of the third round will be added to the historical data for prediction.
[0173] Using the above recursive algorithm allows for gradually approaching the result and gradually reducing the error through multiple iterations. Additionally, by combining the recursive algorithm with the method of dynamically adjusting the decreasing coefficient, the prediction process can be updated in real time according to the results of each round, improving the accuracy of the prediction.
[0174] As an optional implementation method, in the case where the number of cumulative newly added defects including the first set of newly added defect data is equal to the number of cumulative closed defects including the first set of closed defect data, determining the end time of the current project test as the time at the end of the current round includes:
[0175] Determining the repair duration from after the end of the last round of testing in the batch rounds to before the start of the current round of testing;
[0176] Determining the first test duration required for the testing process of the batch rounds;
[0177] Based on the first test duration, the repair duration, and the second test duration of the current round of testing, determining the time at the end of the current round of testing.
[0178] In the case where the batch round is the (n - 1)-th round and the current round of testing is the n-th round of testing after the first (n - 1) rounds of testing, the time at the end of the n-th round of testing, that is, the time at the end of the current round of testing, can be determined, but is not limited to, by the following methods:
[0179] Determine the repair duration from the end of the (n - 1)-th round of testing to the start of the n-th round of testing;
[0180] Determine the first test duration of the first (n - 1) rounds of testing;
[0181] Based on the first test duration, the repair duration, and the second test duration of the n-th round of testing, determine the time at the end of the n-th round of testing.
[0182] As Figure 6 shown, during the testing process of adjacent rounds, there will be a period of repair time. After determining the round that passes the test (for example, the n-th round passes the test) using the above embodiments, it is also necessary to determine the repair time between the end of the (n - 1)-th round of testing and the start of the n-th round of testing.
[0183] In other words, using the above embodiments, it is only possible to determine that the n-th round passes the test, but the start time of the n-th round of testing cannot be known. Therefore, it is necessary to first determine the repair time after the end of the (n - 1)-th round of testing. Specifically, reference can be made to the above embodiments. If it is set that all defects are repaired and then enter the next round, the remaining defect quantity of each severity level in the previous round × the repair time of each severity level is calculated respectively, and the longest time is taken and added to the end time of the previous round to obtain the start time of the next round of testing.
[0184] For the convenience of calculation, in the embodiments of the present application, it is default that the test duration used for each round of testing is known. Therefore, the sum of the repair time after the end of the (n - 1)-th round of testing, the first test duration consumed by the first (n - 1) rounds of testing, and the second test duration required for the n-th round of testing is determined as the time at the end of the n-th round of testing, that is, the end time of the current project testing.
[0185] Through the above embodiments provided by the present application, combining the dynamic adjustment ability of fractal geometry and the recursive step-by-step approximation characteristics, it is possible to predict the change of defect data more flexibly and accurately. At the same time, it can adapt to the complex changes of the defect quantity and severity level, and provide a more reliable prediction of the test end time.
[0186] To understand the above method for determining the end time more clearly, the following further explains and illustrates it in combination with Figure 3 the overall flowchart shown.
[0187] S302, Defect data pool preparation;
[0188] Among them, it includes the number of newly added and closed defects in each round and the severity level corresponding to each defect; the new time and resolution time of each defect; and the start time and end time of each round of testing, etc.
[0189] S304. Determine the reduction coefficient of this round according to the newly added defect data and closed defect data in each round of testing in the historical rounds.
[0190] Among them, it includes the reduction coefficient of newly added defects and the reduction coefficient of closed defects in this round. Specifically, reference can be made to the description in the part of the determination method of the nth first reduction coefficient and the nth second reduction coefficient in the above-mentioned embodiment, which will not be elaborated here.
[0191] S306. Calculate the repair speed.
[0192] Among them, the repair speed is mainly used to calculate the repair time between adjacent rounds of testing. Specifically, reference can be made to the description in the above-mentioned embodiment for Figure 6 the description part.
[0193] S308. Predict the number of newly added and closed defects during the nth round of testing according to the nth first reduction coefficient and the nth second reduction coefficient.
[0194] S310. Calculate whether the cumulative number of newly added defects is equal to the cumulative number of closed defects through the prediction module.
[0195] If so, stop the testing after the next round of testing; if not, execute step S312.
[0196] S312. Predict the data of newly added and closed defects in the next round of testing.
[0197] At the same time, add the newly added defect data and closed defect data during this round of testing to the defect data pool. Specifically, reference can be made to the description in the above-mentioned embodiment, which will not be elaborated here.
[0198] It should be noted that for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that this application is not limited by the described action sequence, because according to this application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0199] According to another aspect of the embodiments of the present application, there is also provided an end time determination device as Figure 7 shown, and this device includes:
[0200] The first acquisition unit 702 is configured to acquire initial newly added defect data and initial closed defect data, where the initial newly added defect data includes defects newly added during each round of project testing before the current moment, and the initial closed defect data includes defects closed during each round of project testing before the current moment;
[0201] The first processing unit 704 is configured to perform multiple rounds of testing based on the initial newly added defect data and the initial closed defect data until the number of accumulated newly added defects obtained after the current round of testing is equal to the number of accumulated closed defects, and then end the testing. Among them, the newly added defect data in each round of testing process is determined based on the first decreasing coefficient in the previous round of testing process, and the closed defect data in each round of testing process is determined based on the second decreasing coefficient in the previous round of testing process. The first decreasing coefficient is used to represent the growth rate of newly added defects in the next round of testing process, and the second decreasing coefficient is used to represent the growth rate of closed defects in the next round of testing process;
[0202] The second processing unit 706 is configured to determine the time at the end of the current round of testing as the end time of the current project testing.
[0203] Optionally, the above-mentioned first processing unit 704 includes:
[0204] The first processing module is configured to, when the initial newly added defect data and the initial closed defect data are data obtained after batch rounds of testing, determine the current first decreasing coefficient and the current second decreasing coefficient of the current round of testing after batch rounds of testing based on the newly added defect data and the closed defect data in each round of testing process in the batch rounds, where the number of batch rounds is greater than or equal to a preset quantity;
[0205] The first prediction module is configured to predict the first set of newly added defect data newly added during the current round of testing based on the current first decreasing coefficient;
[0206] The second prediction module is configured to predict the first set of closed defect data closed during the current round of testing based on the current second decreasing coefficient;
[0207] The second processing module is configured to determine the end time of the current project testing as the time at the end of the current round when the number of accumulated newly added defects including the first set of newly added defect data is equal to the number of accumulated closed defects including the first set of closed defect data.
[0208] Optionally, the above-mentioned first processing module includes:
[0209] The first processing sub-module is used to determine the first set of coordinate points based on the first element with the largest value in the first array corresponding to the newly added defect data in each round of the batch round of test processes, where one element in the first array represents the number of newly added defects in one of the rounds of the batch round of test processes;
[0210] The second processing sub-module is used to determine the second set of coordinate points based on the second element with the largest value in the second array corresponding to the closed defect data in each round of the batch round of test processes, where one element in the second array represents the number of closed defects in one of the rounds of the batch round of test processes;
[0211] The third processing sub-module is used to determine the current first decreasing coefficient based on the first set of coordinate points; and determine the current second decreasing coefficient based on the second set of coordinate points.
[0212] Optionally, the above first processing module includes:
[0213] The fourth processing sub-module is used to fit a first straight line based on each coordinate point in the first set of coordinate points;
[0214] The fifth processing sub-module is used to determine the slope of the first straight line as the first fractal dimension;
[0215] The sixth processing sub-module is used to determine the difference between 1 and the first fractal dimension as the current first decreasing coefficient.
[0216] Optionally, the above first processing module includes:
[0217] The seventh processing sub-module is used to fit a second straight line based on each coordinate point in the second set of coordinate points;
[0218] The eighth processing sub-module is used to determine the slope of the second straight line as the second fractal dimension;
[0219] The ninth processing sub-module is used to determine the difference between 1 and the second fractal dimension as the current second decreasing coefficient.
[0220] Optionally, the above first prediction module includes:
[0221] The tenth processing sub-module is used to determine the product of the current first decreasing coefficient and the first defect quantity of the newly added defects in the last round of the batch round of test processes as the second defect quantity of the newly added defects in the current round of test processes;
[0222] The eleventh processing sub-module is used to summarize the newly added defects that have accumulated during the batch round of test processes to obtain the total first defect quantity;
[0223] The first calculation sub-module is used to calculate the ratio between the number of defects at each level and the total number of first defects respectively, so as to obtain the first group of ratios.
[0224] The twelfth processing sub-module is used to determine the number of newly added defects at each level during the current round of testing based on the first group of ratios and the number of second defects, where the first group of newly added defect data includes the number of newly added defects at each level during the current round of testing.
[0225] Optionally, the above-mentioned second prediction module includes:
[0226] The thirteenth processing sub-module is used to determine the number of fourth defects for defect closure during the current round of testing by multiplying the current second decreasing coefficient by the number of third defects for defect closure in the last round of testing in the batch rounds.
[0227] The fourteenth processing sub-module is used to summarize the accumulated closed defects during the batch round of testing to obtain the total number of second defects.
[0228] The second calculation sub-module is used to calculate the ratio between the number of defects at each level and the total number of second defects respectively, so as to obtain the second group of ratios.
[0229] The fifteenth processing sub-module is used to determine the number of closed defects at each level during the current round of testing based on the second group of ratios and the number of fourth defects, where the first group of closed defect data includes the number of closed defects at each level during the current round of testing.
[0230] Optionally, the above-mentioned second processing module includes:
[0231] The sixteenth processing sub-module is used to determine the repair duration from the end of the last round of testing in the batch rounds to the start of the current round of testing.
[0232] The seventeenth processing sub-module is used to determine the first test duration required for the batch round of testing.
[0233] The eighteenth processing sub-module is used to determine the time at the end of the current round of testing based on the first test duration, the repair duration, and the second test duration of the current round of testing.
[0234] It should be noted that the embodiments of the end time determination device for project testing here can refer to the embodiments of the above end time determination method, which will not be elaborated here.
[0235] According to another aspect of the embodiments of the present application, there is also provided an electronic device for implementing the above end time determination method, and this electronic device can be Figure 1The target terminal or server shown. In this embodiment, the electronic device is taken as an example of the target terminal for illustration. As Figure 8 shown, the electronic device includes a memory 802 and a processor 804. A computer program is stored in the memory 802, and the processor 804 is configured to execute the steps in any of the above method embodiments through the computer program.
[0236] Optionally, in this embodiment, the above electronic device may be at least one network device among multiple network devices in a computer network.
[0237] Optionally, in this embodiment, the above processor may be configured to execute the following steps through a computer program:
[0238] S1, obtain initial newly added defect data and initial closed defect data, where the initial newly added defect data includes defects newly added during each round of project testing before the current moment, and the initial closed defect data includes defects closed during each round of project testing before the current moment;
[0239] S2, based on the initial newly added defect data and the initial closed defect data, perform multiple rounds of testing until the number of accumulated newly added defects obtained after the current round of testing is equal to the number of accumulated closed defects, and end the testing. Among them, the newly added defect data in each round of testing process is determined based on the first decreasing coefficient in the previous round of testing process, and the closed defect data in each round of testing process is determined based on the second decreasing coefficient in the previous round of testing process. The first decreasing coefficient is used to represent the growth rate of newly added defects in the next round of testing process, and the second decreasing coefficient is used to represent the growth rate of closed defects in the next round of testing process;
[0240] S3, determine the time at the end of the current round of testing as the end time of the current project testing.
[0241] Optionally, those of ordinary skill in the art can understand that Figure 8 the structure shown is only schematic, Figure 8 and it does not limit the structure of the above electronic device. For example, the electronic device may further include more or fewer components (such as a network interface, etc.) than those shown in Figure 8 or have a different configuration from that shown in Figure 8 shown.
[0242] Among them, the memory 802 can be used to store software programs and modules, such as the program instructions / modules corresponding to the end time determination method and device in the embodiments of the present application. The processor 804 executes various functional applications and data processing by running the software programs and modules stored in the memory 802, that is, implements the above-mentioned end time determination method. The memory 802 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some instances, the memory 802 may further include a memory remotely disposed relative to the processor 804, and these remote memories may be connected to the terminal through a network. Examples of the above network include but are not limited to the Internet, enterprise intranets, local area networks, mobile communication networks, and combinations thereof. Among them, the memory 802 may specifically but not limitedly be used to store initial newly added defect data, initial closed defect data, and the first decreasing coefficient, etc. As an example, as Figure 8 shown, the above-mentioned memory 802 may include but not limited to the first acquisition unit 702, the first processing unit 704, and the second processing unit 706 in the above-mentioned end time determination device. In addition, it may also include but not limited to other module units in the above-mentioned end time determination device, which will not be elaborated in this example.
[0243] Optionally, the above-mentioned transmission device 806 is used to receive or send data via a network. Specific examples of the above-mentioned network may include wired networks and wireless networks. In one instance, the transmission device 806 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers through a network cable, thereby enabling communication with the Internet or a local area network. In one instance, the transmission device 806 is a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0244] In addition, the above-mentioned electronic device further includes: a display 808, which is used to display the screen of the above-mentioned test process and the test end screen; and a connection bus 810, which is used to connect each module component in the above-mentioned electronic device.
[0245] In other embodiments, the above-mentioned target terminal or server may be a node in a distributed system. Among them, the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting multiple nodes through network communication. Among them, the nodes can form a point-to-point network, and any form of computing device, such as electronic devices like servers and target terminals, can become a node in the blockchain system by joining the point-to-point network.
[0246] According to another aspect of the present application, a computer program product or a computer program is provided. The computer program product or the computer program includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the application program strengthening method provided in various optional implementation manners in aspects such as the above-mentioned server verification processing. Among them, the computer program is configured to execute the steps in any one of the above method embodiments when running.
[0247] Optionally, in this embodiment, the above-mentioned computer-readable storage medium may be configured to store a computer program for executing the following steps:
[0248] S1. Obtain initial newly added defect data and initial closed defect data, where the initial newly added defect data includes defects newly added during each round of project testing before the current moment, and the initial closed defect data includes defects closed during each round of project testing before the current moment;
[0249] S2. Based on the initial newly added defect data and the initial closed defect data, perform multiple rounds of testing until the number of accumulated newly added defects obtained after the current round of testing is equal to the number of accumulated closed defects, and then end the testing. Among them, the newly added defect data in each round of testing process is determined based on the first decreasing coefficient in the previous round of testing process, and the closed defect data in each round of testing process is determined based on the second decreasing coefficient in the previous round of testing process. The first decreasing coefficient is used to represent the growth rate of newly added defects in the next round of testing process, and the second decreasing coefficient is used to represent the growth rate of closed defects in the next round of testing process;
[0250] S3. Determine the time at the end of the current round of testing as the end time of the current project testing.
[0251] Optionally, in the embodiments of the present application, the term "module" or "unit" refers to a computer program with a predetermined function or a part of a computer program, which works together with other related parts to achieve a predetermined goal, and can be fully or partially implemented by using software, hardware (such as a processing circuit or a memory), or a combination thereof. Similarly, one processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be a part of the overall module or unit including the function of the module or unit.
[0252] Optionally, in this embodiment, those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by a program instructing the relevant hardware of the target terminal. The program can be stored in a computer-readable storage medium, which can include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, an optical disk, etc.
[0253] The serial numbers of the embodiments of the present application above are only for description and do not represent the superiority or inferiority of the embodiments.
[0254] If the integrated unit in the above embodiments is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in the above computer-readable storage medium. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing one or more computer devices (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present application.
[0255] In the above embodiments of the present application, the descriptions of the various embodiments each have their own emphases. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0256] In the several embodiments provided by the present application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only illustrative. For example, the division of units is only a logical function division. In actual implementation, there can 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 mutual coupling, direct coupling, or communication connection can be through some interfaces. The indirect coupling or communication connection of units or modules can be in an electrical or other form.
[0257] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place, or they can be 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.
[0258] In addition, in each embodiment of the present application, each functional unit may be integrated into one processing unit, may exist separately as individual physical units, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware or in the form of software functional units.
[0259] The above are only the preferred embodiments of the present application. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present application, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present application.
Claims
1. A method for determining an end time, characterized in that: include: Acquire initial newly added defect data and initial closed defect data, wherein the initial newly added defect data includes defects newly added during each round of project testing before the current moment, and the initial closed defect data includes defects closed during each round of project testing before the current moment; Based on the initial new defect data and the initial closed defect data, multiple rounds of testing are performed until the cumulative number of new defects obtained after the current round of testing is equal to the cumulative number of closed defects, and the testing is terminated, wherein the new defect data in each round of testing is determined based on the first decreasing coefficient in the previous round of testing, and the closed defect data in each round of testing is determined based on the second decreasing coefficient in the previous round of testing, the first decreasing coefficient is used to represent the growth rate of new defects in the next round of testing, and the second decreasing coefficient is used to represent the growth rate of closed defects in the next round of testing; The time when the current round of testing ends is determined as the end time of the current project test.
2. The method according to claim 1, characterized in that: The performing multiple rounds of testing based on the initial newly added defect data and the initial closed defect data until the cumulative number of newly added defects obtained after the current round of testing is equal to the cumulative number of closed defects includes: In the case where the initial newly added defect data and the initial closed defect data are data obtained after batch rounds of testing, a current first decreasing coefficient and a current second decreasing coefficient of the current round of testing after the batch rounds of testing are determined based on the newly added defect data and the closed defect data in each round of testing in the batch rounds, wherein the number of batch rounds is greater than or equal to a preset number; Based on the current first decreasing coefficient, predicting a first group of newly added defect data added during the current round of testing; Based on the current second decreasing coefficient, predicting a first group of closed defect data closed during the current round of testing; When the cumulative number of new defects including the first group of new defect data is equal to the cumulative number of closed defects including the first group of closed defect data, the end time of the current project test is determined to be the time when the current round ends.
3. The method according to claim 2, characterized in that The determining, based on the newly added defect data and the closed defect data in each round of testing in the batch round, a current first decreasing coefficient and a current second decreasing coefficient of the current round of testing after the batch round of testing, comprises: Determine a first set of coordinate points based on a first element with a maximum value in a first array corresponding to the newly added defect data in each round of testing in the batch round, wherein an element in the first array represents the number of newly added defects in one round of testing in the batch round; Determine a second set of coordinate points based on a second element with the largest value in a second array corresponding to the closed defect data in each round of testing in the batch round, wherein an element in the second array represents the number of closed defects in one round of testing in the batch round; Based on the first set of coordinate points, the current first decreasing coefficient is determined; based on the second set of coordinate points, the current second decreasing coefficient is determined.
4. The method according to claim 3, characterized in that The determining the current first decreasing coefficient based on the first set of coordinate points includes: Based on each coordinate point in the first group of coordinate points, fitting a first straight line; determining the slope of the first straight line as a first fractal dimension; The difference between 1 and the first fractal dimension is determined as the current first decreasing coefficient.
5. The method according to claim 3, characterized in that: The determining the current second decreasing coefficient based on the second set of coordinate points includes: Based on each coordinate point in the second group of coordinate points, fitting a second straight line; determining the slope of the second straight line as a second fractal dimension; The difference between 1 and the second fractal dimension is determined as the current second decreasing coefficient.
6. The method according to claim 2, characterized in that The predicting, based on the current first decreasing coefficient, of a first group of newly added defect data added during the current round of testing includes: Determine the second defect number of newly added defects in the current round of testing by multiplying the current first decreasing coefficient by the first defect number of newly added defects in the last round of testing in the batch round; Summarizing the newly added defects accumulated during the batch round test to obtain a first total number of defects; Calculate the ratio between the number of defects at each level and the total number of the first defects to obtain a first group ratio; Based on the first group proportion and the second defect number, the number of defects of each level newly added during the current round of testing is determined, wherein the first group of newly added defect data includes the number of defects of each level newly added during the current round of testing.
7. The method according to claim 2, characterized in that The predicting of the first set of closed defect data closed during the current round of testing based on the current second decreasing coefficient includes: Determine the fourth defect number of closed defects in the current round of testing by multiplying the current second decreasing coefficient and the third defect number of closed defects in the last round of testing in the batch round as the fourth defect number of closed defects in the current round of testing; Summarize the closed defects accumulated during the batch round test to obtain a second total number of defects; Calculate the ratio between the number of defects of each level and the total number of the second defects to obtain the second group ratio; Based on the second group proportion and the fourth defect number, the number of defects of each level closed during the current round of testing is determined, wherein the first group of closed defect data includes the number of defects of each level closed during the current round of testing.
8. The method according to any one of claims 2 to 7, characterized in that The step of determining the end time of the current project test as the time at the end of the current round when the cumulative number of new defects including the first group of new defect data is equal to the cumulative number of closed defects including the first group of closed defect data comprises: Determine the repair time from the end of the last round of testing in the batch round to the start of the current round of testing; Determining a first test duration required for the batch round test process; The time when the current round of testing ends is determined based on the first test duration, the repair duration, and the second test duration of the current round of testing.
9. A device for determining an end time, characterized in that: include: A first acquisition unit is used to acquire initial newly added defect data and initial closed defect data, wherein the initial newly added defect data includes defects newly added during each round of project testing before the current moment, and the initial closed defect data includes defects closed during each round of project testing before the current moment; A first processing unit is used to perform multiple rounds of testing based on the initial new defect data and the initial closed defect data, until the cumulative number of new defects obtained after the current round of testing is equal to the cumulative number of closed defects, and the test is terminated, wherein the new defect data in each round of testing is determined based on the first decreasing coefficient in the previous round of testing, and the closed defect data in each round of testing is determined based on the second decreasing coefficient in the previous round of testing, the first decreasing coefficient is used to represent the growth rate of new defects in the next round of testing, and the second decreasing coefficient is used to represent the growth rate of closed defects in the next round of testing; The second processing unit is used to determine the time when the current round of testing ends as the end time of the current project test.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program can be executed by a terminal device or a computer to execute the method as claimed in any one of claims 1 to 8.
11. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 8 through the computer program.