An industrial signal semantic coding and large language model-based equipment fault diagnosis method
Patent Information
- Application Number
- CN202611303516.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-26
- Publication Date
- 2026-10-27
AI Technical Summary
人工特征方法依赖专家经验,难以全面表征复杂非平稳信号;深度学习方法虽然能够自动提取特征,但通常需要大量标签样本,并且容易受到工况变化、类别不平衡和设备差异的影响
[0019]1、本发明一种基于工业信号语义编码与大语言模型的设备故障诊断方法,将连续工业信号转换为大语言模型能够处理的离散语义标记。采用特征提取和语义量化方式压缩原始信号长度,将转速、负载等运行工况与信号特征联合输入模型,利用预训练大语言模型的知识迁移能力,并通过参数高效微调减少训练参数。
Smart Images

Figure CN122986754A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of industrial equipment condition monitoring, intelligent operation and maintenance, signal processing and artificial intelligence technology, specifically a method for equipment fault diagnosis based on industrial signal semantic coding and large language model. Background Technology
[0002] Bearings, gearboxes, motors, CNC machine tools, and other rotating machinery are key equipment in industrial production systems. These devices operate under conditions of variable speed, variable load, high noise, and complex environments, making them prone to malfunctions such as wear, cracks, pitting, tooth breakage, imbalance, misalignment, and loosening. Failure to identify these malfunctions promptly can lead to equipment downtime, reduced product quality, and even safety accidents.
[0003] Existing industrial fault diagnosis methods mainly include machine learning methods based on manual features and deep learning methods based on neural networks. Manual feature methods rely on expert experience and are difficult to fully represent complex non-stationary signals; although deep learning methods can automatically extract features, they usually require a large number of labeled samples and are easily affected by changes in operating conditions, class imbalance, and equipment differences.
[0004] Large language models possess the capabilities of knowledge organization, contextual reasoning, and natural language generation. However, signals such as vibration, current, and sound collected by industrial equipment are continuous numerical signals and cannot be directly used as text input for large language models. If the raw numerical values are simply converted directly into strings, not only will the input sequence be too long, but it will also be difficult to retain physical characteristics such as fault impacts, harmonics, sidebands, and modulation.
[0005] Furthermore, existing fault classification models typically only output preset fault categories, making it difficult to provide diagnostic basis and identify unknown faults under low confidence conditions. Therefore, it is necessary to establish a mapping mechanism between industrial monitoring signals and the semantic space of a large language model, which can reduce input length while preserving the physical characteristics of faults and improving the interpretability and reliability of diagnostic results. Summary of the Invention
[0006] The purpose of this invention is to overcome the shortcomings of the prior art and provide a device fault diagnosis method based on industrial signal semantic coding and large language model. This method can extract multi-domain features from industrial equipment condition monitoring signals and convert continuous numerical features into fault semantic information that can be recognized by large language model. This enables the diagnosis of equipment health status, fault type and fault severity under varying operating conditions and outputs corresponding diagnostic criteria.
[0007] To achieve the above-mentioned objectives, this invention provides a technical solution: a method for equipment fault diagnosis based on industrial signal semantic coding and a large language model, comprising the following steps:
[0008] S1. Data Acquisition: At least one status monitoring sensor is installed at the target monitoring location of the industrial equipment to be diagnosed. Status monitoring signals during equipment operation are collected through a data acquisition device, and equipment attribute information and operating condition information corresponding to the status monitoring signals are acquired simultaneously. The status monitoring signals are segmented according to a preset window length and sliding step size to obtain multiple status signal samples.
[0009] S2. Preprocessing: Outlier removal, detrending, mean removal, noise suppression, and amplitude standardization are performed on each state signal sample. When the industrial equipment to be diagnosed is in variable speed operation, the state signal samples are resampled at equal angles, order tracking, or speed synchronization processing is performed based on the synchronously acquired speed signal or key phase signal to obtain the preprocessed state signal samples.
[0010] S3. Multi-domain feature extraction: Extract time-domain features, frequency-domain features, and time-frequency-domain features from the preprocessed state signal samples, and then concatenate or fuse these features with the operating condition information to form a condition-related feature vector that characterizes the operating state of the equipment.
[0011] S4. Fault semantic encoding: Input the working condition associated feature vector into the feature encoder and map it to a unified feature space to obtain a feature embedding vector; calculate the distance or similarity between the feature embedding vector and each semantic codeword in the preset semantic codebook, and determine the corresponding fault semantic tag based on the semantic codeword with the smallest distance or the largest similarity; arrange multiple fault semantic tags in time order, frequency order, feature category order or component position order to generate a fault semantic tag sequence.
[0012] S5. Structured Input Construction: The fault semantic tag sequence is combined with equipment attribute information, operating condition information, multi-domain feature information, candidate fault types, diagnostic task instructions and output format constraints according to a preset input template to generate a structured input sequence suitable for large language model processing.
[0013] S6. Model Adaptation Training: Obtain training samples containing state signal samples, equipment attribute information, operating condition information, fault labels, fault severity, and diagnostic criteria. Construct a structured input sequence and corresponding target diagnostic text based on the training samples. Employ an efficient parameter fine-tuning method to adapt the pre-trained large language model for industrial fault diagnosis. Optimize model parameters using at least one of the following: fault classification loss, diagnostic text generation loss, contrastive learning loss, and signal semantic alignment loss. This enables the model to establish a mapping relationship between multi-domain features, operating conditions, fault semantics, and diagnostic results.
[0014] S7. Fault Confidence Determination: Input the structured input sequence corresponding to the industrial equipment to be diagnosed into the adapted and trained large language model to obtain the equipment health status, fault type, fault severity, fault confidence, diagnostic basis, and maintenance suggestions; calculate the feature distribution distance between the sample to be diagnosed and the feature center of the known fault category, and perform multiple inferences on the same structured input sequence to determine output consistency; fuse the fault confidence, feature distribution distance, and output consistency to determine the final fault diagnosis result. When the fused determination result does not meet the preset confidence condition, the sample to be diagnosed is marked as an unknown fault or a low confidence fault.
[0015] Preferably, in step S1, the industrial equipment to be diagnosed is at least one of rolling bearings, gearboxes, motors, machine tool spindles, CNC machine tools, pumps, fans, tunnel boring machine transmission devices, or rail transit equipment; the condition monitoring sensor is located near the bearing housing, gearbox housing, motor housing, equipment support, or transmission components; the condition monitoring signal includes one or more of vibration signals, sound signals, current signals, voltage signals, temperature signals, pressure signals, speed signals, and torque signals; the equipment attribute information includes one or more of equipment type, equipment model, component name, sensor installation location, and sampling parameters; the operating condition information includes one or more of speed, load, temperature, cumulative operating time, and environmental conditions.
[0016] Preferably, in step S5, a fault diagnosis prompt word dataset is established based on expert knowledge in the field of industrial equipment. The fault diagnosis prompt word dataset includes fault diagnosis instruction templates, equipment operating condition descriptions, standardized fault type definitions, fault severity definitions, diagnostic examples, and mapping relationships between multi-domain features and equipment fault states. The structured input sequence includes equipment description fields, operating condition description fields, multi-domain feature fields, signal semantic fields, candidate fault fields, diagnostic task fields, and output constraint fields.
[0017] Preferably, in step S5, the output constraint field is used to instruct the large language model to output diagnostic results in the form of natural language text or structured data format; the diagnostic results include at least the equipment health status, fault type, fault severity, fault confidence, key abnormal features, diagnostic basis, and maintenance recommendations.
[0018] The present invention has the following beneficial effects:
[0019] 1. This invention discloses a device fault diagnosis method based on industrial signal semantic coding and a large language model, which converts continuous industrial signals into discrete semantic tags that can be processed by a large language model. It compresses the original signal length using feature extraction and semantic quantization, inputs operating conditions such as speed and load along with signal features into the model, utilizes the knowledge transfer capability of a pre-trained large language model, and reduces training parameters through efficient parameter fine-tuning.
[0020] 2. This invention improves the identification capability of a few categories through contrastive learning, category weighting, or resampling. While outputting the fault category, it provides corresponding frequency band, impulse, harmonic, or operating condition information, and identifies unknown or low-confidence faults by jointly considering confidence level, distribution distance, and output consistency. Attached Figure Description
[0021] Figure 1 This is a flowchart of the present invention;
[0022] Figure 2 It is a comparison chart of vibration signals under different equipment conditions;
[0023] Figure 3 These are the semantic encoding and diagnostic results of faults under different states; Detailed Implementation
[0024] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0025] The specific embodiments of the present invention will now be described with reference to the accompanying drawings to enable those skilled in the art to better understand the invention. It should be particularly noted that in the following description, detailed descriptions of known functions and designs that might obscure the main content of the invention will be omitted here.
[0026] Please see Figure 1 This invention provides a technical solution: a method for equipment fault diagnosis based on industrial signal semantic coding and a large language model, comprising the following steps:
[0027] S1. Data Acquisition: Vibration sensors are installed at the bearing housing, gearbox housing, motor housing, or other target locations of the equipment to be diagnosed, and vibration signals are acquired at a preset sampling frequency using a data acquisition device. Depending on the application scenario, current, sound, temperature, speed, and load signals can also be acquired simultaneously. Let the acquired raw vibration signal be:
[0028]
[0029] in, This represents the number of sampling points. Using a length of... Step size is The sliding window divides the original signal into segments, the first segment... Each signal sample is represented as:
[0030]
[0031] The overlap rate between adjacent samples can be expressed as:
[0032]
[0033] Multiple state signal samples can be generated from limited monitoring data by using a sliding window.
[0034] S2. Preprocessing: Perform mean removal and standardization on each state signal sample:
[0035]
[0036] in, The sample mean. The standard deviation of the sample is 1. To prevent the denominator from being zero, a preset constant is used. When the operating speed of the equipment changes, equal-angle resampling is performed based on the speed pulse signal to ensure that components of the same order remain relatively stable in the order domain under different operating conditions.
[0037] S3. Multi-domain feature extraction: Time-domain, frequency-domain, and time-frequency-domain features are extracted from the preprocessed samples. Frequency-domain features can be obtained using the Fast Fourier Transform.
[0038]
[0039] Calculate the band energy, dominant frequency, spectral centroid, harmonic amplitude, and sideband amplitude based on the spectral results. Time-frequency domain characteristics can be obtained through continuous wavelet transform.
[0040]
[0041] in, For scale parameters, For translation parameters, These are wavelet basis functions. After concatenating the time domain, frequency domain, time-frequency domain, and operating condition characteristics, we obtain:
[0042]
[0043] in, For time domain characteristics, For frequency domain characteristics, Features in the time and frequency domain This refers to the characteristics of the operating conditions.
[0044] S4. Fault semantic coding: Mapping feature vectors to a unified space using a feature encoder.
[0045]
[0046] in, For parameters The feature encoder. Establishing the semantic codebook:
[0047]
[0048] in, The number of semantic codewords, where each semantic codeword corresponds to a local signal pattern. For feature vectors... The quantitative results are as follows:
[0049]
[0050] Will The mapping is to fault semantic tags. The actual semantic codewords can be learned automatically from the training data, and it is not required that each codeword be manually named.
[0051] Multiple semantic tags arranged in chronological or frequency order yield:
[0052]
[0053] in, The length of the fault semantic marker sequence.
[0054] S5. Structured Input Construction: The fault semantic tag sequence is combined with equipment attribute information, operating condition information and diagnostic task instructions according to a preset input template to generate a structured input sequence.
[0055] S6. Model Adaptation Training: Supervised training samples are used in the large language model adaptation stage.
[0056]
[0057] in, For structured input sequences, The target text contains fault categories and diagnostic criteria. To reduce training parameters, the fundamental parameters of the large language model can be frozen, and a low-rank adaptation matrix can be set in the attention layer. For the original weight matrix... The adapted weights are represented as follows:
[0058]
[0059] in, and The matrix is a trainable low-rank matrix, with its low-rank dimension smaller than the dimension of the original weight matrix. To address the imbalanced fault sample problem, class weights can be set for the classification loss:
[0060]
[0061] in, With the The number of samples for each type of fault is negatively correlated. Contrastive learning is used to constrain samples of the same type to be close to each other in a unified feature space, while samples of different types are kept far apart, in order to improve the feature stability under varying operating conditions.
[0062] S7. Fault confidence determination: Use the maximum class probability output by the model as the basic confidence level. And calculate the distance between the sample to be diagnosed and the nearest known class center:
[0063]
[0064] in, For the first Feature centers for known fault categories. Perform multiple inferences on the same input to achieve consistent output:
[0065]
[0066] When the following conditions are met:
[0067]
[0068] If the condition is met, the corresponding category will be used as the final fault diagnosis result; otherwise, the sample will be marked as an unknown fault or a low-confidence fault. The confidence threshold. Distance threshold This is the consistency threshold.
[0069] To verify the effectiveness of this invention, an experiment was conducted: a vibration sensor was installed near the bearing housing of the transmission device of an industrial sludge suction machine, and the equipment speed and load information were collected simultaneously. The equipment operating status included healthy, slightly worn, and severely worn. The original signal was segmented using a sliding window with a length of 2048 sampling points and a step size of 512 sampling points, resulting in 1125 valid samples, of which 900 samples were used as the training set and 225 samples were used as the test set.
[0070] Detrending, standardization, and adaptive wavelet denoising are performed on the signal samples of each state to extract multi-domain features such as mean, variance, peak-to-peak value, frequency band energy, Shannon entropy, Rényi entropy, maximum Lyapunov exponent, and approximate entropy. These features are then fused with speed and load information to form a working condition-related feature vector. This vector is converted into fault semantic tags through a feature encoder and semantic codebook, constructing a structured input sequence for a large language model.
[0071] Figure 2 This is a comparison chart of vibration signals under different equipment conditions. Under healthy conditions, the vibration waveform has a regular period and small amplitude fluctuations; under mild wear conditions, the waveform shows slight irregular fluctuations and the amplitude increases; under severe wear conditions, the waveform is significantly distorted and contains frequent high-amplitude impact components.
[0072] The parameters of a pre-trained large language model are efficiently fine-tuned using training samples. Figure 3 The model provides semantic encoding and diagnostic results for faults under different conditions. It can distinguish between healthy, slightly worn, and severely worn states, and output the severity of the fault, key abnormal features, diagnostic basis, and maintenance recommendations. After combining fault confidence, feature distribution distance, and consistency of multiple inference outputs, samples that do not meet the preset confidence conditions can be marked as unknown faults or low-confidence faults.
[0073] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A method for equipment fault diagnosis based on industrial signal semantic coding and a large language model, characterized in that, Includes the following steps: S1. Data Acquisition: At least one status monitoring sensor is installed at the target monitoring location of the industrial equipment to be diagnosed. Status monitoring signals during equipment operation are collected through a data acquisition device, and equipment attribute information and operating condition information corresponding to the status monitoring signals are acquired simultaneously. The status monitoring signal is segmented according to a preset window length and sliding step size to obtain multiple status signal samples; S2. Preprocessing: Perform outlier removal, detrending, mean removal, noise suppression, and amplitude standardization on each state signal sample; When the industrial equipment to be diagnosed is in a variable speed condition, the status signal sample is resampled at equal angles, ordered tracking or speed synchronization is performed on the synchronously acquired speed signal or key phase signal to obtain the preprocessed status signal sample. S3. Multi-domain feature extraction: Extract time-domain features, frequency-domain features, and time-frequency-domain features from the preprocessed state signal samples, and then concatenate or fuse these features with the operating condition information to form a condition-related feature vector that characterizes the operating state of the equipment. S4. Fault semantic encoding: Input the working condition associated feature vector into the feature encoder and map it to a unified feature space to obtain a feature embedding vector; calculate the distance or similarity between the feature embedding vector and each semantic codeword in the preset semantic codebook, and determine the corresponding fault semantic tag based on the semantic codeword with the smallest distance or the largest similarity; arrange multiple fault semantic tags in time order, frequency order, feature category order or component position order to generate a fault semantic tag sequence. S5. Structured Input Construction: The fault semantic tag sequence is combined with equipment attribute information, operating condition information, multi-domain feature information, candidate fault types, diagnostic task instructions and output format constraints according to a preset input template to generate a structured input sequence suitable for large language model processing. S6. Model Adaptation Training: Obtain training samples containing state signal samples, equipment attribute information, operating condition information, fault labels, fault severity, and diagnostic criteria. Construct a structured input sequence and corresponding target diagnostic text based on the training samples. Employ an efficient parameter fine-tuning method to adapt the pre-trained large language model for industrial fault diagnosis. Optimize model parameters using at least one of the following: fault classification loss, diagnostic text generation loss, contrastive learning loss, and signal semantic alignment loss. This enables the model to establish a mapping relationship between multi-domain features, operating conditions, fault semantics, and diagnostic results. S7. Fault confidence determination: Input the structured input sequence corresponding to the industrial equipment to be diagnosed into the adapted and trained large language model to obtain the equipment health status, fault type, fault severity, fault confidence, diagnostic basis and maintenance suggestions. Calculate the feature distribution distance between the sample to be diagnosed and the feature center of the known fault category, and perform multiple inferences on the same structured input sequence to determine output consistency; fuse the fault confidence, feature distribution distance and output consistency to determine the final fault diagnosis result. When the fused judgment result does not meet the preset confidence condition, the sample to be diagnosed is marked as an unknown fault or a low confidence fault.
2. The equipment fault diagnosis method based on industrial signal semantic coding and large language model according to claim 1, characterized in that: In step S1, the industrial equipment to be diagnosed is at least one of rolling bearings, gearboxes, motors, machine tool spindles, CNC machine tools, pumps, fans, tunnel boring machine transmission devices, or rail transit equipment; the condition monitoring sensor is located near the bearing housing, gearbox housing, motor housing, equipment support, or transmission components; the condition monitoring signal includes one or more of vibration signals, sound signals, current signals, voltage signals, temperature signals, pressure signals, speed signals, and torque signals; the equipment attribute information includes one or more of equipment type, equipment model, component name, sensor installation location, and sampling parameters; the operating condition information includes one or more of speed, load, temperature, cumulative operating time, and environmental conditions.
3. The equipment fault diagnosis method based on industrial signal semantic coding and large language model according to claim 1, characterized in that: In step S5, a fault diagnosis prompt word dataset is established based on expert knowledge in the field of industrial equipment. The fault diagnosis prompt word dataset includes fault diagnosis instruction templates, equipment operating condition descriptions, standardized fault type definitions, fault severity definitions, diagnostic examples, and mapping relationships between multi-domain features and equipment fault states. The structured input sequence includes equipment description fields, operating condition description fields, multi-domain feature fields, signal semantic fields, candidate fault fields, diagnostic task fields, and output constraint fields.
4. The equipment fault diagnosis method based on industrial signal semantic coding and large language model according to claim 1, characterized in that: In step S5, the output constraint field is used to instruct the large language model to output diagnostic results in the form of natural language text or structured data format; the diagnostic results include at least the equipment health status, fault type, fault severity, fault confidence, key abnormal features, diagnostic basis, and maintenance recommendations.