Financial data dialogue type interactive indexing method based on large model

By constructing financial scenario models and association relationships, combining the Qwen1.5-110B big model for natural language analysis, and generating fixed SQL statements for querying, the problem of insufficient accuracy of financial data question-and-answer in the existing technology is solved, and high-accuracy financial data query and analysis are achieved.

CN119537545APending Publication Date: 2025-02-28SHANGHAI PUDONG DEVELOPMENT BANK

Patent Information

Application Number
CN202411631413.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-15
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

The prior art has the problem of insufficient accuracy when dealing with complex and diverse financial data Q&A, especially in Chinese scenarios, the accuracy of text-to-sql tasks is low.

Method used

The dialogue-based interactive indexing method of financial data based on large models is adopted. By constructing multiple financial scenario models and association relationships, combining the Qwen1.5-110B big model for natural language analysis, indexing the corresponding financial scenario model and generating fixed SQL statements for querying.

Benefits of technology

It significantly improves the response accuracy of financial data query questions, can answer financial data query questions in multiple scenarios, and generates relevant charts and analysis texts through calculation and fusion of large models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119537545A_ABST
    Figure CN119537545A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of financial data query, in particular to a financial data dialogue type interactive indexing method based on a large model, which comprises the following steps: firstly, on the basis of a plurality of tables in different financial scenes in a source database, pre-constructing a scene model, and generating corresponding model matching fields and association relationships; then, feature extraction, feature fusion and feature analysis processing are carried out on the basis of a historical financial scene data query problem set, and annotation samples are provided for a large model from keywords in historical data query problems; after a user inputs a question, the large model performs word segmentation, indexes the question to a scene model required by the user, queries an association relationship between the scene model and a source database in a scene database, generates a fixed SQL statement, queries and returns a data result in the source database, and the large model performs calculation and fusion according to the returned data result. Related charts and texts are generated, data results are analyzed based on the text analysis ability of the large model, and user questions are comprehensively answered.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of financial data query, and in particular to a conversational interactive indexing method for financial data based on a large model. Background Art

[0002] With the continuous advancement of generative artificial intelligence technology, the financial field has also begun to apply such technology to reduce workload and improve work efficiency. The data in the financial field is complex, and business personnel need to extract effective information from massive data for summarization and analysis. In order to better understand and analyze financial data, business personnel apply for researchers to develop a series of financial-related reports and visual charts for analysis. The traditional report development process is complicated and requires manual combing of tedious data and analysis and development. The development cycle is long and the replicability is poor. Business personnel cannot directly perform rapid analysis based on basic data. At present, data analysis in the financial field is developing in the direction of intelligence and automation to improve development efficiency and analysis accuracy.

[0003] There are already some methods for financial data analysis through big models, such as using big models to conduct intelligent Q&A of user questions, mining important features from user input data based on knowledge base, feature extraction, feature fusion, feature label recognition and other capabilities, and answering and responding to questions based on user implementation; or using the big model TOSQL (sqlgpt) capabilities to generate SQL statements based on questions raised by users, and after querying the results in the database, return relevant data such as financial indicators to users.

[0004] The Chinese invention patent application with publication number CN117668179A discloses a method for accurate question and answer of financial indicators based on a large model. The method extracts indicators based on a large amount of historical user question data, and performs word segmentation on the relevant annual report data. The corresponding indicators and indicator data are extracted and stored in the database. When the user asks a question, the large model performs word segmentation on the question, generates the corresponding database query statement, and returns the query result to the user after being processed by the large model. The invention mainly performs question and answer on indicators for specific annual reports, based on chatGLM2 as the base large model for the indicator extraction stage, and applies the programming ability of the large model, using Turbo as the base large model for generating SQL statements.

[0005] The Chinese invention patent application with publication number CN118466751A discloses an AI-based human-computer interaction method, system, device and medium, which mainly performs data preprocessing, feature extraction, feature fusion, feature label recognition, feature analysis for user input questions, and finally answers user questions through mimicry replies. This method can realize the extraction and processing of data features, and when interacting with users, it can answer and respond to questions according to the user's real-time situation.

[0006] The Chinese invention patent application with publication number CN118551025A discloses an intelligent question-answering method and system for a large financial model, which includes calculating the matching result between the current financial consulting question and each candidate financial consulting question based on the object, focus and keywords of the current financial consulting question; if there is no match, the current financial consulting question and each candidate financial consulting question and the answer to the question corresponding to each candidate financial consulting question are used as inputs of the intention recognition model for operation to obtain the probability that the answer to the question corresponding to each candidate financial consulting question is the answer corresponding to the current financial consulting question; based on the probability, the answer corresponding to the current financial consulting question is determined. The method and system disclosed by the invention can give more accurate answers to questions raised by users.

[0007] However, there are still some challenges in the existing technology when dealing with complex and diverse financial data questions and answers. First, there are no methods and technologies specifically applied to a wide range of financial data questions and answers. For example, the application scenario of patent application CN117668179A is mainly for financial indicator questions and answers in financial reports. Patent applications CN118466751A and patent application CN118551025A are also for scenario-based financial scenario questions and answers. The features they are based on are mainly derived from the user's input information and knowledge base. The feedback answers are mostly in the form of text or voice, and are not accurate data after data analysis and extraction.

[0008] Secondly, the accuracy of the current large model used for text-to-sql needs to be improved. Although the accuracy of using natural language to query data can reach up to 90% after the emergence of the GPT-4 language model, since most field names are in English, in Chinese scenarios, the large model must not only correctly segment sentences, but also translate Chinese into English. Therefore, the accuracy will drop significantly. For example, the GPT-4 language model is tested using the corresponding Chinese test set Cspider in the Spider dataset, and the highest accuracy score is only 62%. Summary of the invention

[0009] In view of the difficulties that the above-mentioned existing technologies have in processing complex and diverse financial data questions and answers, as well as the insufficient accuracy of text-to-SQL task processing in Chinese scenarios, the present invention proposes a conversational interactive indexing method for financial data based on a large model to achieve answers to financial data query questions in multiple scenarios.

[0010] To achieve the above purpose, the technical solution provided by this application is as follows: a conversational interactive indexing method for financial data based on a large model, comprising the following steps: Step S1, scenario model construction, based on multiple data tables under different financial scenarios in the source database, multiple scenario models are constructed, and they are associated through unique marks in different financial scenarios. One financial scenario corresponds to one scenario model, and corresponding model matching fields and the association relationship between the scenario model and the source database are generated respectively. The scenario model, model matching fields, and the association relationship between the scenario model and the source database together constitute the scenario database; Step S2, feature processing, constructs a historical financial scenario data query problem set based on historical data query problems, and performs feature extraction, feature fusion, and feature analysis on the historical data query problems to extract keywords from the historical data query problems; selects the Qwen1.5-110B large model with excellent performance in the Chinese field as the base large model, and implements prompt engineering on the large model, provides input and expected output according to the extracted keywords, and helps the large model understand the task by providing a small number of labeled samples; Step S3, question query, according to the question input by the user, the big model performs word segmentation, and then finds the relevant model matching field from the scene database according to the word segmentation result, indexes the scene model required by the user according to the model matching field, and queries the scene database for the association relationship between the scene model and the source database, and then generates a fixed SQL statement through the association relationship, and finally queries the source database according to the fixed SQL statement, and returns the queried data results; Step S4, result fusion, calculates and fuses the returned data results through the big model to obtain the fused data. The big model then generates relevant charts and analysis texts based on the output fused data, analyzes the data results based on the text analysis capabilities of the big model, and comprehensively answers user questions.

[0011] Furthermore, the purpose of the feature processing is to better match and understand the text information input by the user by analyzing the text input by the user; wherein, feature extraction is to extract text features of the collected historical data query questions, and use the bag-of-words model, TF-IDF model, and Word2Vec model to extract text vector features; feature fusion is to splice the different features extracted from the feature extraction to form a new feature vector. Since the fused features contain information extracted by multiple feature extraction models, the large model can more comprehensively understand and process text data; feature analysis is to use a convolutional neural network to analyze the feature vector obtained by feature fusion to obtain keyword information.

[0012] The key point of the present invention is that it is not based on the form of text-to-sql, but on the form of financial scenario model construction, generating scenario model association data, and combining the ability of the big model to analyze natural language to index the corresponding financial scenario model, and then generating fixed SQL statement query data based on the association between the financial scenario model and the source database table. In addition, the characteristics of financial scenario data query questions are trained in advance, and the big model calculates and integrates the returned data to generate relevant charts and texts to answer user questions.

[0013] Compared with the prior art, the advantages of the present invention are: The existing technology mainly uses the Turbo large model to generate query SQL statements based on the user's input questions in the form of text-to-sql, but the accuracy needs to be improved, because in the Chinese scenario, the large model must not only correctly segment the sentences, but also translate Chinese into English, so the accuracy will be significantly reduced. The present invention, on the other hand, pre-builds multiple specific financial scenario models through the source database, and then uses the Qwen1.5-110B large model to perform language analysis and feature extraction on the user's input, indexes it to the relevant financial scenario model, and the SQL statement corresponding to the index is a fixed SQL statement with a matched association relationship. Therefore, it can solve the problem of reduced accuracy in responding to data query questions in the form of text-to-sql due to the relationship processing between Chinese input and English fields, the inability to accurately match the association of multiple data tables, and other problems. The interactive indexing method of the present invention can greatly improve the accuracy of the response results of data query questions.

[0014] At the same time, since the method of the present invention builds scenario models based on different financial data, the scenarios used are not limited to the interpretation of a single indicator, but can simultaneously match indexes through different scenario models, and can answer financial data query problems in multiple scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1The flowchart of the conversational interactive indexing method of financial data based on a big model in an embodiment of the present invention. DETAILED DESCRIPTION

[0016] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention can also be implemented in other ways different from those described herein, and therefore, the present invention is not limited to the limitations of the specific embodiments disclosed below.

[0017] like Figure 1 A conversational interactive indexing method for financial data based on a large model is shown, comprising the following steps: Step S1, scenario model construction, based on multiple data tables under different financial scenarios in the source database, multiple scenario models are constructed, and they are associated through unique marks in different financial scenarios. One financial scenario corresponds to one scenario model, and corresponding model matching fields and the association relationship between the scenario model and the source database are generated respectively. The scenario model, model matching fields, and the association relationship between the scenario model and the source database together constitute the scenario database; fixed SQL statements can be generated through the constructed scenario models and the corresponding association relationships to query the source database results; The source database is defined as a database stored in a data warehouse within a bank or other financial institution, where data is exported and saved from a system database, and the data therein can be used for data analysis and data query.

[0018] Relevant financial scenarios include: "agent payment scenario", "debit card scenario", "financial transaction scenario", "private banking customer management scenario", "quick payment scenario", "performance information statistics scenario", etc. Different financial scenarios correspond to multiple different data tables. For example, the "agent payment scenario" involves "financial asset table", "card information table", "agent payment information table", etc. The data information contained in the data table is very large, and there is a lot of information with weak correlation. Therefore, building multiple scenario models and corresponding generation model matching fields and the relationship between the scenario model and the source database is conducive to the classification and integration of data information, improving the efficiency and accuracy of data query, and shortening data query time.

[0019] In this embodiment, the specific examples of association through unique marks in different financial scenarios are as follows: in the "quick payment scenario", customer information is associated with card information through customer number, and then the card is associated with binding information through card number, and the corresponding customer is associated with the maintenance employee through employee number, and finally a large integrated table model is generated. In the "performance information statistics scenario", the organization table, employee table, customer table, and performance distribution table are associated through employee number, organization number, and customer number, and the customer and customer asset information are associated through customer number.

[0020] Step S2, feature processing, constructs a historical financial scenario data query problem set based on historical data query problems, and performs feature processing such as feature extraction, feature fusion, and feature analysis to extract keywords from historical data query problems; selects the Qwen1.5-110B large model with excellent performance in the Chinese field as the base large model, and implements prompt engineering on the large model, providing input and expected output according to the extracted keywords, and providing a small number of labeled samples to help the large model understand the task; The purpose of feature processing is to better match and understand the text information input by the user by analyzing the text input by the user. Among them, feature extraction mainly extracts text features from the collected historical data query questions. The bag-of-words model, TF-IDF model, and Word2Vec model can be used to extract text vector features; feature fusion is to splice different features extracted from feature extraction to form a new feature vector. Since the fused features contain information extracted by multiple feature extraction models, the large model can understand and process text data more comprehensively; feature analysis is to use convolutional neural networks to analyze the feature vectors obtained by feature fusion to obtain keyword information.

[0021] Step S3, question query, based on the question input by the user, the big model performs word segmentation, and then finds the relevant model matching field from the scene database constructed in step S1 according to the word segmentation result, indexes the scene model required by the user according to the model matching field, and queries the scene database for the association relationship between the scene model and the source database, and then generates a fixed SQL statement through the association relationship, and finally queries the source database according to the fixed SQL statement, and returns the queried data results.

[0022] Step S4, result fusion, according to the data results returned in step S3, the large model is used to calculate and fuse, and the fused data is obtained. The large model then generates relevant charts and analysis texts based on the output fused data, analyzes the data results based on the text analysis ability of the large model, and comprehensively answers the user's questions. In this embodiment, the large model used is the Qwen1.5-110B large model.

[0023] The key point of the present invention is that it is not based on the form of text-to-sql, but on the form of building a financial scenario model, generating the association data between the scenario model and the data table in the source database, and combining the ability of the big model to analyze natural language to index the corresponding financial scenario model, and then based on the association between the financial scenario model and the data table in the source database to generate fixed SQL statement query data. In addition, the characteristics of the financial scenario data query problem are trained in advance, and the big model calculates and integrates the returned data to generate relevant charts and texts to answer user questions.

[0024] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A conversational interactive indexing method for financial data based on a large model, characterized in that: The following steps are involved: Step S1, scenario model construction, based on multiple data tables under different financial scenarios in the source database, multiple scenario models are constructed, corresponding model matching fields and the association relationship between the scenario model and the source database are generated to form a scenario database; Step S2, feature processing, constructs a historical financial scenario data query problem set based on historical data query problems, and performs feature extraction, feature fusion, and feature analysis to extract keywords from historical data query problems; uses the Qwen1.5-110B large model that performs well in the Chinese field as the base large model, and implements prompt engineering on the large model, providing input and expected output based on the extracted keywords, and providing a small number of labeled samples to help the large model understand the task; Step S3, question query, according to the question input by the user, the big model performs word segmentation, and then finds the relevant model matching field from the scene database according to the word segmentation result, indexes the scene model required by the user according to the model matching field, and queries the scene database for the association relationship between the scene features and the source database, and then generates a fixed SQL statement through the association relationship, and finally queries the source database according to the fixed SQL statement, and returns the queried data results; Step S4, result fusion, calculates and fuses the returned data results through the big model to obtain the fused data. The big model then generates relevant charts and analysis texts based on the output fused data, analyzes the data results based on the text analysis capabilities of the big model, and comprehensively answers user questions.

2. The method for interactive indexing of financial data based on a large model according to claim 1, characterized in that: The large models in step S2 and step S3 are both Qwen1.5-110B large models.

3. The method for interactive indexing of financial data based on a large model according to claim 1, characterized in that: The purpose of the feature processing is to better match and understand the text information input by the user by analyzing the text input by the user; wherein, feature extraction is to extract text features of the collected historical data query questions, and use the bag-of-words model, TF-IDF model, and Word2Vec model to extract text vector features; feature fusion is to splice the different features extracted from the feature extraction to form a new feature vector. Since the fused features contain information extracted by multiple feature extraction models, the large model can understand and process text data more comprehensively; feature analysis is to use a convolutional neural network to analyze the feature vector obtained by feature fusion to obtain keyword information.

Citation Information

Patent Citations

  • Financial index accurate question and answer method based on large model

    CN117668179A

  • Human-computer interaction method, system and equipment based on AI (Artificial Intelligence) and medium

    CN118466751A

  • Intelligent question and answer method and system for financial large model

    CN118551025A

Cited By

  • Construction method of table knowledge base, query method of data table and related devices

    CN120409643A