A method for checking the faults of tower crane bearing components

By constructing a fault inspection model for bearing components of the tower crane, using enhanced coding module, vector block representation module, selection mechanism module and comparison loss function, the problems of high subjectivity and insufficient sensitivity in tower crane bearing fault detection are solved, and efficient, accurate and anti-interference fault detection effects are achieved.

CN119622500BActive Publication Date: 2025-05-30SHANDONG ZHONGCHENG MASCH LEASING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510142253.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-10
Publication Date
2025-05-30
Estimated Expiration
2045-02-10

AI Technical Summary

Technical Problem

The prior art has problems such as high subjectivity, insufficient detection sensitivity, poor noise resistance and complex data processing in tower crane bearing fault detection, making it difficult to achieve efficient, accurate and anti-interference fault detection.

Method used

A fault inspection method for tower crane bearing components is proposed, and a fault inspection model consisting of enhanced encoding module, vector block representation module, selection mechanism module and comparison loss function is constructed. The model enhances data expression ability through enhancement layers and recursive weighting factors, introduces position encoding to capture spatial information, filters key features through self-attention mechanism and feature selection mechanism, and optimizes model performance by comparing loss functions.

Benefits of technology

It improves the accuracy and robustness of fault detection, enhances the processing ability and adaptability of complex data, reduces the dependence of manual feature design, improves fine-grained fault recognition capabilities and generalization capabilities in different environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119622500B_ABST
    Figure CN119622500B_ABST
Patent Text Reader

Abstract

The present invention provides a method for fault inspection of tower crane bearing components, specifically related to the field of fault inspection. The steps of this method include: collecting operation data of tower crane bearing components, preprocessing the collected operation data of bearing components, proposing a fault inspection model for bearing components, and training and testing the fault inspection model for bearing components. The fault inspection model for bearing components consists of an enhanced encoding module, a vector representation module, a selection mechanism module, and a comparison loss function module; the enhanced encoding module adjusts the weights between the features of each input sample through a recursive weighting factor, and converts the data into a high-dimensional vector representation; the vector representation module slices, flattens, and maps the vector to a fixed-dimensional space, and adds position encoding; the selection mechanism module extracts key features through a self-attention mechanism, and screens out the most discriminative parts according to the weights; the comparison loss function module optimizes the model by maximizing the similarity of similar samples and minimizing the similarity of different samples.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of fault inspection, and in particular relates to a method for inspecting the fault of a tower crane bearing component. Background Art

[0002] Tower cranes (tower cranes) are an indispensable and important equipment in modern engineering construction, and one of their core components is bearings. Bearings are mainly used to support the stable operation of the tower crane's slewing mechanism and ensure the normal operation of the tower crane under high load and complex working conditions. Tower crane bearings usually include slewing bearings, transmission bearings, etc., which bear the combined effects of radial, axial and overturning moments. However, due to the superposition of long-term operation, harsh environment and high-load working conditions, bearings are prone to wear, fatigue peeling, lubrication failure, looseness and cracks. If these faults are not detected and handled in time, they may cause equipment shutdown or even cause safety accidents. Therefore, effective monitoring and diagnosis of the status of tower crane bearings is the key to ensuring the safety and reliability of equipment operation.

[0003] Traditional tower crane bearing fault detection methods mainly rely on regular manual inspection, disassembly inspection and visual observation. Although these methods are simple and intuitive, they have many shortcomings. First, manual inspection is highly subjective and it is difficult to detect hidden faults in the early stage; second, disassembly inspection will cause the tower crane equipment to shut down for a long time, reducing construction efficiency; in addition, traditional methods are difficult to implement in harsh environments (such as high temperature, high humidity, dust, etc.) and have certain safety hazards. In recent years, with the rise of vibration analysis, acoustic emission technology and infrared thermal imaging technology, non-contact and real-time monitoring technologies have been gradually applied to bearing status detection, but these methods still have problems such as insufficient detection sensitivity, poor noise resistance and complex data processing. Therefore, developing an efficient, accurate and anti-interference bearing fault inspection method has become a technical problem that needs to be solved in the field of engineering machinery. Summary of the invention

[0004] The main object of the present invention is to provide a method for inspecting faults of tower crane bearing components, aiming to construct a fault inspection model for bearing components. The bearing component fault inspection model consists of an enhanced encoding module, a vector block representation module, a selection mechanism module, and a comparison loss function. Among them, the enhanced encoding module improves the expression ability of the operation data of the bearing components through an enhancement layer, dynamically learns the weights between the features of each input sample during the encoding process, thereby adjusting its attention distribution. The enhanced encoding module finally converts the data points in each sample into a high-dimensional vector representation; the vector representation module divides the vector representation of each sample into several blocks, flattens each block into a vector, and then maps it to a space with a fixed dimension through a mapping function. In addition, position encoding is introduced in this high-dimensional space to capture the spatial information of each element in the input sample, thereby obtaining the final embedding sequence; the selection mechanism module captures the multi-dimensional features of the sample through self-attention mechanisms at different levels, and screens out the most discriminative feature parts from the attention weights of the last layer through a feature selection mechanism; finally, the comparison loss function module effectively optimizes the model performance and improves the accuracy and robustness of fault detection by maximizing the similarity loss between similar samples and minimizing the similarity loss between different samples.

[0005] To achieve the above object, the technical solution of the present invention is: a method for inspecting faults of tower crane bearing components, the method comprising:

[0006] S1. Collect the operation data of the tower crane bearing components. The types of operation data collected include: bearing vibration signals, bearing temperature, bearing ultrasonic signals, bearing speed, and bearing operation status. The collected data is used as a data set for a method for inspecting faults of tower crane bearing components, and the bearing operation status is used as a label;

[0007] S2. Preprocess the collected operation data of the bearing components. Use the mean interpolation method to interpolate the missing values in the collected data, and use the maximum-minimum method to normalize the data;

[0008] S3. Propose a fault inspection model for bearing components. The specific method includes:

[0009] S31. Construct an enhanced encoding module. Use an enhancement layer during the encoding process to improve the expression ability of the operation data of the bearing components, and introduce a recursive weighting factor in the enhancement layer to dynamically adjust the weights between the features of each input sample. Finally, the module converts each data point in each sample into a vector representation;

[0010] S32. Construct a vector block representation module to slice the vector representation of each sample, then flatten each slice into a vector, convert the vector into a fixed-dimensional space through mapping, and introduce positional encoding in the high-dimensional space to obtain an embedding sequence in the high-dimensional space;

[0011] S33. Construct a selection mechanism module, which consists of multiple attention layers. Each attention layer captures different features and introduces a feature selection mechanism. The last layer of the attention layer is used as the input for processing, and the most discriminative part is selected according to the self-attention weights;

[0012] S34. Construct a comparison loss function by maximizing the similarity loss of similar samples and minimizing the similarity loss of different samples;

[0013] S4. Train the bearing component fault inspection model. The inspection model consists of an enhanced encoding module, a vector block representation module, a selection mechanism module, and a comparison loss function, and is trained by setting the hyperparameters in the inspection model;

[0014] S5. Test the bearing component fault inspection model by applying the trained inspection model to the actual test environment to detect its accuracy in the real scenario.

[0015] Further, in step S31, an encoder is used to convert each data point into its embedding representation in the latent space , and this conversion process is implemented using an enhancement layer. The method is as follows:

[0016] For each data point , calculate the corresponding query, key, and value vectors. Among them, the query vector represents the degree of attention of the current input feature to other features, and the mathematical model is:

[0017] ;

[0018] The key vector represents the correlation information of the input feature, and the mathematical model is:

[0019] ;

[0020] The value vector represents the features of the input data itself, and the mathematical model is:

[0021] ;

[0022] In the formula, , , is the weight matrix learned by the encoder, , , are the bias terms;

[0023] Subsequently, the weights of the enhancement layer are calculated, and the similarity between the query vector and the key vector is obtained to get the enhancement layer weight . During the calculation of the similarity, a recursive weighting factor is introduced. The similarity is calculated using the Euclidean distance, and the mathematical model of the Euclidean distance is:

[0024] ;

[0025] By calculating the similarity, a weighting factor is assigned to each data point for weighted summation. The calculation of the weighting factor is adjusted by an exponential weighting function, and the mathematical model is:

[0026] ;

[0027] In the formula, is the exponential operation, is the hyperparameter that controls the weighting sensitivity and determines the magnitude of the weighting;

[0028] The weighted embedding of each data point is recursively calculated, and the current weight is adjusted according to the previous round of weighting results in each round of weighting. The embedding of the data point is initialized . The mathematical model for weighting in each round of calculation is:

[0029] ;

[0030] In the formula, is the hyperparameter that adjusts the influence of historical weighting, is the embedding representation after the t-th round of weighting, is the weighting factor in the t-th round, is the embedding representation in the (t - 1)-th round;

[0031] The calculation of the enhancement layer weights is adjusted by the dynamic recursive weighting factor, and finally the enhancement layer weight is obtained, and the mathematical model is:

[0032] ;

[0033] In the formula, n is the number of sample features, is the transpose operation, is the weight of the final enhancement layer. By introducing a dynamic recursive weighting factor, the enhancement layer weights among the features of each input sample can be dynamically adjusted. Subsequently, the calculated is weighted and summed with the value vector to obtain the final encoder output , is the latent representation of the data point . The mathematical model is:

[0034] ;

[0035] In the formula, is the encoded representation of the input . Subsequently, the latent representation is obtained for each data in each sample, and the latent representation obtained for each corresponding data is \(\left [ {{z}_{1},{z}_{2},....,{z}_{n}} \right ] . Finally, the global latent representation of each sample is obtained. The mathematical model is:

[0036] ;

[0037] In the formula, is the concatenation operation, is the global latent representation of a sample.

[0038] Furthermore, in the step S31, the use of the enhancement layer and the recursive weighting factor aims to enhance the attention ability and flexibility of the bearing component fault inspection model for key features. The enhancement layer dynamically assigns weights to different features, enabling the bearing component fault inspection model to focus on the important parts of the results, thereby improving the processing ability for complex data. The recursive weighting factor automatically adjusts the influence of each feature according to the input content, enhancing the adaptability of the model and reducing the dependence on manual feature design.

[0039] Further, in the step S32, in order to focus on features of different scales, the vector representation is sliced using three different sizes of scales, namely: , , , which are respectively used to capture detail information of different granularities. Subsequently, each block is expanded into a one-dimensional vector through a learnable non-linear projection matrix E, and the expanded one-dimensional vector is mapped to a latent space of a fixed dimension D. The process of non-linear projection is implemented through a convolutional layer. The mathematical model is:

[0040] ;

[0041] Where W is a trainable matrix, is the one-dimensional vector of the expanded vector representation of the sliced ​​blocks, It is the embedded representation after convolution; in order to enable the model to handle the order of elements in the sequence, a positional encoding is added to each vector mapped to the latent space , The mathematical model is:

[0042] {E}_{pos}=\left [ {{e}_{pos,1},{e}_{pos,2},...,{e}_{pos,N}} \right ] ;

[0043] Where N is the number of block vectors divided into, Encode the position of the first block vector, which will be gradually adjusted during the training process to become the optimal position of the first block vector;

[0044] Finally, all vectors mapped to the latent space are added with the corresponding positional encoding to obtain an embedded sequence , which will be used as the input of subsequent modules to embed the sequence The mathematical model is:

[0045] {z}_{0}=\left [ {{x}^{conv}_{1}+{e}_{pos,1},{x}^{conv}_{2}+{e}_{pos,2},...,{x}^{conv}_{N}+{e}_{pos,N}} \right ] ;

[0046] In the formula, The vector and position encoding for each latent space are added together to obtain the final input sequence.

[0047] Furthermore, in step S32, by dividing the vector representation into multiple blocks of different scales and generating an embedded vector for each block vector, the inspection model can accurately capture local fault features, such as tiny cracks and wear, and improve the fine-grained fault identification capability; the introduction of position encoding helps the model understand the spatial relationship between block vectors, enhances the ability to locate the fault area, and improves the generalization capability under different working environments.

[0048] Furthermore, in step S33, the selection mechanism module is composed of multiple attention layers and MLP blocks, which are used to extract features of different degrees. The mathematical model is:

[0049] ;

[0050] ;

[0051] In the formula, is the normalization operation, MSA is the multi-head attention mechanism, MLP is the fully connected operation, L is the total number of attention layers, is the output after passing through the th MSA layer, is the output of the th layer of MLP. Finally, the output of the th layer is used as the input of the feature selection mechanism for processing;

[0052] In the th layer, the input feature representation is denoted as {z}_{L - 1}=\left [ {{z}^{L - 1}_{0};{z}^{L - 1}_{1};...;{z}^{L - 1}_{N}} \right ] , where each is the input of the th layer. Each layer of the attention mechanism layer generates self-attention weights . The weights of each layer reflect the importance of each part in the vector. The mathematical model of is:

[0053] {\alpha}_{l}=\left [ {{\alpha}^{l}_{0},{\alpha}^{l}_{1},...,{\alpha}^{l}_{K}} \right ] ;

[0054] In the formula, K is the top K important weights automatically selected by the feature selection mechanism. Subsequently, the attention weights are integrated. By introducing normalization processing, the attention weights of different layers are weighted and fused, so that the attention of higher layers gets higher weights, and the contribution of the attention information of each layer is compared. The mathematical model of the weight normalization processing is:

[0055] ;

[0056] In the formula, is the result after normalization, is the absolute value operation on . Subsequently, learnable weight coefficients are applied to the weights of different layers to obtain the weighted fusion of the attention information of each layer, and a new hierarchical feature weighting factor is introduced. The mathematical model of is:

[0057] ;

[0058] In the formula, is the introduced hierarchical feature weighting factor, which can be expressed as , is the final attention fusion output; finally, according to select K most discriminative regions according to the maximum attention value in, and the mathematical model is:

[0059] {z}_{local}=\left [ {{z}^{0}_{L - 1},{z}^{{A}_{1}}_{L - 1},{z}^{{A}_{2}}_{L - 1},...,{z}^{{A}_{K}}_{L - 1}} \right ] ;

[0060] In the formula, is the feature representation of the region in the output of the (L - 1)-th layer.

[0061] Furthermore, in the step S33, the selection mechanism module can accurately select the key region features affecting the fault determination, rather than relying on all the information of the entire bearing, thereby improving the sensitivity and discriminability of the model to faults; for the improvement of the attention selection mechanism module, a hierarchical feature weighting factor is introduced, making the model pay more attention to capturing subtle differences in low-level features. For the attention selection mechanism weighting mechanism, the model can better capture the fusion of multi-level information, thereby enhancing the robustness and accuracy of fault detection.

[0062] Further, in the step S34, in the comparison loss function, a weighted similarity is introduced in the part of maximizing the similarity of similar samples, and an adaptive negative sample selection is introduced in the part of minimizing the similarity of different samples. The mathematical model of the comparison loss function is:

[0063] {L}_{con}=\frac {1} {{B}^{2}}\sum _{p} \left [ {\sum _{q:{y}_{p}={y}_{q}} {{w}_{pq}}\cdot \left ( {1 - Sim\left ( {{z}_{p},{z}_{q}} \right )} \right )+\sum _{q:{y}_{p}≠{y}_{q}} {max(Sim({z}_{p},{z}_{q})-\alpha,0)\cdot {w}^{neg}_{pq}}} \right ] ;

[0064] In the formula, B is the size of a batch, , are the true labels of sample p and sample q respectively, and are the feature representations of sample p and sample q respectively, is a multi-scale similarity metric that assigns different weights to the feature representations and at different levels and the similarity calculations at each level, and performs a weighted sum, and its mathematical model is:

[0065] ;

[0066] is the introduced weighted similarity, which applies a greater weight to samples with greater classification difficulty, and its mathematical model is:

[0067] ;

[0068] In the formula, is the operation of calculating the Euclidean distance;

[0069] is the introduced adaptive negative sample selection. The similarity of negative samples dynamically selects the weight of the contrast loss according to the similarity with the current sample. If the similarity between two samples is high, a greater weight is given, and for samples with lower similarity, a smaller loss is imposed. and its mathematical model is:

[0070] .

[0071] Furthermore, in step S34, the comparison loss function significantly improves the discriminative ability of the model by minimizing the similarity of samples of the same class and maximizing the similarity of samples of different classes. The introduced weighted similarity dynamically adjusts its contribution to loss calculation according to the relationship and difficulty between samples, enabling the model to pay more attention to samples with greater challenges, avoiding over-optimizing easily distinguishable samples, and enhancing the sensitivity to difficult samples; the adaptive negative sample selection dynamically selects negative samples according to the similarity of samples and assigns higher weights to difficult negative samples, thereby strengthening the model's learning ability for minor class differences and avoiding wasting training resources on easily distinguishable negative samples.

[0072] In summary, due to the adoption of the above technical solutions, the beneficial effects of the present invention are:

[0073] In the present invention, a bearing component fault inspection model is proposed. The bearing component fault inspection model is composed of an enhanced encoding module, a vector block representation module, a selection mechanism module, and a comparison loss function. Among them, the enhanced encoding module improves the expression ability of the operation data of the bearing component through an enhancement layer, dynamically learns the weights between the features of each input sample during the encoding process, so as to adjust its attention distribution. The enhanced encoding module finally converts the data points in each sample into a high-dimensional vector representation; the vector representation module divides the vector representation of each sample into several blocks, flattens each block into a vector, and then maps it to a space with a fixed dimension through a mapping function. In addition, position encoding is introduced in this high-dimensional space to capture the spatial information of each element in the input sample, so as to obtain the final embedding sequence; the selection mechanism module captures the multi-dimensional features of the sample through self-attention mechanisms at different levels, and screens out the most discriminative feature parts from the attention weights of the last layer through a feature selection mechanism; finally, the comparison loss function module effectively optimizes the model performance and improves the accuracy and robustness of fault detection by maximizing the similarity loss between similar samples and minimizing the similarity loss between different samples. BRIEF DESCRIPTION OF THE DRAWINGS

[0074] Figure 1 It is a flowchart of the steps of a method for inspecting the faults of tower crane bearing components.

[0075] Figure 2 It is a flowchart of the steps of the bearing component fault inspection model.

[0076] Figure 3 It is a structural diagram of the vector block representation module in the bearing component fault inspection model.

[0077] Figure 4 It is a structural diagram of the selection mechanism module in the bearing component fault inspection model.

[0078] Figure 5 It is a comparison diagram of the accuracy and true value of the bearing component fault inspection model. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0079] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments; based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without making creative efforts belong to the scope of protection of the present invention.

[0080] Please refer to Figures 1 - 5, the present invention provides a technical solution: a method for inspecting faults of tower crane bearing components, and the steps of the method include: collecting operation data of tower crane bearing components, preprocessing the collected operation data of bearing components, proposing a fault inspection model for bearing components, training the fault inspection model for bearing components, and testing the fault inspection model for bearing components.

[0081] Please refer to Figure 1 As shown, a method for inspecting faults of tower crane bearing components in an embodiment of the present application is as follows:

[0082] S1. Collect operation data of tower crane bearing components. The types of collected operation data include: bearing vibration signals, bearing temperature, bearing ultrasonic signals, bearing speed, and bearing operation status. The collected data is used as a dataset for a method for inspecting faults of tower crane bearing components, and the bearing operation status is used as a label.

[0083] Furthermore, in step S1, various sensors are fixed at key parts of the bearing housing. A vibration sensor is used to collect bearing vibration signal information, a temperature sensor monitors bearing temperature information, an acoustic sensor captures ultrasonic signals, an optoelectronic speed sensor collects bearing speed, and the operation status of the bearing is marked for the dataset by means of manual observation. Finally, the collected data is transmitted to the cloud through a Wi-Fi module.

[0084] S2. Preprocess the collected operation data of bearing components. The mean method is used to interpolate missing values in the data, and the maximum-minimum method is used to normalize the data.

[0085] Furthermore, in step S2, the mean interpolation method uses the average of all known values in the feature where the missing value is located to replace the missing value. The formula for the mean interpolation method is as follows:

[0086] ;

[0087] In the formula, is the mean of the column where the missing value is located, n is the number of valid data, is the sum-th data point;

[0088] The maximum-minimum method scales each column of bearing data to between [0, 1]. The scaling formula is:

[0089] ;

[0090] In the formula, is the data to be normalized, is the minimum value in the data of the column where the data is located, is the maximum value in the data of the column where the data is located, For the normalized value.

[0091] S3. Propose a bearing component fault inspection model, as Figure 2 shown, the specific method includes: constructing an enhanced encoding module, constructing a vector block representation module, constructing a selection mechanism module, and constructing a comparison loss function.

[0092] S31. Propose an enhanced encoding module, introduce an attention mechanism during the encoding process to enhance the expression ability of the module, and introduce a dynamic learning weight factor in the attention mechanism to dynamically adjust the attention weights between the features of each input sample. Finally, the module converts each data point in each sample into a vector representation.

[0093] Furthermore, in step S31, use an encoder to convert each data point into an embedding representation in its latent space , and this conversion process is implemented using an enhancement layer. The method is as follows:

[0094] For each data point , calculate the corresponding query, key, and value vectors. Among them, the query vector represents the degree of attention of the current input feature to other features, and the mathematical model is:

[0095] ;

[0096] The key vector represents the correlation information of the input feature, and the mathematical model is:

[0097] ;

[0098] The value vector represents the features of the input data itself, and the mathematical model is:

[0099] ;

[0100] In the formula, , , are weight matrices learned by the encoder, , , are bias terms;

[0101] Subsequently, calculate the weights of the enhancement layer, calculate the similarity between the query vector and the key vector to obtain the enhancement layer weights , a recursive weighting factor is introduced during the calculation of similarity , the similarity is calculated using the Euclidean distance, and the mathematical model of the Euclidean distance is:

[0102] ;

[0103] By calculating the similarity, a weighting factor is assigned to each data point for weighted summation. The calculation of the weighting factor is adjusted by an exponential weighting function, and the mathematical model is:

[0104] ;

[0105] In the formula, is the exponential operation, is a hyperparameter that controls the weighting sensitivity and determines the amplitude of weighting;

[0106] The weighted embedding of each data point is recursively calculated. In each round of weighting process, the current weight is adjusted according to the previous round of weighting result, and the embedding of the data point is initialized , and the mathematical model for weighting in each round of calculation is:

[0107] ;

[0108] In the formula, is a hyperparameter that adjusts the influence of historical weighting, is the embedding representation after the t-th round of weighting, is the weighting factor in the t-th round, is the embedding representation in the (t - 1)-th round;

[0109] The calculation of the enhanced layer weight is adjusted by the dynamic recursive weighting factor, and finally the enhanced layer weight , The mathematical model is:

[0110] ;

[0111] In the formula, n is the number of sample features, is the transpose operation of, is the final enhanced layer weight. By introducing the dynamic recursive weighting factor, the enhanced layer weight between the features of each input sample can be dynamically adjusted; subsequently, the calculated is weighted and summed with the value vector to obtain the final encoder output , is the latent representation of the data point , The mathematical model is:

[0112] ;

[0113] In the formula, is the encoded representation of the input Subsequently, a latent representation is obtained for each data in each sample, and the latent representation obtained for each corresponding data is \(\left [ {{z}_{1},{z}_{2},....,{z}_{n}} \right ] , and finally the global latent representation of each sample is obtained. The mathematical model is:

[0114] ;

[0115] In the formula, is the concatenation operation, is the global latent representation of a sample, , d is the size of the data embedding, The specific size of is

[0116] S32. Construct a vector block representation module, cut the vector representation of each sample into blocks, then flatten each block into a vector, and convert the vector into a fixed-dimensional space through a mapping, and introduce a positional encoding in the high-dimensional space to obtain an embedding sequence in the high-dimensional space.

[0117] Furthermore, in step S32, in order to focus on features at different scales, the vector representation is cut into blocks using three different scales, which are: , , , which are respectively used to capture detailed information at different granularities. The structure diagram is as shown in Figure 3 . Subsequently, each block is expanded into a one-dimensional vector through a learnable non-linear projection matrix E. The expanded one-dimensional vector is mapped to a latent space with a fixed dimension D. The process of non-linear projection is implemented through a convolutional layer. The mathematical model is:

[0118] ;

[0119] In the formula, W is a trainable matrix, is the one-dimensional vector obtained by expanding the vector representation of the cut block, is the embedded representation after convolution; in order to enable the model to have the ability to process the order of elements in the sequence, a positional encoding is added to each vector mapped to the latent space. The mathematical model of

[0120] {E}_{pos}=\left [ {{e}_{pos,1},{e}_{pos,2},...,{e}_{pos,N}} \right ] ;

[0121] Where N is the number of block vectors divided, is the position encoding of the first block vector, which will be gradually adjusted during training to become the optimal position of the first block vector;

[0122] Finally, add the corresponding position encoding to all the vectors mapped to the latent space to obtain an embedding sequence , which will be used as the input of the subsequent module. The mathematical model of the embedding sequence is:

[0123] {z}_{0}=\left [ {{x}^{conv}_{1}+{e}_{pos,1},{x}^{conv}_{2}+{e}_{pos,2},...,{x}^{conv}_{N}+{e}_{pos,N}} \right ] ;

[0124] Where is the sum of the vector and the position encoding in each latent space to obtain the final input sequence.

[0125] S33. Construct a selection mechanism module, which consists of multiple attention layers. Each attention layer captures different features. A feature selection mechanism is introduced in the module. The last layer of the attention layer is used as the input for processing, and the most discriminative part is selected according to the self-attention weights.

[0126] Furthermore, in step S33, the selection mechanism module consists of multiple attention layers and MLP blocks for extracting features at different levels. The mathematical model is:

[0127] ;

[0128] ;

[0129] Where is the normalization operation, MSA is the multi-head attention mechanism, MLP is the fully connected operation, L is the total number of attention layers, is the output after passing through the th layer of the MSA layer, is the output of the MLP th layer. Finally, the output of the th layer is used as the input of the feature selection mechanism for processing;

[0130] In the layer, the structural diagram is as Figure 4 shown, and the input feature representation is denoted as \(\mathbf{z}_{L - 1} = \left[ {z^{L - 1}_0; z^{L - 1}_1;...; z^{L - 1}_N} \right]\) , where each is the input of the layer. The self - attention weight \(\alpha_{l}\) will be generated by the attention mechanism layer of each layer. The weight of each layer reflects the importance of each part in the vector. , and the mathematical model is:

[0131] \(\alpha_{l}=\left[ {\alpha^{l}_0,\alpha^{l}_1,...,\alpha^{l}_K} \right]\) ;

[0132] In the formula, \(K\) is the top \(K\) important weights automatically selected by the feature selection mechanism. Subsequently, the attention weights are integrated. By introducing normalization processing, the attention weights of different layers are weighted and fused, so that the attention of higher layers gets higher weights, and the contribution of the attention information of each layer is compared. The mathematical model of weight normalization is:

[0133] ;

[0134] In the formula, is the result after normalization, is the absolute value operation on . Subsequently, the learnable weight coefficients are applied to the weights of different layers to obtain the weighted fusion of the attention information of each layer, and a new hierarchical feature weighting factor is introduced. The mathematical model of

[0135] is:

[0136] In the formula, is the introduced hierarchical feature weighting factor, which can be expressed as , is the final attention fusion output. Finally, according to , \(K\) most discriminative regions are selected based on the largest attention values. The mathematical model is:

[0137] ​{z}_{local}=\left [ {{z}^{0}_{L-1},{z}^{{A}_{1}}_{L-1},{z}^{{A}_{2}}_{L-1},...,{z}^{{A}_{K}}_{L-1}} \right ] ;

[0138] In the formula, is the feature representation of the area in the output of the (L−1)-th layer.

[0139] S34. Construct a comparison loss function by maximizing the similarity loss of similar samples and minimizing the similarity loss of different samples to construct the comparison loss function.

[0140] Furthermore, in step S34, in the comparison loss function, weighted similarity is introduced in the part of maximizing the similarity loss of similar samples, and adaptive negative sample selection is introduced in the part of minimizing the similarity loss of different samples. The mathematical model of the comparison loss function is:

[0141] {L}_{con}=\frac {1} {{B}^{2}}\sum _{p} \left [ {\sum _{q:{y}_{p}={y}_{q}} {{w}_{pq}}\cdot \left ( {1-Sim\left ( {{z}_{p},{z}_{q}} \right )} \right )+\sum _{q:{y}_{p}≠{y}_{q}} {max(Sim({z}_{p},{z}_{q})-\alpha,0)\cdot {w}^{neg}_{pq}}} \right ] ;

[0142] In the formula, B is the size of a batch, with a value of 128, , are the true labels of sample p and sample q respectively, , are the feature representations of sample p and sample q respectively, is a multi-scale similarity metric that , assigns different weights to the similarity calculations of different-level feature representations and performs weighted summation, The mathematical model of

[0143] ;

[0144] For the introduced weighted similarity, a greater weight is imposed on samples with greater classification difficulty. The mathematical model of

[0145] ;

[0146] In the formula, is the operation for calculating the Euclidean distance;

[0147] For the introduced adaptive negative sample selection, the similarity of negative samples dynamically selects the weight of the contrast loss according to the similarity with the current sample. For two samples with a higher similarity, a greater weight is given, and for samples with a lower similarity, a smaller loss is imposed. The mathematical model of

[0148] .

[0149] S4. Train the bearing component fault inspection model. The inspection model consists of an enhanced encoding module, a vector block representation module, a selection mechanism module, and a comparison loss function, and is trained by setting hyperparameters in the inspection model.

[0150] Furthermore, in the step S4, the bearing component fault inspection model is developed using the Python language, and the machine learning framework used is PyTorch. During the training process, the size B of the batch entering the model is 128, the learning rate is 0.0001, the optimizer used is the Adam optimizer, the number of iterations for model training is 1000 times, and the final output of the model is the classification of the bearing component fault.

[0151] S5. Test the bearing component fault inspection model, and apply the trained inspection model to the actual test environment for testing to detect its accuracy in the real scenario.

[0152] Furthermore, in the step S5, as Figure 5 shown, the figure shows the comparison between the accuracy of the inspection model described in this application and the true value. In addition, the accuracy of two other models is also compared. It can be seen from Figure 5 that the accuracy of the model proposed in this application is closer to the true value and can meet the inspection accuracy in the actual environment.

[0153] The above is only the preferred implementation manner of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the inventive concept of the present invention, several deformations and improvements can still be made, and these all belong to the protection scope of the present invention.

Claims

1. A tower crane bearing component fault inspection method, characterized in that: The following steps are involved: S1. Collect the operation data of the tower crane bearing components, including: bearing vibration signal, temperature, ultrasonic signal, speed and operation status, and integrate the collected data into a data set for tower crane bearing component fault detection, in which the operation status of the bearing is used as the target label; S2. Preprocess the collected operating data of the bearing components, use the mean interpolation method to fill the missing values ​​in the collected data, and use the maximum-minimum normalization method to standardize the data to ensure the scale consistency of the data; S3. A bearing component fault inspection model is proposed. The specific method includes: S31, constructing an enhanced coding module, using an enhanced layer in the coding process to improve the expression ability of the bearing component operation data, the module adopts a recursive weighting factor to adaptively adjust the weight distribution of features between each input sample, and finally converts multiple data points of each sample into a high-dimensional vector representation; Use the encoder to transform each data point x i Transformed into its latent space embedding representation z i , the multiple data points of each sample are converted into a high-dimensional vector representation using an enhancement layer, the method is: For each data point x i , calculate the corresponding query, key and value vectors, where the query vector q i is the degree of attention paid by the current input feature to other features, q i The mathematical model is: q i =W q ·x i +b q ; Key vector k i is the correlation information of the input features, k i The mathematical model is: k i =W k ·x i +b k ; Value vector v i is the characteristic of the input data itself, v i The mathematical model is: v i =W v ·x i +b v ; Where W q , W k , W v is the weight matrix learned by the encoder, b q 、b k 、b v is the bias term; Then the enhancement layer weights are calculated to calculate the query vector q i and key vector k j The similarity between them is used to obtain the enhancement layer weight α ij , a recursive weighting factor c is introduced in the process of calculating similarity t , the similarity is calculated using Euclidean distance, and the mathematical model of Euclidean distance is: By calculating the similarity, a weighting factor is assigned to each data point for weighted summation. The calculation of the weighting factor is adjusted by an exponential weighting function. The mathematical model is: w i =exp(-β·d(q i ,k j )); In the formula, exp(·) is an exponential operation, β is a hyperparameter that controls the weighted sensitivity and determines the magnitude of the weighting; The weighted embedding of each data point is recursively calculated. Each round of weighting process adjusts the current weight according to the weighted result of the previous round, and initializes the embedding c of the data point i =q i , the mathematical model for weighting in each round of calculation is: Where γ is a hyperparameter for adjusting the weighted influence of history, is the weighted embedding representation of the tth round, is the weighting factor of the tth round, is the embedding representation of round t-1; The calculation of the enhancement layer weight is adjusted by the dynamic recursive weighting factor, and finally the enhancement layer weight α is obtained ij , α ij The mathematical model is: In the formula, n is the number of sample features, for q i The transpose operation, α ij is the final enhancement layer weight. By introducing a dynamic recursive weighting factor, the enhancement layer weight between the features of each input sample can be dynamically adjusted. Then, the calculated α is used ij With the value vector v j Perform weighted summation to obtain the final encoder output z i , z i For data point x i The potential representation of z i The mathematical model is: In the formula, z i For input x i The encoding representation is then used to represent each data in each sample. The corresponding potential representation of each data is [z1,z2,....,z n ], and finally obtain the global potential representation of each sample. The mathematical model is: Z=Concat(z1,z2,..,z n ); Where Concat(·) is the concatenation operation, and Z is the global potential representation of a sample; S32, construct a vector block representation module, slice the high-dimensional vector representation of each sample and flatten each block into a one-dimensional vector, transform the flattened vector into a high-dimensional space of a fixed dimension through a mapping method, and introduce position encoding to obtain an embedded sequence representation; S33, constructing a selection mechanism module, the module is composed of multiple attention layers, each layer of attention mechanism is responsible for extracting different feature information, and combining with the feature selection mechanism, using the self-attention weight of each attention layer to select the most discriminative feature part; S34. Construct a comparative loss function to optimize the classification performance of the model by maximizing the loss of similarity between samples of the same type and minimizing the loss of similarity between samples of different types; S4, perform model training, use appropriate training strategies to adjust the hyperparameters in the model, and train to obtain the final bearing component fault inspection model through iterative optimization; S5. Apply the trained model to the actual test environment to perform fault detection tasks to verify its detection accuracy and effect in real application scenarios.

2. A tower crane bearing component fault inspection method according to claim 1, characterized in that: In step S1, various sensors are fixed to key positions of the bearing housing, a vibration sensor is used to collect bearing vibration signal information, a temperature sensor is used to monitor bearing temperature information, an acoustic sensor is used to capture ultrasonic signals, and a photoelectric speed sensor is used to collect bearing speed. The operating status of the bearing is marked by human observation, and the collected data is finally transmitted to the cloud via a Wi-Fi module.

3. A tower crane bearing component fault inspection method according to claim 2, characterized in that: In step S32, in order to focus on features of different scales, the vector representation is sliced ​​into blocks using three different scales: P1×P1, P2×P2, and P3×P3, which are used to capture detailed information of different granularities. Each block is then expanded into a one-dimensional vector through a learnable nonlinear projection matrix E. The expanded one-dimensional vector x p Mapped to a latent space of fixed dimension D, the nonlinear projection process is implemented through a convolutional layer, and the mathematical model is: Where W is a trainable matrix, x p is the one-dimensional vector of the expanded vector representation of the sliced ​​blocks, is the embedded representation after convolution; in order to enable the model to handle the order of elements in the sequence, a positional encoding E is added to each vector mapped to the latent space pos , E pos The mathematical model is: AND pos =[and pos,1 ,And pos,2 ,…,And pos,N ]; Where N is the number of block vectors, e pos,1 Encode the position of the first block vector, which will be gradually adjusted during the training process to become the optimal position of the first block vector; Finally, all vectors mapped to the latent space are added with the corresponding positional encoding to obtain an embedded sequence z0, which will be used as the input of the subsequent module. The mathematical model of the embedded sequence z0 is: Where z0 is the sum of the vector and position encoding of each latent space to obtain the final input sequence.

4. A tower crane bearing component fault inspection method according to claim 3, characterized in that: In step S33, the selection mechanism module is composed of multiple attention layers and MLP blocks, which are used to extract features of different degrees. The mathematical model is: z′ l =MSA(LN(z l-1 ))+z l-1 l∈1,2,...,L; With l =MLP(LN(z′ l ))+z′ l l∈1,2,...,L; Where LN(·) is the normalization operation, MSA is the multi-head attention mechanism, MLP is the fully connected operation, L is the total number of attention layers, z′ l For z l-1 After the output of the lth MSA layer, z l-1 is the output of the lth layer of the MLP, and finally the output of the L-1th layer is processed as the input of the feature selection mechanism; In the Lth layer, the input feature representation is denoted as Among them, each As the input of the L-1 layer, each attention mechanism layer generates a self-attention weight α l , the weight of each layer reflects the importance of each part in the vector, α l The mathematical model is: In the formula, K is the first K important weights automatically selected by the feature selection mechanism; then the attention weights are integrated, and the attention weights of different layers are weighted and fused by introducing standardization processing, so that the attention of higher layers gets higher weights, and the attention information contribution of each layer is compared. The mathematical model of weight standardization processing is: In the formula, α′ l is the result after standardization, ||α l ||2 is for α l Perform an absolute value operation; then apply the learnable weight coefficients to the weights of different layers to obtain the weighted fusion of the attention information of each layer, and introduce a new hierarchical feature weighting factor, α final The mathematical model is: In the formula, β l is the introduced hierarchical feature weighting factor, which can be expressed as α final is the final attention fusion output; finally, according to α final The largest attention value selects the K most discriminative regions, and the mathematical model is: In the formula, It is the feature representation of the A1 region in the L-1th layer output.

5. A tower crane bearing component fault inspection method according to claim 4, characterized in that: In step S34, in the comparison loss function, weighted similarity is introduced into the loss part of maximizing the similarity of samples of the same class, and adaptive negative sample selection is introduced into the loss part of minimizing the similarity of samples of different classes. The mathematical model of the comparison loss function is: In the formula, B is the size of a batch, y p ,y q are the true labels of samples p and q, respectively, p 、z q are the feature representations of sample p and sample q respectively, Sim(z p , z q ) is a multi-scale similarity measure, which represents the features at different levels The similarity calculation with each layer is assigned different weights λ l Perform weighted summation, Sim(z p , z q )The mathematical model is: w pq The weighted similarity introduced here gives greater weight to samples with greater classification difficulty, w pq The mathematical model is: Where dist(·) is the operation for calculating the Euclidean distance; The adaptive negative sample selection introduced by the algorithm dynamically selects the weight of the contrast loss based on the similarity between the negative sample and the current sample. The higher the similarity between the two samples, the greater the weight is given, and the lower the similarity, the smaller the loss is applied. The mathematical model is: