Equipment field knowledge graph construction method, retrieval method, system and electronic device

By constructing a knowledge graph for the equipment field, utilizing web crawling technology and advanced models for data extraction and storage, and combining node matching and query expansion retrieval strategies, the problem of organizing and retrieving unstructured data in the equipment field has been solved, achieving efficient and intelligent information management and retrieval.

CN116523041BActive Publication Date: 2026-05-08BEIJING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING UNIV OF POSTS & TELECOMM
Filing Date
2023-05-06
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

A large amount of unstructured data has accumulated in the equipment field, and existing technologies are unable to organize and retrieve it efficiently, making it difficult for relevant personnel to obtain key information in a timely manner.

Method used

A knowledge graph for the equipment domain is constructed. Raw data is obtained through web crawling technology. Top-down and bottom-up modeling are performed. Entities and relations are extracted by combining the Seq-to-Seq framework and the RoBERTa model. The data is stored in the Neo4j database, and information retrieval strategies based on node matching and query expansion are used for retrieval.

Benefits of technology

It enables efficient management and intelligent retrieval of knowledge in the equipment field, provides excellent data processing and semantic association capabilities, and improves the efficiency and accuracy of information acquisition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116523041B_ABST
    Figure CN116523041B_ABST
Patent Text Reader

Abstract

The application discloses an equipment field knowledge graph construction method, a retrieval method, a system and electronic equipment, and relates to the technical field of knowledge graphs.The equipment field knowledge graph construction method comprises the following steps: constructing an equipment field ontology based on an equipment field original data set; based on the equipment field original data set and the equipment field ontology, combining entity and relation extraction into an integrated information extraction task for processing, and outputting triple data in an end-to-end manner; and constructing an equipment field knowledge graph according to the triple data.The application can establish a corresponding equipment knowledge system, combine knowledge extraction, information retrieval and other technologies, and provide more intelligent and personalized services to promote the digitization and visualization development of the equipment field.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of knowledge graph technology, and in particular to a method for constructing, retrieving, system for, and electronic equipment for knowledge graphs in the field of equipment. Background Technology

[0002] Knowledge graphs are a technology that organizes entities, concepts, and relationships into a structured knowledge network. By integrating and representing heterogeneous knowledge from multiple sources, they enable machines to understand and reason about human knowledge, thereby achieving applications in artificial intelligence fields such as semantic understanding, natural language processing, and question answering. The construction of knowledge graphs requires addressing issues such as the extraction and storage of multi-source knowledge, while also considering the consistency, completeness, and reliability of the knowledge.

[0003] Domain knowledge graphs are applications of knowledge graphs in specific domains, aiming to construct a graph rich in knowledge and semantic relationships within that domain to support various intelligent applications. The construction of domain knowledge graphs involves technologies such as knowledge extraction and knowledge storage. Knowledge extraction refers to extracting domain-related entities and relationships from unstructured data, while knowledge storage refers to persistently storing knowledge extracted from different data sources in a unified knowledge graph format. Domain knowledge graph retrieval requires combining semantic matching, path search, and other technologies to quickly and accurately retrieve relevant entities and knowledge from the graph, providing users with precise answers and services. In domain knowledge graphs, due to the various complex relationships between entities, traditional keyword-based retrieval methods are no longer sufficient. Therefore, the research and application of domain knowledge graph retrieval are of great significance for promoting the intelligent development of various domains.

[0004] The equipment field has accumulated a large amount of unstructured data, which contains a wealth of useful information. However, the existing equipment data is organized in a disorganized manner, stored in various databases and websites. When faced with this massive amount of equipment information, personnel in related fields often need to spend a lot of time and energy studying the data, making it difficult to obtain key information in a timely manner. Summary of the Invention

[0005] The purpose of this invention is to provide a method, retrieval method, system, and electronic device for constructing a knowledge graph in the field of equipment. By establishing a corresponding equipment knowledge system and combining technologies such as knowledge extraction and information retrieval, it provides more intelligent and personalized services to promote the digital and visual development of the equipment field.

[0006] To achieve the above objectives, the present invention provides the following solution:

[0007] In a first aspect, the present invention provides a method for constructing a knowledge graph in the field of equipment, comprising:

[0008] Constructing original datasets in the equipment field;

[0009] Based on the original dataset in the equipment domain, construct an ontology for the equipment domain;

[0010] Based on the original dataset and ontology of the equipment domain, entity and relation extraction are combined into a whole information extraction task and output triple data in an end-to-end manner.

[0011] Based on the triplet data, a knowledge graph for the equipment domain is constructed.

[0012] Secondly, the present invention provides a retrieval method based on a knowledge graph in the equipment field, comprising:

[0013] Based on the search keywords, and using an information retrieval strategy that combines node matching and query expansion, information is retrieved from the equipment domain knowledge graph identified in the first aspect. Node matching refers to determining whether the search keywords can be mapped to entities in the equipment domain knowledge graph. Query expansion refers to organically expanding the entities in the equipment domain knowledge graph to find entities similar to the search keywords.

[0014] Thirdly, the present invention provides a knowledge graph construction system for the equipment field, comprising:

[0015] The dataset building module is used to build raw datasets for the equipment field;

[0016] The Equipment Domain Ontology Construction Module is used to construct equipment domain ontology based on the original equipment domain dataset.

[0017] The triplet data extraction module is used to combine entity and relation extraction into a whole information extraction task based on the original dataset and ontology of the equipment domain, and output triplet data in an end-to-end manner.

[0018] The Equipment Domain Knowledge Graph Construction Module is used to construct an equipment domain knowledge graph based on triple data.

[0019] Fourthly, the present invention provides a retrieval system based on a knowledge graph in the equipment field, comprising:

[0020] The information retrieval module is used to retrieve information from the equipment domain knowledge graph determined in the first aspect based on the information retrieval strategy of node matching and query expansion, according to the search keywords. The node matching refers to the determination of whether the search keywords can be mapped to entities in the equipment domain knowledge graph. The query expansion refers to the organic expansion of entities in the equipment domain knowledge graph to find entities similar to the search keywords.

[0021] Fifthly, the present invention provides an electronic device, including a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to cause the electronic device to perform a method for constructing an equipment domain knowledge graph according to the first aspect.

[0022] In a sixth aspect, the present invention provides an electronic device, including a memory and a processor, the memory being used to store a computer program, and the processor running the computer program to cause the electronic device to perform a retrieval method based on an equipment domain knowledge graph as described in the second aspect.

[0023] According to specific embodiments provided by the present invention, the present invention discloses the following technical effects:

[0024] This invention realizes a complete domain knowledge graph application process from file parsing, ontology modeling, knowledge extraction, graph construction and information retrieval. It has excellent data processing and semantic association capabilities, and can also provide excellent data visualization functions. Attached Figure Description

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

[0026] Figure 1 A flowchart illustrating the method for constructing a knowledge graph in the equipment field provided in an embodiment of the present invention;

[0027] Figure 2 A schematic flowchart illustrating the retrieval method based on equipment domain knowledge graph provided in an embodiment of the present invention;

[0028] Figure 3 A flowchart illustrating the automated construction and retrieval method for knowledge graphs in the equipment field provided in this embodiment of the invention;

[0029] Figure 4 A flowchart for constructing an equipment ontology as provided in this embodiment of the invention;

[0030] Figure 5 The structure diagram of the joint extraction algorithm for equipment domain knowledge provided in the embodiments of the present invention;

[0031] Figure 6 A flowchart for constructing a knowledge graph in the equipment field provided in this embodiment of the invention;

[0032] Figure 7This is a structural diagram of an information retrieval strategy based on node matching and query expansion provided in an embodiment of the present invention;

[0033] Figure 8 A flowchart of knowledge retrieval based on domain knowledge graphs provided in this embodiment of the invention;

[0034] Figure 9 This is an overall architecture diagram of the domain knowledge graph construction and retrieval system provided in an embodiment of the present invention. Detailed Implementation

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

[0036] This invention provides a method, retrieval method, system, and electronic device for constructing a knowledge graph in the equipment domain. The main components include: visual management and export of the domain graph schema layer ontology; format verification, cleaning, format conversion, and storage of uploaded text information; extraction of triples from the processed text information based on an end-to-end knowledge extraction framework; merging the extracted triples into the knowledge graph and storing them using persistent methods; and retrieving knowledge graph nodes and path information stored in the system based on a node matching and query expansion information retrieval strategy. This invention uses a knowledge graph as an information management tool, visually demonstrating the relationships between different equipment entities, thus providing a more efficient data management solution for the intelligent construction of the equipment domain.

[0037] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0038] Example 1

[0039] like Figure 1 As shown in this embodiment, a method for constructing a knowledge graph in the equipment domain includes:

[0040] Step 101: Construct the original dataset in the equipment domain to provide data input for the knowledge extraction algorithm.

[0041] In this embodiment, step 101 specifically includes: using web crawling technology to crawl webpage data of professional weapons and equipment, and saving the crawled data as a JSON format file to build an original dataset in the field of equipment.

[0042] The detailed process of the above steps is as follows:

[0043] (1) Use web crawling technology to crawl web page data of professional weapons and equipment, collect professional equipment text data. The data acquisition process includes: obtaining equipment level information, determining the initial link queue, traversing the link queue, analyzing the page structure and using regular expressions to parse the brief introduction and description of the equipment, and saving the candidate equipment data set.

[0044] (2) Cleaning unstructured text data, the data cleaning includes: filtering duplicate data, unifying data format and description information, and eliminating meaningless noise characters.

[0045] Step 102: Based on the original dataset of the equipment domain, construct the equipment domain ontology, that is, design the equipment domain ontology based on the constructed original dataset of the equipment domain to provide schema layer information for entity relation extraction.

[0046] In this embodiment, step 102 specifically includes: constructing an equipment domain ontology using a top-down ontology modeling scheme and a bottom-up ontology modeling scheme.

[0047] The top-down ontology modeling scheme leverages prior knowledge of the equipment industry to design a schema-layer ontology for the equipment domain. Data from the original equipment domain dataset is then extracted from the schema-layer ontology in a top-down manner to construct the equipment domain ontology. In other words, by leveraging prior knowledge of the equipment industry, a schema-layer ontology is designed, and the collected entity relationship data is cleaned and populated into the data layer according to the defined schema, ultimately forming a high-quality knowledge graph.

[0048] Bottom-up ontology modeling approach: Organize, clean, and extract ontology of the equipment domain from the original dataset of the equipment domain to achieve ontology modeling of the equipment domain. That is, organize, clean, extract entity relations, and perform a series of operations on the collected text to obtain triple data. Then, summarize and generalize the data to gradually abstract concepts from the bottom up and design a knowledge base ontology model.

[0049] Step 103: Based on the original dataset and ontology of the equipment domain, entity and relation extraction are merged into a whole information extraction task and the triple data is output in an end-to-end manner.

[0050] In the embodiment, step 103 specifically includes: based on the original dataset of the equipment domain and the equipment domain ontology, using a knowledge joint extraction algorithm based on the Seq-to-Seq framework and the RoBERTa model, entity and relation extraction are merged into a whole information extraction task for processing, and triple data is output in an end-to-end manner.

[0051] The detailed process of the above steps is as follows:

[0052] (1) The original sentence is output as a sequence of encoded vectors of equal length by the improved bidirectional encoder representation model. The vector sequence is composed of the word vector of the word, the text vector of the sentence in which the word is located, and the position vector of the word in the sentence.

[0053] (2) The output encoded vector sequence is passed through a normalization layer for identification and labeling of the main entity. The normalization layer consists of two binary classifiers and is implemented using a half-pointer-half-label activation function to obtain an encoded vector with the semantic space features of the main entity.

[0054] (3) The encoding vector with the semantic space features of the main entity is concatenated with the original encoding vector, and the main entity encoding vector is used as a condition to be input into the conditional standardization layer. Based on the relationship and attribute information in the constructed equipment domain ontology, the head pointer and tail pointer vector representations of the corresponding object entity are predicted using the same half-pointer-half-label structure.

[0055] Step 104: Construct a knowledge graph for the equipment domain based on the triplet data.

[0056] In this embodiment, step 104 specifically includes: using Cypher syntax to map the entities and relations in the triplet data to nodes and edges in the graph, and importing the constructed equipment domain knowledge graph into the Neo4j graph database for storage.

[0057] Example 2

[0058] like Figure 2 As shown, this embodiment provides an information retrieval method based on a domain knowledge graph, including:

[0059] Step 201: Based on the search keywords, and using the information retrieval strategy of node matching and query expansion, perform information retrieval on the equipment domain knowledge graph determined in Example 1. Node matching refers to determining whether the search keywords can be mapped to entities in the equipment domain knowledge graph, solving the problem of incomplete user expression from a semantic perspective and improving retrieval accuracy. Query expansion refers to organically expanding the entities in the equipment domain knowledge graph, finding entities similar to the search keywords, fully utilizing the connections between knowledge in the equipment graph, expanding the retrieval scope to return more triple results, and improving retrieval recall.

[0060] The node matching method includes:

[0061] This embodiment proposes a scheme based on constructing a strongly connected synonym graph in the equipment domain, adding subject-object entities with relationships such as codes, aliases, and translations to the connected graph. Based on this, relationships between words with low literal similarity are identified and dynamically updated according to user input.

[0062] This embodiment constructs an inverted index based on entity name attributes, which can quickly locate entity names containing search terms when matching nodes. At the same time, the index can be used for pruning to optimize the efficiency of node and path queries.

[0063] After identifying the matching node, the candidate entity set for subsequent queries is reduced by using the ontology type information of the corresponding entity, thereby reducing the workload of semantic comparison.

[0064] The query expansion methods include two approaches: one based on graph structure and the other based on semantic matching.

[0065] The graph-based query expansion refers to acquiring neighboring nodes within one node of a matching node in the equipment domain knowledge graph, and using attribute and relationship information to make the retrieval more comprehensive and complete. The semantic matching-based query expansion refers to the process of expanding keyword retrieval by leveraging the semantic differences between two words, and using algorithms such as Jaccard coefficient, attribute similarity, and edit distance to calculate semantic matching scores.

[0066] Example 3

[0067] This embodiment provides a method for automated construction and retrieval of knowledge graphs in the equipment field. Figure 3 The overall process of the automated construction and retrieval method for knowledge graphs in the equipment field is specifically demonstrated, including:

[0068] S1. Dataset Construction: This embodiment uses equipment domain knowledge as an example to illustrate how to construct a dataset; specifically, it includes:

[0069] Due to the sensitivity and confidentiality of the equipment field, there are currently no publicly available, relatively complete datasets in this area, and related information is scarce. This embodiment selected weapon and equipment websites with high levels of structure, credibility, and comprehensiveness of information, such as weapon encyclopedias and Global Military Network, based on research.

[0070] This embodiment employs web crawling technology to extract web page data on the aforementioned specialized weaponry and equipment, using it as a crucial data source for constructing a knowledge graph for the equipment domain. In terms of data crawling, the website's homepage URL is first parsed to obtain weapon category information, and an initial URL queue is determined from this queue. Subsequently, this queue is traversed to retrieve links to all equipment nodes. Finally, data is extracted from the URL corresponding to each data link. Through analysis of the page structure and the use of tools such as regular expressions, brief descriptions of the weaponry and equipment are extracted and saved as JSON files to establish the original dataset for the equipment domain.

[0071] S2. Ontology Modeling: This involves designing the ontology of the equipment. The specific process is as follows: Figure 4 As shown, it can be divided into seven steps; specifically including:

[0072] First, the research field and content are determined. This embodiment takes the equipment field as an example, and the research task is clearly refined into a scheme for constructing a knowledge graph of the equipment field for users, thereby constructing a more appropriate ontology that can cover application needs.

[0073] Second, the domain ontology is reused. This embodiment, through extensive research into existing prior knowledge systems and related equipment domain information, and by drawing on the classification system of weapon encyclopedias, completes the hierarchical division of the equipment ontology, reducing time costs and ensuring the quality of the final ontology.

[0074] Third, list the core concepts and elements of the domain. This step requires listing the core concepts and elements in the domain. In this embodiment, core concepts are defined as the physical entities such as aircraft and missile weapons, and elements are defined as attributes such as range and maximum speed. The professional terms in the equipment domain knowledge graph are listed, and the specific classification system and attribute relationships will be refined in the following steps.

[0075] Fourth, establish a classification system. Integrate prior knowledge in the equipment domain and construct a hierarchical system for entity categories, ensuring the correct hierarchical relationships. Based on the hierarchical relationships between entities in the equipment domain, establish an ontology hierarchy and type structure from top to bottom.

[0076] Fifth, define ontology attributes and relationships. This step requires defining the attributes of each ontology in each category and establishing relationships between them and other ontologies. Taking a pistol as an example, its attributes include magazine capacity, firing performance, etc., which represent the characteristics of the equipment domain concept itself.

[0077] Sixth, define constraints on attributes and relationships. By restricting ontology attributes and relationships, the robustness and standardization of information can be ensured, and outliers can be avoided. For example, relationships such as country of origin and R&D unit of equipment should only be used to represent relevant concepts in the equipment field and should not be used in unrelated domain knowledge graphs. Standards should also be established for measurement attributes such as length, width, and height of equipment to ensure data consistency.

[0078] Seventh, ontology establishment and revision. In this embodiment, existing equipment industry information standards and encyclopedic hierarchical information are first summarized from top to bottom to form the underlying concepts of the domain. Then, according to the requirements of the knowledge graph construction process, ontology modeling of the equipment domain knowledge graph is realized. Finally, since the manually constructed ontology model is not complete, it needs to be improved and revised from bottom to top based on the high-frequency domain terms appearing in the dataset.

[0079] S3. Knowledge Extraction: This embodiment proposes a joint knowledge extraction algorithm based on the Seq-to-Seq framework and the RoBERTa model. The model structure is as follows: Figure 5 As shown; specifically including:

[0080] In this embodiment, the modeling approach for the decoder in the Seq-to-Seq model is used to merge the two subtasks of entity recognition and relation classification into a single end-to-end problem for processing. Furthermore, a probabilistic modeling formula for triple extraction is created within the entity-relation extraction model, as shown in the following equation:

[0081] P(s,p,o)=p(s)P(o|S)P(p|s,o)).

[0082] First, the sentence is input into the RoBERTa pre-trained language model. The word vectors, the text vectors of the sentences containing the words, and the word position vectors within the sentences are superimposed to enhance the contextual features and textual ambiguity of the input sentence. The original sentence sequence is output as a sequence of encoded vectors of equal length. Each corresponding output vector serves as its sparse representation in the semantic space, containing features of the current word and the entire input sentence.

[0083] The encoded vector sequence is then input into the LayerNormalization layer, which is the annotation layer for the main entities. This layer consists of two binary classifiers, each using a semi-pointer-semi-label structure implemented with a sigmoid activation function. Both classifiers detect whether the current character is the start or end position of the main entity; if so, the position is marked as 1, otherwise as 0. This step maps the semantic space to the required partition space of the main entities, thus obtaining the head pointer vector representation and tail pointer vector representation of the main entities in the input text.

[0084] This embodiment takes the entity "J-16 fighter jet" as an example. Using the head pointer and tail pointer of the main entity obtained in the previous step, the encoding vector with semantic space features of the main entity "J-16 fighter jet" is obtained from the encoding vector sequence output by the RoBERTa pre-trained model. Then, it is concatenated with the reused RoBERTa encoding vector sequence, and the encoding vector of the main entity is used as a condition to be input into the ConditionalLayerNormalization layer. The subsequent prediction process is similar to the process of extracting the main entity. For each relation information in the relation and attribute list of the constructed equipment domain ontology, a half-pointer-half-label structure is used to predict the head pointer and tail pointer vector representation of the corresponding object entity, thus completing the object entity indication and labeling the relation at the same time. Finally, the end-to-end joint extraction model merges the extracted object entity, main entity and relation into a set of triples and outputs them in the form of SPO. The final output triple list is [J-16 fighter jet, R&D unit, Shenyang Aircraft Corporation], [J-16 fighter jet, Country of origin, China].

[0085] This embodiment employs the RoBERTa knowledge extraction method based on the Seq-to-Seq framework. This method transforms the entity and relation extraction task into a combination of multiple binary classification tasks based on sequence labeling through a semi-pointer-semi-label sigmoid activation function. From the perspective of model transformation, the loss can be calculated using the binary cross-entropy loss function shown in the following formula during the training process of the knowledge extraction model.

[0086] loss=-ylogp-(1-y)log(1-p).

[0087] Here, y is the classification label used during entity extraction, and p represents the predicted probability that the model outputs a label of y. However, when using the sigmoid activation function to perform entity extraction, a class imbalance problem arises where the number of entities to be extracted is far less than the number of non-target entities. This embodiment proposes a loss function optimization method based on the power of the probability value, as shown in the following formula. This method makes the probability value closer to 0, bringing the initial probability state closer to the ideal situation and thus accelerating model convergence.

[0088] loss = -ylogp n -(1-y)log(1-p n ).

[0089] like Figure 6 As shown, the knowledge extraction described in this embodiment can be divided into two parts: an offline part and an online part.

[0090] The offline component includes the dataset acquisition, ontology modeling, knowledge extraction model training, model encapsulation, and knowledge extractor establishment mentioned above. The online component includes the file upload, data processing, entity relation extraction service, and triplet establishment mentioned above.

[0091] It should be noted that in this embodiment, the offline part of the system uses a hot-start scheme. The server loads the triple extraction model when it starts up, so that it can quickly process and return results when it receives knowledge extraction requests.

[0092] S4. Knowledge storage: Knowledge storage facilitates subsequent data management and retrieval. It requires persisting the acquired entity relationship data to a database for storage, specifically including:

[0093] The data to be saved in this embodiment mainly includes: original file information uploaded by users, file management information saved by the system, and triple information extracted through knowledge consortium. The first two types of data are stored on the server after data cleaning is completed, along with the structured path information. For the latter type of data, this embodiment uses Neo4j, a graph database with high query efficiency and a well-developed ecosystem, as the knowledge graph persistence tool. After obtaining the triple data, Cypher syntax is used to map entities and relations to nodes and edges in the graph, and the constructed equipment domain knowledge graph is imported into Neo4j for storage.

[0094] S5. Information retrieval Figure 7 The information retrieval strategy structure based on node matching and query expansion specifically includes:

[0095] Node matching refers to determining whether a search keyword can be mapped to an entity in the knowledge graph. This embodiment assumes that if the entity represented by the search keyword already exists in the existing equipment domain knowledge graph, then it can be matched with the entity in the graph. Conversely, if the search term cannot be matched with an entity name in the graph's index file, information retrieval is performed based on the query expansion strategy proposed later.

[0096] Query expansion refers to the organic expansion of entities to find similar entities, aiming to avoid retrieval failures due to improper user input. The key to query expansion in this embodiment lies in combining a graph-based query expansion method and a semantic matching-based query expansion method. By performing structural expansion and semantic matching score calculation on search terms and graph entities, the performance and retrieval results of the knowledge graph retrieval system can be effectively improved.

[0097] The semantic matching calculation method between search terms and graph entities specifically includes:

[0098] This embodiment combines the Jaccard coefficient with the edit distance to propose a method for calculating the semantic matching score between search terms and graph entities, as shown in the following formula.

[0099] Sim(w,e)=αJ(w,e)+(1-α)Sim d (w, e).

[0100] In the formula, α is the weight coefficient, w is the search term, e is the graph entity name, Sim(w,e) is the semantic matching score between the search term and the graph entity, J(w,e) is the Jaccard coefficient between the search term and the graph entity, and Simd(w,e) is the text similarity calculated based on the edit distance between the search term and the graph entity.

[0101] The Jaccard coefficient is a measure of similarity and difference between different finite sets of samples. To find the Jaccard coefficient between the search term w and the graph entity e, we can treat them as a set of character sequences. First, we can calculate the number of identical characters between them, Same(w,e), and then calculate the Jaccard coefficient using the formula where the Size function represents the number of different characters in the string.

[0102]

[0103] Simd(w,e) is considered as the text matching score between the query word and the graph node, and its calculation method is shown in the following formula.

[0104]

[0105] In the formula, Maxlen(w,e) refers to the length of the word with more characters in the search term w and the entity name e, used to normalize the lengths of the two strings. Dis(w,e) reflects the degree of difference between the two, which is the Levenshtein edit distance between the search term w and the entity name e, i.e., the minimum number of operations required to transform string w into e, which can be calculated using the following formula, i.e., through dynamic programming algorithm.

[0106]

[0107] The method for calculating the matching score between entities in a graph includes:

[0108] In this embodiment, the number of entity attributes is used as an indicator to determine the semantic matching score between entities. Specifically, the size of the set of common attributes in two entities is used to measure the relevance between the two entities, thereby better uncovering the semantic relationships between entities and improving the accuracy of information retrieval. Entities with more common attributes have higher similarity. The semantic matching score between different entities e1 and e2 can be expressed using Sim(e1,e2) in a manner similar to the Jaccard coefficient, and its calculation method is shown in the following formula.

[0109]

[0110] In the formula, A(e) represents the set of attributes possessed by entity e; Sim(e1,e2) represents the set of attributes shared by entities e1 and e2. The semantic matching score between entities can be calculated based on the proportion of the common part of all their attributes. For example, for two equipment entities in the weapon domain knowledge graph, if their attribute sets have many identical parameters, such as caliber, rate of fire, and range, then their semantic similarity will be higher.

[0111] Combining the two algorithms mentioned above, the overall map detection strategy is as follows: Figure 8 As shown, it specifically includes:

[0112] First, node matching is performed on the query keywords. At this point, two scenarios may occur: successful node matching or failure. To optimize the retrieval effect, this embodiment designs corresponding information retrieval strategies for both scenarios—whether or not matching entities can be successfully obtained from the equipment domain knowledge graph.

[0113] Scenarios where node matching fails include:

[0114] This embodiment proposes a method for calculating semantic matching scores by combining the Jaccard coefficient and edit distance. The search keywords are sequentially compared with all nodes in the graph using the proposed calculation method, and the node with the highest score is obtained after sorting. If the matching score exceeds a predefined threshold, the query expansion task in this scenario is completed. This entity is then returned to the user as the node linked to the search keywords, along with all triples formed by the set of direct associations with that node.

[0115] Specific scenarios for successful node matching include:

[0116] In this scenario, the keyword 'w' input by the user can be mapped to the equipment domain knowledge graph, and the corresponding graph node 'e' ∈ E and 'e = w' can be located based on the index. After determining the entity node 'e', ​​the query can be expanded from this node to retrieve related entities and their relationships. First, the entity node 'e' can be searched in the thesaurus. If a corresponding synonym can be found, the corresponding query expansion triplet information is returned to the user; otherwise, the next layer of calculation continues. Second, based on the matched entity node, its type information can be obtained from the knowledge graph, and the size of the entity set can be reduced to obtain all entity nodes of this type. The search keywords can be expanded by searching for entities with similar semantic relationships to entity 'e'. If the matching score exceeds a preset threshold, these entities are added to the thesaurus to further expand the relevance of the search keywords. Finally, the set of directly associated nodes between entity 'e' and its similar entities can be obtained from the knowledge graph. Finally, in the scenario where node matching is successful, the knowledge graph-based information retrieval scheme of this embodiment will return the entity e corresponding to the search keyword, its synonym or similar node e', and all triples formed by the above entity set and their directly associated node set.

[0117] Based on the above retrieval information, the knowledge retrieval process first involves a first-level query expansion. This involves calculating the semantic matching score between the search term and the graph entity using edit distance and the Jaccard coefficient, obtaining a list of all entities after downgraded matching. After the user selects the corresponding search entity, node matching is performed. The inverted index of names built in the knowledge extraction module is used to find the address information of the entity, locating the actual entity in the graph. Then, the size of the set of entities to be searched is reduced based on the entity's type attributes, and a second-level query expansion is performed. This involves calculating the semantic matching score between graph entities using attribute similarity. If the attribute similarity exceeds a preset threshold, the system determines that an expanded entity has been obtained and adds it to the thesaurus, dynamically updating the thesaurus.

[0118] S6. Graph visualization: This function is mainly used to facilitate interaction between the user and the platform implemented in this embodiment, specifically including:

[0119] This embodiment selects Vue.js as the basic development framework for the overall front-end and uses D3.js, an excellent graphics visualization framework, to achieve dynamic and three-dimensional visualization of the weapon and equipment domain knowledge graph, thus realizing an intuitive display of the weapon and equipment domain knowledge graph. D3.js has high flexibility and powerful extensibility, supporting the display of various data formats and graphic types. In terms of weapon and equipment domain knowledge graph visualization, D3.js can provide a force-directed graph module to display the relationships between entities, and simulate the random motion of particles to make the graph more dynamic and interactive. In addition, it also provides a parameter tuning mechanism based on centripetal force, positioning force, and collision mechanism to better adapt to the visualization of graph data in various scenarios. In order to meet the interaction needs of relevant personnel in the weapon and equipment domain knowledge graph visualization process, this embodiment implements basic interactive functions through canvas operations, element operations, and data operations. Specifically, canvas operations support functions such as moving and zooming; nodes and edges support functions such as style configuration, focus highlighting, mouse dragging, and type changing; data operations support functions such as adding, deleting, modifying, and querying nodes and edges; in addition, interactive search scenarios can be achieved through operations such as path locking and focus display.

[0120] First, knowledge graph visualization requires a background canvas, which is typically used... <svg>Tags are used to generate the atlas container. Next, this example uses the `select` function provided in D3.js to select the generated atlas container. The `forceSimulation` function sets the data format to force-directed graph data, adjusts the center position of entities in the atlas container layout, and modifies the mutual exclusion forces, allowing for better distribution of entities within the atlas container. To enable users to adjust the atlas size using the mouse wheel, the `zoom` function provided in D3.js can be used to change the graph's scaling properties.

[0121] Next, this embodiment uses the `data` function provided in D3.js to set the triplet information in the graph container, binding entity and relation data separately to achieve graph visualization. Entity data can be generated. <circle>Tags and <text>Tags and relational data can be generated <line>Tags and <text>Tags. Ultimately, these tags combine nodes, edges, and their name attributes to form a visual representation of the weaponry and equipment knowledge graph. When the mouse hovers over a node, the graph visualization interface also provides a knowledge card function, displaying more graph attribute information. The advantage of D3.js lies in its ability to generate element tags on the visualization interface from data and dynamically update the interface appearance as the data changes.

[0122] Furthermore, this embodiment uses the Vue.js framework to design and write the overall information interaction page. Multiple reusable sub-interfaces are defined in the `common` directory, including page management and function selection menus, allowing other pages to focus on function display development. Three sub-pages, `gBuild`, `gModel`, and `gSearch`, are set up in the `pages` directory, corresponding to the three major use cases in the system requirements analysis and the three major controllers at the backend controller level, respectively. This separation of front-end and back-end logic greatly reduces system coupling. To ensure standardized data transmission between the front-end and back-end, the design uses JSON format and transmits data via GET and POST requests. Regarding result display, the page display skeleton is designed first, and the data is presented during rendering.

[0123] Example 4

[0124] In order to implement the method corresponding to Embodiment 1 above and achieve the corresponding functions and technical effects, a knowledge graph construction system for the equipment field is provided below.

[0125] This embodiment provides a knowledge graph construction system for the equipment field, including:

[0126] The dataset building module is used to build raw datasets for the equipment field.

[0127] The Equipment Domain Ontology Construction Module is used to construct equipment domain ontology based on the original equipment domain dataset.

[0128] The triplet data extraction module is used to process entity and relation extraction into a whole information extraction task based on the original dataset and ontology of the equipment domain, and output triplet data in an end-to-end manner.

[0129] The Equipment Domain Knowledge Graph Construction Module is used to construct an equipment domain knowledge graph based on triple data.

[0130] Example 5

[0131] In order to implement the method corresponding to Embodiment 1 above and achieve the corresponding functions and technical effects, a retrieval system based on a knowledge graph in the equipment field is provided below.

[0132] This embodiment provides a retrieval system based on an equipment domain knowledge graph, comprising:

[0133] The information retrieval module is used to retrieve information from the equipment domain knowledge graph determined in Example 1 based on search keywords and an information retrieval strategy that combines node matching and query expansion. Node matching refers to determining whether search keywords can be mapped to entities in the equipment domain knowledge graph. Query expansion refers to organically expanding the entities in the equipment domain knowledge graph to find entities similar to the search keywords.

[0134] Example 6

[0135] This embodiment provides an automated knowledge graph construction and retrieval system for the equipment field, including:

[0136] The data processing module is used to receive the subject matter in txt, word, and pdf formats uploaded by users, and to clean and preprocess the text data content.

[0137] The ontology construction module provides users with a visual tool for designing knowledge graph schema layers after analyzing and organizing equipment-related data. It supports ontology management and ontology export functions.

[0138] The knowledge extraction module receives the text output by the data processing module, encapsulates the knowledge extraction model, and uses interface calls to perform joint extraction of entity relationships, and then transmits the triple data to the knowledge storage module.

[0139] The knowledge storage module is used to respond to users' graph construction requests, integrate the extracted triple data into the knowledge graph, map entities and relations to nodes and edges in the graph, and store them using persistent methods.

[0140] The knowledge retrieval module is used to respond to users' node query and path query requests. It calls the corresponding retrieval service based on the retrieval type and keyword parameters in the request, generates query statements through node matching and query expansion capabilities, and implements the corresponding query based on the graph database.

[0141] The knowledge visualization module serves as the interface and primary communication channel between users and the system. It is responsible for transmitting user requests and responding to backend results, presenting triple data as a graphical structure of nodes and edges in an interactive and visual manner. Figure 9 Show the overall architecture of this system.

[0142] To facilitate program development and subsequent maintenance, improve system stability and efficiency, and reduce coupling between modules, this embodiment divides the system into a data layer, a model layer, a business layer, and a presentation layer. The core functions of the system are implemented by the backend business logic and model code, and a visual operation interface and a unified access point are provided.

[0143] The data layer mainly contains data crawled from selected network information sources in the equipment field, as well as military documents in formats such as txt, doc, and pdf uploaded by users. These raw, unstructured texts need to be converted into structured triplet data and stored in a graph database to provide data support for the upper layer.

[0144] The model layer mainly includes knowledge extraction models based on RoBERTa and Seq-to-Seq and information retrieval models based on domain knowledge graphs. It trains and builds corresponding models by accessing triple information in the data layer and provides interactive interfaces to the business layer through APIs.

[0145] The business layer integrates four major functional modules: data processing, ontology modeling, knowledge extraction, and knowledge retrieval. Data processing includes cleaning and preprocessing the raw files in the data layer; ontology modeling provides users with the ability to design the schema layer of the data graph; and knowledge extraction and retrieval involve calling and encapsulating Jython functions in the model layer. The business layer primarily undertakes information processing within its own layer, calling functions in the model layer, and providing feedback to the presentation layer.

[0146] As the interface between users and the system, the presentation layer's primary responsibility is to provide a clean and intuitive user interface, enabling users to easily construct and retrieve knowledge graphs. This layer encompasses multiple functional modules, including ontology modeling and knowledge extraction, providing users with comprehensive knowledge graph management services. The presentation layer encapsulates requests in JSON format and submits them to the business layer, returning results in real time. It can also visualize information within the knowledge graph.

[0147] Example 7

[0148] This embodiment provides an electronic device including a memory and a processor. The memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the equipment domain knowledge graph construction method of Embodiment 1.

[0149] Alternatively, the aforementioned electronic device may be a server.

[0150] In addition, this embodiment also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the equipment domain knowledge graph construction method of Embodiment 1.

[0151] Example 8

[0152] This embodiment provides an electronic device including a memory and a processor. The memory stores a computer program, and the processor runs the computer program to enable the electronic device to perform the equipment domain knowledge graph-based retrieval method of Embodiment 2.

[0153] Alternatively, the aforementioned electronic device may be a server.

[0154] In addition, this embodiment also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the equipment domain knowledge graph-based retrieval method of Embodiment 2.

[0155] This invention addresses the issue of overlapping entities in the constructed original dataset of the equipment domain by merging entity recognition and relationship classification into a single task that emphasizes the representation of the main entity and employs a semi-pointer-semi-label sequence extraction method. Furthermore, this invention discloses a knowledge graph retrieval strategy based on node matching and query expansion, combining synonymous connected graphs and attribute similarity to complete semantic matching score calculation schemes in different scenarios, providing more diverse and accurate matching modes. This invention implements a complete domain knowledge graph application process from file parsing, ontology modeling, knowledge extraction, graph construction, and information retrieval, possessing excellent data processing and semantic association capabilities, and also providing excellent data visualization functions.

[0156] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the systems disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple; relevant parts can be referred to the method section.

[0157] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.< / text> < / line> < / text> < / circle> < / svg>

Claims

1. A method for constructing a knowledge graph in the field of equipment, characterized in that, include: Constructing original datasets in the equipment field; Based on the original dataset in the equipment domain, construct an ontology for the equipment domain; The construction of an equipment domain ontology based on the original dataset of the equipment domain specifically includes: constructing an equipment domain ontology using both a top-down and a bottom-up ontology modeling scheme; the top-down ontology modeling scheme: leveraging prior industry knowledge in the equipment domain, summarizing and designing a pattern-layer equipment domain ontology, and extracting data from the original dataset of the equipment domain from the top down according to the designed pattern-layer equipment domain ontology to achieve the construction of the equipment domain ontology; the bottom-up ontology modeling scheme: organizing and cleaning the data in the original dataset of the equipment domain, and extracting the equipment domain ontology from the bottom up to achieve the modeling of the equipment domain ontology. Based on the original dataset and ontology of the equipment domain, entity and relation extraction are combined into a single information extraction task, and triple data is output in an end-to-end manner. Specifically, this involves using a knowledge joint extraction algorithm based on the Seq-to-Seq framework and the RoBERTa model, based on the original dataset and ontology of the equipment domain, to combine entity and relation extraction into a single information extraction task and output triple data in an end-to-end manner. Based on triple data, a knowledge graph for the equipment domain is constructed. Specifically, this involves using Cypher syntax to map entities and relations in the triple data to nodes and edges in the graph, and then importing the constructed knowledge graph for the equipment domain into the Neo4j graph database for storage.

2. The method for constructing a knowledge graph in the equipment field according to claim 1, characterized in that, The original dataset in the field of equipment construction specifically includes: Web crawling technology was used to extract data from professional weaponry and equipment web pages, and the extracted data was saved as a JSON file to build an original dataset in the field of equipment.

3. A retrieval method based on a knowledge graph in the equipment field, characterized in that, include: Based on the search keywords, and using an information retrieval strategy that combines node matching and query expansion, information retrieval is performed on the equipment domain knowledge graph determined by the method described in any one of claims 1-2; the node matching refers to determining whether the search keywords can be mapped to entities in the equipment domain knowledge graph; the query expansion refers to organically expanding the entities in the equipment domain knowledge graph to find entities similar to the search keywords.

4. A knowledge graph construction system for the equipment field, characterized in that, include: The dataset building module is used to build raw datasets for the equipment field; The Equipment Domain Ontology Construction Module is used to construct equipment domain ontology based on the original equipment domain dataset. The construction of an equipment domain ontology based on the original dataset of the equipment domain specifically includes: constructing an equipment domain ontology using both a top-down and a bottom-up ontology modeling scheme; the top-down ontology modeling scheme: leveraging prior industry knowledge in the equipment domain, summarizing and designing a pattern-layer equipment domain ontology, and extracting data from the original dataset of the equipment domain from the top down according to the designed pattern-layer equipment domain ontology to achieve the construction of the equipment domain ontology; the bottom-up ontology modeling scheme: organizing and cleaning the data in the original dataset of the equipment domain, and extracting the equipment domain ontology from the bottom up to achieve the modeling of the equipment domain ontology. The triplet data extraction module is used to process entity and relation extraction into a single information extraction task based on the original equipment domain dataset and equipment domain ontology, and output triplet data in an end-to-end manner. Specifically, this process involves using a knowledge joint extraction algorithm based on the Seq-to-Seq framework and the RoBERTa model, based on the original equipment domain dataset and equipment domain ontology, to process entity and relation extraction into a single information extraction task and output triplet data in an end-to-end manner. The equipment domain knowledge graph construction module is used to construct an equipment domain knowledge graph based on triple data. Specifically, constructing the equipment domain knowledge graph based on triple data includes: using Cypher syntax to map the entities and relations in the triple data to nodes and edges in the graph, and importing the constructed equipment domain knowledge graph into the Neo4j graph database for storage.

5. A retrieval system based on a knowledge graph in the equipment field, characterized in that, include: The information retrieval module is used to retrieve information from the equipment domain knowledge graph determined by the method described in any one of claims 1-2 based on search keywords and an information retrieval strategy of node matching and query expansion. The node matching refers to determining whether the search keywords can be mapped to entities in the equipment domain knowledge graph. The query expansion refers to organically expanding the entities in the equipment domain knowledge graph to find entities similar to the search keywords.

6. An electronic device, characterized in that, The device includes a memory and a processor, wherein the memory stores a computer program and the processor runs the computer program to enable the electronic device to perform a method for constructing an equipment domain knowledge graph according to any one of claims 1 to 2.

7. An electronic device, characterized in that, It includes a memory and a processor, the memory being used to store a computer program, and the processor running the computer program to enable the electronic device to perform a retrieval method based on an equipment domain knowledge graph as described in claim 3.