Method and device for bearing fault diagnosis based on model confidence and cue words
By extracting bearing vibration data features and calculating model confidence based on model confidence and prompt words, and dynamically selecting the optimal prompt words, the problem of prompt word sensitivity and dynamic adaptation of large language models in bearing fault diagnosis is solved, thereby improving the accuracy and stability of diagnosis.
Patent Information
- Application Number
- CN202611669391.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-27
- Publication Date
- 2026-11-24
AI Technical Summary
Existing bearing fault diagnosis methods based on large language models suffer from unstable diagnostic results and low accuracy under complex operating conditions due to their high sensitivity to cue words and lack of dynamic evaluation mechanisms.
Feature vectors are generated by extracting multi-domain features from bearing vibration data. These feature vectors, along with multiple candidate prompt words, are then input into a large language model for fault diagnosis inference. The model confidence of the candidate prompt words is calculated, and the optimal prompt word is dynamically selected to generate bearing fault diagnosis results.
It improves the accuracy and stability of bearing fault diagnosis, adapts to different sample characteristics and operating condition changes, and realizes sample-level dynamic prompt word selection.
Smart Images

Figure CN123159558A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of equipment fault diagnosis technology, and in particular to a bearing fault diagnosis method and apparatus based on model confidence and cue words. Background Technology
[0002] Bearings, as key components in rotating machinery systems, are widely used in motors, wind power equipment, industrial transmission systems, and intelligent manufacturing equipment. During long-term operation, bearings are susceptible to impact loads, poor lubrication, fatigue wear, and complex changes in operating conditions, leading to various failure modes such as inner ring failure, outer ring failure, and rolling element failure. When a bearing fails, it can cause increased equipment vibration, decreased operational stability, and in severe cases, even equipment shutdown and safety accidents. Therefore, accurate fault diagnosis of bearing operating conditions is of great importance.
[0003] Currently, most bearing fault diagnosis methods based on large language models employ fixed prompts for inference analysis, meaning a uniform prompt is used for diagnosis across all input samples. However, large language models are highly sensitive to prompts; even with consistent input features, different prompts can lead to different inference paths, focuses, and final diagnostic results. Furthermore, bearing vibration signals typically exhibit non-stationarity, long-term sequences, and multi-feature coupling. Different samples show significant differences in fault type, spectral structure, and local impact characteristics, resulting in varying "optimal diagnostic inference logic." Therefore, due to the combined effects of large language models' sensitivity to prompts and significant differences in sample features, fixed prompts struggle to adapt to different samples and inference states simultaneously. This can easily lead to unstable output, decreased inference reliability, and reduced diagnostic accuracy under complex operating conditions.
[0004] Furthermore, existing bearing fault diagnosis schemes that use fixed prompts for reasoning analysis lack a dynamic evaluation mechanism for the effectiveness of these prompts. They cannot automatically select the most suitable prompts based on the actual characteristics of individual samples, and typically rely on offline screening of prompts using training set labels. This approach not only heavily depends on labeled data but also struggles to reflect the real-time reasoning state of each sample during the testing phase, making it unsuitable for sample-level dynamic prompt selection.
[0005] It is evident that existing bearing fault diagnosis schemes based on large language models and using fixed prompt words have low accuracy. Summary of the Invention
[0006] The purpose of this invention is to provide a bearing fault diagnosis method and apparatus based on model confidence and prompt words, 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 model confidence and cue words, wherein the method includes: Extract multi-domain features corresponding to bearing vibration data and generate feature vectors; The feature vector and prompt word template are input into a large language model for fault diagnosis reasoning to obtain N output sequences. The prompt word template includes N candidate prompt words, and the output sequence includes multiple lexical units and lexical unit probability distributions. For each candidate suggestion word, the model confidence level corresponding to the candidate suggestion word is calculated based on the probability distribution of the lexical units contained in the output sequence corresponding to the candidate suggestion word; Select the target prompt word based on the model confidence score corresponding to each of the candidate prompt words; The bearing fault diagnosis results are generated based on the target prompt words.
[0008] This invention also provides a bearing fault diagnosis device based on model confidence and cue words, wherein the device includes: The extraction module is used to extract multi-domain features corresponding to bearing vibration data and generate feature vectors; The input module is used to input the feature vector and the prompt word template into the large language model for fault diagnosis reasoning, and obtain N output sequences. The prompt word template includes N candidate prompt words, and the output sequence includes multiple lexical units and lexical unit probability distributions. The calculation module is used to calculate the model confidence of each candidate prompt word based on the probability distribution of the lexical units contained in the output sequence corresponding to the candidate prompt word. The selection module is used to select target prompt words based on the model confidence scores corresponding to each of the candidate prompt words; The generation module is used to generate bearing fault diagnosis results based on the target 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 via the communication bus. The memory stores computer programs. When the processor executes the program stored in the memory, it implements any of the above-described bearing fault diagnosis methods based on model confidence and prompt words.
[0010] The bearing fault diagnosis scheme based on model confidence and prompt words provided in this invention extracts multi-domain features corresponding to bearing vibration data to generate feature vectors. These feature vectors and prompt word templates are then input into a large language model for fault diagnosis inference, resulting in N output sequences. For each candidate prompt word, the model confidence corresponding to that prompt word is calculated based on the probability distribution of the lexical units contained in the output sequence. A target prompt word is selected based on the model confidence of each candidate prompt word. Finally, a bearing fault diagnosis result is generated based on the target prompt word. This scheme, by constructing a prompt word template library and combining it with the model confidence of the large language model during inference, can dynamically determine the optimal prompt word (target prompt word) for each input sample, thereby improving the accuracy of bearing fault diagnosis under complex operating conditions. 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 model confidence and prompt words according to an embodiment of this application; Figure 2 This is a flowchart illustrating another bearing fault diagnosis method based on model confidence and prompt words according to an embodiment of this application; Figure 3 This is a structural block diagram illustrating a bearing fault diagnosis device based on model confidence and prompt words 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: First, large language models are highly sensitive to prompt words; different prompt words affect the model's focus on fault features and inference path, making it difficult to adapt fixed prompt words to bearing fault diagnosis tasks under complex operating conditions. Second, bearing vibration data exhibits significant differences in time-frequency domain features and fault types, leading to significant variations in the adaptability of prompt words to the model's inference process across different samples, thus affecting the diagnostic reliability of large language models. Third, existing prompt word selection methods largely rely on training set screening, lacking a mechanism to directly evaluate the stability of prompt word inference under test sample input conditions, thus failing to achieve sample-level dynamic prompt word selection. Therefore, this application provides a bearing fault diagnosis scheme based on model confidence and prompt words.
[0014] The bearing fault diagnosis method based on model confidence and prompt words 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, the bearing fault diagnosis method based on model confidence and cue words in this application includes the following steps: Step 101: Extract the multi-domain features corresponding to the bearing vibration data and generate feature vectors.
[0016] The bearing fault diagnosis method based on model confidence and prompt words provided in this application embodiment 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 model confidence and prompt words.
[0017] In this embodiment, bearing vibration data is preprocessed, and time-domain, frequency-domain, and time-frequency-domain features are extracted to form a high-information-density feature vector that can characterize the fault state of the sample. In an optional embodiment, the method for extracting multi-domain features corresponding to the bearing vibration data and generating the feature vector can be as follows: preprocessing the bearing vibration data; extracting time-domain, frequency-domain, and time-frequency-domain features from the preprocessed bearing vibration data to generate a feature vector.
[0018] A set of bearing vibration data can be regarded as x i In practical implementation, multiple sets of bearing vibration data can be collected at preset time intervals as the input of the bearing vibration data stream to be tested. The bearing vibration data stream to be tested can be represented as follows: In step 101, multi-domain features corresponding to each group of bearing vibration data are extracted. The test bearing vibration data... Preprocessing is performed, including normalization, sliding window segmentation, and noise reduction.
[0019] Time-domain, frequency-domain, and time-frequency-domain features were extracted from the bearing vibration data at n preprocessed sampling time points to construct a feature vector sequence. ,in , Representing time-domain features, Represents frequency domain characteristics, Representing time-frequency domain characteristics. In one embodiment of this application, a set of bearing vibration data (i.e., a test sample x) is used. i Taking the processing of feature vectors after extracting multi-domain features as an example, the processing flow for each feature vector in the feature vector sequence is the same in the specific implementation process.
[0020] Step 102: Input the feature vector and prompt word template into the large language model for fault diagnosis reasoning to obtain N output sequences.
[0021] The prompt word template includes N candidate prompt words, and each output sequence includes multiple lexical units and lexical unit probability distributions.
[0022] In this embodiment, multiple prompt word templates with different styles are pre-constructed. These templates can be preset by experts or automatically generated by the large language model. Their function is to guide the large language model to analyze the same set of bearing features based on different reasoning strategies. In actual fault diagnosis reasoning, this embodiment does not directly use fixed prompt words for reasoning. Instead, for each test sample (i.e., the bearing vibration data to be tested), the feature vector corresponding to it is combined with multiple candidate prompt words and input into the large language model to obtain the generated result sequence under different prompt word conditions, namely the N output sequences mentioned above.
[0023] In one optional embodiment, the method of inputting the feature vector and prompt word template into the large language model for fault diagnosis reasoning to obtain N output sequences can be as follows: the candidate prompt words in the feature vector and prompt word template are combined separately and then input into the large language model; the large language model generates an output sequence for each combination, wherein the output sequence includes multiple lexical units and lexical unit probability distributions.
[0024] Step 103: For each candidate prompt word, calculate the model confidence level corresponding to the candidate prompt word based on the probability distribution of the lexical units contained in the output sequence corresponding to the candidate prompt word.
[0025] In this embodiment, the model confidence during the large language model generation process is calculated by combining the feature vector corresponding to the currently input test sample and the corresponding prompt word template. Specifically, under the combined effect of the input test sample and the prompt word template, the large language model generates a corresponding output sequence and can provide the conditional probability distribution of the corresponding word elements in each generation step. The model confidence corresponding to the current prompt word can be calculated based on the probability distribution of each word element contained in the output sequence generated by the large language model. This model confidence is used to characterize the output determinism and inference determinism of the large language model under the condition of the feature vector corresponding to the current test sample and the current prompt word. The higher the model confidence, the more stably the prompt word can guide the large language model to complete the fault diagnosis task of the current test sample. Therefore, in this embodiment, it is necessary to calculate the model confidence corresponding to each candidate prompt word in the prompt word template.
[0026] In an optional embodiment, the method for calculating the model confidence of each candidate prompt word based on the probability distribution of the lexical units contained in the output sequence corresponding to the candidate prompt word may include the following sub-steps: Sub-step 1: For each candidate prompt word, determine the probability distribution of word elements in the output sequence; Sub-step 2: Determine the length of the output sequence and the vocabulary size of the large language model; Sub-step 3: Calculate the model confidence level corresponding to the candidate prompt word based on the probability distribution of word elements in the output sequence, the length of the output sequence, and the vocabulary size.
[0027] More specifically, based on the probability distribution of word elements in the output sequence, the length of the output sequence, and the vocabulary size, the model confidence score corresponding to the candidate prompt word is calculated as follows: The first product of the probability corresponding to each word element in the output sequence and the vocabulary size is calculated; the logarithm of each product is taken and summed to obtain the first value; the second product of the vocabulary size and the length is calculated; the quotient of the first value and the second product is determined as the model confidence score corresponding to the candidate prompt word. The vocabulary size is a preset parameter value in the large language model.
[0028] Model confidence can be expressed as Then its calculation expression can be:
[0029] in, For vocabulary size, The length of the output sequence. This represents the feature vector corresponding to the input test sample. With candidate prompts Under these conditions, large language models generate the first... When the word is 1, the word in the vocabulary is 2. The conditional probability assigned to each word.
[0030] Step 104: Select the target prompt word based on the model confidence score corresponding to each candidate prompt word.
[0031] When candidate prompts have a high degree of fit with the feature vectors corresponding to the current input test sample, the output probability distribution during the large language model generation process is more concentrated, the uncertainty of the large language model in predicting subsequent word terms is lower, and therefore the model confidence is higher. Conversely, when candidate prompts cannot effectively guide the large language model to understand the current fault features, the output probability distribution will be more dispersed, and the confidence of the large language model will decrease.
[0032] The method provided in this embodiment does not perform post-processing selection of the final answer, but rather performs dynamic selection directly at the candidate prompt word level by comparing the model confidence of the same test sample under different candidate prompt words. In other words, the system recalculates the fit between each input test sample and the candidate prompt words, thereby achieving sample-level prompt word selection, rather than pre-fixing a certain prompt word for all test samples.
[0033] In one optional embodiment, when selecting a target prompt word based on the model confidence level corresponding to each candidate prompt word, the candidate prompt word with the highest model confidence level can be selected as the target prompt word.
[0034] Step 105: Generate bearing fault diagnosis results based on target prompts.
[0035] In actual implementation, the preset answer can be determined by the target prompt words, and the preset answer can be determined as the bearing fault diagnosis result.
[0036] This application achieves a transformation from a fixed calling method to a sample adaptive selection method by completing the entire process of test sample input, candidate prompt word comparison, model confidence calculation, and target prompt word (i.e. optimal prompt word) selection. This enables the large language model to automatically select the optimal prompt word based on different sample features, thereby improving the stability and accuracy of bearing fault diagnosis under complex working conditions.
[0037] The bearing fault diagnosis method based on model confidence and prompt words provided in this application extracts multi-domain features corresponding to bearing vibration data to generate feature vectors. The feature vectors and prompt word templates are input into a large language model for fault diagnosis inference, resulting in N output sequences. For each candidate prompt word, the model confidence corresponding to the candidate prompt word is calculated based on the probability distribution of the lexical units contained in the output sequence. A target prompt word is selected based on the model confidence corresponding to each candidate prompt word. Finally, a bearing fault diagnosis result is generated based on the target prompt word. This scheme, by constructing a prompt word template library and combining it with the model confidence of the large language model during the inference process, can dynamically determine the optimal prompt word, i.e., the target prompt word, for each input sample, thereby improving the accuracy of bearing fault diagnosis under complex operating conditions.
[0038] The following is combined with Figure 2 A specific example will be used to illustrate the bearing fault diagnosis method based on model confidence and prompt words provided in the embodiments of this application.
[0039] The bearing fault diagnosis method based on model confidence and prompt words provided in this application includes the following parts: Part 1: Data preprocessing of the test bearing vibration data.
[0040] During bearing operation, bearing vibration data can be collected using accelerometers to obtain large-scale test bearing vibration data for fault diagnosis. Because the raw test bearing vibration data is large in volume and contains noise interference, it is necessary to preprocess the raw test bearing vibration data and further extract high-information-density features. Test bearing vibration data can be simply referred to as bearing vibration data.
[0041] Part Two: Multi-domain feature extraction and construction of feature vector sequences.
[0042] In the specific implementation process, the bearing vibration data can be segmented using a sliding window, and time-domain, frequency-domain, and time-frequency-domain features can be extracted. Time-domain features may include, but are not limited to, root mean square value, peak factor, kurtosis, skewness, and variance; frequency-domain features may include, but are not limited to, fault feature frequency energy, spectral peaks, and envelope spectrum features; and time-frequency-domain features may include, but are not limited to, wavelet packet energy and time-frequency entropy. Finally, a bearing fault feature vector is constructed. ,in, Indicates the first The feature vector corresponding to each test sample.
[0043] Part 3: Optimization of prompt words.
[0044] After feature extraction is completed, a prompt word template library is constructed. The prompt word template library includes multiple candidate prompt words. These prompt words are not designed in isolation for different feature types, but rather constructed for different reasoning strategies, such as comprehensive reasoning, mechanism analysis, empirical diagnosis, and troubleshooting. In this way, the large language model can form different reasoning paths under the same input test sample, thus providing a candidate space for subsequent dynamic selection.
[0045] For each test sample The system compares it with each candidate prompt word. Combine the input large language model for inference to obtain the output sequence:
[0046] in, The first one generated by the large language model Each word in the output sequence. The large language model outputs the corresponding conditional probabilities:
[0047] in, Indicates the input number of the first... The feature vector corresponding to each test sample Indicates the current candidate suggestion word. This represents the generated sequence of lexical terms.
[0048] Part Four: Select the prompt words with the highest confidence level Figure 2 The prompt words in the text are the candidate prompt words mentioned above. The prompt word with the highest confidence level is determined as the optimal prompt word, also known as the target prompt word.
[0049] When candidate prompts have a high fit with the feature vector corresponding to the current input test sample, the large language model exhibits stronger determinism in its generation process. Its output probability distribution typically shows a distinct peak structure, meaning that a few candidate words in the vocabulary have high probabilities, while the remaining words have lower probabilities. Conversely, when candidate prompts fail to effectively guide the large language model in understanding the current input feature vector, the model exhibits strong uncertainty in its generation process, and its output probability distribution tends towards a uniform distribution. Therefore, the stability of the large language model's current inference can be evaluated by measuring the degree of difference between the current probability distribution and the uniform distribution. KL divergence can quantify the degree to which the probability distribution deviates from a uniform distribution. Specifically, let the vocabulary size of the large language model be... Then the corresponding uniform distribution is defined as:
[0050] The KL divergence between the output probability distribution and the uniform distribution of the large language model can be expressed as:
[0051] in, Indicates a uniform distribution on the vocabulary. The large language model is represented in the first... The output probability distribution of each word generation position; Indicates vocabulary size, Indicates the lexical unit number in the vocabulary. Indicates the first The feature vector corresponding to each test sample Indicates the first 10 candidate suggestions Indicates the first The sequence of lexical units generated before each lexical unit.
[0052] A larger KL divergence indicates that the current output distribution of the large language model is more concentrated, and the large language model has higher certainty about the current generated result; conversely, a smaller KL divergence indicates that the output distribution of the large language model is more dispersed, and the large language model has higher inference uncertainty.
[0053] Based on the above ideas, to further reduce the impact of different output sequence lengths on the scoring results, this invention further introduces a model confidence mechanism based on generation probability to evaluate the inference reliability of different candidate prompts in the current test sample. The model confidence is calculated based on the conditional probability distribution during the model generation process, and is defined as follows: Then its expression is:
[0054] in, For vocabulary size, The length of the output sequence. This represents the feature vector corresponding to the input test sample. With candidate prompts Under these conditions, large language models generate the first... When the word is 1, the word in the vocabulary is 2. The conditional probability assigned to each word.
[0055] When the model confidence is high under a certain candidate prompt word, it means that the output probability distribution of the large language model is more concentrated under the guidance of the candidate prompt word, the reasoning process is more stable, and the candidate prompt word has a stronger adaptability to the current test sample. Therefore, the candidate prompt word is more suitable as a diagnostic prompt word for the current test sample.
[0056] Subsequently, for the same test sample, the system selects the candidate prompt word with the highest model confidence among all candidate prompt words as the optimal prompt word, i.e., the target prompt word, for the current test sample:
[0057] Finally, the output corresponding to the candidate prompt word with the highest model confidence is taken as the final fault diagnosis result for the current test sample. . Indicates the first The final fault diagnosis result corresponding to each test sample, and the words in the output sequence They have different meanings.
[0058] Through the above methods, the bearing fault diagnosis method based on model confidence and prompt words provided in this application embodiment achieves dynamic selection of prompt words for each input test sample. Compared with the traditional fixed prompt word method, this method no longer uses a uniform prompt word for all test samples, but selects the optimal prompt word in real time based on the input features of the test sample itself and the output probability determinism corresponding to the candidate prompt words, thereby improving the fault diagnosis capability of the large language model under complex working conditions.
[0059] Figure 3 The structural block diagram of a bearing fault diagnosis device based on model confidence and prompt words is shown in the embodiment of this application.
[0060] The bearing fault diagnosis device based on model confidence and prompt words provided in this application includes the following functional modules: Extraction module 301 is used to extract multi-domain features corresponding to bearing vibration data and generate feature vectors; Input module 302 is used to input the feature vector and prompt word template into a large language model for fault diagnosis reasoning to obtain N output sequences. The prompt word template includes N candidate prompt words, and the output sequence includes multiple lexical units and lexical unit probability distributions. The calculation module 303 is used to calculate the model confidence of each candidate prompt word based on the probability distribution of the lexical units contained in the output sequence corresponding to the candidate prompt word. Selection module 304 is used to select target prompt words based on the model confidence scores corresponding to each candidate prompt word; The generation module 305 is used to generate bearing fault diagnosis results based on the target prompt words.
[0061] Optionally, the extraction module includes: The preprocessing submodule is used to preprocess bearing vibration data; The feature extraction submodule is used to extract time-domain features, frequency-domain features, and time-frequency-domain features from the preprocessed bearing vibration data to generate feature vectors.
[0062] Optionally, the input module is specifically used for: The feature vector and each candidate prompt word in the prompt word template are combined and then input into the large language model; the large language model generates an output sequence for each combination, wherein the output sequence includes multiple lexical units and lexical unit probability distributions.
[0063] Optionally, the computing module includes: The first determining submodule is used to determine the probability distribution of word elements in the output sequence for each of the candidate prompt words; The second determining submodule is used to determine the length of the output sequence and the vocabulary size of the large language model; The third determining submodule is used to calculate the model confidence level corresponding to the candidate prompt word based on the lexical probability distribution in the output sequence, the length, and the vocabulary size.
[0064] Optionally, the third determining submodule is specifically used for: Calculate the first product of the probability corresponding to each word in the output sequence and the size of the vocabulary; The first value is obtained by summing the logarithms of each product. Calculate the second product of the vocabulary size and the length; The quotient of the product of the first value and the second value is determined as the model confidence level corresponding to the candidate prompt word.
[0065] Optionally, the selection module is specifically used for: Select the candidate prompt word with the highest model confidence as the target prompt word.
[0066] The embodiments provided in this application Figure 3 The bearing fault diagnosis device shown is based on model confidence and cue words and can achieve... Figure 1 The various processes implemented in the method implementation examples will not be described again here to avoid repetition.
[0067] 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.
[0068] 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 model confidence and prompt words as shown in the above method embodiments.
[0069] 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.
[0070] The communication interface is used for communication between the aforementioned terminal and other devices.
[0071] 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.
[0072] 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 model confidence and prompt words as described in any of the above embodiments.
[0073] 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 model confidence and prompt words as described in any of the above embodiments.
[0074] 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.
[0075] 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 model confidence and cue words, characterized in that, The method includes: Extract multi-domain features corresponding to bearing vibration data and generate feature vectors; The feature vector and prompt word template are input into a large language model for fault diagnosis reasoning to obtain N output sequences. The prompt word template includes N candidate prompt words, and the output sequence includes multiple lexical units and lexical unit probability distributions. For each candidate suggestion word, the model confidence level corresponding to the candidate suggestion word is calculated based on the probability distribution of the lexical units contained in the output sequence corresponding to the candidate suggestion word; Select the target prompt word based on the model confidence score corresponding to each of the candidate prompt words; The bearing fault diagnosis results are generated based on the target prompt words.
2. The method according to claim 1, characterized in that, The steps for extracting multi-domain features from bearing vibration data and generating feature vectors include: Preprocess the bearing vibration data; The preprocessed bearing vibration data is subjected to time-domain features, frequency-domain features, and time-frequency-domain features extraction to generate feature vectors.
3. The method according to claim 1, characterized in that, The steps of inputting the feature vector and prompt word template into a large language model for fault diagnosis reasoning to obtain N output sequences include: The feature vector and each candidate prompt word in the prompt word template are combined and then input into the large language model; The large language model generates an output sequence for each combination, wherein the output sequence includes multiple lexical units and lexical unit probability distributions.
4. The method according to claim 1, characterized in that, For each candidate suggestion word, the step of calculating the model confidence corresponding to the candidate suggestion word based on the probability distribution of the lexical units contained in the output sequence corresponding to the candidate suggestion word includes: For each of the candidate prompt words, determine the probability distribution of word elements in the output sequence; Determine the length of the output sequence and the vocabulary size of the large language model; Based on the lexical probability distribution in the output sequence, the length, and the vocabulary size, the model confidence level corresponding to the candidate prompt word is calculated.
5. The method according to claim 4, characterized in that, The step of calculating the model confidence level corresponding to the candidate suggestion word based on the lexical probability distribution in the output sequence, the length, and the vocabulary size includes: Calculate the first product of the probability corresponding to each word in the output sequence and the size of the vocabulary; The first value is obtained by summing the logarithms of each product. Calculate the second product of the vocabulary size and the length; The quotient of the product of the first value and the second value is determined as the model confidence level corresponding to the candidate prompt word.
6. The method according to claim 1, characterized in that, The steps for selecting target prompt words based on the model confidence scores corresponding to each of the candidate prompt words include: Select the candidate prompt word with the highest model confidence as the target prompt word.
7. A bearing fault diagnosis device based on model confidence and cue words, characterized in that, The device includes: The extraction module is used to extract multi-domain features corresponding to bearing vibration data and generate feature vectors; The input module is used to input the feature vector and the prompt word template into the large language model for fault diagnosis reasoning, and obtain N output sequences. The prompt word template includes N candidate prompt words, and the output sequence includes multiple lexical units and lexical unit probability distributions. The calculation module is used to calculate the model confidence of each candidate prompt word based on the probability distribution of the lexical units contained in the output sequence corresponding to the candidate prompt word. The selection module is used to select target prompt words based on the model confidence scores corresponding to each of the candidate prompt words; The generation module is used to generate bearing fault diagnosis results based on the target prompt words.
8. The apparatus according to claim 7, characterized in that, The extraction module includes: The preprocessing submodule is used to preprocess bearing vibration data; The feature extraction submodule is used to extract time-domain features, frequency-domain features, and time-frequency-domain features from the preprocessed bearing vibration data to generate feature vectors.
9. The apparatus according to claim 7, characterized in that, The input module is specifically used for: The feature vector and each candidate prompt word in the prompt word template are combined and then input into the large language model; the large language model generates an output sequence for each combination, wherein the output sequence includes multiple lexical units and lexical unit probability distributions.
10. The apparatus according to claim 7, characterized in that, The computing module includes: The first determining submodule is used to determine the probability distribution of word elements in the output sequence for each of the candidate prompt words; The second determining submodule is used to determine the length of the output sequence and the vocabulary size of the large language model; The third determining submodule is used to calculate the model confidence level corresponding to the candidate prompt word based on the lexical probability distribution in the output sequence, the length, and the vocabulary size.
