High-speed railway train control system fault diagnosis and maintenance method and system based on large language model

CN123030949APending Publication Date: 2026-11-03BEIJING JIAOTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611100155.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-23
Publication Date
2026-11-03

AI Technical Summary

Technical Problem

Existing fault diagnosis methods for train control systems lack generalization ability under limited sample conditions, have weak interpretability and traceability of diagnostic results, and are difficult to directly output maintenance suggestions. Furthermore, general pre-trained large language models are difficult to adapt to railway professional terminology and operation and maintenance specifications.

Method used

A three-stage training method based on a large language model is adopted, including railway domain adaptation, supervised instruction fine-tuning, and expert preference alignment. A unified training dataset is constructed by acquiring fault text data, the parameters of the pre-trained model are frozen for low-rank adaptation, and category semantic supervision and expert preference optimization loss are introduced to generate maintenance-oriented diagnostic results with fault categories, diagnostic basis, and maintenance suggestions.

Benefits of technology

Under conditions of few samples, the system achieves integrated generation of fault categories, diagnostic criteria, and maintenance recommendations, improving the accuracy, interpretability, and engineering applicability of the diagnosis. It can output natural language diagnostic results that conform to expert diagnostic logic and operation and maintenance specifications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123030949A_ABST
    Figure CN123030949A_ABST
Patent Text Reader

Abstract

The application provides a high-speed railway train control system fault diagnosis and maintenance method and system based on a large language model, belongs to the technical field of intelligent operation and maintenance and fault diagnosis of rail transit, and acquires a train control system fault text to be diagnosed; a trained fault diagnosis model is used to process the train control system fault text to be diagnosed, and a maintenance-oriented fault diagnosis result including at least three parts of fault categories, diagnosis basis and maintenance suggestions is output. The application reconstructs the train control system fault diagnosis into a maintenance-oriented instruction generation task, realizes integrated generation of fault categories, diagnosis basis and maintenance suggestions through three-stage training of railway field domain adaptation, supervised instruction fine-tuning and expert preference alignment, solves the problems of insufficient generalization ability, weak diagnosis result interpretability and traceability, difficulty in directly outputting maintenance suggestions, and difficulty of a general pre-training large language model in directly adapting to railway professional terms, fault semantics and operation and maintenance specifications.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent operation and maintenance and fault diagnosis technology for rail transit, specifically to a fault diagnosis and maintenance method and system for high-speed railway train control systems based on a large language model. Background Technology

[0002] The high-speed railway train control system is a critical core system for ensuring train operation safety, improving transportation efficiency, and maintaining operational order. During long-term operation, the onboard equipment of the train control system generates a large amount of fault text data. This data records the equipment's operating status, abnormal phenomena, fault evolution clues, and implicit correlations between faults and symptoms, forming a crucial foundation for data-driven fault diagnosis and intelligent operation and maintenance. For the safety-critical scenario of high-speed railways, timely and accurate identification of fault types, and the subsequent formation of diagnostic conclusions that can be used for on-site inspection and maintenance, are of great significance for ensuring the safe and stable operation of the system.

[0003] Most existing fault diagnosis methods for train control systems have evolved from rule-based and knowledge-based methods to traditional machine learning methods and deep learning methods. Early methods mainly relied on manually constructed rules, fault knowledge bases, and shallow classifiers for fault identification. Subsequently, text mining-based models such as XGBoost, TextCNN, BiLSTM, BERT, and XLNet were gradually applied to fault text diagnosis tasks, which improved text semantic modeling capabilities and fault identification accuracy to a certain extent.

[0004] However, existing technologies still have the following shortcomings. First, train control system fault texts are typical professional domain texts, often containing a large number of railway-specific terms, abbreviations, non-standard expressions, and noisy information. The complex text format makes it difficult to understand the semantics of faults and classify them. Second, due to the natural scarcity of fault samples in safety-critical scenarios, the reliance on expert annotation, and the high cost, high-quality labeled data is usually scarce. Existing methods are prone to insufficient generalization ability under conditions of few samples. Third, most existing methods still treat fault diagnosis primarily as a discrete category classification problem. The output results are usually only fault labels, lacking diagnostic basis explanations and maintenance suggestions adapted to actual operation and maintenance scenarios. This results in insufficient interpretability, traceability, and executability of diagnostic results, making it difficult to directly support on-site maintenance decisions.

[0005] In recent years, pre-trained large language models have demonstrated strong capabilities in natural language understanding, generation, and reasoning, providing a new technical approach for text-based fault diagnosis in train control systems. Compared to traditional discriminative models, large language models can extract richer semantic relationships from unstructured fault texts and output diagnostic results in natural language form, thus possessing the potential to integrate fault category generation, diagnostic basis, and maintenance recommendations.

[0006] However, directly applying general-purpose pre-trained large language models to fault diagnosis in train control systems still has significant limitations. On the one hand, general-purpose models lack terminology, fault semantics, and operational knowledge specific to the train control system domain, making them prone to misinterpretations of specialized expressions. On the other hand, with limited labeled samples, directly performing full parameter fine-tuning not only incurs high computational and storage costs but also easily leads to overfitting and catastrophic forgetting, affecting the model's deployment and application in real-world engineering scenarios. Furthermore, ensuring that the model's generated results conform to expert diagnostic logic and operational specifications remains an unresolved issue with current technology. Summary of the Invention

[0007] The purpose of this invention is to provide a fault diagnosis and maintenance method and system for high-speed railway train control systems based on a large language model. This method can effectively learn the semantics of professional faults under limited sample conditions and output maintenance-oriented diagnostic results that include fault categories, diagnostic basis, and maintenance suggestions. This improves the accuracy, interpretability, and engineering applicability of fault diagnosis in train control systems, thereby solving at least one of the technical problems existing in the background art.

[0008] To achieve the above objectives, the present invention adopts the following technical solution:

[0009] In a first aspect, the present invention provides a fault diagnosis and maintenance method for a high-speed railway train control system based on a large language model, comprising:

[0010] Obtain the fault text of the train control system to be diagnosed;

[0011] The trained fault diagnosis model processes the text of train control system faults to be diagnosed, outputting maintenance-oriented fault diagnosis results that include at least three parts: fault category, diagnostic basis, and maintenance recommendations. Training the fault diagnosis model includes: acquiring fault text data generated by onboard equipment of the high-speed railway train control system and constructing a unified training dataset. ,in Enter the error text. Diagnostic response based on expert preference The non-preference diagnostic response is based on a pre-trained large language model as the base model, and railway domain adaptation training, supervised instruction fine-tuning training, and expert preference alignment training are performed sequentially on the pre-trained large language model. The fault text to be diagnosed is input into the model after the three-stage training, and the output is a maintenance-oriented fault diagnosis result containing fault category, diagnostic basis, and maintenance suggestions.

[0012] As a further limitation of the first aspect of the present invention, the expert preference diagnostic response satisfies ,in Indicates the fault category label, Indicates the basis for diagnosis. This indicates maintenance recommendations; among them, the dataset used for adaptation training in the railway domain is... Supervised instruction fine-tuning training uses a dataset. Expert preference alignment training uses the unified training dataset. .

[0013] As a further limitation of the first aspect of the present invention, the railway domain adaptation training adopts the low-rank adaptation LoRA method, freezing the original parameters of the pre-trained large language model and training only the low-rank adaptation parameters, and according to... The linear mapping of the model is updated, where For frozen pre-training parameters, and It is a low-rank fitting matrix. It is a low rank value. The scaling factor is used; the low-rank adaptation parameter is inserted into the query projection, key projection, and value projection of the model's self-attention module, as well as the feedforward network projection layer.

[0014] As a further limitation of the first aspect of the present invention, the railway domain adaptation training further introduces category semantic supervision alignment constraints, and predicts semantic representation based on samples. Its true fault category semantic representation Similarity construction domain adaptation loss This is to improve the model's ability to identify technical terms, fault modes, and category boundaries of train control systems.

[0015] As a further limitation of the first aspect of the present invention, the supervised instruction fine-tuning training employs negative log-likelihood loss based on expert preference diagnostic response. This enables the model to learn to generate a structured diagnostic response that includes fault category, diagnostic basis, and maintenance suggestions based on the input fault text.

[0016] As a further limitation of the first aspect of the present invention, the expert preference alignment training employs direct preference optimization loss. The basis for this is to improve the diagnostic response based on expert preference. Compared to non-preferred diagnostic responses The relative generation probability, and through the reference model strategy Compared with the current model strategy The probability ratio is constrained to make the model output more consistent with expert diagnostic logic and operation and maintenance specifications.

[0017] Secondly, the present invention provides a fault diagnosis and maintenance system for a high-speed railway train control system based on a large language model, comprising:

[0018] The acquisition module is used to acquire the fault text of the train control system to be diagnosed;

[0019] The processing module is used to process the fault text of the train control system to be diagnosed using a trained fault diagnosis model, and output a maintenance-oriented fault diagnosis result that includes at least three parts: fault category, diagnostic basis, and maintenance recommendations. Training the fault diagnosis model includes: acquiring fault text data generated by the onboard equipment of the high-speed railway train control system and constructing a unified training dataset. ,in Enter the error text. Diagnostic response based on expert preference The non-preference diagnostic response is based on a pre-trained large language model as the base model, and railway domain adaptation training, supervised instruction fine-tuning training, and expert preference alignment training are performed sequentially on the pre-trained large language model. The fault text to be diagnosed is input into the model after the three-stage training, and the output is a maintenance-oriented fault diagnosis result containing fault category, diagnostic basis, and maintenance suggestions.

[0020] Thirdly, the present invention provides a non-transitory computer-readable storage medium for storing computer instructions, which, when executed by a processor, implement the fault diagnosis and maintenance method for a high-speed railway train control system based on a large language model as described in the first aspect.

[0021] Fourthly, the present invention provides a computer device including a memory and a processor, wherein the processor and the memory communicate with each other, the memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the fault diagnosis and maintenance method for high-speed railway train control system based on a large language model as described in the first aspect.

[0022] Fifthly, the present invention provides an electronic device, comprising: a processor, a memory, and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory to cause the electronic device to execute instructions for implementing the fault diagnosis and maintenance method for a high-speed railway train control system based on a large language model as described in the first aspect.

[0023] The beneficial effects of this invention are as follows: It reconstructs the fault diagnosis of train control systems into a maintenance-oriented instruction generation task. Through three-stage training—railway domain adaptation, supervised instruction fine-tuning, and expert preference alignment—it achieves the integrated generation of fault categories, diagnostic basis, and maintenance suggestions. This solves the problems of insufficient generalization ability of existing train control system fault diagnosis technologies under conditions of few samples, weak interpretability and traceability of diagnostic results, difficulty in directly outputting maintenance suggestions, and the difficulty of general pre-trained large language models in directly adapting to railway professional terminology, fault semantics, and operation and maintenance specifications.

[0024] The advantages of additional aspects of the invention will be set forth more clearly in the following description or will be learned by practice of the invention. Attached Figure Description

[0025] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0026] Figure 1 This is a framework diagram of the fault diagnosis and maintenance guidance generation method for train control systems based on a pre-trained large language model, as described in an embodiment of the present invention.

[0027] Figure 2 This is a flowchart illustrating the railway domain adaptation training, supervised instruction fine-tuning training, and expert preference alignment training as described in this embodiment of the invention. Detailed Implementation

[0028] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.

[0029] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0030] It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with their meanings in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless defined as here.

[0031] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this specification means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, and / or groups thereof.

[0032] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of those different embodiments or examples.

[0033] To facilitate understanding of the present invention, the present invention will be further explained and described below with reference to the accompanying drawings and specific embodiments. However, the specific embodiments do not constitute a limitation on the embodiments of the present invention.

[0034] Those skilled in the art should understand that the accompanying drawings are merely schematic diagrams of embodiments, and the components in the drawings are not necessarily essential for implementing the present invention.

[0035] This invention provides a maintenance-oriented generation method for fault diagnosis in train control systems. The method includes: acquiring fault text data generated by onboard equipment in high-speed railway train control systems; constructing a large language model backbone network based on a decoder-based Transformer, and using LoRA low-rank adaptation for railway domain semantic injection to achieve efficient parameter adaptation of train control system terminology and fault semantics; establishing an integrated generation mechanism of "fault type—diagnostic basis—maintenance suggestion" through supervised instruction fine-tuning; and further aligning the model output with expert diagnostic logic and operation and maintenance specifications using direct preference optimization to obtain maintenance-oriented fault diagnosis results. This invention can elevate traditional discrete fault classification into interpretable, traceable, and executable natural language diagnostic output, maintaining good diagnostic generalization ability and safety consistency even under limited sample conditions, and can provide support for intelligent operation and maintenance decisions in high-speed railway train control systems.

[0036] Example 1

[0037] In this embodiment 1, a fault diagnosis and maintenance system for high-speed railway train control systems based on a large language model is first provided, including: an acquisition module for acquiring fault text of the train control system to be diagnosed; and a processing module for processing the fault text of the train control system to be diagnosed using a trained fault diagnosis model, and outputting a maintenance-oriented fault diagnosis result including at least three parts: fault category, diagnostic basis, and maintenance suggestions; wherein, training the fault diagnosis model includes: acquiring fault text data generated by the on-board equipment of the high-speed railway train control system, and constructing a unified training dataset. ,in Enter the error text. Diagnostic response based on expert preference The non-preference diagnostic response is based on a pre-trained large language model as the base model, and railway domain adaptation training, supervised instruction fine-tuning training, and expert preference alignment training are performed sequentially on the pre-trained large language model. The fault text to be diagnosed is input into the model after the three-stage training, and the output is a maintenance-oriented fault diagnosis result containing fault category, diagnostic basis, and maintenance suggestions.

[0038] In this embodiment, the above-described system is used to implement a fault diagnosis and maintenance method for high-speed railway train control systems based on a large language model, including:

[0039] Obtain the fault text of the train control system to be diagnosed;

[0040] The trained fault diagnosis model processes the text of train control system faults to be diagnosed, outputting maintenance-oriented fault diagnosis results that include at least three parts: fault category, diagnostic basis, and maintenance recommendations. Training the fault diagnosis model includes: acquiring fault text data generated by onboard equipment of the high-speed railway train control system and constructing a unified training dataset. ,in Enter the error text. Diagnostic response based on expert preference The non-preference diagnostic response is based on a pre-trained large language model as the base model, and railway domain adaptation training, supervised instruction fine-tuning training, and expert preference alignment training are performed sequentially on the pre-trained large language model. The fault text to be diagnosed is input into the model after the three-stage training, and the output is a maintenance-oriented fault diagnosis result containing fault category, diagnostic basis, and maintenance suggestions.

[0041] Wherein, the expert preference diagnostic response satisfies ,in Indicates the fault category label, Indicates the basis for diagnosis. This indicates maintenance recommendations; among them, the dataset used for adaptation training in the railway domain is... Supervised instruction fine-tuning training uses a dataset. Expert preference alignment training uses the unified training dataset. .

[0042] The railway domain adaptation training adopts the low-rank adaptation (LoRA) method, freezing the original parameters of the pre-trained large language model and training only the low-rank adaptation parameters, and following the... The linear mapping of the model is updated, where For frozen pre-training parameters, and It is a low-rank fitting matrix. It is a low rank value. The scaling factor is used; the low-rank adaptation parameter is inserted into the query projection, key projection, and value projection of the model's self-attention module, as well as the feedforward network projection layer.

[0043] The railway domain adaptation training further introduces category semantic supervision alignment constraints, predicting semantic representations based on samples. Its true fault category semantic representation Similarity construction domain adaptation loss This is to improve the model's ability to identify technical terms, fault modes, and category boundaries of train control systems.

[0044] The supervised instruction fine-tuning training employs negative log-likelihood loss based on expert preference-based diagnostic responses. This enables the model to learn to generate a structured diagnostic response that includes fault category, diagnostic basis, and maintenance suggestions based on the input fault text.

[0045] The expert preference alignment training employs direct preference optimization loss. The basis for this is to improve the diagnostic response based on expert preference. Compared to non-preferred diagnostic responses The relative generation probability, and through the reference model strategy Compared with the current model strategy The probability ratio is constrained to make the model output more consistent with expert diagnostic logic and operation and maintenance specifications.

[0046] Example 2

[0047] In this embodiment 2, a maintenance-oriented generation method for train control system fault diagnosis based on a pre-trained large language model is provided to address the problems of insufficient generalization ability, weak interpretability and traceability of diagnostic results, difficulty in directly outputting maintenance suggestions, and the inability of general pre-trained large language models to directly adapt to railway professional terminology, fault semantics, and operation and maintenance specifications in existing train control system fault diagnosis technologies under conditions of few samples. Existing methods mostly focus on discrete fault classification, while this embodiment reconstructs train control system fault diagnosis into a maintenance-oriented instruction generation task. Through three stages of training—railway domain adaptation, supervised instruction fine-tuning, and expert preference alignment—the integrated generation of fault categories, diagnostic criteria, and maintenance suggestions is achieved.

[0048] The fault diagnosis and maintenance guidance generation method for train control systems based on a pre-trained large language model described in this embodiment includes: acquiring fault text data generated by onboard equipment of a high-speed railway train control system; constructing a unified training dataset; acquiring a pre-trained large language model as the base model; sequentially performing railway domain adaptation training, supervised instruction fine-tuning training, and expert preference alignment training on the pre-trained large language model; inputting the fault text to be diagnosed into the model after completing the three-stage training, and outputting maintenance-oriented fault diagnosis results containing fault categories, diagnostic basis, and maintenance suggestions.

[0049] The unified training dataset is defined as follows: ;in, Indicates the first Input a fault text. This indicates the corresponding expert preference diagnostic response. This represents the corresponding non-preference diagnostic response. The expert preference diagnostic response is further represented as... ;in, Indicates the fault category, Indicates the basis for diagnosis. This indicates maintenance recommendations. Based on the aforementioned unified data organization method, railway domain adaptation training uses fault category supervision, supervised instruction fine-tuning uses structured optimal response supervision, and expert preference alignment uses pairwise preference supervision, thus forming a three-stage optimization process from shallow to deep. Furthermore, the pre-trained large language model processes the input fault text... Generate diagnostic response sequence The conditional probability satisfies: The autoregressive probability of the complete diagnostic response sequence satisfies .

[0050] Through the aforementioned autoregressive generation mechanism, the model can output fault categories, diagnostic criteria, and maintenance suggestions word-by-word in natural language, realizing the task reconstruction from traditional fault classification to maintenance-oriented diagnostic generation. Furthermore, in the railway domain adaptation training phase, a low-rank adaptation method is used to efficiently train the parameters of the pre-trained large language model, freezing the original pre-training parameters and training only the low-rank adaptation parameters. Its linear mapping update form is as follows: ;in, This indicates the frozen pre-training parameters. and Represents a low-rank fitness matrix. Indicates the low rank value. The scaling factor is represented. The low-rank adaptation parameters are inserted into the query projection, key projection, and value projection of the model's self-attention module, as well as the feedforward network projection layer, to inject train control system fault semantics, railway terminology, and category boundary knowledge into the pre-trained large language model without full parameter fine-tuning, thereby alleviating the domain mismatch between general corpus and railway fault text.

[0051] Furthermore, the dataset used in the railway domain adaptation training phase is as follows: ;

[0052] In this stage, to enhance the model's ability to consistently represent the semantic boundaries of fault categories, a category semantic supervision alignment loss is introduced. Its complete expression is:

[0053]

[0054] in, Represents a small batch of sample sets. Indicates the first Predicted semantic representation of a faulty text sample This represents the semantic representation corresponding to its actual fault category. Indicates the temperature coefficient. Let represent the similarity function; the similarity function uses cosine similarity, and its expression is:

[0055]

[0056] By minimizing the This enables the model to obtain semantic representations in the railway domain that are more consistent with the fault categories of the train control system, establishing a reliable semantic foundation for subsequent structured diagnostic generation. Furthermore, the dataset used in the supervised instruction fine-tuning training phase is: ;

[0057] in, The goal is to achieve structured diagnostics. In this stage, negative log-likelihood loss is employed. The model is optimized, and its complete expression is:

[0058]

[0059] in, This indicates expert preference in diagnostic responses. By minimizing the stated... This enables the model to learn to generate diagnostic outputs conforming to a preset structure based on fault text, thereby learning not only "what the fault is," but also "why this judgment is made" and "how to maintain and handle it." Furthermore, in the expert preference alignment training phase, a unified training dataset is used... Expert preference diagnostic response for the same fault text Non-preferred diagnostic response Construct preference pairs and optimize the loss using direct preferences. The model is optimized, and its complete expression is:

[0060]

[0061] in, This indicates the current model strategy to be optimized. This represents the reference model strategy obtained during the supervised instruction fine-tuning phase. This represents the Sigmoid function. This represents the preference constraint coefficient. By minimizing the... This increases the relative generation probability of expert-preferred responses and suppresses non-preferred responses, making the generated results more consistent with railway expert diagnostic logic and operation and maintenance specifications, thereby improving the reliability and consistency of diagnostic responses in safety-critical scenarios.

[0062] Furthermore, after completing the three-stage training, the model can output maintenance-oriented fault diagnosis results from the text of the fault to be diagnosed. These results include at least three parts: fault category, diagnostic basis, and maintenance recommendations. Compared to existing discriminative methods that primarily output discrete fault labels, this invention can generate integrated natural language diagnostic results that better meet the needs of on-site maintenance and intelligent operation and maintenance of high-speed railways. Specifically, the maintenance-oriented fault diagnosis results include at least three parts: a classification result representing the fault category, a diagnostic basis text representing the judgment basis, and maintenance recommendation text guiding maintenance or handling. Compared to existing discriminative methods that primarily output discrete fault labels, this invention can output integrated natural language diagnostic results that better meet the needs of on-site operation and maintenance.

[0063] Example 3

[0064] In this embodiment 3, a method for generating maintenance guidance for fault diagnosis in train control systems based on a pre-trained large language model is provided. The main process includes fault text data construction, railway domain adaptation training based on the pre-trained large language model, supervised instruction fine-tuning training, expert preference alignment training, and generation of maintenance guidance diagnosis results. The method framework is as follows: Figure 1 As shown.

[0065] Step 1: Obtain fault text data generated by the onboard equipment of the high-speed railway train control system, and construct a unified training dataset, which is represented as follows:

[0066] in, Indicates the first Input a fault text. This indicates the corresponding expert preference diagnostic response. This represents the corresponding non-preference diagnostic response. Preferably, the expert preference diagnostic response is further expressed as:

[0067]

[0068] in, Indicates the fault category, Indicates the basis for diagnosis. This indicates maintenance recommendations. Through the aforementioned unified data organization method, the same set of data can serve three purposes: domain adaptation training, supervised instruction fine-tuning training, and expert preference alignment training in the railway field. This method partially adopts this unified data representation and explicitly states that domain adaptation uses only category information, instruction fine-tuning uses preferred structured responses, and preference alignment uses preferred and non-preferred response pairs.

[0069] In this embodiment, the fault text data comes from real fault text data of 300T vehicle-mounted equipment, containing a total of 987 samples, covering seven types of faults: wireless communication faults, relay-related faults, BTM-related faults, VDX-related faults, SDU-related faults, DMI-related faults, and ATPCU software faults.

[0070] Step 2: Obtain a pre-trained large language model as the base model. The pre-trained large language model processes the input faulty text. Generate diagnostic response sequence The conditional probability satisfies:

[0071]

[0072] The autoregressive probability of the complete diagnostic response sequence satisfies:

[0073]

[0074] Through the aforementioned autoregressive generation mechanism, the model can output fault categories, diagnostic criteria, and maintenance recommendations word by word.

[0075] Step 2-1: As Figure 2 Phase 1 involves constructing training data for railway domain adaptation. In this phase, training is performed using only fault texts and their fault categories. The training data is represented as follows:

[0076]

[0077] in, Indicates fault text, This represents the corresponding fault category label. This stage is mainly used to inject train control system fault semantics and railway professional terminology into the pre-trained large language model.

[0078] Step 2-2: To reduce the computational and storage overhead of full parameter fine-tuning and mitigate overfitting and catastrophic forgetting problems, this invention employs the LoRA low-rank adaptation method, training only the low-rank adaptation parameters and freezing the original parameters of the pre-trained large language model. Its linear mapping update form is as follows:

[0079]

[0080] in, This indicates the frozen pre-training parameters. and Represents a low-rank fitness matrix. Indicates the low rank value. This represents the scaling factor. Preferably, the low-rank adaptation parameter is inserted into the query projection, key projection, and value projection of the model's self-attention module, as well as the feedforward network projection layer.

[0081] Steps 2-3: To enhance the model's ability to consistently represent the semantic boundaries of fault categories in the train control system, this invention introduces a category semantic supervision alignment loss in the railway domain adaptation stage, the expression of which is:

[0082]

[0083] in, Represents a small batch of sample sets. Indicates the first Predicted semantic representation of each sample, This represents the semantic representation corresponding to its actual fault category. Indicates the temperature coefficient. The similarity function is represented by: Preferably, the similarity function is cosine similarity, and its expression is:

[0084]

[0085] By minimizing the This enables the model to obtain a railway domain semantic representation that is more consistent with the fault categories of the train control system.

[0086] Step 3: As Figure 2 Phase Two, as shown, involves supervised instruction fine-tuning training after completing the railway domain adaptation training. This training uses fault texts and their corresponding expert preference diagnostic responses. The training data is represented as follows:

[0087]

[0088] in, The goal is structured diagnosis. In practice, diagnostic instruction text and fault text can be concatenated and input into the model, allowing the model to learn and output fault categories, diagnostic basis, and maintenance recommendations according to a preset format. This stage aims to transform the railway semantic understanding capabilities gained in the previous stage into structured maintenance-oriented diagnostic generation capabilities. In this stage, negative log-likelihood loss is used for optimization, and its expression is:

[0089]

[0090] in, This indicates expert preference in diagnostic responses. By minimizing the stated... This enables the model to learn to generate a structured diagnostic response that includes fault category, diagnostic basis, and maintenance suggestions based on the input fault text.

[0091] Step 4: As Figure 2 Phase 3 involves expert preference alignment training. After completing supervised instruction fine-tuning training, the training is performed based on a unified training dataset. Expert preference diagnostic response for the same fault text Non-preferred diagnostic response Preference pairs are constructed, and the model is trained using the direct preference optimization method with expert preference alignment. Specifically, non-optimal responses can be constructed by perturbing the fault type, diagnostic criteria, or maintenance recommendations in the preferred responses, supplemented with a small number of low-quality response samples. After expert pair verification, preference pair data is formed. The expression for the direct preference optimization loss is:

[0092]

[0093] in, This indicates the current model strategy to be optimized. This represents the reference model strategy obtained during the supervised instruction fine-tuning phase. This represents the Sigmoid function. This represents the preference constraint coefficient. By minimizing the... This improves the relative generation probability of expert-preferred diagnostic responses and suppresses non-preferred responses, making the model output more consistent with railway expert diagnostic logic and operation and maintenance standards.

[0094] Step 5: Input the text of the train control system fault to be diagnosed into the model after the three-stage training, and output a maintenance-oriented fault diagnosis result that includes at least three parts: fault category, diagnostic basis, and maintenance suggestions. Compared with existing diagnostic methods that only output discrete fault labels, this invention can generate natural language integrated diagnostic results that better meet the needs of high-speed railway on-site inspection and intelligent operation and maintenance.

[0095] Example 4

[0096] This embodiment 4 provides a non-transitory computer-readable storage medium for storing computer instructions. When the computer instructions are executed by a processor, they implement the fault diagnosis and maintenance method for a high-speed railway train control system based on a large language model as described above. The method includes:

[0097] Obtain the fault text of the train control system to be diagnosed;

[0098] The trained fault diagnosis model processes the text of train control system faults to be diagnosed, outputting maintenance-oriented fault diagnosis results that include at least three parts: fault category, diagnostic basis, and maintenance recommendations. Training the fault diagnosis model includes: acquiring fault text data generated by onboard equipment of the high-speed railway train control system and constructing a unified training dataset. ,in Enter the error text. Diagnostic response based on expert preference The non-preference diagnostic response is based on a pre-trained large language model as the base model, and railway domain adaptation training, supervised instruction fine-tuning training, and expert preference alignment training are performed sequentially on the pre-trained large language model. The fault text to be diagnosed is input into the model after the three-stage training, and the output is a maintenance-oriented fault diagnosis result containing fault category, diagnostic basis, and maintenance suggestions.

[0099] Example 5

[0100] This embodiment 5 provides a computer device, including a memory and a processor. The processor and the memory communicate with each other. The memory stores program instructions that can be executed by the processor. The processor calls the program instructions to execute the fault diagnosis and maintenance method for a high-speed railway train control system based on a large language model as described above. The method includes:

[0101] Obtain the fault text of the train control system to be diagnosed;

[0102] The trained fault diagnosis model processes the text of train control system faults to be diagnosed, outputting maintenance-oriented fault diagnosis results that include at least three parts: fault category, diagnostic basis, and maintenance recommendations. Training the fault diagnosis model includes: acquiring fault text data generated by onboard equipment of the high-speed railway train control system and constructing a unified training dataset. ,in Enter the error text. Diagnostic response based on expert preference The non-preference diagnostic response is based on a pre-trained large language model as the base model, and railway domain adaptation training, supervised instruction fine-tuning training, and expert preference alignment training are performed sequentially on the pre-trained large language model. The fault text to be diagnosed is input into the model after the three-stage training, and the output is a maintenance-oriented fault diagnosis result containing fault category, diagnostic basis, and maintenance suggestions.

[0103] Example 6

[0104] This embodiment 6 provides an electronic device, including: a processor, a memory, and a computer program; wherein, the processor is connected to the memory, and the computer program is stored in the memory. When the electronic device is running, the processor executes the computer program stored in the memory, so that the electronic device executes instructions to implement the fault diagnosis and maintenance method for a high-speed railway train control system based on a large language model as described above. The method includes:

[0105] Obtain the fault text of the train control system to be diagnosed;

[0106] The trained fault diagnosis model processes the text of train control system faults to be diagnosed, outputting maintenance-oriented fault diagnosis results that include at least three parts: fault category, diagnostic basis, and maintenance recommendations. Training the fault diagnosis model includes: acquiring fault text data generated by onboard equipment of the high-speed railway train control system and constructing a unified training dataset. ,in Enter the error text. Diagnostic response based on expert preference The non-preference diagnostic response is based on a pre-trained large language model as the base model, and railway domain adaptation training, supervised instruction fine-tuning training, and expert preference alignment training are performed sequentially on the pre-trained large language model. The fault text to be diagnosed is input into the model after the three-stage training, and the output is a maintenance-oriented fault diagnosis result containing fault category, diagnostic basis, and maintenance suggestions.

[0107] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0108] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0109] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0110] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment, whereby a series of operational steps are performed to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0111] While the specific embodiments of the present invention have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that, based on the technical solutions disclosed in the present invention, various modifications or variations that can be made by those skilled in the art without creative effort should be included within the scope of protection of the present invention.

Claims

1. A fault diagnosis and maintenance method for high-speed railway train control systems based on a large language model, characterized in that, include: Obtain the fault text of the train control system to be diagnosed; The trained fault diagnosis model processes the text of train control system faults to be diagnosed, outputting maintenance-oriented fault diagnosis results that include at least three parts: fault category, diagnostic basis, and maintenance recommendations. Training the fault diagnosis model includes: acquiring fault text data generated by onboard equipment of the high-speed railway train control system and constructing a unified training dataset. ,in Enter the error text. Diagnostic response based on expert preference The non-preference diagnostic response is based on a pre-trained large language model as the base model, and railway domain adaptation training, supervised instruction fine-tuning training, and expert preference alignment training are performed sequentially on the pre-trained large language model. The fault text to be diagnosed is input into the model after the three-stage training, and the output is a maintenance-oriented fault diagnosis result containing fault category, diagnostic basis, and maintenance suggestions.

2. The fault diagnosis and maintenance method for high-speed railway train control system based on a large language model according to claim 1, characterized in that, The expert preference diagnostic response satisfies ,in Indicates the fault category label, Indicates the basis for diagnosis. This indicates maintenance recommendations; among them, the dataset used for adaptation training in the railway domain is... Supervised instruction fine-tuning training uses a dataset. Expert preference alignment training uses the unified training dataset. .

3. The fault diagnosis and maintenance method for high-speed railway train control system based on a large language model according to claim 1, characterized in that, The railway domain adaptation training adopts the low-rank adaptation (LoRA) method, freezing the original parameters of the pre-trained large language model and training only the low-rank adaptation parameters, and following the... The linear mapping of the model is updated, where For frozen pre-training parameters, and It is a low-rank fitting matrix. It is a low rank value. The scaling factor is used; the low-rank adaptation parameter is inserted into the query projection, key projection, and value projection of the model's self-attention module, as well as the feedforward network projection layer.

4. The fault diagnosis and maintenance method for high-speed railway train control system based on a large language model according to claim 1, characterized in that, The railway domain adaptation training further introduces category semantic supervision alignment constraints, predicting semantic representations based on samples. Its true fault category semantic representation Similarity construction domain adaptation loss This is to improve the model's ability to identify technical terms, fault modes, and category boundaries of train control systems.

5. The fault diagnosis and maintenance method for high-speed railway train control system based on a large language model according to claim 1, characterized in that, The supervised instruction fine-tuning training employs negative log-likelihood loss based on expert preference-based diagnostic responses. This enables the model to learn to generate a structured diagnostic response that includes fault category, diagnostic basis, and maintenance suggestions based on the input fault text.

6. The fault diagnosis and maintenance method for high-speed railway train control system based on a large language model according to claim 1, characterized in that, The expert preference alignment training employs direct preference optimization loss. The basis for this is to improve the diagnostic response based on expert preference. Compared to non-preferred diagnostic responses The relative generation probability, and through the reference model strategy Compared with the current model strategy The probability ratio is constrained to make the model output more consistent with expert diagnostic logic and operation and maintenance specifications.

7. A fault diagnosis and maintenance system for high-speed railway train control systems based on a large language model, characterized in that, include: The acquisition module is used to acquire the fault text of the train control system to be diagnosed; The processing module is used to process the fault text of the train control system to be diagnosed using a trained fault diagnosis model, and output a maintenance-oriented fault diagnosis result that includes at least three parts: fault category, diagnostic basis, and maintenance recommendations. Training the fault diagnosis model includes: acquiring fault text data generated by the onboard equipment of the high-speed railway train control system and constructing a unified training dataset. ,in Enter the error text. Diagnostic response based on expert preference The non-preference diagnostic response is based on a pre-trained large language model as the base model, and railway domain adaptation training, supervised instruction fine-tuning training, and expert preference alignment training are performed sequentially on the pre-trained large language model. The fault text to be diagnosed is input into the model after the three-stage training, and the output is a maintenance-oriented fault diagnosis result containing fault category, diagnostic basis, and maintenance suggestions.

8. A non-transitory computer-readable storage medium, characterized in that, The non-transitory computer-readable storage medium is used to store computer instructions, which, when executed by a processor, implement the fault diagnosis and maintenance method for a high-speed railway train control system based on a large language model as described in any one of claims 1-6.

9. A computer device, characterized in that, The system includes a memory and a processor, which communicate with each other. The memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the fault diagnosis and maintenance method for a high-speed railway train control system based on a large language model as described in any one of claims 1-6.

10. An electronic device, characterized in that, include: The device includes a processor, a memory, and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory to cause the electronic device to execute instructions that implement the fault diagnosis and maintenance method for a high-speed railway train control system based on a large language model as described in any one of claims 1-6.