Emergency accident case auxiliary decision-making system construction method based on large model
By constructing vector databases and graph databases based on large models, the problem of inefficient construction of traditional accident case databases is solved, efficient construction and automatic update of accident case databases is realized, and the reliability of the emergency decision-making system is ensured.
Patent Information
- Application Number
- CN202411376350.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-09-30
AI Technical Summary
The construction of traditional accident case databases based on knowledge graphs is inefficient and complex, making it difficult to effectively assist emergency management and decision-making support.
A large-model-based method is used to analyze the target business areas, build a vector database and graph database, and automatically calibrate and update the accident case library by matching historical accident cases and Q&A relationships.
It improves the efficiency and accuracy of the construction of the accident case database, and ensures the comprehensiveness and reliability of the emergency case auxiliary decision-making system.
Smart Images

Figure CN119443226A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a method for constructing an emergency accident case auxiliary decision-making system based on a large model. Background Art
[0002] At present, emergency management work includes some important business areas: monitoring and early warning, command and rescue, and decision support. Emergency accident case assistance usually refers to the process of using historical emergency accident case data to assist emergency management, risk assessment, and prevention work. By analyzing and summarizing historical accident cases, valuable lessons can be obtained to help formulate more effective plans and measures;
[0003] However, the traditional construction of accident case database based on knowledge graph cannot be separated from the abstract ontology modeling work with a deep understanding of business needs and professional knowledge. This work is complicated and inefficient.
[0004] Therefore, in order to overcome the above technical problems, the present invention provides a method for constructing an emergency accident case auxiliary decision-making system based on a large model. Summary of the invention
[0005] The present invention provides a method for constructing an emergency accident case decision-making assistance system based on a large model, which is used to analyze the target business field through the target large model, realize accurate and effective construction of a vector database, match the analysis results with historical accident cases, realize effective determination of the specific association relationship of entity-relationship-entity pairs under the target business field, and construct a graph database based on the determined relationship, so as to facilitate the subsequent construction of the emergency accident case decision-making assistance system. Secondly, by analyzing a number of question-answer pairs and the relationship between the question-answer pairs according to the obtained vector database and graph database, the emergency accident case decision-making assistance system is effectively constructed, the construction efficiency of the accident case library is improved, and question-answer pairs are extracted through periodically introduced relevant accident case investigation reports as an evaluation benchmark library. Based on similarity analysis, the question-answer result evaluation of the construction target knowledge base is performed, and the relevant entity content in the accident case library is revised according to the results, and the accident case library is automatically calibrated and updated, ensuring the comprehensiveness and reliability of the emergency accident case decision-making assistance system.
[0006] A method for constructing an emergency accident case auxiliary decision-making system based on a large model, characterized by comprising:
[0007] Step 1: Read the target business domain, analyze the target business domain based on the target big model, and store the analysis results in the vector database;
[0008] Step 2: Retrieve historical accident cases, match the analysis results in the vector database with the historical accident cases according to the target big model, and import the matching results into the graph database;
[0009] Step 3: Obtain several question-answer pairs and the relationships between them in the target business domain. At the same time, use the relationships between the question-answer pairs as evaluation data sets and save them synchronously in the vector database.
[0010] Step 4: Based on the target big model, several question-answer pairs and evaluation data sets are processed according to the vector database and the graph database, and an emergency accident case decision support system is built according to the processing results.
[0011] Preferably, a method for constructing an emergency accident case auxiliary decision-making system based on a large model, in step 1, reading the target business field, and analyzing the target business field based on the target large model includes:
[0012] Read the target business field to determine the text information of the target business field;
[0013] Analyze and process the text information of the target business field based on the target big model, extract the target entities of the target business field and the initial relationships between the target entities;
[0014] Based on the target macro model, target entities are classified and processed, and conceptual entities are created according to the classification results. The conceptual entities are analyzed according to the target macro model to determine the conceptual relationships between the conceptual entities.
[0015] The target entities, the initial relations between the target entities, the concept entities and the concept relations between the concept entities are stored in a vector database.
[0016] Preferably, a method for constructing an emergency accident case auxiliary decision-making system based on a large model retains in a vector database: a mapping relationship between a concept entity and a target entity, and a mapping relationship between a concept relationship and an initial relationship.
[0017] Preferably, a method for constructing an emergency accident case auxiliary decision-making system based on a large model, in step 2, retrieves historical accident cases, and matches the analysis results in the vector database with the historical accidents according to the target large model, and imports the matching results into the graph database, including:
[0018] S201: Retrieving multiple historical accident cases based on a preset method, and obtaining concept entities and concept relationships in a vector database;
[0019] S202: Match historical accident cases according to concept entities and concept relationships based on the target big model to generate corresponding concept entity-concept relationship-concept entity pairs;
[0020] S203: Revise the concept entity-concept relationship-concept entity pair and import it into the graph database.
[0021] Preferably, a method for constructing an emergency accident case auxiliary decision system based on a large model revises the concept entity-concept relationship-concept entity pair and imports it into a graph database, including:
[0022] Retrieving specific entities under the concept entity in the vector database, matching the specific entities under the concept entity according to the classification, and determining the category similarity between the specific entities under the concept entity and the concept entity-concept relationship-concept entity pair;
[0023] If the category similarity between the specific entity under the concept entity and the concept entities at both ends of the concept relationship in the concept entity-concept relationship-concept entity pair is greater than a preset threshold, the concept entity is replaced with the specific entity, and the concept entity-concept relationship-concept entity pair is revised based on the replacement result to obtain a specific entity-specific relationship-specific entity pair;
[0024] Based on the replacement results, all concrete entity-concrete relationship-concrete entity pairs are imported into the graph database in sequence.
[0025] Preferably, a method for constructing an emergency accident case auxiliary decision-making system based on a large model, in step 3, a plurality of question-answer pairs and the relationship between the question-answer pairs in the target business field are obtained and synchronously saved in a vector database, including:
[0026] Generate several question-answer pairs based on the target big model and the preset prompt engineering, and at the same time, generate the relationship between the question-answer pairs;
[0027] The relationship between question and answer pairs is used as the evaluation dataset;
[0028] Several question-answer pairs and evaluation data sets are synchronously saved into the vector database.
[0029] Preferably, a method for constructing an emergency accident case auxiliary decision-making system based on a large model, before classifying the target entity based on the large model, further includes:
[0030] Perform similarity analysis on target entities based on the large model to obtain the similarity between target entities;
[0031] Obtaining a benchmark similarity, and comparing the similarity between the target entities with the benchmark similarity, and determining, based on the comparison result, that the similarity between the target entities is greater than the duplicate target entity corresponding to the benchmark similarity;
[0032] Duplicate target entities are deduplicated, and the target entities are classified based on the target macro model according to the deduplication results.
[0033] Preferably, a method for constructing an emergency accident case auxiliary decision-making system based on a large model, in step 4, based on the large model, a plurality of question-answer pairs and an evaluation data set are processed according to a vector database and a graph database, and an emergency accident case auxiliary decision-making system is constructed according to the processing results, including:
[0034] Obtain several questions, perform semantic understanding on the questions according to the target large model, and extract the specific entities i in the questions;
[0035] The specific entity i in the question is matched with the specific entities in the graph database by the first similarity with the support of the vector database to obtain the top ten specific entity sets k in similarity ranking;
[0036] Obtain all relations of the top ten specific entity sets k and generate a relation set R, where the relation set R contains multiple relations r;
[0037] Perform a second similarity match based on the relationship between the question-answer pair and the relationship set R, and extract the relationship r with the highest similarity greater than the preset threshold max ;
[0038] According to the specific entity i and the relationship r max Matching specific entities I in the graph database;
[0039] Based on the target large model, semantic understanding is performed on the answers in the evaluation data set to obtain entity sets S corresponding to the answers in multiple evaluation data sets, where the entity set S contains multiple entities s;
[0040] Perform a third similarity match between the entity sets S corresponding to the answers of the multiple evaluation data sets and the specific entity I, and determine whether there is a similarity higher than a preset similarity threshold;
[0041] If there is an entity s with the highest similarity and higher than the preset similarity threshold max , then the corresponding entity s in the answer of the evaluation dataset max Replace entity I as the answer to the current specific entity i to form a specific entity ir max -Entities max , and the specific entity ir max -Entities max Import into graph database;
[0042] Otherwise, the specific entity ir max -Entity I is imported into the graph database;
[0043] Build an emergency case decision support system based on the import results.
[0044] Preferably, a method for constructing an emergency accident case decision-making support system based on a large model further includes:
[0045] Retrieve accident case investigation reports from the preset emergency department management database;
[0046] Obtain the operating environment of the target large model, and analyze the accident case investigation report according to the preset technology in the operating environment of the target large model to build a training text data set;
[0047] Train the target large model based on the training text dataset, and determine the optimal adjustment parameters of the model based on the model loss function;
[0048] The parameters of the target large model are adjusted based on the optimal adjustment parameters of the model to obtain the optimal target large model.
[0049] Preferably, a method for constructing an emergency accident case auxiliary decision-making system based on a large model analyzes and processes text information in a target business field based on a target large model, extracts target entities in the target business field and initial relationships between target entities, including:
[0050] Inputting the first text information of the target business field into the target macro model for format rewriting to obtain the second text information;
[0051] Identify the second text information according to the target large model to obtain multiple key information segments in the second text information;
[0052] Marking multiple key information segments to obtain multiple key information marking labels, and respectively calculating the correlation between each key information marking label and the marking labels of other key information;
[0053] Obtaining a relevance threshold interval, and comparing the relevance between each key information mark label and the remaining key information mark labels with the relevance threshold interval;
[0054] Sequentially associating the marking tags of each key information with the marking tags of other key information whose correlation degree is within the correlation degree threshold range;
[0055] Determine the association relationship between each key information based on the association result;
[0056] Identify each key information based on the target big model, obtain the central vocabulary vector of the key information, and retrieve the industry vector dictionary of the target business field;
[0057] Match the central word vector in the industry vector dictionary. If the central word vector exists in the industry vector dictionary, the central word vector is used as the target entity in the target business field.
[0058] Otherwise, the central vocabulary vector is not used as the target entity of the target business domain;
[0059] Based on the matching results, multiple target entities in the target business field are obtained. At the same time, the association relationship between each key information is associated and mapped in the corresponding target entity to obtain the initial relationship of each target entity.
[0060] Compared with the prior art, the beneficial effects of the present invention are as follows: by analyzing the target business field through the target big model, the vector database is accurately and effectively constructed, and the analysis results are matched with historical accident cases, so as to effectively determine the specific association relationship between entity-relationship-entity pairs in the target business field, and construct a graph database based on the determined relationship, so as to facilitate the subsequent construction of an emergency accident case decision-making support system. Secondly, by analyzing a number of question-answer pairs and the relationship between question-answer pairs based on the obtained vector database and graph database, the emergency accident case decision-making support system is effectively constructed, and the construction efficiency of the accident case library is improved. Question-answer pairs are extracted through periodically introduced relevant accident case investigation reports as an evaluation benchmark library. Based on similarity analysis, the question-answer result evaluation of the target knowledge base is performed, and the relevant entity content in the accident case library is revised according to the results, so as to realize automatic calibration and updating of the accident case library, and ensure the comprehensiveness and reliability of the emergency accident case decision-making support system.
[0061] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures specifically pointed out in this application document.
[0062] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0064] Figure 1 It is a flow chart of a method for constructing an emergency accident case auxiliary decision-making system based on a large model in an embodiment of the present invention;
[0065] Figure 2 This is a flowchart of step 1 in a method for constructing an emergency accident case auxiliary decision-making system based on a large model in an embodiment of the present invention;
[0066] Figure 3This is a flowchart of step 2 in a method for constructing an emergency accident case decision support system based on a large model in an embodiment of the present invention. DETAILED DESCRIPTION
[0067] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0068] Embodiment 1:
[0069] This embodiment provides a method for constructing an emergency accident case auxiliary decision-making system based on a large model. Figure 1 As shown, including:
[0070] Step 1: Read the target business domain, analyze the target business domain based on the target big model, and store the analysis results in the vector database;
[0071] Step 2: Retrieve historical accident cases, match the analysis results in the vector database with the historical accident cases according to the target big model, and import the matching results into the graph database;
[0072] Step 3: Obtain several question-answer pairs and the relationships between them in the target business domain. At the same time, use the relationships between the question-answer pairs as evaluation data sets and save them synchronously in the vector database.
[0073] Step 4: Based on the target big model, several question-answer pairs and evaluation data sets are processed according to the vector database and the graph database, and an emergency accident case decision support system is built according to the processing results.
[0074] In this embodiment, the target business areas may include: monitoring and early warning area, command and rescue area, decision support area, etc.
[0075] In this embodiment, analyzing the target business domain may include: analyzing text information corresponding to the target business domain, and then obtaining target entities, initial relationships between target entities, conceptual entities, and conceptual relationships between conceptual entities (i.e., analysis results) of the target business domain.
[0076] In this embodiment, retrieving historical accident cases and matching the analysis results in the vector database with historical accidents according to the target big model may include: obtaining a certain number of historical accident cases through a third-party public opinion information service or through information collection technology, and using the big model's prompt engineering technology to automatically extract and match according to the already formed concept entities and concept relationships.
[0077] In this embodiment, prompt engineering is used to allow the local large model to generate a number of question-answer pairs covering business areas such as monitoring and early warning, command and rescue, and decision support, and the relationship between these question-answer pairs is given as an evaluation data set, which is synchronously saved in the vector database. Question-answer pairs are formed between questions and answers in the target field, and the relationship between question-answer pairs represents the relationship between questions and answers.
[0078] In this embodiment, the vector database is a database for storing entity-relationship-entity pairs and concept entity-relationship-concept entity pairs in the target business field and the initial relationships between them, wherein the concept entity may be, for example, a car, and the entity may be a car corresponding to each brand, such as a Mercedes-Benz car.
[0079] In this embodiment, the graph database is a database for storing concept graphs generated based on entity-relationship-entity pairs and concept entity-relationship-concept entity pairs.
[0080] In this embodiment, the evaluation data set may be a specific correlation relationship between question-answer pairs, wherein the question-answer pairs are the input content required for auxiliary decision-making of emergency accident cases.
[0081] The working principle and beneficial effects of the above technical solution are: through the target big model to analyze the target business field, to achieve accurate and effective construction of the vector database, and to match the analysis results with historical accident cases, to achieve effective determination of the specific association relationship between entity-relationship-entity pairs in the target business field, and to build a graph database based on the determined relationship, so as to facilitate the subsequent construction of the emergency accident case decision-making support system. Secondly, by analyzing a number of question-answer pairs and the relationship between question-answer pairs based on the obtained vector database and graph database, the emergency accident case decision-making support system is effectively constructed, and the construction efficiency of the accident case library is improved. Question-answer pairs are extracted through the periodic introduction of relevant accident case investigation reports as an evaluation benchmark library. Based on similarity analysis, the question-answer result evaluation of the target knowledge base is performed, and the relevant entity content in the accident case library is revised according to the results, so as to achieve automatic calibration and updating of the accident case library, and ensure the comprehensiveness and reliability of the emergency accident case decision-making support system.
[0082] Embodiment 2:
[0083] Based on Example 1, this example provides a method for constructing an emergency accident case decision-making support system based on a large model. Figure 2 As shown, in step 1, the target business domain is read, and the target business domain is analyzed based on the target big model, including:
[0084] S101: Read the target business field to determine text information of the target business field;
[0085] S102: Analyze and process text information in the target business field based on the target big model, and extract target entities in the target business field and initial relationships between target entities;
[0086] S103: classifying the target entity based on the target macro model, creating a concept entity based on the classification result, and analyzing the concept entity based on the target macro model to determine the concept relationship between the concept entities;
[0087] S104: storing the target entities, the initial relations between the target entities, the concept entities and the concept relations between the concept entities in a vector database.
[0088] In this embodiment, a business field is selected, relevant laws and regulations as well as national and industry standards involved in the field are collected, and a local big model operating environment is constructed using an open source big model. The prompt engineering technology is used to automatically analyze relevant texts according to the conventional subject-predicate-object structure, extract relevant entities and their initial relationships, and save these entities and initial relationships in a vector database.
[0089] Based on the extracted entities and relationships, we continue to use the hint engineering technology of the big model to carry out similarity and deduplication analysis, as well as classification analysis. For the entities that are automatically classified into one category, we use the classification name of the big model as the concept entity, retain the mapping relationship between the concept entity and the specific entity, and save these concept entities and entities in the vector database;
[0090] According to the specific entities under the conceptual entity classification and their relationship with other conceptual entities, the large model prompt engineering technology is used to continue the classification analysis, and the classified relationship names are used as the conceptual relationships between the aforementioned conceptual entities; the mapping relationship between the conceptual relationship and the specific relationship is retained, and these conceptual relationships and relationships are stored in the vector database.
[0091] In this embodiment, the vector database retains: the mapping relationship between the concept entity and the target entity, and the mapping relationship between the concept relationship and the initial relationship.
[0092] In this embodiment, before classifying the target entity based on the large model, the method further includes:
[0093] Perform similarity analysis on target entities based on the large model to obtain the similarity between target entities;
[0094] Obtain a baseline similarity (which is set in advance to measure whether the target entities are consistent), and compare the similarity between the target entities with the baseline similarity, and determine the repeated target entities corresponding to the target entities whose similarity between the target entities is greater than the baseline similarity based on the comparison result;
[0095] Duplicate target entities are deduplicated, and the target entities are classified based on the target macro model according to the deduplication results.
[0096] In this embodiment, the initial relationship is used to represent the association relationship between target entities.
[0097] The beneficial effect of the above technical solution is: by analyzing and processing the text information of the target business field, the target entities and the initial relationship between the target entities, the concept entities and the concept relationship between the concept entities are effectively determined, and they are effectively stored in the vector database, thereby providing data support and guarantee for the construction of the emergency accident case auxiliary decision-making system.
[0098] Embodiment 3:
[0099] Based on Example 1, this example provides a method for constructing an emergency accident case decision-making support system based on a large model. Figure 3 As shown, in step 2, historical accident cases are retrieved, and the analysis results in the vector database are matched with historical accidents according to the target large model, and the matching results are imported into the graph database, including:
[0100] S201: Retrieving multiple historical accident cases based on a preset method, and obtaining concept entities and concept relationships in a vector database;
[0101] S202: Match historical accident cases according to concept entities and concept relationships based on the target big model to generate corresponding concept entity-concept relationship-concept entity pairs;
[0102] S203: Revise the concept entity-concept relationship-concept entity pair and import it into the graph database.
[0103] In this embodiment, the concept entity-concept relationship-concept entity pair is revised and imported into the graph database, including: retrieving the specific entity under the concept entity in the vector database, matching the specific entity under the concept entity according to the classification, and determining the category similarity between the specific entity under the concept entity and the concept entity in the concept entity-concept relationship-concept entity pair; if the category similarity between the specific entity under the concept entity and the concept entities at both ends of the concept relationship in the concept entity-concept relationship-concept entity pair is greater than a preset threshold, the concept entity is replaced with the specific entity, and the concept entity-concept relationship-concept entity pair is revised based on the replacement result to obtain the specific entity-concept relationship-concept entity pair, and all the specific entity-concrete relationship-concrete entity pairs are sequentially imported into the graph database based on the replacement result.
[0104] The working principle and beneficial effects of the above technical solution are: through third-party public opinion information services or through information collection technology, a certain number of historical accident cases are obtained, and the prompt engineering technology of the big model is used to automatically extract and match the already formed concept entities and concept relationships to generate corresponding concept entity-concept relationship-concept entity pairs; the newly generated concept entity-concept relationship-concept entity pairs are revised, and the specific entities under the concept entities in the vector database are retrieved, and the category similarity is compared with the concept entities at both ends of the relationship. If the category similarity between the two specific entities and the concept entity is greater than 90% (that is, the preset threshold), the relationship based on the concept entity is replaced by the specific relationship between the original two specific entities; all the formed specific entity-specific relationship-specific entity pairs are successively imported into the selected graph database, which is helpful to ensure the accuracy and completeness of the graph database, and is conducive to the concretization of the concept relationship, thereby facilitating the effective application of the graph database.
[0105] Embodiment 4:
[0106] Based on Example 1, this example provides a method for constructing an emergency accident case decision support system based on a large model. In step 3, a number of question-answer pairs and the relationship between the question-answer pairs in the target business field are obtained and synchronously saved in a vector database, including:
[0107] Generate several question-answer pairs based on the target big model and the preset prompt engineering, and at the same time, generate the relationship between the question-answer pairs;
[0108] The relationship between question and answer pairs is used as the evaluation dataset;
[0109] Several question-answer pairs and evaluation data sets are synchronously saved into the vector database.
[0110] In this embodiment, the preset prompting project is known in advance and is a strategy for determining the relationship between entities and conceptual entities.
[0111] In this embodiment, prompt engineering is used to allow the local large model to generate a number of question-answer pairs covering business areas such as monitoring and early warning, command and rescue, and decision support (i.e., target business areas), and the relationship between these question-answer pairs is given as an evaluation data set, which is synchronously saved in the vector database.
[0112] The beneficial effect of the above technical solution is: through the target large model, a number of question-answer pairs and the relationship between the question-answer pairs are generated according to the preset prompt project, and the question-answer pairs and the corresponding relationships are saved in the vector database, which effectively guarantees the auxiliary decision-making of emergency accident cases and improves the efficiency of auxiliary decision-making of emergency accident cases.
[0113] Embodiment 5:
[0114] On the basis of Example 2, this embodiment provides a method for constructing an emergency accident case auxiliary decision system based on a large model, which includes, before classifying the target entity based on the large model:
[0115] Perform similarity analysis on target entities based on the large model to obtain the similarity between target entities;
[0116] Obtaining a benchmark similarity, and comparing the similarity between the target entities with the benchmark similarity, and determining, based on the comparison result, that the similarity between the target entities is greater than the duplicate target entity corresponding to the benchmark similarity;
[0117] Duplicate target entities are deduplicated, and the target entities are classified based on the target macro model according to the deduplication results.
[0118] In this embodiment, the benchmark similarity is set in advance and is used to measure whether the similarity between target entities meets the similarity standard, and can be adjusted.
[0119] In this embodiment, the repeated target entity may be the same target entity existing between target entities whose similarity is greater than the reference similarity.
[0120] The beneficial effects of the above technical solution are: ensuring the effectiveness of classifying the target entity and improving the efficiency and accuracy of classifying the target entity.
[0121] Embodiment 6:
[0122] On the basis of Example 1, this embodiment provides a method for constructing an emergency accident case decision-making support system based on a large model. In step 4, a plurality of question-answer pairs and an evaluation data set are processed according to a vector database and a graph database based on the large model, and an emergency accident case decision-making support system is constructed according to the processing results, including:
[0123] Obtain several questions, perform semantic understanding on the questions according to the target large model, and extract the specific entities i in the questions;
[0124] The specific entity i in the question is matched with the specific entities in the graph database by the first similarity with the support of the vector database to obtain the top ten specific entity sets k in similarity ranking;
[0125] Obtain all relations of the top ten specific entity sets k and generate a relation set R, where the relation set R contains multiple relations r;
[0126] Perform a second similarity match based on the relationship between the question-answer pair and the relationship set R, and extract the relationship r with the highest similarity greater than the preset threshold max ;
[0127] According to the specific entity i and the relationship r max Matching specific entities I in the graph database;
[0128] Based on the target large model, semantic understanding is performed on the answers in the evaluation data set to obtain entity sets S corresponding to the answers in multiple evaluation data sets, where the entity set S contains multiple entities s;
[0129] Perform a third similarity match between the entity sets S corresponding to the answers of the multiple evaluation data sets and the specific entity I, and determine whether there is a similarity higher than a preset similarity threshold;
[0130] If there is an entity s with the highest similarity and higher than the preset similarity threshold max , then the corresponding entity s in the answer of the evaluation dataset max Replace entity I as the answer to the current specific entity i to form a specific entity ir max -Entities max , and the specific entity ir max -Entities max Import into graph database;
[0131] Otherwise, the specific entity ir max -Entity I is imported into the graph database;
[0132] Build an emergency case decision support system based on the import results.
[0133] The working principle and beneficial effects of the above technical solution are: using the local large model to semantically understand the questions and extract entities in turn, and perform similarity matching with the entities in the graph database with the support of the vector database, obtaining the top 10 entities, and obtaining all the relationships between these entities, recorded as the relationship set R; then using the relationship obtained in step 6 to perform similarity matching with the relationships in R, taking the relationship with the highest similarity higher than 90% (that is, the preset similarity threshold), and obtaining the entity I at the other end of the relationship in the graph database; then using the local large model to semantically understand the answers in the evaluation data set to extract entities, and perform similarity matching between I and these entities, for the one with the highest similarity higher than 90%, directly replace the entity I in the graph database with the entity extracted from the answer of the evaluation data set; otherwise, importing the new entity-relationship-entity pair into the graph database, effectively realizing the accuracy and effectiveness of the construction of the emergency case decision-making support system, and providing reliable and effective guarantee for the operation of the emergency case decision-making support system.
[0134] Embodiment 7:
[0135] Based on Example 1, this embodiment provides a method for constructing an emergency accident case decision-making support system based on a large model, further comprising:
[0136] Retrieve accident case investigation reports from the preset emergency department management database;
[0137] Obtain the operating environment of the target large model, and analyze the accident case investigation report according to the preset technology in the operating environment of the target large model to build a training text data set;
[0138] Train the target large model based on the training text dataset, and determine the optimal adjustment parameters of the model based on the model loss function;
[0139] The parameters of the target large model are adjusted based on the optimal adjustment parameters of the model to obtain the optimal target large model.
[0140] In this embodiment, accident case investigation reports of emergency departments are obtained through local government public information platforms, and the local large model operating environment constructed above is used to build a training text data set based on SFT technology or LoRA technology to adjust the large model.
[0141] In this embodiment, the model loss function may be set in advance, such as a cross entropy loss function, and the parameter adjustment of the target large model is implemented through the model loss function, thereby implementing the adjustment of the target large model.
[0142] The beneficial effect of the above technical solution is: by retrieving the accident case investigation report from the preset emergency department management library and analyzing it to obtain a training text data set, the target large model is trained through the training text data, and based on the model loss function, it is enabled to have the ability to understand the field of emergency accident cases.
[0143] Embodiment 8:
[0144] Based on Example 2, this embodiment provides a method for constructing an emergency accident case auxiliary decision-making system based on a large model, which analyzes and processes text information in a target business field based on a target large model, extracts target entities in the target business field and initial relationships between target entities, including:
[0145] Inputting the first text information of the target business field into the target macro model for format rewriting to obtain the second text information;
[0146] Identify the second text information according to the target large model to obtain multiple key information segments in the second text information;
[0147] Marking multiple key information segments to obtain multiple key information marking labels, and respectively calculating the correlation between each key information marking label and the marking labels of other key information;
[0148] Obtaining a relevance threshold interval, and comparing the relevance between each key information mark label and the remaining key information mark labels with the relevance threshold interval;
[0149] Sequentially associating the marking tags of each key information with the marking tags of other key information whose correlation degree is within the correlation degree threshold range;
[0150] Determine the association relationship between each key information based on the association result;
[0151] Identify each key information based on the target big model, obtain the central vocabulary vector of the key information, and retrieve the industry vector dictionary of the target business field;
[0152] Match the central word vector in the industry vector dictionary. If the central word vector exists in the industry vector dictionary, the central word vector is used as the target entity in the target business field.
[0153] Otherwise, the central vocabulary vector is not used as the target entity of the target business domain;
[0154] Based on the matching results, multiple target entities in the target business field are obtained. At the same time, the association relationship between each key information is associated and mapped in the corresponding target entity to obtain the initial relationship of each target entity.
[0155] In this embodiment, the format rewriting may be to rewrite the first text information into a format that can be analyzed and recognized by the large model, thereby obtaining the second text information.
[0156] In this embodiment, the first text information may be specific text content corresponding to monitoring, early warning, command and rescue, etc. in the target business field.
[0157] In this embodiment, the second text information may be data with the same content but in a different format obtained by converting the format of the first text information in the target business field in the target macro model.
[0158] In this embodiment, the key information segment may be a core data segment corresponding to the second text information determined after the second text information is identified by the target macro model.
[0159] In this embodiment, the marking label may be a marking symbol for distinguishing different key information.
[0160] In this embodiment, the correlation degree is used to measure the degree of subordination between different key information. A larger value indicates a stronger correlation between the key information.
[0161] In this embodiment, the correlation threshold interval is set in advance and is used as a basis for measuring whether different key information satisfies the correlation, and can be adjusted.
[0162] In this embodiment, the central vocabulary vector may be the main data content of each key information.
[0163] In this embodiment, the industry vector dictionary is pre-set and is used to represent all data text contents existing in the target business field, that is, specific data information corresponding to different entities.
[0164] In this embodiment, the association mapping may be to limit the association relationship of different target entity times according to the association relationship between key information corresponding to the data content in the target business field, wherein the key information corresponds to the target entity.
[0165] The working principle and beneficial effects of the above technical solution are: by processing the text information of the target business field, the target entity is effectively acquired, and the effectiveness and accuracy of the target entity extraction are improved. At the same time, through the association relationship between each key information, the association mapping is performed in the corresponding target entity, so that the initial relationship of each target entity is obtained more accurately, which effectively ensures the comprehensiveness and effectiveness of the construction of the emergency accident case decision support system.
[0166] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A method for constructing an emergency accident case auxiliary decision-making system based on a large model, characterized in that: include: Step 1: Read the target business domain, analyze the target business domain based on the target big model, and store the analysis results in the vector database; Step 2: Retrieve historical accident cases, match the analysis results in the vector database with the historical accident cases according to the target big model, and import the matching results into the graph database; Step 3: Obtain several question-answer pairs and the relationships between them in the target business domain. At the same time, use the relationships between the question-answer pairs as evaluation data sets and save them synchronously in the vector database. Step 4: Based on the target big model, several question-answer pairs and evaluation data sets are processed according to the vector database and the graph database, and an emergency accident case decision support system is built according to the processing results.
2. According to claim 1, a method for constructing an emergency accident case decision-making support system based on a large model is characterized in that: In step 1, the target business domain is read and analyzed based on the target big model, including: Read the target business field to determine the text information of the target business field; Analyze and process the text information of the target business field based on the target big model, extract the target entities of the target business field and the initial relationships between the target entities; Based on the target macro model, target entities are classified and processed, and conceptual entities are created according to the classification results. The conceptual entities are analyzed according to the target macro model to determine the conceptual relationships between the conceptual entities. The target entities, the initial relations between the target entities, the concept entities and the concept relations between the concept entities are stored in a vector database.
3. The method for constructing an emergency accident case decision-making support system based on a large model according to claim 2 is characterized in that: The vector database retains: the mapping relationship between concept entities and target entities, and the mapping relationship between concept relations and initial relations.
4. The method for constructing an emergency accident case decision-making support system based on a large model according to claim 1 is characterized in that: In step 2, historical accident cases are retrieved, and the analysis results in the vector database are matched with historical accidents according to the target big model, and the matching results are imported into the graph database, including: S201: Retrieving multiple historical accident cases based on a preset method, and obtaining concept entities and concept relationships in a vector database; S202: Match historical accident cases according to concept entities and concept relationships based on the target big model to generate corresponding concept entity-concept relationship-concept entity pairs; S203: Revise the concept entity-concept relationship-concept entity pair and import it into the graph database.
5. The method for constructing an emergency accident case decision-making support system based on a large model according to claim 4 is characterized in that: Revise the concept entity-concept relationship-concept entity pair and import it into the graph database, including: Retrieving specific entities under the concept entity in the vector database, matching the specific entities under the concept entity according to the classification, and determining the category similarity between the specific entities under the concept entity and the concept entity-concept relationship-concept entity pair; If the category similarity between the specific entity under the concept entity and the concept entities at both ends of the concept relationship in the concept entity-concept relationship-concept entity pair is greater than a preset threshold, the concept entity is replaced with the specific entity, and the concept entity-concept relationship-concept entity pair is revised based on the replacement result to obtain a specific entity-specific relationship-specific entity pair; Based on the replacement results, all concrete entity-concrete relationship-concrete entity pairs are imported into the graph database in sequence.
6. The method for constructing an emergency accident case decision-making support system based on a large model according to claim 1, characterized in that: In step 3, several question-answer pairs and the relationships between question-answer pairs in the target business domain are obtained and saved synchronously in the vector database, including: Generate several question-answer pairs based on the target big model and the preset prompt engineering, and at the same time, generate the relationship between the question-answer pairs; The relationship between question and answer pairs is used as the evaluation dataset; Several question-answer pairs and evaluation data sets are synchronously saved into the vector database.
7. The method for constructing an emergency accident case decision-making support system based on a large model according to claim 2, characterized in that: Before classifying the target entity based on the large model, it also includes: Perform similarity analysis on target entities based on the large model to obtain the similarity between target entities; Obtaining a benchmark similarity, and comparing the similarity between the target entities with the benchmark similarity, and determining, based on the comparison result, that the similarity between the target entities is greater than the duplicate target entity corresponding to the benchmark similarity; Duplicate target entities are deduplicated, and the target entities are classified based on the target macro model according to the deduplication results.
8. The method for constructing an emergency accident case decision-making support system based on a large model according to claim 1, characterized in that: In step 4, a number of question-answer pairs and evaluation data sets are processed based on the large model according to the vector database and the graph database, and an emergency accident case decision support system is constructed according to the processing results, including: Obtain several questions, perform semantic understanding on the questions according to the target large model, and extract the specific entities i in the questions; The specific entity i in the question is matched with the specific entities in the graph database by the first similarity with the support of the vector database to obtain the top ten specific entity sets k in similarity ranking; Obtain all relations of the top ten specific entity sets k and generate a relation set R, where the relation set R contains multiple relations r; Perform a second similarity match based on the relationship between the question-answer pair and the relationship set R, and extract the relationship r with the highest similarity greater than the preset threshold max ; According to the specific entity i and the relationship r max Matching specific entities I in the graph database; Based on the target large model, semantic understanding is performed on the answers in the evaluation data set to obtain entity sets S corresponding to the answers in multiple evaluation data sets, where the entity set S contains multiple entities s; Perform a third similarity match between the entity sets S corresponding to the answers of the multiple evaluation data sets and the specific entity I, and determine whether there is a similarity higher than a preset similarity threshold; If there is an entity s with the highest similarity and higher than the preset similarity threshold max , then the corresponding entity s in the answer of the evaluation dataset max Replace entity I as the answer to the current specific entity i to form a specific entity ir max -Entities max , and the specific entity ir max -Entities max Import into graph database; Otherwise, the specific entity ir max -Entity I is imported into the graph database; Build an emergency case decision support system based on the import results.
9. The method for constructing an emergency accident case decision-making support system based on a large model according to claim 1, characterized in that: Also includes: Retrieve accident case investigation reports from the preset emergency department management database; Obtain the operating environment of the target large model, and analyze the accident case investigation report according to the preset technology in the operating environment of the target large model to build a training text data set; Train the target large model based on the training text dataset, and determine the optimal adjustment parameters of the model based on the model loss function; The parameters of the target large model are adjusted based on the optimal adjustment parameters of the model to obtain the optimal target large model.
10. The method for constructing an emergency accident case decision-making support system based on a large model according to claim 2, characterized in that: Analyze and process the text information of the target business field based on the target big model, extract the target entities of the target business field and the initial relationships between the target entities, including: Inputting the first text information of the target business field into the target macro model for format rewriting to obtain the second text information; Identify the second text information according to the target large model to obtain multiple key information segments in the second text information; Marking multiple key information segments to obtain multiple key information marking labels, and respectively calculating the correlation between each key information marking label and the marking labels of other key information; Obtaining a relevance threshold interval, and comparing the relevance between each key information mark label and the remaining key information mark labels with the relevance threshold interval; Sequentially associating the marking tags of each key information with the marking tags of other key information whose correlation degree is within the correlation degree threshold range; Determine the association relationship between each key information based on the association result; Identify each key information based on the target big model, obtain the central vocabulary vector of the key information, and retrieve the industry vector dictionary of the target business field; Match the central word vector in the industry vector dictionary. If the central word vector exists in the industry vector dictionary, the central word vector is used as the target entity in the target business field. Otherwise, the central vocabulary vector is not used as the target entity of the target business domain; Based on the matching results, multiple target entities in the target business field are obtained. At the same time, the association relationship between each key information is associated and mapped in the corresponding target entity to obtain the initial relationship of each target entity.
Citation Information
Patent Citations
Intelligent question answering method for adverse drug reaction by fusing multi-channel text features
CN108984699A
Government affair service field multi-strategy fusion dialogue method based on knowledge graph
CN116628172A
Document-based petrochemical industry hazardous chemical substance reservoir area knowledge graph construction method
CN117112805A
Field soil pollution question-answering system and question-answering method based on knowledge graph
CN117131184A
Power file question and answer type intelligent retrieval method and system
CN117171333A