Maintenance scheme generation method, device and equipment and readable storage medium

By using entity recognition and relation extraction based on train maintenance knowledge graph and large language model, historical maintenance cases are screened and reasoned to generate structured maintenance solutions, solving the problem of inaccurate maintenance solutions in existing technologies and achieving higher adaptability and accuracy.

CN121503475APending Publication Date: 2026-02-10CRRC QINGDAO SIFANG CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511697683.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-18
Publication Date
2026-02-10

AI Technical Summary

Technical Problem

The accuracy of existing train maintenance recommendations is insufficient, especially in maintenance texts with high levels of specialization, non-standard expressions, and strong contextual dependencies, and they cannot cope with new failure modes or low-resource scenarios.

Method used

Based on the train maintenance knowledge graph, entity recognition and relation extraction are performed using a large language model. Historical maintenance cases are filtered through structured prompt word templates to determine multidimensional similarity, obtain structured maintenance knowledge, and perform reasoning to generate maintenance solutions.

Benefits of technology

It improves the accuracy and adaptability of maintenance solutions, enhances the operability and contextual consistency of the solutions, and reduces the reliance on large-scale training samples.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121503475A_ABST
    Figure CN121503475A_ABST
Patent Text Reader

Abstract

The invention discloses a maintenance scheme generation method, device and equipment and a readable storage medium, and is applied to the technical field of train maintenance safeguard.The method comprises the steps that historical maintenance cases are screened based on a train maintenance knowledge graph to obtain an initial historical maintenance case set; the train maintenance knowledge graph is a knowledge graph obtained by guiding a first large language model to construct historical maintenance information extraction; determining a historical maintenance case set with the highest correlation degree from the train maintenance knowledge graph based on the current fault information and the multi-dimensional similarity of the initial historical maintenance case set; and based on the structured maintenance knowledge obtained from the train maintenance knowledge graph and the historical maintenance case set with the highest association degree as input, reasoning is performed by using the second large language model, and a train maintenance scheme is obtained. The method does not need to depend on large-scale training samples, guides the first large language model to complete multi-element maintenance knowledge extraction, drives the second large language model to complete reasoning, and improves the accuracy of maintenance scheme recommendation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of train maintenance and support technology, and in particular to a method, apparatus, equipment and readable storage medium for generating maintenance plans. Background Technology

[0002] Current knowledge graph construction in the train maintenance field mostly employs deep learning-based entity recognition and relation extraction models, such as BiLSTM-CRF (Bidirectional Long Short-Term Memory Network-Conditional Random Field Model) and BERT-BiLSTM-CRF (Bidirectional Encoder Representation from Transformer-Bidirectional Long Short-Term Memory Network-Conditional Random Field Model). These methods rely on large amounts of labeled data for training, resulting in poor model versatility and difficulty adapting to the highly specialized, non-standard expressions, and strong contextual dependencies in maintenance texts. Furthermore, they cannot handle new fault modes or low-resource scenarios, leading to inaccurate train maintenance recommendations.

[0003] It is evident that improving the accuracy of train maintenance plan recommendations is a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0004] In view of this, the purpose of the present invention is to provide a maintenance scheme generation method, apparatus, equipment and readable storage medium, which solves the technical problem of inaccurate train maintenance recommendation schemes in the prior art.

[0005] To solve the above-mentioned technical problems, the present invention provides a method for generating a maintenance plan, comprising:

[0006] Based on the current equipment information and current fault information of the train, historical maintenance cases are filtered using the train maintenance knowledge graph to obtain an initial set of historical maintenance cases; the train maintenance knowledge graph is a knowledge graph constructed based on entities and relationships, guided by the first prompt word template to perform entity recognition and relation extraction on the first major language model.

[0007] Determine the multidimensional similarity between the current fault information and the cases in the initial historical maintenance case set; based on the multidimensional similarity, determine a preset number of historical maintenance cases with the highest correlation from the train maintenance knowledge graph to obtain the set of historical maintenance cases with the highest correlation; the multidimensional similarity is the similarity including at least two dimension parameters;

[0008] Based on the current fault information, structured maintenance knowledge is obtained from the train maintenance knowledge graph; wherein, the structured maintenance knowledge is information related to the current fault information and from which maintenance entities, maintenance relationships and maintenance attributes can be extracted;

[0009] Using the set of historical maintenance cases with the highest correlation and the structured maintenance knowledge as semantic input, the train maintenance plan is obtained by reasoning using the second language model.

[0010] Optionally, before filtering historical maintenance cases using a train maintenance knowledge graph based on the current train's equipment and fault information to obtain an initial set of historical maintenance cases, the following steps are also included:

[0011] A train maintenance ontology model is constructed based on semantic elements of train faults and maintenance; wherein, the train maintenance ontology model includes entities, entity relationships and entity attributes;

[0012] Collect train maintenance records, inspection logs, and fault description texts, and construct the first prompt word template based on the train maintenance ontology model, the train maintenance records, the inspection logs, and the fault description texts;

[0013] Based on the first prompt word template, the first large language model is guided to complete entity recognition and relation extraction of maintenance knowledge, and target triples are obtained, wherein the target triples are combinations that represent the relationship between each entity and other entities;

[0014] The train maintenance knowledge graph is constructed based on the target triples.

[0015] Optionally, based on the current equipment information and current fault information of the train, historical maintenance cases are filtered using a train maintenance knowledge graph to obtain an initial set of historical maintenance cases, including:

[0016] The starting point for filtering based on the current fault information is determined;

[0017] Based on the starting point and the current fault information, a breadth-first search algorithm is used to traverse the relevant paths in the train maintenance knowledge graph to obtain the initial set of historical maintenance cases.

[0018] Optionally, the multidimensional similarity between the current fault information and cases in the initial historical maintenance case set is determined. Based on the multidimensional similarity, a preset number of historical maintenance cases with the highest correlation are determined from the train maintenance knowledge graph to obtain the set of historical maintenance cases with the highest correlation, including:

[0019] Obtain a comprehensive similarity function; wherein the comprehensive similarity function is a function that includes at least two of the following: semantic similarity, structural attribute similarity, and graph path similarity;

[0020] The multidimensional similarity between the current fault information and the initial set of historical maintenance cases is determined using the comprehensive similarity function.

[0021] Optionally, the multidimensional similarity between the current fault information and the initial historical maintenance case set is determined using the comprehensive similarity function, including:

[0022] The current fault information and the initial historical maintenance case set are encoded respectively to obtain the current fault information code and the initial historical maintenance case set code. The semantic similarity between the current fault information code and the initial historical maintenance case set code is determined by using cosine similarity.

[0023] Determine the attribute vectors corresponding to the current fault information and the initial set of historical maintenance cases, respectively;

[0024] Determine the attribute similarity between each attribute vector, and determine the structural attribute similarity based on all the attribute similarities;

[0025] Determine the current fault map path and the initial historical maintenance case map path corresponding to the current fault information and the initial historical maintenance case set, respectively;

[0026] The similarity of the fault path is determined based on the overlap between the current fault path and the initial historical maintenance case path.

[0027] The multidimensional similarity is obtained by weighting the semantic similarity, the structural attribute similarity, and the graph path similarity.

[0028] Optionally, the set of historical maintenance cases with the highest relevance and the structured maintenance knowledge are used as semantic input, and reasoning is performed using a second language model to obtain a train maintenance plan, including:

[0029] Using the set of historical maintenance cases with the highest correlation and the structured maintenance knowledge as semantic input, and based on the current fault information and the second prompt word template, the second large language model is used to perform reasoning to obtain the train maintenance plan, which includes maintenance steps, tool requirements, personnel configuration and inspection suggestions.

[0030] Optionally, the first prompt word template includes the train maintenance task background, target role, extraction task description, text to be processed, extraction result illustration, and output format definition.

[0031] The present invention also provides a maintenance solution generation device, comprising:

[0032] The initial historical maintenance case set determination module is used to filter historical maintenance cases based on the current train's equipment information and current fault information using a train maintenance knowledge graph to obtain an initial historical maintenance case set. The train maintenance knowledge graph is a knowledge graph constructed based on entities and relationships, guided by a first prompt word template to perform entity recognition and relation extraction on a first large language model.

[0033] The module for determining the set of historical maintenance cases with the highest relevance is used to determine the multidimensional similarity between the current fault information and the cases in the initial set of historical maintenance cases, and to determine a preset number of historical maintenance cases with the highest relevance from the train maintenance knowledge graph based on the multidimensional similarity, thereby obtaining the set of historical maintenance cases with the highest relevance; the multidimensional similarity is the similarity including at least two dimension parameters;

[0034] The structured maintenance knowledge acquisition module is used to acquire structured maintenance knowledge from the train maintenance knowledge graph based on the current fault information; wherein, the structured maintenance knowledge is information related to the current fault information and from which maintenance entities, maintenance relationships and maintenance attributes can be extracted;

[0035] The train maintenance plan recommendation module is used to take the set of historical maintenance cases with the highest relevance and the structured maintenance knowledge as semantic input, and use the second language model to perform reasoning to obtain the train maintenance plan.

[0036] The present invention also provides a maintenance solution generation device, comprising:

[0037] Memory, used to store computer programs;

[0038] A processor is used to execute the computer program to implement the steps of the above-described maintenance solution generation method.

[0039] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the above-described maintenance scheme generation method.

[0040] The present invention also provides a computer program product, including a computer program / instructions, which, when executed by a processor, implement the steps of the above-described maintenance scheme generation method.

[0041] As can be seen, this invention, based on the current train's equipment information and current fault information, uses a train maintenance knowledge graph to filter historical maintenance cases, obtaining an initial set of historical maintenance cases. The train maintenance knowledge graph is constructed based on entities and relationships, guided by a first prompt word template and a first large language model for entity recognition and relation extraction. The invention determines the multidimensional similarity between the current fault information and cases in the initial set of historical maintenance cases, and based on this multidimensional similarity, identifies a preset number of historical maintenance cases with the highest relevance from the train maintenance knowledge graph, obtaining a set of historical maintenance cases with the highest relevance. Multidimensional similarity is defined as similarity including at least two dimensions. Structured maintenance knowledge is obtained from the train maintenance knowledge graph based on the current fault information; this structured maintenance knowledge is information related to the current fault information and capable of extracting maintenance entities, maintenance relationships, and maintenance attributes. The set of historical maintenance cases with the highest relevance and the structured maintenance knowledge are used as semantic input, and a second large language model is used for reasoning to obtain a train maintenance plan. Compared to the current model's poor generality, this application does not rely on large-scale training samples. It guides a large language model to extract multi-factor maintenance knowledge through structured prompt word templates, exhibiting good domain adaptability and engineering deployability. It drives the large model to complete language-level reasoning and generation of maintenance solutions, improving the operability, relevance, and contextual consistency of maintenance solutions, thereby enhancing the accuracy of maintenance solution recommendations.

[0042] In addition, the present invention also provides a maintenance scheme generation apparatus, device and readable storage medium, which also have the above-mentioned beneficial effects. Attached Figure Description

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

[0044] Figure 1 A flowchart illustrating a maintenance scheme generation method provided in an embodiment of the present invention;

[0045] Figure 2 A flowchart illustrating a method for constructing a train maintenance knowledge graph, provided as an embodiment of the present invention;

[0046] Figure 3 A schematic diagram of a knowledge extraction output provided in an embodiment of the present invention;

[0047] Figure 4 A flowchart illustrating a maintenance plan generation method provided in an embodiment of the present invention;

[0048] Figure 5 This is a schematic diagram of a maintenance scheme generation device provided in an embodiment of the present invention;

[0049] Figure 6 This is a schematic diagram of a maintenance solution generation device provided in an embodiment of the present invention. Detailed Implementation

[0050] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0051] Please refer to Figure 1 , Figure 1 A flowchart illustrating a maintenance plan generation method provided in an embodiment of the present invention. The method may include:

[0052] S101. Based on the current equipment information and current fault information of the train, the train maintenance knowledge graph is used to filter historical maintenance cases to obtain an initial set of historical maintenance cases. The train maintenance knowledge graph is a knowledge graph constructed based on entities and relationships, guided by the first prompt word template to perform entity recognition and relation extraction on the first major language model.

[0053] Each step in this embodiment can be executed by a designated electronic device, which can be a server, a portable terminal, or other forms. The current train's equipment information in this embodiment refers to information related to the current train, such as the train version, train components, and the relationships between train components. The current fault information in this embodiment refers to currently existing fault-related information, such as what kind of fault a certain component has experienced. The train maintenance knowledge graph in this embodiment is a knowledge graph based on a large language model constructed from historical maintenance cases. This embodiment does not limit the specific large language model, as long as reasoning can be performed based on it. For example, the large language model can be GPT (Generative Pre-trained Transformer); or the large language model in this embodiment can also be a Wenxin large model, etc. The initial historical maintenance cases in this embodiment are determined historical maintenance cases that have a certain similarity to the current fault information. The first prompt word template in this embodiment can include the train maintenance task background, target role, extraction task description, text to be processed, extraction result illustration, and output format definition, as long as historical maintenance information can be extracted based on the first prompt word template, and a train maintenance knowledge graph can be constructed based on entities, entity relationships, and entity attributes.

[0054] It should be further noted that, based on any of the above embodiments, before filtering historical maintenance cases using a train maintenance knowledge graph based on the current train's equipment information and current fault information to obtain an initial set of historical maintenance cases, the following may also be included:

[0055] Step 1: Construct a train maintenance ontology model based on the semantic elements of train faults and maintenance; the train maintenance ontology model includes entities, entity relationships and entity attributes.

[0056] This embodiment constructs a train maintenance ontology model based on fault and maintenance-related semantic elements in train maintenance and support tasks. It defines core entity categories (entities), relationship types (entity relationships), and attribute structures (entity attributes), forming the schema layer of the knowledge graph. The train faults relied upon for constructing the train maintenance knowledge graph in this embodiment mainly include unstructured text data such as maintenance records, daily inspection logs, fault diagnosis descriptions, and expert experience summaries from train operation and maintenance. This type of data is widely distributed in maintenance databases, repair order systems, and historical case documents, exhibiting complex content formats and diverse expressions. In this embodiment, the train maintenance ontology model possesses a multi-layered semantic structure oriented towards maintenance tasks, including: an equipment layer, used to describe the composition, functional modules, and spatial distribution relationships of equipment at all levels of the train, including elements such as train, subsystem, component, and key parts; a fault layer, used to express the types of faults, fault modes, and abnormal phenomena that occur during train operation, and supporting association modeling with causal information; an operation layer, used to define fault-oriented maintenance activities, including maintenance methods, operation processes, tool resources, and operation specifications, supporting solution-level reasoning; and a personnel and environment layer, used to model information affecting maintenance execution, such as the roles of maintenance-related personnel, their skill levels, and environmental constraints (e.g., weather, garage conditions). The semantic elements in the semantic structure of this ontology model can include any combination of the following: train system, component, fault phenomenon, fault mode, maintenance measures, tool resources, operator position, operating environment, maintenance suggestion, etc. Furthermore, the semantic relationships in this ontology model include any combination of the following: contain, represent, trigger, recommend, require, execute, restrict, propose, involve, associate, take, use, etc.

[0057] Step 2: Collect train maintenance records, inspection logs, and fault description texts. Based on the train maintenance ontology model, and the train maintenance records, inspection logs, and fault description texts, construct the first prompt word template.

[0058] This embodiment collects unstructured train maintenance records, inspection logs, and fault description texts, and constructs a structured Prompt template (the aforementioned first prompt word template) based on the ontology model to guide the first language model to complete entity recognition and relation extraction of maintenance knowledge.

[0059] Step 3: Based on the first prompt word template, guide the first large language model to complete entity recognition and relation extraction of maintenance knowledge, and obtain target triples, where the target triples are combinations that represent the relations between each entity and other entities.

[0060] This embodiment generates structured data in the form of triples that conform to a predefined structure, and constructs a train maintenance knowledge graph based on this data. For example, the triple form in this embodiment is <entity 1, relation, entity 2>.

[0061] Step 4: Construct a train maintenance knowledge graph based on the target triples.

[0062] To improve knowledge extraction efficiency, this embodiment constructs a structured Prompt template based on the train maintenance ontology model, guiding the first large language model to complete entity recognition and relation extraction. The Prompt template can include key elements such as: train maintenance task background, target role (e.g., maintenance personnel or system assistant), extraction task description, text to be processed, extraction result examples, and output format definition. By pre-setting the context and output specifications, the model can understand semantic boundaries and output controllable structured results. During the extraction process, the large language model receives the Prompt template and unstructured text, generating triplet data conforming to a predefined structure, containing entities, relations, and attributes. The extracted structured data is then normalized and mapped to entity and relation types in the graph according to the pre-constructed ontology model. Neo4j (a graph database platform) is used for node and edge construction, attribute storage, and visualization management, thereby completing the generation of the train maintenance knowledge graph. The construction of the train maintenance knowledge graph in this embodiment does not rely on a large-scale training sample. It guides a large language model to complete the extraction of multi-element maintenance knowledge through structured prompt templates, and has good domain adaptability and engineering deployability.

[0063] It should be further noted that, based on any of the above embodiments, the initial set of historical maintenance cases obtained by filtering historical maintenance cases using a train maintenance knowledge graph based on the current train's equipment information and current fault information may include:

[0064] S1011, determine the starting point for filtering based on the train maintenance knowledge graph based on the current fault information.

[0065] In this embodiment, based on the current fault information, it is denoted as... The current fault information can include equipment level, component identification, fault phenomenon description, etc., and the knowledge graph starts from the node related to the current fault information.

[0066] S1012, based on the starting point and current fault information, uses a breadth-first search algorithm to traverse relevant paths in the train maintenance knowledge graph to obtain an initial set of historical maintenance cases.

[0067] In this embodiment, the cases in the initial historical maintenance case set are related to the current fault information in some way, such as by a structural path connection. This embodiment uses a breadth-first search (BFS) algorithm to limit the maximum number of hops, traverse all possible paths, and select the set of historical case nodes that have a structural path connection with the current task (current fault information), denoted as the candidate set (initial historical maintenance case set). Each candidate case Each path forms one or more structural paths with the input task in the graph, and the set of paths is denoted as . The current task's path set in the graph is In this embodiment, an initial set of historical maintenance cases that are associated with the current fault information can be determined based on a defined train maintenance knowledge graph.

[0068] S102, determine the multidimensional similarity between the current fault information and the cases in the initial historical maintenance case set, and determine a preset number of historical maintenance cases with the highest correlation from the train maintenance knowledge graph based on the multidimensional similarity to obtain the historical maintenance case set with the highest correlation; the multidimensional similarity is the similarity including at least two dimension parameters.

[0069] This embodiment does not limit the specific multidimensional similarity. For example, the multidimensional similarity in this embodiment can be semantic similarity and attribute similarity; or the multidimensional similarity in this embodiment can also be semantic similarity and graph path similarity, etc. In this embodiment, the cases in the initial historical maintenance cases can be sorted from high to low based on the multidimensional similarity, thereby determining a preset number of historical maintenance cases with the highest relevance, and obtaining a set of historical maintenance cases with the highest relevance. The preset number in this embodiment can be set according to the needs, for example, it can be 20; or it can be 30; or it can be 40, etc.

[0070] It should be further explained that, based on any of the above embodiments, the determination of the multidimensional similarity between the current fault information and the cases in the initial historical maintenance case set, and the determination of a preset number of historical maintenance case sets with the highest correlation from the train maintenance knowledge graph based on the multidimensional similarity, may include:

[0071] S1021, Obtain the comprehensive similarity function; wherein, the comprehensive similarity function is a function that includes at least two of the following: semantic similarity, structural attribute similarity, and graph path similarity.

[0072] In this embodiment, semantic similarity refers to the semantic similarity between the current fault information and cases in the initial historical maintenance case set. Structural attribute similarity in this embodiment refers to the similarity between the attribute corresponding to the current fault information and the corresponding attribute of a case in the initial historical maintenance case set. This embodiment designs a fusion matching mechanism of graph structure path, attributes, and semantics, which compensates for the shortcomings of traditional case recommendation methods, such as insufficient semantic coverage and weak structural associations.

[0073] S1022, use the comprehensive similarity function to determine the multidimensional similarity between the current fault information and the cases in the initial historical maintenance case set.

[0074] In this embodiment, the multidimensional similarity is obtained by combining at least two of the following functions: semantic similarity, structural attribute similarity, and graph path similarity. This embodiment comprehensively considers multiple similarities when determining the similarity between the current fault information and cases in the initial historical maintenance case set, thereby improving the accuracy of similarity determination.

[0075] It should be further explained that, based on any of the above embodiments, determining the multidimensional similarity between the current fault information and the initial historical maintenance case set using a comprehensive similarity function may include:

[0076] S1: Encode the current fault information and the initial historical maintenance case set respectively to obtain the current fault information code and the initial historical maintenance case set code, and use cosine similarity to determine the semantic similarity between the current fault information code and the initial historical maintenance case set code;

[0077] S2: Determine the attribute vectors corresponding to the current fault information and the initial set of historical maintenance cases respectively;

[0078] S3: Determine the attribute similarity between each attribute vector, and determine the structural attribute similarity based on all attribute similarities;

[0079] S4: Determine the current fault map path and the initial historical maintenance case map path corresponding to the current fault information and the initial historical maintenance case set, respectively;

[0080] S5: Determine the similarity of the fault path based on the overlap between the current fault path and the initial historical maintenance case path;

[0081] S6: Weighted processing based on semantic similarity, structural attribute similarity, and graph path similarity yields a multidimensional similarity.

[0082] This embodiment addresses each initial historical maintenance case obtained from the preliminary screening. The system constructs a multidimensional similarity function. This is used to measure the degree of matching between the current fault information and the multidimensional similarity function, which is defined as follows: ;in, This indicates the semantic similarity between the current fault information and each case in the initial historical maintenance case set; This represents the weighted similarity between structured attributes (structured attribute similarity). Represents structural similarity based on graph paths (corresponding to graph path similarity); This indicates the input information for the current maintenance task (corresponding to the current fault information); The text representing each case in the initial set of historical maintenance cases; and This represents the attribute vector for each case in the current fault information and the initial historical maintenance case set; and These represent the path set of the current fault information and the path set of each case in the initial historical maintenance case set, respectively. , , The weighting coefficients for each score satisfy: . By encoding the text, the cosine similarity between the two sentences is calculated: ,in, `Semantic Vector Mapping` is a semantic vector mapping function used to encode natural language text into dense semantic vectors. This function can be implemented using a pre-trained language model, a domain-fine-tuned model, or a context embedding algorithm based on the Transformer architecture. In the weighted similarity calculation between structured attributes, the attribute vector of each case in the current fault information and the initial historical maintenance case set is denoted as `Semantic Vector Mapping`. , For each dimension of the structured attribute vector, the similarity is defined as follows: ,in, To avoid extremely small constants with a denominator of 0, the weighted sum of attribute similarities is as follows: ;in The importance weight of attribute i. Represents the similarity of paths in the graph structure, based on the set of paths corresponding to the current fault information. The set of paths to each case in the initial set of historical maintenance cases Overlap calculation: The final system is based on The scores are used to sort each case in the initial historical maintenance case set in descending order, and the top N cases with the highest scores are selected as the historical maintenance case set with the highest relevance. This embodiment provides a detailed process for determining each parameter, improving the accuracy of parameter determination.

[0083] S103, obtain structured maintenance knowledge from the train maintenance knowledge graph based on the current fault information; wherein, the structured maintenance knowledge is information related to the current fault information and from which maintenance entities, maintenance relationships and maintenance attributes can be extracted.

[0084] This embodiment does not limit the specific structured maintenance knowledge. For example, the structured maintenance knowledge in this embodiment can be fault modes, abnormal phenomena, maintenance measures, etc.; or it can also include available tools, standard procedures, etc.

[0085] S104 uses the set of historical maintenance cases with the highest relevance and structured maintenance knowledge as semantic input, and uses the second language model for reasoning to obtain train maintenance solutions.

[0086] The second large language model in this embodiment can be the same as or different from the first large language model. In this embodiment, reasoning is based on a Prompt template. The Prompt template aims to guide the Large Language Model (LLM) to produce stable, structured outputs that meet domain requirements. This embodiment does not limit specific train maintenance plans; for example, a train maintenance plan may include maintenance steps, tool requirements, personnel configuration, inspection suggestions, etc. This embodiment drives the large model to complete language-level reasoning generation of maintenance plans by integrating train maintenance atlas knowledge with historical maintenance experience (structured maintenance knowledge), improving the operability, relevance, and contextual consistency of the recommended plans.

[0087] It should be further explained that, based on any of the above embodiments, using the set of historical maintenance cases with the highest relevance and structured maintenance knowledge as semantic input, and employing a second large language model for reasoning to obtain a train maintenance plan, can include: using the set of historical maintenance cases with the highest relevance and structured maintenance knowledge as semantic input, and employing a second large language model for reasoning based on current fault information and a second prompt word template to obtain a train maintenance plan including maintenance steps, tool requirements, personnel configuration, and inspection suggestions. In this embodiment, after completing the set of historical maintenance cases with the highest relevance, the large language model is further guided to generate a language-level maintenance plan. This step uses the fusion of structured maintenance knowledge from the train maintenance knowledge graph and highly relevant historical maintenance case text as input to construct a Prompt template with maintenance context understanding capabilities, guiding the large language model to perform multi-factor comprehensive reasoning, and finally outputting a complete recommended train maintenance plan. Specifically, the system first retrieves structured maintenance knowledge matching the current fault information from the train maintenance knowledge graph, including fault modes, abnormal phenomena, maintenance measures, available tools, and standard procedures. Simultaneously, it introduces a set of historical maintenance cases with the highest relevance, whose content is typically unstructured natural language text containing implicit knowledge such as operating procedures, experience-based handling suggestions, and tool selection. All of this information together constitutes the input semantic context of the large language model.

[0088] To enable the large language model to effectively understand the current task context and output a structured maintenance plan, the system designs and constructs a fusion-type Prompt template, which includes the following element fields: task background description, including train model, fault location, and abnormal manifestations; maintenance goal definition, such as "develop effective maintenance steps and assess tool requirements"; graph knowledge fragments, fault-measure-tool association knowledge in the form of triples in the graph; historical case summary, selecting 1-3 relevant case texts (or other numbers) in natural language form; output format constraints, specifying that the output includes four parts: maintenance steps, required tools, personnel configuration, and inspection suggestions, presented using a unified subsection format. The final constructed Prompt will be input into the general large language model. The model will perform language-level reasoning based on the task context, structural knowledge, and experience cases to generate the output, which covers: maintenance steps, listing the operation process according to the task stages; tool requirements, specifying the required tools and spare parts list for each stage; personnel configuration, recommending a reasonable number of personnel and professional requirements; and inspection suggestions, providing post-maintenance acceptance standards or precautions. This embodiment achieves knowledge-enhanced natural language generation for complex maintenance tasks by integrating the accuracy of structured knowledge (structured maintenance knowledge) with the richness of unstructured experience (the set of historical maintenance cases with the highest relevance), significantly improving the relevance, operability, and engineering feasibility of the solution.

[0089] The present invention provides a method for generating a maintenance plan, which may include: S101, based on the current equipment information and current fault information of the train, filtering historical maintenance cases using a train maintenance knowledge graph to obtain an initial set of historical maintenance cases; the train maintenance knowledge graph is a knowledge graph constructed based on entities and relationships, guided by a first prompt word template to perform entity recognition and relation extraction using a first large language model; S102, determining the multidimensional similarity between the current fault information and the cases in the initial set of historical maintenance cases, and determining a preset number of historical maintenance cases with the highest relevance from the train maintenance knowledge graph based on the multidimensional similarity to obtain a set of historical maintenance cases with the highest relevance; the multidimensional similarity is the similarity including at least two dimension parameters; S103, obtaining structured maintenance knowledge from the train maintenance knowledge graph based on the current fault information; wherein, the structured maintenance knowledge is information related to the current fault information and capable of extracting maintenance entities, maintenance relationships, and maintenance attributes; S104, using the set of historical maintenance cases with the highest relevance and the structured maintenance knowledge as semantic input, and using a second large language model for reasoning to obtain a train maintenance plan. Compared to the current model's poor generality, this application does not rely on large-scale training samples. It guides a large language model to extract multi-factor maintenance knowledge through structured prompt word templates, exhibiting good domain adaptability and engineering deployability. It drives the large model to complete language-level reasoning and generation of maintenance solutions, improving the operability, relevance, and contextual consistency of maintenance solutions, thereby enhancing the accuracy of maintenance solution recommendations.

[0090] For a clearer understanding of this invention, please refer to the following details. Figure 2 , Figure 2 A flowchart illustrating a method for constructing a train maintenance knowledge graph, provided in an embodiment of the present invention, may specifically include:

[0091] S201, constructing a train maintenance ontology model based on train fault and maintenance semantic elements.

[0092] In this embodiment, a train maintenance ontology model for maintenance recommendation tasks is designed and constructed, targeting semantic elements such as equipment structure, fault phenomena, maintenance plans, and resource allocation involved in train maintenance and support tasks. The ontology model, as the schema layer for knowledge graph construction, mainly includes three parts: entity types (i.e., entities), entity attributes, and semantic relationships. Specifically, the main entity types defined in the ontology model include, but are not limited to: train system, components, fault phenomena, fault modes, maintenance measures, tool resources, operating positions, working environments, and maintenance suggestions. Each entity type is accompanied by multiple attribute fields to record structured content such as name, identifier, classification, level, and description information. Furthermore, entities are logically connected through semantic relationships, covering various relationships such as structural affiliation, functional dependency, fault triggering, plan matching, tool dependency, job requirements, and environmental constraints, supporting subsequent graph structure queries and reasoning path analysis. To facilitate practical engineering implementation and structural expression, this paper further provides an entity type and attribute definition table (Table 1) and a semantic relationship definition table (Table 2).

[0093] Table 1. Definition of an entity type and its attributes

[0094]

[0095] Table 2 Semantic Relation Definition Table

[0096]

[0097] S202, Construct the first prompt word template based on the train maintenance ontology model.

[0098] In this embodiment, to realize the data layer construction of the train maintenance knowledge graph, the system designs a templated Prompt guidance strategy (first prompt word template) for the widely distributed unstructured text in the train maintenance support scenario, driving the first large language model to extract and transform structured semantic information.

[0099] The first prompt word template can contain the following six types of field information:

[0100] Research Background: This task is based on the construction scenario of train maintenance support knowledge graph. The goal is to identify key semantic elements from unstructured maintenance text, including fault phenomena, equipment components, maintenance measures, tool resources and their relationships, for graph triple extraction.

[0101] Character Setting: You are a train maintenance knowledge modeling expert, skilled at transforming maintenance knowledge from natural language descriptions into structured knowledge graph triples.

[0102] Ontology Model: The predefined semantic ontology model for this task is as follows:

[0103] Entity types include train systems, components, fault phenomena, fault modes, maintenance measures, tool resources, operator positions, operating environments, and maintenance recommendations.

[0104] The specific relationship types include the inclusion relationship between train systems and components, the representation relationship between fault phenomena and fault modes, the initiation relationship between fault modes and fault phenomena, the recommendation relationship between fault modes and maintenance measures, the requirement relationship between maintenance measures and tool resources, the execution relationship between operating positions and maintenance measures, the constraint relationship between maintenance measures and the operating environment, the proposal relationship between fault phenomena and maintenance suggestions, the involvement relationship between historical maintenance cases and components, the association relationship between historical maintenance cases and fault modes, the adoption relationship between historical maintenance cases and maintenance measures, and the usage relationship between historical maintenance cases and tool resources.

[0105] Task Description: First, analyze whether the original text contains the corresponding semantic entity type using the predefined semantic ontology model in this task. Only identify and extract a semantic entity if it explicitly appears in the original text. Entity extraction should be based solely on the original text; semantic extension, content inference, or subjective additions are strictly prohibited. Extracted Entity 1 and Entity 2 must be fully present in the original text; fabrication or extrapolation is prohibited. After confirming that the original text contains more than two semantic entities, construct triples (Entity 1, Relation, Entity 2) strictly according to the semantic relationships between entity types defined in the ontology. Simultaneously check whether Entity 1 and Entity 2 in each triple originate from the original text; if any entity does not exist in the original text, delete the triple. The semantic relationships involved in the triples should conform to the relationship types that can be established between entity pairs as defined in the ontology rules; fabrication or extrapolation is prohibited.

[0106] Original text: During the operation of a 40-car freight train, the brakes of the last two cars were engaged. Inspection revealed that the emergency valve dust filter was damaged and the intermediate dust filter was not installed, allowing foreign objects to enter the valve body and causing brake failure. Remedial measures: Replace the dust filter and remove the foreign objects. The necessity of regularly cleaning the brake valve body was emphasized.

[0107] Output format: After completing the semantic extraction task, the system uniformly encodes the structured entities and their relational results according to RDF / XML syntax. During the encoding process, the system assigns a unique URI to each subject entity node to identify its unique identity in the graph (e.g., http: / / example.org / entity / Entity_0001). Each entity is accessed through... <rdf:description>Nodes are described in a structured manner, and their corresponding ontology category is specified using the `rdf:type` tag (e.g., `schema#Component`, `schema#FailureMode`). Basic attributes such as entity names are represented by nested tags (e.g., ...). <ex:name> ...< / ex:name> The semantic relationships are expressed using RDF attribute tags, directly embedded in the subject entity description block to achieve a "entity → relationship → entity name" structure. The overall output conforms to the RDF semantic representation specification and can serve as a standard storage format for graph knowledge, supporting subsequent semantic retrieval, knowledge association, and reasoning functions. The knowledge extraction output is as follows: Figure 3 As shown, Figure 3 This is a schematic diagram of a knowledge extraction output provided in an embodiment of the present invention. Figure 3 It can be seen that there is one main entity: the freight train; three sub-entities: the emergency valve dust filter, the intermediate dust filter, and the brake. There is one core relationship: containment, which clearly indicates the relationship between the whole and its parts, and clarifies the core entity and the relationship type (such as containment).

[0108] S203, acquire unstructured data, including train maintenance operation records, fault handling logs, engineer fault diagnosis reports, and fault investigation texts.

[0109] In this embodiment, the unstructured data mainly comes from sources including, but not limited to: train maintenance operation records, fault handling logs, engineer fault diagnosis reports, and fault investigation texts. These texts typically lack a unified format, have irregular content organization, and involve the cross-expression of multiple entities and relationships, making direct modeling difficult. Therefore, this invention proposes an ontology-driven structured Prompt template strategy. Combined with the semantic ontology model constructed in step S1, the system builds a Prompt template that integrates task information, knowledge structure, and output format control, guiding the language model to extract semantic entities and relationships in a unified manner.

[0110] S204: Based on unstructured data, the first prompt word is used to guide the first language model to complete entity recognition and relation extraction of maintenance knowledge, generating structured data in the form of triples that conform to the predefined structure.

[0111] S205, a train maintenance knowledge graph is constructed based on structured data in the form of triples.

[0112] The train maintenance knowledge graph provided in this embodiment of the invention does not rely on large-scale training samples. It guides a large language model to extract multi-element maintenance knowledge through structured prompt templates, and has good domain adaptability and engineering deployability.

[0113] Existing technologies still have some shortcomings when applied to train maintenance recommendation scenarios: First, existing knowledge graph construction in the train maintenance field mostly adopts deep learning-based entity recognition and relation extraction models. These methods rely on a large amount of labeled data for training, resulting in poor model versatility and difficulty adapting to the highly specialized, non-standard expressions, and strong contextual dependencies in maintenance texts. Especially when facing domain transfer, new fault modes, or low-resource scenarios, traditional deep learning models often lack sufficient extraction capabilities and have limited structured expression effects, failing to meet the engineering requirements for high-quality knowledge graph construction. Second, current maintenance solution recommendation methods mostly rely on textual semantic similarity or fault keyword retrieval for case reuse, lacking modeling and utilization of structural information such as equipment hierarchy and maintenance paths. This leads to deviations in the recommendation results in terms of semantic relevance and structural consistency, affecting the usability and rationality of the solutions. Third, existing methods mostly limit the utilization of unstructured maintenance texts to the knowledge extraction stage. After converting them into entities and relations in the graph, a large amount of semantic details and experiential knowledge contained in the original text are often compressed or ignored, making it difficult to effectively utilize them in subsequent applications. The present invention aims to realize automatic maintenance reasoning and solution generation in complex fault scenarios, thereby improving the intelligence and accuracy of maintenance decisions.

[0114] For a clearer understanding of this invention, please refer to the following details. Figure 4 , Figure 4 This is a flowchart illustrating a maintenance plan generation method provided by an embodiment of the present invention. The embodiment provides a train maintenance plan generation method based on knowledge graphs and a large language model. First, an ontology model containing semantic elements such as equipment hierarchy, fault modes, maintenance measures, and operational resources is constructed for train maintenance support tasks, forming the pattern layer of the knowledge graph. Second, unstructured text related to train maintenance is collected, and the first large language model is guided by a first prompt word template to complete entity recognition and relation extraction of maintenance knowledge, constructing a train maintenance knowledge graph. Third, after receiving the current task input, historical maintenance cases are initially screened based on the graph path structure, and a fusion score is calculated by combining semantic vectors and attribute similarity to select a set of highly relevant cases. Finally, the structured knowledge obtained from the knowledge graph and the content of highly relevant cases are fused to construct a large model input Prompt for language reasoning, generating a complete maintenance plan including maintenance steps, tool configuration, personnel arrangement, and inspection suggestions, achieving intelligent recommendation for actual maintenance scenarios. Specifically, it may include:

[0115] S301: Obtain the current train's equipment information and current fault information, and filter historical maintenance cases based on the train maintenance knowledge graph to obtain an initial set of historical maintenance cases associated with the current train's equipment information and current fault information.

[0116] In this embodiment, the current train's equipment information refers to the train's identity identifier, which is used to quickly locate cases with the exact same train model, system, and component in the knowledge graph, ensuring that the recommended maintenance solution has the highest applicability; the current fault information in this embodiment refers to the fault phenomenon that exists in the current train.

[0117] S302, use a multidimensional similarity function to determine the multidimensional similarity between the current fault information and the cases in the initial historical maintenance case set, and based on the multidimensional similarity, determine a preset number of historical maintenance cases with the highest correlation from the train maintenance knowledge graph to obtain the set of historical maintenance cases with the highest correlation.

[0118] In this embodiment, the multidimensional similarity function is a function composed of semantic similarity, structural attribute similarity, and graph path similarity.

[0119] S303 retrieves structured maintenance knowledge that matches the current fault information from the train maintenance knowledge graph.

[0120] S304 uses the set of historical maintenance cases with the highest relevance and structured maintenance knowledge as semantic input, and uses the second language model to reason based on the current fault information to obtain the train maintenance plan.

[0121] This embodiment uses a second prompt word template to fuse structured maintenance knowledge retrieved from the train maintenance knowledge graph with the set of historical maintenance cases with the highest relevance to generate a language model input, thereby achieving intelligent output of maintenance solutions. Figure 3 This is a schematic diagram of a fusion inference mechanism provided in an embodiment of the present invention. This step focuses on three main parts: the Prompt construction module is responsible for dynamically generating the input template of the large language model based on the current task instance. Its structure includes the following five fields:

[0122] Fault background information (structured fields such as system, component, phenomenon, etc.);

[0123] Graph query results (such as triplets of recommended maintenance measures, tool resources, and job requirements);

[0124] Summary of matched historical repair cases (natural language description);

[0125] Output format instructions (specify the output content structure);

[0126] Inference task instructions (such as "Please recommend repair steps for the above problem").

[0127] The above fields are provided by the graph engine module and the case matching module, respectively. The system concatenates them according to a preset template to form a complete input. This Prompt structure is designed with clear structure and semantic alignment in mind, facilitating the understanding of task intent and semantic context by large language models. The Prompt constructed in this embodiment is as follows:

[0128] Background information: A signal interruption occurred in the data transmission submodule of the communication system. Device number: TDX-2301.

[0129] Knowledge graph information: (Data transmission module, trigger, signal interruption); (Signal interruption, recommendation, replace optoelectronic converter); (Replace optoelectronic converter, required, adapter tool kit); (Replace optoelectronic converter, execution, communication maintenance position)

[0130] Case Summary: A train experienced a signal interruption in its communication system's data transmission submodule. Investigation revealed oxidation at the photoelectric converter interface. Replacement of the connector restored normal operation. It is recommended that the condition of connectors be a key focus during maintenance.

[0131] Task Instructions: Based on the above information, please generate a complete repair suggestion, including steps, tools, personnel, and precautions.

[0132] Output format: List the maintenance steps in bullet points, with tools and job requirements appended after each step.

[0133] The inference module calls the large language model interface, accepting instruction input generated by the Prompt building module. Based on contextual semantic fusion capabilities, the model integrates graph knowledge and case experience to generate structured maintenance suggestion text as follows:

[0134] Repair steps: ① Power off and stop the machine, and confirm the status of the signal module; ② Disassemble the photoelectric converter assembly; ③ Replace the converter using an adapter tool kit, and check the ports for oxidation and looseness; ④ Start the system and observe the signal recovery, and record the log.

[0135] Required tools: adapter kit, oscilloscope;

[0136] Operational positions: Communication maintenance personnel, electrical control support personnel;

[0137] Precautions: Pay attention to the bending angle of the optical fiber during the inspection process, and clean the end face of dirt if necessary.

[0138] This embodiment can convert the output results into structured paragraph data and supports one-click export as text instructions, JSON (object representation) structure or work order templates for maintenance scheduling or terminal presentation.

[0139] The following describes the maintenance plan generation device provided in the embodiments of the present invention. The maintenance plan generation device described below and the maintenance plan generation method described above can be referred to in correspondence.

[0140] Please refer to the details. Figure 5 , Figure 5 A schematic diagram of a maintenance solution generation device provided in an embodiment of the present invention may include:

[0141] The initial historical maintenance case set determination module 100 is used to filter historical maintenance cases based on the current train's equipment information and current fault information using a train maintenance knowledge graph to obtain an initial historical maintenance case set; the train maintenance knowledge graph is a knowledge graph constructed based on entities and relationships, guided by a first prompt word template to perform entity recognition and relation extraction on a first large language model;

[0142] The highest-relevance historical maintenance case set determination module 200 is used to determine the multidimensional similarity between the current fault information and the cases in the initial historical maintenance case set, and to determine a preset number of highest-relevance historical maintenance case sets from the train maintenance knowledge graph based on the multidimensional similarity; the multidimensional similarity is the similarity including at least two dimension parameters;

[0143] The structured maintenance knowledge acquisition module 300 is used to acquire structured maintenance knowledge from the train maintenance knowledge graph based on the current fault information; wherein, the structured maintenance knowledge is information related to the current fault information and from which maintenance entities, maintenance relationships and maintenance attributes can be extracted;

[0144] The train maintenance plan recommendation module 400 is used to take the set of historical maintenance cases with the highest correlation and the structured maintenance knowledge as semantic input, and use the second language model to perform reasoning to obtain the train maintenance plan.

[0145] Furthermore, based on any of the above embodiments, the train maintenance plan generation device may further include:

[0146] An ontology model construction module is used to construct a train maintenance ontology model based on train fault and maintenance semantic elements; wherein, the train maintenance ontology model includes entities, entity relationships, and entity attributes;

[0147] The first prompt word template construction module is used to collect train maintenance records, inspection logs and fault description texts, and construct the first prompt word template based on the train maintenance ontology model, the train maintenance records, the inspection logs and the fault description texts;

[0148] The target triple construction module is used to guide the first large language model to complete entity recognition and relation extraction of maintenance knowledge based on the first prompt word template, and obtain target triples, wherein the target triples are combinations that represent the relationship between each entity and other entities;

[0149] The train maintenance knowledge graph construction module is used to construct the train maintenance knowledge graph based on the target triple.

[0150] Furthermore, based on any of the above embodiments, the initial historical maintenance case set determination module 100 may include:

[0151] The starting point determination unit is used to determine the starting point for filtering based on the train maintenance knowledge graph based on the current fault information;

[0152] The initial historical maintenance case set determination unit is used to traverse the relevant paths in the train maintenance knowledge graph based on the starting point and the current fault information using a breadth-first search algorithm to obtain the initial historical maintenance case set.

[0153] Furthermore, based on any of the above embodiments, the historical maintenance case set determination module 200 with the highest correlation may include:

[0154] A comprehensive similarity function determination unit is used to obtain a comprehensive similarity function; wherein, the comprehensive similarity function is a function that includes at least two of the following: semantic similarity, structural attribute similarity, and graph path similarity;

[0155] A multidimensional similarity determination unit is used to determine the multidimensional similarity between the current fault information and the initial historical maintenance case set using the comprehensive similarity function.

[0156] Furthermore, based on any of the above embodiments, the multidimensional similarity determination unit may include:

[0157] The semantic similarity determination subunit is used to encode the current fault information and the initial historical maintenance case set respectively to obtain the current fault information code and the initial historical maintenance case set code, and to determine the semantic similarity between the current fault information code and the initial historical maintenance case set code using cosine similarity.

[0158] An attribute vector determination subunit is used to determine the attribute vectors corresponding to the current fault information and the initial historical maintenance case set, respectively.

[0159] The structural attribute similarity determination subunit is used to determine the attribute similarity between each attribute vector, and to determine the structural attribute similarity based on all the attribute similarities.

[0160] The knowledge graph path determination subunit is used to determine the current fault graph path and the initial historical maintenance case graph path corresponding to the current fault information and the initial historical maintenance case set, respectively.

[0161] The map path similarity determination subunit is used to determine the map path similarity based on the overlap between the current fault map path and the initial historical maintenance case map path;

[0162] The multidimensional similarity determination subunit is used to perform weighted processing based on the semantic similarity, the structural attribute similarity, and the graph path similarity to obtain the multidimensional similarity.

[0163] Furthermore, based on any of the above embodiments, the train maintenance solution recommendation module 400 may include:

[0164] The train maintenance plan determination unit is used to take the set of historical maintenance cases with the highest correlation and the structured maintenance knowledge as semantic input, and use the second large language model to reason based on the current fault information and the second prompt word template to obtain the train maintenance plan including maintenance steps, tool requirements, personnel configuration and inspection suggestions.

[0165] Furthermore, based on any of the above embodiments, the first prompt word template includes the train maintenance task background, target role, extraction task description, text to be processed, extraction result illustration, and output format definition.

[0166] It should be noted that the order of the modules and units in the above-mentioned maintenance solution generation device can be changed without affecting the logic.

[0167] This invention provides a maintenance plan generation device, which may include: an initial historical maintenance case set determination module 100, used to filter historical maintenance cases based on the current train's equipment information and current fault information using a train maintenance knowledge graph to obtain an initial historical maintenance case set; the train maintenance knowledge graph is a knowledge graph constructed based on entities and relationships, guided by a first prompt word template to perform entity recognition and relation extraction on a first large language model; and a highest-relevance historical maintenance case set determination module 200, used to determine the multidimensional similarity between the current fault information and cases in the initial historical maintenance case set, and to determine the highest-relevance historical maintenance case set based on the multidimensional similarity. The train maintenance knowledge graph determines a preset number of historical maintenance case sets with the highest relevance; the multidimensional similarity is a similarity that includes at least two dimension parameters; the structured maintenance knowledge acquisition module 300 is used to acquire structured maintenance knowledge from the train maintenance knowledge graph based on the current fault information; wherein, the structured maintenance knowledge is information related to the current fault information and capable of extracting maintenance entities, maintenance relationships, and maintenance attributes; the train maintenance plan recommendation module 400 is used to take the set of historical maintenance cases with the highest relevance and the structured maintenance knowledge as semantic input, and use a second large language model for reasoning to obtain a train maintenance plan. Compared with the poor generality of current models, this invention does not rely on large-scale training samples, guides the large language model to complete multi-element maintenance knowledge extraction through structured prompt word templates, has good domain adaptability and engineering deployability, drives the large model to complete language-level reasoning generation of maintenance plans, improves the operability, pertinence, and contextual consistency of maintenance plans, thereby improving the accuracy of maintenance plan recommendations.

[0168] The following describes a maintenance plan generation device provided by an embodiment of the present invention. The maintenance plan generation device described below and the maintenance plan generation method described above can be referred to in correspondence.

[0169] Please refer to Figure 6 , Figure 6 A schematic diagram of a maintenance solution generation device provided in an embodiment of the present invention may include:

[0170] Memory 10 is used to store computer programs;

[0171] The processor 20 is used to execute computer programs to implement the above-described maintenance plan generation method.

[0172] The memory 10, processor 20, and communication interface 30 all communicate with each other through the communication bus 40.

[0173] In this embodiment of the invention, the memory 10 is used to store one or more programs. The programs may include program code, which includes computer operation instructions. In this embodiment of the invention, the memory 10 may store programs for implementing the following functions:

[0174] Based on the current equipment information and current fault information of the train, the train maintenance knowledge graph is used to filter historical maintenance cases to obtain an initial set of historical maintenance cases. The train maintenance knowledge graph is a knowledge graph constructed based on entities and relationships, guided by the first prompt word template to perform entity recognition and relation extraction on the first major language model.

[0175] Determine the multidimensional similarity between the current fault information and the cases in the initial historical maintenance case set. Based on the multidimensional similarity, determine a preset number of historical maintenance case sets with the highest correlation from the train maintenance knowledge graph. The multidimensional similarity is the similarity that includes at least two dimension parameters.

[0176] Structured maintenance knowledge is obtained from the train maintenance knowledge graph based on the current fault information; wherein, the structured maintenance knowledge is information related to the current fault information and from which maintenance entities, maintenance relationships and maintenance attributes can be extracted;

[0177] Using the set of historical maintenance cases with the highest relevance and structured maintenance knowledge as semantic input, and employing the second language model for reasoning, a train maintenance plan is obtained.

[0178] In one possible implementation, the memory 10 may include a program storage area and a data storage area, wherein the program storage area may store the operating system and applications required for at least one function; and the data storage area may store data created during use.

[0179] Furthermore, memory 10 may include read-only memory and random access memory, providing instructions and data to the processor. A portion of the memory may also include NVRAM. The memory stores operating systems and operating instructions, executable modules, or data structures, or subsets thereof, or extended sets thereof, wherein the operating instructions may include various operating instructions for implementing various operations. The operating system may include various system programs for implementing various basic tasks and handling hardware-based tasks.

[0180] Processor 20 can be a central processing unit (CPU), an application-specific integrated circuit, a digital signal processor, a field-programmable gate array, or other programmable logic device. Processor 20 can be a microprocessor or any conventional processor. Processor 20 can call programs stored in memory 10.

[0181] The communication interface 30 can be an interface for the communication module, used to connect with other devices or systems.

[0182] Of course, it should be noted that, Figure 6 The structure shown does not constitute a limitation on the maintenance solution generation device in the embodiments of the present invention. In practical applications, the maintenance solution generation device may include more than Figure 6 More or fewer components as shown, or combinations of certain components.

[0183] The following describes the computer-readable storage medium provided in the embodiments of the present invention. The computer-readable storage medium described below can be referred to in correspondence with the maintenance scheme generation method described above.

[0184] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the above-described maintenance scheme generation method.

[0185] The computer-readable storage medium may include various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0186] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.

[0187] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0188] Finally, it should be noted that in this document, relationships such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.

[0189] The foregoing has provided a detailed description of a maintenance scheme generation method, apparatus, device, and readable storage medium provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.< / rdf:description>

Claims

1. A method for generating a maintenance plan, characterized in that, include: Based on the current equipment information and current fault information of the train, the historical maintenance cases are filtered using the train maintenance knowledge graph to obtain an initial set of historical maintenance cases; The train maintenance knowledge graph is a knowledge graph constructed based on entities and relationships, guided by a first prompt word template to perform entity recognition and relation extraction on a first large language model. Determine the multidimensional similarity between the current fault information and the cases in the initial historical maintenance case set; based on the multidimensional similarity, determine a preset number of historical maintenance cases with the highest correlation from the train maintenance knowledge graph to obtain the historical maintenance case set with the highest correlation. The multidimensional similarity is a similarity that includes at least two dimensions of parameters; Based on the current fault information, structured maintenance knowledge is obtained from the train maintenance knowledge graph; wherein, the structured maintenance knowledge is information related to the current fault information and from which maintenance entities, maintenance relationships and maintenance attributes can be extracted; Using the set of historical maintenance cases with the highest correlation and the structured maintenance knowledge as semantic input, the train maintenance plan is obtained by reasoning using the second language model.

2. The train maintenance plan generation method according to claim 1, characterized in that, Before using the train maintenance knowledge graph to filter historical maintenance cases based on the current train's equipment and fault information to obtain an initial set of historical maintenance cases, the process also includes: A train maintenance ontology model is constructed based on semantic elements of train faults and maintenance; wherein, the train maintenance ontology model includes entities, entity relationships and entity attributes; Collect train maintenance records, inspection logs, and fault description texts, and construct the first prompt word template based on the train maintenance ontology model, the train maintenance records, the inspection logs, and the fault description texts; Based on the first prompt word template, the first large language model is guided to complete entity recognition and relation extraction of maintenance knowledge, and target triples are obtained, wherein the target triples are combinations that represent the relationship between each entity and other entities; The train maintenance knowledge graph is constructed based on the target triples.

3. The train maintenance plan generation method according to claim 1, characterized in that, Based on the current equipment and fault information of the train, historical maintenance cases are filtered using a train maintenance knowledge graph to obtain an initial set of historical maintenance cases, including: The starting point for filtering based on the current fault information is determined; Based on the starting point and the current fault information, a breadth-first search algorithm is used to traverse the relevant paths in the train maintenance knowledge graph to obtain the initial set of historical maintenance cases.

4. The train maintenance plan generation method according to any one of claims 1 to 3, characterized in that, Determine the multidimensional similarity between the current fault information and cases in the initial historical maintenance case set. Based on the multidimensional similarity, determine a preset number of historical maintenance cases with the highest correlation from the train maintenance knowledge graph to obtain the set of historical maintenance cases with the highest correlation, including: Obtain a comprehensive similarity function; wherein the comprehensive similarity function is a function that includes at least two of the following: semantic similarity, structural attribute similarity, and graph path similarity; The multidimensional similarity between the current fault information and the initial set of historical maintenance cases is determined using the comprehensive similarity function.

5. The train maintenance plan generation method according to claim 4, characterized in that, Determining the multidimensional similarity between the current fault information and the initial historical maintenance case set using the comprehensive similarity function includes: The current fault information and the initial historical maintenance case set are encoded respectively to obtain the current fault information code and the initial historical maintenance case set code. The semantic similarity between the current fault information code and the initial historical maintenance case set code is determined by using cosine similarity. Determine the attribute vectors corresponding to the current fault information and the initial set of historical maintenance cases, respectively; Determine the attribute similarity between each attribute vector, and determine the structural attribute similarity based on all the attribute similarities; Determine the current fault map path and the initial historical maintenance case map path corresponding to the current fault information and the initial historical maintenance case set, respectively; The similarity of the fault path is determined based on the overlap between the current fault path and the initial historical maintenance case path. The multidimensional similarity is obtained by weighting the semantic similarity, the structural attribute similarity, and the graph path similarity.

6. The train maintenance plan generation method according to claim 1, characterized in that, Using the set of historical maintenance cases with the highest correlation and the structured maintenance knowledge as semantic input, and employing the second major language model for reasoning, a train maintenance plan is obtained, including: Using the set of historical maintenance cases with the highest correlation and the structured maintenance knowledge as semantic input, and based on the current fault information and the second prompt word template, the second large language model is used to perform reasoning to obtain the train maintenance plan, which includes maintenance steps, tool requirements, personnel configuration and inspection suggestions.

7. The train maintenance plan generation method according to claim 1, characterized in that, The first prompt word template includes the background of the train maintenance task, the target role, the task description, the text to be processed, the extraction result illustration, and the output format definition.

8. A maintenance plan generation device, characterized in that, include: The initial historical maintenance case set determination module is used to filter historical maintenance cases based on the current train's equipment information and current fault information, using a train maintenance knowledge graph to obtain an initial historical maintenance case set. The train maintenance knowledge graph is a knowledge graph constructed based on entities and relationships, guided by a first prompt word template to perform entity recognition and relation extraction on a first large language model. The module for determining the set of historical maintenance cases with the highest relevance is used to determine the multidimensional similarity between the current fault information and the cases in the initial set of historical maintenance cases, and to determine a preset number of historical maintenance cases with the highest relevance from the train maintenance knowledge graph based on the multidimensional similarity, thereby obtaining the set of historical maintenance cases with the highest relevance; the multidimensional similarity is the similarity including at least two dimension parameters; The structured maintenance knowledge acquisition module is used to acquire structured maintenance knowledge from the train maintenance knowledge graph based on the current fault information; wherein, the structured maintenance knowledge is information related to the current fault information and from which maintenance entities, maintenance relationships and maintenance attributes can be extracted; The train maintenance plan recommendation module is used to take the set of historical maintenance cases with the highest relevance and the structured maintenance knowledge as semantic input, and use the second language model to perform reasoning to obtain the train maintenance plan.

9. A maintenance plan generation device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of the maintenance scheme generation method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the maintenance scheme generation method as described in any one of claims 1 to 7.

Citation Information

Cited By

  • Method and device for querying laws and regulations based on coal mine laws and regulations knowledge graph

    CN121935368A