A software project defect convergence curve prediction method and system
By constructing a project defect convergence decision tree and monitoring the defect convergence curve deviation in real time, the problem of insufficient defect convergence curve prediction in existing technologies is solved, and reasonable resource allocation and improved testing efficiency are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA CITIC BANK CO LTD
- Filing Date
- 2022-12-05
- Publication Date
- 2026-07-10
AI Technical Summary
In existing technologies, the prediction of defect convergence curves mainly focuses on monitoring, but there is no effective prediction data. This results in the inability to detect deviations in defect convergence curves during project testing in a timely manner, leading to unreasonable resource allocation and insufficient or wasted manpower.
By acquiring project defect classification labels and features, a project defect convergence decision tree is constructed. The root node is selected recursively using information gain, and a defect convergence prediction curve is generated. The deviation between the prediction and the actual curve is monitored in real time, and resources are allocated reasonably.
This enables timely detection of defect convergence curve deviations during the project testing phase, allowing for rational resource allocation, improved testing efficiency and quality, and reduced risks.
Smart Images

Figure CN115729839B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of software testing technology, and in particular to a method and system for predicting convergence curves of software project defects. Background Technology
[0002] As software scales and complexity increases, the focus on software quality also rises. Software defect prediction technology can identify defective modules at an early stage, thereby enabling the rational allocation of limited resources and ensuring software quality. Currently, many studies mainly use software metric metadata to predict the defect predisposition, total number of defects, or defect severity of software modules.
[0003] In project testing, defect convergence is a crucial indicator for determining whether testing can be completed. Current defect prediction primarily focuses on the number of defects in a module and defect severity, while defect convergence curves are mainly monitored without predictive data. When deviations in the defect convergence curve occur during project execution, the lack of comparison prevents timely detection, hindering the rational allocation of resources and scheduling, leading to insufficient manpower or wasted resources. Summary of the Invention
[0004] To address the shortcomings of existing technologies, this invention proposes a method and system for predicting software project defect convergence curves. During the project testing phase, by monitoring the predicted curve and the actual curve in real time, deviations in the defect convergence curve during project progress can be detected promptly, thereby enabling the rational allocation of resources and scheduling, improving efficiency, and reducing risks.
[0005] To achieve the above objectives, the technical solution adopted by the present invention includes:
[0006] A method for predicting convergence curves of software project defects, characterized by comprising:
[0007] S1. Obtain project defect classification tags;
[0008] S2. Obtain project characteristics during the project requirements analysis and development phases;
[0009] S3. Label the projects according to their characteristics and defect classification labels to obtain the project feature dataset;
[0010] S4. Calculate the information gain of each project feature based on the project feature dataset;
[0011] S5. By comparing the information gain of each item feature, select the item feature with the largest information gain as the root node.
[0012] S6. Remove the feature with the highest information gain from the feature list;
[0013] S7. Recursively execute S5-S6 until the preset stopping condition is met, then stop execution.
[0014] S8. Generate a project defect convergence decision tree;
[0015] S9. Predict the project's defect convergence prediction curve based on the project defect convergence decision tree.
[0016] Furthermore, step S1 includes the following sub-steps:
[0017] S11. Collect defect convergence data from historical projects;
[0018] S12. Perform similarity analysis on the historical project defect convergence data to obtain the defect convergence curve;
[0019] S13. Based on the defect convergence curve, classify the historical projects according to the defect classification criteria to obtain the project defect classification labels and the defect convergence curve after classification.
[0020] Furthermore, step S1 also includes the following sub-steps:
[0021] S14. The least squares method is used to fit the classified defect convergence curve to obtain the fitted classified defect convergence curve.
[0022] Furthermore, this includes the project size, the number of changes to requirements, the system that proposed the requirement, the system that received the requirement, and the planned testing cycle.
[0023] Furthermore, the project feature dataset includes several project feature attributes and a classification field, wherein the classification field is the defect convergence category.
[0024] Furthermore, the preset stopping condition is: the information gain of all project features is less than a preset value or there are no project features.
[0025] Furthermore, step S9 also includes the following sub-steps:
[0026] S91. Input the feature data of the project to be tested into the project defect convergence decision tree;
[0027] S92. Output the convergence defect categories of the project and the defect convergence curves after classification;
[0028] S93. Based on the project testing cycle, the data scaling of the classified defect convergence curve is performed to obtain the project's defect convergence prediction curve.
[0029] This invention also relates to a software project defect convergence curve prediction system, characterized in that it includes:
[0030] The category tag acquisition module is used to acquire the category tags of project defects;
[0031] The project feature acquisition module is used to acquire project features during the project requirements analysis and development phases.
[0032] The tagging module is used to tag projects based on project features and project defect classification labels to obtain a project feature dataset;
[0033] The information gain calculation module is used to calculate the information gain of each project feature based on the project feature dataset.
[0034] The comparison module is used to select the feature with the largest information gain as the root node by comparing the information gains of various feature items.
[0035] The deletion module is used to remove the feature with the highest information gain from the feature list;
[0036] The recursive execution module is used to recursively execute S5-S6, and stops execution when the preset stopping condition is met.
[0037] The decision tree generation module is used to generate project defect convergence decision trees;
[0038] The prediction module is used to predict the defect convergence prediction curve of a project based on the project defect convergence decision tree.
[0039] The present invention also relates to a computer-readable storage medium, characterized in that the storage medium stores a computer program, which, when executed by a processor, implements the above-described method.
[0040] The present invention also relates to an electronic device, characterized in that it includes a processor and a memory;
[0041] The memory is used to store the project defect convergence decision tree;
[0042] The processor is used to execute the above method by invoking the project defect convergence decision tree.
[0043] The present invention also relates to a computer program product, including a computer program and / or instructions, characterized in that the computer program and / or instructions, when executed by a processor, implement the steps of the above-described method.
[0044] The beneficial effects of this invention are as follows:
[0045] The software project defect convergence curve prediction method and system described in this invention constructs a model by extracting features from historical projects and analyzing defect data. It then fits defect convergence curves and uses a decision tree algorithm to classify project features and convergence curves. By predicting the defect convergence curve for a project and comparing it with the actual defect convergence curve, this method can be used to predict and guide testing progress during the software project testing phase, promptly identify project risks, rationally allocate resources, and improve testing efficiency and quality. Attached Figure Description
[0046] Figure 1 This is a schematic diagram of the process for predicting the convergence curve of software project defects according to the present invention.
[0047] Figure 2 This is a similarity analysis diagram of the defect convergence curve of the present invention.
[0048] Figure 3 This is a curve fitting diagram of the defect convergence curve of the present invention.
[0049] Figure 4 This is a schematic diagram of the structure of a software project defect convergence curve prediction system according to the present invention. Detailed Implementation
[0050] To better understand the content of this invention, a detailed description will be provided in conjunction with the accompanying drawings and embodiments.
[0051] The first aspect of this invention relates to a method for predicting convergence curves of software project defects, with the following steps: Figure 1 The method shown includes:
[0052] Collect historical project defect data and project characteristic data, perform similarity analysis on the historical project defect convergence data, classify based on similarity, and then perform curve fitting to obtain the defect convergence curve trend chart for this type of project. This process involves the following steps.
[0053] S1. Obtain project defect classification tags;
[0054] S11. Collect defect convergence data from historical projects;
[0055] Based on the defect's submission and closure times, defect convergence data can be obtained. To ensure the accuracy of subsequent calculations, the data is categorized according to the testing period: (0,5]; (5,10]; (10,20]; (20,40]; (40,80]; (80, ).
[0056] S12. Perform similarity analysis on the historical project defect convergence data to obtain the defect convergence curve;
[0057] Defect convergence curves are classified according to similarity.
[0058] Take one record from the dataset as a baseline, and compare other data from the same category with the baseline data. Scale the two curves according to the other's x-axis to obtain two curves with the same number of points and the same x-axis, such as... Figure 2 This is a graph showing the similarity of curves.
[0059] S13. Based on the defect convergence curve, classify the historical projects according to the defect classification criteria to obtain the project defect classification labels and the defect convergence curve after classification.
[0060] The OWD method is used to perform similarity analysis on defect curves. When the area enclosed by two trajectories is large, it indicates that the distance between the trajectories is far and the similarity is low; conversely, the similarity is high.
[0061] The defect classification criteria are as follows:
[0062] Condition 1: Take the area An enclosed by the baseline curve and the horizontal axis. If the ratio of the area obtained by the OWD distance method to An is less than 5%, the similarity is considered to be high.
[0063] Condition 2: Considering the deviation problem, calculate the absolute value e of the sum of the differences in the vertical distances of the two curves at the same abscissa points. When e < 3, the similarity is considered to be high.
[0064] Conditions 1 and 2 are superimposed and used as the classification criteria for the defect convergence curve. After completion, each project is labeled with a defect category.
[0065] S14. The least squares method is used to fit the classified defect convergence curve to obtain the fitted classified defect convergence curve.
[0066] The least squares method is used to fit the convergence curves of the various defect categories that have been classified, such as... Figure 3 As shown in the curve fitting graph, the solid line is the defect convergence curve for this category, and the dashed line is the fitted defect convergence curve.
[0067] Building a decision tree
[0068] Multiple data points can affect the quality of this project. We analyze the factors that affect project quality, extract the characteristic data of each type of project, and construct a decision tree.
[0069] S2. Obtain project characteristics during the project requirements analysis and development phases;
[0070] S3. Label the projects according to their characteristics and defect classification labels to obtain the project feature dataset;
[0071] Project characteristics from the requirements analysis and development phases are extracted. Based on these characteristics and the category labels of defect convergence curves, projects are classified and labeled, and the samples are preprocessed. Extracted project characteristics include project size, number of requirement changes, proposing system, undertaking system, and planned testing cycle.
[0072]
[0073] S4. Calculate the information gain of each project feature based on the project feature dataset;
[0074] The project feature dataset contains X feature attributes and one classification field (defect convergence). Let the set of project features be denoted as the dataset. Information entropy is Contains characteristic words After the items are removed, the information entropy of the set decreases to Then the characteristic words For dataset Information gain is .
[0075] S5. By comparing the information gain of each item feature, select the item feature with the largest information gain as the root node.
[0076] The information gain of each feature is calculated sequentially, and the feature attribute with the largest information gain is selected as the root node. A decision tree is then generated based on the principle of information gain. The calculation formula is as follows:
[0077] Let the probability of each defect converging and being classified be... Calculate the information entropy of the entire dataset.
[0078]
[0079] Based on features Indicates "projects by characteristics" "Classification", "Features" Data set Divided into subsets , … ; with features Indicates "projects by characteristics" "Classification", "Features" Data set It can be divided into nm subsets ... .remember =The project was assigned to a subset The probability, =Subset Calculate the probability of convergence classification for each defect. , The information gain is calculated using the following steps:
[0080] Information entropy:
[0081]
[0082]
[0083] Information gain:
[0084] Information gain:
[0085] S6. Remove the feature with the highest information gain from the feature list;
[0086] S7. Recursively execute S5-S6 until the preset stopping condition is met, then stop execution.
[0087] S8. Generate a project defect convergence decision tree;
[0088] Compare the information gain of each feature, select the feature with the largest information gain as the root node, and remove it from the feature list to indicate that the feature has been used. Then, recursively select the feature with the largest information gain for each sample subset until the information gain of all features is very small or no features can be selected, thus generating a decision tree. If all project features have been used and there are still multiple defect convergence curves with undetermined categories, additional feature fields need to be added for further confirmation until all projects can be uniquely categorized.
[0089] S9. Predict the project's defect convergence prediction curve based on the project defect convergence decision tree.
[0090] S91. Input the feature data of the project to be tested into the project defect convergence decision tree;
[0091] S92. Output the convergence defect categories of the project and the defect convergence curves after classification;
[0092] S93. Based on the project testing cycle, the data scaling of the classified defect convergence curve is performed to obtain the project's defect convergence prediction curve.
[0093] Applying decision trees to predict project data:
[0094] The project data features are used as input to the decision tree. The final result of the decision tree determines the category of the project's defect convergence curve. The curve is then scaled according to the project testing cycle to obtain a predicted defect convergence curve for the project. During the project testing phase, real-time monitoring of the predicted and actual curves allows for timely detection of deviations in the defect convergence curve, enabling rational allocation of resources and scheduling, improving efficiency, and reducing risk.
[0095] Another aspect of this invention relates to a software project defect convergence curve prediction system, the structure of which is as follows: Figure 4 As shown, it includes:
[0096] The category tag acquisition module is used to acquire the category tags of project defects;
[0097] The project feature acquisition module is used to acquire project features during the project requirements analysis and development phases.
[0098] The tagging module is used to tag projects based on project features and project defect classification labels to obtain a project feature dataset;
[0099] The information gain calculation module is used to calculate the information gain of each project feature based on the project feature dataset.
[0100] The comparison module is used to select the feature with the largest information gain as the root node by comparing the information gains of various feature items.
[0101] The deletion module is used to remove the feature with the highest information gain from the feature list;
[0102] The recursive execution module is used to recursively execute S5-S6, and stops execution when the preset stopping condition is met.
[0103] The decision tree generation module is used to generate project defect convergence decision trees;
[0104] The prediction module is used to predict the defect convergence prediction curve of a project based on the project defect convergence decision tree.
[0105] By using this system, the aforementioned computational processing methods can be executed and the corresponding technical effects can be achieved.
[0106] Embodiments of the present invention also provide a computer-readable storage medium capable of implementing all the steps of the methods in the above embodiments, wherein the computer-readable storage medium stores a computer program that, when executed by a processor, implements all the steps of the methods in the above embodiments.
[0107] Embodiments of the present invention also provide an electronic device for performing the above-described method. As an implementation device for the method, the electronic device has at least a processor and a memory. In particular, the memory stores data and related computer programs required for performing the method, such as a project defect convergence decision tree. The processor calls the data and programs in the memory to execute all the steps of the method and obtain the corresponding technical effect.
[0108] Preferably, the electronic device may include a bus architecture, which may include any number of interconnected buses and bridges. The bus will include various circuits linked together by one or more processors and memories. The bus may also link together various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. The bus interface provides an interface between the bus and the receiver and transmitter. The receiver and transmitter may be the same element, i.e., a transceiver, providing a unit for communicating with various other systems over a transmission medium. The processor is responsible for managing the bus and general processing, while the memory may be used to store data used by the processor during operation.
[0109] Additionally, the electronic device may further include a communication module, an input unit, an audio processor, a display, a power supply, and other components. The processor (or controller, operating control) used may include a microprocessor or other processor device and / or logic device, which receives input and controls the operation of various components of the electronic device. The memory may be one or more of a buffer, flash memory, hard drive, removable media, volatile memory, non-volatile memory, or other suitable devices, which can store the aforementioned data information, and may also store programs for executing the information. The processor can execute the program stored in the memory to achieve information storage or processing, etc. The input unit is used to provide input to the processor, for example, it can be a button or touch input device. The power supply is used to provide power to the electronic device. The display is used to display images and text, for example, it can be an LCD display. The communication module is a transmitter / receiver that transmits and receives signals via an antenna. The communication module (transmitter / receiver) is coupled to the processor to provide input signals and receive output signals, which can be the same as in conventional mobile communication terminals. Based on different communication technologies, multiple communication modules can be incorporated into the same electronic device, such as cellular network modules, Bluetooth modules, and / or wireless LAN modules. The communication module (transmitter / receiver) is also coupled to a speaker and microphone via an audio processor to provide audio output through the speaker and receive audio input from the microphone, thereby enabling typical telecommunications functions. The audio processor can include any suitable buffer, decoder, amplifier, etc. Furthermore, the audio processor is coupled to a central processing unit, enabling on-device recording via the microphone and on-device playback of stored sound via the speaker.
[0110] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0111] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A system that specifies functions in one or more boxes.
[0112] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including an instruction set implemented in a process. Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0113] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the functions specified in one or more boxes. Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the invention.
[0114] The above description is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for predicting convergence curves of software project defects, characterized in that, include: S1. Obtain project defect classification tags; Step S1 includes the following steps: S11. Collect defect convergence data from historical projects; S12. Perform similarity analysis on the historical project defect convergence data to obtain the defect convergence curve; S13. Based on the defect convergence curve, classify the historical projects according to the defect classification criteria to obtain the project defect classification labels and the defect convergence curve after classification. S14. The least squares method is used to fit the classified defect convergence curve to obtain the fitted classified defect convergence curve. S2. Obtain project characteristics during the project requirements analysis and development phases; S3. Label the projects according to their characteristics and defect classification labels to obtain the project feature dataset; S4. Calculate the information gain of each project feature based on the project feature dataset; S5. By comparing the information gain of each item feature, select the item feature with the largest information gain as the root node. S6. Remove the feature with the highest information gain from the feature list; S7. Recursively execute S5-S6 until the preset stopping condition is met, then stop execution. S8. Generate a project defect convergence decision tree; S9. Predict the project's defect convergence prediction curve based on the project defect convergence decision tree.
2. The method as described in claim 1, characterized in that, The project characteristics include project size, number of requirement changes, proposing system, undertaking system, and planned testing cycle.
3. The method as described in claim 1, characterized in that, The project feature dataset includes several project feature attributes and a classification field, which is the defect convergence category.
4. The method as described in claim 1, characterized in that, The preset stopping condition is: the information gain of all project features is less than the preset value or there are no project features.
5. The method as described in claim 1, characterized in that, Step S9 further includes the following sub-steps: S91. Input the feature data of the project to be tested into the project defect convergence decision tree; S92. Output the convergence defect categories of the project and the convergence curve of the defect after classification; S93. Based on the project testing cycle, the data scaling of the classified defect convergence curve is performed to obtain the project's defect convergence prediction curve.
6. A software project defect convergence curve prediction system, characterized in that, include: The category tag acquisition module is used to acquire the category tags of project defects; The project feature acquisition module is used to acquire project features during the project requirements analysis and development phases. The tagging module is used to tag projects based on project features and project defect classification labels to obtain a project feature dataset; The information gain calculation module is used to calculate the information gain of each project feature based on the project feature dataset. The comparison module is used to select the feature with the largest information gain as the root node by comparing the information gains of various feature items. The deletion module is used to remove the feature with the highest information gain from the feature list; The recursive execution module is used to recursively execute S5-S6, and stops execution when the preset stopping condition is met. The decision tree generation module is used to generate project defect convergence decision trees; The prediction module is used to predict the project's defect convergence prediction curve based on the project defect convergence decision tree. The system is used to perform the method according to any one of claims 1 to 5.
7. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the method of any one of claims 1 to 5.
8. An electronic device, characterized in that, Including processor and memory; The memory is used to store the project defect convergence decision tree; The processor is configured to execute the method of any one of claims 1 to 5 by invoking the project defect convergence decision tree.
9. A computer program product, comprising a computer program and / or instructions, characterized in that, When the computer program and / or instructions are executed by a processor, they implement the steps of the method according to any one of claims 1 to 5.