Construction machinery fault diagnosis method based on multi-stage perturbation fine-tuning large model

By fine-tuning the large language model through multi-stage perturbation and organizing and applying training data with incomplete logic, colloquialisms, and adversarial interference, the problem of unstable output of the large language model in engineering machinery fault diagnosis is solved, and an efficient and reliable fault diagnosis process is achieved.

CN122365067APending Publication Date: 2026-07-10ZHEJIANG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHEJIANG UNIV
Filing Date
2026-04-13
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Existing large language models are difficult to satisfy the process constraints of step dependencies, branching conditions and termination rules in the diagnosis of engineering machinery faults, and the output is unstable under multiple perturbation conditions, resulting in insufficient consistency and accuracy of the diagnosis results.

Method used

By constructing a multi-stage perturbation fine-tuning method that includes logical incompleteness, colloquialisms, and adversarial interference, standard question-answer pairs are sorted out and perturbed to form preference sample pairs. The large language model is trained in stages to improve its diagnostic logic alignment ability under multiple perturbation conditions.

Benefits of technology

It significantly improves the efficiency and consistency of fault diagnosis for construction machinery, can adapt to non-standard descriptions and complex questions on site, generates correct troubleshooting steps, reduces reliance on highly experienced maintenance personnel, and improves diagnostic accuracy and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122365067A_ABST
    Figure CN122365067A_ABST
Patent Text Reader

Abstract

The application discloses an engineering machinery fault diagnosis method based on multi-stage disturbance fine-tuning of a large model, which is based on fault troubleshooting data, combined with three types of interference construction strategies, and according to the data enhancement principle and standard troubleshooting logic, a preferred sample data set containing logical complex interference, colloquial interference and adversarial interference is constructed; then an engineering machinery fault diagnosis model based on a large language model is constructed, and the model is trained in stages based on the logical incomplete interference data set, the colloquial interference data set and the adversarial interference data set in turn; and in each stage, the corresponding training target is mapped to the key training parameters, and the key training parameters are dynamically adjusted according to the disturbance type of the current stage, so that the model gradually learns the fault diagnosis knowledge and anti-interference strategies contained in various types of disturbance data in the parameter space, and the accuracy and overall robustness of the fault diagnosis task are improved. The application can improve the accuracy and reliability of engineering machinery fault diagnosis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the intersection of artificial intelligence and industrial fault diagnosis, and in particular to a fault diagnosis method for engineering machinery based on a large model with multi-stage perturbation fine-tuning. Background Technology

[0002] In manufacturing applications such as engineering machinery, a wealth of procedures, rules, experience guidelines, and diagnostic process knowledge has accumulated over time during equipment operation and maintenance. This type of knowledge typically features a concise logical structure, clear causal chains, and strict rule constraints, serving as a crucial basis for operational decisions, anomaly handling, and maintenance troubleshooting. Traditional fault diagnosis processes heavily rely on expert experience, requiring step-by-step judgment of branch conditions and the formation of troubleshooting paths based on fault phenomena. The diagnostic process exhibits clear step dependencies, branch condition constraints, and termination criterion constraints, demanding a high level of experience and knowledge familiarity from personnel. As equipment complexity continues to increase, the correspondence between fault types and outward phenomena becomes increasingly complex. Relying solely on manual experience for fault analysis and troubleshooting is inefficient, and consistency in diagnostic results among different personnel is difficult to guarantee. Therefore, a technical means is needed that can logically and procedurally organize diagnostic knowledge and assist personnel in making troubleshooting decisions.

[0003] Large language models hold significant value in engineering machinery fault diagnosis. Their powerful basic language capabilities enable them to unify the mapping of complex phenomenon descriptions and operational procedure requirements into a semantic space through retrieval enhancement and fine-tuning. Furthermore, they can automatically generate step-by-step, interpretable troubleshooting logic based on input questions, thereby achieving information fusion and understanding and lowering the technical threshold for fault diagnosis. However, fault diagnosis knowledge often involves complex logical hierarchies, industry terminology exhibits pronounced colloquial characteristics in field expressions, and the similarity and misleading nature of different fault appearances make large models prone to issues such as missing output structures, semantic mapping deviations, and hijacking of decision boundaries in practical applications. This makes it difficult to meet the process constraints required by diagnostic knowledge, such as step dependencies, branching conditions, and termination rules, and consequently, fails to guarantee alignment with the inherent logic of the knowledge.

[0004] To address the aforementioned issues, existing large language model technologies can be broadly categorized into two types: model-side training optimization and system-side structured knowledge retrieval.

[0005] (1) Existing research on model-side training optimization usually involves constructing augmented datasets around different types of perturbations and training the model using a relatively unified fine-tuning objective or preference optimization objective in order to improve the output stability of the model under noisy input. However, the training signals of this type of method are mostly concentrated on the level of denoising, error correction and normalization of input expression, and fail to explicitly establish a distinguishable preference boundary between "correct knowledge and misleading perturbations" and "necessary steps and redundant expressions" in the parameter space. For strongly constrained logical diagnostic knowledge, its process constraints lack targeted reinforcement for path selection, condition triggering and termination criteria, which makes perturbations more likely to be regarded by the model as correctable text noise, rather than being identified as structural factors that will change the reasoning boundary and decision path. In addition, joint training of multiple types of perturbation data often lacks fine control over the perturbation priority and its coupling effect, which easily leads to the phenomenon that while the adaptation to a certain type of perturbation is improved, the robustness of other perturbations decreases or the basic diagnostic performance degrades.

[0006] (2) Existing research on structured knowledge retrieval on the system side usually injects external knowledge into the model output process through retrieval and association of structured knowledge bases during the reasoning stage, such as the knowledge graph-based retrieval augmentation generation (KG-RAG) method. The correction of such methods mainly occurs in the retrieval or embedding stage, focusing on local processing such as entity alignment, relation filtering and abnormal edge removal. However, in fault diagnosis, the more critical requirement of logical chain consistency, including the global consistency of path selection, the verifiability of condition combination and the constraint satisfaction of reasoning order, is still lacking in the existing methods with a unified and verifiable modeling and constraint mechanism. At the same time, the relevant knowledge exists in an external form and has not been systematically internalized into a stable decision boundary. When the retrieval results or knowledge graph are shifted under the influence of multi-source disturbances, the downstream generation process may still unfold along the wrong relation chain, which makes it difficult to continuously guarantee the level of logical alignment and the reliability of the answer.

[0007] Therefore, there is an urgent need for a large-scale model development method for engineering machinery fault diagnosis scenarios, which can achieve logical alignment of diagnostic knowledge under real industrial disturbance conditions. This method combines disturbance construction with data augmentation-based corpus generation, builds trainable preference corpus based on limited original knowledge, and absorbs correct diagnostic logic and suppresses erroneous disturbances through model fine-tuning, thereby improving the model's robust logical alignment capability and diagnostic reliability under multiple disturbance conditions. Summary of the Invention

[0008] To address the shortcomings of existing technologies, this invention proposes a fault diagnosis method for engineering machinery based on a large model with multi-stage perturbation fine-tuning. The specific technical solution is as follows: A fault diagnosis method for engineering machinery based on a large model with multi-stage perturbation fine-tuning includes the following steps: S1: Based on the troubleshooting knowledge that includes the fault diagnosis logic of engineering machinery, standard question-and-answer pairs for troubleshooting methods of various fault phenomena are compiled; in view of the insufficient understanding of structured knowledge by large language models and the interference in the actual troubleshooting process, perturbation is applied to the standard question-and-answer pairs to form preference sample pairs containing interference; and sample ratio and sample size constraints are imposed on the specific situation of interference to obtain logically incomplete interference dataset, colloquial interference dataset, and adversarial interference dataset. S2: Construct a fault diagnosis model for engineering machinery based on a large language model, and train the pre-trained fault diagnosis model in stages based on logical incomplete interference dataset, colloquial interference dataset, and adversarial interference dataset. In each stage, the corresponding training objective is mapped to key training parameters, and the key training parameters are dynamically adjusted according to the type of disturbance in the current stage. This allows the model to gradually learn the fault diagnosis knowledge and anti-interference strategies contained in various disturbance data in the parameter space, thereby improving the accuracy and overall robustness of the fault diagnosis task and obtaining the trained fault diagnosis model for engineering machinery. S3: Use the trained engineering machinery fault diagnosis model to diagnose engineering machinery faults.

[0009] Further, step S1 includes the following sub-steps: S1.1: Based on the relationship between the preceding and following nodes in the fault diagnosis logic, the investigation chain for each fault phenomenon is sorted out, and standard question-and-answer pairs for different fault phenomena are obtained through file parsing and fault relationship recognition algorithms. S1.2: To address the logical incompleteness interference caused by the large language model's insufficient understanding of structured knowledge for fault diagnosis, as well as the colloquial interference and adversarial interference that occur in real fault repair scenarios, the standard question-answer pairs are rewritten. Logical incompleteness interference is reflected in the negative examples of the preference pairs, colloquial interference is reflected in the input and negative examples of the preference pairs, and adversarial interference is reflected in the prompts, input, and negative examples of the preference pairs, thus forming preference pairs that contain interference. S1.3: Based on the frequency of interference in real-world scenarios, the proportion of each type of interference is controlled and the sample size is constrained to obtain logically incomplete interference datasets, colloquial interference datasets, and adversarial interference datasets for subsequent preference optimization training.

[0010] Furthermore, logical incompleteness interference specifically includes six types: insertion interference, partial substitution interference, single point error interference, segment substitution interference, sequence disturbance interference, and response redundancy interference. When constructing logical incompleteness interference preference pairs, using the complete fault diagnosis link as the backbone, the six types of logical incompleteness interference are handled as follows: (1) Insertion-type interference: On the basis of keeping the original correct key nodes unchanged, additional troubleshooting steps that are unrelated to the current fault phenomenon are inserted, forming a seemingly reasonable but actually redundant bypass check; (2) Local replacement interference: Select a local troubleshooting short chain that is designed for other fault phenomena, and replace a segment of the current link with it as a whole segment. The focus is on destroying the segment-level reasoning loop, so that the local semantic descriptions may be similar but the causal orientations do not match. (3) Single point error interference: Without changing the main structure of the preceding inspection, the originally correct final confirmation step is replaced with another incorrect troubleshooting action; the incorrect action shares the same root node or upstream branch source as the correct path, but deviates at the leaf conclusion; (4) Segment replacement interference: Replace the current standard path with another investigation path that is structurally complete, has closed steps, but has a completely wrong causal link, so that the error can be extended from the local to the whole link level; (5) Sequence disturbance type interference: By swapping the order of intermediate inspection steps, the link still contains the same inspection points in form, but it disrupts the prior dependencies and the step-by-step troubleshooting rhythm that it should follow; thereby disrupting the progressive logic of standard fault diagnosis from phenomenon to cause verification. (6) Answering redundant interference: For termination steps that have been clearly stated as "then end the investigation", after the termination conditions are met, continue to write additional inspection steps, and ensure that these continued contents are not necessarily related to the current fault phenomenon.

[0011] Furthermore, the colloquial interference includes six types: word order adjustment interference, question expansion interference, phenomenon supplementation interference, sentence meaning synonym rewriting interference, homophonic misspelling interference, and synonym substitution interference; The generation of the colloquial interference preference pairs is specifically as follows: for the standard fault question in each standard question-answer pair, construct prompt words containing perturbation type constraints, rewritten boundary conditions and output format requirements, drive the large model to output multiple questions with colloquial interference in batches while keeping the original fault phenomenon and key constraints unchanged, and form preference pair samples with the original questions.

[0012] Furthermore, the adversarial interference includes four types: irrelevant task interference, question misleading interference, symbolic noise interference, and instruction template interference; The generation of the adversarial interference preference pairs is specifically achieved through random injection driven by the interference fragment library. First, an irrelevant task library and an instruction library are constructed, and entries are randomly extracted from the corresponding fragment library for different types of perturbation. These entries are then concatenated into prompt words, inputs, or negative examples according to rules to form preference pairs containing strong interference input forms.

[0013] Furthermore, the key training parameters include the preference loss weight β and the supervised learning weight λ.

[0014] Furthermore, in S2, when training the pre-trained engineering machinery fault diagnosis model based on the logically incomplete interference dataset, the preference loss weight β is less than 0.4, the supervised learning weight λ is not less than 0.5, and a learning rate and gradient accumulation value matching the target are set.

[0015] Furthermore, in S2, when training the engineering machinery fault diagnosis model based on the colloquial interference dataset, it is necessary to increase the β value, decrease the λ value, and increase the learning rate and gradient accumulation value based on the parameters of the first stage.

[0016] Furthermore, in S2, when training the engineering machinery fault diagnosis model based on the adversarial interference dataset, the β value is reduced and the λ value is increased based on the parameters of the second stage, while keeping the learning rate and gradient accumulation value unchanged.

[0017] A fault diagnosis device for engineering machinery based on a multi-stage perturbation fine-tuning large model is disclosed. The device includes one or more processors for implementing a fault diagnosis method for engineering machinery based on a multi-stage perturbation fine-tuning large model.

[0018] The beneficial effects of this invention are as follows: 1. This invention can transform the strongly correlated fault diagnosis logic in diagnostic knowledge into intelligent troubleshooting suggestions generated by a large language model. This transforms the fault diagnosis process of construction machinery from a complex and error-prone judgment process that relies on human experience and consulting materials into a large language model-assisted decision-making process that can automatically generate troubleshooting steps. This significantly reduces the dependence on highly experienced maintenance personnel and improves the efficiency and consistency of fault diagnosis.

[0019] 2. This invention constructs training data containing common input forms in actual field situations, such as incomplete logic, colloquial expressions, and misleading information. This enables the model to adapt to non-standard descriptions and complex questioning methods from field personnel. Even in the presence of interfering information, it can still generate troubleshooting steps according to the correct diagnostic process, thereby improving the diagnostic accuracy and reliability under complex working conditions and multiple similar fault phenomena.

[0020] 3. This invention can solidify the step dependencies, branching conditions, and termination rules in the knowledge of engineering machinery fault diagnosis into stable diagnostic logic, improve the standardization and interpretability of the diagnostic process, and facilitate the formation of a standardized fault investigation process and knowledge reuse system. It has good application value and promotion significance for engineering machinery maintenance training, remote diagnostic support, and the construction of intelligent operation and maintenance systems. Attached Figure Description

[0021] Figure 1This is a flowchart of a fault diagnosis method for engineering machinery based on a multi-stage perturbation fine-tuning large model, according to an embodiment of the present invention.

[0022] Figure 2 This is a schematic diagram illustrating the construction of three interference preference pairs in an embodiment of the present invention. Detailed Implementation

[0023] The present invention will be described in detail below with reference to the accompanying drawings and preferred embodiments. The purpose and effects of the present invention will become clearer. It should be understood that the specific embodiments described herein are merely for explaining the present invention and are not intended to limit the present invention.

[0024] Before providing a further detailed description of the embodiments of the present invention, the nouns and terms involved in the embodiments of the present invention will be explained, and the nouns and terms involved in the embodiments of the present invention shall be subject to the following interpretations.

[0025] (1) Fault Tree Data: Fault tree data is structured knowledge data for fault diagnosis of core equipment components. It uses Fault Tree Analysis (FTA) as a framework to integrate fault diagnosis mechanisms and expert investigation processes, covering the complete logical chain of fault phenomena, causal mechanisms, detection indicators, and handling solutions. Its core content includes top events (fault phenomena), intermediate events (fault investigation processes), bottom events (such as fault causes), and logical association rules between events. It is the core knowledge basis for constructing standard question-and-answer pairs for fault diagnosis and designing interference preference samples, providing accurate structured support for large-scale models to learn industrial fault diagnosis logic.

[0026] (2) Logical incompleteness interference: Logical incompleteness interference refers to the phenomenon in fault diagnosis scenarios where, because effective knowledge is a structured logical system with strong constraints, containing a clear checking order, branching conditions, and termination rules, the pre-trained large language model's ability to represent hierarchical constraints and boundary conditions is limited. This leads to phenomena such as reversed node order, unnecessary redundant node expansion, and cross-subsystem hybrid extension in the question-and-answer output, which interfere with the final result in terms of logical accuracy and terminology standardization.

[0027] (3) Colloquial Interference: Colloquial interference refers to the significant differences in education, experience, and expression habits among frontline maintenance personnel and service station technicians in fault diagnosis scenarios, resulting in highly colloquial and diverse sources of real questions. This includes using phenomenon descriptions instead of standard terminology, mixing component names, synonym substitution, and word order jumps. At the same time, on-site descriptions often contain redundant background information or even minor false alarms, diluting or incorrectly anchoring key signals. Because large models lack the ability to standardize terminology and extract key information for this type of knowledge, they are prone to mapping colloquial expressions to incorrect systems or nodes, resulting in output problems such as incorrect answers and content deviating from core keywords, thus interfering with the final results at the level of semantic understanding accuracy.

[0028] (4) Adversarial interference: Adversarial interference refers to the situation in fault diagnosis scenarios where frontline personnel, influenced by factors such as experience and time, give personal conclusions or biased instructions in their questions, which may also include irrelevant tasks. At the same time, on-site transcription is prone to objective noise such as scrambled symbols and contaminated prompts. Since large models lack distinguishing rules and boundary controls, they are prone to treating these interferences as mandatory instructions, skipping verification steps and locking in a single path in advance, or even generating irrelevant content for additional tasks. This leads to the model being guided away from the core task objective, resulting in logical breaks or incorrect answers that are irrelevant to the requirements, thus interfering with the final result in terms of instruction compliance and answer reliability.

[0029] (5) Preference Sample Pairs: Preference sample pairs refer to data pairs formed by two different output samples built on the same input during the model training data construction process. One is the preferred output (positive example, Chosen), and the other is the non-preferred output (negative example, Reject). Positive examples are usually standard results that meet the target rules, logic, or task requirements, while negative examples are results that have defects in logic, steps, structure, or expression. Preference sample pairs consist of three parts: cue words, input, positive examples, and negative examples. Their purpose is to enable the model to not only learn the expression of correct outputs through contrastive learning or preference optimization training, but also to learn to distinguish the differences between different output qualities. Unlike standard supervised learning, which only uses a single correct output as the training target, preference sample pairs introduce a comparison relationship between superior and inferior outputs, enabling the model to form a ranking or preference relationship for different output qualities in the parameter space.

[0030] (6) DPO Preference Learning Strategy: DPO (Direct Preference Optimization) is a large-scale model alignment learning strategy based on human preference feedback. It guides large language models to learn generative behaviors that conform to human value orientations by directly modeling the mapping relationship between human preferences and model output distribution. The core mechanism of this method is that it does not require building a complex reward model and reinforcement learning process. It directly uses human-labeled preference data pairs as supervision signals and applies constraints to the log-likelihood distribution of the model by optimizing a specific preference loss function. That is, it increases the probability of the model generating high-quality outputs while reducing the probability of generating low-quality outputs, thereby aligning the model output distribution with the direction of human preferences and achieving efficient preference learning without the need for reward intermediate links.

[0031] (7) Supervised Learning Weights (λ): Supervised learning weights are weight coefficients used to control the degree of influence of the supervised learning loss function on the updating of model parameters during model training. Supervised learning typically uses standard input-output pairs as training data and updates model parameters by minimizing the difference between the predicted result and the standard answer. Supervised learning weights are used to adjust the intensity of the model's learning from standard samples. In multi-objective training or multi-stage training, adjusting these weights can control the model to focus more on learning basic knowledge, expression structure, or standard output form. Supervised learning weights usually work together with preference learning or contrastive learning objectives, adjusting the influence of different training objectives on model updates through weight ratios, thereby achieving a balance between basic knowledge learning and preference behavior learning.

[0032] (8) Preference Learning Weights (β): Preference learning weights are weight coefficients used to control the degree of influence of preference optimization objectives on model parameter updates during training based on preference data. Preference learning typically updates model parameters by comparing the relative probabilities or score differences between preferred and non-preferred outputs, making the model more inclined to generate preferred outputs. Preference learning weights are used to adjust the learning intensity of the model on the differences between good and bad sample pairs. In multi-objective training or multi-stage training, adjusting this weight can control the model to be more inclined to learn output ranking relationships, logical structures, or strategy selections, rather than just learning the expression form of the standard answer. When adjusted together with supervised learning weights, it can achieve coordination between the model learning correct output content and learning the ability to judge the quality of outputs.

[0033] This invention presents a fault diagnosis method for engineering machinery based on a multi-stage perturbation fine-tuning large model. Through a joint mechanism of perturbation data generation and phased target optimization, it enhances the knowledge injection and logical reasoning capabilities of a large model in the fault diagnosis field. Addressing the problem of insufficient, scattered, and inconsistent quality of labeled data in fault diagnosis scenarios, leading to unstable fine-tuning effects, this invention first standardizes historical fault diagnosis records into standard question-answer pairs. Based on this, it introduces three types of enhancement strategies: logically complex, conversational, and adversarial, to generate structurally consistent, well-constrained, and controllable preference samples on a large scale. This simultaneously improves the quantity coverage and sample quality consistency of training data, providing a stable and reliable data foundation for preference learning. Subsequently, this invention employs a three-stage preference fine-tuning process, adjusting key training objectives and parameter configurations in stages. This enables progressive optimization of the model in terms of standardized answer structure, consistent fault diagnosis logic, and robustness to strong perturbation inputs, ultimately significantly improving the model's knowledge-logic alignment accuracy and reasoning stability in fault diagnosis tasks.

[0034] like Figure 1 As shown in the figure, the engineering machinery fault diagnosis method based on a multi-stage perturbation fine-tuning large model proposed in this embodiment of the invention includes the following steps one to three.

[0035] Step 1: Based on the troubleshooting knowledge including the fault diagnosis logic of engineering machinery, standard question-and-answer pairs for troubleshooting methods of various fault phenomena are organized; considering the insufficient understanding of structured knowledge by the large language model and the interference in the actual troubleshooting process, perturbation is applied to the standard question-and-answer pairs to form preference sample pairs containing interference; and sample ratio and sample size constraints are imposed on the specific situation of interference to obtain logically incomplete interference datasets, colloquial interference datasets, and adversarial interference datasets.

[0036] Among them, the troubleshooting knowledge that includes the fault diagnosis logic of engineering machinery includes fault trees and fault elimination chains, which are structured system expressions of fault troubleshooting logic. They contain clear inspection sequences, branch conditions and termination rules, and require strict adherence to node levels and system boundaries.

[0037] Step one includes the following sub-steps: S1.1: First, based on the relationships between the preceding and following nodes in the fault diagnosis logic, the troubleshooting chain for each fault phenomenon is outlined. Standard question-and-answer pairs for different fault phenomena are obtained through file parsing and fault relationship identification algorithms, specifically including: S1.1.1: Based on the relationship fields between nodes in the structural knowledge, the hierarchical organization relationship is parsed, and the core elements such as parent nodes and child nodes in the knowledge are constructed into causal relationship triples; S1.1.2: Perform semantic checks and node fusion to ensure the unique mapping of nodes in the semantic space, thereby obtaining a complete link with a clear causal path.

[0038] S1.1.3: Introducing semantic templates to generate question-and-answer pairs, forming coherent answers by connecting node relationships through natural language, resulting in standard question-and-answer pairs containing three elements: instructions, fault questions, and troubleshooting link answers.

[0039] S1.2: Then, addressing the logical incompleteness interference caused by the large language model's insufficient understanding of structured knowledge in fault diagnosis, as well as the colloquial interference and adversarial interference occurring in real fault repair scenarios, the standard question-answer pairs are rewritten. Logical incompleteness interference is reflected in the negative examples of the preference pairs, colloquial interference in the input and negative examples of the preference pairs, and adversarial interference in the prompts, input, and negative examples of the preference pairs. This forms logical incompleteness interference preference pairs, colloquial interference preference pairs, and adversarial interference preference pairs, such as... Figure 2 As shown.

[0040] (a) Logical incompleteness interference To address several types of logical incompleteness errors that large models may encounter when responding to fault diagnosis links, the following six specific interference types have been identified to strengthen the model's output response logic: (1) Insertion-type interference: This is used to deal with the problem that the model inserts redundant nodes that are unrelated to the current fault investigation link during the response process, causing the investigation path to be interfered with by irrelevant content.

[0041] (2) Local substitution interference: This is used to address the problem that although the model hits the start and end nodes during the response process, the intermediate investigation steps are biased towards irrelevant directions and local links are incorrect.

[0042] (3) Single point error interference: This is used to deal with the problem that the model outputs other related but incorrect nodes when answering the final step, which makes it impossible to accurately hit the correct termination node.

[0043] (4) Segmental replacement interference: This is used to address the problem that the model is biased towards irrelevant investigation directions during the answering process, resulting in systematic errors in the segmental investigation path.

[0044] (5) Sequence disturbance type interference: used to deal with the problem that the model makes a mistake in judging the order of investigation of each node in the fault link during the response process, resulting in disorder of the investigation order.

[0045] (6) Redundancy interference: This is used to deal with the problem that the model continues to expand the output after completing the answer within the correct link range, resulting in the tail of the answer not being able to converge in time.

[0046] When constructing incomplete logic interference preference pairs, a complete fault diagnosis link is used as the backbone. For each fault phenomenon, a standard question-and-answer pair is provided, where: (1) Insertion-type interference: On the basis of keeping the original correct key nodes unchanged, additional troubleshooting steps that are unrelated to the current fault phenomenon are inserted, forming a seemingly reasonable but actually redundant bypass check.

[0047] (2) Local replacement interference: Select a local troubleshooting short chain that is designed for other fault phenomena, and replace a segment of the current link with it as a whole segment. The focus is on destroying the segment-level reasoning loop, so that the local semantic descriptions may be similar but the causal orientations do not match.

[0048] (3) Single-point error interference: Without changing the main structure of the preceding checks, the originally correct final confirmation step is replaced with another incorrect troubleshooting action. This incorrect action shares the same root node or upstream branch source as the correct path, but deviates at the leaf conclusion.

[0049] (4) Segment replacement type interference: Replace the current standard path with another investigation path that is structurally complete, has closed steps, but has a completely wrong causal link, so that the error is extended from the local to the whole link level; this perturbation is used to simulate path-level misleading.

[0050] (5) Sequence disturbance type interference: By swapping the order of intermediate inspection steps, the link still contains the same inspection points in form, but it disrupts the prior dependencies and the step-by-step troubleshooting rhythm that it should follow; thereby disrupting the progressive logic of standard fault diagnosis from phenomenon to cause verification. (6) Responding to Redundant Interference: For termination steps that explicitly state "then end the investigation", after the termination condition is met, forcibly continue writing additional inspection steps, and ensure that these continued steps are not necessarily related to the current fault phenomenon. Specifically, based on Chosen, add the forcibly continued pseudo-follow-up steps to the original stop signal and use it as a Reject.

[0051] During the construction process, upper limits are set for the number of fault investigation nodes corresponding to insertion interference and the number of fault nodes contained in the segment replacement fragments corresponding to segment replacement interference, so that the total number of link nodes in the Reject after the disturbance is within 1.5 times that of the standard answer to the correct answer.

[0052] (ii) Colloquial interference To address errors in large models' responses to troubleshooting links caused by question wording, the following six specific interference types were identified to enhance the model's accuracy in responding to conversational input: (1) Word order adjustment interference: This is used to address the problem that the model cannot correctly identify the core fault phenomenon when the position of the fault phenomenon changes before and after in the user's question word order, which leads to the error in the troubleshooting link.

[0053] (2) Question Expansion Interference: This is used to address the problem that the model cannot accurately extract key fault information when the user expands the description of the question and includes additional explanatory information, resulting in the answer deviating from the troubleshooting link.

[0054] (3) Phenomenon supplement interference: This is used to deal with the problem that the model cannot correctly focus on the main fault phenomenon when the question contains multiple supplementary phenomenon descriptions or background information, resulting in the wrong direction of troubleshooting.

[0055] (4) Sentence synonym rewriting interference: This is used to address the problem that the model cannot identify semantic equivalence when users use different expressions to describe the same fault phenomenon, which leads to incorrect link matching.

[0056] (5) Homophone interference: This is used to address the problem that the model cannot correctly understand faulty keywords when there are human input errors in the user input, which leads to errors in the generation of troubleshooting links.

[0057] (6) Synonym substitution interference: This is used to address the problem that the model cannot complete semantic mapping when users use different professional terms or synonyms to describe the same fault phenomenon, which leads to incorrect judgment of the troubleshooting path.

[0058] The generation of colloquial interference preference pairs is achieved by integrating generation requirements into the prompt words of the large model and automatically generating question variants. For the standard fault question in each standard question-answer pair, prompt words containing perturbation type constraints, rewritten boundary conditions, and output format requirements are constructed. This drives the large model to output multiple questions with colloquial interference in batches, while keeping the original fault phenomenon and key constraints unchanged. These prompt words are then combined with the original questions to form preference pair samples. (1) Word order adjustment and question expansion interference: The prompt words clearly require word order rearrangement and appropriate expansion of the same fault question to generate different narrative orders and questions containing redundant supplementary expressions; (2) The interference of phenomenon supplementation, synonym rewriting and synonym replacement is specified in the prompt words to supplement the description of the fault phenomenon, rewrite the synonym and replace the vocabulary layer, and output the question variants that cover the switching between habitual expressions and standard terms; (3) Homophonic misspelling interference: In the prompt words, the key component name or phenomenon keyword is specified to be replaced with a homophonic misspelling, generating a noisy question containing homophonic misspellings.

[0059] Through the above prompt-driven generation process, a set of questions covering multiple types of colloquial interference forms is automatically obtained under unified constraints, which is used to construct corresponding preference pair data.

[0060] (iii) Counter-interference To address errors in large models' responses to troubleshooting scenarios caused by cue word contamination and question content interference, the following four specific interference types are identified to enhance the model's accuracy under adversarial interference: (1) Irrelevant task interference: This is used to address the problem that when the model is mixed with information about irrelevant tasks in the input, it is pulled away from the correct fault diagnosis link by the interference content.

[0061] (2) Questioning misleading interference: This is used to deal with the problem that when the model is mixed with fault phenomena or interference clues that contain directional misleading information, it incorrectly focuses on non-target faults and generates investigation paths that deviate from the true diagnostic target.

[0062] (3) Symbol noise interference: This is used to address the problem that the accuracy of fault information identification and troubleshooting link generation is affected by the text structure disturbance when there are repeated abnormal punctuation marks or symbols in the user's question.

[0063] (4) Instruction template interference: This is used to address the problem that the output link structure is incorrect or the answer deviates from the expected when the prompt word template changes, or when there are differences in the answer format requirements or constraints.

[0064] The generation of adversarial interference preference pairs is achieved through random injection driven by an interference fragment library. First, an irrelevant task library and instruction library are constructed. Then, for different types of perturbation, entries are randomly extracted from the corresponding fragment library and concatenated into prompts, inputs, or negative examples according to rules, forming preference pairs containing strongly interfering input patterns. (1) Irrelevant task interference: Select fault troubleshooting logic that is related to the input but deviates from the actual target from the irrelevant fault library, and inject it into the input and negative examples respectively. Without changing the original fault semantic boundary, expand the relevant but unresolved questions and responses. (2) Questioning misleading interference: Randomly select irrelevant fault phenomena from the fault phenomena, combine semantic embedding questions to form a directional bias, and add the corresponding error investigation path on the negative example side based on the bias; (3) Symbolic noise interference: Randomly sample non-semantic character sequences such as repeated punctuation, abnormal spaces, and newlines from the symbolic noise fragment set, and insert them into the question text at random positions and in random quantities; (4) Instruction template interference: Randomly select instruction templates with consistent overall goals but different answer requirements from the interference instruction library as prompt word variants, and replace the prompt words in the preference pair, thereby introducing differences in format, granularity or constraints at the instruction level.

[0065] S1.3: Based on the frequency of interference in real-world scenarios, the proportion of each type of interference is controlled and the sample size is constrained to obtain logically incomplete interference datasets, colloquial interference datasets, and adversarial interference datasets for subsequent preference optimization training.

[0066] Among the logical incompleteness interference dataset, single-point error interference, redundant response interference, and sequence perturbation interference account for more than 70% in total, while the proportions of the other three types of interference remain consistent.

[0067] In this embodiment, single-point error interference accounts for about 30-40%, response redundancy interference and sequence perturbation interference account for about 20% and the other three types of interference remain consistent.

[0068] In the colloquial interference dataset, word order adjustment interference and question expansion interference accounted for more than 35% of the total, while the proportions of the other four types of interference remained consistent.

[0069] In this embodiment, word order adjustment interference and question expansion interference account for a relatively large proportion, about 20%-25%, while the proportions of the other four types of interference remain the same.

[0070] In the adversarial interference dataset, irrelevant task interference and question misleading interference account for more than 60% of the total, while the proportions of the other two types of interference remain basically balanced.

[0071] In this embodiment, the proportions of irrelevant task interference and misleading question interference are basically the same, about 35% or more, while the proportions of the other two types of interference remain basically balanced.

[0072] This embodiment contains a total of over 30,000 high-quality preference question-answer pairs.

[0073] Step 2: Construct a fault diagnosis model for engineering machinery based on a large language model. Then, sequentially train the pre-trained model using datasets of logically incomplete interference, colloquial interference, and adversarial interference. In each stage, map the corresponding training objective to key training parameters and dynamically adjust these parameters according to the type of disturbance in the current stage. This allows the model to gradually learn the fault diagnosis knowledge and anti-interference strategies contained in various types of disturbance data within the parameter space, improving the accuracy and overall robustness of the fault diagnosis task, resulting in the trained fault diagnosis model for engineering machinery.

[0074] In each stage, a lightweight fine-tuning method, LoRA (Low-Rank Adaptation), is used. Training objectives such as knowledge injection and preference alignment are mapped to key training parameters such as preference loss weights (β), supervised learning weights (λ), learning rate, and gradient accumulation. These parameters are adjusted within the fine-tuning framework according to the type of perturbation in the current stage. The specific scheme is as follows: The first stage involves fine-tuning the model based on a dataset with incomplete logical interference. This is used to establish the basic specifications for fault diagnosis output and to complete the initial injection of logical knowledge. In terms of setting β and λ, based on the characteristic of emphasizing knowledge accuracy in datasets with incomplete logical interference, β is less than 0.4 and λ is not less than 0.5. The learning rate and gradient accumulation value are also set to match the learning objective.

[0075] In this embodiment, a relatively low β is used in the training configuration, ranging from 0.2 to 0.3, to reduce the aggressiveness of preference terms in parameter updates, allowing the model to stably absorb preference pairs and avoid output distribution drift in the early stages of training. Simultaneously, λ is set between 0.5 and 0.7 to allow the supervised learning signal and the preference optimization signal to act in parallel, ensuring that the model maintains consistency in response format, item structure, and wording while learning path logic. To address memory and stability constraints, a learning rate ranging from 4 × 10⁻⁶ is set at this stage. -6 ~6×10 -6 The gradient accumulation strategy ranges from 8 to 10, which keeps gradient updates smooth, prioritizes solidifying representation features related to fault diagnosis specifications and logical links, and suppresses overfitting tendencies caused by small sample noise.

[0076] The second stage involves fine-tuning the model based on a conversational interference dataset to improve its robustness under conversational perturbation conditions. Regarding the settings of β and λ, based on the emphasis on robustness of responses in the conversational interference dataset, the β value is increased, the λ value is decreased, and the learning rate and gradient accumulation value are increased, all based on the parameters in the first stage.

[0077] In this embodiment, the β value is increased to between 0.6 and 0.7 in this stage to strengthen the driving force for distinguishing between positive and negative examples, enabling the model to maintain consistent diagnostic conclusions and investigation steps under similar input conditions such as typos, word order changes, and paraphrasing. Simultaneously, λ is relatively reduced to between 0.4 and 0.5 to weaken the strong constraint of the supervision signal on the generation distribution, allowing the preference signal to become the dominant optimization objective in this stage. During training, the gradient accumulation is increased to 12-14 to obtain a gradient smoothing effect equivalent to a larger batch size, and the learning rate is correspondingly increased to 4×10⁻⁶. -5 ~6×10 -5 This improves the speed of adaptation to new perturbation samples, enabling the model to quickly transfer and absorb colloquial variations, and enhances the generalization ability of the consistency task under different expressions.

[0078] The third stage involves fine-tuning the model based on an adversarial interference dataset to address complex and strong interferences such as semantic pollution, irrelevant task injection, and instruction offset. Regarding the settings of β and λ, based on the adversarial interference dataset's emphasis on robustness of responses, the β value is reduced and the λ value is increased, while keeping the learning rate and gradient accumulation constant.

[0079] In this embodiment, this stage uses adversarial interference preference pairs as the core training samples and rebalances the error rejection capability and usable output by adjusting β and λ. Specifically, β is moderately lowered compared to the second stage, to around 0.4-0.5, to avoid excessive punishment on the negative example side, which could lead to overly conservative or generative suppression in the model; at the same time, λ is raised back to around 0.4-0.5, allowing the supervision signal to participate in the constraints again, maintaining the fluency of the response, semantic integrity, and the existing structured output specifications without being violated. In the training update of this stage, the focus is on controlling the optimization magnitude of the difference between the reward signal and the negative example probability, enabling the model to identify and resist irrelevant inputs and misleading, while maintaining normal response capability to valid diagnostic requests, thereby achieving robust fault diagnosis output and consistent step-by-step inference results under strong interference conditions.

[0080] Step 3: Use the trained engineering machinery fault diagnosis model to diagnose engineering machinery faults.

[0081] Based on the above-described method for diagnosing engineering machinery faults using a multi-stage perturbation fine-tuning large model, this invention also provides a device for diagnosing engineering machinery faults using a multi-stage perturbation fine-tuning large model. This device includes a memory and one or more processors. The memory stores executable code, and when the one or more processors execute the executable code, they implement the engineering machinery fault diagnosis method based on the multi-stage perturbation fine-tuning large model described in the above embodiments.

[0082] This device can be applied to industrial or computer equipment with data processing capabilities, and can be implemented through software, hardware, or a combination of both. Taking software implementation as an example, it is formed by the device processor reading and running computer program instructions from non-volatile memory. From a hardware perspective, the device may include basic hardware such as processors, memory, network interfaces, and non-volatile memory. Additional software and hardware can be added according to the needs of the industrial scenario, depending on the actual functional configuration, which will not be elaborated further here.

[0083] The specific implementation process of the functions and roles of each unit in the above device can be found in the implementation process of the corresponding steps in the above method, and will not be repeated here.

[0084] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of the present invention according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0085] This invention also provides a computer-readable storage medium storing a program thereon. When executed by a processor, this program implements a fault diagnosis method for engineering machinery based on a multi-stage perturbation fine-tuning large model, as described in the above-described method embodiments. The computer-readable storage medium can be an internal storage unit (such as a hard disk or memory), an external storage device (such as a plug-in hard disk, SD card, or flash memory card), or simultaneously include both internal and external storage units, used to store computer programs and data required by the device.

[0086] It will be understood by those skilled in the art that the above descriptions are merely preferred examples of the invention and are not intended to limit the invention. Although the invention has been described in detail with reference to the foregoing examples, those skilled in the art can still modify the technical solutions described in the foregoing examples or make equivalent substitutions for some of the technical features. All modifications and equivalent substitutions made within the spirit and principles of the invention should be included within the scope of protection of the invention.

Claims

1. A method for fault diagnosis of engineering machinery based on a large-scale model with multi-stage perturbation fine-tuning, characterized in that, Includes the following steps: S1: Based on the troubleshooting knowledge that includes the fault diagnosis logic of engineering machinery, standard question-and-answer pairs for troubleshooting methods of various fault phenomena are compiled; in view of the insufficient understanding of structured knowledge by large language models and the interference in the actual troubleshooting process, perturbation is applied to the standard question-and-answer pairs to form preference sample pairs containing interference; and sample ratio and sample size constraints are imposed on the specific situation of interference to obtain logically incomplete interference dataset, colloquial interference dataset, and adversarial interference dataset. S2: Construct a fault diagnosis model for engineering machinery based on a large language model, and train the pre-trained fault diagnosis model in stages based on logical incomplete interference dataset, colloquial interference dataset, and adversarial interference dataset. In each stage, the corresponding training objective is mapped to key training parameters, and the key training parameters are dynamically adjusted according to the type of disturbance in the current stage. This allows the model to gradually learn the fault diagnosis knowledge and anti-interference strategies contained in various disturbance data in the parameter space, thereby improving the accuracy and overall robustness of the fault diagnosis task and obtaining the trained fault diagnosis model for engineering machinery. S3: Use the trained engineering machinery fault diagnosis model to diagnose engineering machinery faults.

2. The method for fault diagnosis of engineering machinery based on a multi-stage perturbation fine-tuning large model according to claim 1, characterized in that, S1 includes the following sub-steps: S1.1: Based on the relationship between the preceding and following nodes in the fault diagnosis logic, the investigation chain for each fault phenomenon is sorted out, and standard question-and-answer pairs for different fault phenomena are obtained through file parsing and fault relationship recognition algorithms. S1.2: To address the logical incompleteness interference caused by the large language model's insufficient understanding of structured knowledge for fault diagnosis, as well as the colloquial interference and adversarial interference that occur in real fault repair scenarios, the standard question-answer pairs are rewritten. Logical incompleteness interference is reflected in the negative examples of the preference pairs, colloquial interference is reflected in the input and negative examples of the preference pairs, and adversarial interference is reflected in the prompts, input, and negative examples of the preference pairs, thus forming preference pairs that contain interference. S1.3: Based on the frequency of interference in real-world scenarios, the proportion of each type of interference is controlled and the sample size is constrained to obtain logically incomplete interference datasets, colloquial interference datasets, and adversarial interference datasets for subsequent preference optimization training.

3. The method for fault diagnosis of engineering machinery based on a multi-stage perturbation fine-tuning large model according to claim 1, characterized in that, Logical incompleteness interference specifically includes six types: insertion interference, partial substitution interference, single point error interference, segmented substitution interference, sequence disturbance interference, and response redundancy interference. When constructing logical incompleteness interference preference pairs, using a complete fault diagnosis link as the framework, the six types of logical incompleteness interference are handled as follows: (1) Insertion-type interference: On the basis of keeping the original correct key nodes unchanged, additional troubleshooting steps that are unrelated to the current fault phenomenon are inserted, forming a seemingly reasonable but actually redundant bypass check; (2) Local replacement interference: Select a local troubleshooting short chain that is designed for other fault phenomena, and replace a segment of the current link with it as a whole segment. The focus is on destroying the segment-level reasoning loop, so that the local semantic descriptions may be similar but the causal orientations do not match. (3) Single point error interference: Without changing the main structure of the preceding inspection, the originally correct final confirmation step is replaced with another incorrect troubleshooting action; the incorrect action shares the same root node or upstream branch source as the correct path, but deviates at the leaf conclusion; (4) Segment replacement interference: Replace the current standard path with another investigation path that is structurally complete, has closed steps, but has a completely wrong causal link, so that the error can be extended from the local to the whole link level; (5) Sequence disturbance type interference: By swapping the order of intermediate inspection steps, the link still contains the same inspection points in form, but it disrupts the prior dependencies and the step-by-step troubleshooting rhythm that it should follow; thereby disrupting the progressive logic of standard fault diagnosis from phenomenon to cause verification. (6) Responding to redundant interference: For termination steps that have been clearly stated as "then end the investigation", after the termination conditions are met, continue writing additional inspection steps and ensure that these continued steps are not necessarily related to the current fault phenomenon.

4. The method for fault diagnosis of engineering machinery based on a multi-stage perturbation fine-tuning large model according to claim 1, characterized in that, The colloquial interference includes six types: word order adjustment interference, question expansion interference, phenomenon supplementation interference, sentence meaning synonym rewriting interference, homophonic misspelling interference, and synonym substitution interference. The generation of the colloquial interference preference pairs is specifically as follows: for the standard fault question in each standard question-answer pair, construct prompt words containing perturbation type constraints, rewritten boundary conditions and output format requirements, drive the large model to output multiple questions with colloquial interference in batches while keeping the original fault phenomenon and key constraints unchanged, and form preference pair samples with the original questions.

5. The method for fault diagnosis of engineering machinery based on a multi-stage perturbation fine-tuning large model according to claim 1, characterized in that, The adversarial interference includes four types: irrelevant task interference, question misleading interference, symbolic noise interference, and instruction template interference; The generation of the adversarial interference preference pairs is specifically achieved through random injection driven by the interference fragment library. First, an irrelevant task library and an instruction library are constructed, and entries are randomly extracted from the corresponding fragment library for different types of perturbation. These entries are then concatenated into prompt words, inputs, or negative examples according to rules to form preference pairs containing strong interference input forms.

6. The method for fault diagnosis of engineering machinery based on a multi-stage perturbation fine-tuning large model according to claim 1, characterized in that, The key training parameters include the preference loss weight β and the supervised learning weight λ.

7. The method for fault diagnosis of engineering machinery based on a multi-stage perturbation fine-tuning large model according to claim 6, characterized in that, In S2, when training the pre-trained engineering machinery fault diagnosis model based on the logically incomplete interference dataset, the preference loss weight β is less than 0.4, the supervised learning weight λ is not less than 0.5, and a learning rate and gradient accumulation value matching the target are set.

8. The method for fault diagnosis of engineering machinery based on a multi-stage perturbation fine-tuning large model according to claim 7, characterized in that, In S2, when training the engineering machinery fault diagnosis model based on the colloquial interference dataset, it is necessary to increase the β value, decrease the λ value, and increase the learning rate and gradient accumulation value based on the parameters of the first stage.

9. The method for fault diagnosis of engineering machinery based on a multi-stage perturbation fine-tuning large model according to claim 8, characterized in that, In S2, when training the engineering machinery fault diagnosis model based on the adversarial interference dataset, the β value is reduced and the λ value is increased based on the parameters of the second stage, while keeping the learning rate and gradient accumulation value unchanged.

10. A fault diagnosis device for engineering machinery based on a multi-stage perturbation fine-tuning large model, characterized in that, The device includes one or more processors for implementing the engineering machinery fault diagnosis method based on a multi-stage perturbation fine-tuning large model as described in any one of claims 1 to 9.