A method and device for constructing a knowledge graph in the field of railways

By preprocessing, entity recognition, and relation extraction of knowledge texts in the railway field, a knowledge graph in the railway field is constructed, which solves the problems of knowledge data management and storage in the railway field and realizes efficient knowledge query and reasoning support.

CN119168045BActive Publication Date: 2026-02-27INST OF COMPUTING TECH CHINA ACAD OF RAILWAY SCI +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411202812.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-29
Publication Date
2026-02-27
Estimated Expiration
2044-08-29

AI Technical Summary

Technical Problem

How to effectively manage and store knowledge data in the railway field, improve the retrieval efficiency of knowledge data, and construct a knowledge graph in the railway field to support efficient and accurate knowledge query and reasoning.

Method used

By acquiring knowledge texts in the railway field, preprocessing them, filtering out railway knowledge entities, analyzing their characteristics, constructing and training a railway knowledge entity recognition model, identifying and representing entity relationships as triples, and finally integrating them into a graph database to construct a knowledge graph.

Benefits of technology

It improves the efficiency of knowledge processing and management in the railway field, realizes automated entity recognition and relationship extraction, and constructs a structured knowledge graph, providing strong support for applications and decision-making in the railway field.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119168045B_ABST
    Figure CN119168045B_ABST
Patent Text Reader

Abstract

The application discloses a railway field knowledge graph construction method and device, which comprises the following steps: acquiring railway field knowledge texts, preprocessing the railway field knowledge texts, selecting railway knowledge from the preprocessed railway field knowledge texts, screening railway knowledge entities, analyzing the characteristics of the railway knowledge entities, constructing and training a railway knowledge entity identification model based on the railway knowledge entities and the characteristics, identifying the railway knowledge entities in a railway field knowledge base through the model, extracting the corresponding relationship of the railway knowledge entities from the railway field knowledge texts, expressing the identified railway knowledge entities and the relationship in triplets, fusing and saving the triplets to a graph database, and constructing a railway field knowledge graph; the application can improve the processing and management efficiency of railway field knowledge, realize automatic railway knowledge entity identification and relationship extraction, construct a structured railway field knowledge graph, and provide strong support for railway field application and decision-making.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data processing, in particular to a railway domain knowledge graph construction method and device. BACKGROUND

[0002] With the explosive growth of Internet data, a large number of railway domain knowledge data are applied, but how to manage and store these data for convenient knowledge data retrieval is an important problem, and constructing a railway domain knowledge graph is a solution to the existing problem. The construction of the railway domain knowledge graph is a technical practice based on knowledge graph and graph database. The knowledge graph is a knowledge representation method that represents and stores entities, attributes and relationships in the form of a graph. In the railway field, the construction of the knowledge graph has important practical significance. By constructing the railway domain knowledge graph, these entities and relationships can be represented and managed in a structured manner, thereby supporting more efficient, accurate knowledge query, reasoning and application. Therefore, how to construct the railway domain knowledge graph is the main problem to be solved at present. SUMMARY

[0003] In order to solve the above technical problems, the present application provides a railway domain knowledge graph construction method and device, comprising:

[0004] acquiring railway domain knowledge text, and preprocessing the railway domain knowledge text;

[0005] selecting railway knowledge from the preprocessed railway domain knowledge text, and screening railway knowledge entities from the railway knowledge;

[0006] analyzing the characteristics of the railway knowledge entities, constructing and training a railway knowledge entity recognition model based on the railway knowledge entities and characteristics;

[0007] identifying railway knowledge entities in a railway domain knowledge base through the trained railway knowledge entity recognition model;

[0008] extracting the relationships of the corresponding railway knowledge entities from the railway domain knowledge text, and representing the identified railway knowledge entities and their relationships in triplets;

[0009] fusing and saving the triplets to a graph database to construct a railway domain knowledge graph.

[0010] Further, the acquiring railway domain knowledge text and preprocessing the railway domain knowledge text comprises:

[0011] Acquire railway domain knowledge data on the network, process the railway domain knowledge data into text form of pure text through a multi-modal data processing method, and obtain railway domain knowledge text;

[0012] Preprocess the railway domain knowledge text, which includes word segmentation, removal of stop words, part-of-speech tagging, and syntax analysis.

[0013] Further, selecting railway knowledge from the preprocessed railway domain knowledge text and screening railway knowledge entities from the railway knowledge includes:

[0014] Divide the preprocessed railway domain knowledge text into multiple sentences, and select noun phrases, verbs, and verb phrases from the sentences as candidate terms;

[0015] Use a railway domain keyword list to perform keyword matching on each of the candidate terms, select candidate terms that reach a preset matching degree, and locate the sentences where the candidate terms that reach the preset matching degree are located, and use the sentences as railway knowledge.

[0016] Score and evaluate the words, phrases, and phrases in the railway knowledge by railway domain experts, screen out words, phrases, and phrases with scores exceeding a preset score, and obtain railway knowledge entities.

[0017] Further, the characteristics of the railway knowledge entities are analyzed, and a railway knowledge entity recognition model is constructed and trained based on the railway knowledge entities and characteristics, including:

[0018] Obtain the multi-dimensional characteristics of the railway knowledge entities, and evaluate and analyze the multi-dimensional characteristics to screen out characteristics that meet the requirements;

[0019] Construct a railway knowledge entity recognition model based on the railway knowledge entities and their characteristics;

[0020] Use the railway knowledge entities and their characteristics as model training data to train the railway knowledge entity recognition model until the railway knowledge entity recognition model meets the preset requirements.

[0021] Further, the corresponding relationship of the railway knowledge entities is extracted and identified from the railway domain knowledge text, and the identified railway knowledge entities and their relationships are represented by triplets, including:

[0022] Calculate the cosine similarity between two railway knowledge entities in turn, and select two railway knowledge entities with a cosine similarity greater than a preset value for matching as an entity pair.

[0023] Calculate the distance between two railway knowledge entities in the entity pair, and screen out the entity pairs whose distance is within a preset range;

[0024] Calculate the cosine similarity between each verb or verb phrase around the entity pair and the cluster center with the entity pair as the cluster center;

[0025] According to the cosine similarity, each verb or verb phrase and the cluster center are merged, and the new cluster center is recalculated;

[0026] Calculate the difference between the new cluster center and the cluster center, and take the verb or verb phrase whose difference is less than a preset difference threshold as the extraction result to obtain the relationship of the railway knowledge entity;

[0027] The identified railway knowledge entity and its relationship are expressed in triples.

[0028] Further, the identified railway knowledge entity and its relationship are expressed in triples, including:

[0029] The identified railway knowledge entity and its relationship are matched with each other, and after successful matching, a plurality of triples are formed in the form of subject-predicate-object.

[0030] Further, the fusion and saving of the triples to the graph database to construct the railway domain knowledge graph, including:

[0031] Analyze the number and size of the railway knowledge entity and its relationship, and select the type of graph database according to the number and size of the railway knowledge entity and its relationship;

[0032] In the graph database, the railway knowledge entity is taken as a node, and the relationship of the railway knowledge entity is taken as an edge to construct the graph pattern of the graph database;

[0033] According to the graph pattern, the triples are fused and saved to the graph database to construct the railway domain knowledge graph.

[0034] The present application also provides a railway domain knowledge graph construction device, comprising:

[0035] An acquisition module is configured to acquire railway domain knowledge text and pre-process the railway domain knowledge text;

[0036] A screening module is configured to select railway knowledge from the pre-processed railway domain knowledge text and screen railway knowledge entities from the railway knowledge;

[0037] A modeling module is configured to analyze the characteristics of the railway knowledge entities, construct and train a railway knowledge entity recognition model based on the railway knowledge entities and characteristics.

[0038] The recognition module is configured to recognize railway knowledge entities in the railway domain knowledge base by using the trained railway knowledge entity recognition model.

[0039] The extraction module is configured to extract the relationship of the recognized railway knowledge entities from the railway domain knowledge text, and represent the recognized railway knowledge entities and the relationship in the form of triples.

[0040] The construction module is configured to fuse and save the triples to a graph database, and construct a railway domain knowledge graph.

[0041] Compared with the prior art, the railway domain knowledge graph construction method and device provided in the embodiments of the present application have the following advantages:

[0042] By preprocessing the railway domain knowledge text, the present application can clean and standardize the text data, and improve the accuracy of subsequent entity recognition and relationship extraction.

[0043] By training the railway knowledge entity recognition model, the present application can automatically recognize the entities in the railway domain, reduce the workload of manual annotation, and improve the efficiency and accuracy of entity recognition.

[0044] By analyzing the characteristics of the railway knowledge entities, the present application can understand the types and attribute characteristics of the entities, and provide a basis for subsequent knowledge graph construction and application.

[0045] By using the relationship extraction technology, the present application can extract the relationship between entities from the railway knowledge text, help establish the connection between entities, and form the edges of the knowledge graph.

[0046] The present application represents the extracted railway knowledge entities and relationships in the form of triples, and saves them to a graph database, so as to construct a railway domain knowledge graph, provide efficient storage and query capabilities, and support complex knowledge graph query and reasoning.

[0047] In summary, the present application can improve the processing and management efficiency of railway domain knowledge, realize automatic railway knowledge entity recognition and relationship extraction, construct a structured railway domain knowledge graph, and provide strong support for railway domain application and decision-making. BRIEF DESCRIPTION OF DRAWINGS

[0048] Figure 1 is a flow structure diagram of the railway domain knowledge graph construction method in the embodiments of the present application;

[0049] Figure 2 is a composition diagram of the railway domain knowledge graph construction device in the embodiments of the present application. DETAILED DESCRIPTION

[0050] The specific embodiments of the present application will be further described in conjunction with the drawings and examples. The following examples are used to illustrate the present application, but are not used to limit the scope of the present application.

[0051] In the description of the present application, it needs to be understood that the terms "center", "upper", "lower", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer" and the like indicate the orientation or positional relationship shown in the drawings, and are only for the purpose of facilitating the description of the present application and simplifying the description, and do not indicate or imply that the platform or element referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation on the present application.

[0052] The terms "first", "second" are only for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the technical features indicated. Therefore, the features defined with "first", "second" can explicitly or implicitly include one or more of the features. In the description of the present application, unless otherwise specified, the meaning of "a plurality of" is two or more.

[0053] In the description of the present application, it needs to be explained that, unless otherwise explicitly specified and limited, the terms "mounting", "connecting", "connection" should be understood broadly, for example, it can be fixed connection, or detachable connection, or integrally connected; it can be mechanical connection, or electrical connection; it can be directly connected, or indirectly connected through intermediate medium, or the communication inside two elements. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.

[0054] As Figure 1 As shown in the embodiments of the present application, a railway field knowledge graph construction method is provided, comprising: S100: acquiring railway field knowledge text, and preprocessing the railway field knowledge text; S200: selecting railway knowledge from the preprocessed railway field knowledge text, and screening railway knowledge entities from the railway knowledge; S300: analyzing the characteristics of the railway knowledge entities, constructing and training a railway knowledge entity recognition model based on the railway knowledge entities and characteristics; S400: identifying the railway knowledge entities in the railway field knowledge base through the trained railway knowledge entity recognition model; S500: extracting the relationship of the corresponding railway knowledge entities from the railway field knowledge text, and representing the identified railway knowledge entities and their relationship in triples; S600: merging and saving the triples to a graph database, and constructing a railway field knowledge graph.

[0055] Specifically, knowledge texts in the railway field are collected from various sources (such as official websites of railways, railway regulations and systems, news reports, etc.); the obtained knowledge texts in the railway field are preprocessed, including word segmentation, removal of stop words, part-of-speech tagging and syntax analysis, so as to facilitate subsequent entity recognition and relation extraction; from the preprocessed knowledge texts in the railway field, according to the characteristics and needs of the domain knowledge, knowledge related to the railway is selected, the railway knowledge text is subjected to entity recognition, and the railway knowledge entity is recognized; the recognized railway knowledge entity is subjected to feature analysis, facilitating the construction and training of the subsequent entity recognition model; based on the features of the railway knowledge entity, an entity recognition model is constructed using machine learning or deep learning methods, and the preprocessed railway field knowledge text is used for model training; the trained railway knowledge entity recognition model is used to recognize the railway knowledge entity in the text in the railway field knowledge base; based on the recognized railway knowledge entity, a relation extraction method is used to extract the relationship between entities from the preprocessed railway field knowledge text, and the relationship is represented in the form of a triple; the extracted triple information is fused and saved to a graph database, and a knowledge graph in the railway field is constructed, a suitable graph database (such as Neo4j, Amazon Neptune, etc.) is selected, and the triple data is imported into the graph database to support the storage, query and reasoning of knowledge.

[0056] Further, the present application can improve the processing and management efficiency of the railway field knowledge, realize automatic railway knowledge entity recognition and relation extraction, and construct a structured railway field knowledge graph, which provides strong support for railway field applications and decision-making.

[0057] In the embodiments of the present application, a railway field knowledge graph construction method is provided, which comprises: obtaining railway field knowledge texts, preprocessing the railway field knowledge texts, including: obtaining railway field knowledge data on the network, processing the railway field knowledge data into text form of pure words by a multi-modal data processing method to obtain railway field knowledge texts; preprocessing the railway field knowledge texts, the preprocessing including word segmentation, removal of stop words, part-of-speech tagging and syntax analysis.

[0058] Specifically, a web crawler program is written to capture knowledge data in the railway field according to relevant websites or data sources in the railway field. Libraries such as Beautiful Soup or Scrapy in Python programming language can be used to realize the function of web crawler. If the acquired knowledge data in the railway field contains multiple media types (such as text, pictures, audio, video, etc.), it needs to be processed into text form of pure text. For picture, audio and video data, corresponding processing methods such as image recognition, audio to text technology can be used to convert them into text form. The acquired knowledge text in the railway field is preprocessed, including the following steps: word segmentation: the text is segmented into a sequence of words, and Chinese word segmentation tools such as jieba or English word segmentation tools such as NLTK or spaCy can be used; stop word removal: remove common meaningless words such as "de", "le", "shi", etc. A predefined stop word list or a stop word list customized according to the characteristics of a specific field can be used; part-of-speech tagging: add part-of-speech tags to each word, and use part-of-speech tagging tools such as NLTK or spaCy to associate each word with the corresponding part of speech; syntax analysis: syntax analysis is performed on the text to analyze the structure and relationship between the components of the sentence. Syntax analysis tools such as Stanford Parser or spaCy can be used to generate syntax trees or dependency relationship graphs.

[0059] In the embodiments of the present application, a railway field knowledge graph construction method is provided, which selects railway knowledge from preprocessed railway field knowledge text and filters railway knowledge entities from the railway knowledge, including: dividing the preprocessed railway field knowledge text into multiple sentences, and selecting noun phrases, verbs and verb phrases from the sentences as candidate terms; using a railway field keyword list to match each of the candidate terms with keywords, selecting candidate terms that reach a preset matching degree, and locating the sentences where the candidate terms that reach the preset matching degree are located, and taking them as railway knowledge; scoring and evaluating the words, phrases and phrases in the railway knowledge by railway field experts, and selecting words, phrases and phrases with evaluation scores exceeding a preset score to obtain railway knowledge entities.

[0060] Specifically, the pre-processed railway domain knowledge text is divided into multiple sentences using a sentence segmentation tool (such as NLTK or spaCy); from each sentence, noun phrases, verbs, and verb phrases are selected as candidate terms, the part-of-speech of each word can be tagged using a part-of-speech tagging tool (such as NLTK or spaCy), and candidate terms are selected according to pre-defined part-of-speech rules; using a keyword list in the railway domain, each candidate term is matched with the keyword list, a string matching algorithm (such as regular expressions or string similarity-based algorithms) can be used to match the candidate term with the keyword list; according to a pre-set matching degree threshold, candidate terms with a matching degree reaching the pre-set threshold are selected, which can be filtered according to the matching degree calculation method and threshold; the sentence containing the candidate term reaching the pre-set matching degree is recorded as railway knowledge, and the position information of the sentence is recorded for subsequent evaluation and screening; the words, phrases, and phrases in the railway knowledge are scored and evaluated by railway domain experts, and the words, phrases, and phrases with scores exceeding the pre-set score are selected according to the expert scoring results.

[0061] In an embodiment of the present application, a railway domain knowledge graph construction method is provided, which analyzes the characteristics of the railway knowledge entity, and constructs and trains a railway knowledge entity recognition model based on the railway knowledge entity and characteristics, including: obtaining multi-dimensional features of the railway knowledge entity, and evaluating and analyzing the multi-dimensional features to select features meeting the requirements; constructing a railway knowledge entity recognition model based on the railway knowledge entity and its characteristics; taking the railway knowledge entity and its characteristics as model training data, training the railway knowledge entity recognition model until the railway knowledge entity recognition model meets the pre-set requirements.

[0062] Specifically, for each railway knowledge entity, multi-dimensional features are extracted from the text, which can include lexical features (such as word frequency, part-of-speech), syntactic features (such as syntactic tree structure, dependency relations), contextual features (such as contextual words, sentence position), semantic features (such as word vector representation), etc.; the obtained multi-dimensional features are evaluated and analyzed, statistical methods, machine learning methods or domain expert knowledge can be used to evaluate the importance and discriminability of each feature, and according to the evaluation results, features meeting the requirements are selected for subsequent model construction; a suitable machine learning algorithm (such as support vector machine, random forest, deep learning model, etc.) is selected to construct a railway knowledge entity recognition model, and according to the selected algorithm, a suitable model architecture and parameter setting are designed; the obtained railway knowledge entity and its characteristics are taken as training data to train the railway knowledge entity recognition model, the training data includes labeled railway knowledge entity samples and corresponding features, and through iterative training process, the model parameters are constantly adjusted until the model meets the pre-set requirements.

[0063] In the embodiments of the present application, a railway domain knowledge graph construction method is provided, which extracts and identifies the relationship between corresponding railway knowledge entities from the railway domain knowledge text, and represents the identified railway knowledge entities and their relationship in triples, including: calculating the cosine similarity between two railway knowledge entities in turn, and selecting two railway knowledge entities with a cosine similarity greater than a preset value as an entity pair; calculating the distance between the two railway knowledge entities in the entity pair, and screening out the entity pairs with a distance within a preset range; taking the entity pair as a clustering center, calculating the cosine similarity between each verb or verb phrase around the clustering center and the clustering center; according to the cosine similarity, merging each verb or verb phrase and the clustering center, and recalculating a new clustering center; calculating the difference between the new clustering center and the clustering center, and taking the verb or verb phrase with a difference less than a preset difference threshold as an extraction result to obtain the relationship between railway knowledge entities; and representing the identified railway knowledge entities and their relationship in triples.

[0064] Specifically, for each pair of railway knowledge entities, the cosine similarity between them is calculated, which can be represented by a word vector (such as Word2Vec, GloVe, etc.) to represent the entities, and then the cosine similarity between them is calculated; screening out the entity pairs with a cosine similarity greater than a preset value as the matched entity pairs; calculating the distance between the two entities in the selected entity pair, and screening out the entity pairs with a distance within a preset range; taking the selected entity pair as a clustering center, calculating the cosine similarity between each verb or verb phrase and the clustering center; according to the cosine similarity, merging the verb or verb phrase with a similarity higher than a preset threshold with the clustering center, and recalculating a new clustering center; calculating the difference between the new clustering center and the original clustering center, and taking the verb or verb phrase with a difference less than a preset difference threshold as an extraction result to represent the relationship between railway knowledge entities; and representing the identified railway knowledge entities and relationship as triples, wherein the subject is an entity, the predicate is a verb or verb phrase representing the relationship, and the object is another entity.

[0065] In the embodiments of the present application, a railway domain knowledge graph construction method is provided, which represents the identified railway knowledge entities and their relationship in triples, including: matching the identified railway knowledge entities and their relationship with each other, and composing a plurality of triples in the form of subject-predicate-object after successful matching.

[0066] In the embodiment of the present application, a railway domain knowledge graph construction method is provided, which fuses and saves the triplets to a graph database, constructs a railway domain knowledge graph, and includes: analyzing the number scale of the railway knowledge entities and their relationships, selecting the type of the graph database according to the number scale of the railway knowledge entities and their relationships; in the graph database, taking the railway knowledge entities as nodes and the relationships of the railway knowledge entities as edges, constructing a graph database graph schema; according to the graph schema, fusing and saving the triplets to the graph database, and constructing a railway domain knowledge graph.

[0067] Specifically, the number scale of the railway knowledge entities and their relationships is analyzed, which can be completed by counting the number of entities and relationships in the preprocessed text, so as to select a suitable graph database type, such as Neo4j, JanusGraph, etc., a graph computing engine, such as Apache Giraph, Apache Flink, etc.; in the selected graph database, a graph schema is defined, which specifies the types of entities and relationships and their connection methods, according to the knowledge structure and relationships of the railway domain, a suitable graph schema is designed, for example, the entity type can be defined as “railway station”, “railway line”, etc., and the relationship type can be defined as “connection”, “passing through”, etc.; according to the graph schema, the previously extracted triplets are fused and stored in the selected graph database, the railway knowledge entities are taken as nodes, the relationships between the railway knowledge entities are taken as edges, and the graph database graph is constructed, each entity and relationship has appropriate attributes and identifiers, and can be queried and analyzed in the graph database; by fusing and storing the triplets, a railway domain knowledge graph is constructed, providing a structured and queryable knowledge base for storing and retrieving knowledge in the railway domain.

[0068] As shown in Figure 2 In the embodiment of the present application, a railway domain knowledge graph construction device is provided, which includes: an acquisition module for acquiring railway domain knowledge text and preprocessing the railway domain knowledge text; a screening module for selecting railway knowledge from the preprocessed railway domain knowledge text and screening railway knowledge entities from the railway knowledge; a modeling module for analyzing the characteristics of the railway knowledge entities, constructing and training a railway knowledge entity recognition model based on the railway knowledge entities and characteristics; a recognition module for recognizing railway knowledge entities in a railway domain knowledge base through the trained railway knowledge entity recognition model; an extraction module for extracting relationships corresponding to the recognized railway knowledge entities from the railway domain knowledge text, and representing the recognized railway knowledge entities and their relationships in triplets; a construction module for fusing and saving the triplets to a graph database, and constructing a railway domain knowledge graph.

[0069] In summary, the embodiment of the present application provides a railway domain knowledge graph construction method and device, which comprises: acquiring railway domain knowledge text, preprocessing the same, selecting railway knowledge from the preprocessed railway domain knowledge text, screening out railway knowledge entities, analyzing the characteristics of the railway knowledge entities, constructing and training a railway knowledge entity recognition model based on the railway knowledge entities and their characteristics, identifying the railway knowledge entities in the railway domain knowledge base through the model, extracting the corresponding relationship of the railway knowledge entities from the railway domain knowledge text, expressing the identified railway knowledge entities and their relationship in triples, fusing and saving the triples to a graph database, and constructing a railway domain knowledge graph; the present application can improve the processing and management efficiency of railway domain knowledge, realize automatic railway knowledge entity recognition and relationship extraction, and construct a structured railway domain knowledge graph, thereby providing strong support for railway domain application and decision-making.

[0070] Finally, it should be noted that: obviously, those skilled in the art can make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application also intends to include these modifications and variations.

[0071] The above is only one embodiment of the present application, but cannot limit the scope of the present application, and any structural changes made according to the present application should be considered to fall within the scope of the present application and be restricted. Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working process of the platform and the related description described above can refer to the corresponding process in the foregoing platform embodiment, which will not be described here.

[0072] The term "comprises" or any other similar term is intended to cover non-exclusive inclusion, so that the process, platform, article or device / platform including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or includes the elements inherent to the process, platform, article or device / platform.

[0073] So far, the technical solutions of the present application have been described in combination with the further embodiments shown in the drawings, but those skilled in the art can easily understand that the protection scope of the present application is obviously not limited to these specific embodiments. Those skilled in the art can make equivalent changes or replacements to the related technical features without departing from the principles of the present application, and the technical solutions after these changes or replacements will fall within the protection scope of the present application.

[0074] The above is only a preferred embodiment of the present application, and is not intended to limit the protection scope of the present application.

Claims

1. A method for constructing a knowledge graph in the railway field, characterized in that, include: Obtain railway-related knowledge text and preprocess the railway-related knowledge text; Railway knowledge is selected from preprocessed railway domain knowledge text, and railway knowledge entities are filtered out from the railway knowledge. Analyze the characteristics of the railway knowledge entities, and construct and train a railway knowledge entity recognition model based on the railway knowledge entities and their characteristics; The trained railway knowledge entity recognition model is used to identify railway knowledge entities in the railway domain knowledge base. The relationships between corresponding railway knowledge entities are extracted and identified from the railway domain knowledge text, and the identified railway knowledge entities and their relationships are represented by triples. The triples are merged and stored in the graph database to construct a knowledge graph for the railway field. The step of extracting and identifying the relationships of corresponding railway knowledge entities from the railway domain knowledge text, and representing the identified railway knowledge entities and their relationships using triples, includes: The cosine similarity between two railway knowledge entities is calculated sequentially, and two railway knowledge entities with a cosine similarity greater than a preset value are selected for matching as entity pairs. Calculate the distance between the two railway knowledge entities in the entity pair, and filter out entity pairs where the distance between the two railway knowledge entities is within a preset range; Using the entity pair as the cluster center, calculate the cosine similarity between each verb or verb phrase surrounding the entity pair and the cluster center; Based on the cosine similarity, each verb or verb phrase is merged with the cluster center, and a new cluster center is recalculated; Calculate the difference between the new cluster center and the existing cluster center, and use verbs or verb phrases with a difference less than a preset difference threshold as the extraction results to obtain the relationships of railway knowledge entities; The identified railway knowledge entities and their relationships are represented by triples.

2. The method for constructing a knowledge graph in the railway field according to claim 1, characterized in that, The process of acquiring railway-related knowledge text and preprocessing the railway-related knowledge text includes: Railway-related knowledge data is obtained from the internet, and then processed into plain text using a multimodal data processing method to obtain railway-related knowledge text. The railway-related knowledge text is preprocessed, including word segmentation, stop word removal, part-of-speech tagging, and syntactic analysis.

3. The method for constructing a knowledge graph in the railway field according to claim 1, characterized in that, The step of selecting railway knowledge from preprocessed railway domain knowledge text and filtering railway knowledge entities from the railway knowledge includes: The preprocessed railway domain knowledge text is divided into multiple sentences, and noun phrases, verbs, and verb phrases are selected as candidate terms from the sentences. The railway field keyword list is used to perform keyword matching on each candidate term. Candidate terms that achieve a preset matching degree are selected, and the sentences containing the candidate terms that achieve a preset matching degree are located and used as railway knowledge. By having railway experts score and evaluate the words, phrases, and sentences in railway knowledge, words, phrases and sentences that exceed the preset scores are selected to obtain railway knowledge entities.

4. The method for constructing a knowledge graph in the railway field according to claim 1, characterized in that, The analysis of the characteristics of the railway knowledge entities, and the construction and training of a railway knowledge entity recognition model based on the railway knowledge entities and their characteristics, includes: The multidimensional features of the railway knowledge entity are obtained, and the multidimensional features are evaluated and analyzed to select the features that meet the requirements. A railway knowledge entity recognition model is constructed based on the aforementioned railway knowledge entities and their characteristics. The railway knowledge entities and their features are used as model training data to train the railway knowledge entity recognition model until the railway knowledge entity recognition model meets the preset requirements.

5. The method for constructing a knowledge graph in the railway field according to claim 1, characterized in that, The identification of railway knowledge entities and their relationships is represented by triples, including: The identified railway knowledge entities and their relationships are matched with each other, and after a successful match, multiple triplets are formed in the form of subject-predicate-object.

6. The method for constructing a knowledge graph in the railway field according to claim 1, characterized in that, The process of fusing and storing the triples in the graph database to construct a knowledge graph for the railway domain includes: Analyze the quantity and scale of the railway knowledge entities and their relationships, and select the type of graph database based on the quantity and scale of the railway knowledge entities and their relationships; In the graph database, the railway knowledge entities are used as nodes, and the relationships between the railway knowledge entities are used as edges to construct the graph pattern of the graph database; The triples are merged according to the graph pattern and saved to the graph database to construct a knowledge graph for the railway field.

7. A knowledge graph construction device in the railway field, characterized in that, include: The acquisition module is used to acquire railway-related knowledge text and preprocess the railway-related knowledge text. The filtering module is used to select railway knowledge from preprocessed railway domain knowledge text and filter out railway knowledge entities from the railway knowledge. The modeling module is used to analyze the characteristics of the railway knowledge entities, and to construct and train a railway knowledge entity recognition model based on the railway knowledge entities and their characteristics. The identification module is used to identify railway knowledge entities in the railway domain knowledge base using a trained railway knowledge entity identification model. The extraction module is used to extract and identify the relationships of corresponding railway knowledge entities from the railway domain knowledge text, and to represent the identified railway knowledge entities and their relationships using triples. A construction module is used to integrate and save the triples to the graph database to build a knowledge graph in the railway field; The step of extracting and identifying the relationships of corresponding railway knowledge entities from the railway domain knowledge text, and representing the identified railway knowledge entities and their relationships using triples, includes: The cosine similarity between two railway knowledge entities is calculated sequentially, and two railway knowledge entities with a cosine similarity greater than a preset value are selected for matching as entity pairs. Calculate the distance between the two railway knowledge entities in the entity pair, and filter out entity pairs where the distance between the two railway knowledge entities is within a preset range; Using the entity pair as the cluster center, calculate the cosine similarity between each verb or verb phrase surrounding the entity pair and the cluster center; Based on the cosine similarity, each verb or verb phrase is merged with the cluster center, and a new cluster center is recalculated; Calculate the difference between the new cluster center and the existing cluster center, and use verbs or verb phrases with a difference less than a preset difference threshold as the extraction results to obtain the relationships of railway knowledge entities; The identified railway knowledge entities and their relationships are represented by triples.

Citation Information

Patent Citations

  • A semi-automatic knowledge map construction method

    CN109522418A

  • Data processing method based on knowledge graph

    CN117973519A