Multi-model linkage intelligent financial question and answer method and device

Through the intelligent financial question-and-answer method of multi-model linkage, user questions are classified and corresponding reasoning methods are selected, which solves the problem of insufficient knowledge in financial problem reasoning for general big models, and achieves accurate and comprehensive integrated question-and-answer effects.

CN119646136AInactive Publication Date: 2025-03-18WUHAN YANGTZE COMPUTING TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411603497.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-12
Publication Date
2025-03-18
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing general big models are difficult to reason and get accurate answers related to financial issues. The knowledge in the professional field is insufficient, resulting in poor reasoning results.

Method used

The intelligent financial question-and-answer method is adopted to classify user questions through the financial question classification model. If it is an open question, the base model reasoning is used. If it is a data-related question, the reasoning is combined with the financial intention identification model, the financial SQL query model or the financial text information database for reasoning.

Benefits of technology

It has achieved good results in both open questions and data-related inference answers, and improved the accuracy and comprehensiveness of the financial question-and-answer system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119646136A_ABST
    Figure CN119646136A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of artificial intelligence, and provides a multi-model linkage intelligent financial question and answer method and device. The method comprises the following steps: classifying user questions by using a financial question classification model; if the user questions obtained by classification are open questions irrelevant to data, reasoning the user questions by using a base model to obtain corresponding answers; and if the user questions obtained by classification are questions related to data, selectively reasoning the user questions by using corresponding models in combination with corresponding databases to obtain corresponding answers according to classification results of the user questions. According to the method, a corresponding reasoning mode is selected according to the type of questions asked by the user, namely, the base model is directly used for reasoning the open questions irrelevant to the data, and the model and the database are combined for reasoning the questions relevant to the data; therefore, a good effect can be achieved on reasoning and answering of open questions and questions related to data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a multi-model linked intelligent financial question-answering method and device. Background Art

[0002] In recent years, AI big models are often used in the financial industry: by combining the general large language model (LLM) with financial data, an intelligent financial question-answering system can be built to help financial institutions improve their office efficiency. At present, there are also some problems and challenges in the financial question-answering system based on big models. The specific problems are as follows:

[0003] Insufficient depth of knowledge in professional fields: Although many well-known large models have made significant progress in fields such as natural language processing, directly using these general large models in financial question-answering systems will expose problems such as insufficient professional knowledge and insufficient depth, making it difficult for general large models to infer and obtain accurate answers.

[0004] In view of this, overcoming the defects of the prior art is an urgent problem to be solved in the field of this technology. Summary of the invention

[0005] The technical problem to be solved by the present invention is that it is difficult to infer accurate answers to financial issues using existing general large models.

[0006] The present invention adopts the following technical solution:

[0007] In a first aspect, the present invention provides a multi-model-linked intelligent financial question-answering method, comprising:

[0008] Use the financial question classification model to classify user questions;

[0009] If the user's question is classified as an open question that is irrelevant to the data, the base model is used to infer the user's question to obtain a corresponding answer;

[0010] If the user's question is classified as a question related to data, then according to the classification result of the user's question, a corresponding model is selectively used in combination with a corresponding database to infer the user's question and obtain a corresponding answer.

[0011] Preferably, the method of selectively using a corresponding model in combination with a corresponding database to infer the user's question based on the classification result of the user's question specifically includes:

[0012] If the classification result of the user's question is a financial statistics question related to financial information, the financial intention recognition model and the financial SQL query model are used in combination with the financial data information database to infer the user's question and obtain a corresponding answer;

[0013] If the classification result of the user's question is a financial report question related to report information, the financial intention recognition model and the base model are used in combination with the financial text information library to infer the user's question and obtain a corresponding answer.

[0014] Preferably, the use of the financial intention recognition model, the financial SQL query model and the financial data information database to infer the user's question and obtain a corresponding answer specifically includes:

[0015] Use a financial intent recognition model to identify the key intent of the user's question and obtain intent keywords;

[0016] The financial SQL query model is used to infer the intention keywords to obtain SQL query statements, and the SQL query statements are used to query the financial data information database to obtain corresponding answers.

[0017] Preferably, the use of the financial intention recognition model and the base model in combination with the financial text information library to infer the user's question and obtain a corresponding answer specifically includes:

[0018] Use a financial intent recognition model to identify the key intent of the user's question and obtain intent keywords;

[0019] Using the intended keywords to match corresponding key information from the financial text information library;

[0020] The key information is integrated using the base model to obtain corresponding answers.

[0021] Preferably, the financial SQL query model is pre-trained using a base model, specifically including:

[0022] Use the public dataset to fine-tune the base model until the model converges to obtain a first-order SQL model;

[0023] A custom data set is established, and the base model is fine-tuned using the custom data set until the model converges to obtain the financial SQL query model.

[0024] Preferably, the step of establishing a custom data set specifically includes:

[0025] Establishing a preset SQL question and answer template; wherein the preset SQL question and answer template includes answers to questions and SQL statements;

[0026] Fill in financial data according to the preset SQL question and answer template to obtain basic data;

[0027] Rewrite the question in the basic data using the large language model to obtain a new question, replace the question in the basic data with the new question, and obtain a custom NL2SQL data;

[0028] The custom data set is generated using multiple custom NL2SQL data.

[0029] Preferably, the financial problem classification model is pre-trained using a financial problem classification data set based on a base model.

[0030] Preferably, the base model is a large language model, and the large language model includes one or more of a Qwen model, a Yi model and a GPT model.

[0031] In a second aspect, the present invention further provides a multi-model-linked intelligent financial question-answering device, which is used to implement the multi-model-linked intelligent financial question-answering method described in the first aspect, and the device includes:

[0032] At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the processor to execute the multi-model linked intelligent financial question-and-answer method described in the first aspect.

[0033] In a third aspect, the present invention further provides a non-volatile computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are executed by one or more processors to complete the method described in the first aspect.

[0034] In a fourth aspect, a chip is provided, comprising: a processor and an interface, for calling and running a computer program stored in the memory from a memory, and executing the method of the first aspect.

[0035] According to a fifth aspect, a computer program product comprising instructions is provided. When the instructions are executed on a computer or a processor, the computer or the processor executes the method according to the first aspect.

[0036] The present invention first classifies user questions, and then selects the corresponding reasoning method according to the category of the user's question, that is, for open-ended questions that are not related to data, the base model is directly used for reasoning, and for questions related to data, the model and database are combined for reasoning, so that better results can be achieved in the reasoning answers to both open-ended questions and questions related to data. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments of the present invention. Obviously, the drawings described below are only some embodiments of the present invention, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0038] Figure 1 It is a flowchart of a first multi-model-linked intelligent financial question-answering method provided by an embodiment of the present invention;

[0039] Figure 2 It is a flowchart of a second multi-model-linked intelligent financial question-answering method provided by an embodiment of the present invention;

[0040] Figure 3 It is a flowchart of a third multi-model-linked intelligent financial question-answering method provided by an embodiment of the present invention;

[0041] Figure 4 is a flowchart of a fourth multi-model-linked intelligent financial question-answering method provided by an embodiment of the present invention;

[0042] Figure 5 is a schematic diagram of a multi-model-linked intelligent financial question-answering method provided by an embodiment of the present invention;

[0043] Figure 6 is a flowchart of a fifth multi-model-linked intelligent financial question-answering method provided by an embodiment of the present invention;

[0044] Figure 7 is a flowchart of a sixth multi-model-linked intelligent financial question-answering method provided by an embodiment of the present invention;

[0045] Figure 8 is a flowchart of a seventh multi-model-linked intelligent financial question-answering method provided by an embodiment of the present invention;

[0046] Fig. 9 It is a schematic diagram of establishing a custom data set in a multi-model-linked intelligent financial question-answering method provided by an embodiment of the present invention;

[0047] Fig.10 It is a schematic diagram of a training process of a financial SQL query model in a multi-model-linked intelligent financial question-answering method provided by an embodiment of the present invention;

[0048] Fig.11 is a schematic diagram of another multi-model linkage intelligent financial question-answering method provided by an embodiment of the present invention;

[0049] Fig.12It is a schematic diagram of the architecture of a multi-model linked intelligent financial question-and-answer device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0050] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0051] Unless the context requires otherwise, throughout the specification and claims, the term "including" is to be interpreted as open inclusion, that is, "including, but not limited to". In the description of the specification, the terms "one embodiment", "some embodiments", "exemplary embodiments", "examples", "specific examples" or "some examples" and the like are intended to indicate that specific features, structures, materials or characteristics associated with the embodiment or example are included in at least one embodiment or example of the present disclosure. The schematic representation of the above terms does not necessarily refer to the same embodiment or example. In addition, the specific features, structures, materials or characteristics may be included in any one or more embodiments or examples in any appropriate manner, that is, although they may be carried in the embodiments or examples of the above terms due to reasons such as the order and position of appearance, it is not limited to that they can be carried in combination by one embodiment or example.

[0052] In the description of the present invention, the terms "first" and "second" are used only for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present disclosure, unless otherwise specified, the meaning of "multiple" is two or more. In addition, for example, the same type of nouns may be described as two independent individuals by adding "A" and "B" at the end. In this case, the corresponding features defined as "A" and "B" are only used to distinguish the same type of individuals for description purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features.

[0053] In the description of the present invention, the expression "A and / or B" (where A and B are used to formally represent specific characteristic contents) will be involved, and the corresponding expressions include the following three combinations: only A, only B, and a combination of A and B.

[0054] As used herein, "about," "substantially," or "approximately" includes the stated value and an average value that is within an acceptable range of deviation from the particular value as determined by one of ordinary skill in the art taking into account the measurements in question and the errors associated with the measurement of the particular quantity (i.e., the limitations of the measurement system).

[0055] In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0056] Embodiment 1:

[0057] It is difficult for existing general-purpose large models to infer accurate answers to financial questions. To solve this problem, a common method is to use financial data sets to train general-purpose large models. However, during the training process, it is found that since financial questions cover a wide range and some financial questions may also involve financial data, etc., the complexity of financial question answering is relatively large. It is difficult to use a single general-purpose large model to train a financial question answering model with good effects in all aspects and balanced performance. In actual use, the situation that the trained financial question answering model has good reasoning effects on some questions, but poor reasoning effects on other questions. To solve this problem, embodiment 1 of the present invention provides a multi-model linked intelligent financial question answering method, such as Figure 1 As shown, including:

[0058] In step 201, the user's questions are classified using a financial question classification model; in an optional implementation, the financial question classification model is pre-trained using a financial question classification data set based on a base model. The financial question classification data set is obtained by pre-collecting various financial questions by a person skilled in the art and classifying the various financial questions.

[0059] The base model is a large language model, which includes one or more of a Qwen model, a Yi model, and a GPT model. In a specific application, the base model is a Qwen2-7B version of the Qwen model, where 7B represents 7 billion parameters in the model.

[0060] In step 202, if the user's question is classified as an open question that is not related to data, the base model is used to infer the user's question to obtain a corresponding answer; for example, in actual use, an example of the open question may be "How do you view the industrial layout of FiberHome in the digital economy era?" Since open questions are not related to data, a more accurate answer can be obtained by inferring using a trained base model.

[0061] In step 203, if the user's question is classified as a data-related question, then according to the classification result of the user's question, the corresponding model is selectively used in combination with the corresponding database to infer the user's question to obtain a corresponding answer. An example of the data-related question may be "Which company has the highest R&D expenses among listed companies in 2023?" or "What is the operating profit margin of Changjiang Telecom in 2019?". This question involves the R&D expense data or profit margin data of each listed company. It is difficult to get a more accurate answer by relying solely on the model for reasoning, so the model is combined with the database for reasoning.

[0062] This embodiment first classifies user questions, and then selects the corresponding reasoning method according to the category of the user questions, that is, for open questions that are not related to data, the base model is directly used for reasoning, and for questions related to data, the model and database are combined for reasoning. Through this multi-model linkage and database combination method, better results can be achieved in the reasoning and answering of open questions and questions related to data.

[0063] In actual application scenarios, a company's financial data is often divided into financial information and report information. Financial information is data directly presented in digital form to show the company's financial status, while report information is often presented in the form of text or text combined with data, such as financial statements, company basic information reports, employee information reports, etc. In order to cope with the reasoning of problems related to these two types of data in different forms, this embodiment also provides a preferred implementation method, that is, according to the classification results of the user's question, the corresponding model is selectively used in combination with the corresponding database to infer the user's question to obtain a corresponding answer, such as Figure 2 As shown, specifically including:

[0064] In step 301, if the classification result of the user's question is a financial statistics question related to financial information, the financial intention recognition model and the financial SQL query model are used in combination with the financial data information database to infer the user's question and obtain a corresponding answer.

[0065] In step 302, if the classification result of the user's question is a financial report question related to report information, the financial intention recognition model and the base model are used in combination with the financial text information library to infer the user's question and obtain a corresponding answer.

[0066] The financial intention recognition model and the financial SQL query model are combined with the financial data information database to infer the user's question and obtain the corresponding answer, such as Figure 3 As shown, specifically including:

[0067] In step 401, the financial intention recognition model is used to identify the key intentions of the user's question to obtain intention keywords; SQL is the structured query language, the full name is Struct Query Language, abbreviated as SQL.

[0068] In step 402, the financial SQL query model is used to infer the intent keyword to obtain an SQL query statement, and the SQL query statement is used to query the financial data information database to obtain a corresponding answer. The financial data information database can be understood as a database storing financial information of each company.

[0069] The financial intention recognition model and the base model are combined with the financial text information library to infer the user's question and obtain the corresponding answer, such as Figure 4 As shown, specifically including:

[0070] In step 501, a financial intent recognition model is used to identify key intents of the user's question to obtain intent keywords.

[0071] In step 502, the intended keywords are used to match corresponding key information from the financial text information library.

[0072] In step 503, the key information is integrated using the base model to obtain a corresponding answer. The financial text information database can be understood as a database storing report information of each company.

[0073] Since financial information is expressed in numbers and its meaning is often clear, the results obtained by querying the financial data information database can be directly returned to the user. For example, when the user requires the company's R&D expenses, the R&D expenses in the financial data information database can be directly returned to the user.

[0074] However, for report information, since it is expressed in the form of text, when matching the financial text information database, the matched text may be multiple and discontinuous. For example, when a user requires information about a certain employee of the company, a series of discontinuous information such as the employee's name, employee ID, position and average salary may be matched. If this information is directly returned to the user, the answer will be stiff and unintuitive. Therefore, this embodiment also sets a base model to integrate key information to obtain the answer to be returned to the user, such as integrating the above-mentioned employee name, employee ID, position and average salary into "the employee's name is xx, the employee ID is xx, he holds the position of xx, and the employee's average salary is xx".

[0075] Combining the above embodiments, we can get Figure 5The implementation shown is as follows: for open questions, proceed to step 202; for financial statistics questions, proceed to step 401-step 402; for financial statement questions, proceed to step 501-step 503. This embodiment realizes accurate reasoning of various financial questions by linking multiple models with each other, thereby effectively balancing the question-answering performance of various financial questions and realizing question-answering reasoning with good performance in all aspects.

[0076] It should be noted that the models used in this embodiment are all pre-trained, that is, the base model, financial question classification model, financial SQL query model, and financial intention recognition model are all pre-trained, and, in an optional implementation, the financial question classification model, financial SQL query model, and financial intention recognition model are all trained using the base model. The base model may be the Qwen2 large model.

[0077] Taking the training of a financial SQL query model as an example, the financial SQL query model is pre-trained using a base model, such as Figure 6 As shown, specifically including:

[0078] In step 601, the base model is fine-tuned using a public data set until the model converges to obtain a first-order SQL model. The public data set is specifically a public NL2SQL (Natural Language to Structured Query Language) data set.

[0079] In step 602, a custom data set is established, and the base model is fine-tuned using the custom data set until the model converges to obtain the financial SQL query model. The custom data set is established in advance by a person skilled in the art based on financial data, and the custom data set is specifically a custom NL2SQL data set. The first-order SQL model can be understood as a model with basic Text2SQL (converting text to SQL language, the full English name is: Text to SQL) capabilities, and the financial SQL query model can be understood as a model that is deeply integrated with the field of financial data and has strong Text2SQL capabilities on financial data.

[0080] Wherein, the establishment of a custom data set, such as Figure 7 As shown, specifically including:

[0081] In step 701, a preset SQL question and answer template is established; wherein the preset SQL question and answer template includes answers to questions and SQL statements.

[0082] In step 702, financial data is filled in according to the preset SQL question and answer template to obtain basic data.

[0083] In step 703, the question in the basic data is rewritten using the large language model to obtain a new question, and the question in the basic data is replaced with the new question to obtain a piece of custom NL2SQL data.

[0084] In step 704, the custom data set is generated using a plurality of custom NL2SQL data.

[0085] The following is an example of a preset SQL question and answer template. The format of defining the preset SQL question and answer template is as follows:

[0086] {["question":"Which company has the highest [index] in [year]?","answer"select company full name from company_table where year = '[year]and[index]is not null order by[index]desc limit1"}; The words in the square brackets are to be replaced. Question represents the question, and answer represents the answer of the SQL statement.

[0087] Fill in the preset SQL question-answer template according to the collected financial data to obtain the following basic data:

[0088] {"question":"Which company has the highest debt-to-asset ratio in 2019?",

[0089] "answer":"select company full name from company_table where year = '2019' and debt-to-asset ratio is not null order by debt-to-asset ratio desc limit 1"}

[0090] Then use the ChatGPT model to rewrite the questions in the above basic data to obtain the following two custom NL2SQL data:

[0091] The first NL2SQL data: {"question":"Which company reached the highest debt-to-asset ratio in 2019?","answer":"select company full name from company table where year = '2022' and debt-to-asset ratio is not null order by debt-to-asset ratio desc limit 1"}

[0092] The second NL2SQL data: {"question":"Which company has the highest ratio of liabilities to assets in 2019?","answer":"select company_name from company table where year = '2022' and debt_to_asset_ratio is not null order by debt_to_asset_ratio desc limit 1"}.

[0093] The purpose of using a large language model to rewrite questions in the basic data is to make the questions closer to the users' daily language, thereby forming a better customized NL2SQL dataset to optimize the training effect of the financial SQL query model.

[0094] Embodiment 2:

[0095] The present invention is based on the method described in Example 1, combined with specific application scenarios, and uses technical descriptions in related scenarios to illustrate the implementation process of the present invention in characteristic scenarios.

[0096] This embodiment uses the Qwen2-7B model as the base model to train a financial intent recognition model, a financial SQL query model, and a financial intent recognition model, and uses these models to perform question-answering reasoning. For example, this embodiment provides a multi-model linkage intelligent financial question-answering method, such as Figure 8 As shown, the following steps are included:

[0097] In step 801, a multi-source financial dataset is constructed.

[0098] In step 802, based on the Qwen2-7B basic large model, three different financial attribute function models are trained, namely, a financial problem classification model, a financial SQL query model, and a financial intent recognition model.

[0099] In step 803, a financial multi-model linkage response system is constructed, and a multi-model linkage response system is constructed based on a multi-model linkage strategy to perform model reasoning and realize intelligent financial question-and-answer services.

[0100] In step 804, the interactive platform performs intelligent financial question and answer service, that is, feeds back the answers output by the intelligent financial question and answer service to the user through the interactive platform.

[0101] The construction of a multi-source financial data set specifically includes:

[0102] (1) Obtain multi-source data sets by downloading public data sets and using web crawlers. The public data sets that need to be downloaded include public financial data sets (for example, the DISC-FinLLM data set) and public NL2SQL data sets (for example, the DuSQL data set). Download corporate annual report data (for example, the 2023 annual report data of A-share listed companies) through web crawlers.

[0103] (2) Based on the above collected data sets, self-built data sets are constructed, including the construction of financial problem classification data sets and the construction of custom NL2SQL data sets, specifically including:

[0104] Construction of a financial problem classification data set (for example, construction of a financial problem classification data set with 3,000 data items): constructed based on the company's annual report data as the original data source, three label categories (i.e., "Type 1", "Type 2", and "Type 3") are set for the financial classification data set, where the "Type 1" category corresponds to financial statistics-related questions (i.e., the financial statistics-related questions in Example 1), and the "Type 2" category corresponds to questions about company basic information, employee information, and financial statement-related information (i.e., the financial statement-related questions in Example 1); the "Type 3" category corresponds to financial openness questions (i.e., the openness questions in Example 1). All financial question-and-answer questions are classified into the above three categories and labeled accordingly, thereby forming a financial problem classification data set. In actual use, the financial problem classification data set is also called a self-built financial problem classification data set, and the financial problem classification data set can contain 3,000 financial problem classification data items.

[0105] Customize NL2SQL dataset construction (for example, build an NL2SQL dataset with 2000 data items), such as Fig. 9 As shown, specifically including:

[0106] Build a SQL question and answer template. For example, you can build the following template style:

[0107] {["question":"Which company has the highest [index] in [year]?","answer"select company_namefromcompany_table where year='[year]and[index]is not null order by[index]desc limit1"}

[0108] Template variables are randomly filled. For example, the above template can be filled as follows:

[0109] {"question":"Which company has the highest debt-to-asset ratio in 2019?",

[0110] "answer":"select company full name from company_table where year = '2019' and debt-to-asset ratio is not null order by debt-to-asset ratio desc limit 1"}

[0111] ChatGPT problem rewrite, rewrite the above example as follows:

[0112] {"question":"Which company has the highest debt-to-asset ratio in 2019?","answer":"select company full name from company table where year = '2019' and debt-to-asset ratio is not nullorder by debt-to-asset ratio desc limit1"}

[0113] {"question":"Which company had the highest debt-to-asset ratio in 2019?","answer":"select company name from company table where year = '2022' and debt-to-asset ratio is not null order by debt-to-asset ratio desc limit 1"}

[0114] {"question":"Which company has the highest ratio of liabilities to assets in 2019?","answer":"select company name from company table where year = '2022' and debt-to-asset ratio is not null order by debt-to-asset ratio desc limit 1"}

[0115] The custom NL2SQL data set is also called a self-built NL2SQL data set, and the number of custom NL2SQL data included therein may be 2000.

[0116] (3) After completing the data cleaning operation on the above public data sets and self-built data sets, the data sets are classified and divided: the public financial data set DISC-FinLLM data set is divided into Class A data, the public NL2SQL data set DuSQL data set and the self-built NL2SQL data set are divided into Class B data, and the self-built financial problem classification data set is divided into Class C data. The three types of data A, B, and C are jointly constructed into a multi-source financial data set.

[0117] Based on the Qwen2-7B basic model, three different financial attribute function models are trained, including:

[0118] The domestically produced Qwen2-7B large model is selected as the basic base large model. Based on the PyTorch framework, the Class C data is used to fine-tune the training base large model based on the LoRA technology until the model converges to obtain a financial problem classification model.

[0119] The domestically produced Qwen2-7B large model is selected as the basic base large model. Based on the PyTorch framework, the Class A data is used to fine-tune the training base large model based on the LoRA technology until the model converges to obtain the financial intent recognition model.

[0120] The domestic Qwen2-7B large model is selected as the basic base large model. Based on the PyTorch framework, the public NL2SQL data set in the B-type data is used to fine-tune the training base large model based on the LoRA technology until the model converges, and a first-order SQL query model with basic Text2SQL capabilities is obtained; then the self-built NL2SQL data set in the B-type data is used to fine-tune the first-order SQL query model based on the LoRA technology until the model converges, and a second-order financial SQL query model with strong Text2SQL capabilities on financial data is obtained. Finally, the second-order financial SQL query model is used as the final financial SQL query model, such as Fig.10 shown.

[0121] The multi-model linkage response system is constructed based on the multi-model linkage strategy to perform model reasoning and realize intelligent financial question-answering services, such as Fig.11 As shown:

[0122] The use of three models, namely the financial problem classification model, the financial intent recognition model, and the financial SQL query model, for streaming linkage reasoning can answer financial Type 1 questions (i.e. financial statistics questions), such as "Which listed company has the highest R&D expenditure in 2023?"

[0123] The use of the financial problem classification model, financial intention identification model, and Qwen2-7B base model (i.e., base model) for three-model streaming linkage reasoning can answer Type 2 questions (i.e., financial statement questions, such as company basic information, employee information, financial statement-related information, etc.); for example, it can answer questions such as "What is the operating profit margin of Changjiang Telecom in 2019?"

[0124] The use of the financial problem classification model and the Qwen2-7B base model for streaming linkage reasoning can answer Type 3 questions (i.e. open questions), such as "How do you view the industrial layout of FiberHome in the digital economy era?"

[0125] Its specific implementation is as follows Fig.11 As shown:

[0126] (1) The financial question classification model is called to identify and classify the user's questions. The financial question classification model labels the user's questions with question category labels, i.e., the above-mentioned "Type 1", "Type 2", and "Type 3".

[0127] (2) User questions with the "Type 1" label (i.e., financial statistics questions) are input into the financial intent recognition model. The financial intent recognition model identifies the key intent of the user questions with the Type 1 category label and obtains the keywords of the financial questions. Based on the keywords of the financial questions, the financial SQL query model is called to generate SQL statements to query the financial data class DB (i.e., the financial data information database) to obtain the query results. The query results are sent to the intelligent question-answering platform for result output.

[0128] The user questions with the "Type2" label (i.e., questions about financial statements) are input into the financial intent recognition model. The financial intent recognition model identifies the key intent of the user questions with the Type2 category label and obtains the keywords of the financial questions. According to the keywords of the financial questions, the financial text information library is matched to obtain the relevant matching fields. The matched fields are combined to generate prompts for the Qwen2-7B model to produce the final answer, and the final answer is sent to the intelligent question and answer platform for result output.

[0129] User questions with the "Type3" label (i.e., open questions) are directly input into the Qwen2-7B model. The Qwen2-7B model directly generates answers to user questions with the Type3 category label, and sends the final answers to the intelligent question-answering platform for result output.

[0130] This embodiment can be applied to the financial industry, and can be used by financial institutions including banks, insurance companies, securities companies, etc. to build their own financial question-answering systems based on the multi-model linkage intelligent financial question-answering system construction method disclosed in the embodiment. The beneficial effects of the embodiment are as follows:

[0131] (1) Ability to provide users with professional knowledge answers: This embodiment uses multi-source financial data and self-built data sets, and fine-tunes multiple professional large models based on the Qwen2-7B large model with a high performance ranking. Multiple models respond in a linked manner. In response to users' questions, the financial question-and-answer system built in this embodiment can provide answers that are both in-depth and professional.

[0132] (2) It can promote financial business innovation: The multi-model-linked intelligent financial question-and-answer system built based on this embodiment provides financial institutions with new service models and business opportunities. The integration of the financial question-and-answer system and existing businesses can promote the innovation of financial products and services.

[0133] (3) Can improve business efficiency: The multi-model-linked intelligent financial question-and-answer system built based on this embodiment can provide fast and professional information query services for the sales staff of financial institutions, act as a little assistant for the sales staff, speed up the business processing process, and improve business efficiency.

[0134] (4) Can reduce operating costs: The multi-model-linked intelligent financial question-and-answer system built based on this embodiment can reduce the reliance on manual customer service, thereby reducing the manpower and management costs of financial institutions.

[0135] (5) Easy to integrate and expand: The multi-model-linked intelligent financial question-and-answer system built based on this embodiment can run on different computing power platforms at home and abroad. The system design takes into account compatibility with other financial systems, is easy to integrate and expand, and supports rapid deployment and upgrading of financial institutions.

[0136] Embodiment 3:

[0137] like Fig.12 , which is a schematic diagram of the architecture of a multi-model linkage intelligent financial question-answering device according to an embodiment of the present invention. The multi-model linkage intelligent financial question-answering device according to this embodiment includes one or more processors 21 and a memory 22. Fig.12 A processor 21 is taken as an example.

[0138] The processor 21 and the memory 22 may be connected via a bus or other means. Fig.12 The example of connecting through bus is taken in the following.

[0139] The memory 22 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs and non-volatile computer executable programs, such as the multi-model-linked intelligent financial question-answering method in Example 1. The processor 21 executes the multi-model-linked intelligent financial question-answering method by running the non-volatile software programs and instructions stored in the memory 22.

[0140] The memory 22 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage devices. In some embodiments, the memory 22 may optionally include a memory remotely arranged relative to the processor 21, and these remote memories may be connected to the processor 21 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0141] The program instructions / modules are stored in the memory 22, and when executed by the one or more processors 21, the multi-model-linked intelligent financial question-and-answer method in the above-mentioned embodiment 1 is executed.

[0142] It is worth noting that the information interaction, execution process, etc. between the modules and units within the above-mentioned devices and systems are based on the same concept as the processing method embodiment of the present invention. The specific contents can be found in the description of the method embodiment of the present invention and will not be repeated here.

[0143] A person skilled in the art may understand that all or part of the steps in the various methods of the embodiments may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the storage medium may include: a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.

[0144] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A multi-model-linked intelligent financial question-answering method, characterized in that: include: Use the financial question classification model to classify user questions; If the user's question is classified as an open question that is irrelevant to the data, the base model is used to infer the user's question to obtain a corresponding answer; If the user's question is classified as a question related to data, then according to the classification result of the user's question, a corresponding model is selectively used in combination with a corresponding database to infer the user's question and obtain a corresponding answer.

2. The multi-model-linked intelligent financial question-answering method according to claim 1, characterized in that: According to the classification result of the user's question, the corresponding model is selectively used in combination with the corresponding database to infer the user's question to obtain a corresponding answer, which specifically includes: If the classification result of the user's question is a financial statistics question related to financial information, the financial intention recognition model and the financial SQL query model are used in combination with the financial data information database to infer the user's question and obtain a corresponding answer; If the classification result of the user's question is a financial report question related to report information, the financial intention recognition model and the base model are used in combination with the financial text information library to infer the user's question and obtain a corresponding answer.

3. The multi-model-linked intelligent financial question-answering method according to claim 2, characterized in that: The use of the financial intention recognition model, the financial SQL query model and the financial data information database to infer the user's question and obtain a corresponding answer specifically includes: Use a financial intent recognition model to identify the key intent of the user's question and obtain intent keywords; The financial SQL query model is used to infer the intention keywords to obtain SQL query statements, and the SQL query statements are used to query the financial data information database to obtain corresponding answers.

4. The multi-model-linked intelligent financial question-answering method according to claim 2, characterized in that: The use of the financial intention recognition model, the base model and the financial text information library to infer the user's question and obtain a corresponding answer specifically includes: Use a financial intent recognition model to identify the key intent of the user's question and obtain intent keywords; Using the intended keywords to match corresponding key information from the financial text information library; The key information is integrated using the base model to obtain corresponding answers.

5. The multi-model-linked intelligent financial question-answering method according to claim 2, characterized in that: The financial SQL query model is pre-trained using a base model, specifically including: Use the public dataset to fine-tune the base model until the model converges to obtain a first-order SQL model; A custom data set is established, and the base model is fine-tuned using the custom data set until the model converges to obtain the financial SQL query model.

6. The multi-model-linked intelligent financial question-answering method according to claim 5, characterized in that: The establishment of a custom data set specifically includes: Establishing a preset SQL question and answer template; wherein the preset SQL question and answer template includes answers to questions and SQL statements; Fill in financial data according to the preset SQL question and answer template to obtain basic data; Rewrite the question in the basic data using the large language model to obtain a new question, replace the question in the basic data with the new question, and obtain a custom NL2SQL data; The custom data set is generated using multiple custom NL2SQL data.

7. The multi-model-linked intelligent financial question-answering method according to claim 1, characterized in that: The financial problem classification model is pre-trained using a financial problem classification dataset based on a base model.

8. The multi-model-linked intelligent financial question-answering method according to claim 2, characterized in that: The base model is a large language model, and the large language model includes one or more of a Qwen model, a Yi model, and a GPT model.

9. A non-volatile computer storage medium, characterized in that: The computer storage medium stores computer executable instructions, which are executed by one or more processors to complete the multi-model linked intelligent financial question-and-answer method described in any one of claims 1-8.

10. A multi-model linked intelligent financial question-answering device, characterized in that: The device comprises: At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the processor to execute the multi-model linked intelligent financial question-and-answer method described in any one of claims 1-8.

Citation Information

Patent Citations

  • Table question and answer control method and system and storage medium

    CN116303559A

  • Medical question answering system based on large language model

    CN117851558A

  • Intelligent question auxiliary decision-making method and system based on AI large model

    CN118445398A

  • Data query and visualization method and system based on large language model

    CN118820315A

  • Expanding Training Questions through Contextualizing Feature Search

    US20160180242A1