Rail transit operation and maintenance fault question and answer processing method and system, terminal and storage medium

By building a knowledge graph and named entity recognition model, the problem of inefficiency in the rail transit operation and maintenance fault case management system is solved, fast and accurate fault diagnosis and positioning is achieved, and fault response time is shortened.

CN119128101APending Publication Date: 2024-12-13青岛富欣城轨科技有限公司
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411269543.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-11
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

The existing rail transit operation and maintenance fault case management system relies on manual classification and keyword search, which is inefficient and cannot quickly find relevant fault cases, and fails to fully utilize the advantages of knowledge graphs in fault identification and causal inference.

Method used

By building a knowledge graph, using named entity recognition models and intent recognition models, identify entities and intent categories in the query text, determine the query strategy, obtain target triples from the knowledge graph, and generate reply text.

Benefits of technology

Simplify the process of querying fault diagnosis data, improve the speed of fault identification and positioning, quickly match similar cases, shorten the fault response time, and provide practical maintenance guidance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119128101A_ABST
    Figure CN119128101A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of natural language processing, and particularly provides a rail transit operation and maintenance fault question and answer processing method and system, a terminal and a storage medium, and the method comprises the steps: constructing a knowledge graph in advance based on historical fault record data, the historical fault record data comprising a fault phenomenon, a diagnosis process, a solution and a prevention measure; receiving a query text, identifying a query entity in the query text by using the trained named entity identification model, and identifying a relationship category and an intention category of the query text; determining a query strategy based on the intention category, and obtaining a target triple from a knowledge graph based on the query strategy, a query entity and a relationship category; and generating a reply text based on a preset text template and the target triad. According to the method, the correlation and potential rules of the rail transit signal fault case library can be mined, and the data query process of fault diagnosis can be simplified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of natural language processing, and specifically relates to a method, system, terminal and storage medium for handling rail transit operation and maintenance fault questions and answers. Background Art

[0002] The current status of rail transit operation and maintenance fault case management includes: Method 1: After completing the fault repair, the maintenance personnel will make a detailed record of the event, including the fault phenomenon, diagnostic process, solution and preventive measures, etc. This information is usually organized in the form of documents. Share these documents and related materials with team members through cloud disks, internal corporate file sharing systems or emails. In order to prevent the recurrence of the same or similar faults, regular training will be organized for maintenance personnel to learn these cases. However, this method relies on personal experience and initiative, and when looking for specific cases, it is often necessary to search by keywords, which is inefficient and may not be able to quickly find the most relevant cases; Method 2: Some advanced maintenance monitoring systems and management platforms have begun to introduce case library functions, allowing users to submit fault forms or directly import case documents. These systems may also automatically extract fault cases from real-time monitoring data for subsequent reference. Although these systems have improved the convenience of electronic storage and access to cases, the classification and labeling of cases still rely on manual labor, which may lead to inaccurate classification. At the same time, the search function is usually based on keywords and lacks intelligent matching, so it may still take a lot of time to find suitable references in a large number of cases; For Method 1 and Method 2, the large number of fault case libraries added by maintenance personnel are isolated individuals, and it is impossible to find their internal connections, and it is impossible to find the diagnosis and treatment of a certain type of similar faults in a targeted manner, and the advantages of knowledge graphs in fault identification, causal relationship inference, etc. are not fully utilized. In addition, the search function can only be retrieved based on keywords, and it is difficult to accurately match helpful past fault cases. Summary of the invention

[0003] In view of the above-mentioned deficiencies in the prior art, the present invention provides a rail transit operation and maintenance fault question and answer processing method, system, terminal and storage medium to solve the above-mentioned technical problems.

[0004] In a first aspect, the present invention provides a rail transit operation and maintenance fault question and answer processing method, comprising: Pre-building a knowledge graph based on historical fault record data, wherein the historical fault record data includes fault phenomena, diagnostic processes, solutions, and preventive measures; Receive a query text, use a trained named entity recognition model to identify query entities in the query text, and identify a relationship category and an intent category of the query text; Determine a query strategy based on the intent category, and obtain a target triple from the knowledge graph based on the query strategy, query entities, and relationship categories; Generate a reply text based on a preset text template and the target triplet.

[0005] In an optional implementation, a knowledge graph is pre-built based on historical fault record data, where the historical fault record data includes fault phenomena, diagnostic processes, solutions, and preventive measures, including: The entity data corresponding to the fault phenomenon, diagnosis process, solution and preventive measures are stored as entity, relationship and entity triples; The triples are stored in the Neo4J graph database.

[0006] In an optional implementation, the named entity recognition model includes: A feature extraction layer, wherein the feature extraction layer includes a BERT sub-model, and the BERT sub-model is used to extract word vectors from query sentences; Entity recognition layer, the entity recognition layer includes a BiLSTM sub-model and a CRF sub-model. The BiLSTM sub-model performs bidirectional modeling on the input sequence, that is, it considers the context information from the front to the back and from the back to the front at the same time, and outputs the hidden state at each moment; the hidden state sequence output by the BiLSTM sub-model passes through a linear layer, and the CRF accepts the output of the linear layer, predicts the corresponding label for each moment, and considers the dependency between the labels to obtain the final annotation sequence.

[0007] In an optional implementation, receiving a query text, using a trained named entity recognition model to identify query entities in the query text, and identifying a relationship category and an intent category of the query text, includes: Using the trained named entity recognition model to identify the query entity in the query text, and using the normalization processing model to classify and predict the query entity and the normalized entity; The CasRel model is used to identify the subject of the query text and mark the subject as the head entity. Under a given category relationship, the object related to the subject is identified and marked as the corresponding tail entity. The relationship between the head and tail entities is obtained and linked to the edge in the knowledge graph. The BERT+TextCNN model is used as the intent recognition model to identify the intent of the query text. When loading the intent recognition model, the CLS features and the embedding features of all tokens are extracted through the Lambda layer, and then these features are input into a CNN layer for processing. Finally, the CLS features and CNN features are concatenated through the concatenate layer, and the final intent classification result is obtained through a fully connected layer and an output layer.

[0008] In an optional implementation, using a normalization processing model to perform classification prediction on the query entity and the normalized entity includes: The BM25 algorithm is used to score the relevance of the identified entities and the standardized entities. The ESIM model is loaded and two independent LSTM models are used to encode the entities and the standardized entities. After encoding, element-by-element difference, absolute value and addition operations are performed to capture the local interaction information between them. The above local interaction information is processed by another LSTM layer to generate a context-aware representation. The bidirectional attention mechanism is applied to allow entities to pay attention to standardized entities and standardized entities to pay attention to entities respectively, further enhancing the representation. Finally, a fully connected layer and softmax activation function are used to classify and predict whether there is implication between the entity and the standardized entity.

[0009] In an optional implementation, generating a reply text based on a preset text template and the target triplet includes: Recall one or more target triples from the knowledge graph; Precompile multiple text files in json format, wherein the text files include entity variables and relationship json key values; Extract the relationship type of the target triple, and filter out the text files whose JSON key values ​​match the relationship type; Substitute the entities of the target triple into the matching text file to obtain reply text data.

[0010] In a second aspect, the present invention provides a rail transit operation and maintenance fault question and answer processing system, comprising: A graph construction module, used to construct a knowledge graph in advance based on historical fault record data, wherein the historical fault record data includes fault phenomena, diagnostic processes, solutions and preventive measures; A text processing module, used to receive a query text, identify query entities in the query text using a trained named entity recognition model, and identify relationship categories and intent categories of the query text; A knowledge query module, used to determine a query strategy based on the intent category, and obtain a target triple from the knowledge graph based on the query strategy, query entity and relationship category; The reply generation module is used to generate a reply text based on a preset text template and the target triplet.

[0011] In an optional embodiment, the map construction module includes: A graph construction unit is used to store entity data corresponding to fault phenomena, diagnostic processes, solutions, and preventive measures as entities, relationships, and entity triples; The graph storage unit is used to store the triples in the Neo4J graph database.

[0012] In a third aspect, a terminal is provided, including: processor, memory, wherein: The memory is used to store computer programs. The processor is used to call and run the computer program from the memory, so that the terminal executes the above-mentioned terminal method.

[0013] According to a fourth aspect, a computer storage medium is provided, wherein the computer-readable storage medium stores instructions, and when the instructions are executed on a computer, the computer executes the methods described in the above aspects.

[0014] The beneficial effect of the present invention is that the rail transit operation and maintenance fault question-and-answer processing method, system, terminal and storage medium provided by the present invention can mine the correlation and potential rules of the rail transit signal fault case library through the knowledge graph, simplify the data query process of fault diagnosis, obtain practical maintenance guidance opinions, and assist on-site maintenance personnel to quickly handle fault diagnosis and make disposal decisions based on faulty equipment, fault phenomena, alarm information, etc. The question-and-answer system uses natural language processing technology, which can quickly understand and parse the rail transit signal professional related questions input by maintenance personnel, quickly and accurately extract and analyze its content, and perform fault diagnosis on the questions raised, improve the speed of fault identification and location, and quickly match similar cases when encountering new faults, shortening the fault response time.

[0015] In addition, the invention has a reliable design principle, a simple structure and a very broad application prospect. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0017] Figure 1 is a schematic flow chart of a method according to an embodiment of the present invention; Figure 2 is a schematic diagram of a method according to an embodiment of the present invention; Figure 3 is a schematic block diagram of a system according to an embodiment of the present invention; Figure 4 A schematic diagram of the structure of a terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0018] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0019] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.

[0020] The rail transit operation and maintenance fault question and answer processing method provided in the embodiment of the present invention is executed by a computer device, and accordingly, the rail transit operation and maintenance fault question and answer processing system runs in the computer device;

[0021] Figure 1 is a schematic flow chart of a method according to an embodiment of the present invention. Figure 1 The execution subject may be a rail transit operation and maintenance fault question and answer processing system. According to different requirements, the order of the steps in the flowchart may be changed, and some may be omitted.

[0022] like Figure 1 As shown, the method includes: Step 110, constructing a knowledge graph based on historical fault record data in advance, wherein the historical fault record data includes fault phenomena, diagnostic processes, solutions, and preventive measures; Step 120, receiving a query text, identifying query entities in the query text using a trained named entity recognition model, and identifying a relationship category and an intent category of the query text; Step 130, determining a query strategy based on the intent category, and acquiring a target triple from the knowledge graph based on the query strategy, query entity, and relationship category; Step 140, generating a reply text based on a preset text template and the target triplet.

[0023] In order to facilitate the understanding of the present invention, the rail transit operation and maintenance fault question and answer processing method provided by the present invention is further described below based on the principle of the rail transit operation and maintenance fault question and answer processing method of the present invention and the process of processing the rail transit operation and maintenance fault question and answer in the embodiment; For details, please refer to Figure 2 , the rail transit operation and maintenance fault question and answer processing method includes: S1. Build a knowledge graph: The entity data corresponding to the fault phenomenon, diagnosis process, solution and preventive measures are stored as triples of entity, relationship and entity; and the triples are stored in the Neo4J graph database.

[0024] Specifically include: 1. Define entities and relationships First, let's clarify the entities and the relationships between them. Here is a simplified example: entity: Fault DiagnosisProcess (diagnosis process); Solution PreventiveMeasure (preventive measures); relation: HAS_DIAGNOSIS (fault-diagnosis process); HAS_SOLUTION (fault - solution); RECOMMENDS_PREVENTIVE_MEASURE (Solutions - Preventive measures); 2. Create triples A triple consists of two entities and a relation. For example: (Fault1, HAS_DIAGNOSIS, DiagnosisProcess1) (Fault1, HAS_SOLUTION, Solution1) (Solution1, RECOMMENDS_PREVENTIVE_MEASURE, PreventiveMeasure1) 3. Store in Neo4J graph database In Neo4J, we can use the Cypher query language to create and query nodes (entities) and relationships (edges); Execute knowledge graph initialization. In this stage, the script is used to automatically capture case library data from the rail transit signal operation and maintenance system and store it in JSON format. Then, the graph construction script is run to parse the JSON data, create corresponding graph nodes and edges, and thus construct the associated knowledge graph between cases.

[0025] S2. Build a question-answering system; The training data set used by the system is derived from actual rail transit signal fault documents and case libraries. After manual annotation and automated script processing, it ensures that the trained model has the ability to accurately understand and analyze domain-specific terminology and professional expressions. The fault diagnosis intelligent question-answering system is written in Python. Python is a high-level scripting language that combines interpretation, compilation, interactivity, and object-orientedness. Its powerful data processing and NLP libraries can be fully utilized during the development process. Encapsulate the Python question-answering system module through the Restful API, allowing other parts (such as Java or C#) to interact with it, and realize collaborative development in a multi-language environment; Restful API is a method where the client calls the API to initiate an HTTP data request to the server, and the server responds to the request and feeds back the processing result to the client. The data request can be used to transmit question and answer data, as well as synchronize the case library with the knowledge graph. Neo4J graph database is used as the data storage database of the knowledge graph. As a graph database, it is more suitable for storing and querying complex relationships between entities and enhancing data relevance. The data in the knowledge graph is automatically extracted by scripts, and the existing alarm configuration and case library data are imported into the graph. The graph can also be customized by manually writing Cypher query language.

[0026] The question-answering system uses the following natural language processing models: The named entity recognition model is BERT+BILSTM+CRF. The data set is annotated in the form of BIO. After training the model, an entity recognition model can be obtained. For the existing highly professional entity data, the entity recognition can also be supplemented by reading the entity file by the system, so as to improve the entity extraction capability and produce better entity recognition effect, and the analysis of some complex sentences is more accurate; The CasRel model is added to entity relationship extraction to realize joint extraction of entity relationships, so that the overall system can effectively handle scenarios with overlapping triple entities, improve extraction accuracy, reduce entity redundancy, and increase information between entities; The model used for entity normalization is BM25+ESIM. Since there may be typos, abbreviations of long names, and a variety of expressions in conversations, there may be different ways to call a concept. Entity normalization can solve the problem of polysemy. Based on the identified entities, recall the candidate subsets from the knowledge base, use BM25 to calculate the relevance between the entity and the text, and then sort them. Then, through the attention mechanism of ESIM, pay attention to the semantic relationship between the entity and the text, so as to achieve semantic matching between the entity and the text, thereby improving the accuracy and efficiency of entity matching; Intent recognition is to determine what type of question the user's query text belongs to. The model used is BERT+TextCNN. BERT has super feature extraction capabilities and can often better classify some obscure sentences. TextCNN is more sensitive to keywords. Combining BERT's text features with CNN's convolutional features and using CNN's sparse links can effectively filter out some noise and enhance generalization, making it easier to extract rich text features and capture local features in the text, and reduce the risk of overfitting.

[0027] S3. Query process: When the system starts, the following components are started in sequence: 1) Named Entity Recognition Service, which is responsible for identifying key entities in the text. 2) Relationship Extraction Service, which is used to extract the relationship between entities. 3) Entity Normalization Service, which ensures the consistency and standardization of entities. 4) Intent Recognition Service, which analyzes user intent to drive subsequent processing. 5) Case Library and Graph Synchronization Service, which maintains the data consistency of the case library and knowledge graph in real time. 6) Main program, which sets the port, route and graph query parameters for front-end interaction and coordinates the communication between services; In the user interface, users enter questions in the chat-style case library query function. The front end sends this input to the main program on the server. The main program processes the request, calls related services to obtain answers, and uses the knowledge graph query function to obtain detailed information. Finally, the answer is sent back to the front end through the API interface for users to review and refer to; S301, receiving a query text, identifying query entities in the query text using a trained named entity recognition model, and identifying a relationship category and an intent category of the query text; Perform named entity recognition on the text entered by the user, using the BERT model combined with the BiLSTM-CRF model. Use the dataset obtained after entity annotation of fault handling texts, industry specification documents, etc. to train the entity recognition model; The CasResl model is used to extract relations from the text input by the user. It is essentially a joint entity relation extraction method based on parameter sharing. Processing flow: First, CasRel will identify all possible subjects (head entities); then, under a given category relationship, it will identify the objects (tail entities) related to the subject, obtain the relationship between the head and tail entities and link them to the edges in the knowledge graph, so as to realize multi-entity and multi-relationship questioning in complex scenarios; The identified entities are normalized using the BM25+ESIM algorithm model. Implementation process: The BM25 algorithm is used to score the relevance of the identified entities and the normalized entities, and then the ESIM model is loaded. Two independent LSTMs (long short-term memory networks) are used to encode the entities and normalized entities. After encoding, element-by-element difference, absolute value, and addition operations are performed to capture the local interaction information between them. The above local interaction information is processed by another LSTM layer to generate a context-aware representation. A bidirectional attention mechanism is applied to allow entities to pay attention to normalized entities and normalized entities to pay attention to entities respectively, further enhancing the representation. Finally, a fully connected layer and a softmax activation function are used to classify and predict whether the two entities are implied; Intent recognition is performed on the text input by the user. The BERT+TextCNN model algorithm is used. An automated script is used to create an intent recognition dataset based on the entity dataset and the intent prompt words. The generated dataset is then cleaned and trained to obtain the BERT model. When loading the model, the Lambda layer is used to extract the CLS and the embedding features of all tokens, and these features are then input into a CNN layer for processing. Finally, the CLS features and CNN features are concatenated through the concatenate layer, and the final classification result is obtained through a fully connected layer and an output layer. S302, determining a query strategy based on the intent category, and obtaining a target triple from the knowledge graph based on the query strategy, query entity, and relationship category; Intent categories can include queries or requests such as information query, question answering, command execution, etc. Once the user's intent is identified, it needs to be classified into one or more predefined intent categories.

[0028] Determine query strategy based on intent: For each intent category, there are usually one or more predefined query strategies. The query strategy defines the way and steps to retrieve information from the knowledge graph, including the complexity of the query, the required relationship path, possible entity types, etc. According to the identified intent category, select the appropriate query strategy; Identify query entities and relationship categories: After determining the query strategy, it is necessary to identify key query entities and relationship categories from user input; Get target triples from the knowledge graph: A knowledge graph is a structured information base that contains a large number of entities, relations, and attributes. Use the previously determined query strategy, query entities, and relationship categories to perform queries in the knowledge graph. The result of the query may be one or more triples, each of which contains a head entity, a relation, and a tail entity. Depending on the complexity of the query and the user's intent, it may be necessary to perform multiple queries or combine multiple triples to generate the final answer or response.

[0029] S303, generating a reply text based on a preset text template and the target triplet; Recall one or more target triples from the knowledge graph; precompile multiple text files in json format, wherein the text files include entity variables and relationship json key values; extract the relationship type of the target triples, and filter out text files whose json key values ​​match the relationship type; substitute the entities of the target triples into the matching text files to obtain reply text data.

[0030] Specifically include: (1) Pre-compiled text files in json format: In order to quickly generate reply texts, the system pre-prepares a series of text files in json format. These files contain pre-defined text templates for generating replies in different situations. Each json file contains one or more json objects, each of which contains entity variables and relationship json key values. Entity variables are placeholders used to replace entities in actual triples, and relationship json key values ​​correspond to relationship types in the knowledge graph. These json files can be customized according to different business scenarios, user groups or needs to provide personalized replies; (2) Extract the relationship type of the target triple: After recalling the target triple, the system needs to extract the relationship type in each triple. The relationship type defines the relationship between entities and is the key to selecting the correct JSON file. The relationship type usually corresponds to the relationship model defined in the knowledge graph. It can be predefined, standardized, or customized according to specific business scenarios; (3) Filter matching json files: The system traverses the pre-compiled json file collection and filters out text files whose json key values ​​match the relationship type according to the relationship type of the target triple. The matching process can be achieved by comparing the relationship type and the json key value to ensure that the selected json file is consistent with the relationship type in the target triple. If there are multiple matching json files, the system can select them based on priority, frequency of use, or other factors; (4) Substituting entities to generate reply text: After filtering out the matching JSON files, the system substitutes the entities in the target triples into the entity variables in the JSON files. This usually involves operations such as string replacement or template rendering. By substituting entities into text templates, the system can generate reply texts with practical meaning. These texts can be directly presented to users as responses to query statements. The generated reply texts should be clear, accurate, and easy to understand in order to provide effective information and services; (5) Post-processing and optimization: After generating the reply text, the system can perform some post-processing operations, such as grammar checking, semantic verification, text polishing, etc., to improve the quality and readability of the reply text. In addition, the JSON file collection can be continuously optimized and updated based on user feedback and behavior data to provide more personalized and intelligent reply services; In some embodiments, the rail transit operation and maintenance fault question and answer processing system may include multiple functional modules composed of computer program segments. The computer programs of each program segment in the rail transit operation and maintenance fault question and answer processing system may be stored in the memory of a computer device and executed by at least one processor to perform (see Figure 1 Description) The function of handling rail transit operation and maintenance fault questions and answers.

[0031] In this embodiment, the rail transit operation and maintenance fault question and answer processing system can be divided into multiple functional modules according to the functions it performs, such as Figure 3 As shown. The functional modules of the system 300 may include: a graph construction module 310, a text processing module 320, a knowledge query module 330, and a reply generation module 340. The module referred to in the present invention refers to a series of computer program segments that can be executed by at least one processor and can complete fixed functions, which are stored in a memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.

[0032] A graph construction module, used to construct a knowledge graph in advance based on historical fault record data, wherein the historical fault record data includes fault phenomena, diagnostic processes, solutions and preventive measures; A text processing module, used to receive a query text, identify query entities in the query text using a trained named entity recognition model, and identify relationship categories and intent categories of the query text; A knowledge query module, used to determine a query strategy based on the intent category, and obtain a target triple from the knowledge graph based on the query strategy, query entity and relationship category; The reply generation module is used to generate a reply text based on a preset text template and the target triplet.

[0033] Optionally, as an embodiment of the present invention, the graph construction module includes: A graph construction unit is used to store entity data corresponding to fault phenomena, diagnostic processes, solutions, and preventive measures as entities, relationships, and entity triples; The graph storage unit is used to store the triples in the Neo4J graph database.

[0034] Optionally, as an embodiment of the present invention, the named entity recognition model includes: A feature extraction layer, wherein the feature extraction layer includes a BERT sub-model, and the BERT sub-model is used to extract word vectors from query sentences; Entity recognition layer, the entity recognition layer includes a BiLSTM sub-model and a CRF sub-model. The BiLSTM sub-model performs bidirectional modeling on the input sequence, that is, it considers the context information from the front to the back and from the back to the front at the same time, and outputs the hidden state at each moment; the hidden state sequence output by the BiLSTM sub-model passes through a linear layer, and the CRF accepts the output of the linear layer, predicts the corresponding label for each moment, and considers the dependency between the labels to obtain the final annotation sequence.

[0035] Optionally, as an embodiment of the present invention, receiving a query text, using a trained named entity recognition model to identify query entities in the query text, and identifying a relationship category and an intent category of the query text, includes: Using the trained named entity recognition model to identify the query entity in the query text, and using the normalization processing model to classify and predict the query entity and the normalized entity; The CasRel model is used to identify the subject of the query text and mark the subject as the head entity. Under a given category relationship, the object related to the subject is identified and marked as the corresponding tail entity. The relationship between the head and tail entities is obtained and linked to the edge in the knowledge graph. The BERT+TextCNN model is used as the intent recognition model to identify the intent of the query text. When loading the intent recognition model, the CLS features and the embedding features of all tokens are extracted through the Lambda layer, and then these features are input into a CNN layer for processing. Finally, the CLS features and CNN features are concatenated through the concatenate layer, and the final intent classification result is obtained through a fully connected layer and an output layer.

[0036] Optionally, as an embodiment of the present invention, using a normalization processing model to perform classification prediction on the query entity and the normalized entity includes: The BM25 algorithm is used to score the relevance of the identified entities and the standardized entities. The ESIM model is loaded and two independent LSTM models are used to encode the entities and the standardized entities. After encoding, element-by-element difference, absolute value and addition operations are performed to capture the local interaction information between them. The above local interaction information is processed by another LSTM layer to generate a context-aware representation. The bidirectional attention mechanism is applied to allow entities to pay attention to standardized entities and standardized entities to pay attention to entities respectively, further enhancing the representation. Finally, a fully connected layer and softmax activation function are used to classify and predict whether there is implication between the entity and the standardized entity.

[0037] Optionally, as an embodiment of the present invention, generating a reply text based on a preset text template and the target triplet includes: Recall one or more target triples from the knowledge graph; Precompile multiple text files in json format, wherein the text files include entity variables and relationship json key values; Extract the relationship type of the target triple, and filter out the text files whose JSON key values ​​match the relationship type; Substitute the entities of the target triple into the matching text file to obtain reply text data.

[0038] Figure 4 The present invention provides a schematic diagram of the structure of a terminal 400 provided in an embodiment of the present invention. The terminal 400 can be used to execute the rail transit operation and maintenance fault question and answer processing method provided in an embodiment of the present invention.

[0039] The terminal 400 may include: a processor 410, a memory 420 and a communication unit 430. These components communicate via one or more buses. Those skilled in the art will appreciate that the server structure shown in the figure does not limit the present invention, and it may be a bus structure or a star structure, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0040] The memory 420 can be used to store the execution instructions of the processor 410, and the memory 420 can be implemented by any type of volatile or non-volatile storage terminal or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. When the execution instructions in the memory 420 are executed by the processor 410, the terminal 400 can perform some or all of the steps in the following method embodiments.

[0041] The processor 410 is the control center of the storage terminal, and uses various interfaces and lines to connect various parts of the entire electronic terminal. It runs or executes software programs and / or modules stored in the memory 420, and calls data stored in the memory to perform various functions of the electronic terminal and / or process data. The processor can be composed of an integrated circuit (IC), for example, it can be composed of a single packaged IC, or it can be composed of multiple packaged ICs with the same or different functions. For example, the processor 410 can include only a central processing unit (CPU). In the embodiment of the present invention, the CPU can be a single computing core or multiple computing cores.

[0042] The communication unit 430 is used to establish a communication channel so that the storage terminal can communicate with other terminals, receive user data sent by other terminals or send user data to other terminals.

[0043] The present invention also provides a computer storage medium, wherein the computer storage medium may store a program, and when the program is executed, the program may include some or all of the steps in each embodiment provided by the present invention. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).

[0044] Therefore, the present invention can mine the relevance and potential rules of the rail transit signal fault case library through the knowledge graph, simplify the data query process of fault diagnosis, obtain maintenance guidance opinions with practical significance, and assist on-site maintenance personnel to quickly handle fault diagnosis and make disposal decisions based on faulty equipment, fault phenomena, alarm information, etc. The question-answering system uses natural language processing technology, which can quickly understand and parse the professional related questions of rail transit signals input by maintenance personnel, quickly and accurately extract and analyze their content, and perform fault diagnosis on the questions raised, thereby improving the speed of fault identification and location. When encountering new faults, similar cases can be quickly matched to shorten the fault response time. The technical effects that can be achieved by this embodiment can be found in the description above, and will not be repeated here.

[0045] Those skilled in the art can clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution in the embodiments of the present invention, in essence or in other words, the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, and other media that can store program codes, including several instructions for enabling a computer terminal (which can be a personal computer, a server, or a second terminal, a network terminal, etc.) to execute all or part of the steps of the methods described in each embodiment of the present invention.

[0046] In this specification, the same or similar parts between the various embodiments can be referred to each other. In particular, for the terminal embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description in the method embodiment.

[0047] In the several embodiments provided by the present invention, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of systems or modules, which can be electrical, mechanical or other forms.

[0048] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0049] In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.

[0050] Although the present invention has been described in detail with reference to the accompanying drawings and in combination with the preferred embodiments, the present invention is not limited thereto. Without departing from the spirit and essence of the present invention, a person of ordinary skill in the art may make various equivalent modifications or substitutions to the embodiments of the present invention, and these modifications or substitutions shall be within the scope of the present invention. Any person of ordinary skill in the art may easily think of changes or substitutions within the technical scope disclosed by the present invention, and these shall be within the scope of protection of the present invention.

Claims

1. A rail transit operation and maintenance fault question and answer processing method, characterized in that: include: Pre-building a knowledge graph based on historical fault record data, wherein the historical fault record data includes fault phenomena, diagnostic processes, solutions, and preventive measures; Receive a query text, use a trained named entity recognition model to identify query entities in the query text, and identify a relationship category and an intent category of the query text; Determine a query strategy based on the intent category, and obtain a target triple from the knowledge graph based on the query strategy, query entities, and relationship categories; Generate a reply text based on a preset text template and the target triplet.

2. The method according to claim 1, characterized in that A knowledge graph is pre-built based on historical fault record data, which includes fault phenomena, diagnostic processes, solutions, and preventive measures, including: The entity data corresponding to the fault phenomenon, diagnosis process, solution and preventive measures are stored as entity, relationship and entity triples; The triples are stored in the Neo4J graph database.

3. The method according to claim 1, characterized in that The named entity recognition model includes: A feature extraction layer, wherein the feature extraction layer includes a BERT sub-model, and the BERT sub-model is used to extract word vectors from query sentences; Entity recognition layer, the entity recognition layer includes a BiLSTM sub-model and a CRF sub-model. The BiLSTM sub-model performs bidirectional modeling on the input sequence, that is, it considers the context information from the front to the back and from the back to the front at the same time, and outputs the hidden state at each moment; the hidden state sequence output by the BiLSTM sub-model passes through a linear layer, and the CRF accepts the output of the linear layer, predicts the corresponding label for each moment, and considers the dependency between the labels to obtain the final annotation sequence.

4. The method according to claim 3, characterized in that Receive a query text, use a trained named entity recognition model to identify query entities in the query text, and identify relationship categories and intent categories of the query text, including: Using the trained named entity recognition model to identify the query entity in the query text, and using the normalization processing model to classify and predict the query entity and the normalized entity; The CasRel model is used to identify the subject of the query text and mark the subject as the head entity. Under a given category relationship, the object related to the subject is identified and marked as the corresponding tail entity. The relationship between the head and tail entities is obtained and linked to the edge in the knowledge graph. The BERT+TextCNN model is used as the intent recognition model to identify the intent of the query text. When loading the intent recognition model, the CLS features (i.e., comprehensive text representation) and the embedding features of all tokens are extracted through the Lambda layer, and then these features are input into a CNN layer for processing. Finally, the CLS features and CNN features are concatenated through the concatenate layer, and the final intent classification result is obtained through a fully connected layer and an output layer.

5. The method according to claim 4, characterized in that Using a normalization processing model to perform classification prediction on the query entity and the normalized entity includes: The BM25 algorithm is used to score the relevance of the identified entities and the standardized entities. The ESIM model is loaded and two independent LSTM models are used to encode the entities and the standardized entities. After encoding, element-by-element difference, absolute value and addition operations are performed to capture the local interaction information between them. The above local interaction information is processed by another LSTM layer to generate a context-aware representation. The bidirectional attention mechanism is applied to allow entities to pay attention to standardized entities and standardized entities to pay attention to entities respectively, further enhancing the representation. Finally, a fully connected layer and softmax activation function are used to classify and predict whether there is implication between the entity and the standardized entity.

6. The method according to claim 1, characterized in that Generate a reply text based on a preset text template and the target triplet, including: Recall one or more target triples from the knowledge graph; Precompile multiple text files in json format, wherein the text files include entity variables and relationship json key values; Extract the relationship type of the target triple, and filter out the text files whose JSON key values ​​match the relationship type; Substitute the entities of the target triple into the matching text file to obtain reply text data.

7. A rail transit operation and maintenance fault question and answer processing system, characterized in that: include: A graph construction module, used to construct a knowledge graph in advance based on historical fault record data, wherein the historical fault record data includes fault phenomena, diagnostic processes, solutions and preventive measures; A text processing module, used to receive a query text, identify query entities in the query text using a trained named entity recognition model, and identify relationship categories and intent categories of the query text; A knowledge query module, used to determine a query strategy based on the intent category, and obtain a target triple from the knowledge graph based on the query strategy, query entity and relationship category; The reply generation module is used to generate a reply text based on a preset text template and the target triplet.

8. The system according to claim 7, characterized in that The graph construction module includes: A graph construction unit is used to store entity data corresponding to fault phenomena, diagnostic processes, solutions, and preventive measures as entities, relationships, and entity triples; The graph storage unit is used to store the triples in the Neo4J graph database.

9. A terminal, characterized in that: include: A memory device for storing a rail transit operation and maintenance fault question and answer processing program; A processor is used to implement the steps of the rail transit operation and maintenance fault question and answer processing method as described in any one of claims 1 to 6 when executing the rail transit operation and maintenance fault question and answer processing program.

10. A computer-readable storage medium storing a computer program, characterized in that: The readable storage medium stores a rail transit operation and maintenance fault question and answer processing program, and when the rail transit operation and maintenance fault question and answer processing program is executed by the processor, the steps of the rail transit operation and maintenance fault question and answer processing method as described in any one of claims 1-6 are implemented.

Citation Information

Patent Citations

  • Efficient intelligent question-answering system for knowledge in artificial intelligence field

    CN113157885A

  • Rail transit signal system fault analysis method and device and electronic equipment

    CN113987001A

  • Task type automobile fault intelligent question-answering system based on knowledge graph

    CN114691831A

  • Railway fault knowledge extraction analysis method and device

    CN115455194A

  • Railway equipment fault knowledge reasoning method and device

    CN115687636A