A large model-based knowledge graph fuzzy question answering method, storage medium and device

CN123014159APending Publication Date: 2026-10-30FUJIAN NINGDE NUCLEAR POWER
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611069719.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-17
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

该方法又完全依赖大模型进行问题分解,若大模型在复杂问题上分解错误(如遗漏关键子问题或生成无关子问题),会导致最终答案偏离正确路径

Benefits of technology

本发明通过抽取用户问题中的实体并筛选出高置信度实体集,再匹配筛选出关联的高概率三元组集合,随后构建并筛选可用候选路径,最终利用大语言模型依据路径信息生成答复,可依托结构化知识图谱厘清实体间的关联逻辑,防止大语言模型生成内容产生幻觉问题,同时借助多轮置信度筛选缩小候选范围,提高推理效率与答复准确性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123014159A_ABST
    Figure CN123014159A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of large models, in particular to a knowledge graph fuzzy question answering method based on a large model, a storage medium and equipment. The knowledge graph fuzzy question answering method based on the large model comprises the following steps: obtaining a user question; obtaining a core entity set from the user question; obtaining a candidate entity set based on the core entity set; calculating the candidate confidence of each candidate entity in the candidate entity set; selecting the first preset number of candidate entities as a high-confidence entity set; obtaining a structured triple set based on the high-confidence entity set; calculating based on the structured triple set to obtain a high-probability triple set; constructing all candidate paths and the path confidence of each candidate path; judging whether the path confidence meets a preset confidence condition to obtain available candidate paths; and inputting the user question, the available candidate paths and the path confidence into a preset large language model to obtain a question reply. The application can improve reasoning efficiency and reply accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of large model technology, and in particular to a fuzzy question-answering method, storage medium and device based on a knowledge graph of a large model. Background Technology

[0002] With the improvement of large-scale model text generation capabilities, large-scale models are used to uniformly complete and classify user questions based on contextual semantics. These are categorized into querying knowledge graphs, calling service APIs, and document content understanding. The results of these calls are summarized and refined by a large language model, ultimately achieving automatic answer generation. Using large-scale models to rewrite questions supplements the implicit semantic information within the questions to some extent, but this depends on the quality of the rewritten questions and cannot avoid the "large-scale model illusion" problem.

[0003] However, this method decomposes multi-hop problems into sub-problems using a large model, providing the problem subgraphs and reasoning paths to the large model. The large model iteratively decomposes the problem until it can no longer provide sub-problems. During this process, the problem subgraphs of subsequent problems of all sub-problems are merged with the problem subgraphs of previous problems to achieve dynamic expansion of the problem subgraphs. Finally, all paths are textualized and input into the large model to generate the final answer. This method, however, relies entirely on the large model for problem decomposition. If the large model decomposes complex problems incorrectly (e.g., omitting key sub-problems or generating irrelevant sub-problems), the final answer will deviate from the correct path. Furthermore, iterative decomposition requires multiple calls to the large model, leading to response delays and making it difficult to meet real-time question-answering requirements. Summary of the Invention

[0004] The technical problem to be solved by the present invention is to provide a fuzzy question answering method, storage medium and device based on a large model knowledge graph.

[0005] The technical solution adopted by this invention to solve its technical problem is: a fuzzy question answering method based on a large model knowledge graph, comprising the following steps: S10, Obtain user questions; S20, use the named entity recognition model to obtain the core entity set from the user question; S30, Based on the core entity set, obtain a candidate entity set from a preset knowledge base; S40, Based on the core entity set and the user question, calculate the candidate confidence of each candidate entity in the candidate entity set using a semantic vectorization model; S50, sort the candidates according to their confidence levels and select the first preset number of candidate entities as the high-confidence entity set; S60, In the preset knowledge graph, perform multi-hop triple retrieval on the high-confidence entity set to obtain a structured triple set; S70, the structured triple set is calculated using a hybrid relation matching algorithm to obtain a high-probability triple set; S80, based on the preset large language model, combined with the high-confidence entity set and the high-probability triple set, construct all candidate paths and calculate the path confidence of each candidate path; determine whether the path confidence meets the preset confidence conditions, and obtain the available candidate paths; S90, input the user question, the available candidate paths, and the path confidence into the preset large language model to obtain the question answer.

[0006] Optionally, S30 includes: S31, Use the semantic vectorization model to generate the context vector set for each core entity in the core entity set; S32, Based on the context vector set, obtain the candidate entity set from the preset knowledge base.

[0007] Optionally, S40 includes: S41, using the semantic vectorization model to generate the question vector of the user's question; S42, using the semantic vectorization model to generate a candidate vector for each candidate entity in the candidate entity set; S43, according to the hybrid entity confidence index calculation method, combining the question vector, the context vector set, and the candidate vector, the candidate confidence of each candidate entity is obtained.

[0008] Optionally, S50 includes: S51, sort the candidate entities in descending order of their confidence levels, and select the first preset number of candidate entities as the high-confidence entity set.

[0009] Optionally, S60 includes: In the knowledge graph, the structured triples are obtained by traversing each candidate entity in the high-confidence entity set according to 3-hop edges.

[0010] Optionally, S70 includes: Relations are extracted from each triplet list in the structured triplet set to obtain a list of relation attributes; The hybrid relation matching algorithm is used to calculate the confidence score between each element in the relation attribute list and the user question; Based on the confidence scores, the set of high-probability triples is obtained.

[0011] Optionally, S80 includes: By combining the set of high-confidence entities and the set of high-probability triples, all candidate paths are constructed; The confidence scores of all candidate paths are calculated using the preset large language model to obtain the path confidence score of each candidate path. Determine whether the path confidence score is greater than a preset confidence score. If it is greater, the candidate path corresponding to the path confidence score is the available candidate path.

[0012] Optionally, S90 includes: The accuracy of the available candidate paths is evaluated using the preset large language model based on the prompt words, and the evaluation result is obtained. The evaluation results, the user question, the available candidate paths, and the path confidence are input into the preset large language model to obtain the question answer.

[0013] The present invention also provides a computer-readable storage medium storing a computer program adapted for loading by a processor to perform the steps of the knowledge graph fuzzy question answering method based on a large model as described in any of the preceding claims.

[0014] The present invention also provides a computer device, including a memory and a processor; The memory contains computer programs; The processor executes the steps of the knowledge graph fuzzy question answering method based on a large model as described above by calling the computer program stored in the memory.

[0015] The implementation of this invention has the following beneficial effects: This invention extracts entities from user questions and filters out a set of high-confidence entities, then matches and filters out a set of associated high-probability triples. Subsequently, it constructs and filters available candidate paths, and finally uses a large language model to generate a response based on the path information. It can rely on structured knowledge graphs to clarify the logical relationships between entities, prevent the content generated by the large language model from creating illusion problems, and at the same time, it narrows the candidate range by using multiple rounds of confidence filtering, thereby improving reasoning efficiency and response accuracy. Attached Figure Description

[0016] The present invention will be further described below with reference to the accompanying drawings and embodiments: Figure 1 This is a flowchart of a knowledge graph fuzzy question answering method based on a large model in one embodiment. Detailed Implementation

[0017] To provide a clearer understanding of the technical features, objectives, and effects of the present invention, specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0018] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of the invention. However, those skilled in the art will understand that the invention can be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods are omitted so as not to obscure the description of the invention with unnecessary detail.

[0019] This invention provides a fuzzy question-answering method based on a large model knowledge graph, such as... Figure 1 As shown, it includes the following steps: S10, Obtaining user issues.

[0020] User issues can be obtained through front-end interaction data collection or back-end log capture.

[0021] S20 uses a named entity recognition model to obtain the core entity set from the user's question.

[0022] Specifically, the user's question is first segmented into words, and then the segmentation results are input into a trained named entity recognition model to identify the entity types and content involved in the question. After filtering out irrelevant components such as question words and stop words, the model is integrated to obtain a core entity set that contains only the core information of the question.

[0023] In some embodiments, BERT-CRF is used as a named entity recognition model.

[0024] The BERT-CRF model is used to carry out named entity recognition tasks. Relying on BERT's powerful bidirectional contextual semantic modeling capabilities, it fully explores the deep semantic features of the text and effectively solves the problems of polysemy and long-distance dependency. At the same time, the CRF layer is combined to apply legal jump constraints to the sequence labels, and global decoding is used to optimize the label coherence, avoid illegal label combinations and entity boundary misjudgments, and finally achieve a dual improvement in entity recognition accuracy and sequence rationality.

[0025] S30: Based on the core entity set, obtain the candidate entity set from the preset knowledge base.

[0026] Specifically, each entity in the core entity set is fuzzily matched with knowledge graph entities stored in a pre-defined knowledge base. Entities with a similarity score higher than a pre-defined threshold are all included in the candidate entity set. This ensures that no semantically related potential matching entities are missed, avoids matching failures due to expression biases in the core entities, and improves matching accuracy. It is understandable that a knowledge graph contains not only knowledge graph entities but also information such as relationships and attributes.

[0027] S40, based on the core entity set and the user question, uses a semantic vectorization model to calculate the candidate confidence of each candidate entity in the candidate entity set.

[0028] The vector similarity between the candidate entity and its corresponding core entity context representation, and the vector similarity between the candidate entity and the user question are calculated separately. These are then weighted and fused together with the candidate entity's importance score in the knowledge graph to obtain the candidate confidence score. A higher candidate confidence score indicates a better match between the candidate entity and the core entity and semantics of the user question.

[0029] By calculating the edit distance and semantic similarity between the candidate entity and the corresponding core entity, the final confidence score of the candidate entity is obtained. The higher the score, the higher the degree of matching between the candidate entity and the core entity in the user's question.

[0030] S50: Sort by candidate confidence level and select the first preset number of candidate entities as the high confidence entity set.

[0031] Candidate entities are sorted from highest to lowest confidence level, and the top N candidate entities with the highest confidence levels are selected.

[0032] S60, in the preset knowledge graph, perform multi-hop triple retrieval on the high-confidence entity set to obtain a structured triple set.

[0033] Based on the triple information associated with each selected candidate entity in the knowledge graph, the corresponding candidate answer set is extracted.

[0034] S70 uses a hybrid relation matching algorithm to calculate the set of structured triples, obtaining a set of high-probability triples.

[0035] Specifically, a hybrid relation matching algorithm is used to calculate the vector similarity between each relation or attribute in the structured triple and the user's question, and to obtain the relation matching score by combining the importance score of the relation or attribute in the knowledge graph. Triples with relation matching scores higher than the preset relation matching threshold are selected and integrated to obtain a set of high-probability triples.

[0036] S80, based on a pre-set large language model, combines a high-confidence entity set and a high-probability triple set to construct all candidate paths and calculate the path confidence of each candidate path; it then determines whether the path confidence meets the pre-set confidence conditions to obtain usable candidate paths.

[0037] The pre-defined large language model is a generative language model trained based on the Transformer architecture, possessing capabilities in natural language semantic understanding, instruction following, contextual reasoning, and structured result generation. The selection of the pre-defined large language model should at least consider Chinese semantic understanding capabilities, knowledge graph path reasoning capabilities, structured scoring result output capabilities, context window length, inference response speed, and deployment environment. The pre-defined large language model can be a locally deployed large language model or a large language model invoked through a server interface; this application does not impose any restrictions on the specific model type or parameter scale of the pre-defined large language model.

[0038] Specifically, each high-confidence entity is used as the starting point of the path. All associated high-probability triples are traversed to generate a complete candidate path from the starting point to the target entity. The user question, candidate paths, the confidence levels of the candidate entities corresponding to the candidate paths, and the relational matching scores of the triples contained in the candidate paths are organized according to preset prompts and input into a preset large language model. The preset large language model understands the semantic intent of the user question and the knowledge content expressed by the candidate paths. It comprehensively evaluates the candidate paths based on their semantic relevance to the user question, the logical coherence of entities and relations within the paths, and the degree to which the candidate paths support the answer to the question, outputting the path confidence level for each candidate path. It then determines whether the path confidence level meets preset confidence conditions, and identifies candidate paths that meet these conditions as usable candidate paths.

[0039] S90: Input the user's question, available candidate paths, and path confidence into the preset large language model to obtain the question answer.

[0040] Before inputting user questions, available candidate paths, and path confidence into the preset large language model, multiple available candidate paths can be sorted from high to low according to path confidence. A preset number of sorted candidate paths can then be input into the large language model, reducing the processing pressure on the large language model and improving the efficiency of response generation.

[0041] This invention first extracts entities from user questions and filters them to obtain a set of high-confidence entities. Then, it matches and filters to obtain a set of associated high-probability triples. Subsequently, it constructs and filters out available candidate paths. Finally, it uses a large language model to generate a response based on the path information. It can rely on structured knowledge graphs to clarify the relationship logic between entities, avoid the illusion problem in the content generated by the large language model, and narrow down the candidate range through multiple rounds of confidence filtering, thereby improving reasoning efficiency and response accuracy.

[0042] In some embodiments, S30 includes: S31, using a semantic vectorization model to generate a context vector set for each core entity in the core entity set.

[0043] Specifically, each core entity is input into a pre-trained semantic vectorization model, which can learn the semantic features of the entity in the knowledge graph context and output a real-meaning vector with a fixed dimension. The real-meaning vectors corresponding to all core entities together form a context vector set, which facilitates subsequent matching calculations based on vector similarity.

[0044] The semantic vectorization model is a text encoding model trained based on the Transformer architecture. It is used to convert text such as user questions, entities, relationships, or attributes into dense vectors of fixed dimensions, making semantically similar texts closer together in the vector space. The semantic vectorization model can adopt the Sentence-BERT model or other pre-trained models with text vector representation capabilities. This application does not limit the specific model type and vector dimension of the semantic vectorization model. In this embodiment, the semantic vectorization model is used for vector representation and similarity calculation in S30, S40, and S70. The preset large language model is used for candidate path evaluation and path confidence calculation in S80, and question answer generation in S90. In S32, a candidate entity set is obtained from a preset knowledge base based on the context vector set.

[0045] Specifically, each entity in the knowledge graph is given a corresponding storage vector. The similarity between the semantic vector of each core entity in the context vector set and the storage vector of each entity in the knowledge graph is calculated. Entities with similarity higher than a preset threshold are selected and integrated and deduplicated to obtain a candidate entity set, which is used for further mining of the relationship paths between entities.

[0046] In one embodiment, taking the power scenario as an example, the user question Q is "How to handle abnormal sound from the main transformer?", and the core entity is extracted based on Q. .

[0047] core entity context vector Retrieve candidate entity sets from knowledge graphs .

[0048] In this context, each context vector corresponds to a set of candidate entities.

[0049] In some embodiments, S40 includes: S41 uses a semantic vectorization model to generate question vectors for user questions.

[0050] The user question is input as a whole into the trained semantic vectorization model. The overall semantic features contained in the user question are extracted, and the output question vector with the same dimension as the entity context vector is used to calculate the semantic matching degree between the candidate entity and the user question.

[0051] In some scenarios, Sentence-BERT (denoted as SBERT) is used to generate a vector of the query sentence Q. As a problem vector.

[0052] S42 uses a semantic vectorization model to generate a candidate vector for each candidate entity in the candidate entity set.

[0053] Specifically, each candidate entity in the candidate entity set is input into the trained semantic vectorization model in turn. After extracting the semantic features corresponding to each candidate entity, a single candidate vector with the same dimension as the question vector is output. All candidate vectors are integrated to obtain the candidate vector.

[0054] In some scenarios, each candidate entity in the candidate entity set is processed according to Sentence-BERT, resulting in a set of vector representations for each candidate entity. The vectors of all candidate entities in a candidate entity set are... .

[0055] S43. Based on the mixed entity confidence index calculation method, the candidate confidence of each candidate entity is obtained by combining the question vector, context vector set and candidate vector.

[0056] Specifically, based on the hybrid entity confidence index calculation method, the similarity between the question vector and the candidate vector of each candidate entity is calculated to obtain the candidate confidence.

[0057] The formula for calculating the confidence index of mixed entities is as follows: .

[0058] In the formula, These are learnable parameters; This is a function for calculating vector similarity. A function for calculating the importance score of candidate entities in the PageRank algorithm. This is the vector representation of the i-th core entity; core entity The context vector representation; Candidate entities Vector representation of; The question vector representation of the user's question Q; Let j be the j-th candidate entity.

[0059] The formula for calculating vector similarity is as follows: In the formula, core entity The context vector representation; Candidate entities Vector representation of; The question vector representation of the user's question Q; Let j be the j-th candidate entity; for and Similarity; for L1 norm multiplied by The L1 norm, It is the L2 norm of the difference between the core entity context vector and the candidate entity vector.

[0060] The formula for the function that calculates the importance score of candidate entities using the PageRank algorithm is as follows: In the formula, Candidate entities The PageRank value is obtained through an iterative formula. The calculation yielded, where Let M be the PageRank vector of all entities at the i-th iteration, M be the transition probability matrix, and N be the total number of entities. For the damping coefficient, iterate until... Convergence occurs over time; Let be the vector representation of the j-th entity; This is the vector representation of the nth entity.

[0061] Taking the power scenario as an example, candidate entity set =["#1 main transformer", "station service transformer", "#2 main transformer", ..., "oil-immersed transformer"], calculate the confidence level of the candidate entities to obtain .

[0062] In some embodiments, S50 includes: S51, sort the candidate entities in descending order of their confidence level, and select the first preset number of candidate entities as the high-confidence entity set.

[0063] After generating and evaluating the confidence levels of candidate entities, they are first sorted from highest to lowest confidence level. Then, based on a pre-set threshold, a predetermined number of top-ranking candidate entities are selected from the sorted list. Finally, these selected entities are aggregated to form a high-confidence entity set.

[0064] Taking the power scenario as an example, the top 3 are sorted in descending order. =["#1 main transformer", "station service transformer", "#2 main transformer", ..., "oil-immersed transformer"].

[0065] In some embodiments, S60 includes: In the knowledge graph, structured triples are obtained by traversing each candidate entity in the high-confidence entity set according to 3-hop edges.

[0066] Understandably, starting with each candidate entity in the high-confidence entity set, the knowledge graph extends outward along the edges connecting entities in its network structure. The first hop traverses the first-order adjacent entities and their corresponding relationships directly connected to the starting entity, generating the first set of triples. The second hop starts from the first-order adjacent entities and continues traversing the second-order adjacent entities and their corresponding relationships connected to these entities, supplementing the second set of triples. The third hop starts from the second-order adjacent entities and traverses the third-order adjacent entities and their corresponding relationships, obtaining the third set of triples. After merging all the triples obtained from the traversal, we get the structured triples related to the corresponding candidate entity. These triples can completely cover the core knowledge range related to the target entity. They avoid missing key information due to too few traversal hops, and also avoid introducing a large amount of irrelevant redundant knowledge due to an excessively large traversal range. This provides accurate and sufficient knowledge support for subsequent problem analysis.

[0067] Specifically, the first-order adjacent entities directly connected to the starting entity and their corresponding relationships are considered as candidate entities in the first hop traversal. And its direct attributes; the second hop starts from the first-order adjacent entities and continues to traverse the second-order adjacent entities connected to these entities and their corresponding relationships. The first hop involves directly connected nodes, their attributes, and relation types. The third hop starts from the second-order adjacency entity and traverses the third-order adjacency entities and their corresponding adjacent nodes, attributes, and relations that are the second-hop nodes, thus obtaining a set of candidate triples. .

[0068] Furthermore, the triplet This is a spo triple. Here, s represents the head entity, p represents the relation or attribute, and o represents the tail entity or attribute value of the relation.

[0069] Taking the power scenario as an example, according to ,get ={[{"s":"#1 main transformer","p":"model","o":"S11-5000"}{"s":"#1 main transformer","p":"belongs to","o":"500kV substation"},{"s":"#1 main transformer","p":"fault type","o":"abnormal sound"},{"s":"500kV substation","p":"located in","o":"City A"},{"s":"abnormal sound","p":"handling method","o":"check core grounding"},...],[{"s":"#2 main transformer","p":"model","o":"S11-5000"}{"s":"#2 main transformer","p":"belongs to","model","model","S11-5000"}{"s":"#1 main transformer","p":"belongs to","model","model","model","S11-5000"}{"s":"#1 main transformer","p":"belongs to","model","model","model","model")","model","model")","model")","model")","model"","model""", "" ... {"o":"500kV substation"},{"s":"#2 main transformer","p":"noise type","o":"humming sound"},{"s":"500kV substation","p":"located in","o":"City B"},{"s":"humming sound","p":"handling method","o":"check core grounding"},...],[{"s":"oil-immersed transformer","p":"fault type","o":"high temperature"}{"s":"high temperature","p":"handling method","o":"It is recommended to check the oil level before carrying out power outage maintenance"}{"s":"oil-immersed transformer","p":"standard noise","o":"65dB"},...]}.

[0070] In some embodiments, S70 includes: Extract the relation from each triple list in the structured triple set to obtain a list of relation attributes.

[0071] In some embodiments, the list of relational attributes is matched and aligned with the core question information in the question text. Based on the matching results, target triples that can directly respond to the question are selected from the set of high-probability triples, and irrelevant triples that do not match the question's direction are excluded, further narrowing the scope of knowledge and providing a more accurate basis for generating the final answer.

[0072] The confidence score between each element in the relation attribute list and the user's question is calculated using a hybrid relation matching algorithm.

[0073] All relation attributes are sorted according to confidence scores, and relation attributes with scores below the preset matching threshold are filtered out. Relationships that meet the matching requirements are retained, thereby achieving accurate alignment between the relation attribute list and the core question information. Finally, the alignment results are combined to identify the target triple with the highest matching degree with the user's question.

[0074] right List of each triple Get the list of relation attributes According to the mixed relation matching algorithm, calculate The formula for the matching score of each element with question Q is as follows: in, express Vector representation, Calculate vector similarity. The importance score of a relationship / attribute is calculated based on the PageRank algorithm; For relations or attributes The PageRank value is obtained through an iterative formula. The calculation yielded, where Let M be the PageRank vector of all entities at the i-th iteration, M be the transition probability matrix, N be the total number of entities, and d be the damping coefficient. This iterative process continues until... Convergence occurs over time; The question vector representation of the user's question Q; for The j-th relation / attribute triple in the list of the i-th triples; Let L2 be the difference between the vector representation of the j-th relation or attribute in the i-th triplet list and the user question vector; It is the norm of the relation or attribute vector; The norm of the user question vector; This is a hyperparameter, typically ranging from [0, 1], used to balance the importance of scores from two different dimensions.

[0075] Based on the confidence scores, a set of high-probability triples is obtained.

[0076] The relational attributes of all triples in the high-probability triple set are matched and aligned with the core question information of the user's question. Based on the matching score, target triples that are highly consistent with the question's direction are selected. After locking in the core knowledge range that can be used to answer the question, a natural language answer that meets the user's question requirements can be generated based on the entity and relational information of the target triples.

[0077] Sort the scores in descending order and filter out scores below a specified threshold. of If all All are below the threshold, so the top-3 are retained and recorded as follows: Filter out p belongs to The triplet constitutes This yields a set of high-probability triples. .

[0078] Taking the power sector as an example, when =[{"s":"#1 main transformer","p":"model","o":"S11-5000"}{"s":"#1 main transformer","p":"belongs to","o":"500kV substation"},{"s":"#1 main transformer","p":"fault type","o":"abnormal sound"},{"s":"500kV substation","p":"located in","o":"city A"},{"s":"abnormal sound","p":"handling method","o":"check core grounding"},...]], when the result is obtained =["Model", "Belongs to", "Fault Type", "Located at", "Handling Method",...], calculate the matching score Score=[0.23, 0.54, 0.82, 0.36, 0.77, ...], and set the threshold. When =0.7, we get =[{"s":"#1 main transformer","p":"fault type","o":"abnormal sound"},{"s":"abnormal sound","p":"handling method","o":"check core grounding"}, ...], similarly, finally obtain ={[{"s":"#1 main transformer","p":"fault type","o":"abnormal sound"},{"s":"abnormal sound","p":"handling method","o":"check cooling system"},...],[{"s":"#2 main transformer","p":"noise type","o":"humming sound"},{"s":"humming sound","p":"handling method","o":"check core grounding"},...],[{"s":"oil-immersed transformer","p":"fault type","o":"high temperature"},{"s":"high temperature","p":"handling method","o":"It is recommended to check the oil level before carrying out power outage maintenance"},...]}.

[0079] In some embodiments, S80 includes: All candidate paths are constructed by combining the set of high-confidence entities and the set of high-probability triples.

[0080] Each candidate path corresponds to a complete association chain starting from the subject entity, passing through inter-entity relationships, and pointing to the target entity. Specifically, the candidate entity in the high-confidence entity set is used as the starting node of the candidate path. The triples in the high-probability triple set that are directly or indirectly related to the candidate entity are concatenated in the order of connection between the head entity, relation or attribute, and tail entity to form a complete association chain starting from the candidate entity and pointing to the target entity through one or more relations, thus obtaining the candidate path.

[0081] After calculating the matching score for each candidate path, all candidate paths are sorted according to their scores. The target path with the highest score is selected, and the target entity pointed to by the target path is extracted, which can provide accurate core entity information for subsequent answer generation.

[0082] The confidence scores of all candidate paths are calculated using a pre-defined large language model, thus obtaining the path confidence score for each candidate path.

[0083] All candidate paths are sorted according to path confidence, and the candidate path with the highest path confidence is selected as the target path. The entity pointed to by the end of the target path is extracted as the target entity for answering the question, thus completing the location and selection of core knowledge and providing basic support for generating accurate answers in the future.

[0084] Determine if the path confidence score is greater than the preset confidence score. If it is, the candidate path corresponding to the path confidence score is a usable candidate path.

[0085] If the confidence score of all candidate paths is not greater than the preset confidence score, the result that there is no corresponding target entity is output, indicating that there is no matching core knowledge content in the question; if there are one or more available candidate paths with a confidence score greater than the preset confidence score, all available candidate paths are retained for subsequent screening steps. Based on this, the available candidate path with the highest confidence score is selected as the final target path to complete the extraction of the target entity.

[0086] Specifically, based on candidate entities and the corresponding triples Concatenate all candidate paths Utilizing the vector representation capabilities of a pre-defined large language model to calculate Each candidate path The confidence score is obtained by using the vector similarity with question Q. Sort the results in descending order to filter out those with scores below the threshold. Candidate paths .

[0087] Understandable, using a large model for path and the problem Each vector is represented separately; then the vector similarity is calculated using cosine similarity to obtain a score. Finally, the scores Sort in descending order and use a threshold Filtering yields the final candidate paths. .

[0088] Taking the power scenario as an example, candidate paths are obtained. =["#1 Main Transformer - Fault Type - Abnormal Sound - Handling Method - Check Core Grounding", "#2 Main Transformer - Noise Type - Humming Sound - Handling Method - Check Core Grounding", "Oil-Immersed Transformer - Fault Type - High Temperature - Handling Method - It is recommended to check the oil level before carrying out power outage maintenance",...], calculate the confidence score. =[0.91, 0.83, 0.73, ...], based on the threshold =0.8 after filtering =["#1 Main Transformer - Fault Type - Abnormal Sound - Troubleshooting Method - Check Core Grounding", "#2 Main Transformer - Noise Type - Humming Sound - Troubleshooting Method - Check Core Grounding",...], =[0.91, 0.83, ...].

[0089] In some embodiments, S90 includes: The accuracy of available candidate paths is evaluated using a pre-defined large language model based on prompt words, and the evaluation results are obtained.

[0090] Based on the evaluation results, the confidence scores of all available candidate paths are adjusted and weighted to obtain the adjusted path confidence scores. Then, based on these adjusted path confidence scores, a ranking and filtering process is completed to determine the final target path and extract the corresponding target entities. In this step, the pre-defined large language model can combine the entity association logic of the knowledge graph with the question's expression intent to identify semantic association deviations in candidate paths, further improving the accuracy of target entity extraction and reducing the interference of associated paths on the final answer.

[0091] The evaluation results, user questions, available candidate paths, and path confidence are input into a pre-defined large language model to obtain answers to the questions.

[0092] In some embodiments, when there are multiple available candidate paths with the same corrected confidence level and all of them being the highest value, all target entities corresponding to the multiple paths can be extracted together. Then, the extracted target entities are combined with the user's question and input into a preset large language model. The large language model combines the question expression intent to filter out the target entity with the highest matching degree, and completes the final entity extraction result output. This avoids the situation where the result cannot be determined due to the same confidence level, and improves the stability and accuracy of the question answer.

[0093] The accuracy of the path is evaluated using a pre-defined large language model based on the prompt word "Prompt". The input includes the question "Q" and candidate paths. and confidence level Returns the answer that accurately answers the question and the corresponding path (at most k paths), denoted as A.

[0094] Taking the power scenario as an example, the following is an example of evaluating the path using a pre-set large language model: Prompt: ## Task Description: Given a question Q and a set of candidate paths (composed of relevant entities and triples) and their corresponding confidence levels, evaluate whether each path accurately answers the question. Return the most relevant paths (1-3), or empty if no answerable path exists. ## Format Requirements: 1. Each path evaluation must include: Answer: The answer to the user's question. Path content: The complete path after concatenation. Reason: A brief explanation of why the path can / cannot answer the question. 2. The final return format should be a JSON list, strictly following the structure: [{"answer": "...", "path": "...", "reason": "..."}]; User: Question Q: How to handle abnormal sound from the main transformer? Candidate paths: #1 Main transformer - Fault type - Abnormal sound - Handling method - Check core grounding Confidence: 0.91 #2 Main transformer - Noise type - Humming sound - Handling method - Check core grounding Confidence: 0.83…; Answer: [{"answer": "Check core grounding", "path": "#1 Main transformer - Fault type - Abnormal sound - Handling method - Check core grounding", "reason": "This path accurately provides the handling method for the main transformer's abnormal sound"},{"answer": "Check core grounding", "path": "#2 Main transformer - Noise type - Buzzing sound - Handling method - Check core grounding", "reason": "The buzzing sound mentioned in this path is a form of abnormal sound, which matches the question"}].

[0095] Here, Prompt is a set of prompt words; User is a set of user questions Q, their candidate paths, and corresponding confidence scores; Answer is the question answer, which includes answer, path, and reason; the answer field is the answer, the path field is the graph query path, and the reason field is the explanation.

[0096] The present invention also provides a computer-readable storage medium storing a computer program adapted for loading by a processor to perform the steps of the knowledge graph fuzzy question answering method based on a large model as described above.

[0097] The present invention also provides a computer device, including a memory and a processor; The memory contains computer programs; The processor executes the steps of the knowledge graph fuzzy question answering method based on a large model, as described above, by calling computer programs stored in memory.

[0098] The above embodiments only illustrate preferred embodiments of the present invention, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can freely combine the above technical features without departing from the concept of the present invention, and can also make several modifications and improvements, all of which fall within the protection scope of the present invention. Therefore, all equivalent transformations and modifications made with respect to the scope of the claims of the present invention should fall within the scope of the claims of the present invention.

Claims

1. A fuzzy question-answering method based on a large-scale knowledge graph, characterized in that, Includes the following steps: S10, Obtain user questions; S20, use the named entity recognition model to obtain the core entity set from the user question; S30, Based on the core entity set, obtain a candidate entity set from a preset knowledge base; S40, Based on the core entity set and the user question, calculate the candidate confidence of each candidate entity in the candidate entity set using a semantic vectorization model; S50, sort the candidates according to their confidence levels and select the first preset number of candidate entities as the high-confidence entity set; S60, In the preset knowledge graph, perform multi-hop triple retrieval on the high-confidence entity set to obtain a structured triple set; S70, the structured triple set is calculated using a hybrid relation matching algorithm to obtain a high-probability triple set; S80, based on the preset large language model, combined with the high-confidence entity set and the high-probability triple set, construct all candidate paths and calculate the path confidence of each candidate path; determine whether the path confidence meets the preset confidence conditions, and obtain the available candidate paths; S90, input the user question, the available candidate paths, and the path confidence into the preset large language model to obtain the question answer.

2. The knowledge graph fuzzy question answering method based on a large model according to claim 1, characterized in that, S30 includes: S31, Use the semantic vectorization model to generate the context vector set for each core entity in the core entity set; S32, Based on the context vector set, obtain the candidate entity set from the preset knowledge base.

3. The knowledge graph fuzzy question answering method based on a large model according to claim 2, characterized in that, S40 includes: S41, using the semantic vectorization model to generate the question vector of the user's question; S42, using the semantic vectorization model to generate a candidate vector for each candidate entity in the candidate entity set; S43, according to the hybrid entity confidence index calculation method, combining the question vector, the context vector set, and the candidate vector, the candidate confidence of each candidate entity is obtained.

4. The knowledge graph fuzzy question answering method based on a large model according to claim 1, characterized in that, The S50 includes: S51, sort the candidate entities in descending order of their confidence levels, and select the first preset number of candidate entities as the high-confidence entity set.

5. The knowledge graph fuzzy question answering method based on a large model according to claim 1, characterized in that, The S60 includes: In the knowledge graph, the structured triples are obtained by traversing each candidate entity in the high-confidence entity set according to 3-hop edges.

6. The knowledge graph fuzzy question answering method based on a large model according to claim 1, characterized in that, The S70 includes: Relations are extracted from each triplet list in the structured triplet set to obtain a list of relation attributes; The hybrid relation matching algorithm is used to calculate the confidence score between each element in the relation attribute list and the user question; Based on the confidence scores, the set of high-probability triples is obtained.

7. The knowledge graph fuzzy question answering method based on a large model according to claim 1, characterized in that, The S80 includes: By combining the set of high-confidence entities and the set of high-probability triples, all candidate paths are constructed; The confidence scores of all candidate paths are calculated using the preset large language model to obtain the path confidence score of each candidate path. Determine whether the path confidence score is greater than a preset confidence score. If it is greater, the candidate path corresponding to the path confidence score is the available candidate path.

8. The knowledge graph fuzzy question answering method based on a large model according to claim 1, characterized in that, The S90 includes: The accuracy of the available candidate paths is evaluated using the preset large language model based on the prompt words, and the evaluation result is obtained. The evaluation results, the user question, the available candidate paths, and the path confidence are input into the preset large language model to obtain the question answer.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program adapted for loading by a processor to perform the steps of the knowledge graph fuzzy question answering method based on a large model as described in any one of claims 1 to 8.

10. A computer device, characterized in that, Including memory and processor; The memory contains computer programs; The processor executes the steps of the knowledge graph fuzzy question answering method based on a large model as described in any one of claims 1 to 8 by calling the computer program stored in the memory.