Tower crane bearing component fault inspection method
By building a fault inspection model composed of enhanced encoding module, vector block representation module, selection mechanism module and comparison loss function, the problems of high subjectivity, insufficient detection sensitivity, poor noise resistance and complex data processing in the tower crane bearing fault detection method are solved, efficient and accurate fault detection is achieved, and the sensitivity and robustness of detection are improved.
Patent Information
- Application Number
- CN202510142253.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-10
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2045-02-10
AI Technical Summary
The existing tower crane bearing fault detection methods have problems such as high subjectivity, insufficient detection sensitivity, poor noise resistance and complex data processing. It is difficult to detect hidden faults in the early stage and achieve efficient and accurate fault detection in harsh environments.
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 the data expression ability through enhancement layers and recursive weighting factors. The vector block representation module captures features of different scales. The selection mechanism module filters key features through the self-attention mechanism, compares the loss function to optimize the model performance, and improves the accuracy and robustness of fault detection.
It realizes efficient and accurate tower crane bearing fault detection, can detect hidden faults in the early stage, and maintain high detection accuracy and anti-interference ability in harsh environments, improving the sensitivity and robustness of fault detection.
Smart Images

Figure CN119622500A_ABST
Abstract
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 purpose of the present invention is to provide a tower crane bearing component fault inspection method, which aims to construct a bearing component fault inspection model. The bearing component fault inspection model consists of an enhanced coding module, a vector block representation module, a selection mechanism module and a comparison loss function, wherein the enhanced coding module improves the expression ability of the bearing component operation data through an enhancement layer, dynamically learns the weights between each input sample feature during the encoding process, thereby adjusting its attention allocation, and the enhanced coding 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, and after flattening each block into a vector, 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 a final embedded sequence; the selection mechanism module captures the multidimensional features of the sample through different levels of self-attention mechanisms, and selects the most discriminative feature part from the attention weight 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 samples of the same type and minimizing the similarity loss between samples of different types.
[0005] To achieve the above object, the technical solution of the present invention is: a tower crane bearing component fault inspection method, the method comprising: S1. Collecting the operation data of tower crane bearing components. The collected operation data types include: bearing vibration signal, bearing temperature, bearing ultrasonic signal, bearing speed, and bearing operation status. The collected data is used as a data set for a tower crane bearing component fault inspection method, and the bearing operation status is used as a label. S2. Preprocessing the collected operation data of the bearing components, interpolating the missing values in the collected data using the mean interpolation method, and normalizing the data using the maximum-minimum method; S3. A bearing component fault inspection model is proposed. The specific method includes: S31, constructing an enhanced coding module, using an enhanced layer to improve the expression ability of the bearing component operation data during the coding process, and introducing a recursive weighting factor in the enhanced layer to dynamically adjust the weights between the features of each input sample, and finally the module converts each data point in each sample into a vector representation; S32, construct a vector block representation module, slice the vector representation of each sample, then flatten each block into a vector, and transform the vector into a fixed-dimensional space through mapping, and introduce position encoding in the high-dimensional space to obtain an embedded sequence in the high-dimensional space; S33, constructing a selection mechanism module, the module consisting of multiple attention layers, each of which captures different features, and introducing a feature selection mechanism, processing the last layer of the attention layer as input, and selecting the most discriminative part according to the self-attention weight; S34, constructing a comparison loss function, by maximizing the loss of similarity of samples of the same class and minimizing the loss of similarity of samples of different classes; S4, training a bearing component fault inspection model, wherein the inspection model is composed of an enhanced encoding module, a vector block representation module, a selection mechanism module, and a comparison loss function, and training is performed by setting hyperparameters in the inspection model; 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.
[0006] Furthermore, in step S31, an encoder is used to convert each data point Transformed into its latent space embedding representation , the conversion process is implemented using an enhancement layer, the method is: For each data point , calculate the corresponding query, key, and value vectors, where the query vector is the degree of attention paid by the current input feature to other features, The mathematical model is: ; Key Vector is the correlation information of the input features, The mathematical model is: ; Value vector is the characteristic of the input data itself, The mathematical model is: ; In the formula, , , is the weight matrix learned by the encoder, , , is the bias term; Then the weight of the enhancement layer is calculated to calculate the query vector and key vector The similarity between them is used to obtain the enhancement layer weight , introducing a recursive weighting factor in the process of calculating similarity , 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: ; In the formula, is the exponential operation, 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 to initialize the embedding of the data point. , the mathematical model for weighting in each round of calculation is: ; In the formula, To tune the hyperparameters of the history weighted influence, 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 , The mathematical model is: ; In the formula, n is the number of sample features, for The transpose operation of The final enhancement layer weight is obtained by introducing a dynamic recursive weighting factor, so that the enhancement layer weights between the features of each input sample can be dynamically adjusted. With value vector Perform weighted summation to obtain the final encoder output , For data points The potential representation of The mathematical model is: ; In the formula, For input The encoding representation is then used to represent each data in each sample. The corresponding potential representation of each data is \left [ {{z}_{1},{z}_{2},....,{z}_{n}} \right ] , and finally the global potential representation of each sample is obtained. The mathematical model is: ; In the formula, For splicing operation, is the global potential representation of a sample.
[0007] Furthermore, in step S31, the use of enhancement layers and recursive weighting factors is intended to enhance the bearing component fault inspection model's ability to focus on key features and flexibility; the enhancement layer dynamically assigns weights to different features, so that the bearing component fault inspection model can focus on important parts of the results, thereby improving the ability to process complex data; and the recursive weighting factor automatically adjusts the influence of each feature according to the input content, thereby enhancing the adaptability of the model and reducing reliance on artificial feature design.
[0008] Furthermore, in step S32, in order to focus on features of different scales, three scales of different sizes are used to slice the vector representation, namely: , , , which are used to capture detailed information of different granularities, and then each block is expanded into a one-dimensional vector through a learnable nonlinear projection matrix E. The expanded one-dimensional vector 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, 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: {E}_{pos}=\left [ {{e}_{pos,1},{e}_{pos,2},...,{e}_{pos,N}} \right ] ; 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; 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: {z}_{0}=\left [ {{x}^{conv}_{1}+{e}_{pos,1},{x}^{conv}_{2}+{e}_{pos,2},...,{x}^{conv}_{N}+{e}_{pos,N}} \right ] ; In the formula, The vector and position encoding for each latent space are added together to obtain the final input sequence.
[0009] 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.
[0010] 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: ; ; 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, for After The output of the MSA layer, For MLP The output of the layer will eventually be The output of the layer is processed as the input of the feature selection mechanism; In the In the layer, the input feature representation is recorded as {z}_{L-1}=\left [ {{z}^{L-1}_{0};{z}^{L-1}_{1};...;{z}^{L-1}_{N}} \right ] , where each For the The input of the layer, each layer of the attention mechanism layer will generate self-attention weights , the weight of each layer reflects the importance of each part in the vector, The mathematical model is: {\alpha}_{l}=\left [ {{\alpha}^{l}_{0},{\alpha}^{l}_{1},...,{\alpha}^{l}_{K}} \right ] ; 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, is the result after standardization, For 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. The mathematical model is: ; In the formula, is the introduced hierarchical feature weighting factor, which can be expressed as , is the final attention fusion output; finally, according to The largest attention value selects the K most discriminative regions, and the mathematical model is: {z}_{local}=\left [ {{z}^{0}_{L-1},{z}^{{A}_{1}}_{L-1},{z}^{{A}_{2}}_{L-1},...,{z}^{{A}_{K}}_{L-1}} \right ] ; In the formula, is the L-1th layer output Feature representation of the region.
[0011] Furthermore, in step S33, the selection mechanism module can accurately select key area features that affect fault judgment, rather than relying on all the information of the entire bearing, thereby improving the model's sensitivity and discrimination to faults; the improvement of the attention selection mechanism module introduces a hierarchical feature weighting factor, so that the model pays 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 multiple layers of information, thereby enhancing the robustness and accuracy of fault detection.
[0012] Furthermore, 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: {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 ] ; In the formula, B is the size of a batch, , are the true labels of sample p and sample q respectively, , are the feature representations of sample p and sample q respectively, It is a multi-scale similarity measure, which represents features at different levels , Assign different weights to the similarity calculation for each layer Perform weighted summation, The mathematical model is: ; The weighted similarity introduced here gives greater weight to samples that are more difficult to classify. The mathematical model is: ; In the formula, To calculate the Euclidean distance operation; 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: .
[0013] Furthermore, in step S34, the comparison loss function significantly improves the model's discrimination ability by minimizing the similarity of samples of the same type and maximizing the similarity of samples of different types. The weighted similarity is introduced to dynamically adjust its contribution to the loss calculation according to the relationship and difficulty between samples, so that the model pays more attention to samples with greater challenges, avoids over-optimization of easily distinguishable samples, and improves sensitivity to difficult samples; the adaptive negative sample selection dynamically selects negative samples according to the similarity of the samples, and assigns higher weights to difficult negative samples, thereby enhancing the model's ability to learn small category differences and avoiding wasting training resources on easily distinguishable negative samples.
[0014] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are: In the present invention, a bearing component fault inspection model is proposed, and the bearing component fault inspection model consists of an enhanced coding module, a vector block representation module, a selection mechanism module and a comparison loss function, wherein the enhanced coding module improves the expression ability of the bearing component operation data through an enhancement layer, and dynamically learns the weights between the features of each input sample during the encoding process, thereby adjusting its attention allocation, and the enhanced coding 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, and after flattening each block into a vector, maps it to a space with a fixed dimension through a mapping function, and in addition, introduces position encoding in this high-dimensional space to capture the spatial information of each element in the input sample, thereby obtaining the final embedded sequence; the selection mechanism module captures the multi-dimensional features of the sample through different levels of self-attention mechanisms, and selects 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 samples of the same type and minimizing the similarity loss between samples of different types. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 The present invention is a flowchart of the steps of a tower crane bearing component fault inspection method.
[0016] Figure 2 Flowchart of the steps in checking the model for bearing component faults.
[0017] Figure 3 A block diagram showing the structure of the vector block representation module in the bearing component fault inspection model.
[0018] Figure 4 Diagram of the structure of the selected mechanism module in the bearing component fault detection model.
[0019] Figure 5A plot of the accuracy of the model compared with the true value for a bearing component fault check. DETAILED DESCRIPTION
[0020] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0021] See also Figure 1-Figure 5 The present invention provides a technical solution: a tower crane bearing component fault inspection method, the method steps comprising: collecting tower crane bearing component operation data, preprocessing the collected bearing component operation data, proposing a bearing component fault inspection model, training the bearing component fault inspection model and testing the bearing component fault inspection model.
[0022] Please refer to Figure 1 As shown, a tower crane bearing component fault inspection method in an embodiment of the present application comprises the following specific steps:
[0023] S1. Collect the operation data of tower crane bearing components. The collected operation data types include: bearing vibration signal, bearing temperature, bearing ultrasonic signal, bearing speed, and bearing operation status. The collected data is used as a data set for a tower crane bearing component fault inspection method, and the bearing operation status is used as a label.
[0024] Furthermore, in step S1, various sensors are fixed to key positions of the bearing housing, vibration sensors are used to collect bearing vibration signal information, temperature sensors monitor bearing temperature information, acoustic sensors capture ultrasonic signals, photoelectric speed sensors collect bearing speed, and the operating status of the bearing is marked by manual observation of the data set, and finally the collected data is transmitted to the cloud via a Wi-Fi module.
[0025] S2. Preprocess the collected operating data of the bearing components, use the mean method to interpolate the missing values in the data, and use the maximum-minimum method to normalize the data.
[0026] Furthermore, in step S2, the mean interpolation method replaces the missing value with the average value of all known values in the feature where the missing value is located. The formula of the mean interpolation method is as follows: ; 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; The maximum-minimization method is to scale each column of the bearing data to between [0,1], and the scaling formula is: ; In the formula, is the data to be normalized, For data The minimum value in the column data. For data The maximum value in the column data. For The normalized value.
[0027] S3. Propose a bearing component fault inspection model, such as Figure 2 As 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.
[0028] S31. An enhanced coding module is proposed. An attention mechanism is introduced in the encoding process to enhance the expressiveness of the module. A dynamic learning weight factor is introduced 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.
[0029] Furthermore, in step S31, an encoder is used to convert each data point Transformed into its latent space embedding representation , the conversion process is implemented using an enhancement layer, the method is: For each data point , calculate the corresponding query, key, and value vectors, where the query vector is the degree of attention paid by the current input feature to other features, The mathematical model is: ; Key Vector is the correlation information of the input features, The mathematical model is: ; Value vector is the characteristic of the input data itself, The mathematical model is: ; In the formula, , , is the weight matrix learned by the encoder, , , is the bias term; Then the weight of the enhancement layer is calculated to calculate the query vector and key vector The similarity between them is used to obtain the enhancement layer weight , introducing a recursive weighting factor in the process of calculating similarity , 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: ; In the formula, is the exponential operation, 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 to initialize the embedding of the data point. , the mathematical model for weighting in each round of calculation is: ; In the formula, To tune the hyperparameters of the history weighted influence, 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 , The mathematical model is: ; In the formula, n is the number of sample features, for The transpose operation of The final enhancement layer weight is obtained by introducing a dynamic recursive weighting factor, so that the enhancement layer weights between the features of each input sample can be dynamically adjusted. With value vector Perform weighted summation to obtain the final encoder output , For data points The potential representation of The mathematical model is: ; In the formula, For input The encoding representation is then used to represent each data in each sample. The corresponding potential representation of each data is \left [ {{z}_{1},{z}_{2},....,{z}_{n}} \right ] , and finally the global potential representation of each sample is obtained. The mathematical model is: ; In the formula, For splicing operation, is the global potential representation of a sample, , d is the size of data embedding, The specific size is .
[0030] S32. Construct a vector block representation module, slice the vector representation of each sample, then flatten each block into a vector, and transform the vector into a fixed-dimensional space through mapping, and introduce position encoding in the high-dimensional space to obtain an embedded sequence in the high-dimensional space.
[0031] Furthermore, in step S32, in order to focus on features of different scales, three scales of different sizes are used to slice the vector representation, namely: , , , which are used to capture detailed information of different granularities. The structure diagram is as follows Figure 3 As shown, each block is then expanded into a one-dimensional vector through a learnable nonlinear projection matrix E. The expanded one-dimensional vector 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, 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: {E}_{pos}=\left [ {{e}_{pos,1},{e}_{pos,2},...,{e}_{pos,N}} \right ] ; 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; 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: {z}_{0}=\left [ {{x}^{conv}_{1}+{e}_{pos,1},{x}^{conv}_{2}+{e}_{pos,2},...,{x}^{conv}_{N}+{e}_{pos,N}} \right ] ; In the formula, The vector and position encoding for each latent space are added together to obtain the final input sequence.
[0032] S33. Construct a selection mechanism module, which consists of multiple attention layers, each of which captures different features. A feature selection mechanism is introduced into the module, and the last layer of the attention layer is processed as input, and the most discriminative part is selected according to the self-attention weight.
[0033] 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: ; ; 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, for After The output of the MSA layer, For MLP The output of the layer will eventually be The output of the layer is processed as the input of the feature selection mechanism; In the Layer, the structure diagram is as follows Figure 4 As shown, the input feature representation is recorded as {z}_{L-1}=\left [ {{z}^{L-1}_{0};{z}^{L-1}_{1};...;{z}^{L-1}_{N}} \right ] , where each For the The input of the layer, each layer of the attention mechanism layer will generate self-attention weights , the weight of each layer reflects the importance of each part in the vector, The mathematical model is: {\alpha}_{l}=\left [ {{\alpha}^{l}_{0},{\alpha}^{l}_{1},...,{\alpha}^{l}_{K}} \right ] ; 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 is: ; In the formula, is the result after standardization, For 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. The mathematical model is: ; In the formula, is the introduced hierarchical feature weighting factor, which can be expressed as , is the final attention fusion output; finally, according to The largest attention value selects the K most discriminative regions, and the mathematical model is: {z}_{local}=\left [ {{z}^{0}_{L-1},{z}^{{A}_{1}}_{L-1},{z}^{{A}_{2}}_{L-1},...,{z}^{{A}_{K}}_{L-1}} \right ] ; In the formula, is the L-1th layer output Feature representation of the region.
[0034] S34. Construct a comparative loss function by maximizing the loss of similarity of samples of the same type and minimizing the loss of similarity of samples of different types.
[0035] Furthermore, 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: {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 ] ; In the formula, B is the size of a batch, which is 128. , are the true labels of sample p and sample q respectively, , are the feature representations of sample p and sample q respectively, It is a multi-scale similarity measure, which represents features at different levels , Assign different weights to the similarity calculation for each layer Perform weighted summation, The mathematical model is: ; The weighted similarity introduced here gives greater weight to samples that are more difficult to classify. The mathematical model is: ; In the formula, To calculate the Euclidean distance operation; 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: .
[0036] S4. Training a bearing component fault inspection model, wherein 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.
[0037] Furthermore, in step S4, the bearing component fault inspection model is developed using 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 of the model training is 1000, and the final output of the model is the classification of the bearing component faults.
[0038] 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.
[0039] Furthermore, in step S5, Figure 5 As shown in the figure, the accuracy of the inspection model described in this application is compared with the true value, and the accuracy of the other two models is also compared. Figure 5 It can be seen 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.
[0040] The above are only preferred embodiments of the present invention. It should be pointed out that a person skilled in the art can make several modifications and improvements without departing from the inventive concept of the present invention, and these all fall within 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; 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 S31, an encoder is used to convert each data point Transformed into its latent space embedding representation , the conversion process is implemented using an enhancement layer, the method is: For each data point , calculate the corresponding query, key, and value vectors, where the query vector is the degree of attention paid by the current input feature to other features, The mathematical model is: ; Key Vector is the correlation information of the input features, The mathematical model is: ; Value vector is the characteristic of the input data itself, The mathematical model is: ; In the formula, , , is the weight matrix learned by the encoder, , , is the bias term; Then the enhancement layer weights are calculated to calculate the query vector and key vector The similarity between them is used to obtain the enhancement layer weight , introducing a recursive weighting factor in the process of calculating similarity , 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: ; In the formula, is the exponential operation, 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 to initialize the embedding of the data point. , the mathematical model for weighting in each round of calculation is: ; In the formula, To tune the hyperparameters of the history weighted influence, 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 , The mathematical model is: ; In the formula, n is the number of sample features, for The transpose operation of The final enhancement layer weight is obtained by introducing a dynamic recursive weighting factor, so that the enhancement layer weights between the features of each input sample can be dynamically adjusted. With value vector Perform weighted summation to obtain the final encoder output , For data points The potential representation of The mathematical model is: ; In the formula, For input The encoding representation is then used to represent each data in each sample. The corresponding potential representation of each data is , and finally the global potential representation of each sample is obtained. The mathematical model is: ; In the formula, For splicing operation, is the global potential representation of a sample.
4. A tower crane bearing component fault inspection method according to claim 3, characterized in that: In step S32, in order to focus on features of different scales, three scales of different sizes are used to slice the vector representation, namely: , , , which are used to capture detailed information of different granularities, and then each block is expanded into a one-dimensional vector through a learnable nonlinear projection matrix E. The expanded one-dimensional vector 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, 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: ; 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; 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: ; In the formula, The vector and position encoding for each latent space are added together to obtain the final input sequence.
5. A tower crane bearing component fault inspection method according to claim 4, 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: ; ; 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, for After The output of the MSA layer, For MLP The output of the layer will eventually be The output of the layer is processed as the input of the feature selection mechanism; In the In the layer, the input feature representation is denoted as , where each For the The input of the layer, each layer of the attention mechanism layer will generate self-attention weights , the weight of each layer reflects the importance of each part in the vector, 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, is the result after standardization, For 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. The mathematical model is: ; In the formula, is the introduced hierarchical feature weighting factor, which can be expressed as , is the final attention fusion output; finally, according to The largest attention value selects the K most discriminative regions, and the mathematical model is: ; In the formula, is the L-1th layer output Feature representation of the region.
6. A tower crane bearing component fault inspection method according to claim 5, 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, , are the true labels of sample p and sample q respectively, , are the feature representations of sample p and sample q respectively, It is a multi-scale similarity measure, which represents features at different levels , Assign different weights to the similarity calculation for each layer Perform weighted summation, The mathematical model is: ; The weighted similarity introduced here gives greater weight to samples that are more difficult to classify. The mathematical model is: ; In the formula, To calculate the Euclidean distance operation; 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: 。
Citation Information
Patent Citations
Transformer substation equipment fault early warning method and equipment based on double-domain sparse Transform model
CN116433223A
Variable working condition migration bearing fault diagnosis method based on ViTCapsNet network in noise environment
CN119202905A
Deep fusion network production line fault prediction method based on deep learning
CN119357769A
Structure of the deck
KR102778658B1
Cited By
Improved TS-GAN-based power grid fault recording data enhancement method and system
CN120408045A