Project risk early warning method and device and computer program product
By obtaining and analyzing project information, calculating risk coefficients and volatility, and using logistic regression models for risk warning, the problem of difficulty in timely discovery of project risks in existing technology is solved, and the effectiveness and efficiency of project management are improved.
Patent Information
- Application Number
- CN202410696330.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-31
- Publication Date
- 2024-09-13
AI Technical Summary
Existing technology makes it difficult to provide early warning of project risks in a timely manner, affecting software quality and the effectiveness and efficiency of project delivery.
By obtaining project information, use case information, test execution information and defect information, calculate the quality and efficiency characteristics of the project, determine the risk coefficient, use logistic regression model training to obtain the optimal weight of the characteristics, calculate the risk size and volatility, and calculate the risk according to the threshold Make risk alerts.
It achieves comprehensive and timely risk discovery and mitigation, improves the effectiveness and efficiency of testing, and ensures the quality and on-time completion of software delivery.
Smart Images

Figure CN118642948A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of project management, and in particular to a project risk early warning method and device, and a computer program product. Background Art
[0002] Assessing test risks through test process data is of great significance in improving the effectiveness, efficiency and risk control of software quality and project management. It can provide a more comprehensive and timely understanding of the project status, assist in making wise decisions, and take appropriate measures to reduce the risks of testing and project delivery. This has great practical application needs for ensuring high-quality software delivery and on-time completion. Summary of the invention
[0003] The technical problem to be solved by the present invention is to provide a project risk early warning method and device, and a computer program product, which can provide a project risk early warning in a timely manner.
[0004] To solve the above technical problems, the embodiments of the present invention provide the following technical solutions:
[0005] On the one hand, a project risk early warning method is provided, including:
[0006] Obtain project information, use case information, test execution information, and defect information of the target project;
[0007] Calculating the achievement value of each feature of the target project according to the acquired project information, use case information, test execution information and defect information, wherein the features include quality features and efficiency features;
[0008] Determining the risk factor of the target project according to the achievement value of each characteristic of the target project;
[0009] According to the achievement value and risk classification of each feature of the target project, the optimal weight of each feature is obtained by training the logistic regression model;
[0010] Calculate the risk size and risk volatility of the target project based on the risk coefficient and the optimal weight of each feature;
[0011] Risk alarm is issued based on the risk size and risk volatility of the target project.
[0012] In some embodiments,
[0013] The project information includes at least one of the following: project number PrjNum, project test stage classification PrjStage, total number of project codes PrjCode, number of project indicator achievement IndPassNum, total number of project indicators IndNum;
[0014] The use case information includes at least one of the following: the total number of use cases CaseNum, the number of automated use cases AutoCase, and the number of days CaseTime for writing the use case;
[0015] The test execution information includes at least one of the following: the total number of test plan cases StaCaseNum, the number of test plan case executions StaExeNum, the number of test plan case passes StaPassNum, the test coverage TestCov, and the number of execution days TestStaTime;
[0016] The defect information includes at least one of the following: the total number of defects BugNum, the number of defect reopens ReoNum, the number of unresolved bugs UnresNum, and the number of bugs submitted per day DayNum.
[0017] In some embodiments,
[0018] The achieved value of the quality characteristic of the target project includes at least one of the following:
[0019] Use case execution rate, which is StaExeNum / StaCaseNum;
[0020] Use case pass rate, which is StaPassNum / StaCaseNum;
[0021] Use case code coverage, which is StaCaseNum*1000 / PrjCode;
[0022] Test coverage TestCov;
[0023] Product indicator achievement rate, IndPassNum / IndNum;
[0024] Defect density, BugNum*1000 / PrjCode;
[0025] Defect reopen rate, ReoNum / BugNum;
[0026] The remaining DI value is Among them, i is the type of severity level, and BugLev is the corresponding severity level coefficient.
[0027] In some embodiments,
[0028] The achievement value of the efficiency characteristic of the target project includes at least one of the following:
[0029] Use case writing efficiency, which is CaseNum / CaseTime;
[0030] Test automation rate, which is AutoCase / CaseNum;
[0031] Test execution efficiency, which is StaExeNum / TestStaTime;
[0032] Bug submission efficiency, which is DayNum.
[0033] In some embodiments,
[0034] Determining the risk coefficient of the target project according to the achieved values of each feature of the target project includes:
[0035] The risk coefficient of the target project is determined according to the value range of Xr / Xi and the corresponding relationship between the preset value range and the risk coefficient, wherein Xi is the preset feature baseline and Xr is the achieved value of the feature.
[0036] In some embodiments,
[0037] According to the achievement value and risk classification of each feature of the target project, the optimal weight of each feature is obtained by training through a logistic regression model, including:
[0038] Define the model: Where n is the number of features, w0 is the intercept, and wi is the weight of the feature;
[0039] Define the loss function: Where m is the number of training samples, is the true label of the sample, indicating that the sample belongs to the kth risk classification, is the model's predicted probability that the sample belongs to the kth class;
[0040] By using a gradient descent or stochastic gradient descent algorithm, the weight parameters are iteratively updated to minimize the loss function and obtain the optimal weight of the feature.
[0041] In some embodiments,
[0042] Calculating the risk size and risk volatility of the target project according to the risk coefficient and the optimal weight of each feature includes:
[0043] The risk size S and risk volatility σ are calculated by the following formula:
[0044]
[0045] Among them, Wi is the optimal weight of the feature, Mi is the risk coefficient of the target project, n is the number of features, n1 is the number of statistical days, and Si is the risk size of each day.
[0046] In some embodiments,
[0047] The risk alarm according to the risk size and risk volatility of the target project includes:
[0048] When the risk size of the target project is not less than a preset risk threshold and the risk volatility is not greater than a preset volatility threshold, a risk alarm is issued.
[0049] An embodiment of the present invention also provides a project risk early warning method, comprising:
[0050] The acquisition module is used to obtain the project information, use case information, test execution information and defect information of the target project;
[0051] A first processing module, configured to calculate the achievement value of each feature of the target project according to the acquired project information, use case information, test execution information and defect information, wherein the features include quality features and efficiency features;
[0052] A second processing module, configured to determine a risk factor of the target project according to the achievement value of each feature of the target project;
[0053] The third processing module is used to train the logistic regression model according to the achievement value and risk classification of each feature of the target project to obtain the optimal weight of each feature;
[0054] A fourth processing module, used for calculating the risk size and risk volatility of the target project according to the risk coefficient and the optimal weight of each feature;
[0055] The alarm module is used to issue risk alarms based on the risk size and risk volatility of the target project.
[0056] An embodiment of the present invention further provides an electronic device, including a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and the program or instruction implements the steps of the above method when executed by the processor.
[0057] An embodiment of the present invention further provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described above are implemented.
[0058] An embodiment of the present invention further provides a computer program product, comprising computer instructions, which implement the steps of the above method when executed by a processor.
[0059] The embodiments of the present invention have the following beneficial effects:
[0060] In the above scheme, project information, use case information, test execution information and defect information are obtained, and the achievement value of each feature of the target project is calculated based on the project information, use case information, test execution information and defect information. The risk coefficient of the target project is determined based on the achievement value of each feature of the target project. According to the risk coefficient and the optimal weight of each feature, the risk size and risk volatility of the target project are calculated, and risk alarms are issued based on the risk size and risk volatility of the target project. In this way, test risks can be discovered comprehensively and timely, so that risk mitigation plans can be formulated in time and problems can be solved before the target project is delivered, thereby improving the effectiveness and efficiency of testing. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Figure 1 A schematic diagram of a process of a project risk early warning method according to an embodiment of the present invention;
[0062] Figure 2 A schematic diagram of project risk early warning according to an embodiment of the present invention;
[0063] Figure 3 It is a structural schematic diagram of a project risk early warning device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0064] In order to make the technical problems, technical solutions and advantages to be solved by the embodiments of the present invention more clear, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.
[0065] The embodiments of the present invention provide a project risk early warning method and device, and a computer program product, which can provide a project risk early warning in a timely manner.
[0066] The embodiment of the present invention provides a project risk early warning method, such as Figure 1 and Figure 2 As shown, including:
[0067] Step 101: Obtain project information, use case information, test execution information, and defect information of a target project;
[0068] In some embodiments, the project information includes at least one of the following: project number PrjNum, project test stage classification PrjStage, total project code PrjCode, project indicator achievement number IndPassNum, and total project indicator IndNum; the use case information includes at least one of the following: total number of use cases CaseNum, number of automated use cases AutoCase, and number of days for use case writing CaseTime; the test execution information includes at least one of the following: total number of test plan use cases StaCaseNum, number of test plan use case executions StaExeNum, number of test plan use case passes StaPassNum, test coverage TestCov, and number of execution days TestStaTime; the defect information includes at least one of the following: total number of defects BugNum, number of defect reopens ReoNum, number of unresolved bugs UnresNum, and number of bugs submitted per day DayNum.
[0069] Taking the target project as Project A, specifically, the project information of Project A can be obtained from the project management system of the test intelligent management system (TIMS), such as the project number PrjNum, the project test stage classification PrjStage, the total number of project codes PrjCode, the number of project indicator achievements IndPassNum, the total number of project indicators IndNum, etc.; the use case information of Project A can be obtained from the use case management system of the test intelligent management system, such as the total number of use cases CaseNum, the number of automated use cases AutoCase, the number of days CaseTime for use case writing, etc.; the test management system of Project A can be obtained from the test management system of the test intelligent management system. Test execution information, such as the total number of test plan cases in each stage of the project StaCaseNum, the number of test plan case executions in each stage StaExeNum, the number of test plan case passes in each stage StaPassNum, the test coverage TestCov of each stage, the number of execution days TestStaTime of each stage, etc.; obtain the defect information of Project A from the defect management system of the test intelligent management system, such as the total number of defects in each stage BugNum, the number of defect reopens in each stage ReoNum, the number of unresolved bugs in each stage UnresNum, the number of bugs submitted per day DayNum, etc.
[0070] Step 102: Calculate the achievement value of each feature of the target project according to the acquired project information, use case information, test execution information and defect information, wherein the features include quality features and efficiency features;
[0071] The data obtained in step 101 are processed and calculated to obtain different test stages of project A, that is, the achievement values of quality characteristics and efficiency characteristics under each PrjStage.
[0072] In this embodiment, the target project includes eight quality characteristics, and the achievement value of each quality characteristic is calculated as follows:
[0073] Use case execution rate: the execution ratio of use cases in each stage of the test plan, that is, StaExeNum / StaCaseNum;
[0074] Use case pass rate: the pass ratio of the test cases in each stage of the test plan, that is, StaPassNum / StaCaseNum;
[0075] Use case code coverage: the number of test cases in each stage of the test plan covered by every 1,000 lines of code, that is, StaCaseNum*1000 / PrjCode;
[0076] Test coverage: It is the statistical result of the code coverage tool, namely TestCov;
[0077] Product indicator achievement rate: the ratio of the number of project indicators achieved to the total number of project indicators, i.e. IndPassNum / IndNum;
[0078] Defect density: the number of bugs generated per thousand lines of code in each stage of testing, that is, BugNum*1000 / PrjCode;
[0079] Defect reopen rate: the ratio of reopened bugs to all bugs in each stage of testing, that is, ReoNum / BugNum;
[0080] The remaining DI value is the product of the unresolved bugs in each stage of testing and their severity level coefficient BugLev, that is, Where i is the severity level, which is divided into: fatal, severe, general, and recommended, and the corresponding severity level coefficients BugLev are 10, 3, 1, and 0.1 respectively;
[0081] In this embodiment, the target project includes four efficiency features, and the achievement values of the efficiency features are calculated as follows:
[0082] Use case writing efficiency: the number of use cases written per day, i.e. CaseNum / CaseTime;
[0083] Test automation rate: the ratio of automated test cases to total test cases, i.e. AutoCase / CaseNum;
[0084] Test execution efficiency: the number of test cases executed per day in each stage, that is, StaExeNum / TestStaTime;
[0085] Bug submission efficiency: the number of bugs submitted per day, i.e. DayNum.
[0086] Step 103: determining the risk coefficient of the target project according to the achievement value of each characteristic of the target project;
[0087] In this embodiment, the risk coefficient of the target project can be determined according to the value interval of Xr / Xi and the correspondence between the preset value interval and the risk coefficient, where Xi is the preset feature baseline and Xr is the achieved value of the feature. By calculating the ratio of Xr / Xi, this embodiment can quickly match the risk coefficient and improve the efficiency of risk warning.
[0088] First, set feature baselines for the quality features and efficiency features of each stage. Once the feature baseline is reached, the feature is considered to have been achieved. Assuming that the test stage (PrjStage) of project A includes smoke testing, module testing, system testing, delivery testing, and online testing, the feature baselines Xi of the project are shown in the following table:
[0089]
[0090]
[0091] The achievement value of each feature calculated in step 102 is represented by Xr, and the risk coefficient is determined according to the distribution corresponding to the calculated value of Xr / Xi. As shown in the following table, the risk coefficient Mi of each feature in each stage is divided into 0-5:
[0092]
[0093]
[0094] For example, the result of dividing the achievement value Xr of the use case execution rate of the smoke test by X11 is 50%, which falls within the value interval of [40%, 60%), and the risk coefficient corresponding to the use case execution rate of the smoke test is 3; the result of dividing the achievement value Xr of the product indicator achievement rate of the system test by X53 is 90%, which falls within the value interval of [80%, 100%), and the risk coefficient corresponding to the product indicator achievement rate of the system test is 1, and so on.
[0095] Step 104: According to the achievement value and risk classification of each feature of the target project, a logistic regression model is trained to obtain the optimal weight of each feature;
[0096] In this embodiment, the optimal weight can be obtained through a logistic regression model based on the characteristic achievement value Xr and risk classification of each test stage. Assuming that the risk classification is divided into three categories: high risk, medium risk, and low risk, the specific process is as follows:
[0097] First, define the model: Where n is the number of features, such as project A has 8 quality features and 4 efficiency features; w0 is the intercept and wi is the weight of the feature.
[0098] Then determine the training set and define the loss function: Where m is the number of training samples, is the true label of the sample, indicating that the sample belongs to the kth risk classification, is the model's predicted probability that the sample belongs to the kth class;
[0099] Then, the weight parameters are iteratively updated to minimize the loss function through the gradient descent or stochastic gradient descent algorithm to obtain the optimal weight of each feature. In this embodiment, the optimal weight of each feature is obtained through the logistic regression model, and the risk warning of the target project can be accurately performed.
[0100] For example, the optimal feature weights of each test stage of project A can be shown in the following table:
[0101]
[0102] Step 105: Calculate the risk size and risk volatility of the target project according to the risk coefficient and the optimal weight of each feature;
[0103] Through the risk coefficient Mi determined in step 103 and the optimal weight Wi of each feature obtained in step 104, the risk size of each test stage of the target project can be calculated:
[0104] Where n is the number of features.
[0105] Step 106: Issue a risk alarm based on the risk size and risk volatility of the target project.
[0106] Specifically, a risk alarm may be issued when the risk magnitude of each test phase of the target project is not less than a preset risk threshold and the risk volatility is not greater than a preset volatility threshold, wherein the preset risk threshold and the preset volatility threshold are set for each test phase.
[0107] Assume that project A calculates the achievement values of quality characteristics and efficiency characteristics once a day. According to the statistical days, the daily risk volatility is calculated as follows:
[0108] Where n1 is the number of days for statistics, Si is the risk value of each test stage calculated every day, its arithmetic mean is μ, and σ is volatility.
[0109] Set the threshold S for issuing risk alarms for various risks at each test stage T and σ T , when S阶段 ≥S T And σ≤σ T When the corresponding risk alarm is issued, the threshold S T and σ T Can be set and adjusted as needed.
[0110] For example, the risk threshold of the smoke test phase is S T1 , the volatility threshold is σ T1 , then when the risk size S in the smoke test phase is greater than or equal to S T1 And the risk volatility σ in the smoke test phase is less than or equal to σ T1 The risk threshold of the module test phase is S T2 , the volatility threshold is σ T2 , then when the risk size S in the module testing phase is greater than or equal to S T2 And the risk volatility σ in the module testing phase is less than or equal to σ T2 When the system is tested, the corresponding risk alarm is issued. The risk threshold of the system test phase is S T3 , the volatility threshold is σ T3 , then when the risk size S in the system testing phase is greater than or equal to S T3 And the risk volatility σ in the system testing phase is less than or equal to σ T3 The risk threshold of the delivery test phase is S T4 , the volatility threshold is σ T4 , then when the risk size S in the delivery test phase is greater than or equal to S T4 And the risk volatility σ in the delivery test phase is less than or equal to σ T4 The risk threshold for the online testing phase is S T5 , the volatility threshold is σ T5 , then when the risk size S in the online testing phase is greater than or equal to S T5 And the risk volatility σ in the online testing phase is less than or equal to σ T5 When a risk occurs, a corresponding risk alarm is issued.
[0111] In this embodiment, project information, use case information, test execution information and defect information are obtained, and the achievement value of each feature of the target project is calculated based on the project information, use case information, test execution information and defect information. The risk coefficient of the target project is determined based on the achievement value of each feature of the target project. The risk size and risk volatility of the target project are calculated based on the risk coefficient and the optimal weight of each feature, and a risk alarm is issued based on the risk size and risk volatility of the target project. In this way, test risks can be discovered comprehensively and timely, so that risk mitigation plans can be formulated in time and problems can be solved before the target project is delivered, thereby improving the effectiveness and efficiency of testing.
[0112] The embodiment of the present invention also provides a project risk early warning method, such as Figure 3 As shown, including:
[0113] An acquisition module 21 is used to acquire project information, use case information, test execution information and defect information of a target project;
[0114] A first processing module 22, configured to calculate the achievement value of each feature of the target project according to the acquired project information, use case information, test execution information and defect information, wherein the features include quality features and efficiency features;
[0115] A second processing module 23, configured to determine the risk coefficient of the target project according to the achievement values of the characteristics of the target project;
[0116] The third processing module 24 is used to train the logistic regression model according to the achievement value and risk classification of each feature of the target project to obtain the optimal weight of each feature;
[0117] The fourth processing module 25 is used to calculate the risk size and risk volatility of the target project according to the risk coefficient and the optimal weight of each feature;
[0118] The alarm module 26 is used to issue a risk alarm based on the risk size and risk volatility of the target project.
[0119] In this embodiment, project information, use case information, test execution information and defect information are obtained, and the achievement value of each feature of the target project is calculated based on the project information, use case information, test execution information and defect information. The risk coefficient of the target project is determined based on the achievement value of each feature of the target project. The risk size and risk volatility of the target project are calculated based on the risk coefficient and the optimal weight of each feature, and a risk alarm is issued based on the risk size and risk volatility of the target project. In this way, test risks can be discovered comprehensively and timely, so that risk mitigation plans can be formulated in time and problems can be solved before the target project is delivered, thereby improving the effectiveness and efficiency of testing.
[0120] In some embodiments, the project information includes at least one of the following: project number PrjNum, project test stage classification PrjStage, total number of project codes PrjCode, project indicator achievement number IndPassNum, total number of project indicators IndNum;
[0121] The use case information includes at least one of the following: the total number of use cases CaseNum, the number of automated use cases AutoCase, and the number of days CaseTime for writing the use case;
[0122] The test execution information includes at least one of the following: the total number of test plan cases StaCaseNum, the number of test plan case executions StaExeNum, the number of test plan case passes StaPassNum, the test coverage TestCov, and the number of execution days TestStaTime;
[0123] The defect information includes at least one of the following: the total number of defects BugNum, the number of defect reopens ReoNum, the number of unresolved bugs UnresNum, and the number of bugs submitted per day DayNum.
[0124] In some embodiments, the achieved value of the quality characteristic of the target project includes at least one of the following:
[0125] Use case execution rate, which is StaExeNum / StaCaseNum;
[0126] Use case pass rate, which is StaPassNum / StaCaseNum;
[0127] Use case code coverage, which is StaCaseNum*1000 / PrjCode;
[0128] Test coverage TestCov;
[0129] Product indicator achievement rate, IndPassNum / IndNum;
[0130] Defect density, BugNum*1000 / PrjCode;
[0131] Defect reopen rate, ReoNum / BugNum;
[0132] The remaining DI value is Among them, i is the type of severity level, and BugLev is the corresponding severity level coefficient.
[0133] In some embodiments, the achievement value of the efficiency characteristic of the target project includes at least one of the following:
[0134] Use case writing efficiency, which is CaseNum / CaseTime;
[0135] Test automation rate, which is AutoCase / CaseNum;
[0136] Test execution efficiency, which is StaExeNum / TestStaTime;
[0137] Bug submission efficiency, which is DayNum.
[0138] In some embodiments, the second processing module 23 is specifically used to determine the risk coefficient of the target project based on the value range of Xr / Xi and the correspondence between the preset value range and the risk coefficient, where Xi is the preset feature baseline and Xr is the achieved value of the feature.
[0139] In some embodiments, the third processing module 24 is specifically used for:
[0140] Define the model: Where n is the number of features, w0 is the intercept, and wi is the weight of the feature;
[0141] Define the loss function: Where m is the number of training samples, is the true label of the sample, indicating that the sample belongs to the kth risk classification, is the model's predicted probability that the sample belongs to the kth class;
[0142] By using a gradient descent or stochastic gradient descent algorithm, the weight parameters are iteratively updated to minimize the loss function and obtain the optimal weight of the feature.
[0143] In some embodiments, the fourth processing module 25 is specifically used to calculate the risk size S and the risk volatility σ by the following formula:
[0144]
[0145] Among them, Wi is the optimal weight of the feature, Mi is the risk coefficient of the target project, n is the number of features, n1 is the number of statistical days, and Si is the risk size of each day.
[0146] In some embodiments, the alarm module 26 is specifically used to issue a risk alarm when the risk size of the target project is not less than a preset risk threshold and the risk volatility is not greater than a preset volatility threshold.
[0147] An embodiment of the present invention further provides an electronic device, including a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and the program or instruction implements the steps of the above method when executed by the processor.
[0148] An embodiment of the present invention further provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described above are implemented.
[0149] An embodiment of the present invention further provides a computer program product, comprising computer instructions, which implement the steps of the above method when executed by a processor.
[0150] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0151] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment method can be implemented by means of a computer software product plus a necessary general hardware platform, and of course, it can also be implemented by hardware. The computer software product is stored in a storage medium (such as ROM, RAM, disk, CD, etc.), including several instructions to enable the terminal or network side device to execute the method described in each embodiment of the present application.
[0152] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms of implementation methods without departing from the purpose of the present application and the scope of protection of the claims, and these implementation methods are all within the protection of the present application.
Claims
1. A project risk early warning method, characterized in that: include: Obtain project information, use case information, test execution information, and defect information of the target project; Calculating the achievement value of each feature of the target project according to the acquired project information, use case information, test execution information and defect information, wherein the features include quality features and efficiency features; Determining the risk factor of the target project according to the achievement value of each characteristic of the target project; According to the achievement value and risk classification of each feature of the target project, the optimal weight of each feature is obtained by training the logistic regression model; Calculate the risk size and risk volatility of the target project based on the risk coefficient and the optimal weight of each feature; Risk alarm is issued based on the risk size and risk volatility of the target project.
2. The method according to claim 1, characterized in that: The project information includes at least one of the following: project number PrjNum, project test stage classification PrjStage, total number of project codes PrjCode, number of project indicator achievement IndPassNum, total number of project indicators IndNum; The use case information includes at least one of the following: the total number of use cases CaseNum, the number of automated use cases AutoCase, and the number of days CaseTime for writing the use case; The test execution information includes at least one of the following: the total number of test plan cases StaCaseNum, the number of test plan case executions StaExeNum, the number of test plan case passes StaPassNum, the test coverage TestCov, and the number of execution days TestStaTime; The defect information includes at least one of the following: the total number of defects BugNum, the number of defect reopens ReoNum, the number of unresolved bugs UnresNum, and the number of bugs submitted per day DayNum.
3. The method according to claim 2, characterized in that The achieved value of the quality characteristic of the target project includes at least one of the following: Use case execution rate, which is StaExeNum / StaCaseNum; Use case pass rate, which is StaPassNum / StaCaseNum; Use case code coverage, which is StaCaseNum*1000 / PrjCode; Test coverage TestCov; Product indicator achievement rate, IndPassNum / IndNum; Defect density, BugNum*1000 / PrjCode; Defect reopen rate, ReoNum / BugNum; The remaining DI value is Among them, i is the type of severity level, and BugLev is the corresponding severity level coefficient.
4. The method according to claim 2, characterized in that: The achievement value of the efficiency characteristic of the target project includes at least one of the following: Use case writing efficiency, which is CaseNum / CaseTime; Test automation rate, which is AutoCase / CaseNum; Test execution efficiency, which is StaExeNum / TestStaTime; Bug submission efficiency, which is DayNum.
5. The method according to claim 1, characterized in that Determining the risk coefficient of the target project according to the achieved values of each feature of the target project includes: The risk coefficient of the target project is determined according to the value range of Xr / Xi and the corresponding relationship between the preset value range and the risk coefficient, wherein Xi is the preset feature baseline and Xr is the achieved value of the feature.
6. The method according to claim 1, characterized in that According to the achievement value and risk classification of each feature of the target project, the optimal weight of each feature is obtained by training through a logistic regression model, including: Define the model: Where n is the number of features, w0 is the intercept, and wi is the weight of the feature; Define the loss function: Where m is the number of training samples, is the true label of the sample, indicating that the sample belongs to the kth risk classification, is the model's predicted probability that the sample belongs to the kth class; By using a gradient descent or stochastic gradient descent algorithm, the weight parameters are iteratively updated to minimize the loss function and obtain the optimal weight of the feature.
7. The method according to claim 1, characterized in that Calculating the risk size and risk volatility of the target project according to the risk coefficient and the optimal weight of each feature includes: The risk size S and risk volatility σ are calculated by the following formula: Among them, Wi is the optimal weight of the feature, Mi is the risk coefficient of the target project, n is the number of features, n1 is the number of statistical days, and Si is the risk size of each day.
8. The method according to claim 1, characterized in that The risk alarm according to the risk size and risk volatility of the target project includes: When the risk size of the target project is not less than a preset risk threshold and the risk volatility is not greater than a preset volatility threshold, a risk alarm is issued.
9. A project risk early warning method, characterized in that: include: The acquisition module is used to obtain the project information, use case information, test execution information and defect information of the target project; A first processing module, configured to calculate the achievement value of each feature of the target project according to the acquired project information, use case information, test execution information and defect information, wherein the features include quality features and efficiency features; A second processing module, configured to determine a risk factor of the target project according to the achievement value of each feature of the target project; The third processing module is used to train the logistic regression model according to the achievement value and risk classification of each feature of the target project to obtain the optimal weight of each feature; A fourth processing module, used for calculating the risk size and risk volatility of the target project according to the risk coefficient and the optimal weight of each feature; The alarm module is used to issue risk alarms based on the risk size and risk volatility of the target project.
10. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the method according to any one of claims 1 to 8 are implemented.
11. A readable storage medium, characterized in that: The readable storage medium stores a program or an instruction, and when the program or the instruction is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
12. A computer program product, characterized in that The method comprises computer instructions, which, when executed by a processor, implement the steps of the method according to any one of claims 1 to 8.
