A phased workload prediction method and system based on the characteristics of composite variables
Through the phased workload prediction method based on the characteristics of composite variables, linear regression and variational autoencoding algorithms are used to solve the problem of inaccurate project testing workload evaluation in the existing technology, and accurate prediction of the overall project and the workload of each stage is achieved, improving the accuracy and quality assurance of project management.
Patent Information
- Application Number
- CN202111512097.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-07
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2041-12-07
AI Technical Summary
When evaluating project testing workload, existing software testing methods have limited considerations, resulting in low evaluation accuracy and cannot be refined into each project testing stage, affecting project progress and quality.
A phased workload prediction method based on the characteristics of composite variables is adopted, and a linear regression algorithm and a variational autocoding algorithm are used to establish a test workload prediction model containing independent variables and model parameters. Combined with project historical data, the workload of the entire project and each stage is calculated.
Accurate prediction of project testing workload is achieved, project progress grasp and quality assurance are improved, and uncertainty in testing workload evaluation is reduced.
Smart Images

Figure CN114238102B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of software system development and testing, and particularly to a phased workload prediction method and system based on the characteristics of composite variables. Background Art
[0002] The test cycle is a very important link in the entire test process. When testers conduct sign-off for each project, they need to evaluate the test workload of the project based on the existing project information. The more accurate the test workload assessment is, the more beneficial it is to grasp the overall rhythm of the project, which is related to the overall online plan and version rhythm of the project. To determine the test cycle, it is necessary to first evaluate the test workload. The more accurate the test workload assessment is, the more beneficial it is to grasp the overall rhythm of the project. Overestimating the workload will affect the overall progress of the project, and the work intensity and efficiency of testers will also be unsatisfactory. Underestimating the workload may cause greater impacts. There are quality risks for projects that are launched without sufficient testing.
[0003] In actual project testing, the assessment of workload is affected by many factors. Currently, there are many conventional test workload estimation methods in the software testing industry, such as the Ad-hoc method, the development time percentage method, the analogy method, the WBS method, the Delphi method, etc. Different test managers will use many different methods to estimate and arrange their test workloads. Although these existing methods have different principles, most of them are related to the development workload, with limited consideration of other influencing factors. The test workload evaluated is often not accurate enough and cannot be refined to each stage of the project test work. Summary of the Invention
[0004] To solve the deficiencies of the existing technology, the present invention proposes a phased workload prediction method and system based on the characteristics of composite variables. For the problem of how to evaluate the project test workload, on the basis of fully considering various influencing factors, the linear regression algorithm and the variational auto-encoding algorithm are used to predict the overall project test workload and the workload of each stage of the project test work, so as to achieve the purpose of accurately predicting the project test workload.
[0005] To achieve the above objectives, the technical solutions adopted by the present invention include:
[0006] A phased workload prediction method based on the characteristics of composite variables, characterized by including:
[0007] S1. Establish a test workload prediction model structure including several independent variables and model parameters according to the characteristics of various relevant variables in project testing, and the independent variables are respectively matched with specific variable characteristics;
[0008] S2. Determine the model parameters in the test workload prediction model structure based on the variable characteristics and total workload regression in the project test historical data, and obtain the test workload prediction model;
[0009] S3. Establish a phased workload prediction model structure containing at least one latent variable z according to each phase of the project test, and the phased workload prediction model structure belongs to the VAE model;
[0010] S4. Calculate and determine the latent variable z in the phased workload prediction model structure according to the total workload in the project test historical data, and obtain the phased workload prediction model;
[0011] S5. Input the relevant variable characteristics of the project to be predicted into the test workload prediction model, and calculate to obtain the predicted total workload;
[0012] S6. Input the predicted total workload into the phased workload prediction model, and calculate to obtain the predicted phased workload.
[0013] Furthermore, the test workload prediction model structure is as shown in Equation 1:
[0014]
[0015] Wherein, is the predicted total workload, and w1, w2, w3, w4, w5, w6, w7, b are model parameters;
[0016] x1 to x7 are variable characteristics. x1 is the project development workload, in person-days; x2 is the project test execution method, and the value range is any integer from 0 to 100, where the value 0 means completely manual execution, and the value 100 means completely automated execution; x3 is the project test personnel ability, and the value range is any integer from 1 to 5, where the value 5 is the highest ability and the value 1 is the lowest ability; x4 is the execution efficiency of the system automated test cases, and the value range is any integer from 6 to 10, where the highest execution efficiency is 10 and the lowest is 6; x5 is the execution efficiency of the system manual test cases, and the value range is any integer from 1 to 5, where the highest execution efficiency is 5 and the lowest is 1; x6 is the system historical defect rate, in percentage; x7 is the frequency of system requirement changes, and the value range is any integer from 1 to 5, where the highest frequency of requirement changes is 5 and the lowest is 1.
[0017] Furthermore, the step S2 further includes sub-steps:
[0018] S21. Define the prediction loss function as shown in Equation 2:
[0019]
[0020] Wherein, L is the loss, n is the number of historical data groups, is the predicted total workload, and y is the actual recorded true total workload in the historical data;
[0021] S22. Substitute the model parameters and variable characteristics into the prediction loss function and expand to obtain Equation 3:
[0022]
[0023] S23. Use the least squares method to solve the model parameters when L is the smallest.
[0024] Furthermore, each stage of the project test includes the workload y1 for writing the test plan, the workload y2 for requirement analysis, the workload y3 for case design, the workload y4 for test execution, and the workload y5 for writing the test report.
[0025] Furthermore, the structure of the phased workload prediction model is as shown in Equation 4:
[0026] P(X) = ∫P(X|z)P(z)dz Equation 4
[0027] Wherein, P(X) represents the required phased workload prediction model; P(X|z) is the conditional distribution and X|z follows the Gaussian distribution of N(μ(z), σ(z)), μ(z) represents the mean value, and σ(z) represents the variance; P(z) represents the Gaussian distribution of the latent variable z.
[0028] Furthermore, the step S6 includes:
[0029] Reparameterize the latent variable z using Equation 5:
[0030] z = μ + ∈ × σ Equation 5
[0031] Wherein, μ represents the mean value, σ represents the variance, and ∈ is the sampling value in the Gaussian distribution of the latent variable z.
[0032] The present invention also relates to a phased workload prediction system based on composite variable characteristics, which is characterized by including:
[0033] A historical data storage module for storing historical data of project tests;
[0034] A test workload prediction model generation module for establishing a test workload prediction model;
[0035] A test workload prediction module for calculating the predicted total workload by using the test workload prediction model with the relevant variable characteristics of the project to be predicted;
[0036] A phased workload prediction model generation module for establishing a phased workload prediction model;
[0037] A phased workload prediction module for calculating the predicted phased workload by using the phased workload prediction model through predicting the total workload.
[0038] The present invention also relates to a computer-readable storage medium, characterized in that a computer program is stored on the storage medium, and when the computer program is executed by a processor, the above-mentioned method is implemented.
[0039] The present invention also relates to an electronic device, characterized by comprising a processor and a memory;
[0040] The memory is used for storing project test historical data and various relevant variable characteristics of the project to be predicted;
[0041] The processor is used for executing the above-mentioned method by calling the project test historical data and various relevant variable characteristics of the project to be predicted.
[0042] The beneficial effects of the present invention are as follows:
[0043] By adopting the phased workload prediction method and system based on composite variable characteristics of the present invention, aiming at the problem of how to evaluate the project test workload, on the basis of fully considering various influencing factors, using the linear regression algorithm and the variational auto-encoding algorithm, the overall project test workload and the workload of each stage of the project test work are predicted, so as to achieve the purpose of accurately predicting the project test workload. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 It is a schematic flow chart of the phased workload prediction method based on composite variable characteristics of the present invention.
[0045] Figure 2 It is a schematic structural diagram of the phased workload prediction system based on composite variable characteristics of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0046] In order to understand the content of the present invention more clearly, it will be described in detail in combination with the drawings and embodiments.
[0047] As Figure 1 shown is a schematic flow chart of the phased workload prediction method based on composite variable characteristics of the present invention, which mainly includes:
[0048] S1. Establish a test workload prediction model structure including a number of independent variables and model parameters according to various relevant variable characteristics of the project test, as shown in Equation 1, and the independent variables are respectively matched with specific variable characteristics;
[0049]
[0050] Among them, is the predicted total workload, and w1, w2, w3, w4, w5, w6, w7, and b are model parameters;
[0051] x1 to x7 are variable characteristics. x1 is the project development workload, in person-days; x2 is the project test execution method, and its value range is any integer from 0 to 100. Among them, the value 0 means completely manual execution, and the value 100 means completely automated execution; x3 is the ability of project testers, and its value range is any integer from 1 to 5. Among them, the value 5 represents the highest ability, and the value 1 represents the lowest ability; x4 is the execution efficiency of the system's automated test cases, and its value range is any integer from 6 to 10. Among them, the highest execution efficiency is 10, and the lowest is 6; x5 is the execution efficiency of the system's manual test cases, and its value range is any integer from 1 to 5. Among them, the highest execution efficiency is 5, and the lowest is 1; x6 is the system's historical defect rate, in percentage; x7 is the frequency of system requirement changes, and its value range is any integer from 1 to 5. Among them, the highest frequency of requirement changes is 5, and the lowest is 1.
[0052] S2. Determine the model parameters in the test workload prediction model structure according to the variable characteristics and total workload regression in the project test historical data, and obtain the test workload prediction model, which specifically includes the following sub-steps:
[0053] S21. Define the prediction loss function as shown in Equation 2:
[0054]
[0055] Among them, L is the loss, n is the number of historical data groups, is the predicted total workload, and y is the actual recorded true total workload in the historical data;
[0056] S22. Substitute the model parameters and variable characteristics into the prediction loss function and expand to obtain Equation 3:
[0057]
[0058] S23. Use the least squares method to solve the model parameters when L is the smallest. In particular, use the least squares parameter estimation of the linear regression model, and take the derivatives of L(w, b) with respect to w1, w2, w3, w4, w5, w6, w7, and b respectively to obtain:
[0059]
[0060] The derivative formulas related to w2, w3, w4, w5, w6, w7 can be deduced by analogy with Equation 3-1 above;
[0061]
[0062] Let the above formula 3-1 (and its analogous formulas) and formula 3-2 be 0, and the optimal solution formulas 3-3 (and its analogous formulas) and formula 3-4 for w1, w2, w3, w4, w5, w6, w7, and b can be obtained:
[0063]
[0064] The relevant formulas for w2, w3, w4, w5, w6, w7 can be analogized according to the above formula 3-3;
[0065]
[0066] Furthermore, the prediction equation of the final linear regression model is obtained.
[0067] S3. Establish a staged workload prediction model structure including at least one latent variable z according to each stage of the project test. The staged workload prediction model structure belongs to the VAE model; among them, each stage of the project test includes the workload y1 for test plan writing, the workload y2 for requirement analysis, the workload y3 for case design, the workload y4 for test execution, and the workload y5 for test report writing; the staged workload prediction model structure is as shown in formula 4:
[0068] P(X) = ∫P(X|z)P(z)dz Formula 4
[0069] Among them, P(X) represents the required staged workload prediction model; P(X|z) is a conditional distribution and X|z follows a Gaussian distribution of N(μ(z), σ(z)), μ(z) represents the mean, and σ(z) represents the variance; P(z) represents the Gaussian distribution of the latent variable z. P(X|z) replaces f(z), and the dependence of x on z can be clearly expressed by the probability formula.
[0070] S4. Calculate and determine the latent variable z in the staged workload prediction model structure according to the total workload in the project test history data to obtain the staged workload prediction model; in particular, referring to the usual establishment method of the VAE model, perform the Encoder (encoder) and Decoder (decoder) processes, and seek to achieve as identical output as possible when the model has the same input.
[0071] Specifically, the Encoder process is the process of determining the latent variable z. Here, another distribution q(z|x) is needed, where q(z|x) ~ N(μ’(z), σ’(z)), and the mean and variance here are both calculated with respect to x. The neural network used in the Encoder process is called the inference network. For the Decoder process, a neural network is used to adjust the parameters to achieve the maximum likelihood. The neural network used in the Decoder process is called the inference network, that is, the network that generates output data based on the latent variable z.
[0072] S5. Input the characteristics of each relevant variable of the item to be predicted into the test workload prediction model, and calculate the total predicted workload.
[0073] S6. Input the total predicted workload into the phased workload prediction model, and calculate the predicted phased workload. In particular, it includes reparameterizing the latent variable z using Equation 5:
[0074] z = μ + ∈ × σ Equation 5
[0075] where μ represents the mean, σ represents the variance, and ∈ is the sampling value in the Gaussian distribution of the latent variable z.
[0076] During prediction, the forward inference process is simplified as follows: Input the sample x (total predicted workload) into the encoder, and the parameters of the approximate posterior distribution of the latent variable can be calculated (i.e., the mean and variance of the Gaussian distribution). At this time, a latent variable z needs to be sampled from the distribution, then z is input into the decoder, and finally the loss function is calculated, and the parameters are updated by backpropagation.
[0077] Since the process of sampling from the distribution is non-differentiable, that is, the mean and variance parameters calculated by the encoder are "submerged" after sampling the latent variable, and the decoder only faces an isolated z sampled from an unknown Gaussian distribution. It is necessary to tell the encoder μ(z) and σ(z), otherwise, during backpropagation, it will break when reaching the sampled z.
[0078] The above reparameterization process solves this problem by directly sampling ∈ in the Gaussian distribution.
[0079] After the model is trained through this process, directly sample the latent variable z from P(z), and then input it into the decoder, and the final output values y1, y2, y3, y4, y5 can be obtained, thus obtaining the workload of each stage of the project test work.
[0080] The present invention also relates to a phased workload prediction system based on composite variable characteristics with the structure as Figure 2 shown, including:
[0081] A historical data storage module for storing historical project test data;
[0082] A test workload prediction model generation module for establishing a test workload prediction model;
[0083] A test workload prediction module for calculating the predicted total workload by using the test workload prediction model with the characteristics of various relevant variables of the project to be predicted;
[0084] A phased workload prediction model generation module for establishing a phased workload prediction model;
[0085] A phased workload prediction module for calculating the predicted phased workload by using the phased workload prediction model with the predicted total workload.
[0086] By using this system, the execution of the above method steps can be realized.
[0087] The above are only the preferred specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed by the present invention should be covered by the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.
Claims
1. A phased workload prediction method based on the characteristics of composite variables, characterized in that Including: S1. Establish a test workload prediction model structure including several independent variables and model parameters according to the characteristics of various relevant variables in project testing, where each independent variable matches a specific variable characteristic; S2. Determine the model parameters in the test workload prediction model structure based on the variable characteristics and total workload in the project test historical data, and obtain the test workload prediction model; S3. Establish a stage-based workload prediction model structure including at least one latent variable z according to each stage of project testing, and the stage-based workload prediction model structure belongs to the VAE model; S4. Calculate and determine the latent variable z in the stage-based workload prediction model structure according to the total workload in the project test historical data, and obtain the stage-based workload prediction model; S5. Input the characteristics of various relevant variables of the project to be predicted into the test workload prediction model, and calculate the predicted total workload; S6. Input the predicted total workload into the stage-based workload prediction model, and calculate the predicted stage-based workload; The test workload prediction model structure is as shown in Equation 1: Among them, is the predicted total workload, and w1, w2, w3, w4, w5, w6, w7, and b are model parameters; x1 to x7 are variable characteristics. x1 is the project development workload, in person-days; x2 is the project test execution method, with a value range of any integer from 0 to 100, where a value of 0 means fully manual execution and a value of 100 means fully automated execution; x3 is the project test personnel ability, with a value range of any integer from 1 to 5, where a value of 5 is the highest ability and a value of 1 is the lowest ability; x4 is the execution efficiency of the system automated test cases, with a value range of any integer from 6 to 10, where the highest execution efficiency is 10 and the lowest is 6; x5 is the execution efficiency of the system manual test cases, with a value range of any integer from 1 to 5, where the highest execution efficiency is 5 and the lowest is 1; x6 is the system historical defect rate, in percentage; x7 is the frequency of system requirement changes, with a value range of any integer from 1 to 5, where the highest frequency of requirement changes is 5 and the lowest is 1; The step S2 further includes sub-steps: S21. Define the prediction loss function as shown in Equation 2: Among them, L is the loss, and n is the number of historical data groups. is the predicted total workload, and y i is the true total workload actually recorded in the historical data. S22. Substitute the model parameters and variable characteristics into the prediction loss function and expand to obtain Equation 3: S23. Use the least squares method to solve for the model parameters when L is the smallest.
2. The method according to claim 1, characterized in that, Each stage of the project test includes the test plan writing workload y1, requirements analysis workload y2, case design workload y3, test execution workload y4, and test report writing workload y5.
3. The method according to claim 2, wherein The stage-based workload prediction model structure is as shown in Equation 4: P(X)=∫P(X|z)P(z)dz Equation 4 Where, P(X) represents the required stage-based workload prediction model; P(X|z) is the conditional distribution and X|z follows a Gaussian distribution of N(μ(z),σ(z)), μ(z) represents the mean, and σ(z) represents the variance; P(z) represents the Gaussian distribution of the latent variable z.
4. The method according to claim 3, characterized in that, The step S6 includes: Reparameterize the latent variable z using Equation 5: z=μ+∈×σ Equation 5 Where, μ represents the mean, σ represents the variance, and ∈ is the sampling value in the Gaussian distribution of the latent variable z.
5. A phased workload prediction system based on the characteristics of composite variables, which applies the method according to any one of claims 1 to 4, characterized in that Including: A historical data storage module for storing historical data of project tests; A test workload prediction model generation module for establishing a test workload prediction model; A test workload prediction module for calculating the predicted total workload by using the test workload prediction model with the characteristics of various relevant variables of the project to be predicted; A phased workload prediction model generation module for establishing a phased workload prediction model; A phased workload prediction module for calculating the predicted phased workload by using the phased workload prediction model with the predicted total workload; 6. A computer-readable storage medium, characterized in that, A computer program is stored on the storage medium, and when the computer program is executed by a processor, the method described in any one of claims 1 to 4 is implemented.
7. An electronic device, characterized in that, Comprising a processor and a memory; The memory is used for storing historical data of project tests and the characteristics of various relevant variables of the project to be predicted; The processor is used for executing the method described in any one of claims 1 to 4 by calling the historical data of project tests and the characteristics of various relevant variables of the project to be predicted.
Citation Information
Patent Citations
Project workload acquisition method and system
CN104732307A