Software defect prediction method and related equipment

Through the software defect prediction method, using data dimensions and prediction models, the defect level distribution of the software is predicted, which solves the problem of low testing efficiency and quality in the existing technology, and realizes the optimization and improvement of the testing process.

CN113297092BActive Publication Date: 2024-10-15AGRICULTURAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110688849.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-21
Publication Date
2024-10-15
Estimated Expiration
2041-06-21

AI Technical Summary

Technical Problem

The efficiency and quality of software testing in the existing technology are low, mainly because the comprehensiveness of the testing process on all aspects of the software results in unnecessary testing, which affects the testing efficiency and quality.

Method used

By obtaining the defects of the software under test during operation and their corresponding data dimensions, classification and prediction model input are performed, and the quantity distribution of the software at each defect level is predicted, thereby adjusting the testing process and improving testing efficiency and quality.

Benefits of technology

By predicting the defect level distribution of the software, testers can adjust the testing process, improve the testing efficiency and quality of the software, and ensure the pertinence and efficiency of the testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113297092B_ABST
    Figure CN113297092B_ABST
Patent Text Reader

Abstract

The present invention provides a method for predicting defects of software and related equipment, the method comprising: obtaining defects of the software to be tested during operation; obtaining data dimensions of a database corresponding to the software to be tested; classifying each of the defects according to the data dimensions to obtain various first input elements and first values ​​corresponding to the first input elements; inputting various first input elements and first values ​​corresponding to the first input elements into a prediction model, and predicting the quantity distribution of the software to be tested at various defect levels. The method of the present invention improves the testing efficiency and testing quality of software.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to software research technology, and in particular to a software defect prediction method and related equipment. Background Art

[0002] Software defects are inherent properties of software and are "by-products" of the software development process. Their main harm is to affect the quality of software, extend the development cycle and increase development costs. Periodic testing is an important means to timely discover software errors and improve software quality, and accurately predicting the distribution of software defects has important guiding significance for software testing work.

[0003] With the continuous development of computer technology, the scale and complexity of software are growing exponentially. In order to accurately and carefully predict the generation and distribution of software defects, people need to analyze more and more influencing factors.

[0004] In the prior art, testers test various aspects of the software according to the test process to obtain software defects, but if the software has relatively few or even no defects in some aspects, then testing in this aspect is not a necessary test process; it can be seen that testing various aspects of the software according to the test process will result in lower software testing efficiency and quality. Summary of the invention

[0005] The present invention provides a software defect prediction method and related equipment to solve the problems of low software testing efficiency and low testing quality.

[0006] In one aspect, the present invention provides a method for predicting software defects, comprising:

[0007] Obtain defects in the software under test during operation;

[0008] Acquire data dimensions of a database corresponding to the software to be tested, wherein the data dimensions include at least two of functional requirements, performance requirements, module numbers, module complexity, module business priorities, codes, and test cases;

[0009] Classify each of the defects according to the data dimension to obtain various types of first input elements and first values ​​corresponding to the first input elements;

[0010] Each type of the first input element and the first numerical value corresponding to the first input element are input into a prediction model to predict the quantity distribution of the software to be tested at each defect level.

[0011] In one embodiment, the step of inputting each type of the first input elements and the first values ​​corresponding to the first input elements into the prediction model includes:

[0012] constructing a feature vector according to each type of the first input element and the first numerical value corresponding to the first input element;

[0013] The feature vector is input into the prediction model.

[0014] In one embodiment, before the step of inputting each type of the first input elements and the first values ​​corresponding to the first input elements into the prediction model, the step further includes:

[0015] Obtaining defects of each training software and the quantity distribution of each training software at each defect level;

[0016] Determining various types of second input elements and second values ​​corresponding to the second input elements according to the defects of the training software;

[0017] Determine the training samples corresponding to the training software according to the second input elements of each type, the second values ​​and the quantity distribution of the training samples at each defect level corresponding to the training software;

[0018] The prediction model is trained according to each of the training samples.

[0019] In one embodiment, the prediction model includes a hidden layer and an output layer, and both the hidden layer and the output layer are provided with an activation function;

[0020] The activation function σ(x)=max(-0.01x, x)-0.01, wherein x is the input value of the prediction model.

[0021] In one embodiment, the data dimensions include at least two of functional requirements, performance requirements, module numbers, module complexity, module business priorities, codes, and test cases.

[0022] In one embodiment, the defect level includes at least two of fatal defects, serious defects, general defects and minor defects.

[0023] On the other hand, the present invention also provides a software defect prediction device, comprising:

[0024] The acquisition module is used to obtain defects in the running process of the software under test;

[0025] The acquisition module is further used to acquire data dimensions of a database corresponding to the software to be tested, wherein the data dimensions include at least two of functional requirements, performance requirements, module numbers, module complexity, module business priorities, codes, and test cases;

[0026] A classification module, used for classifying each of the defects according to the data dimension to obtain various types of first input elements and first values ​​corresponding to the first input elements;

[0027] The input module is used to input various types of the first input elements and the first numerical values ​​corresponding to the first input elements into the prediction model, and predict the quantity distribution of the software to be tested at various defect levels.

[0028] In another aspect, the present invention provides a software defect prediction device, the software defect prediction device comprising: a memory and a processor;

[0029] The memory stores computer-executable instructions;

[0030] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the software defect prediction method as described above.

[0031] On the other hand, the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the software defect prediction method as described above.

[0032] On the other hand, the present invention provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the software defect prediction method as described above is implemented.

[0033] The software defect prediction method and related equipment provided by the present invention first obtain the defects of the software to be tested during operation and the data dimensions of the database, and classify each defect according to the data dimension to obtain various first input elements and first values ​​corresponding to the first input elements, and then input the first input elements and the first values ​​into the prediction model, so as to predict the quantity distribution of the software to be tested at various defect levels. The present invention predicts the quantity distribution of the software at various defect levels through the defects of the software in the previous operation process, so that the tester can adjust the test process of the software to be tested based on the predicted quantity distribution of the defect level, thereby improving the test efficiency and test quality of the software. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0035] Figure 1 A system architecture diagram for implementing the defect prediction method of the software of the present invention;

[0036] Figure 2 It is a flowchart of the first embodiment of the defect prediction method of software of the present invention;

[0037] Figure 3 This is a detailed flow chart of step S40 in the second embodiment of the software defect prediction method of the present invention;

[0038] Figure 4 It is a flowchart of a third embodiment of a method for predicting software defects according to the present invention;

[0039] Figure 5 A schematic diagram of a structure of a neural network in the prediction model of the present invention;

[0040] Figure 6 Another schematic diagram of the structure of the neural network in the prediction model of the present invention;

[0041] Figure 7 The hardware structure diagram of the defect prediction device of the software of the present invention;

[0042] Figure 8 It is a schematic diagram of the functional modules of the defect prediction device of the software of the present invention.

[0043] The above drawings have shown clear embodiments of the present disclosure, which will be described in more detail below. These drawings and text descriptions are not intended to limit the scope of the present disclosure in any way, but to illustrate the concepts of the present disclosure to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0044] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0045] The present invention provides a method for predicting software defects. Figure 1 The system architecture diagram shown is implemented as follows, Figure 1 The system architecture diagram for realizing the defect prediction method of the software of the present invention is as follows: Figure 1 101 in the figure is a software defect prediction device, and the software defect prediction device 101 can be a device with data processing capability such as a computer, a server, or a mobile terminal. Figure 1As shown, the software defect prediction device 101 is connected to a server 102 with a database via a network communication. The database in the server 102 stores defects found during the operation of the software, and each defect of the software constitutes a data set, which is stored in the database in association with the identification of the software. The software defect prediction device 101 obtains each defect of the software under test during the operation from the database of the server 102 by accessing the server 102, and then predicts the quantity distribution of the software under test at each defect level according to each defect.

[0046] The following specific embodiments are used to describe in detail the technical solutions of the present invention and how the technical solutions of the present application solve the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present invention will be described below in conjunction with the accompanying drawings.

[0047] Reference Figure 2 , Figure 2 The first embodiment of the software defect prediction method of the present invention comprises the following steps:

[0048] Step S10, obtaining defects of the software to be tested during its operation.

[0049] In this embodiment, the execution subject is a defect prediction device for software. For the sake of ease of description, the device is used below to refer to the defect prediction device for software. A database is provided in the device, and the database stores defects found during the operation of each software. The operation process of the software can be the normal operation of the software or the test operation of the software. The defect set D = {Ri, i = 1, 2, 3..., n} corresponding to each software in the database, Ri is an element of the data set D, or a record in the software operation process corresponding to the data set, which includes defects found during the software operation process. The element can be a vector, and the dimension of each element in the set D is the same. The dimension of the vector is determined by the data dimension of the database. Specifically, the types of defects can be divided into requirements, systems, modules, codes, and test cases according to the requirements, and each type corresponds to a data dimension of the database. In addition, the above types can be further classified, for example, requirements can be subdivided into functional requirements and performance requirements; modules can be subdivided into module numbers, module complexity, and module business priorities. Therefore, the data dimensions of the database include at least two of the functional requirements, performance requirements, module numbers, module complexity, module business priorities, codes, and test cases. It should be noted that the dimensions of all records should be consistent, and once the database is established, the data dimensions will not change.

[0050] The data set D is associated with the software identification in the database and stored. When the device determines the software to be tested, that is, the software to be tested, it determines the corresponding data set from the database based on the identification of the software to be tested, and then obtains the defects of the software to be tested during operation from the data set.

[0051] Step S20, obtaining the data dimension of the database corresponding to the software to be tested.

[0052] Step S30, classifying each defect according to the data dimension to obtain each type of first input element and a first value corresponding to the first input element.

[0053] After the device obtains the defects of the software under test during operation, it needs to classify the defects accordingly. Specifically, the data dimensions in the database are actually the attribute elements after defect classification, that is, the defect classification can obtain at least two of the functional requirements, performance requirements, module number, module complexity, module business priority, code and test cases.

[0054] The data dimension of the database can be determined according to conventional software engineering standards, which can be ISO standards or national standards. The device classifies each defect based on the data dimension, thereby obtaining each first input element and the first value corresponding to the first data element. The first input element is the type of defect after classification, and the first value is the number of defects in the first input element of this type.

[0055] Step S40, inputting various types of first input elements and first numerical values ​​corresponding to the first input elements into the prediction model, and predicting the quantity distribution of the software to be tested at various defect levels.

[0056] After obtaining each first input element and the first numerical value corresponding to the input element, the device inputs each first data element and the first numerical value corresponding to the first input element into the prediction model. The data output by the prediction model is the quantity distribution of the software under test at each defect level.

[0057] The defect level includes at least two of fatal defects, serious defects, general defects and minor defects. Each defect level is described below.

[0058] 1) Fatal defects: refers to defects that cause system crash, freeze, infinite loop, database data loss, database connection errors, loss of main functions, missing basic modules, etc.

[0059] 2) Serious defects: refers to the partial loss of the main functions of the system, database saving and calling errors, user data loss, the function menu cannot be used but does not affect the testing of other functions, the function design is seriously inconsistent with the requirements, the module cannot be started or called, the program restarts, automatically exits, calling conflicts between related programs, security issues, stability and other defects.

[0060] 3) General defects: refers to defects such as functions not being fully implemented but not affecting usage, and defects in function menus but not affecting system stability.

[0061] 4) Minor defects: defects in interface or performance, suggestion-related issues, defects that do not affect the execution of operating functions, solutions that can optimize performance, etc. For example: typos, irregular interface formats, overlapping pages, hiding what should not be displayed, unclear descriptions, missing prompts, uneven text arrangement, incorrect cursor position, poor user experience, solutions that can optimize performance, etc.

[0062] The device inputs the first input element into the prediction model: (Requirement 1, System A, Module A.13, Code File B.1.2, Test Case C.3.4), and obtains the data output by the prediction model: (3 fatal defects, 1 serious defect, 3 general defects, 10 minor defects). It should be noted that Requirement 1, System A, Module A.13, Code File B.1.2, Test Case C.3.4 refer to the specific first input element, and Requirement 1, System A, Module A.13, Code File B.1.2, Test Case C.3.4 have corresponding first values, which are not marked for the convenience of description.

[0063] In the technical solution provided in this embodiment, the defects of the software to be tested during operation and the data dimensions of the database are first obtained, and each defect is classified according to the data dimension to obtain various first input elements and first values ​​corresponding to the first input elements, and then the first input elements and the first values ​​are input into the prediction model, so as to predict the quantity distribution of the software to be tested at various defect levels. The present invention predicts the quantity distribution of the software at various defect levels through the defects of the software in the previous operation process, so that the tester can adjust the test process of the software to be tested based on the predicted quantity distribution of the defect level, thereby improving the test efficiency and test quality of the software.

[0064] Reference Figure 3 , Figure 3 This is a second embodiment of the software defect prediction method of the present invention, based on the first embodiment, step S40 includes:

[0065] Step S41: construct a feature vector according to each type of first input element and the first numerical value corresponding to the first input element.

[0066] Step S42, inputting the feature vector into the prediction model.

[0067] In this embodiment, the records about the software to be tested in the database are vectors, that is, each time the software to be tested is run or tested, the database constructs the defects found during the operation into a feature vector according to the data dimension, and the dimension of the feature vector is the same as the data dimension of the database.

[0068] In this regard, after obtaining various first input elements and the first values ​​corresponding to the first input elements, the device constructs a feature vector based on each first input element and the first value, and stores the feature vector in a database. The device then inputs the feature vector into a prediction model, and the prediction model outputs the quantity distribution of the software under test at each defect level.

[0069] It should be noted that if the records in the data set in the database are feature vectors, the values ​​corresponding to the same dimension of each feature in the data set can be superimposed, so as to reconstruct a feature vector based on the superimposed values ​​and the corresponding dimensions. It can be understood that at this time, the defects of the software to be tested during operation are reflected in each feature vector, that is, the device adds the values ​​of the same dimension of each feature vector to obtain various first input elements and the first values ​​corresponding to the first input elements, and then constructs the feature vector of the input prediction model based on each first input element and the first value.

[0070] In the technical solution provided in this embodiment, the device constructs a feature vector based on various first input elements and the first numerical values ​​corresponding to the first input elements, and inputs the feature vector into a prediction model, thereby quickly obtaining the quantity distribution of the software under test at various defect levels.

[0071] Reference Figure 4 , Figure 4 The third embodiment of the software defect prediction method of the present invention is based on the first or second real-time exchange rate, and before step S10, it also includes:

[0072] Step S50, obtaining defects of each training software and the quantity distribution of each training software at each defect level.

[0073] Step S60, determining various types of second input elements and second values ​​corresponding to the second input elements according to the defects of the training software.

[0074] Step S70, determining the training samples corresponding to the training software according to the second input elements and second values ​​corresponding to the training software and the quantity distribution of the training samples at each defect level.

[0075] Step S80: training the prediction model according to each training sample.

[0076] Before using the prediction model for prediction, the prediction model needs to be trained, that is, before step S10, the prediction model needs to be trained. Of course, the training of the prediction model can be located before step S40, step S30 and step S20. Specifically, the device obtains the defects of each training software and the quantity distribution of the training software at each defect level. The training software refers to the software whose quantity distribution at the defect level is known, which is used as the sample software for training the prediction model. The device determines each type of second input element and the second numerical value corresponding to the second input element according to the defects of the training software, and then determines the training sample corresponding to the training software according to the second input element, the second numerical value and the quantity distribution. For example, a feature vector is constructed based on each second input element and the second numerical value corresponding to the second input element, and then the quantity distribution is used as the label of the feature vector to obtain the training sample corresponding to the training software.

[0077] In this way, the device can obtain multiple training samples, and train the prediction model through multiple training samples, thereby adjusting the parameters of the neural network in the prediction model, so that the prediction model can accurately predict the quantity distribution of the software to be tested at each defect level.

[0078] The prediction model includes a neural network classifier, which consists of an input layer, an output layer, and a hidden layer. Each layer contains several nodes, called neurons, and the connections between neurons form a neural network. The input layer and the output layer are composed of the input parameters and output parameters mentioned above. For example, a single hidden layer neural network such as Figure 1 As shown, it contains three input layer nodes X1, X2, 1, one output layer node y, and three hidden layer nodes n1, n2, n3, and their connection method is as follows Figure 5 It can be seen that if no activation function is added, each node is a linear combination of its predecessor nodes:

[0079] y=w 2-1 (w 1-11 x1+w 1-21 x2+b 1-1 )+w 2-2 (w 1-12 x1+w 1-22 x2+b 1-2 )+w 2-3 (w 1-13 x1+w 1-23 x2+b 1-3 )

[0080] In this case, the neural network classifier cannot accurately classify nonlinearly separable data sets. This problem can be solved by adding activation functions to both the hidden layer and the output layer. Figure 6, the hidden layer and output layer of the prediction model are both equipped with activation functions; and the activation function σ(x) = max(-0.01x, x)-0.01, x∈R, where x is the input value of the prediction model, R is the record in the database, and R is the feature vector in the database. The design formula of the activation function is equivalent to:

[0081]

[0082] After adding the activation function, the output y of the neural network becomes:

[0083] a1=w 1-11 x1+w 1-21 x2+b 1-1

[0084] a2=w 1-12 x1+w 1-22 x2+b 1-2

[0085] a3=w 1-13 x1+w 1-23 x2+b 1-3

[0086] y=σ(w 2-1 σ(a1)+w 2-2 σ(a2)+w 2-3 σ(a3))

[0087] This excitation function is an improvement on the classic ReLU excitation function. By designing this excitation function, we can effectively balance the efficiency and performance of the neural network and achieve better recognition effects.

[0088] In the technical solution provided in this embodiment, before the device predicts defects of the software under test, it first trains the prediction model through training samples, so that the trained prediction model can accurately predict the quantity distribution of the software under test at each defect level.

[0089] Figure 7 It is a block diagram of a software defect prediction device according to an exemplary embodiment. The device may be a computer, a tablet device, a server, etc.

[0090] The software defect prediction device 700 may include: a processor 71, such as a CPU, and a memory 72. Those skilled in the art may understand that Figure 7The structure shown in the figure does not constitute a limitation on the defect prediction device of the software, and may include more or less components than shown in the figure, or combine some components, or arrange the components differently. The memory 72 may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0091] The processor 71 may call a computer program stored in the memory 72 to complete all or part of the steps of the above-mentioned software defect prediction method.

[0092] A non-temporary computer-readable storage medium, when the instructions in the storage medium are executed by a processor of a terminal device, enables the terminal device to execute the defect prediction method of the above software.

[0093] A computer program product includes a computer program. When the computer program is executed by a processor of a terminal device, the terminal device is enabled to execute the defect prediction method of the above software.

[0094] The present invention also provides a software defect prediction device 800, comprising:

[0095] The acquisition module 801 is used to acquire defects in the running process of the software under test;

[0096] The acquisition module 801 is used to acquire the data dimension of the database corresponding to the software to be tested;

[0097] A classification module 802, configured to classify each defect according to the data dimension to obtain each type of first input element and a first value corresponding to the first input element;

[0098] The input module 803 is used to input various first input elements and first numerical values ​​corresponding to the first input elements into the prediction model to predict the quantity distribution of the software to be tested at various defect levels.

[0099] In one embodiment, a software defect prediction device 800 includes:

[0100] A construction module, used for constructing a feature vector according to various first input elements and first values ​​corresponding to the first input elements;

[0101] The input module 803 is used to input the feature vector into the prediction model.

[0102] In one embodiment, a software defect prediction device 800 includes:

[0103] An acquisition module 801 is used to acquire defects of each training software and the quantity distribution of each training software at each defect level;

[0104] A determination module, used to determine various types of second input elements and second values ​​corresponding to the second input elements according to defects of the training software;

[0105] A determination module, used to determine the training samples corresponding to the training software according to the second input elements and the second values ​​corresponding to the training software and the quantity distribution of the training samples at each defect level;

[0106] The training module is used to train the prediction model according to various training samples.

[0107] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be regarded as exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0108] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A software defect prediction method, characterized in that: include: Determine a corresponding data set from a database based on the identification of the software to be tested; wherein the database stores defects found during the operation of each software, and a defect set D={Ri, i=1, 2,3…, n} corresponding to each software in the database, Ri is a record in the software operation process corresponding to the data set, and the record includes defects found during the software operation process; the data set D and the identification of the software are associated and stored in the database; Obtain defects of the software under test during operation from the data set; obtain data dimensions of a database corresponding to the software under test; the data dimensions include at least two of functional requirements, performance requirements, module numbers, module complexity, module business priority, codes, and test cases; Classify each of the defects according to the data dimension to obtain various types of first input elements and first values ​​corresponding to the first input elements; wherein the first input element is the type of defect after classification, and the first value is the number of defects in the first input element of this type; Constructing a feature vector according to each type of the first input element and the first numerical value corresponding to the first input element; if the record in the data set in the database is a feature vector, superimposing the numerical values ​​corresponding to the dimension with the same features in each data set, and reconstructing the feature vector based on the superimposed numerical values ​​and the corresponding dimensions; wherein the dimension of the feature vector is the same as the data dimension of the database; The feature vector is input into the prediction model to predict the quantity distribution of the software to be tested at each defect level, so that the tester can adjust the test process of the software to be tested based on the predicted quantity distribution of the defect level; the defect level includes at least two of fatal defects, serious defects, general defects and minor defects; the prediction model includes: a neural network classifier, the neural network classifier consists of an input layer, an output layer and a hidden layer, each layer includes a number of nodes, and the input layer and the output layer are composed of input parameters and output parameters; before the step of inputting each type of the first input element and the first numerical value corresponding to the first input element into the prediction model, it also includes: Obtaining defects of each training software and the quantity distribution of each training software at each defect level; Determining various types of second input elements and second values ​​corresponding to the second input elements according to the defects of the training software; Determine the training samples corresponding to the training software according to the second input elements, the second values ​​and the quantity distribution of the training samples at each defect level corresponding to the training software; Training the prediction model according to each of the training samples; The prediction model includes a hidden layer and an output layer, and both the hidden layer and the output layer are provided with an activation function; The activation function ,in, is the input value of the prediction model.

2. A software defect prediction device, characterized in that: include: An acquisition module is used to determine a corresponding data set from a database based on the identification of the software to be tested; wherein the database stores defects found during the operation of each software, and a defect set D={Ri,i=1, 2, 3…, n} corresponding to each software in the database, Ri is a record in the software operation process corresponding to the data set, and the record includes defects found during the software operation process; the data set D and the identification of the software are associated and stored in the database; Obtain defects in the software under test during operation from the data set; The acquisition module is further used to acquire data dimensions of a database corresponding to the software to be tested, wherein the data dimensions include at least two of functional requirements, performance requirements, module numbers, module complexity, module business priorities, codes, and test cases; A classification module, used for classifying each of the defects according to the data dimension to obtain various types of first input elements and first values ​​corresponding to the first input elements; wherein the first input element is a type of defect after classification, and the first value is the number of defects in the first input element of this type; An input module, used to input various types of the first input elements and the first numerical values ​​corresponding to the first input elements into a prediction model, and predict the quantity distribution of the software to be tested at various defect levels; the defect levels include at least two of fatal defects, serious defects, general defects and minor defects; A construction module, used to construct a feature vector according to various first input elements and first values ​​corresponding to the first input elements; if the record in the data set in the database is a feature vector, then the values ​​corresponding to the dimensions with the same features in each data set are superimposed, and the feature vector is reconstructed based on the superimposed values ​​and the corresponding dimensions; wherein the dimension of the feature vector is the same as the data dimension of the database; An input module, used to input the feature vector into the prediction model; The acquisition module is further used to acquire defects of each training software and the quantity distribution of each training software at each defect level, so that the tester can adjust the test process of the software to be tested based on the predicted quantity distribution of defect levels; A determination module, used to determine various types of second input elements and second values ​​corresponding to the second input elements according to defects of the training software; The determination module is further used to determine the training samples corresponding to the training software according to the second input elements, the second values ​​and the quantity distribution of the training samples at each defect level corresponding to the training software; A training module is used to train the prediction model according to each training sample; the prediction model includes a hidden layer and an output layer, and the hidden layer and the output layer are both provided with an activation function; wherein the prediction model includes: a neural network classifier, the neural network classifier is composed of an input layer, an output layer and a hidden layer, each layer contains a number of nodes, and the input layer and the output layer are composed of input parameters and output parameters; The activation function ,in, is the input value of the prediction model.

3. A software defect prediction device, characterized in that: The software defect prediction device includes: a memory and a processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor executes the software defect prediction method according to claim 1.

4. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the software defect prediction method according to claim 1 when executed by a processor.

5. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the software defect prediction method according to claim 1 is implemented.