Intelligent question and answer method, device and system based on knowledge graph and text block
By converting natural language questions into vector form and matching them with knowledge graphs and text block sets, combined with a question-answering model, the problem of insufficient accuracy in intelligent question-answering systems in the securities industry is solved, achieving deep semantic understanding and efficient knowledge support.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-09
- Publication Date
- 2026-04-07
AI Technical Summary
Existing intelligent question-answering systems struggle to accurately retrieve relevant knowledge and achieve deep semantic understanding in highly specialized and complex fields, such as the securities industry, resulting in insufficient accuracy.
We employ an intelligent question-answering method based on knowledge graphs and text blocks. By converting natural language questions into vector form and matching them with a pre-defined knowledge graph and text block set, we merge relevant text blocks as joint context inputs into a pre-trained question-answering model to achieve deep semantic understanding.
It improves the accuracy and comprehensiveness of intelligent question-answering systems in the securities industry, provides efficient and accurate knowledge support, and ensures that the text blocks input into large models are both comprehensive and accurate, forming complementary support.
Smart Images

Figure CN121808024A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent question answering technology, and in particular to an intelligent question answering method, apparatus, and system based on knowledge graphs and text blocks. Background Technology
[0002] With the development of computer technology, customer service systems across all industries have embarked on an intelligent revolution. Intelligent question-and-answer systems have improved the efficiency of human customer service and the accuracy of answering questions. For simpler fields, such as e-commerce and express logistics, current intelligent question-and-answer systems are already quite comprehensive. However, for more specialized fields, such as technology services and financial securities services, such as the securities industry, their business systems are complex, their product types are diverse, and they face continuously evolving regulatory policies and market rules. In the daily work of the securities industry, various business inquiries, process questions, and compliance assessments are frequently encountered. From interpreting product terms in customer service and providing process guidance in trading operations to querying internal management regulations and assessing risks in compliance reviews, the securities industry currently has a pressing need for efficient, accurate, and comprehensive knowledge support.
[0003] However, when faced with highly specialized and complex fields, intelligent question-answering systems struggle to accurately retrieve relevant knowledge and achieve deep semantic understanding, resulting in insufficient accuracy. Summary of the Invention
[0004] This invention provides an intelligent question-answering method, apparatus, and system based on knowledge graphs and text blocks, which are used to improve the accuracy of intelligent question-answering systems.
[0005] The first aspect of this invention discloses an intelligent question-answering method based on knowledge graphs and text blocks, the method comprising: Obtain user questions in natural language form and convert the user questions into a question vector in vector form; The question vector is matched with a preset knowledge graph to obtain an initial sub-graph corresponding to the question vector; Based on the initial subgraph and the user question, M first relevant text blocks corresponding to the user question are obtained; relevant subgraphs are selected from the initial subgraph based on the M first relevant text blocks; The question vector is matched with a preset set of text blocks to obtain N second related text blocks corresponding to the question vector; Merge M first-related text blocks with N second-related text blocks to obtain K target-related text blocks; K target-related text blocks and the related sub-graphs are used as joint context inputs to a pre-trained question-answering model to obtain the answer information output by the question-answering model after reasoning. The preset knowledge graph and the preset text block set are obtained by analyzing the preset knowledge set data; M, N and K are preset positive integers.
[0006] A second aspect of this invention discloses an intelligent question-answering device based on knowledge graphs and text blocks, the device comprising: The vector conversion module is used to obtain user questions in natural language form and convert the user questions into question vectors in vector form. The graph matching module is used to match the question vector with a preset knowledge graph to obtain an initial subgraph corresponding to the question vector; based on the initial subgraph and the user question, obtain M first relevant text blocks corresponding to the user question; and filter relevant subgraphs from the initial subgraph based on the M first relevant text blocks. The text matching module is used to match the question vector with a preset set of text blocks to obtain N second related text blocks corresponding to the question vector; and to merge M first related text blocks with N second related text blocks to obtain K target related text blocks. The intelligent question answering module is used to input K target-related text blocks and the related sub-graph as joint context into a pre-trained question answering model to obtain the answer information output by the question answering model after reasoning. The preset knowledge graph and the preset text block set are obtained by analyzing the preset knowledge set data; M, N and K are preset positive integers.
[0007] As an optional implementation, in a second aspect of the present invention, the specific operation method by which the graph matching module matches the question vector with a preset knowledge graph to obtain an initial sub-graph corresponding to the question vector includes: The question vector is matched with a preset knowledge graph to obtain associated entities; the knowledge graph is traversed to mine the relationships between all associated entities, and an initial subgraph corresponding to the question vector is obtained based on all associated entities and the relationships between them.
[0008] As an optional implementation, in a second aspect of the invention, the specific operation method by which the graph matching module obtains M first relevant text blocks corresponding to the user question based on the initial sub-graph and the user question includes: Extract all triples from the initial subgraph, where each triple includes two entities and a relationship between the two entities; For each triple, the original text fragment is obtained from the user question based on the two entities in the triple and the relationship between the two entities. Based on the original text segments corresponding to all the triples, determine the weight information corresponding to each original text segment; based on the weight information corresponding to each original text segment, filter out M relevant text segments; Based on the M related text fragments, M first related text blocks corresponding to the user question are obtained.
[0009] As an optional implementation, in a second aspect of the invention, the specific operation method by which the graph matching module, for each triple, matches the original text fragment from the user question based on the two entities and the relationship between them in the triple includes: For each triple, the two entities in the triple are expanded using a preset knowledge set data to obtain multiple expanded entities; the relationship between the two entities in the triple is expanded to obtain multiple expanded relationships. For each triple, multiple extended statements are constructed based on all extended entities and all extended relations; all extended statements are then matched with the user question to obtain the matched original text fragment.
[0010] As an optional implementation, in a second aspect of the present invention, the specific operation of the text matching module merging M first related text blocks and N second related text blocks to obtain K target related text blocks includes: The M first-related text blocks and N second-related text blocks are deduplicated and merged to obtain a candidate text block set; After sorting the candidate text block set using a sorting fusion algorithm, H third-related text blocks are selected. Calculate the semantic fit between each third relevant text block and the user question, sort the semantic fit, and then select K target relevant text blocks; Where H is a preset positive integer.
[0011] As an optional implementation, in a second aspect of the present invention, the specific operation of the vector conversion module in acquiring user questions in natural language form and converting the user questions into question vectors in vector form includes: The user question is obtained in natural language form, and the user question is divided into text blocks according to multiple preset text block granularity division rules to obtain multiple text block sequences; a sub-question vector is determined according to each text block sequence, and a question vector is obtained according to all the sub-question vectors; Furthermore, the specific operation method of the text matching module matching the question vector with a preset set of text blocks to obtain N second related text blocks corresponding to the question vector includes: For each of the sub-question vectors, the sub-question vector is matched with a preset set of text blocks to obtain multiple fourth related text blocks corresponding to the sub-question vector; For all the fourth related text blocks corresponding to all the sub-problem vectors, N second related text blocks corresponding to the problem vectors are obtained by filtering according to the frequency of occurrence of each fourth related text block.
[0012] As an optional implementation, in a second aspect of the present invention, the text matching module, for all the fourth related text blocks corresponding to all the sub-question vectors, filters out N second related text blocks corresponding to the question vectors based on the frequency of occurrence of each fourth related text block, in a specific operation manner, including: For each sub-problem vector, based on the frequency of occurrence of each fourth related text block, select S initial fourth related text blocks corresponding to the sub-problem vector, and obtain an initial set including the S initial fourth related text blocks; Perform semantic similarity sorting on the initial sets corresponding to all the sub-problem vectors, and select L initial sets; Based on the frequency of occurrence of each fourth related text block in the L initial sets, N second related text blocks corresponding to the question vector are obtained by filtering. Where S and L are preset positive integers.
[0013] A third aspect of this invention discloses an intelligent question-answering system based on knowledge graphs and text blocks, the system comprising: Memory containing executable program code; A processor coupled to the memory; The processor calls the executable program code stored in the memory to execute some or all of the steps in the intelligent question-answering method based on knowledge graphs and text blocks according to any of the first aspects of the present invention.
[0014] The fourth aspect of the present invention discloses a computer storage medium storing computer instructions, which, when invoked by a processor, are used to execute some or all of the steps in the intelligent question-answering method based on knowledge graphs and text blocks as described in any of the first aspects of the present invention.
[0015] Compared with the prior art, the present invention has the following beneficial effects: This invention pre-constructs a knowledge graph and a set of text blocks for the corresponding domain. The former describes the knowledge system of the corresponding domain through structured data, while the latter realizes the full mining of data semantics.
[0016] This invention first converts the user's question in natural language into a vector question. Then, it uses this vector question to match both a knowledge graph and a set of text blocks. When matching the knowledge graph, the invention first obtains an initial sub-graph, and then uses this initial sub-graph to match the user question. This operation simplifies the initial sub-graph by eliminating noise and also helps to analyze the first relevant text block from the user question using the knowledge graph. When matching the text block set, the invention first obtains a second relevant text block based on the matching of the question vector and the text block set. Then, it combines the first and second relevant text blocks to obtain the target relevant text block, which more comprehensively and thoroughly reflects the user question.
[0017] The above operations fully integrate the structured association advantages of knowledge graphs with the semantic matching capabilities of text block vector retrieval, avoiding information omissions or biases from a single retrieval channel, and ensuring that the text blocks input into the large model are both comprehensive and accurate.
[0018] Finally, this invention inputs all target-related text blocks and related subgraphs as joint context into a pre-trained question-answering model. The text blocks provide the model with detailed textual evidence, while the subgraphs present the entity association logic in a structured form. The two complement each other, enabling the question-answering model to accurately retrieve relevant knowledge and achieve deep semantic understanding, ultimately improving the accuracy of intelligent question answering. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a flowchart illustrating an intelligent question-answering method based on knowledge graphs and text blocks disclosed in an embodiment of the present invention; Figure 2 This is a schematic diagram of the data acquisition and cleaning process disclosed in an embodiment of the present invention; Figure 3 This is a schematic diagram of the multi-source heterogeneous data parsing process disclosed in an embodiment of the present invention; Figure 4 This is a schematic diagram of the financial knowledge graph fusion retrieval architecture disclosed in an embodiment of the present invention; Figure 5 This is a schematic diagram of the structure of an intelligent question-answering device based on knowledge graphs and text blocks disclosed in an embodiment of the present invention; Figure 6 This is a schematic diagram of the structure of an intelligent question-answering system based on knowledge graphs and text blocks disclosed in an embodiment of the present invention. Detailed Implementation
[0021] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0022] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this invention are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, apparatus, product, or end that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or ends.
[0023] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0024] This invention discloses an intelligent question-answering method, apparatus, and system based on knowledge graphs and text blocks, which are used to improve the accuracy of intelligent question-answering systems. These will be described in detail below.
[0025] Example 1 Embodiment 1 of this invention discloses an intelligent question-answering method based on knowledge graphs and text blocks. This method can be integrated into a specific electronic device, or into a local or cloud server. An electronic device integrating this method can perform a series of operations on the input data according to the steps of this method, ultimately obtaining the output data corresponding to this method. For example... Figure 1 As shown, the method may include: Step 101: Obtain the user questions in natural language form and convert them into a question vector in vector form.
[0026] In this embodiment of the invention, the user-input natural language questions need to be transformed, converting the text semantic information into numerical vectors so that semantically similar texts are close in distance in the vector space. Vector-form questions are more conducive to subsequent matching operations.
[0027] In an optional embodiment, user questions are often simple or do not conform to industry-standard terminology. Therefore, after a user submits a question, it can undergo multi-dimensional preprocessing: parsing the user's intent (such as compliance judgment, process consultation, etc.), extracting entities (such as product name, regulatory clauses, business processes, etc.), and rewriting colloquial and vague questions into corresponding industry-standard expressions (e.g., rewriting "Can I buy product A? Is the risk high?" as "Query the risk level and applicable investor scope of product A"). Subsequently, the standardized questions are converted into vector form.
[0028] Step 102: Match the question vector with the preset knowledge graph to obtain the initial sub-graph corresponding to the question vector.
[0029] In this embodiment of the invention, the knowledge graph is a structured database that measures entity-relationship relationships. For example, it can be an "entity-relationship" vector library constructed after vectorizing entities and relationships, used for subsequent retrieval. Matching the question vector with the preset knowledge graph can obtain the initial sub-graph corresponding to the question vector.
[0030] In an optional embodiment, step 102 may include: matching the question vector with a preset knowledge graph to obtain associated entities; traversing the knowledge graph to mine the relationships between all associated entities; and obtaining an initial subgraph corresponding to the question vector based on all associated entities and the relationships between them.
[0031] Step 103: Based on the initial subgraph and the user question, obtain M first relevant text blocks corresponding to the user question; based on the M first relevant text blocks, select relevant subgraphs from the initial subgraph.
[0032] In this embodiment of the invention, the initial subgraph is a pre-screened subgraph that contains some noise and redundant information. Therefore, it needs to be simplified and denoised in conjunction with the user question. On the other hand, this initial subgraph supplements the missing entity relationship information in the original user question with a structured database. Matching the initial subgraph with the user question yields more comprehensive expanded text block information, thus enriching the semantic foundation. Finally, this embodiment of the invention uses M first relevant text blocks to filter out relevant subgraphs from the initial subgraph, which in turn simplifies and denoises the initial knowledge graph.
[0033] The following is an example of the operation in step 103: For example, question vectors can be matched with the "entity-relationship" vector library of the knowledge graph to locate related entities. Then, graph traversal algorithms (such as breadth-first search) are used to mine the direct and indirect relationships between entities, initially filtering out knowledge subgraphs that contain entities, relationships, community information, and the text blocks they belong to. Based on this, the top-M highly relevant text blocks are selected according to similarity ranking, and the preliminary subgraphs are further filtered according to the text block index to obtain relevant subgraphs that focus on core information.
[0034] Step 104: Match the question vector with the preset set of text blocks to obtain N second related text blocks corresponding to the question vector.
[0035] In this embodiment of the invention, the question vector is matched with a preset set of text blocks. The cosine similarity algorithm and the BM25 (Best Matching 25) algorithm can be combined. The former ensures the matching accuracy at the semantic level, while the latter effectively takes into account the frequency of keyword occurrence and text length features in the text blocks, realizing the dual verification of semantic association and text statistical features, and finally selecting the top-N most relevant second-related text blocks.
[0036] Step 105: Merge the M first related text blocks with the N second related text blocks to obtain K target related text blocks.
[0037] In this embodiment of the invention, the M first relevant text blocks and N second relevant text blocks are obtained through different methods, thereby reducing semantic omissions and improving the comprehensiveness of user question analysis.
[0038] In an optional embodiment, step 105 may include: The M first-related text blocks and N second-related text blocks are deduplicated and merged to obtain a candidate text block set; After sorting the candidate text block set using a sorting fusion algorithm, H third-related text blocks are selected. Calculate the semantic fit between each third relevant text block and the user question, sort the semantic fit, and then select K target relevant text blocks; where H is a preset positive integer.
[0039] Step 106: Input the K target-related text blocks and related sub-graphs as joint context into the pre-trained question answering model to obtain the answer information output by the question answering model after inference; The preset knowledge graph and preset text block set are obtained by analyzing the preset knowledge set data; M, N and K are preset positive integers.
[0040] In this embodiment of the invention, the question-answering model can use any model with a thinking mode, such as the Qwen3-235B-A22B open-source large model. During the model reasoning process, the structured information of the graph and the unstructured content of the text block can be integrated to output the final answer.
[0041] The question-answering model is deployed locally, and its training process uses training data containing standard text blocks, knowledge graphs, and corresponding answers. This allows the trained question-answering model to analyze the input target-related text blocks and related subgraphs as joint context to obtain the final answer.
[0042] As can be seen, the embodiments of the present invention pre-construct a knowledge graph and a set of text blocks for the corresponding domain. The former describes the knowledge system of the corresponding domain through structured data, while the latter realizes the full mining of data semantics.
[0043] This invention first converts the user's question in natural language into a vector question. Then, it uses this vector question to match both the knowledge graph and the text block set. When matching the knowledge graph, this invention first obtains an initial sub-graph, and then uses this initial sub-graph to match the user question. This operation simplifies the initial sub-graph by eliminating noise and also helps to analyze the first relevant text block from the user question using the knowledge graph. When matching the text block set, a second relevant text block is first obtained based on the matching of the question vector and the text block set. Then, the first and second relevant text blocks are combined to obtain the target relevant text block, which more comprehensively and thoroughly reflects the user question.
[0044] The above operations fully integrate the structured association advantages of knowledge graphs with the semantic matching capabilities of text block vector retrieval, avoiding information omissions or biases from a single retrieval channel, and ensuring that the text blocks input into the large model are both comprehensive and accurate.
[0045] Finally, in this embodiment of the invention, all target-related text blocks and related subgraphs are input as joint context into the pre-trained question-answering model. The text blocks provide the model with detailed textual evidence, while the subgraphs present the entity association logic in a structured form. The two complement each other, enabling the question-answering model to accurately retrieve relevant knowledge and achieve deep semantic understanding, ultimately improving the accuracy of intelligent question answering.
[0046] In the above embodiments, for matching the initial subgraph and user questions, different user questions have personalized characteristics, such as not using standardized terms, inaccurate grammar, or unconventional expressions. Therefore, directly using preset segmentation rules for segmentation is difficult to guarantee reasonableness. To obtain more reasonable and reliable first relevant text blocks, in an optional embodiment, based on the initial subgraph and user questions, M first relevant text blocks corresponding to the question vector are obtained, which may include: Extract all triples from the initial subgraph. Each triple includes two entities and a relationship between them. Each triple can be used as a smaller unit of text for semantic querying.
[0047] For each triple, the original text fragment is obtained from the user question based on the two entities in the triple and the relationship between the two entities. Based on the original text fragments corresponding to all triples, determine the weight information corresponding to each original text fragment; based on the weight information corresponding to each original text fragment, select M relevant text fragments; Based on M relevant text fragments, obtain M first relevant text blocks corresponding to the user's question.
[0048] In this optional embodiment, for each triple, a semantic match is performed to find the corresponding text fragment in the user question, thereby trying different segmentation strategies. First, the user question is fully segmented to obtain the original text fragments corresponding to all triples.
[0049] Subsequently, in this optional embodiment, the weight information corresponding to each original text segment is determined based on the original text segments corresponding to all triples; M relevant text segments are selected based on the weight information corresponding to each original text segment, for example, the weight is determined based on the frequency of occurrence of the text segments, and then the top-M relevant text segments are selected.
[0050] As can be seen, this optional embodiment does not require a pre-determined segmentation strategy for segmentation. Instead, it uses triples in the initial knowledge graph for segmentation and finally selects the most reasonable M text fragments, thereby improving the rationality and reliability of obtaining the first relevant text block.
[0051] In the above embodiments, for matching the initial subgraph and the user question, since the user question has personalized characteristics, such as not using standardized terms, inaccurate grammar, or unconventional expression, etc., in order to further improve the accuracy of matching between the initial subgraph and the user question, in an optional embodiment, for each triple, based on the two entities in the triple and the relationship between the two entities, the original text fragment is matched from the user question, which may include: For each triple, the two entities in the triple are expanded using a pre-set knowledge set to obtain multiple expanded entities; the relationship between the two entities in the triple is expanded to obtain multiple expanded relationships; in this optional embodiment, both the expanded entities and expanded relationships can be found in a pre-set expansion library. For example, in the field of finance and securities, a knowledge base is established in advance based on encyclopedic knowledge in the field of finance and securities, listing all different expressions of synonyms or the same concept, different expressions of the same operation, and different expressions of the same relationship, thereby enabling the expansion of entities and relationships using this knowledge base.
[0052] For each triple, construct multiple extended statements based on all extended entities and all extended relations; use all extended statements to match the user question to obtain the matched original text fragments.
[0053] In this optional embodiment, the extended entities and extended relations can cover a wide range of expressions, and can also achieve good coverage for cases where standardized terms are not used, the grammar is inaccurate, or the expression is unconventional, thereby further improving the accuracy of matching between the initial subgraph and the user question.
[0054] In yet another alternative embodiment, obtaining the user question in natural language form and converting the user question into a question vector in vector form may include: The system obtains user questions in natural language form, divides the user questions into text blocks according to multiple preset text block granularity rules, and obtains multiple text block sequences. Based on each text block sequence, it determines the sub-question vector corresponding to each text block sequence, and obtains the question vector based on all sub-question vectors. In this embodiment of the invention, the text blocks can be divided according to the rules of punctuation marks, or according to a certain text block granularity. However, the above methods are difficult to guarantee the rationality of the text block division. Therefore, this optional embodiment divides the user question into text blocks according to multiple preset text block granularity division rules to obtain multiple text block sequences. In the subsequent data processing, all text block sequences will participate.
[0055] Furthermore, the question vector is matched with a preset set of text blocks to obtain N second related text blocks corresponding to the question vector, which may include: For each sub-question vector, the sub-question vector is matched with a preset set of text blocks to obtain multiple fourth related text blocks corresponding to the sub-question vector; For all fourth related text blocks corresponding to all sub-problem vectors, N second related text blocks corresponding to the problem vectors are obtained by filtering according to the frequency of occurrence of each fourth related text block.
[0056] As can be seen, in this optional embodiment, when it is uncertain which rule is most reasonable for dividing text blocks, different text block granularity division rules are used to divide the user question into text blocks in order to prevent semantic omission; then, in the process of matching the question vector with the preset text block set, the text blocks divided by different text block granularity division rules are matched with the text block set, and finally, N second related text blocks corresponding to the question vector are selected, thereby improving the rationality of obtaining the second text block.
[0057] In the above optional embodiments, for all fourth-related text blocks corresponding to all sub-question vectors, N second-related text blocks corresponding to the question vectors are selected based on the frequency of occurrence of each fourth-related text block. Although this method can select relatively reasonable text blocks, in some cases, the text block sequences divided using certain text block granularities have poor rationality and will bring large errors. Therefore, when performing matching, it is necessary to exclude some unreasonable sub-question vectors. In this optional embodiment, further optionally, for all fourth-related text blocks corresponding to all sub-question vectors, selecting N second-related text blocks corresponding to the question vectors based on the frequency of occurrence of each fourth-related text block may include: For each sub-problem vector, based on the frequency of each fourth related text block, select the S initial fourth related text blocks corresponding to the sub-problem vector, and obtain an initial set including the S initial fourth related text blocks; Perform semantic similarity sorting on the initial sets corresponding to all sub-problem vectors, and select L initial sets; Based on the frequency of each fourth related text block in the L initial sets, N second related text blocks corresponding to the question vector are selected; where S and L are preset positive integers.
[0058] In this optional embodiment, instead of directly selecting second-related text blocks from all fourth-related text blocks corresponding to all sub-question vectors, for each sub-question vector, an initial set including S initial fourth-related text blocks is first obtained. For such a set, if the semantic features of a certain set are significantly different or inconsistent with other sets, it can be determined that the set is unreasonable and should be excluded. Therefore, in this optional embodiment, semantic similarity sorting is performed on the initial sets corresponding to all sub-question vectors to filter out L initial sets. The preset L is less than the number of initial sub-question vectors, thereby excluding some "unreasonable" sub-question vectors with lower semantic similarity rankings. Finally, based on the frequency of each fourth-related text block in the L initial sets, N second-related text blocks corresponding to the question vector are selected, thereby further improving the rationality of obtaining the second-related text blocks.
[0059] In another optional embodiment, the preset knowledge graph and the preset set of text blocks are obtained by analyzing preset financial data; the financial data includes one or more of the following: financial industry compliance and system data, securities company business data, securities company historical consultation script data, and financial encyclopedia knowledge data.
[0060] Example 2 Based on the same inventive concept, Embodiment 2 of the present invention discloses another intelligent question answering method based on knowledge graphs and text blocks. This method is specifically applied to the financial securities industry. This method can be integrated into a specific electronic device, or integrated into a local or cloud server. The electronic device integrated with this method can perform a series of operations on the input data according to the steps of this method, and finally obtain the output data corresponding to this method.
[0061] The securities industry has a complex business system and a wide variety of products, and faces constantly evolving regulatory policies and market rules. Employees frequently encounter various business inquiries, process questions, and compliance assessments in their daily work. From interpreting product terms in customer service and providing process guidance in trading operations, to checking internal management regulations and assessing risks in compliance reviews, employees have a pressing need for efficient, accurate, and comprehensive knowledge support.
[0062] Currently, securities companies generally use methods such as human customer service teams, internal document database retrieval, and business expert consultation to meet the above needs. However, these traditional models have significant drawbacks: human customer service teams face high labor costs, slow response times, and incomplete professional knowledge coverage, making it difficult to cope with massive and diverse consultation needs; internal document databases mostly contain unstructured data, resulting in low retrieval efficiency and an inability to accurately link information across documents, leading to high costs for employees to obtain effective answers; the business expert consultation model is limited by the experts' time and energy, resulting in poor response timeliness and difficulty in scaling up knowledge reuse.
[0063] With the rapid development of artificial intelligence technology, large language models have shown great potential in the field of intelligent question answering due to their powerful natural language understanding and generation capabilities. However, relying solely on large models has problems such as lagging knowledge updates, the risk of factual errors, and a lack of traceability of answers. Knowledge graphs can structurally represent entity relationships and business logic in the financial field; however, using them alone makes it difficult to handle user questions containing complex semantics, and their reasoning capabilities are limited.
[0064] This invention innovatively integrates large-scale modeling and knowledge graph technologies to construct an employee assistant that combines deep semantic understanding, structured knowledge association, and efficient reasoning capabilities. By building a knowledge graph in the financial vertical field, and combining the natural language processing advantages of large-scale models with the structured retrieval capabilities of knowledge graphs, it achieves accurate understanding of employee questions, rapid knowledge matching, and traceable answer generation. This provides securities company sales personnel with comprehensive, timely, and highly reliable intelligent question-answering support, helping to improve work efficiency and ensure business compliance.
[0065] This invention relates to the field of intelligent office work in the securities industry, providing an intelligent question-and-answer method for employee assistants based on a local open-source large model and a financial knowledge graph. This method collects heterogeneous data from multiple sources, including business data, regulations, compliance clauses, and product information from the securities industry and within companies. After cleaning, parsing, and structuring, a financial knowledge graph is constructed. Then, leveraging the graph's structured retrieval capabilities, relevant information is extracted from the graph based on the question. This extracted information is then used as context input into the large model, utilizing the model's own understanding and generation capabilities to provide employees with accurate, comprehensive, and traceable answers.
[0066] 1. Data Acquisition, Cleaning, and Heterogeneous Analysis The construction of a high-quality data foundation is a core prerequisite for the construction of knowledge graphs, such as... Figure 2 As shown, it mainly consists of two key stages: data acquisition and cleaning, and multi-source heterogeneous data parsing.
[0067] To ensure the authority, comprehensiveness, and accuracy of the knowledge graph constructed subsequently, this embodiment of the invention collects data from multiple authoritative sources, mainly including: (1) Compliance and institutional data: laws and regulations related to the securities industry, industry self-regulatory rules, and internal management systems of securities companies; (2) Business data within securities companies: covering trading rules and risk level classifications for various securities products such as stocks, funds, and bonds, as well as business specifications for the entire process of account opening, trading entrustment, fund clearing, and customer service; (3) Historical consultation scripts within the company; (4) General financial knowledge data: covering explanations of securities industry terminology, basic theoretical knowledge, etc. All the above-mentioned collected data must undergo a strict cleaning process, including removing duplicate data, cleaning up invalid information (such as garbled characters, blank content, etc.), correcting various format errors, and relying on the knowledge of the expert team to identify and remove expired and obsolete data, and unifying the terminology expression standards.
[0068] Because the collected data covers various heterogeneous formats such as doc, docx, markdown, txt, jpg, png, pdf, and xlsx, and text formats such as docx and pdf may contain embedded images (such as business process diagrams, regulatory illustrations, etc.), this invention specifically designs the following to achieve unified data processing: Figure 3The multi-source heterogeneous parsing process shown has the core objective of extracting effective content from various format data and embedded elements, while preserving the logical structure of the original content to the greatest extent possible (such as table associations, clause order, and text-image correspondence).
[0069] For text formats such as docx, markdown, and txt, the text content is directly extracted by parsing the original data structure of the file. Embedded images are analyzed using OCR algorithms to recognize valid text information, and a Visual-Language Model (VLM) is used to parse chart-type images, achieving alignment of text and images. For independent image formats such as jpg and png, the "OCR+VLM" approach is also used to extract text and analyze layout. For tabular data such as xlsx, the table headers and row / column relationships are parsed, converting the tabular data into standardized key-value pairs or triples, preserving the logical relationships between data. Through these multi-dimensional parsing methods, heterogeneous data is transformed into unified structured text, providing a standardized and consistent data foundation for subsequent knowledge graph construction.
[0070] Financial knowledge graph construction For standardized data after multi-source heterogeneous parsing, this embodiment of the invention first divides the original text into blocks based on punctuation rules. Then, it uses the locally deployed Qwen3-32B open-source large model to extract knowledge entities (such as product names, business processes, etc.) from the text blocks and mines the relationships between entities (such as "product-risk level", "process-preconditions", etc.). On this basis, it constructs entity communities through multi-level clustering algorithms, classifies and integrates similar entities (such as "trading units", "price limits", "trading commissions" related to stock products, etc.), and finally converts entities, relationships, communities, and corresponding descriptive information (generated by the large model) into structured data in tabular form, building the overall "skeleton" of the knowledge graph. At the same time, entities, relationships, and text blocks are vectorized to construct a dual vector library of "entity-relationship" and text blocks for subsequent retrieval.
[0071] Subsequently, entity relationship conflict detection and resolution technology is employed, using authoritative data sources such as regulatory laws and official systems as benchmarks. Cross-data source cross-validation resolves conflicts in the relationships of the same entity (e.g., contradictory relationships such as "Product A - Department - Wealth Management" and "Product A - Department - Retail Business"). Simultaneously, duplicate relationships are merged, redundant nodes are eliminated, and the graph structure is simplified, improving the graph's accuracy and usability. Finally, a bidirectional mapping relationship is established between knowledge graph nodes, edges, and original data documents, recording information sources and providing complete support for subsequent answer tracing.
[0072] The final financial knowledge graph comprehensively covers the entity connections and logical relationships across all scenarios of securities business, achieving structured integration of scattered data. It can provide accurate, authoritative, and traceable knowledge retrieval support for open-source large models, ensuring the professionalism, accuracy, and comprehensiveness of employee assistant answers.
[0073] Financial knowledge graph fusion retrieval This invention employs a dual-path recall strategy of "knowledge graph retrieval + text block retrieval," integrating the structured association advantages of knowledge graphs with the semantic matching capabilities of text block vector retrieval to construct a two-layer retrieval system at the "entity-relationship" level and the "text block" level. The overall process is as follows: Figure 4 As shown.
[0074] (1) Graph Structured Retrieval When an employee raises a question, the locally deployed Qwen3-32B large model is first guided by the prompt word engineering to complete multi-dimensional preprocessing: parsing user intent (such as compliance judgment, process consultation, etc.), extracting entities (such as product names, regulatory clauses, business processes, etc.), and rewriting colloquial and vague questions into standardized expressions in the securities industry (e.g., rewriting "Can I buy product A? Is the risk high?" as "Query the risk level and applicable investor scope of product A"). Then, the standardized questions are converted into vector form and matched with the "entity-relationship" vector library generated during the knowledge graph construction phase to locate related entities. Next, graph traversal algorithms (such as breadth-first search) are used to mine the direct and indirect relationships between entities, initially filtering out financial knowledge sub-graphs containing entities, relationships, community information, and their respective text blocks. Based on this, the top-M highly relevant text blocks are selected based on similarity ranking, and the preliminary sub-graph is further filtered by text block index to obtain a simplified sub-graph focusing on core information.
[0075] (2) Text block vector retrieval Continuing the preprocessing strategy described above, the standardized employee questions are first converted into vector form and then matched with a text block vector library associated with the financial knowledge graph. The retrieval process integrates cosine similarity and the BM25 (Best Matching25) algorithm. The former ensures semantic matching accuracy, while the latter effectively takes into account the frequency of keyword occurrences and text length features in the text blocks, achieving dual verification of semantic association and text statistical features. Finally, the top-N most relevant text blocks are selected.
[0076] (3) Fusion and rearrangement of dual-path retrieval results To fully integrate the advantages of graph retrieval and text block retrieval and avoid information omissions or biases from a single retrieval channel, this embodiment of the invention adopts a secondary screening mechanism of "dual-path fusion + rearrangement optimization" to ensure that the text blocks input into the large model are both comprehensive and accurate.
[0077] First, the top-M + top-N text blocks obtained from the dual-path retrieval are deduplicated and merged to form an initial candidate text block set. The Reciprocal Rank Fusion (RRF) algorithm is then used to score and rank the candidate set, selecting the top-H text blocks with the best overall relevance. Subsequently, the bge-reranker-large re-ranking model is introduced to calculate the semantic fit between the problem and each text block. A secondary ranking is performed based on the re-ranking score, ultimately selecting the top-K text blocks. This ensures that the information input to the large model is both comprehensive and concise without redundancy.
[0078] (4) Large-scale model reasoning and answer generation The top-K selected text blocks and a tabular financial knowledge subgraph are used as a joint context and input into the locally deployed Qwen3-235B-A22B open-source large model. The text blocks provide detailed textual evidence for the model, while the subgraph presents the entity relationship logic in a structured form; the two complement each other. The large model outputs answers using a reasoning mode, integrating the structured information from the knowledge graph with the unstructured content of the text blocks during the reasoning process. Furthermore, when generating answers, the system automatically associates the mapping relationships between knowledge graph nodes, text blocks, and original data documents, and marks the sources of reference information to ensure the traceability and authority of the answers. The final output is a logically rigorous and informationally complete answer that conforms to the professional standards of the securities industry, providing employees with efficient and reliable intelligent support.
[0079] In the embodiments of this invention, N, H, K, and M are all positive integers that have been verified through experiments or preset according to specific rules.
[0080] This invention innovatively achieves deep integration of large-scale models and financial knowledge graphs, constructing a dual capability system of "structured knowledge association + deep semantic understanding," breaking through the application limitations of single large-scale models or knowledge graphs in securities industry employee assistant scenarios. By using knowledge graphs to structurally model financial entities, business logic, and regulatory provisions, combined with the understanding and generation capabilities of large-scale models, it not only solves the pain point of traditional knowledge graphs' inability to handle complex natural language questions, but also compensates for the shortcomings of single large-scale models, such as lagging knowledge updates and high risk of factual errors, providing employees with intelligent question answering that is professional, accurate, and timely.
[0081] To further improve retrieval coverage and accuracy, this invention employs a "dual-path recall + dual-row ranking" retrieval enhancement architecture. Compared to traditional single-path retrieval modes, the "graph retrieval + text block retrieval" dual-path recall strategy leverages graph traversal algorithms to uncover direct and indirect relationships between entities, ensuring the structured and relevant nature of retrieval results. Simultaneously, it utilizes a fusion retrieval system combining text block vector cosine similarity and the BM25 algorithm, balancing semantic and statistical feature matching to achieve comprehensive coverage of key information. Subsequent secondary filtering using the RRF fusion algorithm and a ranking model effectively avoids information omissions or redundancy, ensuring that the context input to the large model is both comprehensive and focused on the core information.
[0082] Regarding the reliability of results and system security, this invention constructs a full-link traceability mechanism. By establishing a bidirectional mapping relationship between knowledge graph nodes, text blocks, and original data sources, the source of answer information is automatically labeled, realizing a complete "answer-reference basis-original data" link. Simultaneously, a local open-source large model deployment scheme is adopted, deploying models such as Qwen3-32B and Qwen3-235B-A22B, along with knowledge graph data, within the enterprise. This effectively avoids the risk of data leakage and supports flexible iteration based on changes in business, regulatory policies, and consulting needs, balancing security and controllability with system adaptability.
[0083] This invention focuses on the intelligent question-and-answer needs of employee assistants across all business scenarios in the securities industry. Leveraging the advantages of "structured knowledge + deep reasoning + security and controllability," it demonstrates significant application potential in multiple key areas such as daily employee work, business operations, and compliance management. For example, in daily business consultation scenarios, whether it's a new employee's basic questions about account opening procedures, trading rules, and fund settlement logic, or an experienced employee's professional inquiries about complex product return calculations and cross-market trading compliance requirements, this invention can construct an employee assistant system to analyze the question's intent, quickly retrieve relevant business knowledge from a financial knowledge graph, and generate accurate answers using a large-scale model inference, effectively reducing employees' knowledge acquisition costs and improving business efficiency.
[0084] Example 3 Embodiment 2 of the present invention discloses an intelligent question-answering device based on knowledge graphs and text blocks, such as... Figure 5 As shown, the device may include: Vector conversion module 201 is used to obtain user questions in natural language form and convert the user questions into question vectors in vector form. The graph matching module 202 is used to match the question vector with a preset knowledge graph to obtain an initial subgraph corresponding to the question vector; based on the initial subgraph and the user question, obtain M first related text blocks corresponding to the user question; and filter out related subgraphs from the initial subgraph based on the M first related text blocks. The text matching module 203 is used to match the question vector with a preset set of text blocks to obtain N second related text blocks corresponding to the question vector; and to merge M first related text blocks with N second related text blocks to obtain K target related text blocks. The intelligent question answering module 204 is used to input the K target-related text blocks and the related sub-graph as joint context into the pre-trained question answering model to obtain the answer information output by the question answering model after reasoning; The preset knowledge graph and the preset text block set are obtained by analyzing the preset knowledge set data; M, N and K are preset positive integers.
[0085] In an optional embodiment, the specific operation method by which the graph matching module 202 matches the question vector with a preset knowledge graph to obtain the initial sub-graph corresponding to the question vector may include: The question vector is matched with a preset knowledge graph to obtain associated entities; the knowledge graph is traversed to mine the relationships between all associated entities, and an initial subgraph corresponding to the question vector is obtained based on all associated entities and the relationships between them.
[0086] In another optional embodiment, the specific operation method by which the graph matching module 202 obtains the M first relevant text blocks corresponding to the user question based on the initial sub-graph and the user question may include: Extract all triples from the initial subgraph, where each triple includes two entities and a relationship between the two entities; For each triple, the original text fragment is obtained from the user question based on the two entities in the triple and the relationship between the two entities. Based on the original text segments corresponding to all the triples, determine the weight information corresponding to each original text segment; based on the weight information corresponding to each original text segment, filter out M relevant text segments; Based on the M related text fragments, M first related text blocks corresponding to the user question are obtained.
[0087] In another optional embodiment, the specific operation method by which the graph matching module 202 matches the original text fragment from the user question for each triple based on the two entities in the triple and the relationship between the two entities may include: For each triple, the two entities in the triple are expanded using a preset knowledge set data to obtain multiple expanded entities; the relationship between the two entities in the triple is expanded to obtain multiple expanded relationships. For each triple, multiple extended statements are constructed based on all extended entities and all extended relations; all extended statements are then matched with the user question to obtain the matched original text fragment.
[0088] In another optional embodiment, the specific operation method by which the text matching module 203 merges M first related text blocks and N second related text blocks to obtain K target related text blocks may include: The M first-related text blocks and N second-related text blocks are deduplicated and merged to obtain a candidate text block set; After sorting the candidate text block set using a sorting fusion algorithm, H third-related text blocks are selected. Calculate the semantic fit between each third relevant text block and the user question, sort the semantic fit, and then select K target relevant text blocks; Where H is a preset positive integer.
[0089] In another optional embodiment, the specific operation of the vector conversion module 201 in acquiring the user question in natural language form and converting the user question into a question vector in vector form may include: The user question is obtained in natural language form, and the user question is divided into text blocks according to multiple preset text block granularity division rules to obtain multiple text block sequences; a sub-question vector is determined according to each text block sequence, and a question vector is obtained according to all the sub-question vectors; Furthermore, the specific operation method by which the text matching module 203 matches the question vector with a preset set of text blocks to obtain N second related text blocks corresponding to the question vector may include: For each of the sub-question vectors, the sub-question vector is matched with a preset set of text blocks to obtain multiple fourth related text blocks corresponding to the sub-question vector; For all the fourth related text blocks corresponding to all the sub-problem vectors, N second related text blocks corresponding to the problem vectors are obtained by filtering according to the frequency of occurrence of each fourth related text block.
[0090] In another optional embodiment, the text matching module 203, for all the fourth related text blocks corresponding to all the sub-question vectors, filters out N second related text blocks corresponding to the question vectors based on the frequency of occurrence of each fourth related text block. This specific operation may include: For each sub-problem vector, based on the frequency of occurrence of each fourth related text block, select S initial fourth related text blocks corresponding to the sub-problem vector, and obtain an initial set including the S initial fourth related text blocks; Perform semantic similarity sorting on the initial sets corresponding to all the sub-problem vectors, and select L initial sets; Based on the frequency of occurrence of each fourth related text block in the L initial sets, N second related text blocks corresponding to the question vector are obtained by filtering. Where S and L are preset positive integers.
[0091] In another optional embodiment, the preset knowledge graph and the preset set of text blocks are obtained by analyzing preset financial data; the financial data includes one or more of the following: financial industry compliance and system data, securities company business data, securities company historical consultation script data, and financial encyclopedia knowledge data.
[0092] Example 4 Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of an intelligent question-answering system based on knowledge graphs and text blocks, as disclosed in an embodiment of the present invention. The intelligent question-answering system based on knowledge graphs and text blocks may include: Memory 301 storing executable program code; Processor 302 coupled to memory 301; The processor 302 calls the executable program code stored in the memory 301 to execute some or all of the steps in any of the intelligent question answering methods based on knowledge graphs and text blocks in Embodiment 1 or Embodiment 2 of the present invention.
[0093] Example 5 This invention discloses a computer storage medium storing computer instructions. When executed by a processor, these computer instructions implement some or all of the steps in any of the intelligent question-answering methods based on knowledge graphs and text blocks in either Embodiment 1 or Embodiment 2 of this invention.
[0094] The device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0095] Through the detailed description of the above embodiments, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, including read-only memory (ROM), random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically-Erasable Programmable Read-Only Memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.
[0096] Finally, it should be noted that the above embodiments are merely preferred embodiments of the present invention and are only used to illustrate the technical solutions of the present invention, not to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. An intelligent question-answering method based on knowledge graphs and text blocks, characterized in that, The method includes: Obtain user questions in natural language form and convert the user questions into a question vector in vector form; The question vector is matched with a preset knowledge graph to obtain an initial sub-graph corresponding to the question vector; Based on the initial subgraph and the user question, M first relevant text blocks corresponding to the user question are obtained; relevant subgraphs are selected from the initial subgraph based on the M first relevant text blocks; The question vector is matched with a preset set of text blocks to obtain N second related text blocks corresponding to the question vector; Merge M first-related text blocks with N second-related text blocks to obtain K target-related text blocks; K target-related text blocks and the related sub-graphs are used as joint context inputs to a pre-trained question-answering model to obtain the answer information output by the question-answering model after reasoning. The preset knowledge graph and the preset text block set are obtained by analyzing the preset knowledge set data; M, N and K are preset positive integers.
2. The intelligent question-answering method based on knowledge graphs and text blocks according to claim 1, characterized in that, The step of matching the question vector with a preset knowledge graph to obtain an initial sub-graph corresponding to the question vector includes: The question vector is matched with a preset knowledge graph to obtain associated entities; the knowledge graph is traversed to mine the relationships between all associated entities, and an initial subgraph corresponding to the question vector is obtained based on all associated entities and the relationships between them.
3. The intelligent question-answering method based on knowledge graphs and text blocks according to claim 1, characterized in that, The step of obtaining M first relevant text blocks corresponding to the user question based on the initial sub-graph and the user question includes: Extract all triples from the initial subgraph, where each triple includes two entities and a relationship between the two entities; For each triple, the original text fragment is obtained from the user question based on the two entities in the triple and the relationship between the two entities. Based on the original text segments corresponding to all the triples, determine the weight information corresponding to each original text segment; based on the weight information corresponding to each original text segment, filter out M relevant text segments; Based on the M related text fragments, obtain the M first related text blocks corresponding to the user question.
4. The intelligent question-answering method based on knowledge graphs and text blocks according to claim 3, characterized in that, For each triple, based on the two entities in the triple and the relationship between the two entities, the original text fragment is matched from the user question, including: For each triple, the two entities in the triple are expanded using a preset knowledge set data to obtain multiple expanded entities; the relationship between the two entities in the triple is expanded to obtain multiple expanded relationships. For each triple, multiple extended statements are constructed based on all extended entities and all extended relations; all extended statements are then matched with the user question to obtain the matched original text fragment.
5. The intelligent question-answering method based on knowledge graphs and text blocks according to claim 1, characterized in that, The step of merging M first-related text blocks with N second-related text blocks to obtain K target-related text blocks includes: The M first-related text blocks and N second-related text blocks are deduplicated and merged to obtain a candidate text block set; After sorting the candidate text block set using a sorting fusion algorithm, H third-related text blocks are selected. Calculate the semantic fit between each third relevant text block and the user question, sort the semantic fit, and then select K target relevant text blocks; Where H is a preset positive integer.
6. The intelligent question-answering method based on knowledge graphs and text blocks according to claim 1, characterized in that, The process of obtaining user questions in natural language form and converting the user questions into a vector form of question vectors includes: The user question is obtained in natural language form, and the user question is divided into text blocks according to multiple preset text block granularity division rules to obtain multiple text block sequences; a sub-question vector is determined according to each text block sequence, and a question vector is obtained according to all the sub-question vectors; And, the step of matching the question vector with a preset set of text blocks to obtain N second related text blocks corresponding to the question vector includes: For each of the sub-question vectors, the sub-question vector is matched with a preset set of text blocks to obtain multiple fourth related text blocks corresponding to the sub-question vector; For all the fourth related text blocks corresponding to all the sub-problem vectors, N second related text blocks corresponding to the problem vectors are obtained by filtering according to the frequency of occurrence of each fourth related text block.
7. The intelligent question-answering method based on knowledge graphs and text blocks according to claim 6, characterized in that, For all the fourth related text blocks corresponding to all the sub-question vectors, N second related text blocks corresponding to the question vectors are selected based on the frequency of occurrence of each fourth related text block, including: For each sub-problem vector, based on the frequency of occurrence of each fourth related text block, select S initial fourth related text blocks corresponding to the sub-problem vector, and obtain an initial set including the S initial fourth related text blocks; Perform semantic similarity sorting on the initial sets corresponding to all the sub-problem vectors, and select L initial sets; Based on the frequency of occurrence of each fourth related text block in the L initial sets, N second related text blocks corresponding to the question vector are obtained by filtering. Where S and L are preset positive integers.
8. The intelligent question-answering method based on knowledge graphs and text blocks according to any one of claims 1-7, characterized in that, The preset knowledge graph and the preset set of text blocks are obtained by analyzing preset financial data; the financial data includes one or more of the following: financial industry compliance and system data, securities company business data, securities company historical consultation script data, and financial encyclopedia knowledge data.
9. An intelligent question-answering device based on knowledge graphs and text blocks, characterized in that, The device includes: The vector conversion module is used to obtain user questions in natural language form and convert the user questions into question vectors in vector form. The graph matching module is used to match the question vector with a preset knowledge graph to obtain an initial subgraph corresponding to the question vector; based on the initial subgraph and the user question, obtain M first relevant text blocks corresponding to the user question; and filter relevant subgraphs from the initial subgraph based on the M first relevant text blocks. The text matching module is used to match the question vector with a preset set of text blocks to obtain N second related text blocks corresponding to the question vector; and to merge M first related text blocks with N second related text blocks to obtain K target related text blocks. The intelligent question answering module is used to input K target-related text blocks and the related sub-graph as joint context into a pre-trained question answering model to obtain the answer information output by the question answering model after reasoning. The preset knowledge graph and the preset text block set are obtained by analyzing the preset knowledge set data; M, N and K are preset positive integers.
10. An intelligent question-answering system based on knowledge graphs and text blocks, characterized in that, The system includes: a memory storing executable program code; a processor coupled to the memory; the processor calling the executable program code stored in the memory to execute the intelligent question answering method based on knowledge graphs and text blocks as described in any one of claims 1-8.
Citation Information
Patent Citations
Question answering method and device based on artificial intelligence
CN109145099A
Question answering method, related device, electronic equipment and storage medium
CN114547273A
Generative intelligent question and answer method, system and equipment and storage medium
CN117332056A
Domain intelligent question-answering system and method based on knowledge graph library and text vector library
CN119128095A
Intelligent question answering method and device based on large model, storage medium and server
CN120578739A