A software quality prediction method
By improving the evolution algorithm, the software quality parameter data is divided, and the CNN-LSTM model is used to process data of different attributes to solve the problem of inaccurate software quality prediction in the existing technology. Software development quality.
Patent Information
- Application Number
- CN202011493240.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-16
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2040-12-16
AI Technical Summary
The existing technology is difficult to accurately predict software quality in the early stages and processes of software development, which leads to high probability of software failure and affects the quality of software development.
The improved evolution algorithm is used to divide the high-purity and low-purity cluster data of the software quality parameters, and use the CNN-LSTM model to process the data of different attributes to improve the accuracy of software quality prediction.
Through the accurate division and processing of software quality parameter data, the accuracy of software quality prediction has been improved, the probability of software failure is reduced to the maximum extent, and the quality of software development is improved.
Smart Images

Figure CN112463643B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer application technology, and in particular to a software quality prediction method. Background Art
[0002] In recent years, with the development of information technology and computer technology, the scale of software has become larger and larger, the software development process has become more difficult to control, and the losses caused by software failure have also become greater and greater. If the software quality can be predicted in the early stage and during the software development process, and software modules with failure tendencies can be discovered as early as possible, the probability of software failure can be minimized and the quality of software development can be improved. Summary of the invention
[0003] In view of this, the purpose of the present invention is to provide a software quality prediction method to address the deficiencies of the prior art, accurately divide software quality parameter data by improving the evolutionary algorithm, perform different processing on software quality parameter data with different attributes, and increase the accuracy of software quality prediction.
[0004] In order to achieve the above object, the present invention adopts the following technical solutions:
[0005] A software quality prediction method comprises the following steps:
[0006] Inputting software quality parameter data into a software quality prediction model, wherein the software quality parameter data includes high-purity cluster data and low-purity cluster data, wherein the high-purity cluster data is directly input into the software quality prediction model, and the low-purity cluster data is input into the software quality prediction model after being trained by CNN, and the software quality prediction model is a CNN-LSTM model;
[0007] A software quality prediction result is obtained from the software quality prediction model.
[0008] Furthermore, the steps of dividing the high-purity cluster data and the low-purity cluster data are as follows:
[0009] Acquiring software quality parameter data, wherein the software quality parameter data includes software code data, computer usage data, and software quality management data;
[0010] The software quality parameter data are preprocessed, and attribute clustering is performed on the software quality parameter data according to the improved evolutionary algorithm attribute selection method, and the software quality parameter data are divided into low-purity clustering data and high-purity clustering data.
[0011] Furthermore, the software code management data includes the number of newly added code lines, the number of newly added classes, and the number of newly added database tables and fields; the computer usage data includes CPU usage distribution, memory usage distribution, storage usage and computer working time data; the software quality management data includes software testing data, software version data and code change data.
[0012] Furthermore, the prediction model features are extracted according to the software quality prediction results, and the fitness value of each software indicator is calculated by evolutionary iteration. The weight factor is adjusted during the evolution process, and the input data is clustered according to the fitness value.
[0013] The beneficial effects of the present invention are:
[0014] The present invention provides a software quality prediction method, which divides data into high-purity cluster data and low-purity cluster data by improving the evolutionary algorithm. The high-purity cluster data itself has a relatively accurate prediction rate and can be directly used for software quality prediction; the low-purity cluster data does not have a prediction attribute and can be used for software quality prediction after further training and feature learning, thereby greatly increasing the accuracy of software quality prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 It is a schematic diagram of the process of the present invention;
[0016] Figure 2 It is a diagram of the types of software quality parameter data;
[0017] Figure 3 Flowchart for establishing the CNN model;
[0018] Figure 4 Flowchart for establishing software quality prediction model. DETAILED DESCRIPTION
[0019] The technical scheme in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is only a part of the embodiment of the present invention, not all of the embodiments. Based on the embodiment of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0020] A software prediction method, such as Figure 1 As shown, the following steps are included:
[0021] S1. Obtain software quality parameter data
[0022] Software quality parameter data includes software code data, computer usage data and software quality management data, such as Figure 2As shown, the software code management data includes the number of newly added code lines, the number of newly added classes, and the number of newly added database tables and fields; the computer usage data includes the CPU usage distribution, memory usage distribution, storage usage, and computer working time data; the software quality management data includes software testing data, software version data, and code change data;
[0023] S2. Preprocessing of software quality parameter data
[0024] Perform noise reduction and principal component analysis on the software quality parameter data obtained in step S1.
[0025] Firstly, a filtering model is established to filter the collected data of software quality parameters. Then, the selected attributes of the input data are analyzed and processed through orthogonal transformation, mean and variance calculation, and data with poor correlation are directly ignored. Then, the filtered data is normalized to improve the training efficiency of the deep learning algorithm. Finally, the eigenvalue decomposition method is used to perform principal component analysis on the data to improve the convergence efficiency of the algorithm.
[0026] S3. Cluster the analysis results
[0027] According to the improved evolutionary algorithm, the pre-processed software quality parameter data is divided into low-purity cluster data and high-purity cluster data.
[0028] The improved evolutionary algorithm is used to select and divide the attributes of the software quality prediction parameter data, and the fitness function is constructed according to the quality prediction model. The software quality parameters are used as chromosome sequences for crossover and mutation operations, and the fitness value is calculated and selected iteratively. According to the set attribute division threshold, individuals with high fitness values, that is, the corresponding quality prediction parameters, are selected as high-purity clustering data, and individuals with fitness values lower than the set threshold are low-purity data. In order to overcome the shortcomings of local optimality and premature maturity of traditional evolutionary algorithms, an improved evolutionary algorithm is used for attribute division, which can adaptively adjust the evolutionary factor to ensure the global optimal performance of the search individual.
[0029] S4. Input high-purity clustering data and low-purity clustering data into the software quality prediction model and output software quality
[0030] High-purity clustering data itself has a relatively accurate prediction rate and can be directly used for software quality prediction;
[0031] Low-purity cluster data does not have predictive properties. The low-purity cluster data is input into the CNN training model for training, and the training results are used for software quality prediction. The low-purity cluster data is subjected to CNN convolution calculation. The convolution kernel can be regarded as a window. It is translated on the time series data, and the local sequence segments are extracted and dot-multiplied with the weights. The calculated sequence features are continuously output. The output feature results are then subjected to the next step of pooling downsampling to further filter out the noise information in the data that is not helpful for prediction, so that the prediction performance is optimized. The model iteratively updates the weights by back-propagating the error information, so that the weights in the convolution kernel, the parameter information in the LSTM, and the parameters in the Dense layer are continuously optimized until convergence, completing the model training process and establishing a CNN model. The establishment steps are as follows: Figure 3 shown.
[0032] As the number of software development modules increases, software quality changes have a nonlinear trend, so it is difficult to predict software quality. The use of the long short-term memory neural network (LSTM) model will introduce noise that is of no benefit to quality prediction, and will also be affected by large and small values in the data, resulting in a failure to achieve a good prediction effect. Although the CNN model alone can perform convolution calculations on each time series and extract local features of software quality parameters well, CNN is not sensitive to the time sequence of software design and cannot complete the prediction task well alone. Combining the feature extraction ability of the CNN model and the sensitivity of the LSTM model to time series data, a fusion model of CNN and LSTM is constructed to predict software quality, called the CNN-LSTM model. The steps for establishing the software quality prediction model are as follows: Figure 4 shown.
[0033] The high-purity cluster data and the extracted low-purity cluster data are input into the software quality prediction model to output the software quality. The quality of the software is the quantitative result score of the output comprehensive evaluation index, which is the output quantitative value after calculating the proportion of software code complexity, occupied storage space, reliability, ease of use, etc.
[0034] S5. Extract model features of the software quality prediction model according to the software quality prediction results, and use the extracted model features as the basis for clustering and dividing the software quality parameters.
[0035] The extracted features are: software prediction accuracy, function call index, process control flow index, etc. The extracted features are used as the basis for attribute clustering. According to the extracted prediction model features, the fitness value of each software indicator is calculated by evolutionary iteration, and the weight factor is adjusted during the evolution process to complete the clustering of the input data according to the fitness value.
[0036] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Other modifications or equivalent substitutions made to the technical solution of the present invention by ordinary technicians in the field should be included in the scope of the claims of the present invention as long as they do not depart from the spirit and scope of the technical solution of the present invention.
Claims
1. A software quality prediction method, characterized in that: The following steps are involved: Clustering the software quality parameter data, constructing a fitness function according to the software quality prediction model, selecting the software quality parameter data with a high fitness value as high-purity cluster data according to the fitness threshold, and selecting the software quality parameter data with a low fitness value as low-purity cluster data; The high-purity cluster data is directly input into the software quality prediction model, and the low-purity cluster data is input into the software quality prediction model after being trained by CNN, and the software quality prediction model is a CNN-LSTM model; Obtaining software quality prediction results from the software quality prediction model; Extracting model features of the software quality prediction model according to the software quality prediction results, adjusting weight factors for clustering software quality parameters according to the extracted model features and calculating fitness values, and using the extracted model features as a basis for clustering software quality parameters; The steps of dividing the high-purity cluster data and the low-purity cluster data are as follows: Acquiring software quality parameter data, wherein the software quality parameter data includes software code data, computer usage data, and software quality management data; Preprocess the software quality parameter data, perform attribute clustering on the software quality parameter data according to the improved evolutionary algorithm attribute selection method, and divide the software quality parameter data into low-purity cluster data and high-purity cluster data; The software code data includes the number of newly added code lines, the number of newly added classes and the number of newly added database tables and fields; the computer usage data includes CPU usage distribution, memory usage distribution, storage usage and computer working time data; the software quality management data includes software testing data, software version data and code change data.
Citation Information
Patent Citations
Obstacle recognition method using convolution neural network
CN106570516A
Software defect severity identification method
CN111177010A