Agile atlas generation method based on user intention
Through the agile graph generation method based on user intentions, vectorized indexing, context learning templates and ontology model technology, the problem of low efficiency in knowledge graph construction in emergencies in military fields is solved, and fast and accurate knowledge graph generation is achieved, improving the efficiency of knowledge graph generation. Data retrieval and entity attribute extraction capabilities.
Patent Information
- Application Number
- CN202411411790.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-10
- Publication Date
- 2025-01-17
AI Technical Summary
In the military field, building a knowledge graph requires a lot of manpower and time, especially when processing diverse and widely distributed data in emergencies, it is difficult to quickly generate accurate knowledge graphs, limiting intelligent analysis and application.
Using agile graph generation method based on user intentions, quickly organize data through the search question and answer module of vectorized index, accurately extract triple information based on the analysis module of context learning template, and use the ontology model's graph information to fill the module to supplement entity attributes and expand entity , supports front-end display and manual correction to achieve rapid generation of knowledge graphs.
In the absence of data support, the knowledge graph can be quickly generated, and entity attributes can be extracted from multimodal data and data supplementary tips are provided, which significantly improves the construction efficiency and accuracy of the emergencies knowledge graph.
Smart Images

Figure CN119323249A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of graph generation, and in particular to an agile graph generation method based on user intent. Background Art
[0002] Knowledge graph is a structured knowledge representation method that organizes entities, relationships and attributes into a graphical network to provide a deeper understanding of the connections and semantics between data. It makes up for the shortcomings of traditional data analysis, which is limited to shallow association and statistical analysis and cannot fully capture the complex relationships and implicit knowledge behind the data. It enables people to understand the data more comprehensively and gain deeper insights and value from it.
[0003] In the military field, the powerful knowledge expression and organization capabilities of knowledge graphs can be used to organize large-scale, low-correlation, and diverse professional data in the field, and establish a complete military knowledge system, thereby better helping commanders understand and manage professional information in the field. Although knowledge graphs can provide a means for the aggregation of event information for a large amount of fragmented information generated by emergencies, the construction of knowledge graphs requires the process of organizing data, ontology definition, entity extraction, storage in the graph library, and retrieval of graph information. Processing emergency information into graph knowledge requires a lot of manpower and time, which seriously restricts the intelligent analysis and application of knowledge graphs in military emergencies.
[0004] According to the traditional command and control theory OODA loop, commanders are required to quickly grasp emergencies and make decisions. However, building a complete and accurate knowledge graph requires a large amount of data, and it is very difficult and time-consuming to obtain and integrate this data, especially when the data sources are diverse and widely distributed, the situation will be more complicated.
[0005] Therefore, there is an urgent need to design an agile graph generation technology based on user intent. This technology can quickly and agilely extract valuable information from limited multimodal data according to the commander's intention and generate knowledge graphs accurately and efficiently. Summary of the invention
[0006] 1. Technical issues to be resolved
[0007] In view of the shortcomings of the prior art, the present invention provides an agile graph generation method based on user intent to improve one or more defects of existing knowledge graphs in the field of military applications.
[0008] (II) Technical solution
[0009] To achieve the above objectives, the present invention is implemented through the following technical solutions: a method for generating an agile graph based on user intention, specifically comprising the following steps:
[0010] S1. Collect limited and fragmented event data generated by a certain emergency, and package and upload the data to the knowledge base;
[0011] S2. Obtain the user's specific intention regarding the emergency;
[0012] S3, through the retrieval question-answering module based on vectorized index, quickly organize data to generate professional answers;
[0013] S4, accurately extract triple information from text information through a parsing module based on contextual learning templates;
[0014] S5. Match the entity information in the triple information with the preset ontology model through the graph information filling module based on the ontology model, and supplement the entity attribute value and expand the entity quantity from the large model;
[0015] S6. After the knowledge graph is built, it supports front-end display and manual correction functions, and the final construction results are persistently stored in the graph library.
[0016] Preferably, in step S5, for the successfully matched entity, the entity attributes are filled according to the attributes defined in the ontology, and a breadth-first search is performed through the entity to find entity information related to the entity, thereby expanding the entity. For the unsuccessfully matched entity, no attribute information needs to be added to the entity.
[0017] Preferably, in step S5, prompt information can be displayed in a timely manner for unmatched entity attribute values, and the user can manually supplement and complete relevant data elements based on the prompt information.
[0018] Preferably, the vectorized index-based retrieval question-answering module is a technology that can efficiently organize and retrieve large amounts of data. It vectorizes the data and creates an index, thereby greatly improving the data retrieval speed.
[0019] Preferably, the context learning template-based parsing module is a technology that can parse text information through context learning templates, by designing some preset templates, combining them into prompt content in a specific order, and inputting the whole into a large language model to generate output.
[0020] Preferably, the graph information filling module based on the ontology model is a technology that can match the entity information in the triple information with the preset ontology model, and supplement the entity attribute values and expand the number of entities from the large model.
[0021] Preferably, the ontology model is a framework for describing entities and their relationships, and represents the relationships between entities in a graphical manner to facilitate query and reasoning between entities.
[0022] (III) Beneficial effects
[0023] The present invention provides a method for generating an agile graph based on user intent. Compared with the prior art, it has the following beneficial effects:
[0024] (1) When constructing a knowledge graph for emergencies, common knowledge graph tools need to first organize the emergency data, then build a graph library, and retrieve emergency information from the graph library. However, the agile graph generation technology based on user intent supports the graph agile generation function, and can quickly and agilely generate knowledge graphs according to user intent.
[0025] (2) When constructing a knowledge graph of emergencies, common knowledge graph tools require emergency data support to extract entities and relationships and generate graphs. However, the retrieval question-answering module based on vectorized index in the agile graph generation technology based on user intent supports the rapid organization of data and generation of graphs by relying on the text generation capability of large models in the absence of data support.
[0026] (3) When constructing the knowledge graph of emergencies, the common knowledge graph tools have weak support for the attribute filling function of entities, and it is difficult to integrate and extract entity attributes from multimodal data. However, the graph information filling module based on the ontology model in the agile graph generation technology based on user intention can extract entity attributes from multimodal data and complex semantic environments, and can reversely prompt users to supplement and improve the data for missing entity attribute information. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 Design a flow chart for the agile graph generation technology based on user intent of the present invention;
[0028] Figure 2 This is a functional flow chart of the three modules of the present invention;
[0029] Figure 3 A framework diagram for describing the modules of the present invention. DETAILED DESCRIPTION
[0030] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0031] The embodiment of the present invention provides a technical solution: a method for generating an agile graph based on user intention, see Figure 1 The system uses a variety of innovative technologies, including prompt engineering, plug-in knowledge base, and the combination of large and small models. It designs three modules: a retrieval question-answering module based on vectorized indexes, a parsing module based on contextual learning templates, and a graph information filling module based on ontology models. See Figure 2 ,These modules can effectively realize key functions such as semantic understanding and accurate graph generation.
[0032] The implementation steps of the agile graph generation technology based on user intent are as follows:
[0033] Collect limited and fragmented event data generated by a certain emergency, package the data and upload it to the knowledge base;
[0034] Obtain the user's specific intention regarding the emergency;
[0035] Through the retrieval question-answering module based on vectorized index, data can be quickly organized to generate professional answers;
[0036] Accurately extract triple information from text information through a parsing module based on contextual learning templates;
[0037] Through the graph information filling module based on the ontology model, the graph is filled with entity and attribute information. The specific process is as follows;
[0038] Match the entity information in the triple information with the preset ontology model, and enrich and supplement the entity attribute values and expand the entity relationship from the large model;
[0039] For successfully matched entities, fill in the entity attributes according to the attributes defined in the ontology, and perform a breadth-first search through the entity to find entity information related to the entity, thereby expanding the entity;
[0040] For entities that are not successfully matched, there is no need to add attribute information to the entity;
[0041] For unmatched entity attribute values, prompt information can be displayed in time;
[0042] Users can manually supplement and complete relevant data elements based on prompt information;
[0043] After the knowledge graph is built, it supports front-end display and manual correction functions, and the final construction results can be persistently stored in the graph library.
[0044] The present application provides an agile graph generation technology based on user intent, which includes a retrieval question-answering module based on vectorized index, a parsing module based on contextual learning templates, and a graph information filling module based on ontology models. The three modules are described based on the module description framework from four parts: basic module concepts, module working principles, module pseudocode, and module design advantages. The module description framework is as follows: Figure 3 As shown:
[0045] Basic concept of the retrieval question-answering module based on vectorized index: This module is a technology that can efficiently organize and retrieve data. It vectorizes the data and creates indexes, which greatly improves the data retrieval speed.
[0046] The working principle of the retrieval question-answering module based on vectorized index: The module first pre-processes the limited and fragmented event data generated by a certain emergency, extracts useful information, then vectorizes the information and creates corresponding indexes. When the user's intention is obtained, the system will use the index to quickly match, find the data related to the user's intention, analyze and understand it, and finally generate a professional answer.
[0047] The pseudo code of the retrieval question-answering module based on vectorized index is as follows:
[0048]
[0049]
[0050] The variables involved in the pseudo code of the retrieval question-answering module based on vectorized index are as follows: query represents the user intention, t represents the file in the knowledge base, chunks represents the cut text block, vector represents the vector index of the text block, query_vectors represents the question vector, v topk Represents the topk most similar vectors, related_t topk Represents relevant text information, answer represents the answer of the big model; the functions involved are as follows: Text_Splitter represents the text cutting process, Embedding represents the text conversion amount, Vector_Similarity_Match represents returning the topk most similar vector indexes, De_Embedding represents vector conversion to text, and LLM(Prompt(…)) represents outputting the results through the big model.
[0051] The design advantages of the retrieval question-answering module based on vectorized indexing: This module can effectively process the collected emergency data and improve the retrieval efficiency and accuracy of the data; this module can generate fluent and natural text, reduce grammatical errors and unnatural language expressions, and improve the semantic understanding ability of the parsing module based on context learning templates.
[0052] Basic concept of parsing module based on context learning template: This module is a technology that can parse text information by learning templates.
[0053] Working principle of the parsing module based on contextual learning template: This module first pre-processes the text data generated by the retrieval question-answering module based on vectorized index, such as word segmentation, removal of stop words, etc. Then, using the contextual learning of the large language model, some preset templates are designed, combined into prompt content in a specific order, and input into the large language model as a whole to improve the large model's ability to parse triples.
[0054] The pseudo code of the template parsing module based on context learning is as follows:
[0055]
[0056]
[0057] The variables involved in the pseudocode of the template parsing module based on context learning are as follows: question represents the example question, ref_answer represents the reference answer, answer represents the output result of the retrieval question and answer module based on vectorized index, triples represents the generated triple information, head_entity represents the head entity, head_type represents the head entity type, relation represents the entity relationship, tail_entity represents the tail entity, and tail_type represents the tail entity type; the functions involved are as follows: Context_Learning_Template represents the context learning template, LLM represents the large model, and Parse represents the triple parsing rule.
[0058] The design advantages of the parsing module based on context learning template: This module can accurately extract triple information from text information and return entity extraction results in triple format, which is conducive to improving the entity matching accuracy of the graph information filling module based on the ontology model.
[0059] Basic concepts of the graph information filling module based on the ontology model: This module is a technology that can supplement entity attribute values and expand the number of entities through a large model + breadth-first algorithm.
[0060] Working principle of the graph information filling module based on the ontology model: This module first performs regular parsing, entity deduplication, entity attribute addition and other data processing operations on the triple data generated by the parsing module based on the context learning template. Then, the breadth-first search algorithm is used to expand the entity. For each layer of search depth, other missing entities associated with each entity will be traversed according to the ontology model. Finally, the user can manually supplement the relevant data elements and manually correct the error information that occurs during the automated graph construction process.
[0061] The pseudo code of the graph information filling module based on the ontology model is as follows:
[0062]
[0063] The variables involved in the graph information filling module based on the ontology model are as follows: head_entity represents the head entity, tail_entity represents the tail entity, entity represents the entity set, and step represents the breadth-first search depth; the functions involved are as follows: Re represents regular parsing, Distinct represents entity deduplication, Add_Property represents adding properties to the entity, Breadth_Search_Algorithm represents the breadth-first search algorithm model, Create_KGs represents building a knowledge graph, and Artificial_Correction represents artificial correction of the knowledge graph (KG).
[0064] Meanwhile, the contents not described in detail in this specification belong to the prior art known to those skilled in the art.
[0065] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0066] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for generating an agile graph based on user intent, characterized by: The specific steps include: S1. Collect limited and fragmented event data generated by a certain emergency, package the data and upload it to the knowledge base; S2. Obtain the user's specific intention regarding the emergency; S3, through the retrieval question-answering module based on vectorized index, quickly organize data to generate professional answers; S4, accurately extract triple information from text information through a parsing module based on contextual learning templates; S5. Match the entity information in the triple information with the preset ontology model through the graph information filling module based on the ontology model, and supplement the entity attribute value and expand the entity quantity from the large model; S6. After the knowledge graph is built, it supports front-end display and manual correction functions, and the final construction results are persistently stored in the graph library.
2. The method for generating an agility graph based on user intention according to claim 1, characterized in that: In step S5, for the successfully matched entity, the entity attributes are filled according to the attributes defined in the ontology, and a breadth-first search is performed through the entity to find entity information related to the entity, thereby expanding the entity. For the unsuccessfully matched entity, no attribute information needs to be added to the entity.
3. The method for generating an agility graph based on user intention according to claim 1, characterized in that: In the step S5, prompt information can be displayed in time for the unmatched entity attribute values, and the user can manually supplement and complete the relevant data elements according to the prompt information.
4. The method for generating an agility graph based on user intention according to claim 1, characterized in that: The vectorized index-based retrieval question-answering module is a technology that can efficiently organize and retrieve large amounts of data. It vectorizes the data and creates indexes, thereby greatly improving the data retrieval speed.
5. The method for generating an agility graph based on user intention according to claim 1, characterized in that: The context-learning template-based parsing module is a technology that can parse text information through context-learning templates. It designs some preset templates, combines them into prompt content in a specific order, and inputs the whole into a large language model to generate output.
6. The method for generating an agility graph based on user intention according to claim 1, characterized in that: The graph information filling module based on the ontology model is a technology that can match the entity information in the triple information with the preset ontology model, and supplement the entity attribute value and expand the entity quantity from the large model.
7. The method for generating an agility graph based on user intention according to claim 1, characterized in that: The ontology model is a framework for describing entities and their relationships, which represents the relationships between entities in a graphical manner to facilitate query and reasoning between entities.