Bearing fault diagnosis method and device based on clustering and dynamic prompt words
By performing feature clustering on bearing vibration data and selecting the optimal prompt words, the problem of low diagnostic accuracy of existing bearing fault diagnosis methods under complex working conditions is solved, achieving higher fault identification accuracy and model stability.
Patent Information
- Application Number
- CN202611694931.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-30
- Publication Date
- 2026-11-27
AI Technical Summary
Existing bearing fault diagnosis methods based on large language models use a unified prompt word template, which cannot effectively adapt to different fault characteristics, resulting in low diagnostic accuracy, especially poor model output stability under complex working conditions.
The bearing vibration data is clustered using a clustering algorithm to form multiple feature sets. For each set, the optimal prompt words are selected, a mapping relationship is established, and the prompt words are dynamically adjusted to adapt to different fault modes, thereby improving diagnostic accuracy.
It enables finer-grained and more accurate bearing fault diagnosis under complex working conditions, and improves the diagnostic accuracy and stability of large language models under multiple fault types and non-stationary signal conditions.
Smart Images

Figure CN123179254A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of equipment management technology, and in particular to a bearing fault diagnosis method and device based on clustering and dynamic prompts. Background Technology
[0002] Bearings are core transmission components in rotating machinery systems, widely used in wind turbine generators, industrial motors, rail transit equipment, and intelligent manufacturing systems. Because bearings operate under high-speed rotation, alternating loads, and complex conditions for extended periods, they are susceptible to impact stress, lubrication degradation, material fatigue, and component wear, leading to various types of failures, including inner ring failure, outer ring failure, and rolling element failure. Bearing failures not only cause abnormally increased equipment vibration and decreased transmission efficiency but can also further destabilize the entire machine, potentially causing equipment shutdowns and safety accidents in severe cases. Therefore, accurate fault diagnosis of bearing operating conditions is crucial for ensuring the safe operation of industrial equipment and reducing maintenance costs.
[0003] Currently, most bearing fault diagnosis methods based on large language models employ a unified prompt word template for fault identification, meaning that all vibration samples are analyzed using the same reasoning approach. However, bearing fault diagnosis is essentially a multi-fault type identification problem, with significant differences in vibration characteristic distribution, impact periodic structure, and spectral response corresponding to different fault modes. For example, inner ring faults typically exhibit periodic impact enhancement, while outer ring faults are more likely to produce stable sideband structures near a fixed frequency, and rolling element faults often exhibit stronger randomness. Therefore, the focus and reasoning path of the large language model differ for different fault modes. Furthermore, the large language model itself is highly sensitive to prompt words; different prompt words can affect the model's focus on fault features and reasoning process. When a fixed prompt word is used for all fault modes, the model may fail to effectively adapt to different fault characteristics, thereby reducing diagnostic accuracy and reasoning reliability under complex operating conditions.
[0004] Furthermore, bearing vibration signals typically exhibit characteristics such as non-stationarity, long-term sequences, and multi-feature coupling. Traditional single-cue-word approaches cannot fully utilize the analytical capabilities of different inference strategies for complex features. For the same set of input features, different cue words often lead to different diagnostic results from large language models, and existing methods lack a selection mechanism for the effectiveness of cue words, making it difficult to achieve adaptive diagnosis for different fault modes.
[0005] It is evident that existing bearing fault diagnosis schemes based on large language models and employing standardized prompt word templates have low diagnostic accuracy. Summary of the Invention
[0006] The purpose of this invention is to provide a bearing fault diagnosis method and apparatus based on clustering and dynamic prompts, which can solve the above-mentioned problems existing in the prior art.
[0007] To solve the above-mentioned technical problems, the present invention provides the following technical solution: This invention provides a bearing fault diagnosis method based on clustering and dynamic prompts, including: Extract multi-domain features corresponding to each historical bearing vibration data to generate a training feature sequence; The training feature sequences are clustered to obtain multiple category feature sets; For each of the aforementioned category feature sets, the optimal prompt word corresponding to the category feature set is selected from the prompt word candidate pool; Establish a mapping relationship between feature sets of each category and the optimal prompt words; When vibration data of the bearing to be tested exists, determine the target category feature set to which the vibration data of the bearing to be tested belongs; Based on the mapping relationship, determine the optimal prompt word corresponding to the target category feature set; The bearing fault diagnosis results are generated based on the target optimal prompt words.
[0008] This invention also provides a bearing fault diagnosis device based on clustering and dynamic prompts, comprising: The generation module is used to extract multi-domain features corresponding to each historical bearing vibration data and generate training feature sequences. The clustering module is used to perform feature clustering on the training feature sequence to obtain multiple category feature sets; The filtering module is used to select the optimal prompt word corresponding to each category feature set from the prompt word candidate pool for each category feature set; The mapping relationship establishment module is used to establish the mapping relationship between each category of feature sets and the optimal prompt words; The category determination module is used to determine the target category feature set to which the bearing vibration data belongs when there is available vibration data to be tested. The prompt word determination module is used to determine the optimal prompt word for the target category feature set based on the mapping relationship; The result generation module is used to generate bearing fault diagnosis results based on the target optimal prompt words.
[0009] This invention also provides an electronic device, including a processor, a communication interface, a memory, and a communication bus. The processor, communication interface, and memory communicate with each other through the communication bus. The memory is used to store computer programs. When the processor executes the program stored in the memory, it implements any of the above-described bearing fault diagnosis method flows based on clustering and dynamic prompt words.
[0010] The bearing fault diagnosis scheme based on clustering and dynamic prompt words provided in this embodiment of the invention first uses a clustering algorithm to coarsely group the training samples, i.e., historical bearing vibration data, and group samples with similar feature distributions and similar fault behaviors into the same cluster, i.e., set, thereby forming several fault pattern clusters. This ensures that the training samples within each cluster have similar impact characteristics, spectral structure, and time-frequency response. Then, the optimal prompt words are selected based on these differentiated features to guide the large language model to complete a more fine-grained and accurate bearing fault diagnosis. Attached Figure Description
[0011] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is a flowchart illustrating the steps of a bearing fault diagnosis method based on clustering and dynamic prompts according to an embodiment of this application. Figure 2(a) is a flowchart illustrating a specific training and optimization phase according to an embodiment of this application; Figure 2(b) is a flowchart illustrating a specific online diagnostic stage according to an embodiment of this application; Figure 3 This is a structural block diagram illustrating a bearing fault diagnosis device based on clustering and dynamic prompts according to an embodiment of this application. Detailed Implementation
[0012] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of this application. Based on the embodiments of this application, every other embodiment obtained by those skilled in the art without inventive effort falls within the scope of protection of this application.
[0013] Existing bearing fault diagnosis schemes suffer from the following detailed technical problems: The vibration characteristic distribution and spectral structure corresponding to different fault modes differ significantly, and fixed prompt words are insufficient to simultaneously meet the inference requirements of large language models under multiple fault modes. Large language models are highly sensitive to prompt words; different prompt words affect the model's focus on fault features and inference path, leading to significant differences in model output stability under different fault modes. Existing methods lack a prompt word selection mechanism for different fault modes, failing to automatically match more suitable inference prompt words based on fault features, thus limiting the model's generalization ability under complex and cross-condition working conditions. Therefore, this application provides a bearing fault diagnosis scheme based on clustering and dynamic prompt words.
[0014] The bearing fault diagnosis method based on clustering and dynamic prompts provided in this application will be described in detail below with reference to the accompanying drawings, through specific embodiments and application scenarios.
[0015] As attached Figure 1 As shown in the figure, the bearing fault diagnosis method based on clustering and dynamic prompts in this application includes the following steps: Step 101: Extract the multi-domain features corresponding to each historical bearing vibration data and generate a training feature sequence.
[0016] The bearing fault diagnosis method based on clustering and dynamic prompts provided in this application can be applied to electronic devices. The memory of the electronic device stores the computer program corresponding to the method, and the processor runs the computer program stored in the memory to execute the bearing fault diagnosis method based on clustering and dynamic prompts.
[0017] In one optional embodiment, the method for extracting multi-domain features corresponding to each historical bearing vibration data and generating a training feature sequence can be as follows: Historical bearing vibration data is preprocessed; time-domain features, frequency-domain features, and time-frequency-domain features are extracted from the preprocessed historical bearing vibration data to generate training feature sequences.
[0018] Historical bearing vibration data Preprocessing of historical bearing vibration data can include, but is not limited to, normalization, sliding window segmentation, and noise reduction.
[0019] Step 102: Perform feature clustering on the training feature sequences to obtain multiple category feature sets.
[0020] After extracting time-domain, frequency-domain, and time-frequency-domain features from historical bearing vibration data, feature clustering is performed on all training samples in a unified feature space. The clustering process is not pre-defined based on fault labels, but rather automatically forms several feature clusters based on the similarity of feature distributions among the training samples. Since similar or identical fault modes typically possess similar impact characteristics, spectral structures, and time-frequency responses, the different feature clusters formed after clustering can correspond to the feature distribution patterns under different fault modes, thus achieving a preliminary classification of complex fault modes. Here, a feature cluster is essentially a set of category features.
[0021] In practical implementation, time-domain, frequency-domain, and time-frequency-domain features are extracted from the preprocessed historical bearing vibration data to construct training feature sequences. ,in , Representing time-domain features, Represents frequency domain characteristics, Representing time-frequency domain features. The K-means algorithm is used to train the feature sequences. Clustering is performed to obtain Fault Category Based on the clustering results, establish a set of features corresponding to each fault category. Fault categories can also be called clustering categories. Indicates the number of training samples. Indicates the training sample number. Indicates the number of cluster categories. Indicates the first There are several cluster categories.
[0022] Step 103: For each category feature set, select the optimal prompt word corresponding to the category feature set from the prompt word candidate pool.
[0023] In this embodiment, a corresponding candidate pool of prompt words is constructed for different cluster categories. These pools are pre-set by experts in the field of bearing fault diagnosis and can be generated with the assistance of a large language model. Different prompt words are designed around different fault analysis strategies, such as fault mechanism analysis, explanation of typical features, empirical rule reasoning, and comprehensive judgment. This enables the large language model to adopt a more appropriate reasoning path when facing different fault cluster categories, thereby improving its ability to identify complex fault features.
[0024] In an optional embodiment, the method of selecting the optimal prompt word corresponding to each category feature set from the prompt word candidate pool may include the following sub-steps: Sub-step 1: For each category feature set, calculate the average confidence level of the category feature set under each prompt candidate word in the prompt candidate pool.
[0025] More preferably, for each category feature set and each prompt candidate word, the confidence level of each training sample in the category feature set under the prompt candidate word is calculated; the average confidence level of each training sample in the category feature set under the prompt candidate word is determined as the average confidence level of the category feature set under the prompt candidate word.
[0026] For example, if a categorical feature set contains X, Y, and Z training feature sequences, and the prompt word candidate pool contains three prompt candidate words A, B, and C, then it is necessary to calculate XA, XB, XC, YA, YB, YC, ZA, ZB, and ZC to obtain 9 confidence scores. The average confidence score of XA, YA, and ZA is determined as the average confidence score of the categorical feature set under prompt candidate word A; the average confidence score of XB, YB, and ZB is determined as the average confidence score of the categorical feature set under prompt candidate word B; and the average confidence score of XC, YC, and ZC is determined as the average confidence score of the categorical feature set under prompt candidate word C.
[0027] Sub-step 2: For each category feature set, calculate the diagnostic accuracy corresponding to each prompt candidate word in the prompt candidate pool, and filter the candidate prompt word set based on the diagnostic accuracy.
[0028] Specifically, the diagnostic accuracy of each prompt candidate word can be calculated based on the real fault labels of each training sample in the category feature set; the prompt candidate words can then be selected from high to low diagnostic accuracy. These 100 candidate words form a set of candidate prompt words.
[0029] Sub-step 3: Based on the average confidence level of each candidate word in the candidate suggestion word set, select the optimal suggestion word corresponding to the category feature set.
[0030] Specifically, the candidate word with the highest average confidence is selected from the candidate word set and used as the optimal word corresponding to the current category feature set.
[0031] Relying solely on training accuracy for prompt word selection, while reflecting the basic diagnostic performance of prompt words on known samples, can easily bias the prompt words towards specific sample distributions, thus weakening their generalization ability on unseen samples, cross-condition samples, and complex field data. Therefore, this application further introduces a prompt word confidence evaluation index to measure the stable guidance ability of prompt words in the reasoning process of a large language model. By combining training accuracy with output probability distribution features, the problem of prompt words performing well on training samples but failing to adapt well across samples and conditions can be alleviated, thereby improving the generalization ability of the large language model in complex situations.
[0032] Obtained through clustering Fault Category For each fault category, perform the following operations: Determine the fault category. Corresponding prompt word candidate pool Targeting the candidate word pool for prompt words Each prompt candidate word The average log-conditional probability of the output sequence of each training sample after processing under the prompt candidate word is calculated as the confidence of the training sample. The average generation confidence of the prompt candidate word is obtained by averaging the probabilities across all training samples included in the current fault category. Average confidence level, select fault category The suggestion candidate word with the highest average confidence in the corresponding suggestion word candidate pool is taken as the optimal suggestion word corresponding to the current category feature set. Here, the fault category contains multiple training samples, and each training sample corresponds to a training feature sequence. Specifically, the average log-conditional probability can be calculated based on the log-conditional probability of each word in the output sequence, and the confidence of a single sample can be obtained through exponential transformation.
[0033] In actual implementation, a candidate set can also be filtered from the prompt word candidate pool. Only calculate The average confidence of each suggestion candidate word in the current category feature set. In the candidate set... Select the candidate word with the highest average confidence as the optimal prompt word corresponding to the current category feature set. .
[0034] Step 104: Establish the mapping relationship between the feature sets of each category and the optimal prompt words.
[0035] Having determined the optimal prompt words for each category feature set in step 103, this step establishes a mapping relationship between the category feature sets and the optimal prompt words. These mapping relationships can be stored and managed in the form of mapping tables, databases, or other forms; this embodiment does not impose specific limitations on this.
[0036] Step 105: When the vibration data of the bearing to be tested exists, determine the target category feature set to which the vibration data of the bearing to be tested belongs.
[0037] In this embodiment, a mapping library between the optimal prompt words and the category feature set is established, so that the input test sample can automatically call the corresponding optimal prompt words according to the category feature set to which it belongs, thereby realizing the selection of prompt words for different situations in the bearing detection process.
[0038] In an optional embodiment, when vibration data of the bearing to be tested exists, the method for determining the target category feature set to which the vibration data of the bearing to be tested belongs can be as follows: when vibration data of the bearing to be tested exists, the vibration data of the bearing to be tested is preprocessed; time-domain features, frequency-domain features, and time-frequency-domain features are extracted from the preprocessed vibration data of the bearing to be tested to generate a test feature sequence; based on the training feature sequence... For each cluster center obtained by mean clustering, calculate the distance between the test feature sequence and each cluster center, and determine the category feature set corresponding to the cluster center with the smallest distance as the target category feature set.
[0039] Step 106: Determine the optimal prompt word for the target category feature set based on the mapping relationship.
[0040] Step 107: Generate bearing fault diagnosis results based on the target optimal prompt words.
[0041] By inputting the target optimal prompt word into a large language model for inference, bearing fault diagnosis results can be obtained. The specific implementation logic for generating bearing fault diagnosis results based on the input prompt word in the large language model can refer to existing related technologies; this application does not impose specific limitations on this aspect.
[0042] The bearing fault diagnosis method based on clustering and dynamic prompt words provided in this application first uses a clustering algorithm to coarsely group the training samples, i.e., historical bearing vibration data, and group samples with similar feature distributions and similar fault behaviors into the same cluster, i.e., set, thereby forming several fault pattern clusters. This ensures that the training samples within each cluster have similar impact characteristics, spectral structure, and time-frequency response. Then, the optimal prompt words are selected based on these differentiated features to guide the large language model to complete a more fine-grained and accurate bearing fault diagnosis.
[0043] The bearing fault diagnosis method based on clustering and dynamic prompts provided in this application will be described below with specific examples.
[0044] The bearing fault diagnosis method based on clustering and dynamic prompts provided in this application includes a training and optimization stage and an online diagnosis stage. The specific process of the training and optimization stage is shown in Figure 2(a), and the specific process of the online diagnosis stage is shown in Figure 2(b).
[0045] As shown in Figure 2(a), the training and optimization phase includes the following process: 1. Preprocessing of historical bearing vibration data; 2. Multi-domain feature extraction; 3. Feature clustering; 4. Establishment of category feature sets; 5. Optimization of prompt words; 6. Selection of optimal prompt words; 7. Establishment of category-prompt word mapping. The specific process will be explained below with reference to a specific example.
[0046] 1. Preprocessing of historical bearing vibration data During bearing operation, vibration signals are collected using accelerometers to obtain large-scale time-series data for fault diagnosis. Since the raw vibration signal data is large and contains noise interference, preprocessing of the raw data is necessary, followed by extraction of high-information-density features.
[0047] 2. Multi-domain feature extraction The bearing vibration signal is segmented using a sliding window, and time-domain, frequency-domain, and time-frequency-domain features are extracted. Time-domain features may include root mean square value, peak factor, kurtosis, skewness, and variance; frequency-domain features may include fault characteristic frequency energy, spectral peak value, and envelope spectrum features; and time-frequency-domain features may include wavelet packet energy and time-frequency entropy.
[0048] Finally, the training feature sequence is constructed: ,in Indicates the first The feature vector corresponding to each training sample.
[0049] 3. Feature clustering Based on feature extraction, the K-means clustering algorithm is used to classify different fault modes. Since K-means clustering is highly susceptible to the influence of feature dimensions, a normalization operation can be performed before feature clustering. The normalization operation is as follows:
[0050] in, Represents the normalized i-th The first sample Dimensional features, and The first The mean and standard deviation of the dimensional features; This represents the eigenvalues before normalization.
[0051] The K-means algorithm calculates the distance between a sample and its cluster center, grouping samples with similar feature distributions into the same category, thereby enabling cluster identification of different fault modes.
[0052] The objective function of the K-means algorithm is as follows:
[0053] in, This represents the value of the K-means clustering objective function. Indicates the first Cluster categories, Indicate category Cluster centers Indicates belonging to a category The training feature vectors, This indicates the number of cluster categories.
[0054] After initial clustering to determine different fault modes, different cluster categories correspond to feature distributions under different fault modes. Since K-means clustering is based on feature space distance, training samples within the same cluster typically have similar time-domain impact features, frequency-domain energy distributions, and time-frequency structure characteristics, thus corresponding to similar fault manifestations. Because the large language model focuses on different fault features under different fault modes, different inference strategies are needed for different cluster categories to improve the model's analytical ability for the current fault mode. A corresponding prompt word pool is constructed for each cluster category. These prompt words combine knowledge from the bearing fault diagnosis domain with different fault analysis approaches, and are either manually constructed by domain experts or generated with the assistance of the large language model. Different prompt words correspond to different fault analysis strategies, including spectral feature analysis, impact period analysis, fault mechanism inference, and empirical diagnostic inference. Because the focus of fault features differs across cluster categories, different combinations of prompt words are needed to guide the large language model, thereby improving its inference ability under the current fault mode.
[0055] 4. Establish a set of category features After feature clustering, multiple cluster categories can be obtained, and each cluster category corresponds to a set of category features.
[0056] 5. Optimization of prompt words For cluster categories Each suggestion candidate word The bearing vibration features from the corresponding cluster categories are input into the large language model for fault diagnosis inference, resulting in the output sequence: in, The first one generated by the large language model Each word element.
[0057] Since different prompt words have different guiding abilities for the reasoning process of large language models, this application further introduces a prompt candidate word confidence evaluation mechanism based on generation probability to evaluate the reasoning reliability of different prompt candidate words in the current failure mode.
[0058] Specifically, for each word in the output sequence Large language models will generate corresponding conditional probabilities:
[0059] in, Indicates the characteristics of the input bearing. Indicates the current suggested candidate word. This indicates that a sequence of lexical units has been generated. Further, it defines suggestive candidate words. The confidence level is: in, This is the length of the output sequence; Generate the conditional probability of the current word for the model.
[0060] When the confidence level of the prompt candidate word is high, it indicates that the large language model generates more certain results under the current fault mode, and the prompt candidate word can more stably guide the model to complete the fault diagnosis task, thus its reliability is higher.
[0061] Subsequently, the current cluster category The average confidence score of the suggestion candidate word in the current failure mode is obtained by averaging the confidence scores of all training samples.
[0062] in, This represents the training sample set.
[0063] Finally, since model confidence is mainly used to measure the output certainty and reasoning consistency of a large language model under the current prompt word conditions, it is more suitable for dynamic prompt word selection in unlabeled scenarios during the testing phase. In this invention, since the training samples corresponding to the clustering phase have real fault labels, the prompt words can be further screened prior by combining the supervised accuracy, thereby improving the reliability of prompt word selection under different clustering categories.
[0064] Specifically, for cluster categories Each prompt word First, the diagnostic accuracy is calculated based on the true labels of the training samples. Then, select those with higher accuracy. The prompt words constitute the candidate prompt word set. This is used to ensure that candidate prompts have good basic fault diagnosis capabilities.
[0065] Furthermore, even if different prompt words have similar accuracy rates, their corresponding large language model output probability distributions may still differ significantly. That is, while some prompt words may achieve high training accuracy, the model generation process may exhibit substantial fluctuations and uncertainties. Therefore, this invention further calculates the corresponding model confidence based on the model output conditional probability distribution. It is used to evaluate the ability of prompt words to stably guide the reasoning process of a large language model under the current failure mode.
[0066] 6. Select the optimal prompt word In the candidate prompt word set Select the prompt word with the highest model confidence as the optimal prompt word for the current cluster category:
[0067] in, Indicates cluster categories The corresponding optimal prompt word.
[0068] 7. Establish category-hint mapping A mapping relationship is established between cluster categories and corresponding optimal prompt words, forming a mapping library between optimal prompt words and cluster categories.
[0069] The specific process of the online diagnosis stage is shown in Figure 2(b), which includes the following steps: 1. Data preprocessing; 2. Multi-domain feature extraction; 3. Category classification; 4. Calling the optimal prompt words; 5. Large model inference; 6. Output results.
[0070] In the actual online diagnosis phase, after inputting the test bearing vibration data, the data is used as a test sample for data preprocessing and multi-domain feature extraction to construct a test feature sequence. Based on the K-means clustering center in the training phase, the nearest neighbor division is performed to determine the cluster category. Then, the optimal prompt word corresponding to the cluster category is automatically called and input into the large language model, and finally the bearing fault diagnosis result is output.
[0071] Compared to traditional fixed prompt word methods, the bearing fault diagnosis method based on clustering and dynamic prompt words provided in this application can select the most suitable prompt word for the current test sample after initially judging different faults, thereby improving the bearing fault diagnosis accuracy of large language models under complex working conditions, multiple fault types, and non-stationary signal conditions.
[0072] Figure 3 The structural block diagram of a bearing fault diagnosis device based on clustering and dynamic prompts according to an embodiment of this application is shown.
[0073] The bearing fault diagnosis device based on clustering and dynamic prompts provided in this application includes the following functional modules: The generation module 301 is used to extract multi-domain features corresponding to each historical bearing vibration data and generate a training feature sequence. Clustering module 302 is used to perform feature clustering on the training feature sequence to obtain multiple category feature sets; The filtering module 303 is used to select the optimal prompt word corresponding to each category feature set from the prompt word candidate pool for each category feature set; The mapping relationship establishment module 304 is used to establish the mapping relationship between each category feature set and the optimal prompt word; The category determination module 305 is used to determine the target category feature set to which the bearing vibration data to be tested belongs when there is existing bearing vibration data to be tested. The prompt word determination module 306 is used to determine the optimal prompt word for the target category feature set based on the mapping relationship; The result generation module 307 is used to generate bearing fault diagnosis results based on the target optimal prompt words.
[0074] Optionally, the generation module includes: The preprocessing submodule is used to preprocess historical bearing vibration data; The feature sequence generation submodule is used to extract time-domain features, frequency-domain features, and time-frequency-domain features from the preprocessed historical bearing vibration data to generate training feature sequences.
[0075] Optionally, the filtering module includes: The first submodule is used to calculate, for each of the category feature sets, the diagnostic accuracy and average confidence of the category feature set under each prompt candidate word in the prompt candidate pool; The second submodule is used to filter a preset number of candidate words based on their diagnostic accuracy rates, from highest to lowest. These 100 candidate words constitute a set of candidate prompt words. The selection submodule is used to select the suggestion candidate with the highest average confidence as the optimal suggestion word corresponding to the category feature set, based on the average confidence of each suggestion candidate word in the suggestion word set.
[0076] Optionally, the first submodule is specifically used for: For each of the category feature sets and each of the suggestion candidate words, calculate the confidence level of each training feature sequence in the category feature set under the suggestion candidate word; The average confidence level of each training feature sequence in the category feature set under the prompt candidate word is determined as the average confidence level of the category feature set under the prompt candidate word.
[0077] Optionally, the category determination module includes: The third submodule is used to preprocess the vibration data of the bearing to be tested when the vibration data of the bearing to be tested exists. The fourth submodule is used to extract time-domain features, frequency-domain features, and time-frequency-domain features from the preprocessed bearing vibration data to generate a test feature sequence. The fifth submodule is used to calculate the distance between the test feature sequence and each cluster center obtained by K-means clustering of the training feature sequence, and to determine the category feature set corresponding to the cluster center with the smallest distance as the target category feature set.
[0078] The embodiments provided in this application Figure 3 The bearing fault diagnosis device based on clustering and dynamic prompts shown can achieve... Figure 1 The various processes implemented in the method implementation examples will not be described again here to avoid repetition.
[0079] This invention also provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus.
[0080] Memory, used to store computer programs; When the processor executes the program stored in the memory, it implements the bearing fault diagnosis method based on clustering and dynamic prompts shown in the above method embodiments.
[0081] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc.
[0082] The communication interface is used for communication between the aforementioned terminal and other devices.
[0083] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0084] In another embodiment of the present invention, a computer-readable storage medium is also provided, which stores instructions that, when executed on an electronic device, cause the electronic device to implement the bearing fault diagnosis method based on clustering and dynamic prompt words as described in any of the above embodiments.
[0085] In another embodiment of the present invention, a computer program product containing instructions is also provided, which, when run on an electronic device, enables the electronic device to implement the bearing fault diagnosis method based on clustering and dynamic prompt words as described in any of the above embodiments.
[0086] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0087] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A bearing fault diagnosis method based on clustering and dynamic prompts, characterized in that, The method includes: Extract multi-domain features corresponding to each historical bearing vibration data to generate a training feature sequence; The training feature sequences are clustered to obtain multiple category feature sets; For each of the aforementioned category feature sets, the diagnostic accuracy and average confidence of the category feature set under each prompt candidate word in the prompt word candidate pool are calculated respectively; Based on the diagnostic accuracy corresponding to each of the suggested candidate words, a preset number are selected according to the diagnostic accuracy from high to low. These 100 candidate words constitute a set of candidate prompt words. Based on the average confidence level of each candidate word in the candidate suggestion word set, the candidate word with the highest average confidence level is selected as the optimal suggestion word corresponding to the category feature set. Establish a mapping relationship between feature sets of each category and the optimal prompt words; When vibration data of the bearing to be tested exists, determine the target category feature set to which the vibration data of the bearing to be tested belongs; Based on the mapping relationship, determine the optimal prompt word corresponding to the target category feature set; The bearing fault diagnosis results are generated based on the target optimal prompt words.
2. The method according to claim 1, characterized in that, The steps for extracting multi-domain features corresponding to each historical bearing vibration data and generating training feature sequences include: Preprocess historical bearing vibration data; The preprocessed historical bearing vibration data is subjected to time-domain features, frequency-domain features, and time-frequency-domain features extraction to generate training feature sequences.
3. The method according to claim 2, characterized in that, For each of the aforementioned category feature sets, the step of calculating the average confidence score of the category feature set under each prompt candidate word in the prompt word candidate pool includes: For each of the category feature sets and each of the suggestion candidate words, calculate the confidence level of each training feature sequence in the category feature set under the suggestion candidate word; The average confidence level of each training feature sequence in the category feature set under the prompt candidate word is determined as the average confidence level of the category feature set under the prompt candidate word.
4. The method according to claim 1, characterized in that, When vibration data of a bearing to be tested exists, the step of determining the target category feature set to which the vibration data of the bearing to be tested belongs includes: When vibration data of the bearing to be tested is available, the vibration data of the bearing to be tested is preprocessed. The preprocessed bearing vibration data to be tested is subjected to time-domain features, frequency-domain features, and time-frequency-domain features extraction to generate a test feature sequence; Based on the cluster centers obtained by K-means clustering of the training feature sequence, the distance between the test feature sequence and each cluster center is calculated, and the category feature set corresponding to the cluster center with the smallest distance is determined as the target category feature set.
5. A bearing fault diagnosis device based on clustering and dynamic prompts, characterized in that, The device includes: The generation module is used to extract multi-domain features corresponding to each historical bearing vibration data and generate training feature sequences. The clustering module is used to perform feature clustering on the training feature sequence to obtain multiple category feature sets; The filtering module is used to calculate the diagnostic accuracy and average confidence of each category feature set under each prompt candidate word in the prompt candidate pool for each category feature set; and to filter a preset number of prompt candidate words according to the diagnostic accuracy of each prompt candidate word from high to low. A set of candidate suggestion words is formed by selecting 10 candidate suggestion words; based on the average confidence level of each candidate suggestion word in the set of candidate suggestion words, the candidate suggestion word with the highest average confidence level is selected as the optimal suggestion word corresponding to the category feature set. The mapping relationship establishment module is used to establish the mapping relationship between each category of feature sets and the optimal prompt words; The category determination module is used to determine the target category feature set to which the bearing vibration data belongs when there is available vibration data to be tested. The prompt word determination module is used to determine the optimal prompt word for the target category feature set based on the mapping relationship; The result generation module is used to generate bearing fault diagnosis results based on the target optimal prompt words.
6. The apparatus according to claim 5, characterized in that, The generation module includes: The preprocessing submodule is used to preprocess historical bearing vibration data; The feature sequence generation submodule is used to extract time-domain features, frequency-domain features, and time-frequency-domain features from the preprocessed historical bearing vibration data to generate training feature sequences.
7. The apparatus according to claim 5, characterized in that, The filtering module includes: The first submodule is used to calculate, for each of the category feature sets, the diagnostic accuracy and average confidence of the category feature set under each prompt candidate word in the prompt candidate pool; The second submodule is used to filter a preset number of candidate words based on their diagnostic accuracy rates, from highest to lowest. These 100 candidate words constitute a set of candidate prompt words. The selection submodule is used to select the suggestion candidate with the highest average confidence as the optimal suggestion word corresponding to the category feature set, based on the average confidence of each suggestion candidate word in the suggestion word set.
8. The apparatus according to claim 5, characterized in that, The category determination module includes: The third submodule is used to preprocess the vibration data of the bearing to be tested when the vibration data of the bearing to be tested exists. The fourth submodule is used to extract time-domain features, frequency-domain features, and time-frequency-domain features from the preprocessed bearing vibration data to generate a test feature sequence. The fifth submodule is used to calculate the distance between the test feature sequence and each cluster center obtained by K-means clustering of the training feature sequence, and to determine the category feature set corresponding to the cluster center with the smallest distance as the target category feature set.
