Search

CN-121996769-A - Intelligent query and answer method and system for four-electricity operation and maintenance knowledge of railway based on large language model

CN121996769ACN 121996769 ACN121996769 ACN 121996769ACN-121996769-A

Abstract

The application relates to the technical field of railway four-electricity operation and maintenance, provides a railway four-electricity operation and maintenance knowledge intelligent question-answering method and system based on a large language model, and solves the problems of low logic accuracy and poor field applicability of operation and maintenance question-answering results. The method comprises the steps of obtaining a question-answering request comprising equipment identification, position data and a question text, analyzing the question text syntactically to obtain a target equipment entity and operation intention, locating map nodes and traversing the map according to the knowledge map of the four-interlocking relationship of the equipment identification on a railway to obtain related equipment entity, electric connection relationship and interlocking logic information, combining the related equipment entity, the electric connection relationship and the interlocking logic information into a rule constraint condition set, performing vector retrieval based on the equipment identification and the position data to obtain an operation and maintenance knowledge segment, inputting the rule constraint condition set and the operation and maintenance knowledge segment into a large language model, logically constraining a generating process according to the rule constraint condition set, and generating an intelligent question-answering result text. The application improves the logic accuracy and the field applicability of the operation and maintenance question and answer result.

Inventors

  • LIU BING
  • XU WEIKANG
  • LEI GANG
  • MA WENQIANG
  • WANG YAPING
  • SHI CHAO
  • MA LIMING
  • DU SHUAI
  • HU SHAOLEI
  • CHI DAWEI
  • HAO YUKAI
  • GAO JINGYANG
  • HUANG LIJIE

Assignees

  • 中铁电气化铁路运营管理有限公司

Dates

Publication Date
20260508
Application Date
20260410

Claims (10)

  1. 1. A railway four-electricity operation and maintenance knowledge intelligent question-answering method based on a large language model is characterized by comprising the following steps: Acquiring a question-answer request sent by a patrol terminal, wherein the question-answer request comprises equipment identification information, equipment space position data and natural language question text; Carrying out syntactic analysis on the natural language problem text by using a constraint alignment algorithm to obtain a target equipment entity and an operation intention, and positioning map nodes matched with the target equipment entity in a pre-constructed railway four-interlock relation knowledge map according to the equipment identification information; Performing graph traversal with the graph nodes as starting points to obtain an associated equipment entity, electrical connection relation information and interlocking logic information, and combining the operation intention, the associated equipment entity, the electrical connection relation information and the interlocking logic information into a rule constraint condition set; based on the equipment identification information and the equipment space position data, vector retrieval is carried out in a pre-constructed railway four-electricity operation and maintenance knowledge base to obtain an operation and maintenance knowledge segment; Inputting the rule constraint condition set and the operation and maintenance knowledge segments into a large language model, and logically constraining the generation process through the large language model according to the rule constraint condition set to generate an intelligent question-answer result text conforming to railway four-interlock logic.
  2. 2. The intelligent question-answering method of railway four-electricity operation and maintenance knowledge based on a large language model according to claim 1, wherein the steps of inputting the rule constraint condition set and the operation and maintenance knowledge segments into the large language model, logically constraining a generating process according to the rule constraint condition set through the large language model, and generating an intelligent question-answering result text conforming to railway four-electricity interlocking logic comprise the steps of: Inputting the rule constraint condition set into the large language model, and converting the rule constraint condition set into an interlocking reasoning rule chain of four electricity of a railway through the large language model; Inputting the operation and maintenance knowledge segments into the large language model, and generating text units step by step in a time by autoregressive mode through the large language model; After each time step generates a text unit, combining all the text units which are generated currently into an intermediate conclusion through the large language model, and carrying out logic verification on the intermediate conclusion according to the interlocking reasoning rule chain; When the intermediate conclusion violates logic constraint in the interlocking inference rule chain, backtracking to the previous time step through the large language model, and regenerating a text unit of the current time step according to the operation and maintenance knowledge segment until the regenerated intermediate conclusion meets all logic constraint in the interlocking inference rule chain; Repeating the time step generation, logic verification and backtracking processes through the large language model until intelligent question and answer result text is generated.
  3. 3. The intelligent question-answering method of four-electricity operation and maintenance knowledge of railway based on a large language model according to claim 2, wherein the converting the rule constraint condition set into an interlocking inference rule chain of four-electricity of railway by the large language model comprises: Extracting features of the rule constraint condition set through an encoder of the large language model to obtain semantic feature vectors of each element in the rule constraint condition set, wherein the elements in the rule constraint condition set comprise the operation intention, the association equipment entity, the electrical connection relation information and the interlocking logic information; Calculating the association degree between the semantic feature vector of the operation intention and the semantic feature vector of the associated equipment entity, the semantic feature vector of the electrical connection relation information and the semantic feature vector of the interlocking logic information respectively through the attention mechanism of the large language model, and determining an equipment acting object corresponding to the operation intention, a connection relation type corresponding to the equipment acting object and a logic constraint type corresponding to the equipment acting object according to the association degree; Combining the equipment acting object, the connection relation type and the logic constraint type according to a preset rule template through a logic processing unit of the large language model to generate a plurality of logic sentences; And arranging a plurality of logic sentences according to a logic sequence through an output layer of the large language model to form an interlocking reasoning rule chain.
  4. 4. The intelligent question-answering method of the four-electricity operation and maintenance knowledge of the railway based on the large language model according to claim 1, wherein before the question-answer request sent by the patrol terminal is obtained, the method further comprises the step of constructing a four-electricity operation and maintenance knowledge base of the railway and a four-electricity interlocking relationship knowledge map of the railway: collecting rush repair plan documents, operation instruction book documents, equipment specification documents, equipment account data, equipment record table data and historical fault case data of a plurality of subordinate institutions in a railway four-electricity system; Performing optical character recognition processing on the rush repair plan document, the operation instruction book document, the equipment instruction book document and the historical fault case data to obtain corresponding text data; carrying out structural analysis on the equipment ledger data and the equipment resume table data to obtain corresponding structural record data; Respectively segmenting the text data and the structured record data to obtain a plurality of text paragraphs and a plurality of structured items; Carrying out vectorization processing on each text paragraph and each structured item to obtain a text paragraph vector corresponding to each text paragraph and a structured item vector corresponding to each structured item; Correspondingly storing the text paragraph, the text paragraph vector, the structured item and the structured item vector into a vector database, wherein the storage content in the vector database forms a railway four-electricity operation and maintenance knowledge base; and extracting the names of the equipment entities, the connection relation among the equipment entities and the logic constraint condition among the equipment entities from the text data and the structured record data, and constructing a railway four-interlocking relation knowledge graph by taking the names of the equipment entities as nodes, the connection relation as edges and the logic constraint condition as attributes of the edges.
  5. 5. The intelligent query and answer method of railway four-electricity operation and maintenance knowledge based on a large language model according to claim 1, wherein the method for performing syntactic analysis on the natural language question text by using a constraint alignment algorithm to obtain a target equipment entity and an operation intention, and positioning a map node matched with the target equipment entity in a pre-constructed railway four-electricity interlocking relationship knowledge map according to the equipment identification information comprises the following steps: Word segmentation is carried out on the natural language problem text to obtain a word sequence; carrying out grammar role labeling on each word in the word sequence to obtain grammar role information of each word; Identifying words representing the device name from the word sequence as target device entities and words representing the query or operation type as operation intents according to the grammar role information; Extracting a unique device code from the device identification information, searching a node corresponding to the unique device code in the railway four-interlocking relationship knowledge graph, and taking the node as a candidate node; And if the comparison result is inconsistent, searching a node with the equipment name attribute matched with the target equipment entity in the railway four-interlock relation knowledge graph, and taking the corresponding node as a graph node.
  6. 6. The intelligent query and answer method of the four-electricity operation and maintenance knowledge of the railway based on the large language model according to claim 1, wherein the graph traversal is performed by taking the graph nodes as a starting point to obtain the associated equipment entity, the electrical connection relation information and the interlocking logic information, and the method comprises the following steps: Analyzing the operation intention and determining the traversal depth; performing breadth-first traversal according to a preset connection relation in the railway four-interlocking relation knowledge graph by taking the graph node as an initial node, obtaining a node with a path length smaller than or equal to the traversal depth, and recording the obtained node as an associated equipment entity; and extracting electrical connection relation information and interlocking logic information from attribute fields of the connection edges aiming at the connection edges between the map nodes and each associated equipment entity.
  7. 7. The intelligent question-answering method of four-electric operation and maintenance knowledge of railway based on large language model according to claim 1, wherein the performing vector search in the pre-constructed four-electric operation and maintenance knowledge base based on the equipment identification information and the equipment space position data to obtain an operation and maintenance knowledge segment comprises: Respectively vectorizing the equipment identification information and the equipment space position data by utilizing a pre-trained embedded model to obtain a first feature vector and a second feature vector, and combining the first feature vector and the second feature vector to obtain a composite query vector; calculating the similarity between the composite query vector and a plurality of candidate vectors in a pre-constructed vector database, wherein the vector database stores feature vectors corresponding to each knowledge segment in the railway four-electricity operation and maintenance knowledge base; And selecting the first K knowledge segments with the maximum similarity value as operation and maintenance knowledge segments, wherein K is a preset positive integer.
  8. 8. A railway four-electricity operation and maintenance knowledge intelligent question-answering system based on a large language model is characterized by comprising: The acquisition module is used for acquiring a question-answer request sent by the inspection terminal, wherein the question-answer request comprises equipment identification information, equipment space position data and natural language question text; The analysis module is used for carrying out syntactic analysis on the natural language problem text by utilizing a constraint alignment algorithm to obtain a target equipment entity and an operation intention, and positioning a map node matched with the target equipment entity in a pre-constructed railway four-interlocking relationship knowledge map according to the equipment identification information; The traversing module is used for traversing the graph by taking the graph nodes as a starting point to obtain an associated equipment entity, electric connection relation information and interlocking logic information, and combining the operation intention, the associated equipment entity, the electric connection relation information and the interlocking logic information into a rule constraint condition set; the retrieval module is used for executing vector retrieval in a pre-constructed railway four-electricity operation and maintenance knowledge base based on the equipment identification information and the equipment space position data to obtain an operation and maintenance knowledge segment; The input module is used for inputting the rule constraint condition set and the operation and maintenance knowledge segment into a large language model, logically constraining the generation process according to the rule constraint condition set through the large language model, and generating an intelligent question-answer result text conforming to railway four-interlock logic.
  9. 9. An electronic device, comprising: A memory for storing a computer program; a processor for implementing the steps of the large language model-based intelligent knowledge question-answering method for four electric operations and maintenance of railways according to any one of claims 1 to 7 when executing the computer program.
  10. 10. A computer readable storage medium, wherein a computer program is stored in the computer readable storage medium, and when the computer program is executed by a processor, the computer program can implement the intelligent question-answering method based on the large language model for railway four-electricity operation and maintenance knowledge according to any one of claims 1 to 7.

Description

Intelligent query and answer method and system for four-electricity operation and maintenance knowledge of railway based on large language model Technical Field The application relates to the technical field of railway four-electricity operation and maintenance, in particular to a method and a system for intelligent question-answering of railway four-electricity operation and maintenance knowledge based on a large language model. Background The four-electric railway system is a generic name of communication, signal, electric power and electrification professions, and the operation and maintenance management thereof relates to a large number of equipment state monitoring and overhaul operation scenes. The intelligent question-answering method based on the large language model is gradually applied to the railway operation and maintenance field, provides equipment information inquiry and overhaul guidance for field operators, and shows good prospects in the aspect of improving operation and maintenance efficiency. The current railway four-electricity operation and maintenance question-answering method based on a large language model generally adopts a retrieval enhancement generation framework, firstly carries out text analysis and vectorization processing on operation and maintenance procedure documents, equipment specifications and other data, builds a knowledge base, then calculates recall related document fragments through vector similarity after receiving user questions, and finally inputs the recalled fragments and the questions into the large language model together to generate answers. The part of the improvement scheme can also introduce the equipment ledger data as supplementary information in the question and answer process so as to improve the accuracy of the answer. However, in a railway four-electricity operation and maintenance scenario, complex electrical connection relations and strict interlocking logic constraints exist between devices, and logic rules hidden in operation and maintenance regulations are difficult to effectively capture and utilize through a conventional text retrieval mode. When a field operator inquires about the states or operation influences of a plurality of associated devices, the answer generated simply based on document fragment splicing often ignores the logic constraint relation among the devices, so that the answer content deviates from the actual operation and maintenance procedure requirement. Therefore, the technical problem that the operation and maintenance question and answer result is not matched with the field device interlocking logic rule exists in the prior art. Disclosure of Invention The application provides a railway four-electricity operation and maintenance knowledge intelligent question-answering method and system based on a large language model, which are used for solving the problems of low logic accuracy and poor field applicability of operation and maintenance question-answering results in the prior art. In order to solve the technical problems, in a first aspect, the application provides a railway four-electricity operation and maintenance knowledge intelligent question-answering method based on a large language model, which comprises the following steps: Acquiring a question-answer request sent by a patrol terminal, wherein the question-answer request comprises equipment identification information, equipment space position data and natural language question text; Carrying out syntactic analysis on the natural language problem text by using a constraint alignment algorithm to obtain a target equipment entity and an operation intention, and positioning map nodes matched with the target equipment entity in a pre-constructed railway four-interlock relation knowledge map according to the equipment identification information; Performing graph traversal with the graph nodes as starting points to obtain an associated equipment entity, electrical connection relation information and interlocking logic information, and combining the operation intention, the associated equipment entity, the electrical connection relation information and the interlocking logic information into a rule constraint condition set; based on the equipment identification information and the equipment space position data, vector retrieval is carried out in a pre-constructed railway four-electricity operation and maintenance knowledge base to obtain an operation and maintenance knowledge segment; Inputting the rule constraint condition set and the operation and maintenance knowledge segments into a large language model, and logically constraining the generation process through the large language model according to the rule constraint condition set to generate an intelligent question-answer result text conforming to railway four-interlock logic. In a second aspect, the present application provides a railway four-electricity operation and maintenance knowledge intelligent question-an