Reconnaissance design specification knowledge graph mode construction method based on large language model

By applying large language models to construct knowledge graph models in the field of survey and design, combining top-down and bottom-up methods, the problem of excessive artificial dependence in the existing technology is solved, and the efficiency and flexibility of knowledge graph construction is achieved.

CN119760152APending Publication Date: 2025-04-04CHINA RAILWAY ERYUAN ENGINEERING GROUP CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411821996.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

The existing technology requires too much reliance on manual labor when building survey and design standard knowledge graph models, which is not very flexible, making it difficult to effectively simplify the knowledge graph construction method and improve application efficiency.

Method used

The survey and design specification knowledge graph model construction method based on large language models is adopted, and the two knowledge graph model design methods are combined with top-down and bottom-up. The design specification file is identified, filtered, and automatically generated knowledge graph patterns through the large language model, and the manual checksum model fine-tuning is performed.

Benefits of technology

It effectively simplifies the difficulty of defining the knowledge graph model, improves the efficiency of knowledge graph construction, reduces the dependence on labor, and improves the application efficiency of knowledge graphs in the survey and design industry.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119760152A_ABST
    Figure CN119760152A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of knowledge maps, in particular to a reconnaissance design specification knowledge map mode construction method based on a large language model. The invention discloses a big language model-based reconnaissance design specification knowledge graph mode construction method, which is characterized in that text segmentation is performed according to text characteristics in the field of reconnaissance design, and a top-down knowledge graph mode construction method and a bottom-up knowledge graph mode construction method are combined. Identifying an attribute name list in the design specification text by using the large language model, filtering the identified entity type, iteratively completing optimization of the knowledge graph mode, finally performing manual verification on the knowledge graph mode automatically generated by the large language model, and finely adjusting the large language model by using a verification result; the method solves the problems that an existing text segmentation technology is lack of flexibility and deep understanding of complex semantics in the field of investigation and design, needs to depend on manpower too much and is not high in flexibility, the definition difficulty of a knowledge graph mode is effectively simplified, and the knowledge graph construction efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of ultrasonic power supplies, and in particular to a method for constructing a knowledge graph model of survey and design specifications based on a large language model. Background Art

[0002] A knowledge graph is a data structure composed of interconnected entities, concepts, and events. It establishes connections between data points through semantic relationships. The knowledge graph model is the upper-level knowledge of the knowledge graph. It is an abstract, semantic, and conceptual specification of the knowledge graph content. It is also the basis for the construction, storage, and application of the knowledge graph. The design of the knowledge graph model is a crucial part of building a knowledge graph and directly affects the quality of the knowledge graph.

[0003] At present, knowledge graphs have been tried and applied in the survey and design industry, and have shown some application prospects in survey and design knowledge association, knowledge aggregation, knowledge discovery, etc. However, due to the large volume of knowledge, scattered knowledge, and heterogeneous knowledge in the survey and design industry, how to simplify the construction method of knowledge graphs in the survey and design field and improve the application efficiency of knowledge graphs in the industry is still an unresolved problem in the industry.

[0004] In the prior art, a Chinese invention patent application (publication number CN116701648A) discloses a knowledge graph and schema design method based on specification standard mapping, the method comprising: constructing a professional specification document library; extracting key common features in the professional specification document library; constructing corresponding node classes, relationship classes and attribute classes based on the key common features; extracting node instance information based on the key common features; establishing a mapping relationship between the node class and the node instance information to complete the knowledge graph construction. The invention mentions a knowledge graph and schema design method based on specification standard mapping to construct a professional specification document library; extracting key common features in the professional specification document library; constructing corresponding node classes, relationship classes and attribute classes based on the key common features; extracting node instance information based on the key common features; establishing a mapping relationship between the node class and the node instance information to complete the knowledge graph construction.

[0005] The invention forms a knowledge graph based on the content of specifications and standards in the above-mentioned manner, which can reduce the learning and work costs of current professional and technical personnel to a certain extent; however, in the process of constructing the knowledge graph of the invention, it is necessary to combine the design specification characteristics, manually label the design specification files, and manually analyze the design specifications one by one. According to the corresponding labels, these specification knowledge are classified, "labeled", data is sorted, and knowledge is extracted before the knowledge graph can be constructed. Overall, the invention still makes extensive use of manual labor. Summary of the invention

[0006] The purpose of this invention is to solve the problem that it is difficult to construct a knowledge graph model of survey and design specifications, which requires too much reliance on manual work and has low flexibility, and proposes a method for constructing a knowledge graph model of survey and design specifications based on a large language model.

[0007] On the one hand, the present invention proposes a method for constructing a knowledge graph model of survey and design specifications based on a large language model, which combines the top-down and bottom-up knowledge graph model design methods. The specific steps are as follows:

[0008] S1. Collect design specification files in the field of survey and design, and slice the design specification files to obtain the text slices;

[0009] S2, using a large language model to identify entity types, attribute name lists of entity types, relationship types, and attribute name lists of relationship types for text slices;

[0010] S3, filtering the entity types by combining keyword screening with word frequency-inverse document frequency, and screening out entity types related to survey and design profession from the entity types,

[0011] S4, using the large language model to automatically generate a knowledge graph model of survey and design specifications;

[0012] S5. Verify the survey and design specification knowledge graph model and fine-tune the large language model.

[0013] Preferably, the text slicing in the field of survey and design in step S1 is to decompose the text into propositions containing independent viewpoints or information fragments, and cluster and organize them according to the semantic relevance of the propositions. The specific steps are as follows:

[0014] S11, using the large language model to understand the design specification document in the field of survey and design, and decomposing it to obtain the proposition containing the independent viewpoints or information fragments;

[0015] S12, using the large language model to evaluate the degree of relevance between the proposition and other contents in the design specification document in the field of survey and design;

[0016] S13, classifying the propositions according to the evaluation results obtained in step S12, and placing them into different information blocks;

[0017] Further preferably, the classification method in step S13 is specifically to add the proposition to a semantically related information block, and to create a new information block if the proposition is a completely new independent viewpoint or information fragment.

[0018] Preferably, the step S2 of identifying the entity type and the relationship type specifically includes:

[0019] S21, designing prompt words for extracting entity type, relationship type, and attribute name information in the design specification document;

[0020] S22, input the prompt word to the large language model to determine whether the entity type or relationship type appears repeatedly, merge the recognized entity type or relationship type if it appears, and add a new entity type or relationship type if it appears unrecognized.

[0021] Further preferably, the merging in step S22 is specifically to merge the different attribute name lists of the two entity types or the relationship types through the large language model.

[0022] Preferably, the step S3 of filtering and normalizing the entity types specifically includes:

[0023] S31. Collect vocabulary of survey and design majors and organize them into a vocabulary database;

[0024] S32, counting the frequency of entity type names appearing in the vocabulary, and calculating the word frequency-inverse document frequency value of each entity type name;

[0025] S33, sorting the entity type names according to their word frequency-reverse document frequency values, and extracting the entity types corresponding to the top 100 word frequency-reverse document frequency values;

[0026] Preferably, the step S4 is specifically as follows: inputting the newly collected text slices into the large language model, repeating the operations of steps S2 and S3, and using the large language model to continuously identify new entity types, attribute name lists of entity types, relationship types, and attribute names of relationship types, and automatically generating the survey and design specification knowledge graph model.

[0027] Preferably, the step S5 specifically includes:

[0028] S51, verifying the survey and design specification knowledge graph model, specifically by manual verification, retaining accurate information, completing incomplete information, modifying inaccurate information, and deleting unnecessary information through the manual verification; at the same time, recording the problems found and the audit results during the manual verification process to track the improvement history of the large language model;

[0029] S52. Use the collected and organized design specification documents in the field of survey and design as a training data set for fine-tuning the large language model, annotate the training data set with the data of the survey and design specification knowledge graph model that has been verified, and use the annotated data set to fine-tune the large language model.

[0030] Compared with the prior art, the present invention has the following beneficial effects:

[0031] The present invention provides a method for constructing a knowledge graph model of survey and design specifications based on a large language model, performs text segmentation according to the text characteristics in the survey and design field, combines the top-down and bottom-up knowledge graph model construction methods, and uses a large language model to complete the construction of the survey and design specification knowledge graph model; the beneficial effect of the present invention is that the present invention solves the problem that the existing text segmentation technology is not suitable for the survey and design field, lacks flexibility when processing text, and is difficult to achieve in-depth understanding of complex semantics. At the same time, it solves the problem that the existing technology requires too much reliance on manual labor and is not flexible, effectively simplifies the difficulty of defining the knowledge graph model and improves the efficiency of knowledge graph construction. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 It is a flowchart of a method for constructing a knowledge graph model of survey and design specifications based on a large language model in an embodiment of the present invention.

[0033] Figure 2 It is a list diagram of attribute names of entity types of design specification documents for lines, bridges and tunnels in the field of railway survey and design in an embodiment of the present invention.

[0034] Figure 3 It is a structural diagram of the knowledge graph model of the design specification in the field of survey and design in an embodiment of the present invention. DETAILED DESCRIPTION

[0035] The present invention is further described in detail below in conjunction with test examples and specific implementation methods. However, this should not be understood as the scope of the above subject matter of the present invention being limited to the following embodiments, and all technologies realized based on the content of the present invention belong to the scope of the present invention.

[0036] Example 1

[0037] This embodiment uses the large language model to analyze the design specification documents of lines, bridges, and tunnels in the field of railway survey and design, and constructs the survey and design specification knowledge graph model.

[0038] In the design of knowledge graph model, there are two approaches, top-down and bottom-up;

[0039] The top-down method refers to designing a knowledge graph model directly based on knowledge or experience. It is necessary to first determine the structure of the knowledge graph and then fill in specific data. It usually requires high professional knowledge of the participants and high technical requirements for knowledge graphs. This method can complete the design of the knowledge graph model quickly, and the knowledge graph model has a clear structure and is easy to maintain, but the model has poor flexibility and relies too much on manual work.

[0040] The bottom-up approach refers to starting from data or examples, gradually summarizing and abstracting knowledge graph models by analyzing data. It requires participants to start from being familiar with the data or examples, constantly summarizing and extracting experience, and finally designing a knowledge graph model. This method has relatively low requirements for participants, has strong model flexibility and does not require pre-definition, but has problems such as chaotic structure, low quality, and may require multiple iterations and a long time to sort out and summarize.

[0041] The present invention combines the top-down and bottom-up methods. First, a large language model is used to extract and summarize entity types, relationship types and their attribute name lists from the original data, and multiple rounds of iteration and combing are handed over to the large language model. Then, the results output by the large language model are manually verified. Only business experts need to judge the accuracy of the output results and give relevant verification suggestions from a macro level, thereby reducing manual dependence. Finally, the results of manual verification are used to reversely fine-tune the large language model, thereby gradually improving the recognition accuracy of the large language model. The higher the accuracy, the less content needs to be manually verified. Multiple rounds of iterations form a positive cycle, which will reduce the difficulty of constructing the knowledge graph model.

[0042] The present invention proposes a method for constructing a knowledge graph model of survey and design specifications based on a large language model. The flowchart is as follows: Figure 1 As shown in the figure, the top-down and bottom-up knowledge graph model design methods are combined. The specific steps are as follows:

[0043] S1. Collect design specification files in the field of survey and design, and slice the design specification files to obtain the text slices;

[0044] S2, using a large language model to identify entity types, attribute name lists of entity types, relationship types, and attribute name lists of relationship types for text slices;

[0045] S3, filtering the entity types by combining keyword screening with word frequency-inverse document frequency, and screening out entity types related to survey and design profession from the entity types,

[0046] S4, using the large language model to automatically generate a knowledge graph model of survey and design specifications;

[0047] S5. Verify the survey and design specification knowledge graph model and fine-tune the large language model.

[0048] The step S1 proposes a segmentation method based on a large language model for text segmentation in the field of survey and design, which decomposes the text into independent propositions and clusters and organizes them according to the semantic relevance of the propositions. It usually relies on advanced natural language processing technology to extract and evaluate key information in the text, and then creates structured data blocks based on this information. The specific steps are as follows:

[0049] S11. Understanding the text: First, a large language model (LLM) is needed to understand the entire text;

[0050] S12. Generate propositions: The large language model decomposes the text into propositions. Propositions are independent viewpoints or pieces of information in the text. Each proposition contains a complete idea or statement. For example, if the original text is an article about a survey and design project, a proposition may be "YY survey and design project carried out in XX";

[0051] S13. Proposition evaluation: The relevance and context of each proposition is evaluated by a large language model, which considers how the proposition is related to other content in the text; for example, the large language model may ask the question "Is this proposition logically connected to the other information blocks I have divided?"

[0052] S14. Create or assign chunks: Based on the evaluation results, the large language model decides whether to put the proposition into an existing chunk of information or to create a new chunk for it; if a proposition is closely related to an existing chunk, it is added to that chunk, and if it is a completely new idea or piece of information, a new chunk is created;

[0053] S15, Iteration and Optimization: The large language model is continuously evaluated and adjusted until the text is effectively segmented into a series of meaningful, interrelated information blocks.

[0054] Experts in the field of survey and design have evaluated that the text blocks after segmentation are complete and meaningful. Since the documents in the field of survey and design are confidential, the locally deployed large model Ollama is used to implement it. Ollama is required to provide two models: a chat model and an embedding model, and both models must support Chinese. Therefore, the chat model qwen2.5:14b and the embedding model nomic-embed-text are selected.

[0055] Ollama uses a context window size of 2048 tokens by default. To process long texts, we need to increase the window size. After comparative tests, for files in the field of survey and design, setting the parameters "num_ctx":32768 and "max_token":8192 is the optimal configuration.

[0056] The step S2 is to use the large language model to identify the entity type, the attribute name list of the entity type, the relationship type, and the attribute name list of the relationship type for each text slice, design relevant prompt words, input the prompt words into the large language model, extract the key entity types, relationship types and their attribute name information, and save the results. The prompt includes prompt words, samples, and output format requirements for entity type identification, relationship type identification, and attribute name list identification. The large language model can automatically identify noun phrases, proper nouns, etc. in the text as candidates for entity types, and identify adjectives and verb phrases that describe entity types as candidates for attribute name lists. By analyzing the sentence structure, the semantic relationship between entities is extracted, and then the relationship type and its attribute name information are extracted. The attribute name list of the entity type of the design specification document for lines, bridges, and tunnels in the field of railway survey and design is specifically as follows: Figure 2 shown.

[0057] The specific steps of step S2 are as follows:

[0058] S21. Design prompt words are used to extract all entity types, relationship types, and attribute name information in the design specification document. The extraction results are required to be as accurate as possible and be able to adapt to texts in different professional fields.

[0059] S22. When looping through different text blocks, duplicate entity types will certainly appear. If an entity type or relationship type that has been identified in the previous text is encountered, it needs to be merged. The merging method is to use a large language model to merge the different attribute name lists of the two entity types or relationship types together. If an entity type or relationship type that has not appeared before is encountered, a new addition operation is performed.

[0060] A series of problems may arise during the extraction process, such as too fine granularity of entity type names, incomplete extraction of attribute name information, and some relationship types already reflected in the attribute names of entity types. To address these problems, it is necessary to further add restrictions to the prompt words, optimize the prompt words, and re-extract them. Therefore, the extraction of entity types, relationship types, and their attribute name information is also an iterative process. Local tuning of prompt words can improve the recognition effect of entity, relationship, and attribute information.

[0061] The entity type filtering in step S3 refers to filtering out entity types related to the survey and design profession from the identified entity types, thereby improving the quality of the knowledge graph, and this will reduce the computational complexity of subsequent entity type normalization. The entity type filtering in the present invention adopts a method combining keyword screening with word frequency-reverse file frequency, and the steps are as follows:

[0062] S31. Collect vocabulary of survey and design majors and organize them into a vocabulary database;

[0063] S32, counting the frequency of each entity type name appearing in the vocabulary, and calculating the word frequency-inverse document frequency value of each entity type name;

[0064] S33. Select entity types with higher word frequency-reverse document frequency values ​​for subsequent steps.

[0065] Entity type normalization means that some entity types refer to the same meaning but have different names. For example, the large language model extracts "bridge" and "bridge". These two entity types have the same meaning in the real world, so they need to be normalized into one. The normalization method is to use the large language model to determine whether the two entity types refer to the same meaning. If so, they are normalized into the same entity type.

[0066] The step S4 is to automatically generate the design specification knowledge graph model. Through the above steps using the large language model, the survey and design specification knowledge graph model can be automatically generated, which consists of entity type, attribute name list of entity type, relationship type, and attribute name list of relationship type. The construction of the knowledge graph model is a gradual iterative improvement process. When new design specification documents are collected, the above process is repeated, and the large language model is used to continuously identify new entity types, relationship types and their attribute name information, and further optimize in the actual application process.

[0067] The knowledge graph model of the survey and design specification generated by the large language model will inevitably have inaccuracies, so manual verification is required to reduce the error rate in the results. The verification in step S5 is specifically to manually verify the knowledge graph model, and let technical experts review and check whether the entity types, relationship types and their attribute information generated by the large language model are accurate; the contents that need to be verified are as follows: whether important entity types are omitted, whether non-entity types are mistakenly identified as entity types, whether the directionality of the relationship is correct, whether the naming of the relationship type conforms to professional terminology, whether the attribute information of the entity type and the relationship type is accurate and complete, and whether the results of entity type filtering and normalization using the large language model are accurate. Through manual verification, accurate information is retained, incomplete information is improved, incomplete and inaccurate information is modified, and unnecessary information is deleted, so as to ensure that the information in the knowledge graph is logically consistent and without contradictions. During the manual verification process, all problems found and audit results are recorded in detail to facilitate tracking the improvement history of the large language model.

[0068] After completing the above steps, the large language model is fine-tuned. The fine-tuning in step S5 is to use the collected and sorted design specification documents in the field of survey and design as the training data set for fine-tuning the large language model, and to annotate the training data set with the knowledge graph pattern data that has been verified in the above steps to provide high-quality training samples. The large language model is fine-tuned using the annotated data set. This process involves adjusting the parameters of the large language model, increasing or decreasing the number of neurons in certain layers, etc. During the fine-tuning process, the performance of the large language model needs to be evaluated, and the evaluation index is the accuracy of the large language model on the validation set. Based on the evaluation results, technical experts will decide whether it is necessary to further adjust the parameters of the large language model or the training data set to better meet the specific needs of the survey and design field. Since the specifications and standards in the field of survey and design may change over time, the model needs to be updated and fine-tuned regularly to ensure that it can always provide the latest and accurate information. The method of fine-tuning the large language model using the verification results will gradually improve the recognition accuracy of the large language model. The higher the accuracy, the less content that needs to be manually verified. In this way, multiple rounds of iterations form a positive cycle, which will greatly reduce the manual dependence in the construction of the knowledge graph model.

[0069] After the above steps, the design specification documents of lines, bridges and tunnels in the field of railway survey and design are processed by the large language model, and the structure diagram of the knowledge graph model of the design specification in the field of survey and design is obtained as follows: Figure 3 shown.

Claims

1. A method for constructing a knowledge graph model of survey and design specifications based on a large language model, characterized in that: The specific steps are as follows: S1. Collect design specification documents in the field of survey and design, and slice the design specification documents to obtain text slices; S2, using a large language model to identify entity types, attribute name lists of entity types, relationship types, and attribute name lists of relationship types for text slices; S3, filtering the entity types by keyword screening, and screening out entity types related to the survey and design profession by calculating the word frequency-inverse document frequency of the entity types; S4, using the large language model to automatically generate a knowledge graph model of survey and design specifications; S5. Verify the survey and design specification knowledge graph model and fine-tune the large language model.

2. The method for constructing a knowledge graph model of survey and design specifications based on a large language model according to claim 1 is characterized in that: The text slicing in the field of survey and design in step S1 is to decompose the text into propositions containing independent viewpoints or information fragments, and cluster and organize them according to the semantic relevance of the propositions. The specific steps are as follows: S11, using the large language model to understand the design specification document in the field of survey and design, and decomposing it to obtain the proposition containing the independent viewpoints or information fragments; S12, using the large language model to evaluate the degree of relevance between the proposition and other contents in the design specification document in the field of survey and design; S13. According to the evaluation result obtained in step S12, the propositions are classified and put into different information blocks.

3. The method for constructing a knowledge graph model of survey and design specifications based on a large language model according to claim 2 is characterized in that: The classification method in step S13 is specifically to add the proposition to semantically related information blocks, and to create a new information block if the proposition is a completely new independent viewpoint or information fragment.

4. The method for constructing a knowledge graph model of survey and design specifications based on a large language model according to claim 1 is characterized in that: The step S2 of identifying the entity type and the relationship type specifically includes: S21, designing prompt words for extracting entity type, relationship type, and attribute name information in the design specification file; S22, input the prompt word to the large language model to determine whether the entity type or relationship type appears repeatedly, and if so, merge them, otherwise, add a new one.

5. The method for constructing a knowledge graph model of survey and design specifications based on a large language model according to claim 4 is characterized in that: The merging in step S22 specifically includes merging two different attribute name lists of the entity types or two different attribute name lists of the relationship types through the large language model.

6. The method for constructing a knowledge graph model of survey and design specifications based on a large language model according to claim 1, characterized in that: The step S3 performs filtering and normalization operations on the entity types, specifically including: S31. Collect vocabulary of survey and design majors and organize them into a vocabulary database; S32, counting the frequency of entity type names appearing in the vocabulary, and calculating the word frequency-inverse document frequency value of each entity type name; S33. Sort the entity type names according to their word frequency-reverse document frequency values, and extract the entity types corresponding to the top 100 word frequency-reverse document frequency values.

7. The method for constructing a knowledge graph model of survey and design specifications based on a large language model according to claim 1 is characterized in that: Specifically, the step S4 includes inputting the newly collected text slices into the large language model, repeating the operations of steps S2 and S3, and using the large language model to identify the new entity type, the attribute name list of the entity type, the relationship type, and the attribute name of the relationship type, to implement step S4 and automatically generate the knowledge graph model of the survey and design specification.

8. The method for constructing a knowledge graph model of survey and design specifications based on a large language model according to claim 1 is characterized in that: The step S5 specifically includes: S51, verifying the survey and design specification knowledge graph model, specifically by manual verification, retaining accurate information, completing incomplete information, modifying inaccurate information, and deleting unnecessary information through the manual verification; at the same time, recording the problems found and the audit results during the manual verification process to track the improvement history of the large language model; S52. Use the collected and organized design specification documents in the field of survey and design as a training data set for fine-tuning the large language model, annotate the training data set with the data of the survey and design specification knowledge graph model that has been verified, and use the annotated data set to fine-tune the large language model.

9. A computer device for survey and design specification knowledge graph model based on a large language model, characterized in that: It includes at least one processor and a memory that is communicatively connected to the at least one processor; the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method for constructing a knowledge graph model of survey and design specifications based on a large language model as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Knowledge graph and schema design method based on specification standard mapping

    CN116701648A