Financial information query method and system based on graph analysis
Through a graph analysis-based method, financial information queries are decomposed into logically coherent subtasks and analyzed using multiple knowledge retrieval models, which solves the problem of inaccurate query results in complex financial problems in existing systems and realizes efficient and accurate financial information query.
Patent Information
- Application Number
- CN202510751387.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-06
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2045-06-06
AI Technical Summary
Existing financial information retrieval systems lack deep understanding and scenario perception capabilities, making it difficult to accurately locate the specific details required by employees, especially when dealing with complex and ever-changing financial issues or product characteristics, resulting in poor comprehensiveness and accuracy of query results.
A graph analysis-based method is used to decompose users' comprehensive queries into several logically coherent query subtasks through deep semantic understanding and a task-driven framework. A task execution graph is constructed, and each query subtask is analyzed by integrating multiple knowledge retrieval models to ensure that the accuracy score is not lower than the preset threshold. Finally, the query results are combined and fed back to the user.
It has achieved accurate analysis and efficient answers to complex financial issues, and improved the professionalism and user experience of financial institutions' knowledge management and retrieval services.
Smart Images

Figure CN120256647B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent question-answering technology, and more specifically, to a financial information query method and system based on graph analysis. Background Art
[0002] In today's banking environment, with increasing business complexity, bank employees face the daunting challenge of mastering and applying a growing and frequently updated volume of rules, regulations, operational guidelines, and external regulatory policies. This information is not only widely distributed across multiple channels, including internal documents, external websites, and professional reports, but also updates at an extremely rapid pace, requiring employees to remain highly aware of the latest developments.
[0003] However, existing financial information retrieval systems are often limited to keyword matching, lacking deep understanding and contextual awareness. This makes it difficult to pinpoint the specific details employees need, especially when dealing with complex and ever-changing financial issues or product features. Therefore, a more intelligent and flexible financial information search method is urgently needed to overcome these issues and improve the overall operational efficiency of financial institutions. Summary of the Invention
[0004] The embodiments of the present application provide a financial information query method and system based on graph analysis, so as to at least solve the technical problem that the comprehensiveness and accuracy of the final query results obtained are poor because the financial information query technology based on keyword matching does not have a deep understanding of the semantics of the query task.
[0005] According to one aspect of an embodiment of the present application, a financial information query method based on graph analysis is provided, comprising: obtaining a query task input by a target object, wherein the query task is used to reflect the financial problem to be queried by the target object; dividing the query task to obtain multiple query subtasks, and sorting the multiple query subtasks according to the dependency relationship between the multiple query subtasks to obtain a task execution graph corresponding to the query task; for each query subtask, using multiple knowledge retrieval models to analyze the query subtask and the target query results of all executed query subtasks that have a dependency relationship with the query subtask, to obtain at least one first candidate query result whose accuracy score output by each knowledge retrieval model is not lower than a preset first score threshold, and determining the target query result of the query subtask based on each first candidate query result; according to the task execution graph, combining the target query results of each query subtask to obtain a final query result of the query task, and feeding back the final query result to the target object.
[0006] Optionally, the query task is divided into tasks to obtain multiple query subtasks, and the multiple query subtasks are sorted according to the dependency relationship between the multiple query subtasks to obtain a task execution graph corresponding to the query task, including: preprocessing the query task, wherein the preprocessing includes at least one of the following: removing noise characters, standardizing abbreviations, and replacing synonyms; using a named entity recognition algorithm to perform entity recognition on the preprocessed query task to obtain at least one key entity in the query task, and determining the attribute information of each key entity, wherein the key entity includes at least one of the following: financial institutions, financial product names, financial market participants, economic indicators, time information, and location information; using The pre-trained intent recognition model analyzes the pre-processed query task to obtain the query intent of the query task, wherein the intent recognition model is trained using the first fine-tuning training data set, and the first fine-tuning data set contains multiple query task samples involving the financial field and the query intent label corresponding to each query task sample; based on the attribute information and query intent of each key entity, the query task is divided into multiple query subtasks, and the dependency relationship between each query subtask is determined, wherein the dependency relationship includes: sequential dependency or parallel dependency; each query subtask is regarded as a graph node, and the directed edges between the corresponding graph nodes are determined based on the dependency relationship between each query subtask to construct a task execution graph.
[0007] Optionally, multiple knowledge retrieval models are used to analyze the query subtasks and the target query results of all executed query subtasks that have a dependency relationship with the query subtasks, and obtain at least one first candidate query result output by each knowledge retrieval model with an accuracy score not lower than a preset first score threshold, including: determining all executed query subtasks that have a dependency relationship with the query subtask based on the task execution graph, and respectively determining the first embedding vector of the target query result of each executed query subtask and the second embedding vector of the query subtask; for each knowledge retrieval model, using each first embedding vector and the second embedding vector as the first input vector of the knowledge retrieval model, and using the knowledge retrieval model to analyze the first input vector to obtain a first number of preliminary query results within the first retrieval time range output by the knowledge retrieval model and the original confidence of each preliminary query result, wherein each knowledge retrieval model outputs a first number of preliminary query results within the first retrieval time range ... The model is obtained by training using different second fine-tuning training data sets, and each second fine-tuning training data set contains: multiple query task samples involving the financial field, correct query result samples of each query task sample and the confidence of the correct query result samples; for each preliminary query result, multiple confidence calibration values of the preliminary query result are determined, and the uncertainty of the preliminary query result is determined, wherein the multiple confidence calibration values at least include: semantic relevance, information timeliness, and source credibility; the original confidence of the preliminary query result is calibrated using the multiple confidence calibration values to obtain a calibrated confidence; the calibrated confidence and uncertainty of the preliminary query result are weighted and summed using a preset weight coefficient to obtain an accuracy score of the preliminary query result; at least one first candidate query result with an accuracy score not lower than a first score threshold is determined from the first number of preliminary query results output by each knowledge retrieval model.
[0008] Optionally, multiple confidence calibration values of the preliminary query results are determined, including: determining a third embedding vector of the preliminary query results, and calculating the vector similarity between the third embedding vector and the second embedding vector, and using the vector similarity as the semantic relevance of the preliminary query results; determining the latest update time of the information contained in the preliminary query results and the required retrieval time range of the query task, and calculating the time fit between the latest update time and the required retrieval time range, and using the time fit as the information timeliness of the preliminary query results; obtaining the credibility of the source of each information in the preliminary query results; determining the data volume ratio of each information in the preliminary query results to the total information of the preliminary query results, and performing weighted summation on the credibility of the source of each information based on the data volume ratio to obtain the source credibility of the preliminary query results.
[0009] Optionally, the uncertainty of the preliminary query result is determined, comprising: obtaining probability distributions of the second quantity of preliminary query results obtained by performing multiple forward analyses on the first input vector by the plurality of knowledge retrieval models, wherein the second quantity is greater than the first quantity; and determining the uncertainty of the preliminary query result according to the probability distributions and according to the following formula: , wherein represents the uncertainty of the i th preliminary query result, represents the occurrence probability of the i th preliminary query result, m represents the total quantity of the plurality of knowledge retrieval models, n represents the second quantity of preliminary query results output by a single knowledge retrieval model, and .
[0010] Optionally, the target query result of the query subtask is determined based on each first candidate query result, comprising: merging each first candidate query result according to the accuracy score to obtain a merged candidate query result and an accuracy score of the merged candidate query result; determining whether the accuracy score of the merged candidate query result is lower than a preset second score threshold, wherein the second score threshold is not lower than the first score threshold; in the case that the accuracy score of the merged candidate query result is not lower than the second score threshold, taking the merged candidate query result as the target query result of the query subtask; in the case that the accuracy score of the merged candidate query result is lower than the second score threshold, performing the following steps until the merged candidate query result with an accuracy score not lower than the second score threshold is obtained as the target query result of the query subtask, comprising: first step: determining a third embedding vector of the merged candidate query result, and taking each first embedding vector, second embedding vector and third embedding vector as a second input vector; second step: performing analysis on the second input vector by the plurality of knowledge retrieval models again to obtain a third quantity of preliminary query results output by the knowledge retrieval models within a second retrieval time range and an original confidence of each preliminary query result, wherein the second retrieval time range is greater than the first retrieval time range, the third quantity is greater than the first quantity and not greater than the second quantity; determining at least one second candidate query result with an accuracy score not lower than the first score threshold from the third quantity of preliminary query results output by each knowledge retrieval model; fourth step: in the case that the accuracy score of the new merged candidate query result is lower than the second score threshold, continuing to perform the first step.
[0011] Optionally, the first candidate query results are merged according to the accuracy scores to obtain a merged candidate query result and an accuracy score of the merged candidate query result, including: determining third embedding vectors of the first candidate query results respectively; determining corresponding weighting coefficients according to the accuracy scores of the first candidate query results, wherein the accuracy scores are proportional to the weighting coefficients; performing weighted summation on the third embedding vectors of the first candidate query results according to the weighting coefficients to obtain a fourth embedding vector, and calling a preset decoder to decode the fourth embedding vector to obtain the merged candidate query result; and performing weighted summation on the accuracy scores of the first candidate query results according to the weighting coefficients to obtain the accuracy score of the merged candidate query result.
[0012] According to another aspect of the embodiments of the present application, a financial information query system based on graph analysis is also provided, including: an acquisition module configured to acquire a query task input by a target object, wherein the query task is used to reflect a financial problem to be queried by the target object; a graph construction module configured to divide the query task into a plurality of query subtasks, and perform task ordering on the plurality of query subtasks according to a dependency relationship between the plurality of query subtasks to obtain a task execution graph corresponding to the query task; a model retrieval module configured to, for each query subtask, analyze the query subtask and target query results of all executed query subtasks having a dependency relationship with the query subtask by using a plurality of knowledge retrieval models to obtain at least one first candidate query result output by each knowledge retrieval model and having an accuracy score not lower than a preset first score threshold, and determine a target query result of the query subtask based on the first candidate query result; and a feedback module configured to combine the target query results of the query subtasks according to the task execution graph to obtain a final query result of the query task, and feed back the final query result to the target object.
[0013] According to another aspect of the embodiments of the present application, a computer program product is also provided, including: a computer program, wherein the computer program is executed by a processor to implement the above-mentioned financial information query method based on graph analysis.
[0014] According to another aspect of the embodiments of the present application, an electronic device is also provided, including: a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the above-mentioned financial information query method based on graph analysis by the computer program.
[0015] In the embodiments of the present application, through deep semantic understanding and task-driven framework, the comprehensive query proposed by the user is decomposed into several logically coherent query sub-tasks, and a task execution graph is constructed to optimize the execution process; the intelligent question and answer hub integrating multiple models is used to ensure that each query sub-task can obtain the target query result with the highest accuracy score; finally, the target query results of each query sub-task are integrated and combined to obtain the final query result of the query task, and fed back to the target object, realizing the technical effects of accurate decomposition and efficient answer to complex financial problems, and achieving the purpose of greatly improving the professionalism of knowledge management and retrieval service of financial institutions and user experience. Further, the technical problem that the comprehensive and accuracy of the final query result is poor due to the fact that the financial information query technology based on keyword matching does not deeply understand the semantic of the query task is solved. BRIEF DESCRIPTION OF DRAWINGS
[0016] The drawings described herein are used to provide further understanding of the present application, and form a part of the present application. The illustrative embodiments of the present application and their descriptions serve to explain the present application, and do not constitute improper limitations on the present application. In the drawings:
[0017] Figure 1 is a flow diagram of an optional financial information query method based on graph analysis according to an embodiment of the present application;
[0018] Figure 2 is a structural diagram of an optional financial information query system based on graph analysis according to an embodiment of the present application;
[0019] Figure 3 is a structural diagram of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0020] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should fall within the scope of protection of the present application.
[0021] It should be noted that the terms "first", "second", etc. in the specification, claims, and drawings of the present application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.
[0022] Example 1
[0023] According to an embodiment of the present application, a financial information query method based on graph analysis is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0024] Figure 1 This is a flow chart of a financial information query method based on graph analysis provided in accordance with an embodiment of the present application, such as Figure 1 As shown, the method includes the following steps:
[0025] Step S102: Obtain the query task input by the target object.
[0026] In the technical solution provided in step S102 above, the target audience refers to financial institution staff or users, such as frontline sales representatives, risk managers, product managers, and other internal or external personnel seeking financial knowledge. The query task refers to a request submitted by the target audience through the financial institution's query system to obtain answers to specific financial questions or relevant information. This includes, but is not limited to, detailed consultation on financial products, interpretation of the latest regulatory policies, key data inquiries for industry research reports, and analysis requests for specific client cases.
[0027] Step S104 , dividing the query task into multiple query subtasks, and sorting the multiple query subtasks according to the dependency relationships between the multiple query subtasks to obtain a task execution graph corresponding to the query task.
[0028] In the technical solution provided in step S104 above, the financial institution's query system uses natural language processing technology to break down the original complex query task into a series of more specific and easier-to-handle query subtasks. Therefore, query subtasks can be understood as independent information retrieval or computational units decomposed from the original query task. Each query subtask may involve different data sources or business systems, representing different steps or aspects of implementing the original query task. Furthermore, based on the dependencies between the query subtasks, algorithms such as topological sorting in graph theory are used to generate an acyclic directed graph—a task execution graph—to intuitively demonstrate the execution order of the query subtasks.
[0029] Step S106: For each query subtask, multiple knowledge retrieval models are used to analyze the query subtask and the target query results of all executed query subtasks that have dependencies on the query subtask, and at least one first candidate query result whose accuracy score output by each knowledge retrieval model is not lower than a preset first score threshold is obtained, and the target query result of the query subtask is determined based on each first candidate query result.
[0030] In the technical solution provided in step S106 above, multiple knowledge retrieval models can be used to simultaneously analyze each query subtask within the query task, taking into account the context of the query subtask (i.e., the outputs of previously completed and dependent query subtasks). This results in the generation of possible answers (i.e., first candidate query results) generated by each knowledge retrieval model for the query subtask, along with an accuracy score corresponding to each query subtask. Possible answers include, but are not limited to, specific numerical results, policy and regulatory excerpts, product feature descriptions, and industry analysis conclusions, directly or indirectly responding to the user's initial inquiry. Furthermore, by comparing and evaluating the first candidate query results generated by each model and the accuracy scores corresponding to the query subtasks, the query system intelligently selects target query results with an accuracy score no less than a preset first score threshold, thereby ensuring the accuracy and reliability of the query results for that query subtask.
[0031] Step S108: Based on the task execution graph, the target query results of each query subtask are combined to obtain the final query result of the query task, and the final query result is fed back to the target object.
[0032] In the technical solution provided in the above step S108, the query system combines the target query results of each query subtask in series or in parallel as needed according to the dependency relationship and task execution order defined in the task execution graph to obtain the final query result of the query task, and finally feeds back the final query result to the target object.
[0033] Based on the scheme defined in the above steps S102 to S108, it can be known that in the embodiment of the present application, through deep semantic understanding and task-driven framework, the comprehensive query proposed by the user is decomposed into several logically coherent query subtasks, and a task execution graph is constructed to optimize the execution process; an intelligent question-answering center that integrates multiple models is used to ensure that each query subtask can obtain the target query result with the highest accuracy score; finally, the target query results of each query subtask are integrated and combined to obtain the final query result of the query task, and the result is fed back to the target object, thereby achieving the technical effect of accurate decomposition and efficient solution of complex financial problems, and achieving the purpose of greatly improving the professionalism and user experience of knowledge management and retrieval services of financial institutions.
[0034] The following describes the various steps of the financial information query method based on graph analysis in conjunction with a specific implementation process.
[0035] As an optional implementation, in the technical solution provided in step S104 above, the query system may obtain the task execution graph corresponding to the query task according to the following method, including:
[0036] Step S1041: pre-process the query task.
[0037] Preprocessing involves deep cleaning and standardization of query tasks received by the system. This includes, but is not limited to: using regular expressions to identify and remove noise characters (such as special symbols and spaces) that may interfere with model understanding; cleaning the query tasks to remove elements such as HTML tags, numbers, and special characters; standardizing the task data to eliminate parsing anomalies caused by inconsistent encoding; standardizing abbreviations to restore their complete expressions; and replacing synonyms to enhance the richness and accuracy of semantic expression. These preprocessing steps help reduce ambiguity in subsequent analysis and improve overall processing efficiency.
[0038] Step S1042 : performing entity recognition on the pre-processed query task using a named entity recognition (NER) algorithm to obtain at least one key entity in the query task and determine attribute information of each key entity.
[0039] Optionally, in the technical solution provided in step S1042 above, during the entity recognition process, the system can first perform word segmentation on the pre-processed query task and determine the part of speech of each word obtained after word segmentation, such as verb, noun, time expression, etc.; for each word, a feature vector of the word is extracted, which includes the part of speech, the part of speech of the preceding and following words, the morphological information of the word itself (such as capitalization of the first letter, whether it is a number, etc.), and information based on dictionaries and financial domain knowledge; then, a deep learning model based on the named entity recognition algorithm is used to analyze the feature vectors of each word to determine whether each word belongs to an entity type, such as a financial institution, a financial product name, a financial market participant, an economic indicator, time information, and location information. Furthermore, the system further refines the attribute information of each key entity from the pre-processed query task, such as the time range, geographic location, and specific numerical requirements of business indicators, and converts it into programmable structured parameters.
[0040] Step S1043 , using the pre-trained intent recognition model to analyze the pre-processed query task to obtain the query intent of the query task.
[0041] Specifically, the above-mentioned intent recognition model is trained using a first fine-tuning training dataset, which contains multiple query task samples related to the financial field and the query intent label corresponding to each query task sample. Among them, the query task samples are pre-collected from a large number of query samples related to the financial field, such as user questions, customer service conversation records, industry forum posts, etc., to ensure coverage of various financial business and service scenarios; the collected query samples are then manually annotated by financial experts to clarify the query intent category of each query sample (such as transaction consultation, product recommendation, regulatory interpretation, market analysis, etc.), which is used as the query intent label of the query task sample. It should be noted that the annotated first fine-tuning training dataset can be balanced to ensure that the number of samples of each type of query intent is relatively uniform, so as to avoid biased misjudgments of the model due to data skew.
[0042] In the technical solution provided in step S1043 above, the system first extracts features from the preprocessed query task, paying particular attention to semantic features at the lexical and sentence levels. Next, the system inputs the resulting query task feature vector into the intent recognition model, and through a forward propagation process, predicts the query intent of the query task. The output layer of the model is a multi-classifier that outputs a series of intent labels and their confidence levels. Finally, based on the intent labels output by the model and their probability distribution, the system selects the intent with the highest probability or that meets a preset threshold as the final intent recognition result.
[0043] Step S1044 : dividing the query task into multiple query subtasks based on the attribute information of each key entity and the query intent, and determining the dependency relationship between each query subtask.
[0044] In the technical solution provided in step S1044 above, the system can dynamically match predefined query subtask templates based on the attribute information of each key entity and the query intent, and fill the structured attribute information of each key entity into the corresponding position in the template, generating multiple query subtask instructions, so that each query subtask obtained by division focuses on one aspect of the original query task. After completing the subtask decomposition, the system can encapsulate each query subtask into an independent work unit and clarify its input, output, and execution conditions. This will determine the logical and data dependencies between the query subtasks and obtain the dependency relationships between the query subtasks, such as sequential dependencies or parallel dependencies.
[0045] In step S1045, each query subtask is treated as a graph node, and directed edges between corresponding graph nodes are determined based on the dependencies between the query subtasks to form a directed acyclic graph and construct a task execution graph.
[0046] Therefore, the task execution map obtained through the above steps S1041-S1045 not only clarifies the execution order of the query subtasks, but also intuitively displays the overall picture of the query process, making it easier for the system to monitor the progress in real time and intervene and adjust in time to ensure the efficiency and orderliness of the query process.
[0047] In an exemplary embodiment, consider the query task posed by user A: "Changes in Bank A's mortgage interest rates over the past five years." The query system first removes irrelevant characters (such as punctuation and stop words) from the query task and unifies its format. It then uses a named entity recognition algorithm to identify entities within the pre-processed query task, identifying "Bank A" (i.e., the financial institution), "mortgage interest rates" (i.e., an economic indicator), and "past five years" (i.e., the timeframe) as key entities. Subsequently, an intent recognition model analyzes the query task and confirms that it is a report-based query requiring time series data.
[0048] Based on this, the query system decomposes the original query task into the following three core subtasks:
[0049] Subtask 1: "Search for documents related to mortgage interest rate adjustments over the past five years";
[0050] Subtask 2: "Analyze Bank A's annual reports over the years and extract relevant sections on mortgage interest rate adjustments";
[0051] Subtask 3: “Compare the results of Subtask 1 and Subtask 2 to identify the key moments and influencing factors of changes in mortgage interest rates.”
[0052] Next, determine the sequential dependencies between the three subtasks, that is, subtask 2 depends on subtask 1, and subtask 3 depends on subtask 2 and subtask 1. Therefore, the execution order of the three subtasks is: subtask 1 → subtask 2 → subtask 3.
[0053] Finally, the query system can use these three core subtasks as graph nodes, determine the edges between these three graph nodes based on the dependency relationships (i.e., sequential dependencies) between these three core subtasks, and construct a task execution graph.
[0054] In this way, the query system not only realizes the automation and ordering of the query process, but also ensures the efficiency and accuracy of information retrieval and processing, and finally feeds back the integrated non-performing loan rate change curve to users.
[0055] As an optional implementation, in the technical solution provided in step S106 above, the system may call the knowledge retrieval model according to the following steps to obtain at least one first candidate query result whose accuracy score output by each knowledge retrieval model is not less than a preset first score threshold, including:
[0056] In step S1061 , all executed query subtasks having a dependency relationship with the query subtask are determined based on the task execution graph, and a first embedding vector of the target query result of each executed query subtask and a second embedding vector of the query subtask are determined respectively.
[0057] In the technical solution provided in step S1061 above, the query system can identify a list of historically executed subtasks that have direct or indirect dependencies on the currently executed query subtask based on the directed edges in the task execution graph, and extract the target query results of each executed query subtask within the historically executed subtask list from the database. Next, a pre-trained semantic embedding model (such as BERT or Sentence-BERT) is used to deeply encode the target query results of each executed query subtask, generating multiple first embedding vectors of fixed dimension. Simultaneously, the task description of the currently executed query subtask is similarly encoded to obtain a corresponding second embedding vector. This second embedding vector captures the semantic features, business intent, and execution environment details of the currently executed query subtask.
[0058] Step S1062: For each knowledge retrieval model, each first embedding vector and second embedding vector is used as the first input vector of the knowledge retrieval model, and the first input vector is analyzed using the knowledge retrieval model to obtain the first number of preliminary query results within the first retrieval time range output by the knowledge retrieval model and the original confidence of each preliminary query result.
[0059] The types of the knowledge retrieval models include, but are not limited to, a vector database retrieval model, a knowledge graph query model, and a structured data query model. The selection of the model type can be set according to an actual application scenario. In addition, each knowledge retrieval model is obtained by training a second fine-tuning training data set. The second fine-tuning training data set includes a large number of query task samples related to the financial field, a correct query result sample of each query task sample, and a confidence of the correct query result sample.
[0060] Therefore, in the technical solution provided in step S1062, the system can splice or weightedly combine the generated first embedding vector and the second embedding vector by using an attention mechanism to form a first input vector containing historical context information. In this way, it can be ensured that the feature vector input into the model contains not only the key features of the current query but also the execution results of the previous tasks, greatly enhancing the context awareness ability of the model when processing complex query tasks. Then, the system calls multiple knowledge retrieval models in parallel, takes the first input vector as input, and drives each model to perform deep retrieval in the financial data source (such as a research report or a financial statement) responsible for each model. Each model can output the first number of records highly related to the current query subtask within the first retrieval time range as a preliminary query result based on the learning results of the corresponding second fine-tuning training data set, and each result is also attached with the original confidence evaluated by the model.
[0061] In step S1063, for each preliminary query result, a plurality of confidence calibration values of the preliminary query result are determined, and an uncertainty of the preliminary query result is determined. The original confidence of the preliminary query result is calibrated by using the plurality of confidence calibration values to obtain a calibrated confidence. The calibrated confidence and the uncertainty of the preliminary query result are weightedly summed by using a preset weight coefficient to obtain an accuracy score of the preliminary query result.
[0062] In step S1064, at least one first candidate query result with an accuracy score not less than a first score threshold is determined from the first number of preliminary query results output by each knowledge retrieval model.
[0063] Specifically, in the technical solution provided in the above step S1063, the system takes into account that when a pre-trained large model processes complex query tasks, it may produce "hallucination" information that is inconsistent with the facts because financial issues involve complex semantics, professional terminology and specific background knowledge; at the same time, a single model may perform well in some aspects, but have defects in other aspects, resulting in poor accuracy of the model output results. To this end, the embodiment of the present application proposes to strengthen the emphasis on authoritative information in the field by introducing multiple confidence calibration values such as semantic relevance, information timeliness, and source credibility, and reduce the impact of outdated information or information from unknown sources on the quality of query results.
[0064] Optionally, the query system may determine multiple confidence calibration values for the preliminary query results according to the following steps, including:
[0065] Step 1: Determine the third embedding vector of the preliminary query result and calculate the vector similarity between the third embedding vector and the second embedding vector. The vector similarity is used as the semantic relevance of the preliminary query result.
[0066] Step 2: Determine the latest update time of the information contained in the preliminary query results and the required retrieval time range of the query task, and calculate the temporal fit between the latest update time and the required retrieval time range. The temporal fit is used as the information timeliness (Temporal Relevance) of the preliminary query results. Among them, the latest update time is within the first retrieval time range, and the required retrieval time range is usually the preset time range between the target object input query tasks.
[0067] Step 3: Obtain the credibility of the source of each piece of information in the preliminary query results; determine the data volume ratio of each piece of information in the preliminary query results to the total information in the preliminary query results, and perform a weighted summation of the credibility of the source of each piece of information based on the data volume ratio to obtain the source credibility (Source Credibility) of the preliminary query results.
[0068] In the above embodiment, the system can determine the multi-dimensional confidence calibration values from the semantic level, information timeliness level, and information source level, respectively, where:
[0069] At the semantic level, the system uses a semantic embedding model to deeply encode the description of the initial query results, obtaining a corresponding third embedding vector. The system then calculates the vector similarity between the third embedding vector and the second embedding vector of the query subtask. The higher the vector similarity, the higher the semantic relevance and the stronger the calibrated confidence. Conversely, the lower the vector similarity, the lower the semantic relevance and the weaker the calibrated confidence. Therefore, this vector similarity reflects the pertinence and directness of the initial query results.
[0070] Regarding information timeliness, the system compares the latest update time of the information contained in the preliminary query results with the required search time range of the query task to calculate temporal fit. If the latest update time of the information contained in the preliminary query results falls within the required search time range, the temporal fit is higher and the calibrated confidence level is stronger. Conversely, if the latest update time of the information contained in the preliminary query results falls outside the required search time range, the temporal fit is lower and the calibrated confidence level is weaker. Therefore, information timeliness reflects the timeliness and practical significance of the preliminary query results.
[0071] At the information source level, the system can first obtain the credibility of the source of each piece of information in the preliminary query results. The credibility of the source can be comprehensively determined by the information's provenance, number of citations, and its compatibility with financial knowledge. Next, the system determines the data volume ratio of each piece of information in the preliminary query results to the total information in the preliminary query results. Based on this data volume ratio, the credibility of each piece of information is weighted and summed to obtain the source credibility of the preliminary query results. The higher the source credibility, the stronger the calibrated confidence level.
[0072] It should be noted that the determination process of these three confidence calibration values can be executed in parallel according to the actual application scenario to improve the system processing efficiency.
[0073] In addition, in order to help the system evaluate the confidence level of each model in the output results, the embodiment of the present application proposes to calculate the uncertainty of each preliminary query result output by the model.
[0074] Optionally, the query system may determine the uncertainty of the preliminary query result according to the following steps, including:
[0075] Step 1: Obtain the probability distribution of a second number of preliminary query results, obtained by multiple knowledge retrieval models performing multiple forward analyses on the first input vector. This is because the multiple knowledge retrieval models participating in the collaborative query will perform multiple forward calculations on the first input vector, activating different parts of the model or using different parameter sets to simulate different reasoning paths during each calculation. This results in multiple output results and their corresponding probability distributions for the same input vector from each knowledge retrieval model. Therefore, the second number is greater than the first number.
[0076] Step 2: Based on the probability distribution, determine the uncertainty of the preliminary query result according to the following formula: ,
[0077] In the formula represents the uncertainty of the i-th primary query result, represents the probability of occurrence of the i-th preliminary query result, m represents the total number of multiple knowledge retrieval models, n represents the second number of preliminary query results output by a single knowledge retrieval model, and .
[0078] According to the uncertainty expression of the above preliminary query results, if the probability of the occurrence of the i-th preliminary query result is is very high, while the probabilities of other results are low, then the system's uncertainty about the primary query result is will be relatively low; on the contrary, if the distribution of the preliminary query results is relatively uniform, the uncertainty of the i-th preliminary query result Will be higher.
[0079] Furthermore, the calibration confidence and uncertainty of the preliminary query results are weighted and summed using a preset weight coefficient to obtain an accuracy score of the preliminary query results.
[0080] Since a high probability of occurrence generally means that the model is confident in the first candidate query result, it is not necessarily always correct, especially when the model encounters ambiguous or rare scenarios. Therefore, this embodiment of the application performs a weighted summation of the calibration confidence and uncertainty of the first candidate query result to obtain an accuracy score that accurately reflects the accuracy of the first candidate query result.
[0081] Among them, the setting of the weight values of calibration confidence and uncertainty can be set according to the actual application scenario. For example, in scenarios that require extremely high accuracy, such as financial risk assessment or legal consulting, the fusion weight of calibration confidence (such as 0.7) should be higher than the fusion weight of uncertainty (such as 0.3) to ensure the reliability of the results; in scenarios that do not require high accuracy, such as market trend analysis or general business consulting, the fusion weight of uncertainty can be appropriately increased (such as 0.5), and the fusion weight of calibration confidence can be appropriately reduced (such as 0.5). In addition, the actual contribution of calibration confidence and uncertainty to the quality of query results should be monitored, so as to dynamically adjust the fusion weight of calibration confidence and uncertainty.
[0082] Furthermore, after obtaining at least one first candidate query result output by each knowledge retrieval model with an accuracy score not lower than a preset first score threshold, the query system may also determine a target query result for the query subtask based on each first candidate query result. The specific implementation method is as follows:
[0083] Step S1064 : Merge the first candidate query results according to the accuracy scores to obtain a merged candidate query result and the accuracy scores of the merged candidate query results.
[0084] In the technical solution provided in step S1064 above, the implementation steps of the method include:
[0085] First, the third embedding vector of each first candidate query result is determined. That is, the description content of each first candidate query result with a high accuracy score is converted into a vector form using a vectorization model to obtain the third embedding vector corresponding to each first candidate query result.
[0086] Next, the corresponding weighting coefficient is determined using the accuracy score of each first candidate query result, wherein the accuracy score is proportional to the weighting coefficient, that is, the higher the accuracy score, the larger the weighting coefficient should be.
[0087] Then, the third embedding vectors of each first candidate query result are weighted and summed according to the weighting coefficient to obtain a fourth embedding vector. A preset decoder (such as a Transformer decoder) is called to decode the fourth embedding vector to obtain the merged candidate query result. Simultaneously, the accuracy scores of each first candidate query result are weighted and summed according to the weighting coefficient to obtain the accuracy score of the merged candidate query result.
[0088] Step S1065 , determining whether the accuracy score of the merged candidate query result is lower than a second scoring threshold, wherein the second scoring threshold is not lower than the first scoring threshold.
[0089] Step S1066 : If the accuracy score of the merged candidate query result is not lower than the second score threshold, the merged candidate query result is used as the target query result of the query subtask.
[0090] Step S1067: If the accuracy score of the merged candidate query result is lower than the second scoring threshold, the following steps are performed until a merged candidate query result with an accuracy score not lower than the second scoring threshold is obtained as the target query result of the query subtask, including:
[0091] Step 1: Determine the third embedding vector of the merged candidate query result, and use the first embedding vector, the second embedding vector, and the third embedding vector as the enhanced second input vector.
[0092] Step 2: Analyze the second input vector again using multiple knowledge retrieval models to obtain a third number of preliminary query results within the second retrieval time range output by the knowledge retrieval model and the original confidence of each preliminary query result, wherein the second retrieval time range is greater than the first retrieval time range, and the third number is greater than the first number but not greater than the second number, so as to expand the retrieval time range and increase the number of output results, thereby increasing the probability of finding high-quality query results; determine at least one second candidate query result with an accuracy score not lower than the first score threshold from the third number of preliminary query results output by each knowledge retrieval model.
[0093] Step 3: Merge the second candidate query results based on the accuracy scores to obtain a new merged candidate query result and the accuracy score of the new merged candidate query result.
[0094] Step 4: When the accuracy score of the newly merged candidate query result is lower than the second score threshold, continue to execute the above step 1.
[0095] As an optional implementation, in the technical solution provided in step S108 above, the query system can obtain the final query result of the query task according to the following method, including: determining the modal type of the target query result of each query subtask, where the modal type can be text, image, video, audio, etc.; using multimodal fusion technology (such as a cross-modal encoder) to unify the target query results of different modalities into a single expression framework; and sorting the target query results of each query subtask according to the dependencies defined in the task execution graph to obtain the final query result of the query task. The final query result can be visualized in a structured format (such as generating a report, populating a table, or constructing a visual chart) to facilitate the target audience's understanding and use.
[0096] Example 2
[0097] According to an embodiment of the present application, a financial information query system based on graph analysis is also provided for implementing the financial information query method based on graph analysis in Example 1, such as Figure 2 As shown, the financial information query system based on graph analysis includes at least: an acquisition module 22, a graph construction module 24, a model retrieval module 26, and a feedback module 28, wherein:
[0098] An acquisition module 22 is used to acquire a query task input by a target object, wherein the query task is used to reflect the financial question to be queried by the target object;
[0099] A graph construction module 24 is used to divide the query task into multiple query subtasks, and sort the multiple query subtasks according to the dependency relationships between the multiple query subtasks to obtain a task execution graph corresponding to the query task;
[0100] A model retrieval module 26 is configured to analyze, for each query subtask, the target query results of the query subtask and all executed query subtasks that have dependencies on the query subtask using multiple knowledge retrieval models, obtain at least one first candidate query result whose accuracy score output by each knowledge retrieval model is not less than a preset first score threshold, and determine the target query result of the query subtask based on each first candidate query result;
[0101] The feedback module 28 is used to combine the target query results of each query subtask according to the task execution graph to obtain the final query result of the query task, and feed back the final query result to the target object.
[0102] The following describes the functions of each module of the financial information query system based on graph analysis in combination with the specific implementation process.
[0103] As an optional implementation, the graph construction module 24 may construct a task execution graph corresponding to the query task according to the following steps, including:
[0104] Step 1: preprocessing the query task, wherein the preprocessing includes at least one of the following: removing noise characters, standardizing abbreviations, and replacing synonyms;
[0105] Step 2: Perform entity recognition on the pre-processed query task using a named entity recognition algorithm to obtain at least one key entity within the query task and determine attribute information for each key entity, where the key entity includes at least one of the following: financial institution, financial product name, financial market participant, economic indicator, time information, and location information;
[0106] Step 3: Analyze the preprocessed query task using a pretrained intent recognition model to obtain the query intent of the query task, where the intent recognition model is trained using a first fine-tuning training dataset, and the first fine-tuning dataset contains multiple query task samples related to the financial field and a query intent label corresponding to each query task sample;
[0107] Step 4: Divide the query task into multiple query subtasks based on the attribute information of each key entity and the query intent, and determine the dependency relationship between each query subtask. The dependency relationship includes sequential dependency or parallel dependency.
[0108] Step 5: Treat each query subtask as a graph node, and determine the directed edges between the corresponding graph nodes based on the dependencies between the query subtasks to build a task execution graph.
[0109] As an optional implementation, the model retrieval module 26 may obtain the target query results of each query subtask according to the following steps, including:
[0110] Step S1: determining all executed query subtasks that have a dependency relationship with the query subtask based on the task execution graph, and determining a first embedding vector of the target query result of each executed query subtask and a second embedding vector of the query subtask respectively;
[0111] Step S2: For each knowledge retrieval model, each first embedding vector and second embedding vector is used as a first input vector of the knowledge retrieval model, and the first input vector is analyzed using the knowledge retrieval model to obtain a first number of preliminary query results within a first retrieval time range output by the knowledge retrieval model, as well as an original confidence score of each preliminary query result, wherein each knowledge retrieval model is trained using a different second fine-tuning training data set, and each second fine-tuning training data set includes: multiple query task samples involving the financial field, a correct query result sample for each query task sample, and a confidence score of the correct query result sample;
[0112] Step S3: For each preliminary query result, multiple confidence calibration values are determined for the preliminary query result, and the uncertainty of the preliminary query result is determined, wherein the multiple confidence calibration values include at least: semantic relevance, information timeliness, and source credibility; the original confidence of the preliminary query result is calibrated using the multiple confidence calibration values to obtain a calibrated confidence; the calibrated confidence and uncertainty of the preliminary query result are weighted and summed using a preset weight coefficient to obtain an accuracy score for the preliminary query result;
[0113] Step S4: determining at least one first candidate query result having an accuracy score not lower than a first score threshold from the first number of preliminary query results output by each knowledge retrieval model.
[0114] Step S5: merging the first candidate query results according to the accuracy scores to obtain a merged candidate query result and an accuracy score of the merged candidate query result;
[0115] Step S6: Determine whether the accuracy score of the merged candidate query result is lower than a preset second scoring threshold, where the second scoring threshold is not lower than the first scoring threshold. Specifically, if the accuracy score of the merged candidate query result is not lower than the second scoring threshold, execute step S7; otherwise, execute step S8.
[0116] Step S7: merging the candidate query results as the target query results of the query subtask;
[0117] Step S8: Execute the following steps until a merged candidate query result with an accuracy score not lower than a second score threshold is obtained as the target query result of the query subtask, including:
[0118] Step 1: Determine the third embedding vector of the merged candidate query result, and use the first embedding vector, the second embedding vector, and the third embedding vector as the second input vector.
[0119] Step 2: Analyze the second input vector again using multiple knowledge retrieval models to obtain a third number of preliminary query results within the second retrieval time range output by the knowledge retrieval model and the original confidence of each preliminary query result, wherein the second retrieval time range is greater than the first retrieval time range, and the third number is greater than the first number but not greater than the second number, so as to expand the retrieval time range and increase the number of output results, thereby increasing the probability of finding high-quality query results; determine at least one second candidate query result with an accuracy score not lower than the first score threshold from the third number of preliminary query results output by each knowledge retrieval model.
[0120] Step 3: Merge the second candidate query results based on the accuracy scores to obtain a new merged candidate query result and the accuracy score of the new merged candidate query result.
[0121] Step 4: When the accuracy score of the newly merged candidate query result is lower than the second score threshold, continue to execute the above step 1.
[0122] Optionally, in the technical solution provided in the above step S3, the model retrieval module 26 can determine multiple confidence calibration values of the preliminary query results according to the following method, including: determining the third embedding vector of the preliminary query results, and calculating the vector similarity between the third embedding vector and the second embedding vector, and using the vector similarity as the semantic relevance of the preliminary query results; determining the latest update time of the information contained in the preliminary query results and the required retrieval time range of the query task, and calculating the time fit between the latest update time and the required retrieval time range, and using the time fit as the information timeliness of the preliminary query results; obtaining the credibility of the source of each information in the preliminary query results; determining the data volume ratio of each information in the preliminary query results to the total information of the preliminary query results, and performing weighted summation on the credibility of the source of each information based on the data volume ratio to obtain the source credibility of the preliminary query results.
[0123] Optionally, in the technical solution provided in step S3 above, the model retrieval module 26 may determine the uncertainty of the preliminary query result according to the following method, including: obtaining a probability distribution of a second number of preliminary query results obtained by performing multiple forward analyses on the first input vector using multiple knowledge retrieval models, wherein the second number is greater than the first number; and determining the uncertainty of the preliminary query result according to the probability distribution and the following formula: ,
[0124] In the formula represents the uncertainty of the i-th primary query result, represents the occurrence probability of the i-th preliminary query result, m represents the total number of multiple knowledge retrieval models, and n represents the second number of preliminary query results output by a single knowledge retrieval model.
[0125] Optionally, in the technical solution provided in the above step S5, the model retrieval module 26 can determine to merge the first candidate query results according to the following method, including: determining the third embedding vector of each first candidate query result; using the accuracy score of each first candidate query result to determine the corresponding weighting coefficient, wherein the accuracy score is proportional to the weighting coefficient; performing weighted summation of the third embedding vectors of each first candidate query result according to the weighting coefficient to obtain a fourth embedding vector, and calling a preset decoder to decode the fourth embedding vector to obtain a merged candidate query result; performing weighted summation of the accuracy score rows of each first candidate query result according to the weighting coefficient to obtain the accuracy score of the merged candidate query result.
[0126] It should be noted that each module in the financial information query system based on graph analysis in the embodiment of the present application corresponds one-to-one to each implementation step of the financial information query method based on graph analysis in Example 1. Since a detailed description has been given in Example 1, some details not reflected in this embodiment can be referred to Example 1 and will not be elaborated here.
[0127] Example 3
[0128] According to an embodiment of the present application, a computer program product is also provided, which includes a computer program, wherein when the computer program is executed by a processor, it implements the financial information query method based on graph analysis in Example 1.
[0129] According to an embodiment of the present application, a non-volatile storage medium is also provided, which includes a stored computer program, wherein the device where the non-volatile storage medium is located executes the financial information query method based on graph analysis in Example 1 by running the computer program.
[0130] According to an embodiment of the present application, a processor is also provided, which is used to run a computer program, wherein the computer program executes the financial information query method based on graph analysis in Example 1 when it is running.
[0131] According to an embodiment of the present application, an electronic device is also provided, which includes: a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to execute the financial information query method based on graph analysis in Example 1 through the computer program.
[0132] Specifically, the computer program executes the following steps when it is running: obtaining a query task input by a target object, wherein the query task is used to reflect the financial problem to be queried by the target object; dividing the query task to obtain multiple query subtasks, and sorting the multiple query subtasks according to the dependency relationship between the multiple query subtasks to obtain a task execution graph corresponding to the query task; for each query subtask, using multiple knowledge retrieval models to analyze the query subtask and the target query results of all executed query subtasks that have a dependency relationship with the query subtask, to obtain at least one first candidate query result output by each knowledge retrieval model with an accuracy score not lower than a preset first score threshold, and determining the target query result of the query subtask based on each first candidate query result; according to the task execution graph, combining the target query results of each query subtask to obtain a final query result of the query task, and feeding back the final query result to the target object.
[0133] As an optional implementation, the electronic device may be in the form of a mobile terminal, a computer terminal or a similar computing system. Figure 3 The hardware structure block diagram of an electronic device for implementing a financial information query method based on graph analysis is shown. Figure 3 As shown, the electronic device 30 may include one or more processors 302 (illustrated as 302a, 302b, ..., 302n in the figure) (the processor 302 may include, but is not limited to, a processing system such as a microprocessor MCU or a programmable logic device FPGA), a memory 304 for storing data, and a transmission system 306 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply, and / or a camera. Those skilled in the art will understand that Figure 3 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 3 More or fewer components than shown, or with Figure 3 Different configurations shown.
[0134] It should be noted that the one or more processors 302 and / or other data processing circuits described above may generally be referred to herein as "data processing circuitry." The data processing circuitry may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuitry may be a single, independent processing module, or may be fully or partially integrated into any of the other components of the electronic device 30. As discussed in the embodiments of the present application, the data processing circuitry serves as a processor control (e.g., the selection of a variable resistor terminal path connected to an interface).
[0135] The memory 304 can be used to store software programs and modules of application software, such as the program instructions / data storage system corresponding to the financial information query method based on graph analysis in the embodiment of the present application. The processor 302 executes various functional applications and data processing by running the software programs and modules stored in the memory 304, that is, implementing the vulnerability detection method of the above-mentioned application. The memory 304 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage systems, flash memory, or other non-volatile solid-state memory. In some examples, the memory 304 may further include memory remotely located relative to the processor 302, and these remote memories may be connected to the electronic device 30 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, corporate intranet, local area network, mobile communication network, and combinations thereof.
[0136] Transmission system 306 is used to receive or transmit data via a network. A specific example of such a network may include a wireless network provided by the telecommunications provider of electronic device 30. In one embodiment, transmission system 306 includes a network interface controller (NIC), which can connect to other network devices via a base station to enable communication with the Internet. In another embodiment, transmission system 306 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0137] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the electronic device 30 .
[0138] The serial numbers of the above embodiments are for description only and do not represent the advantages or disadvantages of the embodiments.
[0139] In the above embodiments of the present application, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0140] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the system embodiments described above are only exemplary. For example, the division of units can be a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0141] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple units. Some or all of the units may be selected to achieve the purpose of the present embodiment according to actual needs.
[0142] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0143] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk, and other media that can store program code.
[0144] The above is only a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A financial information query method based on graph analysis, characterized in that: include: Obtaining a query task input by a target object, wherein the query task is used to reflect a financial question to be queried by the target object; Dividing the query task into multiple query subtasks, and sorting the multiple query subtasks according to the dependency relationships between the multiple query subtasks to obtain a task execution graph corresponding to the query task; For each query subtask, multiple knowledge retrieval models are used to analyze the query subtask and the target query results of all executed query subtasks that have a dependency relationship with the query subtask, to obtain at least one first candidate query result whose accuracy score output by each of the knowledge retrieval models is not less than a preset first score threshold, and the target query result of the query subtask is determined based on each of the first candidate query results; According to the task execution graph, the target query results of each query subtask are combined to obtain a final query result of the query task, and the final query result is fed back to the target object; Among them, multiple knowledge retrieval models are used to analyze the query subtask and the target query results of all executed query subtasks that have a dependency relationship with the query subtask, and obtain at least one first candidate query result whose accuracy score output by each knowledge retrieval model is not lower than a preset first score threshold, including: determining all executed query subtasks that have a dependency relationship with the query subtask based on the task execution graph, and respectively determining the first embedding vector of the target query result of each executed query subtask and the second embedding vector of the query subtask; for each of the knowledge retrieval models, each of the first embedding vectors and the second embedding vector is used as the first input vector of the knowledge retrieval model, and the knowledge retrieval model is used to analyze the first input vector to obtain the first number of preliminary query results within the first retrieval time range output by the knowledge retrieval model and the original confidence of each of the preliminary query results, wherein each of the knowledge retrieval models The model is obtained by training using different second fine-tuning training data sets, and each of the second fine-tuning training data sets contains: multiple query task samples involving the financial field, correct query result samples of each query task sample and the confidence of the correct query result samples; for each of the preliminary query results, multiple confidence calibration values of the preliminary query results are determined, and the uncertainty of the preliminary query results is determined, wherein the multiple confidence calibration values at least include: semantic relevance, information timeliness, and source credibility; the original confidence of the preliminary query results is calibrated using the multiple confidence calibration values to obtain a calibrated confidence; the calibrated confidence and uncertainty of the preliminary query results are weighted and summed using a preset weight coefficient to obtain the accuracy score of the preliminary query results; at least one first candidate query result whose accuracy score is not lower than the first score threshold is determined from the first number of preliminary query results output by each of the knowledge retrieval models.
2. The method according to claim 1, characterized in that Dividing the query task into multiple query subtasks, and sorting the multiple query subtasks according to the dependency relationships between the multiple query subtasks to obtain a task execution graph corresponding to the query task, including: Preprocessing the query task, wherein the preprocessing includes at least one of the following: removing noise characters, standardizing abbreviations, and replacing synonyms; Performing entity recognition on the pre-processed query task using a named entity recognition algorithm to obtain at least one key entity within the query task, and determining attribute information of each key entity, wherein the key entity includes at least one of the following: a financial institution, a financial product name, a financial market participant, an economic indicator, time information, and location information; Analyzing the preprocessed query task using a pretrained intent recognition model to obtain the query intent of the query task, wherein the intent recognition model is trained using a first fine-tuning training dataset, and the first fine-tuning dataset includes multiple query task samples related to the financial field and a query intent label corresponding to each query task sample; According to the attribute information of each key entity and the query intent, the query task is divided into a plurality of query subtasks, and the dependency relationship between each query subtask is determined, wherein the dependency relationship includes: sequential dependency or parallel dependency; Each of the query subtasks is taken as a graph node, and directed edges between corresponding graph nodes are determined based on the dependencies between the query subtasks to construct the task execution graph.
3. The method according to claim 1, characterized in that Determining a plurality of confidence calibration values for the preliminary query results includes: Determining a third embedding vector of the preliminary query result, and calculating a vector similarity between the third embedding vector and the second embedding vector, and using the vector similarity as the semantic relevance of the preliminary query result; Determine the latest update time of the information contained in the preliminary query results and the required search time range of the query task, and calculate the time fit between the latest update time and the required search time range, and use the time fit as the information timeliness of the preliminary query results, wherein the latest update time is within the first search time range, and the required search time range is generally a preset time range between the target object inputting the query task; Obtain the credibility of the source of each information in the preliminary query result; determine the data volume ratio of each information in the preliminary query result to the total information of the preliminary query result, and perform weighted summation of the credibility of the source of each information based on the data volume ratio to obtain the source credibility of the preliminary query result.
4. The method according to claim 1, wherein Determining the uncertainty of the preliminary query result includes: Obtaining a probability distribution of a second number of preliminary query results obtained by performing multiple forward analyses on the first input vector by multiple knowledge retrieval models, wherein the second number is greater than the first number; Based on the probability distribution, the uncertainty of the preliminary query result is determined according to the following formula: , In the formula represents the uncertainty of the i-th primary query result, represents the probability of occurrence of the i-th preliminary query result, m represents the total number of multiple knowledge retrieval models, n represents the second number of preliminary query results output by a single knowledge retrieval model, and .
5. The method according to claim 1, wherein Determining a target query result of the query subtask based on each of the first candidate query results includes: Merging the first candidate query results according to the accuracy scores to obtain a merged candidate query result and the accuracy scores of the merged candidate query results; Determining whether the accuracy score of the merged candidate query result is lower than the preset second scoring threshold, wherein the second scoring threshold is not lower than the first scoring threshold; If the accuracy score of the merged candidate query result is not lower than the second score threshold, using the merged candidate query result as the target query result of the query subtask; If the accuracy score of the merged candidate query result is lower than the second scoring threshold, the following steps are performed until a merged candidate query result having the accuracy score not lower than the second scoring threshold is obtained as the target query result of the query subtask, including: Step 1: Determine a third embedding vector of the merged candidate query result, and use the first embedding vector, the second embedding vector, and the third embedding vector as a second input vector; Step 2: Analyze the second input vector again using multiple knowledge retrieval models to obtain a third number of preliminary query results within a second retrieval time range output by the knowledge retrieval model and the original confidence of each of the preliminary query results, wherein the second retrieval time range is greater than the first retrieval time range, and the third number is greater than the first number but not greater than the second number; determine at least one second candidate query result whose accuracy score is not less than the first score threshold from the third number of preliminary query results output by each of the knowledge retrieval models; Step 3: Merging each of the second candidate query results according to the accuracy score to obtain a new merged candidate query result and the accuracy score of the new merged candidate query result; Step 4: When the accuracy score of the newly merged candidate query result is lower than the second score threshold, continue to execute the above step 1.
6. The method according to claim 5, characterized in that Merging the first candidate query results according to the accuracy scores to obtain a merged candidate query result and the accuracy scores of the merged candidate query results includes: Determining a third embedding vector for each of the first candidate query results; Determining a corresponding weighting coefficient using the accuracy score of each of the first candidate query results, wherein the accuracy score is proportional to the weighting coefficient; performing weighted summation on the third embedding vectors of the respective first candidate query results according to the weighting coefficient to obtain a fourth embedding vector, and calling a preset decoder to decode the fourth embedding vector to obtain the merged candidate query result; The accuracy scores of the first candidate query results are weighted and summed according to the weighting coefficient to obtain the accuracy score of the merged candidate query result.
7. A financial information query system based on graph analysis, characterized in that: include: An acquisition module, configured to acquire a query task input by a target object, wherein the query task is used to reflect a financial question to be queried by the target object; A graph construction module is used to divide the query task into multiple query subtasks, and sort the multiple query subtasks according to the dependency relationships between the multiple query subtasks to obtain a task execution graph corresponding to the query task; a model retrieval module configured to analyze, for each query subtask, the target query results of the query subtask and all executed query subtasks having a dependency relationship with the query subtask using multiple knowledge retrieval models, obtain at least one first candidate query result output by each of the knowledge retrieval models with an accuracy score not less than a preset first score threshold, and determine the target query result of the query subtask based on each of the first candidate query results; A feedback module is configured to combine the target query results of each query subtask according to the task execution graph to obtain a final query result of the query task, and feed back the final query result to the target object; Among them, multiple knowledge retrieval models are used to analyze the query subtask and the target query results of all executed query subtasks that have a dependency relationship with the query subtask, and obtain at least one first candidate query result whose accuracy score output by each knowledge retrieval model is not lower than a preset first score threshold, including: determining all executed query subtasks that have a dependency relationship with the query subtask based on the task execution graph, and respectively determining the first embedding vector of the target query result of each executed query subtask and the second embedding vector of the query subtask; for each of the knowledge retrieval models, each of the first embedding vectors and the second embedding vector is used as the first input vector of the knowledge retrieval model, and the knowledge retrieval model is used to analyze the first input vector to obtain the first number of preliminary query results within the first retrieval time range output by the knowledge retrieval model and the original confidence of each of the preliminary query results, wherein each of the knowledge retrieval models The model is obtained by training using different second fine-tuning training data sets, and each of the second fine-tuning training data sets contains: multiple query task samples involving the financial field, correct query result samples of each query task sample and the confidence of the correct query result samples; for each of the preliminary query results, multiple confidence calibration values of the preliminary query results are determined, and the uncertainty of the preliminary query results is determined, wherein the multiple confidence calibration values at least include: semantic relevance, information timeliness, and source credibility; the original confidence of the preliminary query results is calibrated using the multiple confidence calibration values to obtain a calibrated confidence; the calibrated confidence and uncertainty of the preliminary query results are weighted and summed using a preset weight coefficient to obtain the accuracy score of the preliminary query results; at least one first candidate query result whose accuracy score is not lower than the first score threshold is determined from the first number of preliminary query results output by each of the knowledge retrieval models.
8. A computer program product, characterized in that include: A computer program, wherein when the computer program is executed by a processor, it implements the financial information query method based on graph analysis as described in any one of claims 1 to 6.
9. An electronic device, characterized in that: include: A memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the financial information query method based on graph analysis according to any one of claims 1 to 6 through the computer program.
Citation Information
Patent Citations
Resource processing method and device based on knowledge graph and large model
CN118939790A