Industrial defect characteristic evaluation method and system, storage medium and computer equipment
By introducing SiLU, DWConv and RMSNorm technologies, the accuracy and robustness of industrial defect characteristics evaluation are improved, the efficiency and adaptability problems of traditional methods in complex industrial data processing are solved, and efficient defect diagnosis and quality evaluation are achieved.
Patent Information
- Application Number
- CN202510567357.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-30
- Publication Date
- 2025-08-12
AI Technical Summary
Traditional defect evaluation methods have strong subjectivity, poor adaptability and low efficiency when processing complex and changeable industrial data, which is difficult to meet the needs of modern industry for high-precision and high-efficiency defect evaluation.
An industrial defect characteristic evaluation method is adopted, combining Sigmoid weighted linear unit (SiLU) and one-dimensional depth separable convolutional layer (DWConv), and using root mean square standardization (RMSNorm) technology to improve feature expression ability and model training stability.
It significantly improves the accuracy and robustness of defect evaluation, reduces the demand for computing resources, and is suitable for defect diagnosis and quality evaluation in complex industrial scenarios.
Smart Images

Figure CN120470528A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of intelligent fault diagnosis, and in particular relates to an industrial defect characteristic evaluation method, system, storage medium and computer equipment. Background Art
[0002] In modern industrial production, product quality control is a core component in ensuring production efficiency and product reliability. Industrial defects not only reduce product performance but can also lead to safety hazards and significant economic losses. Therefore, conducting a scientific and accurate comprehensive evaluation of industrial defects and providing reasonable treatment recommendations based on this evaluation are crucial for improving product quality and reducing maintenance costs. However, traditional defect evaluation methods often rely on manual experience or rule-based automated systems. These methods often suffer from strong subjectivity, poor adaptability, and low efficiency when processing complex and volatile industrial data, making it difficult to meet the modern industry's demand for high-precision and high-efficiency defect evaluation.
[0003] In recent years, with the rapid development of deep learning technology, neural network-based industrial defect analysis methods have gradually become a research hotspot. Multilayer perceptrons (MLPs), a classic neural network model, are widely used in various classification and regression tasks due to their simple structure and ease of implementation. However, traditional MLPs have limitations when processing high-dimensional, nonlinear industrial defect data, such as high model complexity, high computational resource consumption, and slow convergence. These limitations make them difficult to adapt to the real-time and lightweight requirements of industrial scenarios.
[0004] In order to overcome the above problems, the present invention proposes an industrial defect characteristic evaluation method, system, storage medium and computer equipment, which provide strong technical support for quality control in industrial production. Summary of the Invention
[0005] Aiming at the problem of few industrial defect samples and low diagnostic evaluation accuracy, the present invention proposes an industrial defect characteristic evaluation method, system, storage medium and computer equipment.
[0006] The technical solution adopted by the present invention to solve the technical problem is:
[0007] A method for evaluating industrial defect characteristics, comprising the following steps:
[0008] S100: Acquire industrial defect characteristic data as raw data, preprocess the raw data, and adjust the shape of the raw data tensor;
[0009] S200: Use a fully connected layer to perform linear transformation and channel separation on the data, dividing the feature tensor into two sub-tensors of equal size;
[0010] S300: Use one-dimensional depth-wise separable convolution to extract local features of the first feature sub-tensor, capture feature patterns and structures, and perform feature normalization on the local features of the first feature sub-tensor;
[0011] S400: Use the SiLU gating mechanism for the second feature sub-tensor, combining the gating properties of the Sigmoid function and the expressive power of the linear function to adaptively adjust the weight of each feature;
[0012] S500: The two processed feature sub-tensors are spliced in the channel dimension to form a new feature tensor. The fused features are linearly transformed using a fully connected layer, mapped to the final output space, and the final defect assessment results are output.
[0013] Preferably, the raw data in S100 is a two-dimensional tensor, namely (batch_size, num_features), where the first dimension is the number of samples and the second dimension is the number of features. S100 includes:
[0014] Use the unsqueeze function in torch to adjust the input two-dimensional tensor to a three-dimensional tensor, i.e. (batch_size, 1, num_features).
[0015] Preferably, S200 includes:
[0016] The input feature tensor is passed through a fully connected layer with an input feature number of 75 and an output feature number of 150 defined by the Linear function in the torch.nn module to achieve feature transformation and dimension adjustment of the data. The input data of the fully connected layer is a vector x∈R n , the weight matrix of the fully connected layer is W∈R m×n , the bias vector is b∈R m , then the output y∈R m Calculated by the formula y=Wx+b;
[0017] The chunk function in torch is then used to split the feature tensor along the third dimension into two sub-tensors of equal size for further processing or assignment to different computing units.
[0018] Preferably, S300 includes:
[0019] The first feature sub-tensor passes through a one-dimensional depth-wise separable convolutional layer defined by the conv1d function in the torch.nn module. The input and output feature numbers of this convolutional layer are both 75, and the convolution kernel size is 4×4, which is used to extract the local features of the first feature sub-tensor and capture the feature patterns and structures. Among them, the one-dimensional depth-wise separable convolutional layer includes depth-wise convolution and point-wise convolution. The depth-wise convolution performs convolution operations on each channel of the input data independently. Assuming that the shape of the input data is (B, Cin, L), where B is the batch size, Cin is the number of input channels, and L is the sequence length, the depth-wise convolution uses Cin convolution kernels, each convolution kernel only acts on the corresponding input channel, and the output shape is (B, Cin, L′), where L′ is the sequence length after convolution; then, the point-wise convolution uses a 1×1 convolution kernel to map the output channel of the depth-wise convolution from Cin to the target channel number Cout, and the output shape is (B, Cout, L′);
[0020] Use RMSNorm to normalize the root mean square of the input features. For the input vector x=(x1,x2,…,x n ), first calculate its root mean square value RMS(x)=sqrt[sum(x1 2 +x2 2 +…+x n 2 ) / n], which reflects the overall scale of the input data; then, each element of the input vector is divided by its root mean square value to obtain the standardized vector y i =x i / RMS(x), making the distribution of input data more stable; finally, by introducing the learnable scaling parameter γ and translation parameter β, the standardized data is linearly transformed to obtain the final output z i =γy i +β and z=Concat(z1,z2,…,z n ) to retain the expressiveness of the model, where the Concat() function is used to connect tensors.
[0021] Preferably, S400 includes:
[0022] The SiLU function in torch.nn.functional is used to apply a gating mechanism to the second feature sub-tensor to adaptively adjust the weight of each feature. The calculation formula of SiLU is:
[0023] SiLU(x)=x·σ(x)
[0024] Where, σ(x) = 1 / exp(-x) is the Sigmoid function;
[0025] For the input x, first calculate its Sigmoid value σ(x), then multiply x by σ(x) element by element, and output the feature weight x′=SiLU(x); SiLU multiplies the input x by its Sigmoid weighted value, so that the activation function has smooth nonlinear characteristics when it is close to zero, and approximates linear behavior when it is far from zero, thereby introducing nonlinear expression capabilities while retaining the advantages of linear units.
[0026] Preferably, S500 includes:
[0027] The two processed feature sub-tensors are spliced in the channel dimension to form a new feature tensor. A fully connected layer with an input feature number of 75 and an output feature number of 1 is used to fuse the standardized feature tensor obtained by S300 and the feature weights obtained by S400, and the final defect assessment result is output, specifically:
[0028] z′=W(x′⊙z)+b
[0029] Where W is the weight matrix, b is the bias term, z′ is the defect evaluation result, and ⊙ is the dot product symbol.
[0030] Industrial defect characteristic evaluation system, including data preprocessing module, linear transformation module, one-dimensional depth-separable convolution module, weight adjustment module and defect evaluation module;
[0031] A data preprocessing module is used to obtain industrial defect characteristic data as raw data, preprocess the raw data, and adjust the shape of the raw data tensor;
[0032] The linear transformation module is used to perform linear transformation and channel separation on the data using a fully connected layer, dividing the feature tensor into two sub-tensors of the same size;
[0033] A one-dimensional depth-wise separable convolution module is used to extract local features of the first feature sub-tensor using one-dimensional depth-wise separable convolution, capture feature patterns and structures, and perform feature normalization on the local features of the first feature sub-tensor;
[0034] The weight adjustment module is used to use the SiLU gating mechanism on the second feature sub-tensor, combining the gating characteristics of the Sigmoid function and the expressive power of the linear function to adaptively adjust the weight of each feature;
[0035] The defect assessment module is used to splice the two processed feature sub-tensors in the channel dimension to form a new feature tensor, use the fully connected layer to perform linear transformation on the fused features, map them to the final output space, and output the final defect assessment results.
[0036] A computer-readable storage medium stores a computer program, which implements the steps of an industrial defect characteristic evaluation method when executed by a processor.
[0037] A computer device includes a memory and a processor, wherein the memory stores a computer program and the processor implements the steps of an industrial defect characteristic evaluation method when executing the computer program.
[0038] The above-mentioned industrial defect characteristic evaluation method, system, storage medium and computer equipment add a gating unit and a one-dimensional depth-wise separable convolutional layer to aggregate features, improve feature expression capabilities, and reduce the number of model parameters and computational complexity. In addition, the root mean square normalization (RMSNorm) technology is used to replace the traditional regularization method to further optimize the model training process and improve the convergence speed and stability. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 This is a flow chart of a method for evaluating industrial defect characteristics in one embodiment of the present invention;
[0040] Figure 2 Schematic diagram of the principle of an industrial defect characteristic evaluation method in one embodiment of the present invention;
[0041] Figure 3 Schematic diagram of the comparison results of training loss curves of different models in one embodiment of the present invention. DETAILED DESCRIPTION
[0042] In order to enable those skilled in the art to better understand the technical solution of the present invention, the present invention is further described in detail below with reference to the accompanying drawings.
[0043] In one embodiment, Figure 1 and Figure 2 As shown, the industrial defect characteristic evaluation method comprises the following steps:
[0044] S100: Acquire industrial defect characteristic data as raw data, preprocess the raw data, and adjust the shape of the raw data tensor;
[0045] S200: Use a fully connected layer to perform linear transformation and channel separation on the data, dividing the feature tensor into two sub-tensors of equal size;
[0046] S300: Use one-dimensional depth-wise separable convolution to extract local features of the first feature sub-tensor, capture feature patterns and structures, and perform feature normalization on the local features of the first feature sub-tensor;
[0047] S400: Use the SiLU gating mechanism for the second feature sub-tensor, combining the gating properties of the Sigmoid function and the expressive power of the linear function to adaptively adjust the weight of each feature;
[0048] S500: The two processed feature sub-tensors are spliced in the channel dimension to form a new feature tensor. The fused features are linearly transformed using a fully connected layer, mapped to the final output space, and the final defect assessment results are output.
[0049] Specifically, a comprehensive evaluation method for industrial defect characteristics based on a multi-layer perceptron is proposed. On the basis of the traditional MLP, Sigmoid weighted linear unit (SiLU) and one-dimensional depthwise separable convolution layer (DWConv) are added to extract and aggregate features. At the same time, root mean square normalization (RMSNorm) is used to improve the convergence speed and stability.
[0050] The Multilayer Perceptron (MLP) is a classic feedforward neural network consisting of an input layer, a hidden layer, and an output layer, capable of learning complex nonlinear mapping relationships. Its core principle is to achieve hierarchical feature extraction and transformation of input data by stacking multiple layers of neurons and introducing nonlinear activation functions. The input layer of the MLP receives raw data, the hidden layer performs a linear transformation on the input using a weight matrix and bias vector, and introduces nonlinearity by applying an activation function (such as ReLU, Sigmoid, or Tanh). The output layer generates the final result based on the task requirements (such as classification or regression). The algorithm process includes initialization, forward propagation, loss calculation, backpropagation, and iterative training. First, the weight matrix and bias vector are randomly initialized; then, the input data undergoes a linear transformation of each layer (z = Wx + b), where W is the weight matrix, b is the bias vector, and x is the input. An activation function (such as ReLU) is then applied to the result of the linear transformation to obtain the output of the layer (a = σ(z)). The above process is repeated until the data passes through all hidden layers and reaches the output layer; next, depending on the task type (such as classification or regression), a loss function (such as cross entropy loss or mean squared error) is used to calculate the error between the model output and the true label; then, the gradient of the loss function for each layer parameter is calculated by backpropagation, and the error is propagated layer by layer from the output layer to the input layer using the chain rule, and the weights and bias of each layer are updated, usually using gradient descent or its variants (such as Adam, SGD); finally, the forward propagation, loss calculation, and backpropagation processes are repeated until the model converges or reaches the predetermined number of training rounds. The advantage of MLP lies in its powerful expressive power and its ability to fit complex nonlinear functions. However, it also has problems such as gradient vanishing and overfitting, and usually needs to be optimized through techniques such as regularization, dropout, or batch normalization.
[0051] In one embodiment, the raw data in S100 is a two-dimensional tensor, namely (batch_size, num_features), where the first dimension is the number of samples and the second dimension is the number of features (i.e., industrial defect characteristics). S100 includes:
[0052] Use the unsqueeze function in torch to resize the input two-dimensional tensor into a three-dimensional tensor, i.e. (batch_size, 1, num_features), to ensure that the data shape matches the model input or calculation requirements, thereby avoiding shape mismatch errors.
[0053] In one embodiment, S200 includes:
[0054] The input feature tensor is passed through a fully connected layer with an input feature number of 75 and an output feature number of 150 defined by the Linear function in the torch.nn module to achieve feature transformation and dimension adjustment of the data. The input data of the fully connected layer is a vector x∈R n , the weight matrix of the fully connected layer is W∈R m×n , the bias vector is b∈R m , then the output y∈R m Calculated by the formula y=Wx+b;
[0055] The chunk function in torch is then used to split the feature tensor along the third dimension into two sub-tensors of the same size for further processing or assignment to different computing units.
[0056] In one embodiment, S300 includes:
[0057] The first feature sub-tensor passes through a one-dimensional depth-wise separable convolutional layer defined by the conv1d function in the torch.nn module. The input and output feature numbers of this convolutional layer are both 75, and the convolution kernel size is 4×4, which is used to extract the local features of the first feature sub-tensor and capture the feature patterns and structures. Among them, the one-dimensional depth-wise separable convolutional layer includes depth-wise convolution and point-wise convolution. The depth-wise convolution performs convolution operations on each channel of the input data independently. Assuming that the shape of the input data is (B, Cin, L), where B is the batch size, Cin is the number of input channels, and L is the sequence length, the depth-wise convolution uses Cin convolution kernels, each convolution kernel only acts on the corresponding input channel, and the output shape is (B, Cin, L′), where L′ is the sequence length after convolution; then, the point-wise convolution uses a 1×1 convolution kernel to map the output channel of the depth-wise convolution from Cin to the target channel number Cout, and the output shape is (B, Cout, L′);
[0058] RMSNorm is used to normalize the root mean square of the input features, reducing the computational overhead while stabilizing the model training process; for the input vector x=(x1,x2,…,x n ), first calculate its root mean square value RMS(x)=sqrt[sum(x1 2 +x2 2 +…+x n 2 ) / n], which reflects the overall scale of the input data; then, each element of the input vector is divided by its root mean square value to obtain the standardized vector y i =x i / RMS(x), making the distribution of input data more stable; finally, by introducing the learnable scaling parameter γ and translation parameter β, the standardized data is linearly transformed to obtain the final output z i =γy i +β and z=Concat(z1,z2,…,z n ) to retain the expressiveness of the model, where the Concat() function is used to connect tensors.
[0059] In one embodiment, S400 includes:
[0060] The SiLU function in torch.nn.functional is used to apply a gating mechanism to the second feature sub-tensor to adaptively adjust the weight of each feature. The calculation formula of SiLU is:
[0061] SiLU(x)=x·σ(x)
[0062] Where, σ(x) = 1 / exp(-x) is the Sigmoid function;
[0063] For the input x, first calculate its Sigmoid value σ(x), then multiply x by σ(x) element by element, and output the feature weight x′=SiLU(x); SiLU multiplies the input x by its Sigmoid weighted value, so that the activation function has smooth nonlinear characteristics when it is close to zero, and approximates linear behavior when it is far from zero, thereby introducing nonlinear expression capabilities while retaining the advantages of linear units.
[0064] In one embodiment, S500 includes:
[0065] A fully connected layer with an input feature number of 75 and an output feature number of 1 is used to fuse the standardized feature tensor z obtained by S300 and the feature weight x′ obtained by S400, and output the final defect evaluation result, specifically:
[0066] z′=W(x′⊙z)+b
[0067] Where W is the weight matrix, b is the bias term, z′ is the defect evaluation result, and ⊙ is the dot product symbol.
[0068] In order to prove the effectiveness of the present invention, the following experiments were conducted:
[0069] This paper uses two public datasets: wind turbine blade cracking data and transformer failure data for experimental verification. The wind turbine blade cracking dataset, with each sample having 75 features, including hub speed, hub angle, blade 1 angle, blade 2 angle, and blade 3 angle, contains 50,000 training data points and 40,000 test data points. A total of 489 sets of transformer failure data were selected for experimental analysis, including 90 sets of normal sample data and 399 sets of failure sample data points. The experiments were conducted on a 12th Gen Intel(R) Core(TM) i5-12400F and an Nvidia GTX 1080ti. The dataset was based on the Pytorch deep learning framework (torch-1.12.1+cuda-11.6), with a learning rate of 0.001, a batch size of 16, a cross-entropy loss function, and 40 epochs of training. Dropout was set to 0.1, and the training set to test set ratio was 8:2.
[0070] In order to evaluate the effectiveness of the industrial defect characteristic evaluation method based on the multi-layer perceptron provided by the present invention, the following model is used as a comparison:
[0071] XGBoost: This method is a machine learning algorithm based on gradient boosting decision trees. It builds a strong classifier by integrating multiple weak classifiers (decision trees). It uses an additive model to gradually optimize the loss function, adding a new tree at each iteration to fit the residual. XGBoost uses regularization (such as L1 / L2 regularization) to control model complexity and prevent overfitting.
[0072] Traditional multilayer perceptron (MLP): This method is a feedforward neural network consisting of an input layer, hidden layers, and an output layer, with neurons in each layer fully connected. It uses nonlinear activation functions (such as ReLU) to learn complex relationships between input features and uses a backpropagation algorithm to update weights to minimize a loss function. MLPs are suitable for processing structured data, but their ability to extract local features is limited.
[0073] Convolutional Neural Network (CNN): This method extracts local features by sliding convolution kernels over the input data. The convolution operation preserves spatial structure. Pooling layers (such as max pooling) reduce the dimensionality of feature maps and enhance the model's translation invariance. CNNs progressively extract high-level features through multiple layers of convolution and pooling. Its parameter sharing mechanism significantly improves computational efficiency and effectively captures spatial features. However, its limitation lies in its limited ability to capture global dependencies.
[0074] Transformer: This method, based on the self-attention mechanism, captures global dependencies by calculating the correlation between each element in the input sequence and other elements. It uses a multi-head attention mechanism to learn feature representations in different subspaces in parallel. Transformer abandons the traditional recurrent structure and relies entirely on the attention mechanism to process sequential data.
[0075] Long Short-Term Memory (LSTM) networks: This method is an improved version of recurrent neural networks, controlling the flow of information through input, forget, and output gates. The forget gate determines which information to discard, the input gate determines which new information to store, and the output gate controls the output of the current state.
[0076] The comparative experiment evaluation metrics used accuracy, F1, recall, and precision. Accuracy is the ratio of correctly classified samples to the total number of samples, measuring the overall diagnostic accuracy of the model. Recall is the proportion of samples correctly predicted as positive by the model among samples that are actually positive, reflecting the model's ability to capture positive samples. F1 is the harmonic mean of precision and recall, comprehensively reflecting the model's predictive ability. Precision is the proportion of samples predicted as positive by the model among samples that are actually positive, reflecting the accuracy of the model's positive predictions.
[0077] According to the performance evaluation results in Table 1 and Table 2, under the same hyperparameter settings and hardware environment, the comprehensive evaluation method of industrial defect characteristics based on multi-layer perceptron provided by the present invention (i.e., Ours) has better performance. Figure 3 , it can be seen that the method provided by the present invention not only has the fastest convergence speed, but also can achieve the minimum loss.
[0078] Table 1 Comparative experimental results of fan blade crack diagnosis
[0079]
[0080] Table 2 Transformer fault diagnosis comparison test results
[0081]
[0082]
[0083] In summary, the comprehensive evaluation method of industrial defect characteristics based on multi-layer perceptron in the embodiment of the present invention has the following beneficial effects: (1) By introducing gated linear units (SiLU) and one-dimensional depthwise separable convolutional layers (DWConv), the present invention can more effectively aggregate data features, enhance the model's ability to express industrial defect characteristics, and significantly reduce the number of model parameters and computational complexity, thereby achieving lightweight design. (2) The present invention adopts RMSNorm normalization technology to replace traditional regularization methods, effectively accelerating model convergence, improving training stability, reducing overfitting risks, and enabling the model to maintain excellent generalization capabilities under limited data conditions. (3) The present invention can be flexibly applied to the comprehensive analysis of multi-dimensional industrial data, providing an efficient and reliable solution for industrial defect diagnosis and quality assessment. (4) The present invention not only performs better in feature fusion and can perform defect assessment more accurately, but also significantly reduces computing resource requirements while ensuring high performance through lightweight design and efficient feature aggregation mechanism, making it suitable for deployment and application in resource-constrained industrial environments.
[0084] In one embodiment, an industrial defect characteristic evaluation system is provided, comprising a data preprocessing module, a linear transformation module, a one-dimensional depthwise separable convolution module, a weight adjustment module, and a defect evaluation module;
[0085] A data preprocessing module is used to obtain industrial defect characteristic data as raw data, preprocess the raw data, and adjust the shape of the raw data tensor;
[0086] The linear transformation module is used to perform linear transformation and channel separation on the data using a fully connected layer, dividing the feature tensor into two sub-tensors of the same size;
[0087] A one-dimensional depth-wise separable convolution module is used to extract local features of the first feature sub-tensor using one-dimensional depth-wise separable convolution, capture feature patterns and structures, and perform feature normalization on the local features of the first feature sub-tensor;
[0088] The weight adjustment module is used to use the SiLU gating mechanism on the second feature sub-tensor, combining the gating characteristics of the Sigmoid function and the expressive power of the linear function to adaptively adjust the weight of each feature;
[0089] The defect assessment module is used to splice the two processed feature sub-tensors in the channel dimension to form a new feature tensor, use the fully connected layer to perform linear transformation on the fused features, map them to the final output space, and output the final defect assessment results.
[0090] The specific definitions of the industrial defect characteristic evaluation system can be found in the definitions of the industrial defect characteristic evaluation method above and will not be repeated here. Each module in the aforementioned industrial defect characteristic evaluation system can be implemented in whole or in part through software, hardware, or a combination thereof. Each of these modules can be embedded in or independent of a processor in a computer device in hardware form, or stored in a computer device memory in software form, so that the processor can call and execute the corresponding operations of each module.
[0091] A computer-readable storage medium stores a computer program, which implements the steps of an industrial defect characteristic evaluation method when executed by a processor.
[0092] A computer device includes a memory and a processor, wherein the memory stores a computer program and the processor implements the steps of an industrial defect characteristic evaluation method when executing the computer program.
[0093] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0094] The above is a detailed introduction to the industrial defect characteristic evaluation method, system, storage medium, and computer device provided by the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only intended to help understand the core idea of the present invention. It should be noted that for ordinary technicians in this technical field, without departing from the principles of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.
Claims
1. A method for evaluating industrial defect characteristics, characterized in that: The method comprises the following steps: S100: Acquire industrial defect characteristic data as raw data, preprocess the raw data, and adjust the shape of the raw data tensor; S200: Use a fully connected layer to perform linear transformation and channel separation on the data, dividing the feature tensor into two sub-tensors of equal size; S300: Use one-dimensional depth-wise separable convolution to extract local features of the first feature sub-tensor, capture feature patterns and structures, and perform feature normalization on the local features of the first feature sub-tensor; S400: Use the SiLU gating mechanism for the second feature sub-tensor, combining the gating properties of the Sigmoid function and the expressive power of the linear function to adaptively adjust the weight of each feature; S500: The two processed feature sub-tensors are spliced in the channel dimension to form a new feature tensor. The fused features are linearly transformed using a fully connected layer, mapped to the final output space, and the final defect assessment results are output.
2. The method according to claim 1, characterized in that The raw data in S100 is a two-dimensional tensor, namely (batch_size, num_features). The first dimension is the number of samples and the second dimension is the number of features. S100 includes: Use the unsqueeze function in torch to adjust the input two-dimensional tensor to a three-dimensional tensor, i.e. (batch_size, 1, num_features).
3. The method according to claim 2, characterized in that S200 includes: The input feature tensor is passed through a fully connected layer with an input feature number of 75 and an output feature number of 150 defined by the Linear function in the torch.nn module to achieve feature transformation and dimension adjustment of the data. The input data of the fully connected layer is a vector x∈R n , the weight matrix of the fully connected layer is W∈R m×n , the bias vector is b∈R m , then the output y∈R m Calculated by the formula y=Wx+b; The chunk function in torch is then used to split the feature tensor along the third dimension into two sub-tensors of equal size for further processing or assignment to different computing units.
4. The method according to claim 3, characterized in that S300 includes: The first feature sub-tensor passes through a one-dimensional depth-wise separable convolutional layer defined by the conv1d function in the torch.nn module. The input and output feature numbers of this convolutional layer are both 75, and the convolution kernel size is 4×4, which is used to extract the local features of the first feature sub-tensor and capture the feature patterns and structures. Among them, the one-dimensional depth-wise separable convolutional layer includes depth-wise convolution and point-wise convolution. The depth-wise convolution performs convolution operations on each channel of the input data independently. Assuming that the shape of the input data is (B, Cin, L), where B is the batch size, Cin is the number of input channels, and L is the sequence length, the depth-wise convolution uses Cin convolution kernels, each convolution kernel only acts on the corresponding input channel, and the output shape is (B, Cin, L′), where L′ is the sequence length after convolution; then, the point-wise convolution uses a 1×1 convolution kernel to map the output channel of the depth-wise convolution from Cin to the target channel number Cout, and the output shape is (B, Cout, L′); Use RMSNorm to normalize the root mean square of the input features. For the input vector x=(x1,x2,…,x n ), first calculate its root mean square value RMS(x)=sqrt[sum(x1 2 +x2 2 +…+x n 2 ) / n], which reflects the overall scale of the input data; then, each element of the input vector is divided by its root mean square value to obtain the standardized vector y i =x i / RMS(x), making the distribution of input data more stable; finally, by introducing the learnable scaling parameter γ and translation parameter β, the standardized data is linearly transformed to obtain the final output z i =γy i +β and z=Concat(z1,z2,…,z n ) to retain the expressiveness of the model, where the Concat() function is used to connect tensors.
5. The method according to claim 4, characterized in that S400 includes: The SiLU function in torch.nn.functional is used to apply a gating mechanism to the second feature sub-tensor to adaptively adjust the weight of each feature. The calculation formula of SiLU is: SiLU(x)=x·σ(x) Where, σ(x) = 1 / exp(-x) is the Sigmoid function; For the input x, first calculate its Sigmoid value σ(x), then multiply x by σ(x) element by element, and output the feature weight x′=SiLU(x); SiLU multiplies the input x by its Sigmoid weighted value, so that the activation function has smooth nonlinear characteristics when it is close to zero, and approximates linear behavior when it is far from zero, thereby introducing nonlinear expression capabilities while retaining the advantages of linear units.
6. The method according to claim 5, characterized in that S500 includes: The two processed feature sub-tensors are spliced in the channel dimension to form a new feature tensor. A fully connected layer with an input feature number of 75 and an output feature number of 1 is used to fuse the standardized feature tensor obtained by S300 and the feature weights obtained by S400, and the final defect assessment result is output, specifically: z′=W(x′⊙z)+b Where W is the weight matrix, b is the bias term, z′ is the defect evaluation result, and ⊙ is the dot product symbol.
7. Industrial defect characteristic evaluation system, characterized in that, It includes data preprocessing module, linear transformation module, one-dimensional depth-separable convolution module, weight adjustment module and defect assessment module; A data preprocessing module is used to obtain industrial defect characteristic data as raw data, preprocess the raw data, and adjust the shape of the raw data tensor; The linear transformation module is used to perform linear transformation and channel separation on the data using a fully connected layer, dividing the feature tensor into two sub-tensors of the same size; A one-dimensional depth-wise separable convolution module is used to extract local features of the first feature sub-tensor using one-dimensional depth-wise separable convolution, capture feature patterns and structures, and perform feature normalization on the local features of the first feature sub-tensor; The weight adjustment module is used to use the SiLU gating mechanism on the second feature sub-tensor, combining the gating characteristics of the Sigmoid function and the expressive power of the linear function to adaptively adjust the weight of each feature; The defect assessment module is used to splice the two processed feature sub-tensors in the channel dimension to form a new feature tensor, use the fully connected layer to perform linear transformation on the fused features, map them to the final output space, and output the final defect assessment results.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.