A tower crane tower damage anomaly detection method

By constructing the CTS-DAM anomaly detection model and employing multi-scale analysis and an adaptive weight update mechanism, the efficiency and accuracy issues of early damage detection in tower crane tower bodies were resolved, enabling early and accurate detection of tower crane tower body damage and reducing safety risks.

CN120805081BActive Publication Date: 2026-01-02TAISHAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511299770.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-12
Publication Date
2026-01-02
Estimated Expiration
2045-09-12

AI Technical Summary

Technical Problem

Existing technologies are insufficient to detect early, minor damage to the tower body of tower cranes in a timely manner. Manual inspections are inefficient and rely heavily on the experience of inspectors. Vibration monitoring struggles to extract highly discriminative features from vibration data, resulting in structural damage going undetected and posing safety hazards.

Method used

A CTS-DAM anomaly detection model is constructed, including a structural segment mapping module, a phase periodic anomaly modeling module, and an anomaly judgment module. Through multi-scale analysis, self-attention mechanism, structural disturbance perception, and periodic modeling, combined with an adaptive weight update mechanism, the model can accurately detect local disturbances and periodic anomalies in the tower body of a tower crane.

Benefits of technology

It enables early and accurate detection of tower crane tower damage, improving detection efficiency and accuracy, and reducing the risk of structural instability and accidents.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120805081B_ABST
    Figure CN120805081B_ABST
Patent Text Reader

Abstract

The application provides a tower crane tower damage anomaly detection method, and relates to the field of anomaly detection. The method comprises a selected segment mapping module, a phase cycle anomaly modeling module and an anomaly judgment module. The selected segment mapping module is used for local disturbance analysis. The phase cycle anomaly modeling module is used for processing periodic anomaly information. The anomaly judgment module is used for integrating two scores to obtain a final anomaly score and completing anomaly judgment. The modules cooperate with each other to realize anomaly detection of tower crane tower damage.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the field of anomaly detection, and particularly relates to a tower crane tower body damage anomaly detection method. BACKGROUND

[0002] As the core hoisting equipment in high-rise building construction, tower cranes are widely used in large-scale construction, industrial facilities and other engineering projects. The tower body structure is usually composed of multiple steel structures, which are gradually increased in height by standard sections. It has the characteristics of high height, heavy load bearing and complex structure. Due to its long-term operation under high load, frequent vibration and wind, the tower body structure is prone to fatigue damage, loose connection and other problems. If the damage is not discovered and handled in time, it is easy to cause structural instability, hoisting accidents and even overall collapse, resulting in significant property loss and casualties.

[0003] Current structural health detection of tower cranes mainly relies on manual inspection and vibration monitoring. These methods have the problems of long detection period, low efficiency and strong subjectivity, making it difficult to discover early and small damage in time. At the same time, the results of manual inspection are often limited by the experience of the inspector and the coverage of the equipment. Although vibration monitoring can effectively identify the dynamic changes of the tower body, it is difficult to effectively extract features with high discriminability from a large amount of vibration data.

[0004] In recent years, with the continuous development of intelligent and data-driven technologies, damage detection methods based on time series data analysis have gradually become a new research trend. These methods can more accurately identify the small damage of the tower body by deeply analyzing the vibration, tilt, load and other time series data collected during the operation of the tower body. Tower body damage usually manifests as local deformation, crack propagation, vibration frequency change and other abnormal behaviors. These abnormalities are accompanied by sudden nonlinear dynamic fluctuations or periodic disturbances, and have the characteristics of multi-scale and multi-dimensional in data. By deeply analyzing these data, potential risks of the tower body can be discovered in time. SUMMARY

[0005] The application provides a tower crane tower body damage anomaly detection method. For local nonlinear, sudden and periodic tower crane tower body data, a CTS-DAM anomaly detection model is proposed, which includes a selected segment mapping module, a phase cycle anomaly modeling module and an anomaly judgment module.

[0006] The technical solution adopted by the application to achieve the above purpose specifically includes the following steps:

[0007] S1, collect tower crane tower body related data, construct a data set, and divide the training set, validation set and test set after preprocessing;

[0008] S2, construct a selection slice mapping module for local perturbation analysis, the specific steps are:

[0009] S21, input the tower crane tower data for multi-scale division, introduce the feature encoding method of self-attention mechanism, and calculate the tower crane tower feature embedding;

[0010] S22, input the tower crane tower feature embedding to calculate the structural disturbance factor, and construct the structural disturbance tensor representation matrix to obtain the structural selective gating tensor;

[0011] S23, based on the relationship between the structural disturbance factor and the structural prototype vector, design a plurality of coupled driving global scaling factors;

[0012] S24, introduce the output of S21, S22 and the plurality of coupled driving global scaling factors, calculate the structural selective mapping weight, reconstruct the restored tower crane tower sequence, and obtain the selection slice mapping score;

[0013] S3, construct a phase response driving module for processing periodic abnormal information, the specific steps are:

[0014] S31, input the restored tower crane tower sequence, project to obtain the phase trajectory tensor, perform sliding window operation and construct the phase evolution induction map;

[0015] S32, define a prototype graph set, calculate the structural deviation measure between the phase evolution induction map and the prototype graph, and design a gating factor to dynamically adjust the structural expression of the prototype graph through a gating mechanism;

[0016] S33, by calculating the distance relationship between the induction map and a plurality of updated prototype graphs, obtain the phase response deviation score;

[0017] S4, construct an abnormality judgment module, weight and fuse the phase response deviation score and the selection slice mapping score, set a threshold to judge the damage abnormality of the tower crane tower.

[0018] Preferably, in S1, collect the tower crane tower related data, including tower vibration sensor data, tower stress sensor data, tower temperature sensor data, tower displacement sensor data and tower ultrasonic wave detection data, construct a multi-dimensional data set, use the mean filling method for data preprocessing, and divide the training set, the validation set and the test set according to the ratio of 7:1:2.

[0019] Preferably, the tower crane tower is susceptible to load changes, wind vibration disturbances and environmental aging in long-term operation, and presents significant multi-scale non-stationary structural variation characteristics. Traditional methods mostly use single-scale modeling, which is difficult to capture the weak damage characteristics at each scale, especially in the early abnormal stage, which is often ignored due to the unobvious structure response. In order to realize more accurate structure state identification, it is necessary to introduce multi-scale analysis and selective modeling mechanism, so as to efficiently encode the embedded representation of the structure segment at different scales.

[0020] Preferably, in the S21, the input tower crane tower data , by setting a fixed scale parameter , the input tower crane tower data is processed by non-overlapping mean division at each scale, and the specific mathematical model is:

[0021] ;

[0022] In the formula, is the scale parameter, indicating the slice scale, is the number of the i-th slice, is the end time step number of the slice, is the tower crane tower data at the t-th time step, is the i-th slice average tower crane tower slice vector at size z, is the mean value operation, and the feature encoding method introducing self-attention mechanism is used to calculate the tower crane tower feature embedding , the tower crane tower slice vector is mapped to query , key and value through three independent linear transformations, wherein , , are learnable weight matrices, and then the self-attention calculates the similarity score through the matching of the query and the key. The specific mathematical model is:

[0023] ;

[0024] In the formula, is the activation function, is the feature embedding dimension, is the transpose of the key, and the feature embedding at each scale is represented as:

[0025] ;

[0026] In the formula, is the similarity score of the i-th query to the j-th key, is the j-th value, the number of tower crane tower slices at the scale z, the index of the slice to be noticed, indicating the location of all keys and values.

[0027] Preferably, the fixed scale division is introduced into the joint modeling method with the self-attention mechanism, the structural fragment of the tower body at different scales is embedded, the attention weight between the structural fragments is established by matching the query and the key, the significance of the key structural area is enhanced, the sensitivity of the model to the structural disturbance is improved, the discriminability of the feature expression is enhanced, a unified feature basis of multiple scales is provided for subsequent structural disturbance response modeling and periodic anomaly detection, and the limitations of traditional methods in scale adaptability and structure perception ability are broken through.

[0028] Preferably, the running state of the tower crane tower structure usually has high complexity and local difference, and the traditional feature mapping method often ignores the influence of the structural disturbance on the prototype mapping process, so it is difficult to accurately depict the structural offset characteristics of the abnormal fragments. In addition, there are significant response differences between different structural fragments. If all structures are directly modeled uniformly, it is easy to lead to insufficient feature generalization or response ambiguity. Therefore, it is necessary to introduce a structural disturbance perception mechanism in the modeling process to enhance the discriminability of the model to the local differences of the structure and to realize the selective control of the structural mapping relationship.

[0029] Preferably, in the S22, the input tower crane tower feature embedding , a disturbance response strategy is proposed to reduce all tower crane tower feature embeddings at the current scale to obtain a reference center representation at the scale z , the specific mathematical expression is:

[0030] ;

[0031] In the formula, the number of tower crane tower slices at the scale z, is the index of the slice, the structural difference of each scale tower crane tower feature embedding relative to the reference center representation is calculated to form a measurable structural disturbance factor, and the specific mathematical expression is:

[0032] ;

[0033] In the formula, is the structural disturbance factor of the i-th tower crane tower feature embedding at the scale z, is the square of the Euclidean distance, and then based on the response offset relationship between different tower crane tower feature embeddings in the embedding space, a structural disturbance tensor representation matrix is constructed, and the specific mathematical expression is:

[0034] ;

[0035] wherein, is a structural disturbance tensor representation matrix, is a softmax normalization of the matching distribution of each slice at each scale z, is the jth structural prototype vector at scale z, representing a predefined structural template, is a nonlinear mapping function, is the number of structural prototype vectors, is the index of the structural disturbance factor, is the structural prototype vector index, by jointly considering the tower crane tower body feature embedding of the current slice, the structural prototype vector, and the structural disturbance factor, and combining the trainable linear discriminant parameter, a logical judgment is made on whether to activate each structural prototype path, and a structural selective gating tensor is obtained, and the specific mathematical expression is:

[0036] {G}^{z}_{ij}=\sigma ({W}_{g}\cdot \left [ {{q}^{z}_{i}||{b}^{z}_{j}||{\Delta}^{z}_{i}} \right ]+{b}_{g}) ;

[0037] wherein, is an activation function, is a gating weight matrix, is a gating bias term, is a structural selective gating tensor.

[0038] Preferably, a structural selective gating mechanism based on a structural disturbance tensor is introduced, a disturbance perception control factor is embedded in the mapping path between the original structural fragment and the prototype, and a gating expression is constructed by jointly considering the structural disturbance factor, the structural prototype vector, and the fragment embedding representation, thereby realizing dynamic selection and nonlinear suppression of each structural path, ensuring effective preservation of key structural information and prominent modeling of disturbance regions. This design not only enhances the sensitivity of the model to local changes in the structure, but also realizes the construction of non-normalized mapping weights based on disturbance adjustment, effectively avoiding the problem of significant loss under normalization operation in traditional attention mechanisms, and improves the modeling ability of abnormal structural response.

[0039] Preferably, traditional methods directly perform simple averaging or weighted summation on the mapping results, ignoring the matching relationship and disturbance sensitivity between different structural fragments, making it difficult to accurately reflect the overall deviation degree of the structure. At the same time, the tower crane tower body has high structural complexity and significant local differences, and a feature fusion mechanism that takes into account fragment matching accuracy and disturbance degree adjustment is needed to support more robust abnormal perception criterion construction.

[0040] Preferably, in S23, the polynomial coupling driving global scaling factor is designed, the nonlinear enhancement term and the periodic modulation factor are fused based on the relationship between the structural disturbance factor and the structural prototype vector, the scaling factor corresponding to each slice is obtained through coupling modeling, and the specific mathematical model is:

[0041] ;

[0042] In the formula, is the polynomial coupling driving global scaling factor of the i-th slice at the scale z, is the amplification factor of the polynomial modulation term, is the structural disturbance factor of the i-th tower crane tower body feature embedding at the scale z, is a polynomial function of the i-th slice structural disturbance factor, is a scaling factor of the control period term frequency, is the frequency regulation index of the i-th slice, is a coefficient for controlling the phase offset, is the structural prototype vector at the scale z is the average similarity of the current query, is a power index for controlling the response amplitude strength of the period.

[0043] Preferably, by fusing the structure selective gating weight, the prototype matching similarity and the disturbance penalty factor, a non-normalized structure mapping fusion mechanism is constructed, on the basis of obtaining the structure path mapping results of each segment, a suppressive adjustment term is introduced to weight and suppress the structure segments with high disturbance intensity, so as to avoid the interference of high disturbance areas on the overall structure score, and finally output the structure deviation score as the abnormality perception basis. This method breaks the normalization constraint in the traditional mapping fusion process, improves the accurate representation ability of local abnormalities of complex structures, and provides a highly consistent structure expression basis for subsequent periodic abnormal modeling.

[0044] Preferably, the damage evolution of the tower crane tower structure often has time sequence characteristics such as periodicity, volatility and local asynchronicity. Traditional methods based on statistical analysis or time domain trend detection are difficult to fully reveal the dynamic correlation characteristics of the structure state between adjacent periods. At the same time, in the periodic data, there is a complex phase coupling relationship between different variables, and only relying on single variable or original time sequence modeling may cause incomplete expression of time sequence characteristics. Therefore, a mechanism with periodic modeling ability and variable phase perception ability is needed to extract global and local dynamic change rules from the time sequence evolution track, so as to realize accurate perception of periodic abnormalities.

[0045] Preferably, in the S24, a structure-selective mapping weight generation strategy based on multi-factor regulation is proposed, a structure-selective mapping weight is constructed, a matching relationship between each slice and a structure prototype vector is scaled and adjusted based on a plurality of coupled driving global scaling factors, a scaled matching strength is weighted in a slice-specific manner in combination with a structure-selective gating tensor, a matching similarity between the slice and the structure prototype vector is then introduced as a basic structure similarity expression, a product result of each element in the matrix and a length of the structure prototype vector is suppressed and adjusted, a disturbance penalty term is constructed, and the structure-selective mapping weight is obtained, and the specific mathematical model is as follows:

[0046] ;

[0047] In the formula, is a structure-selective mapping weight of the i-th slice corresponding to the j-th structure prototype vector at the scale z, is a structure-selective gating tensor, is a tower crane tower feature embedding, is each element in the structure disturbance tensor representation matrix , is a non-negative truncation function symbol, is a power index for controlling the response amplitude strength, the tower crane tower reconstruction result is obtained by weighting and summing all structure prototype vectors with the structure-selective mapping weight, and the specific mathematical expression is as follows:

[0048] ;

[0049] In the formula, is the number of structure prototype vectors, is a structure prototype vector index, is a tower crane tower reconstruction result, the tower crane tower reconstruction results at different scales are fused to form a unified tower crane tower time slice feature , and the restored tower crane tower sequence is reconstructed through a decoder,

[0050] ;

[0051] In the formula, is a selection slice mapping score, is a normalization coefficient, is the number of different scales participating in the calculation, is a scale index.

[0052] Preferably, by constructing a time-variable phase evolution orbit tensor, the phase change trajectory of the tower multivariate state in the cycle window is extracted, and a phase evolution induction map is further generated for capturing the synchronization structure of variables at different time segments. By constructing a prototype map set, the current cycle structure is structurally mapped, the matching deviation between the current cycle map and all prototypes is taken as a cycle anomaly score, and a threshold judgment mechanism is combined to complete cycle anomaly recognition. This design combines the ideas of graph structure learning and phase evolution modeling, breaks through the dependence of traditional cycle detection methods on time domain trends and the limitation of independent modeling of variables, and realizes the structured, high-dimensional expression and accurate discrimination of tower periodic anomalies.

[0053] Preferably, in the operation monitoring of the tower structure of the tower crane, the structural state evolves over time, and the health characteristics at different times often have significant dynamic changes and trend deviations. The traditional static weight mechanism cannot adapt to the non-stationarity of time series characteristics, and is prone to ignore the influence of historical information on the current state, resulting in a lag in response to structural changes. Especially in the early evolution of abnormal state, the change amplitude is weak and difficult to be accurately captured. Therefore, it is urgent to build a dynamic and adaptive weight updating mechanism that can integrate historical weights and current feature information, and autonomously adjust the rate and amplitude of weight change to achieve sensitive tracking of health state fluctuations.

[0054] Preferably, in the S31, the input is also a restored tower crane tower sequence Each restored tower crane tower sequence is projected into the Hilbert phase domain, and the specific mathematical model is:

[0055] ;

[0056] In the formula, is the restored tower crane tower sequence of the t-th time step and the c-th variable, is a complex phase angle operation, is a Hilbert transform operation, is the corresponding phase orbit tensor of the t-th time step and the c-th variable, a phase evolution induction map is constructed, a sliding window operation is performed on the phase orbit tensor, the cosine value of the phase trajectory difference of the phase orbit tensor in the time period is calculated, the results in the entire window length are averaged, and a phase evolution induction map reflecting the synchronization behavior of the phase orbit tensor in the time window is generated. The specific mathematical model is:

[0057] ;

[0058] In the formula, is the phase evolution induction map of the i-th and j-th phase orbit tensors in the l-th sliding window, a length of the sliding window, , is a phase orbit tensor of the i-th and j-th variable in the l-th sliding window, is a sliding window, is a time step index within the sliding window.

[0059] Preferably, by constructing an adaptive timing weight update mechanism, a difference adjustment term between historical weights and current features is introduced, a nonlinear mapping function is combined with multiple trainable parameters to jointly control the weight change trend, to realize flexible adjustment of the weight update rate and amplitude, and by adjusting the parameters to suppress or enhance the current feature response, the model has stronger adaptive ability when facing different health state fluctuations. This design breaks through the limitation of traditional static or linear weight distribution strategy on the flexibility of time series modeling, significantly enhances the model's perception ability of the dynamic evolution trend of the tower health features, and provides time series continuity guarantee for subsequent health value prediction.

[0060] Preferably, in the tower crane tower health state modeling, only relying on the feature information at the current time often cannot fully reflect the potential evolution law of the structure state, and the historical information is important in the judgment of the state change trend. The traditional method directly splices or averages the historical and current features, without considering the relative weight and nonlinear interaction between different time features, which may cause information redundancy or feature weakening, affecting the accuracy of subsequent prediction results. Therefore, a mechanism is needed to reasonably fuse historical features and current features to realize multi-time joint modeling of the structure state and provide more stable and complete feature input for the final health prediction.

[0061] Preferably, in the S32, a prototype graph set composed of multiple graph structures is defined The Frobenius distance is used to calculate the structural deviation measure between each phase evolution induced graph and each prototype graph, and the specific mathematical model is:

[0062] ;

[0063] In the formula, is the structural deviation measure between the phase evolution induced graph in the l-th sliding window and the k-th prototype graph, is the phase evolution induced graph of the i-th and j-th phase orbit tensor in the l-th sliding window, is the k-th prototype graph in the prototype graph set, is the Frobenius norm, which integrates the original structural state and the current induced graph information, and designs a gating factor to control the update amplitude and fusion mode, and the specific mathematical model is:

[0064] ;

[0065] wherein, 、 is a trainable weight matrix, is an activation function, dynamically adjusts the structural expression of the prototype graph through a gating mechanism, and the specific mathematical model is:

[0066] ;

[0067] wherein, is a gating factor control.

[0068] Preferably, by fusing the historical moment feature and the current moment feature sequence on the basis of adaptive weight adjustment, a dynamic weight distribution method is adopted to combine and model the multi-moment feature information, a time series enhancement mechanism is introduced in the structure to maintain the time series dependence of the features, and a nonlinear activation function is used to express and enhance the fused features, thereby further constructing a unified health feature vector. This design not only solves the problems of multi-moment feature redundancy and information conflict, but also effectively integrates the structural health evolution trend, improves the perception ability of the input features to the future state change, and provides a high-quality feature basis for the final monitoring value output.

[0069] Preferably, the change process of the tower crane tower health state usually has nonlinear and multi-factor coupling characteristics, and the traditional linear modeling method is difficult to describe the complex mapping relationship between the input features and the health monitoring value. Especially in the face of sudden disturbances or structural abnormalities, the model is not sensitive to key features, resulting in large deviations in monitoring results. In addition, the feature distribution exhibited by the tower structure in different operating stages is dynamic, and a structure with good nonlinear fitting capability is needed to improve the prediction performance. Therefore, a network structure with nonlinear expression capability and learning ability needs to be introduced to effectively map the fused features and accurately output the health monitoring value.

[0070] Preferably, in the S33, the phase response deviation score is calculated, the corresponding phase evolution induction graph is extracted for each sliding window, and the distance relationship Frobenius distance between the induction graph and multiple updated prototype graphs is measured, and the specific mathematical model is:

[0071] ;

[0072] wherein, is the phase response deviation score, is the phase evolution induction graph of the ith and jth phase orbit tensor in the lth sliding window, is the kth prototype graph in the prototype graph set, is the Frobenius norm, For comparison of all prototype graphs for k = 1, 2, …, k, the closest prototype graph distance is selected as the phase response deviation score.

[0073] Preferably, the feature mapping network constructed by the combination of the full connection layer and the nonlinear activation function is used to perform the hidden space transformation on the fused health feature vector, and the health monitoring value is further output through the second layer linear transformation, the parameters in the model are automatically learned through the training, have strong expression flexibility and fitting ability, can effectively model the nonlinear relationship between the features and the output values, this design breaks through the limitations of the traditional linear prediction model in high-dimensional feature modeling, at the same time, the prediction path is constructed combining the previous time sequence structure and dynamic feature information, which significantly improves the prediction accuracy of the tower structure health state and the time sequence response ability of the model.

[0074] Preferably, in the S4, an abnormality judgment module is constructed, the phase response deviation score is mapped with the selected slice mapping score , a multi-source fusion abnormality score is obtained through weighted fusion , a threshold is set , and the tower crane tower body damage abnormality judgment is completed.

[0075] As described above, since the technical scheme is adopted, the present application has the following beneficial effects: the present application proposes a tower crane tower body damage abnormality detection method, constructs a CTS-DAM abnormality detection model, and applies it to the tower crane tower body damage abnormality detection scene, which as a whole includes a selected slice mapping module, a phase cycle abnormality modeling module, and an abnormality judgment module. The selected slice mapping module is used for local disturbance analysis of data, the phase response driving module is used for processing periodic abnormality information, and the abnormality judgment module is used for integrating two scores to obtain a final abnormality score and complete abnormality judgment. The modules cooperate with each other to realize the abnormality detection of the tower crane tower body damage. BRIEF DESCRIPTION OF DRAWINGS

[0076] Figure 1 It is a tower crane tower body damage abnormality detection method flow chart.

[0077] Figure 2 It is a selected slice mapping module diagram.

[0078] Figure 3 It is a phase cycle abnormality modeling module diagram.

[0079] Figure 4 It is a tower crane tower body damage abnormality detection effect diagram.

[0080] Figure 5 It is a CTS-DAM abnormality detection model error distribution diagram. DETAILED DESCRIPTION

[0081] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.

[0082] Please refer to Figures 1-5 , the present application provides a technical solution: a tower crane tower damage anomaly detection method, by constructing the selected slice mapping module for local disturbance analysis of data, phase response driving module for processing periodic abnormal information, abnormal judgment module for integrating two scores, getting the final abnormal score, the specific steps are as shown in Figure 1 .

[0083] S1, collect the relevant data of tower crane tower, construct the data set, and divide the training set, the validation set and the test set after preprocessing.

[0084] Further, the relevant data of tower crane tower is collected, including tower vibration sensor data, tower stress sensor data, tower temperature sensor data, tower displacement sensor data and tower ultrasonic wave detection data, a multidimensional data set is constructed, and the mean filling method is used for data preprocessing, and the specific mathematical model is:

[0085] ;

[0086] In the formula, is the total number of tower crane tower data, is the average value, is the observation value, and the training set, the validation set and the test set are divided according to the ratio of 7:1:2.

[0087] S21, input the tower crane tower data for multi-scale division, introduce the feature coding method of self-attention mechanism, and calculate the tower crane tower feature embedding.

[0088] Further, the selected slice mapping module is constructed, as shown in Figure 2 , the input tower crane tower data , the input tower crane tower data is processed by setting fixed scale parameters under each scale without overlapping, and the specific mathematical model is:

[0089] ;

[0090] In the formula, is the scale parameter, representing the slice scale, set as [12, 24, 48], is the number of the i-th slice, is the end time step number of the slice, is the tower crane tower data of the t-th time step, is the i-th slice vector of the tower crane tower after averaging under the size z, is the mean operation, and the feature encoding method introducing self-attention mechanism is used to calculate the tower crane tower feature embedding , the tower crane tower slice vector is mapped to query , key and value by three independent linear transformations, , , are learnable weight matrices, and then the self-attention calculates the similarity score through the matching of the query and the key, and the specific mathematical model is:

[0091] ;

[0092] wherein, is the activation function, is the feature embedding dimension, is the transpose of the key, and the feature embedding of each scale is represented as:

[0093] ;

[0094] wherein, is the similarity score of the i-th query to the j-th key, is the j-th value, is the number of tower crane tower slices under the scale z, is the slice index that is noticed, representing the position of all keys and values, and the specific implementation code is:

[0095] batch_size = 8

[0096] time_length = 240

[0097] feature_dim = 16

[0098] input_data = torch.randn(batch_size, time_length, feature_dim)

[0099] # Define multi-scale division

[0100] scales = [12, 24, 48] # Different scale window length

[0101] stride_ratio = 0.5 # Sliding window step length ratio

[0102] def multi_scale_patch(input_seq, scales, stride_ratio):

[0103] batch_size, time_len, feat_dim = input_seq.shape

[0104] all_patches = []

[0105] for win_size in scales:

[0106] stride = int(win_size * stride_ratio)

[0107] num_patches = (time_len - win_size) / / stride + 1

[0108] scale_patches = []

[0109] for i in range(num_patches):

[0110] start = i * stride

[0111] end = start + win_size

[0112] patch = input_seq[:, start:end, :] # [B, win, F]

[0113] patch_mean = patch.mean(dim=1) # [B, F]

[0114] scale_patches.append(patch_mean.unsqueeze(1)) # [B, 1, F]

[0115] scale_patches = torch.cat(scale_patches, dim=1) # [B, N, F]

[0116] all_patches.append(scale_patches)

[0117] return all_patches # List of [B, N_z, F]

[0118] # Perform slice generation

[0119] multi_scale_inputs = multi_scale_patch(input_data, scales, stride_ratio)

[0120] # Define self-attention embedding module

[0121] class MultiHeadAttentionEncoder(nn.Module):

[0122] def __init__(self, d_model, n_heads, dropout=0.1):

[0123] super().__init__()

[0124] self.mha = nn.MultiheadAttention(embed_dim=d_model, num_heads=n_heads, dropout=dropout, batch_first=True)

[0125] self.norm = nn.LayerNorm(d_model)

[0126] self.ffn = nn.Sequential(

[0127] nn.Linear(d_model, d_model * 4),

[0128] nn.ReLU(),

[0129] nn.Linear(d_model * 4, d_model) )

[0131] self.dropout = nn.Dropout(dropout)

[0132] def forward(self, x):

[0133] Self-attention

[0134] attn_output, _ = self.mha(x, x, x)

[0135] x = self.norm(x + self.dropout(attn_output))

[0136] # Feed-forward network

[0137] ffn_output = self.ffn(x)

[0138] x = self.norm(x + self.dropout(ffn_output))

[0139] return x

[0140] # Instantiate the embedder

[0141] encoder = MultiHeadAttentionEncoder(d_model=feature_dim, n_heads=4)

[0142] # Embed all scale's structural fragments

[0143] scale_embeddings = []

[0144] for scale_input in multi_scale_inputs: # Each one is [B, N_z, F]

[0145] encoded = encoder(scale_input) # Output dimension [B, N_z, F]

[0146] scale_embeddings.append(encoded)

[0147] # Merge all scale output features

[0148] final_embedding = torch.cat(scale_embeddings, dim=1) # [B, sum(N_z),F]

[0149] S22, the tower feature embedding calculation structure disturbance factor of the input tower crane tower, and construct a structure disturbance tensor representation matrix, get the structure selective gate tensor.

[0150] Further, the tower crane tower feature embedding is input , a disturbance response strategy is proposed, and all tower crane tower feature embeddings under the current scale are reduced to obtain a reference center representation under scale z , the specific mathematical expression is:

[0151] ;

[0152] In the formula, is the number of tower crane tower slices under scale z, is the index of the slice, and the structural difference of each scale of the tower crane tower feature embedding relative to the reference center representation is calculated to form a measurable structural disturbance factor, and the specific mathematical expression is:

[0153] ;

[0154] In the formula, is the structural disturbance factor of the i-th tower crane tower feature embedding under scale z, is the Euclidean distance square, and then based on the response offset relationship between different tower crane tower feature embeddings in the embedding space, a structural disturbance tensor representation matrix is constructed, and the specific mathematical expression is:

[0155] ;

[0156] In the formula, is the structural disturbance tensor representation matrix, is the softmax normalization of the matching distribution of each slice under each scale z, is the j-th structural prototype vector under scale z, representing a predefined structural template, is a nonlinear mapping function, is the number of structural prototype vectors, which is set to 16, is the index of the structural disturbance factor, is the structural prototype vector index, by jointly considering the tower crane tower feature embedding of the current slice, the structural prototype vector and the structural disturbance factor, and combining the trainable linear discriminant parameter, a logical judgment is made on whether to activate each structural prototype path, and a structural selective gating tensor is obtained, and the specific mathematical expression is:

[0157] {G}^{z}_{ij}=\sigma ({W}_{g}\cdot \left [ {{q}^{z}_{i}||{b}^{z}_{j}||{\Delta}^{z}_{i}} \right ]+{b}_{g}) ;

[0158] where, is the activation function, is the gating weight matrix, is the gating bias term, is the structure-selective gating tensor, with the implementation code as:

[0159] B, N, F = 8, 60, 32 # B batch size, N number of segments, F embedding dimension

[0160] H = 16 # number of prototypes

[0161] input_embedding = torch.randn(B, N, F)

[0162] # Define the structure prototype vectors [H, F]

[0163] struct_prototypes = nn.Parameter(torch.randn(H, F))

[0164] # Define the perturbation-aware module

[0165] class StructuralPerturbationMapping(nn.Module):

[0166] def __init__(self, embed_dim, num_prototypes):

[0167] super().__init__()

[0168] self.embed_dim = embed_dim

[0169] self.num_prototypes = num_prototypes

[0170] # Structure perturbation factor, trainable [H, F]

[0171] self.perturbation = nn.Parameter(torch.randn(num_prototypes,embed_dim))

[0172] # Gating discriminative network

[0173] self.gate_fc = nn.Sequential(

[0174] nn.Linear(embed_dim * 3, embed_dim),

[0175] nn.ReLU(),

[0176] nn.Linear(embed_dim, 1) )

[0178] # The gated activation function is Sigmoid

[0179] self.gate_activation = nn.Sigmoid()

[0180] def forward(self, x, prototypes):

[0181] B, N, F = x.shape

[0182] H = self.num_prototypes

[0183] # Expanding the dimensions facilitates the computation of [B, N, 1, F] & [1, 1, H, F]

[0184] x_expand = x.unsqueeze(2).expand(B, N, H, F) # [B, N, H, F]

[0185] p_expand = prototypes.unsqueeze(0).unsqueeze(0).expand(B, N, H,F) # [B, N, H, F]

[0186] s_expand = self.perturbation.unsqueeze(0).unsqueeze(0).expand(B,N, H, F)

[0187] # Construct the perturbation response tensor (elemental difference)

[0188] delta = x_expand - p_expand # [B, N, H, F]

[0189] perturb_tensor = delta * s_expand # Perturbation weighting

[0190] # Constructing a gated representation: Input [x, prototype, perturbation]

[0191] concat_feat = torch.cat([x_expand, p_expand, perturb_tensor], dim=-1) # [B, N, H, 3F]

[0192] gate_score = self.gate_fc(concat_feat).squeeze(-1) # [B,N, H]

[0193] gate_weight = self.gate_activation(gate_score) # ∈(0,1), can be used as a structure-selective gate tensor

[0194] # Construct non-normalized structure mapping weights (considering perturbation response strength)

[0195] sim_score = F.cosine_similarity(x_expand, p_expand, dim=-1)# [B, N, H]

[0196] penalty = torch.norm(perturb_tensor, dim=-1) # [B, N,H]

[0197] mapping_weight = sim_score - penalty * gate_weight # Non-normalized weights

[0198] return mapping_weight, gate_weight, perturb_tensor

[0199] # Instantiate the structure mapping module

[0200] structure_mapper = StructuralPerturbationMapping(embed_dim=F, num_prototypes=H)

[0201] # Execute structure perturbation mapping

[0202] mapping_weight, gate_weight, perturb_tensor = structure_mapper(input_embedding, struct_prototypes)

[0203] S23, based on the relationship between the structure disturbance factor and the structure prototype vector, a plurality of coupling driving global scaling factors are designed.

[0204] Further, a plurality of coupling driving global scaling factors are designed based on the relationship between the structure disturbance factor and the structure prototype vector, and a nonlinear enhancement term and a periodic modulation factor are fused to obtain the scaling factor corresponding to each slice through coupling modeling, and the specific mathematical model is:

[0205] ;

[0206] In the formula, is the global scaling factor of the i-th slice under the scale z, is the amplification factor of the polynomial modulation term, which is initially set to 2.5, is the structure disturbance factor of the i-th tower crane tower feature embedding under the scale z, is a polynomial function of the i-th slice structure disturbance factor, is the scaling factor of the frequency control term, which is initially set to 1.8, is the frequency control index of the i-th slice, is the coefficient for controlling the phase shift, which is initially set to 0.5, is the structure prototype vector under the scale z is the average similarity of the current query, is the power index for controlling the strength of the periodic response amplitude, which is initially set to 1.2, and the specific implementation code is:

[0207] B, N = 8, 60

[0208] t_index = torch.linspace(0, 2 * math.pi, N).unsqueeze(0).repeat(B, 1) # Time phase input

[0209] # Hyperparameters

[0210] lambda_poly = 2.5 # Polynomial modulation amplification factor

[0211] omega_scale = 1.8 # Scaling factor for controlling the frequency of the periodic term

[0212] phi_shift = math.pi / 4 # Phase shift

[0213] gamma_power = 1.2 # Power index of the periodic response amplitude

[0214] # Define periodic modulation module

[0215] class PeriodicScalingModule(nn.Module):

[0216] def __init__(self, lambda_poly, omega_scale, phi_shift, gamma_power):

[0217] super().__init__()

[0218] self.lambda_poly = lambda_poly

[0219] self.omega_scale = omega_scale

[0220] self.phi_shift = phi_shift

[0221] self.gamma_power = gamma_power

[0222] def forward(self, t):

[0223] # Trigonometric function modulation term

[0224] trig_term = torch.sin(self.omega_scale * t + self.phi_shift) #[B, N]

[0225] # Polynomial modulation term (power exponent + amplification)

[0226] poly_term = (1 + self.lambda_poly * t**2) # [B, N]

[0227] # Coupled modulation term: Polynomial modulation superposition periodic response

[0228] scale_factor = poly_term * torch.abs(trig_term) ** self.gamma_power # [B, N]

[0229] return scale_factor

[0230] S24. Introducing the outputs of S21 and S22 and multiple couplings to drive the global scaling factor, calculate the structural selective mapping weight, reconstruct and generate the restored tower crane tower body sequence, and obtain the structural selective slice mapping score.

[0231] Further, a structure-selective mapping weight generation strategy is proposed by fusing multi-factor regulation. The structure-selective mapping weight is constructed, the matching relationship between each slice and the structure prototype vector is scaled and adjusted based on the global scaling factor coupled by multiple items, the matching strength after scaling is weighted in a slice-specific manner combined with the structure-selective gating tensor, then the matching similarity between the slice and the structure prototype vector is introduced as the basic structure similarity expression, the product result of each element in the matrix and the length of the structure prototype vector is suppressed and adjusted, the disturbance penalty term is constructed, and the structure-selective mapping weight is obtained, and the specific mathematical model is as follows:

[0232] ;

[0233] In the formula, is the structure-selective mapping weight of the i-th slice corresponding to the j-th structure prototype vector at the scale z, is the structure-selective gating tensor, is the tower crane tower feature embedding, is each element in the matrix , is a non-negative truncation function symbol, is a power index for controlling the response amplitude intensity, the tower crane tower reconstruction result is obtained by weighting and summing all structure prototype vectors with structure-selective mapping weights, and the specific mathematical expression is as follows:

[0234] ;

[0235] In the formula, is the number of structure prototype vectors, which is set to 16, is the structure prototype vector index, is the tower crane tower reconstruction result, the tower crane tower reconstruction results at different scales are fused to form a unified tower crane tower time slice feature , and the decoder is used to reconstruct the restored tower crane tower sequence , the selected slice mapping score is calculated, the deviation between the tower crane tower feature embedding and the tower crane tower reconstruction result is measured by the Euclidean distance, and the specific mathematical model is as follows:

[0236] ;

[0237] In the formula, is the selected slice mapping score, is a normalization coefficient, which is set to 1, is the number of different scales participating in calculation, which is set to 32, For scale index, the implementation code is:

[0238] B, N = 8, 60

[0239] H, F = 16, 32

[0240] # Structure deviation score [B, N]

[0241] structure_deviation_score = torch.rand(B, N)

[0242] # Periodic anomaly response tensor [B, N]

[0243] temporal_anomaly_response = torch.rand(B, N)

[0244] # Time index sequence, construct periodic modulation term [B, N]

[0245] t_index = torch.linspace(0, 2 * math.pi, N).unsqueeze(0).repeat(B, 1)

[0246] class CoupledPeriodicScaler(nn.Module):

[0247] def __init__(self, lambda_poly=2.5, omega=2.2, phi=math.pi / 6, gamma=1.5):

[0248] super().__init__()

[0249] self.lambda_poly = lambda_poly

[0250] self.omega = omega

[0251] self.phi = phi

[0252] self.gamma = gamma

[0253] def forward(self, t): # t: [B, N]

[0254] trig_term = torch.sin(self.omega * t + self.phi) # Triangular periodic modulation

[0255] poly_term = 1 + self.lambda_poly * t ** 2 # Polynomial modulation

[0256] coupled = poly_term * torch.abs(trig_term) ** self.gamma # Coupledization

[0257] return coupled # [B, N]

[0258] class PeriodicAnomalyDiscriminator(nn.Module):

[0259] def __init__(self, embed_dim=32, use_transformer=False):

[0260] super().__init__()

[0261] self.scaler = CoupledPeriodicScaler()

[0262] # Anomaly Score Fusion Network

[0263] if use_transformer:

[0264] encoder_layer = nn.TransformerEncoderLayer(d_model=embed_dim,nhead=4, batch_first=True)

[0265] self.encoder = nn.TransformerEncoder(encoder_layer, num_layers=2)

[0266] self.project = nn.Linear(embed_dim, 1)

[0267] else:

[0268] self.encoder = None

[0269] self.project = nn.Sequential(

[0270] nn.Linear(2, 32),

[0271] nn.ReLU(),

[0272] nn.Linear(32, 1) )

[0274] def forward(self, struct_dev, phase_resp, t_idx):

[0275] # Get period scaling factor [B, N]

[0276] scale = self.scaler(t_idx)

[0277] # Period deviation term = Period response * Scaling factor

[0278] phase_scaled = phase_resp * scale # [B, N]

[0279] # Fuse structure and period deviation [B, N, 2]

[0280] fusion = torch.stack([struct_dev, phase_scaled], dim=-1)

[0281] # Encoder modeling

[0282] if self.encoder is not None:

[0283] encoded = self.encoder(fusion)

[0284] anomaly_logits = self.project(encoded).squeeze(-1) # [B, N]

[0285] else:

[0286] logits = self.project(fusion) # [B, N, 1]

[0287] anomaly_logits = logits.squeeze(-1)

[0288] # Final period anomaly score

[0289] anomaly_score = torch.mean(anomaly_logits, dim=1) # [B]

[0290] return anomaly_score, anomaly_logits, scale

[0291] S31、Input the restored tower crane tower sequence, project to get the phase orbit tensor, perform sliding window operation and construct the phase evolution induction map.

[0292] Further, a phase cycle anomaly modeling module is constructed, as shown in Figure 3 , input the restored tower crane tower sequence , project each restored tower crane tower sequence to the Hilbert phase domain, and the specific mathematical model is as follows:

[0293] ;

[0294] In the formula, is the restored tower crane tower sequence of the t-th time step and the c-th variable, is a phase angle operation of a complex number, is a Hilbert transform operation, is the corresponding phase orbit tensor of the t-th time step and the c-th variable, and the phase evolution induction map is constructed. The sliding window operation is performed on the phase orbit tensor, the cosine value of the phase orbit tensor to the phase trajectory difference in the time period is calculated, the results in the entire window length are averaged, and the phase evolution induction map reflecting the synchronization behavior of the phase orbit tensor in the time window is generated. The specific mathematical model is as follows:

[0295] ;

[0296] In the formula, is the phase evolution induction map of the i-th and j-th phase orbit tensors in the l-th sliding window, is the length of the sliding window, which is set to 120, 、 is the phase orbit tensor of the i-th and j-th variables in the l-th sliding window, is the sliding window, is the time step index in the sliding window, and the specific implementation code is as follows:

[0297] B, C, T = 8, 5, 120

[0298] X_enc = torch.randn(B, C, T) # Encoder output features [B, C, T]

[0299] def extract_phase_trajectory_hilbert(x_tensor):

[0300] phase_tensor = []

[0301] for b in range(x_tensor.shape[0]):

[0302] batch_phase = []

[0303] for c in range(x_tensor.shape[1]):

[0304] signal_np = x_tensor[b, c].detach().cpu().numpy()

[0305] analytic = hilbert(signal_np)

[0306] phase = np.angle(analytic) # [-π, π]

[0307] batch_phase.append(phase)

[0308] phase_tensor.append(batch_phase)

[0309] phase_tensor = np.array(phase_tensor) # [B, C, T]

[0310] return torch.tensor(phase_tensor, dtype=torch.float32)

[0311] def extract_phase_trajectory_stft(x_tensor, window_size=32, hop_length=8):

[0312] B, C, T = x_tensor.shape

[0313] phase_tensor = []

[0314] for b in range(B):

[0315] batch_phase = []

[0316] for c in range(C):

[0317] signal = x_tensor[b, c].detach().cpu().numpy()

[0318] Zxx = scipy.signal.stft(signal, nperseg=window_size, noverlap=window_size - hop_length)

[0319] phase = np.angle(Zxx) # [Freq, Time]

[0320] # Take the phase of the main frequency component

[0321] phase_avg = np.mean(phase[:3, :], axis=0) # [T']

[0322] # Interpolate back to the original length T

[0323] phase_interp = np.interp(np.linspace(0, len(phase_avg) - 1, T),np.arange(len(phase_avg)), phase_avg)

[0324] batch_phase.append(phase_interp)

[0325] phase_tensor.append(batch_phase)

[0326] phase_tensor = np.array(phase_tensor)

[0327] return torch.tensor(phase_tensor, dtype=torch.float32)

[0328] def compute_phase_tensor(X_enc, method='hilbert'):

[0329] if method == 'hilbert':

[0330] return extract_phase_trajectory_hilbert(X_enc)

[0331] elif method == 'stft':

[0332] return extract_phase_trajectory_stft(X_enc)

[0333] else:

[0334] raise ValueError("Unsupported phase method")

[0335] S32. Define a set of prototype diagrams, calculate the structural deviation measure between the phase evolution induced diagram and the prototype diagram, and design a gating factor to dynamically adjust the structural expression of the prototype diagram through a gating mechanism.

[0336] Furthermore, a set of prototype graphs consisting of multiple graph structures is defined. The Frobenius distance is used to calculate the structural deviation measure between each phase evolution induced map and each prototype map. The specific mathematical model is as follows:

[0337] ;

[0338] In the formula, Phase evolution induced graph for the l-th sliding window The structural deviation measure between the k-th prototype diagram and the prototype diagram. This is the phase evolution induced graph of the i-th and j-th phase orbit tensors within the l-th sliding window. For the k-th prototype diagram in the prototype diagram set, Using the Frobenius norm, and combining the original structural state with the current induced graph information, a gating factor is designed. The specific mathematical model for controlling the update magnitude and fusion method is as follows:

[0339] ;

[0340] In the formula, , For a trainable weight matrix, As the activation function, the structural representation of the prototype diagram is dynamically adjusted through a gating mechanism. The specific mathematical model is as follows:

[0341] ;

[0342] where, is the gating factor control, and the implementation code is:

[0343] def compute_phase_diff_cosine(phase_seq):

[0344] B, C, W = phase_seq.shape

[0345] G = torch.zeros(B, C, C)

[0346] for b in range(B):

[0347] for i in range(C):

[0348] for j in range(C):

[0349] diff = phase_seq[b, i] - phase_seq[b, j] # phase difference [W]

[0350] cos_sim = torch.mean(torch.cos(diff)) # phase synchronization degree

[0351] G[b, i, j] = cos_sim

[0352] return G # [B, C, C]

[0353] def build_induced_graphs(phase_tensor, window_size=15, hop=1):

[0354] B, C, T = phase_tensor.shape

[0355] G_list = []

[0356] # sliding window traversal

[0357] for t in range(0, T - window_size + 1, hop):

[0358] window = phase_tensor[:, :, t:t + window_size] # [B, C, W]

[0359] G = compute_phase_diff_cosine(window) # [B, C, C]

[0360] G_list.append(G)

[0361] G_stack = torch.stack(G_list, dim=1) # [B, T', C, C]

[0362] # Pad to the original time length T

[0363] pad_len = T - G_stack.shape[1]

[0364] if pad_len>0:

[0365] pad_tensor = G_stack[:, :1, :, :].repeat(1, pad_len, 1, 1)

[0366] G_full = torch.cat([pad_tensor, G_stack], dim=1) # [B, T, C, C]

[0367] else:

[0368] G_full = G_stack

[0369] return G_full

[0370] S33. The phase response deviation score is obtained by calculating the distance relationship between the induced graph and multiple updated prototype graphs.

[0371] Furthermore, the phase response bias score is calculated, and the corresponding phase evolution induced map is extracted for each sliding window. The Frobenius distance is measured based on the distance relationship between this induced map and multiple updated prototype maps. The specific mathematical model is as follows:

[0372] ;

[0373] In the formula, The phase response deviation score is given. This is the phase evolution induced graph of the i-th and j-th phase orbit tensors within the l-th sliding window. For the k-th prototype diagram in the prototype diagram set, It is the Frobenius norm. To compare all prototypes for k = 1, 2,..., k, select the closest prototype distance as the phase response deviation score, and the specific implementation code is:

[0374] class StructuralPrototypeMatcher(nn.Module):

[0375] def __init__(self, num_prototypes=6, num_vars=5):

[0376] super().__init__()

[0377] self.K = num_prototypes

[0378] self.C = num_vars

[0379] # Prototype parameters

[0380] self.prototypes = nn.Parameter(torch.randn(self.K, self.C,self.C))

[0381] self.symmetrize = True

[0382] # Graph attention layer

[0383] self.attention_layer = nn.MultiheadAttention(embed_dim=self.C *self.C, num_heads=2)

[0384] def forward(self, A_seq):

[0385] B, T, C, _ = A_seq.shape

[0386] K = self.K

[0387] # Flatten the graph into a vector [B, T, C*C]

[0388] A_flat = A_seq.reshape(B, T, -1) # [B, T, C*C]

[0389] G_flat = self.prototypes.reshape(K, -1) # [K, C*C]

[0390] Optional: Graph attention matching

[0391] A_attn_input = A_flat.permute(1, 0, 2) # [T, B, C*C]

[0392] G_attn_input = G_flat.unsqueeze(1).repeat(1, B, 1) # [K, B, C*C]

[0393] G_attn_input = G_attn_input.permute(2, 1, 0) # [C*C, B, K]

[0394] # Attention augmented matching

[0395] _, _ = self.attention_layer(A_attn_input, G_attn_input, G_attn_input) # ignore output, for augmented learnability

[0396] # Compute Frobenius distance as deviation score

[0397] A_exp = A_seq.unsqueeze(2) # [B, T, 1, C, C]

[0398] G_exp = self.prototypes.unsqueeze(0).unsqueeze(0) # [1, 1, K, C,C]

[0399] diff = A_exp - G_exp # [B, T, K, C, C]

[0400] dist = torch.norm(diff, p='fro', dim=(3, 4)) # [B, T, K]

[0401] scores, _ = torch.min(dist, dim=2) # [B, T]

[0402] return scores

[0403] S4, construct an anomaly judgment module, weight and fuse the phase response deviation score and the selected slice mapping score, and set a threshold to judge the tower damage anomaly of the tower crane tower.

[0404] Further, an abnormality judgment module is constructed, and the phase response deviation score is input and the selected slice mapping score , and a multi-source fusion abnormality score is obtained by weighted fusion , and a threshold is set , and the threshold is set to 25, and the tower crane tower damage abnormality judgment is completed.

[0405] Further, the CTS-DAM abnormality detection model is written in Python language, the experiment is run in the Windows operating system, Pytorch is selected as the framework in the CUDA11.27 environment, training is performed on the GeForce RTX 3090, the optimizer is selected, the initial learning rate is set to 0.001, the training batch is set to 64, the training period is set to 100, and the data set is 60 days of tower crane tower related data, which is input into the CTS-DAM abnormality detection model after preprocessing.

[0406] Further, the CTS-DAM abnormality detection model error distribution graph and the tower crane tower damage abnormality detection effect graph are as shown in Figure 4 、 Figure 5 , the abnormal characteristic values detected in Figure 4 fluctuate obviously with time, especially in July and November, respectively, a higher peak value appears, and significantly exceeds the warning threshold and the abnormal threshold, indicating that the system is more sensitive to structural damage at these two time points; at the same time, the abnormal characteristic values in other time periods are maintained at a low level, reflecting the robust response ability of the model to the normal state. In Figure 5 , most of the model errors are concentrated near zero, forming a relatively symmetric distribution, indicating that the overall prediction error of the detection model is small, the deviation is limited, and the model has good stability and robustness, and by setting the zero error demarcation line, the error deviation trend can be observed intuitively, so as to further evaluate the response deviation degree of the model under different states. The results of the two graphs show that the constructed structural damage abnormality detection model has high precision and effective abnormality recognition ability.

Claims

1. A method for detecting abnormal damage to the tower body of a tower crane, characterized in that, Includes the following steps: S1. Collect relevant data about the tower crane tower body, construct a dataset, and divide it into training set, validation set and test set after preprocessing; S2. Construct a junction selection slice mapping module for local perturbation analysis. The specific steps are as follows: S21. The input tower crane tower body data is divided into multiple scales, and a feature encoding method with self-attention mechanism is introduced to calculate the tower crane tower body feature embedding. S22. Input the tower crane tower body features to calculate the structural perturbation factor, and construct the structural perturbation tensor representation matrix to obtain the structural selective gating tensor; S23. Based on the relationship between the structural perturbation factor and the structural prototype vector, design a multi-coupling-driven global scaling factor. The specific steps are as follows: By fusing a nonlinear enhancement term and a periodic modulation factor, the scaling factor for each slice is obtained through coupled modeling. The specific mathematical model is as follows: ; In the formula, At scale z, the multinomial coupling drives the global scaling factor for the i-th slice. The amplification factor of the polynomial modulation term. Let be the structural disturbance factor embedded for the i-th tower crane tower body feature at scale z. Let be a polynomial function of the perturbation factor of the i-th slice structure. To control the scaling factor of the periodic term frequency, Let i be the frequency control index for the i-th slice. To control the phase offset coefficient, For scale z, the structural prototype vector Average similarity to the current query To control the power exponent of the periodic response amplitude intensity; S24. Introduce the outputs of S21 and S22 and multiple couplings to drive the global scaling factor, calculate the structural selective mapping weight, reconstruct and generate the restored tower crane tower body sequence, and obtain the structural selective slice mapping score. S3. Construct a phase response driving module to process periodic anomaly information. The specific steps are as follows: S31. Input the sequence of the tower body of the restored tower crane, project it to obtain the phase orbit tensor, perform sliding window operation and construct the phase evolution induced diagram; S32. Define a set of prototype diagrams, calculate the structural deviation measure between the phase evolution induced diagram and the prototype diagram, and design a gating factor to dynamically adjust the structural representation of the prototype diagram through a gating mechanism. S33. The phase response deviation score is obtained by calculating the distance relationship between the induced graph and multiple updated prototype graphs. S4. Construct an anomaly judgment module, which weights and fuses the phase response deviation score with the selection slice mapping score, and sets a threshold to judge the tower crane tower body damage anomaly.

2. The method for detecting abnormal damage to the tower body of a tower crane according to claim 1, characterized in that, In step S21, the tower crane tower body data is input. By setting fixed scale parameters The input tower crane tower body data is divided into non-overlapping mean values ​​at each scale. The specific mathematical model is as follows: ; In the formula, The scale parameter represents the slice scale. Let be the number of the i-th slice. Number the end time step of the slice. For the tower crane tower body data at time step t, Let be the average vector of the tower crane tower body slices at size z, representing the i-th slice. To achieve the mean value, a feature encoding method with a self-attention mechanism is introduced to calculate the feature embedding of the tower crane tower body. The tower crane tower body slice vector is mapped to a query through three sets of independent linear transformations. ,key Sum ,in , , The weight matrix is ​​learnable. Then, self-attention calculates a similarity score by matching the query with the key. The specific mathematical model is as follows: ; In the formula, For activation function, For feature embedding dimension, Given the transpose of the key, the feature embedding at each scale is represented as: ; In the formula, Let be the similarity score between the i-th query and the j-th key. For the j-th value, This represents the number of tower body slices for a tower crane at scale z. The slice index is the one being observed, indicating the position of all keys and values.

3. The method for detecting abnormal damage to the tower body of a tower crane according to claim 2, characterized in that, In step S22, the tower crane tower body features are embedded. A perturbation response strategy is proposed, which embeds all tower crane tower body features at the current scale and performs reduction processing to obtain a reference center representation at scale z. The specific mathematical expression is as follows: ; In the formula, This represents the number of tower body slices for a tower crane at scale z. Using the slice index, the structural difference between the tower crane tower body feature embedding at each scale and the representation of that reference center is calculated, forming a measurable structural perturbation factor, the specific mathematical expression of which is: ; In the formula, Let be the structural disturbance factor embedded for the i-th tower crane tower body feature at scale z. Let be the squared Euclidean distance. Then, based on the response offset relationship between different tower crane tower body feature embeddings in the embedding space, a structural perturbation tensor representation matrix is ​​constructed. The specific mathematical expression is as follows: ; In the formula, Let be the matrix representing the structural perturbation tensor. To perform softmax normalization on the matching distribution of each slice at each scale z, Let be the j-th structural prototype vector at scale z, representing a predefined structural template. It is a nonlinear mapping function. The number of structural prototype vectors. This is an index for the structural perturbation factor. As the structural prototype vector index, by jointly considering the tower crane tower body feature embedding of the current slice, the structural prototype vector, and the structural perturbation factor, and combining it with trainable linear discriminant parameters, a logical judgment is made on whether to activate each structural prototype path, resulting in a structural selective gating tensor. The specific mathematical expression is as follows: ; In the formula, For activation function, For the gated weight matrix, For gated bias terms, For structure-selective gating tensors.

4. The method for detecting abnormal damage to the tower body of a tower crane according to claim 3, characterized in that, In step S24, a multi-factor-controlled structural selective mapping weight generation strategy is proposed. Structural selective mapping weights are constructed, and the matching relationship between each slice and the structural prototype vector is scaled and adjusted based on a multi-coupling-driven global scaling factor. The scaled matching intensity is then weighted specifically by a structural selective gating tensor. Finally, the matching similarity between the slice and the structural prototype vector is introduced as the basic structural similarity representation, and the matrix is ​​represented by a structural perturbation tensor. The product of each element in the matrix and the magnitude of the structural prototype vector is subjected to suppression adjustment to construct a perturbation penalty term, resulting in the structural selectivity mapping weights. The specific mathematical model is as follows: ; In the formula, For scale z, the structure-selective mapping weights of the i-th slice corresponding to the j-th structural prototype vector. For structure-selective gating tensors Embedded with the tower features of the tower crane. The structural perturbation tensor representation matrix Each element in The symbol for the non-negative truncation function is... To control the power exponent of the periodic response amplitude, the tower crane tower body reconstruction result is obtained by weighting and summing all structural prototype vectors using structural selective mapping weights. The specific mathematical expression is as follows: ; In the formula, The number of structural prototype vectors. This is the index of the structural prototype vector. To obtain the tower crane tower body reconstruction results, the reconstruction results of tower crane tower bodies at different scales are merged to form a unified tower crane tower body time slice feature. Then, the sequence of the tower crane body is reconstructed using a decoder. The selected slice mapping score is calculated, and the deviation between the tower crane tower body feature embedding and the tower crane tower body reconstruction result is measured by Euclidean distance. The specific mathematical model is as follows: ; In the formula, To determine the score for the selected slice mapping, The normalization coefficient is... The number of different scales involved in the calculation. For scale indexing.

5. The method for detecting abnormal damage to the tower body of a tower crane according to claim 4, characterized in that, In step S31, the input sequence for restoring the tower crane tower body is performed. The sequence of each restored tower crane tower body is projected into the Hilbert phase domain. The specific mathematical model is as follows: ; In the formula, For time step t, the reconstructed tower crane tower body sequence for the c-th variable. To perform a phase angle operation for complex numbers, For Hilbert transform operations, For the phase orbit tensor corresponding to the c-th variable at time step t, a phase evolution induced graph is constructed. A sliding window operation is performed on the phase orbit tensor. By calculating the cosine of the phase orbit tensor's phase trajectory difference within that time period, the results are averaged over the entire window length to generate a phase evolution induced graph reflecting the synchronization behavior between phase orbit tensors under that time window. The specific mathematical model is as follows: ; In the formula, This is the phase evolution induced graph of the i-th and j-th phase orbit tensors within the l-th sliding window. The length of the sliding window. , Let i be the phase orbit tensor between the i-th and j-th variables in the l-th sliding window. It is a sliding window. This is the index of the time step within the sliding window.

6. The method for detecting abnormal damage to the tower body of a tower crane according to claim 5, characterized in that, In S32, a set of prototype graphs consisting of multiple graph structures is defined. The Frobenius distance is used to calculate the structural deviation measure between each phase evolution induced graph and each prototype graph. The specific mathematical model is as follows: ; In the formula, Phase evolution induced graph for the l-th sliding window The structural deviation measure between the k-th prototype diagram and the prototype diagram. This is the phase evolution induced graph of the i-th and j-th phase orbit tensors within the l-th sliding window. For the k-th prototype diagram in the prototype diagram set, Using the Frobenius norm, and combining the original structural state with the current induced graph information, a gating factor is designed. The specific mathematical model for controlling the update magnitude and fusion method is as follows: ; In the formula, , For a trainable weight matrix, As the activation function, the structural representation of the prototype diagram is dynamically adjusted through a gating mechanism. The specific mathematical model is as follows: ; In the formula, This is gating factor control.

7. The method for detecting abnormal damage to the tower body of a tower crane according to claim 6, characterized in that, In step S33, the phase response deviation score is calculated, and the corresponding phase evolution induced map is extracted for each sliding window. The Frobenius distance is measured based on the distance relationship between the induced map and multiple updated prototype maps. The specific mathematical model is as follows: ; In the formula, The phase response deviation score is given. This is the phase evolution induced graph of the i-th and j-th phase orbit tensors within the l-th sliding window. For the k-th prototype diagram in the prototype diagram set, It is the Frobenius norm. To compare all prototype maps for k=1,2,...,k, the distance between the closest prototype maps is selected as the phase response bias score.

8. The method for detecting abnormal damage to the tower body of a tower crane according to claim 7, characterized in that, In step S4, an anomaly detection module is constructed, and the phase response deviation score is input. Mapping scores with selected slices Weighted fusion yields multi-source fusion anomaly scores. By setting a threshold This allows for the assessment of abnormal damage to the tower crane's tower body.

Citation Information

Patent Citations

  • Unmanned aerial vehicle data anomaly detection method based on multi-modal time sequence modeling

    CN120337084A

  • Battery anomaly detection method for new energy automobile

    CN120524209A