Intelligent industrial software diagnosis method based on width learning

By incorporating prior information and modifying class-specific costs through a breadth-based learning approach, an improved CSBLS model is trained, solving the data imbalance problem in intelligent software defect diagnosis. This achieves efficient and accurate defect software classification, enhancing robustness and application value.

CN117827679BActive Publication Date: 2025-10-24SOUTH CHINA UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410101473.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-24
Publication Date
2025-10-24
Estimated Expiration
2044-01-24

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively address data imbalance issues in intelligent software defect diagnosis, leading to the overlooking of defective software and impacting diagnostic accuracy and efficiency.

Method used

We employ a width-based learning approach, which trains an improved CSBLS model by incorporating prior information and modifying class-specific costs. We also utilize Universum data to generate Umean data, thereby improving the model's prediction efficiency and classification accuracy.

Benefits of technology

It significantly improves the accuracy and efficiency of intelligent software defect diagnosis, has good robustness, and can effectively classify defective software, avoiding potential security risks and production interruptions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117827679B_ABST
    Figure CN117827679B_ABST
Patent Text Reader

Abstract

The application discloses an intelligent industrial software diagnosis method based on width learning, comprising the following steps: obtaining an unbalanced software defect sample dataset and preprocessing; dividing the preprocessed dataset into a training set and a test set, randomly selecting part of samples from the training set, called Universum data, and selecting average values of different categories of data in the Universum data to generate prior information, called Umean data; using the Umean data and the remaining training set data to train an improved CSBLS model, called UCSBLS model; and using the trained UCSBLS model to classify the test set and predict defect software in the intelligent industry. On the basis of width learning, the application uses cost-sensitive learning technology and adds prior information, improves the classification accuracy of unbalanced data, shows good effects on the industrial software defect dataset, and improves the software defect diagnosis accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of intelligent software defect diagnosis classification, and particularly to an intelligent industrial software diagnosis method based on width learning. BACKGROUND

[0002] With the rapid development of information technology, software has become an indispensable part of our daily life. Whether it is mobile applications, websites, operating systems, or complex industrial control systems, software plays a key role in them. Therefore, the quality of software directly affects the reliability and stability of these systems. Software defects refer to problems, errors or defects in software products, which can cause software to behave abnormally or not as expected under certain conditions. If developers discover software defects in the later stage, it will take a lot of time and cost to repair. In the industrial field, intelligent software defect diagnosis (SDP) is of great significance. Industrial control systems involve various complex mechanical, electronic and information technology, and the normal operation of these systems depends heavily on the stability of software. For industrial systems, any abnormal or erroneous behavior caused by software defects can have a significant impact on the entire production process, and even cause serious safety problems. Therefore, through effective intelligent software defect diagnosis methods, potential software problems can be discovered and repaired as soon as possible, avoiding potential safety risks and production interruptions. Intelligent software defect diagnosis (SDP) is of great significance in improving software quality, optimizing user experience, and improving development efficiency. Intelligent software defect diagnosis problem is an unbalanced problem because the part without defects will be more than the part with defects. And the traditional classification learning method depends on a balanced data set, and the final prediction result will ignore the small proportion of defective software.

[0003] Although there are many excellent machine learning and deep learning algorithms at present, they can show high-precision classification ability when dealing with complex data, but when facing the problem of data imbalance, the performance of these algorithms will often decline significantly, and the prediction result will ignore the small proportion of classes. In the field of intelligent software defect diagnosis, if these algorithms are used, the defective software will be ignored, which is contrary to our purpose. Therefore, how to effectively and efficiently deal with the problem of data imbalance under the premise of ensuring high precision, especially in practical application scenarios such as intelligent software defect diagnosis, has become a problem to be solved. SUMMARY

[0004] The purpose of the present application is to overcome the shortcomings and deficiencies of the prior art, and provide an intelligent industrial software diagnosis method based on width learning, which improves the prediction efficiency and can also classify the defect data by introducing prior information and combining width learning and class-specific cost, has good robustness, and can effectively improve the accuracy and efficiency of intelligent software defect diagnosis.

[0005] To achieve the above purpose, the technical scheme provided by the present application is: an intelligent industrial software diagnosis method based on width learning, comprising the following steps:

[0006] Step 1: obtaining an unbalanced software defect sample data set, preprocessing the samples in the data set to obtain a data set without abnormal values, the data set including samples and labels with encodings;

[0007] Step 2: dividing the preprocessed data set into a training set and a test set, randomly selecting part of the samples in the training set as Universum data, and selecting average values of different categories of data in the Universum data to generate prior information, called Umean data;

[0008] Step 3: using the Umean data and the remaining training set data to train an improved CSBLS model, called UCSBLS model, the improvement of the UCSBLS model is to add the Umean data as prior information in the training process, and modify the class-specific cost in the model to improve the prediction efficiency and accurately diagnose the defective software;

[0009] Step 4: using the trained UCSBLS model to classify the test set to predict the defective software in intelligent industry.

[0010] Further, in step 1, the preprocessing includes replacing the missing values in the data set with the average values of the two data before and after, deleting data with many missing features, deleting abnormal data, dividing the data into samples and labels, wherein the samples include positive class samples and negative class samples, and encoding the labels for easy use later.

[0011] Further, in step 2, the data set is divided into a training set and a test set, the number of samples in the training set and the test set is the same, when obtaining the Universum data, 60% of the samples in the training set are randomly selected, the selected samples are compared two by two, if the two samples are of different categories, the average value of the two samples is obtained as the Umean data, and the formula for obtaining the Umean is as follows:

[0012]

[0013] In the formula, Umean represents the value of the obtained Umean data, x ixi represents the value of the ith sample j xi represents the value of the ith sample, N represents the number of Universum data randomly obtained.

[0014] Further, in step 3, the UCSBLS model is a two-layer neural network, the first layer is a feature node and an enhanced node, the second layer is an output layer, the feature node and the enhanced node are spliced together to form a hidden node; the UCSBLS model is trained using Umean data and the remaining training set data X represents a new training set composed of Umean data and the remaining training set data, that is, a matrix composed of data, Y represents the label corresponding to the data, that is, a matrix composed of labels, represents a vector space, represents the size of the matrix X n x m, represents the size of the matrix Y n x k, n represents the number of data, m represents the feature dimension of the data, and k represents the dimension of the output; The process of training the UCSBLS model is as follows:

[0015] 3.1) input the new training set and convert it into a feature node, the formula is:

[0016]

[0017] In the formula, W ei is the weight matrix of X, β ei is the bias term, represents the activation function, and the calculated Z i is the ith feature node; combine N feature nodes to obtain the feature layer Z N :

[0018] Z N = [Z1, Z2,..., Z N ]

[0019] 3.2) After obtaining the feature nodes, these nodes are converted into enhanced nodes as input, and the conversion formula is:

[0020] H j = ξ j (Z N W hj + β hj ),j = 1,2,...,M

[0021] In the formula, W hj is the weight matrix of Z N , β hj is the bias term, ξ j represents the activation function, and the calculated H j is the jth enhanced node; combine M enhanced nodes to obtain the enhanced layer HM :

[0022] H M =[H1,H2,...,H M ]

[0023] 3.3) The feature layer and the enhancement layer are combined as the hidden layer A of the two-layer neural network:

[0024] A=[Z N |H M ]

[0025] 3.4) Add the modified class-specific cost and hidden layer A to the objective function to obtain the objective function:

[0026]

[0027] σ i =y i -A(x i )W i

[0028] Where W is the output layer weight, λ represents the weight decay coefficient, S + Represents the penalty cost of positive samples, S - Represents the penalty cost of negative samples, S u Indicates the penalty cost of Umean data, n + Indicates the number of positive samples, n - Indicates the number of negative samples, n u represents the number of Umean samples, σ i represents the penalty term, A(x i ) is the hidden layer obtained by the i-th data input, y i is the label corresponding to the i-th sample; the setting rules of the modified class-specific cost are as follows:

[0029]

[0030]

[0031]

[0032] In S u In the formula, n=n + +n - +n u ;

[0033] Finally, by setting the partial derivative of the Lagrangian of the formula to 0, the output layer weight is obtained by taking the pseudo-inverse:

[0034]

[0035] Where I is the identity matrix;

[0036] The final prediction result is obtained by the following formula:

[0037]

[0038] Where, The final prediction result.

[0039] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0040] 1. The present invention proposes for the first time to use the average value to obtain prior information.

[0041] 2. This paper proposes for the first time to use prior information to train the CSBLS model and improve the model classification effect by modifying the class-specific cost in the CSBLS model.

[0042] 3. The present invention can significantly improve prediction efficiency and classification accuracy, has good robustness, and can be applied to a variety of scenarios.

[0043] 4. The present invention utilizes the most cutting-edge breadth learning technology and neural network optimization technology to realize the practical application of cutting-edge technology. It can perform intelligent software defect detection in industrial and other fields, classify defective software, avoid potential security risks and production interruptions, and has high application value and broad prospects. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 1 is a logic flow chart of the method of the present invention.

[0045] Figure 2 This is the G-mean prediction evaluation result diagram of the method of the present invention. DETAILED DESCRIPTION

[0046] The present invention will be described in further detail below with reference to the embodiments and drawings, but the embodiments of the present invention are not limited thereto.

[0047] like Figure 1 As shown, this embodiment discloses an intelligent industrial software diagnosis method based on width learning, which uses prior information and a common data set to train an improved neural network model, including the following steps:

[0048] Step 1: Obtain input content, including unbalanced software defect samples, and preprocess the samples in the following ways:

[0049] Obtain unbalanced software defect samples, replace missing values ​​in the dataset with the average of the two previous and next data, delete data with many missing features, and delete abnormal data;

[0050] The data is divided into samples and labels, and the labels are encoded for later use. The encoding method is: if it is a defective software, the label of the data is set to 1, and if it is a normal software, the label of the data is set to -1.

[0051] Step 2, generate prior information;

[0052] The data set is divided into training set and test set, the number of samples in the training set and the test set is the same, when obtaining Universum data, 60% of the samples in the training set are randomly selected, and the selected samples are compared with each other, if the two samples are different in category, the average value of the two samples is taken to obtain Umean data, the formula for obtaining Umean is as follows:

[0053]

[0054] Where Umean represents the value of the obtained Umean data, x i represents the value of the i-th sample, x j represents the value of the j-th sample, and N represents the number of randomly obtained Universum data.

[0055] Step 3, train an improved CSBLS model, called UCSBLS model;

[0056] The UCSBLS model is a two-layer neural network, the first layer is a feature node and an enhanced node, and the second layer is an output layer. The feature node and the enhanced node are spliced together to form a hidden node. The UCSBLS model is trained using Umean data and the remaining training set data X represents the new training set composed of Umean data and the remaining training set data, which is also a matrix composed of data, Y represents the label corresponding to the data, which is also a matrix composed of labels, represents a vector space, represents that the size of the matrix X is n x m, represents that the size of the matrix Y is n x k, n represents the number of data, m represents the feature dimension of the data, and k represents the dimension of the output. The process of training the UCSBLS model is as follows:

[0057] 3.1) input the new training set and convert it into a feature node, the formula is:

[0058]

[0059] In the formula, W ei is the weight matrix of X, β ei is the bias term, represents the activation function, and Z iZi is the i-th feature node; N feature nodes are merged to obtain the feature layer Z N :

[0060] Z N = [Z1, Z2,..., Z N ]

[0061] 3.2) After obtaining the feature nodes, the nodes are taken as input to convert to obtain enhanced nodes, and the conversion formula is:

[0062] H j = ξ j (Z N W hj + β hj ), j = 1, 2,..., M

[0063] In the formula, W hj is the weight matrix of Z N , β hj is the bias term, ξ j represents the activation function, and the calculated H j is the j-th enhanced node; M enhanced nodes are merged to obtain the enhanced layer H M :

[0064] H M = [H1, H2,..., H M ]

[0065] 3.3) The feature layer and the enhanced layer are spliced as the hidden layer A of the two-layer neural network:

[0066] A = [Z N | H M ]

[0067] 3.4) The modified class-specific cost and the hidden layer A are added to the objective function to obtain the objective function:

[0068]

[0069] σ i = y i - A(x i )W i

[0070] Where W is the output layer weight, λ represents the weight decay coefficient, S + represents the penalty cost of positive class samples, S _ represents the penalty cost of negative class samples, S u represents the penalty cost of Umean data, n + represents the number of positive class samples, n _ represents the number of negative class samples, and n urepresents the number of Umean samples, σ i represents the penalty term, A(x i ) is the hidden layer obtained by the i-th data input, y i is the label corresponding to the i-th sample. The modified class-specific cost setting rules are as follows:

[0071]

[0072]

[0073]

[0074] In S u In the formula, n=n + +n - +n u .

[0075] Finally, by setting the partial derivative of the Lagrangian of the formula to 0, the output layer weight is obtained by taking the pseudo-inverse:

[0076]

[0077] Where I is the identity matrix.

[0078] The final prediction result is obtained by the following formula:

[0079]

[0080] Where, The final prediction result.

[0081] Step 4: Put the previously generated test set into the trained UCSBLS model for prediction, predict the defective software in the smart industry, and save the prediction results.

[0082] like Figure 2 As shown in Figure 2, this example shows the prediction evaluation results of five models including this method. The G-mean evaluation index is used to evaluate the prediction results of the WBLS, CSBLS, CCRELM, SMOTE_BLS, and UCSBLS models. The calculation method of G-mean is as follows:

[0083]

[0084] Where R is the recall rate and spec is the specificity, which is used to measure the ability of the classifier to identify negative examples. The formula is as follows:

[0085] R=TP / (TP+FN)

[0086] spec=TN / (FP+TN)

[0087] In the equation, TP represents the number of correctly classified positive class data, TN is the number of correctly classified negative class data, FP represents the number of incorrectly classified positive class data, and FN refers to the number of incorrectly classified negative class data. G-mean is generally used to evaluate the classification results of unbalanced data. The higher the G-mean value, the better the model effect.

[0088] As can be seen from the figure, the accuracy of the present method is far superior to other methods on CM1, KC2, PC2 and MW1 data sets, even the smallest difference is increased by 20.8%, and the G-mean value on PC3 data set is only 0.0425 lower than that of CSBLS method.

[0089] The above embodiments are the preferred embodiments of the present application, but the embodiments of the present application are not limited to the above embodiments, and any changes, modifications, substitutions, combinations, simplifications made without departing from the spirit and principles of the present application shall be equivalent replacement methods, and shall be included in the protection scope of the present application.

Claims

1. A method for intelligent industrial software diagnosis based on width learning, characterized in that, The method comprises the following steps: Step 1: obtaining a data set composed of unbalanced software defect samples, preprocessing the samples in the data set to obtain a data set without abnormal values, the data set comprising samples and labels with encodings; Step 2: dividing the preprocessed data set into a training set and a test set, randomly selecting part of the samples in the training set as Universum data, and selecting average values of data of different categories in the Universum data to generate prior information, referred to as Umean data; Step 3: training an improved CSBLS model using the Umean data and the remaining training set data, referred to as UCSBLS model, the improvement of the UCSBLS model being that the Umean data is added as prior information in the training process, and the category-specific cost in the model is modified to improve the prediction efficiency and accurately diagnose defective software; The UCSBLS model is a two-layer neural network, the first layer being feature nodes and enhancement nodes, and the second layer being an output layer, the feature nodes and the enhancement nodes being spliced together to form hidden nodes; UCSBLS model using Umean data and the rest of the training set data where X represents the new training set composed of Umean data and the rest of the training set data, and is a matrix composed of data, Y represents the labels corresponding to the data, and is a matrix composed of labels, represents a vector space, represents that the size of the matrix X is n x m, represents that the size of the matrix Y is n x k, n represents the number of data, m represents the feature dimension of the data, and k represents the dimension of the output; The process of training the UCSBLS model is as follows: 3.1) inputting a new training set and converting it into feature nodes, the formula being: where W ei is a weight matrix for X, β ei is a bias term, represents an activation function, and the computed Z i is the i-th feature node; combining N feature nodes gives the feature layer Z N : Z N = [Z1, Z2,..., Z N ] 3.2) after obtaining the feature nodes, converting the nodes into enhancement nodes by taking the nodes as input, the conversion formula being: H j = ξ j (Z N W hj + β hj ),j = 1,2,...,M In the formula, W hj is the weight matrix of Z N , β hj is the bias term, ξ j represents the activation function, and the calculated H j is the jth enhanced node; M enhanced nodes are combined to obtain the enhanced layer H M : H M = [H1, H2,..., H M ] 3.3) splicing the feature layer and the enhancement layer as a hidden layer A of the two-layer neural network: A = [Z N |H M ] 3.4) adding the modified category-specific cost and the hidden layer A to the objective function to obtain the objective function: σ i = y i - A(x i )W i where W is the output layer weight, λ represents the weight decay coefficient, S + represents the penalty cost of positive class samples, S - represents the penalty cost of negative class samples, S u represents the penalty cost of Umean data, n + represents the number of positive class samples, n_ represents the number of negative class samples, n u represents the number of Umean samples, σ i represents the penalty term, A(x i ) is the hidden layer obtained by the ith data input, y i is the label corresponding to the ith sample; the setting rule of the modified class-specific cost is as follows: In S u the formula n = n + + n - + n u ; Finally, the output layer weight is obtained by taking the partial derivative of the Lagrange quantity of the formula to be 0 and solving the pseudo-inverse: In the formula, I is an identity matrix; The final prediction result is obtained by the following formula: In the formula, is the final prediction result; Step 4: using the trained UCSBLS model to classify the test set to predict defective software in intelligent industry.

2. The width learning based intelligent industrial software diagnosis method of claim 1, wherein, In step 1, the preprocessing comprises replacing missing values in the data set with average values of data before and after the data set, deleting data with many missing features, deleting abnormal data, dividing the data into samples and labels, wherein the samples comprise positive class samples and negative class samples, and encoding the labels for subsequent use.

3. The width learning based intelligent industrial software diagnosis method of claim 2, wherein, In step 2, the data set is divided into a training set and a test set, the number of samples in the training set and the test set being the same, 60% of the samples in the training set are randomly selected as Universum data, the selected samples are pairwise compared, if the two samples are of different categories, the average value of the two samples is taken as Umean data, and the formula for obtaining Umean is as follows: where Umean represents the value of the obtained Umean data, x i represents the value of the i-th sample, x j represents the value of the j-th sample, and N represents the number of Universum data randomly obtained.

Citation Information

Patent Citations

  • Defect detection model training method, defect detection method and device

    CN114299034A

  • Software testing method and system based on unbalanced data set

    CN116401143A