Financial data analysis method and system based on large model and medium
Through the integration of the modules of the financial data analysis system through large-scale model technology, the full process of processing from natural language problems to intelligent financial analysis is realized, solving the problems of low efficiency and mechanization of results caused by module isolation in traditional systems, and improving analysis efficiency and accuracy.
Patent Information
- Application Number
- CN202510708640.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-29
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2045-05-29
AI Technical Summary
The problems of low analysis efficiency, mechanized results, and lack of contextual correlation of risk judgments caused by the isolation of each module in the existing financial data analysis system.
The big model technology is used to connect the data query, rule application and knowledge call modules, and the financial problem string is disassembled into knowledge, rules and query strings, and an intelligent financial analysis process is generated using preset vector libraries and big models.
It realizes intelligent collaboration in the entire process of financial analysis, improves analysis efficiency and accuracy, lowers the threshold for use, and has dynamic early warning capabilities and continuous evolution characteristics.
Smart Images

Figure CN120523927A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of financial data analysis, and in particular to a financial data analysis method, system and medium based on a large model. Background Art
[0002] The current field of financial data analysis primarily relies on a model that combines traditional rule engines with manual intervention. Existing technical bottlenecks manifest themselves in three key areas: First, query generation requires pre-definition of all possible data requirements, making it impossible to dynamically adapt to newly added analysis dimensions; second, the separation of early warning rules from business knowledge results in a lack of context for risk assessment; and third, the analysis of results remains highly reliant on manual effort, with intelligent systems providing only raw data tables.
[0003] Traditional approaches suffer from three core flaws: First, the rigidity of query construction leads to inefficient analysis. Complex requirements, such as comparing regional accounts receivable turnover rates against industry benchmarks, require manual SQL joins across multiple tables and the calculation of metrics, which is time-consuming and error-prone. Second, risk warnings are disconnected from business knowledge. Existing systems fail to identify scenarios such as "inventory turnover days exceeding the credit period," which require integrating contract terms and accounting policies, due to a lack of knowledge linkage mechanisms. Third, analytical conclusions are generated mechanically. Existing solutions either output uninterpreted data lists or apply fixed report templates, failing to dynamically organize professional discussion based on specific issues. These issues fundamentally stem from the isolated nature of the technical architecture's modules—a lack of coordination between data query, rule application, and knowledge retrieval. This prevents the system from performing the contextually coherent, multi-dimensional analysis required by professional financial personnel. Summary of the Invention
[0004] This application provides a financial data analysis method, system and medium based on a large model to solve the problem of the isolation of each module in the existing technical architecture - the lack of a collaborative mechanism in the three links of data query, rule application, and knowledge retrieval, which makes it impossible for the system to perform context-coherent multi-dimensional analysis like professional financial personnel.
[0005] In a first aspect, the present application provides a financial data analysis method based on a large model, the method comprising: Initial financial question data is obtained and decomposed into a financial question string, a rule question string, and a query question string; the financial question string is used as an input parameter of a financial business knowledge retrieval function, and then the corresponding financial knowledge is obtained based on a preset financial knowledge vector library; the rule question string is used as an input parameter of a financial warning threshold retrieval function, and then the corresponding financial warning rule is obtained based on a preset financial warning vector library; the query question string is used as an input parameter of a financial data SQL generation function, and then the corresponding query sub-SQL is generated using the big model based on database table information; the initial financial question data and the query sub-SQL are used as input parameters of a financial statement data query function; then, using the initial financial question data, the big model integrates all the corresponding query sub-SQLs into a final query SQL; the execution engine executes the final query SQL to obtain the query result; the financial knowledge, financial warning rules, and query results are used as input parameters of a financial data summary function, and then a prompt word consisting of financial knowledge, financial warning rules, and query results is obtained, and the prompt word is input into the big model to obtain a returned summary string.
[0006] In one implementation of the present application, a financial question string is used as an input parameter of a financial business knowledge retrieval function, and then corresponding financial knowledge is obtained based on a preset financial knowledge vector library, specifically including: The financial knowledge documents are stored in the preset financial knowledge vector library through slicing and vectorization; The financial business knowledge retrieval function semantically retrieves and recalls slices from the preset financial knowledge vector library based on the financial question string; calls the large model and processes the slices into financial knowledge based on the financial question string.
[0007] In one implementation of the present application, a financial question string is used as an input parameter of a financial business knowledge retrieval function, and then corresponding financial knowledge is obtained based on a preset financial knowledge vector library, specifically including: The financial early warning rule document is stored in the preset financial early warning vector library through slicing vectorization; The financial warning threshold retrieval function semantically retrieves and recalls slices from the preset financial warning vector library based on the rule question string; calls the large model and processes the slices into financial warning rules based on the rule question string.
[0008] In one implementation of the present application, the financial warning threshold retrieval function semantically retrieves and recalls slices from a preset financial warning vector library based on a rule question string, specifically including: Using RAG enhanced retrieval technology, a semantic similarity comparison is performed from the preset financial warning vector library to recall the slice with the highest similarity.
[0009] In one implementation of this application, the query question string is used as the input parameter of the financial data SQL generation function, and then based on the database table information, the corresponding query sub-SQL is generated using the large model, specifically including: Input the query question string and database table information into the preset prompt template to obtain the SQL prompt word, input the SQL prompt word into the large model to obtain the corresponding query sub-SQL.
[0010] In one implementation of the present application, the method further includes: The initial financial problem data and the query results are used as input parameters of the financial chart generation function to obtain a chart generation prompt word containing the initial financial problem data and the query results. The chart generation prompt word is input into the large model to obtain a preset display chart containing the initial financial problem data and the query results.
[0011] In a second aspect, the present application provides a financial data analysis system based on a large model, the system comprising: A segmentation module is used to obtain initial financial question data and split the initial financial question data into a financial question string, a rule question string, and a query question string; The knowledge acquisition module is used to take the financial question string as the input parameter of the financial business knowledge retrieval function, and then obtain the corresponding financial knowledge based on the preset financial knowledge vector library; A rule acquisition module is used to use the rule question string as the input parameter of the financial warning threshold retrieval function, and then obtain the corresponding financial warning rule based on the preset financial warning vector library; The sub-SQL acquisition module is used to take the query question string as the input parameter of the financial data SQL generation function, and then generate the corresponding query sub-SQL based on the database table information using the large model; The result acquisition module is used to take the initial financial question data and query sub-SQL as input parameters of the financial statement data query function. Then, using the initial financial question data, the large model integrates all corresponding query sub-SQLs into the final query SQL. The execution engine executes the final query SQL to obtain the query result. The return module is used to take financial knowledge, financial early warning rules, and query results as input parameters of the financial data summary function, and then obtain prompt words composed of financial knowledge, financial early warning rules, and query results. The prompt words are input into the large model to obtain the returned summary string.
[0012] In one implementation of the present application, the knowledge acquisition module includes a knowledge acquisition unit.
[0013] Used to store financial knowledge documents into a preset financial knowledge vector library through slicing vectorization; The financial business knowledge retrieval function semantically retrieves and recalls slices from the preset financial knowledge vector library based on the financial question string; calls the large model and processes the slices into financial knowledge based on the financial question string.
[0014] In one implementation of the present application, the system further includes a display module. It is used to take the initial financial problem data and query results as input parameters of the financial chart generation function, obtain the chart generation prompt words containing the initial financial problem data and query results, input the chart generation prompt words into the large model, and obtain a preset display chart containing the initial financial problem data and query results.
[0015] In a third aspect, the present application provides a non-volatile computer storage medium having computer instructions stored thereon, which, when executed, implement a large model-based financial data analysis method as described above.
[0016] It can be seen from the above technical solutions that this application has the following advantages: It achieves intelligent collaboration across the entire financial analysis process: by connecting the three traditionally isolated modules of data query, rule application, and knowledge retrieval through big model technology, it forms a contextually coherent analysis capability similar to that of professional financial personnel.
[0017] Improved analysis efficiency: Automatically completes the entire process of problem analysis → knowledge retrieval → rule matching → SQL generation → result integration, saving time and costs compared to manual operations.
[0018] Enhanced accuracy of analysis results: Through the dual guarantees of vectorized knowledge base retrieval and large-scale model intelligent reasoning, the financial analysis conclusions are both in line with professional standards and adaptable to business scenarios.
[0019] Lowers the threshold for use: Non-technical personnel only need to enter natural language questions to obtain complete analysis reports containing data, rules, and professional explanations, without the need to master SQL or financial expertise.
[0020] Dynamic early warning capability is achieved: through real-time matching of the early warning rule library, financial risk points can be automatically identified and early warning prompts can be generated during the analysis process.
[0021] It has the characteristics of continuous evolution: based on the feedback learning mechanism of the large model, the system will continuously optimize the processing accuracy of each link as the frequency of use increases. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solution of the present invention, the following is a brief introduction to the drawings required for the description. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0023] Figure 1 This is a flow chart of a financial data analysis method based on a large model provided in an embodiment of the present application.
[0024] Figure 2 This is a schematic diagram of the internal structure of a financial data analysis system based on a large model provided in an embodiment of the present application. DETAILED DESCRIPTION
[0025] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0026] It should be understood by those skilled in the art that the embodiments described below are merely preferred embodiments of the present disclosure and do not imply that the present disclosure can only be implemented through these preferred embodiments. These preferred embodiments are merely intended to explain the technical principles of the present disclosure and are not intended to limit the scope of protection of the present disclosure. Based on the preferred embodiments provided by the present disclosure, all other embodiments obtained by those skilled in the art without creative effort should still fall within the scope of protection of the present disclosure.
[0027] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0028] The technical solutions proposed in the embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0029] The embodiment provides a financial data analysis method based on a large model, such as Figure 1 As shown, the method provided in the embodiment of the present application mainly includes the following steps: Step 110: Obtain initial financial question data, and decompose the initial financial question data into a financial question string, a rule question string, and a query question string.
[0030] In some embodiments, the decomposition result of the problem task "Query which industrial enterprises have triggered the asset-liability ratio warning line" may be: Financial question string: "What financial knowledge is relevant to debt-to-asset ratio?"; Rule question string: "What is the asset-liability ratio warning line for industrial enterprises?"; Query question string: "How should industrial enterprises query the financial statements?" etc.
[0031] There can be multiple query question strings.
[0032] It should be noted that the decomposition process can be implemented by an existing large model that can perform statement decomposition.
[0033] More specifically, the disassembly process can be as follows: Receives initial financial questions described in natural language (e.g., user questions or system logs). Removes irrelevant symbols, standardizes terminology (e.g., "Q3" becomes "third quarter"), and corrects spelling errors.
[0034] Use NLP (natural language processing) tools (such as Baidu ERNIE and spaCy) to identify the following in a sentence: Core Action (such as "calculate" or "verify"): associated financial question string. Constraints (such as "comply with XX rules"): associated rule question string. Data Requirements (such as "sales in Q3 2024"): associated query question string.
[0035] Example: Question: "How can I verify whether the gross profit margin in Q1 2024 complies with the new accounting standards?" Action: "Verification" → Financial Issues; Constraints: “Comply with new accounting standards” → rule issues; Data: "Gross profit margin in Q1 2024" → Query question.
[0036] Import financial questions, rule questions, and query questions into their corresponding preset prompt word templates to obtain financial question prompt words, rule question prompt words, and query question prompt words. Input each prompt word into the large model (a trained Transformer architecture model) and use the large model to obtain the output financial question string, rule question string, and query question string.
[0037] In addition, a method for training a Transformer architecture model may be to obtain a sample prompt word and a corresponding sample character string, input the sample prompt word and the corresponding sample character string into the Transformer architecture model, and obtain a trained Transformer architecture model.
[0038] Step 120: Use the financial question character string as an input parameter of a financial business knowledge retrieval function, and then obtain corresponding financial knowledge based on a preset financial knowledge vector library.
[0039] This step can be specifically as follows: The FinancialKnowledgeRetrieval function, which takes a financial question string as input and returns financial knowledge, implements the Financial Knowledge Enhanced Retrieval (RAG) process. Before executing the function, financial-related knowledge documents are sliced and vectorized and stored in a financial knowledge vector database. During execution, the function retrieves fragments from the vector database based on the input semantics. The retrieved fragments are then processed into the final financial knowledge using a large model (a trained Transformer architecture model; the training and invocation processes are shown in step 110) based on the input question. This model then summarizes and processes the retrieved fragments into the final financial knowledge, such as which financial indicators are point-in-time numbers and which are period-in-time numbers. The business implications of point-in-time numbers and period-in-time numbers are also determined.
[0040] Those skilled in the art will appreciate that this step mainly includes: inputting a financial question string → searching a financial knowledge vector library → calling a large model summary → outputting structured financial knowledge.
[0041] This step uses a vectorized financial knowledge base to enable semantic search, avoiding the limitations of traditional keyword matching (e.g., the difference in business meaning between "point-in-time figures" and "period figures"). For example, if a user asks "What is a point-in-time figure?", the system can accurately retrieve relevant financial document snippets (e.g., balance sheet indicators).
[0042] Leverage large models (such as pre-trained Transformer architecture models) to perform secondary processing on search results, generating summary knowledge tailored to user needs (e.g., comparing the business implications of time points and periods). This avoids directly returning redundant information in the original document, improving readability. Furthermore, the FinancialKnowledgeRetrieval function encapsulates the entire retrieval, recall, and summarization process for easy reuse and scalability. The financial knowledge base can be independently updated (e.g., with new accounting standards) without requiring model retraining.
[0043] Step 130: Use the rule question string as an input parameter of the financial warning threshold retrieval function, and then obtain the corresponding financial warning rule based on the preset financial warning vector library.
[0044] This step can be specifically as follows: The Financial Warning Threshold Search function, FinancialWarningThresholdSearch, takes a rule question string as input and returns a financial warning rule. This function's technical implementation is similar to step 110, namely, an enhanced search process (RAG). The difference lies in the scope of stored documents. This function searches a vector library (the pre-set financial warning vector library) by slicing some financial warning rule text and storing it in a vector database. It then retrieves the most relevant fragments from the vector database and uses the large model to generate the final knowledge output. For example, the original document might contain instructions and principles for debt-to-asset ratio warnings for a specific industry. The final output, as summarized by the large model, is the debt-to-asset ratio and current ratio warning thresholds for a specific type of enterprise.
[0045] Specifically include: Using RAG enhanced retrieval technology, a semantic similarity comparison is performed from the preset financial warning vector library to recall the slice with the highest similarity.
[0046] Based on the above description, those skilled in the art will understand that this step, by vectorizing the financial warning rule base, enables semantic search, avoiding the rigid matching of traditional rule engines (e.g., the varying thresholds for "asset-liability ratio warning" across different industries). For example, if a user asks, "What is the current ratio warning threshold for the retail industry?" the system can accurately retrieve relevant industry-specific rule fragments.
[0047] In addition, the large model in this step performs secondary processing on the search results, converting lengthy rule documents (e.g., "When the debt-to-asset ratio exceeds 70%, a warning is required...") into concise conclusions (e.g., "The warning line for the debt-to-asset ratio in the manufacturing industry is 70%"). This avoids the complexity of directly returning to the original clause and improves operability.
[0048] In addition, the solution involved in this step supports returning differentiated warning thresholds by industry (such as manufacturing and retail), solving the problem of disconnection between general rules and actual business.
[0049] In addition, the function FinancialWarningThresholdSearch shares the RAG framework with step 110 and can be adapted to different scenarios (such as financial knowledge search → warning rule search) by simply replacing the vector library.
[0050] Step 140: Use the query question string as an input parameter of the financial data SQL generation function, and then use the large model to generate the corresponding query sub-SQL based on the database table information.
[0051] In some embodiments, this step may specifically include: FinancialDataSQLGeneration: This function takes a query string as input and returns a sub-query SQL statement. This function generates SQL statements from a single table. This function's technical implementation combines the input description and database table information into a prompt word template, then uses a large language model to generate the required sub-query SQL statement.
[0052] It is understandable that this step uses the "natural language to SQL (Text-to-SQL)" technology to achieve intelligent query of financial data. The core benefits are as follows: 1. Users do not need to master SQL syntax and can generate accurate query statements using natural language (such as "query 2024 sales revenue"), improving the efficiency of non-technical personnel.
[0053] 2. This step can generate SQL based on real-time table structure information, avoiding hard-coded query logic and adapting to differences in table fields across different financial systems (for example, "income" may correspond to the revenue or income field).
[0054] 3. This step limits the generation of single-table query sub-SQL statements to reduce the risk of complex table joins. It also constrains model output through hint templates to prevent the generation of illegal statements (such as DELETE operations).
[0055] 4. The FinancialDataSQLGeneration function involved in this step can be reused in other data query scenarios (such as inventory and HR). Only the table information prompt word template needs to be updated.
[0056] Step 150: Use the initial financial question data and the query sub-SQL as input parameters of the financial statement data query function; then, using the initial financial question data, the large model integrates all corresponding query sub-SQLs into the final query SQL; and the execution engine executes the final query SQL to obtain the query result.
[0057] This step can be specifically as follows: Financial Report Data Query function: The input parameters are the original question description string and the query sub-SQL generated in step 140 as a reference. This function generates a complex query using reference SQL and returns the query data results. The function's technical implementation principle is to combine the original question, relevant knowledge, and the query sub-SQL generated in the previous steps into a prompt word template. The macro model is then used to generate the final query SQL. The final query SQL is then executed by the BI (Business Intelligence) execution engine to obtain the query results.
[0058] It is understandable that this step implements intelligent and complex queries of financial data through the "multi-step SQL integration and execution" technology. The core benefits are as follows: 1. Integrate scattered query sub-SQL statements (such as single-table queries) into cross-table joint queries through a large model, solving the error-prone problem of manually writing complex SQL statements (such as multi-table JOIN logic errors).
[0059] 2. This step can combine the original problem description and sub-SQL to generate the final SQL to ensure that the query results are consistent with the user's expectations. Figure 1 (For example, "year-on-year revenue growth rate" needs to be associated with the historical data table).
[0060] 3. This step executes the optimized SQL through the BI engine to avoid the performance bottleneck of manually splicing SQL (such as slow queries caused by too many nested subqueries).
[0061] 4. This step automates the entire process from natural language input to final data output and is suitable for dynamic report generation (such as quarterly financial analysis dashboards).
[0062] Step 160: Use financial knowledge, financial early warning rules, and query results as input parameters of the financial data summary function to obtain prompt words consisting of financial knowledge, financial early warning rules, and query results. Input the prompt words into the large model to obtain a returned summary string.
[0063] This step can be specifically as follows: The FinancialDataSummary function takes as input the database query results from step 140, the results from step 110, and the results from step 120, combined with the built-in financial summary prompts within the function to create a final prompt. This prompt and the input parameter structure are then applied to the big model. The big model API then returns a summary text string. This function summarizes and analyzes the obtained data, rules, and warning values.
[0064] The method also includes subsequent display analysis, and the specific process can be: The initial financial problem data and the query results are used as input parameters of the financial chart generation function to obtain a chart generation prompt word containing the initial financial problem data and the query results. The chart generation prompt word is input into the large model to obtain a preset display chart containing the initial financial problem data and the query results.
[0065] Combined with the preset prompt words corresponding to the display chart and calling the large model, it returns a chart object described in JSON. This JSON can be input into the BI tool to render it as a chart.
[0066] As described above, this embodiment implements an end-to-end closed loop from natural language questions to structured knowledge, data query, and visualization through a modular and intelligent financial data processing process. The core benefits are as follows: 1. Problem decomposition and semantic understanding (step 110): Precise semantic segmentation: This technology breaks down complex financial problems into three sub-problems: financial knowledge, rules, and queries, avoiding the limitations of traditional single models in handling multimodal needs.
[0067] Dynamic adaptability: Supports generation of multiple query question strings (such as "query debt-to-asset ratio" + "query current ratio") to adapt to complex analysis scenarios.
[0068] Reusable NLP framework: The disassembly logic based on pre-trained large models (such as Transformer) can be migrated to problem analysis in other fields.
[0069] 2. Intelligent retrieval of financial knowledge (step 120): Semantic Search: Use RAG technology to achieve deep semantic matching of financial knowledge bases and resolve ambiguous keyword searches (such as distinguishing between "point-in-time" and "period-time").
[0070] Knowledge Condensation: The large model summarizes the search fragments into structured knowledge (such as "debt-to-asset ratio = total liabilities / total assets"), reducing the user's understanding cost.
[0071] Independent update mechanism: The knowledge base is decoupled from the model, allowing for quick updates to the knowledge base when accounting standards change without having to retrain the model.
[0072] 3. Dynamic matching of financial warning rules (step 130): Industry-specific adaptation: Returns customized warning thresholds by industry (e.g., debt-to-asset ratio ≤ 60% for manufacturing, ≤ 50% for retail), avoiding misjudgments based on general rules.
[0073] Rule simplification: Condense lengthy clauses (such as "a warning is required if the current ratio is less than 1 for three consecutive months") into executable conclusions to improve business operability.
[0074] Shared RAG framework: Reuse the technical framework with step 120 to reduce development costs.
[0075] 4. Natural Language to SQL (Step 140): Zero-code query: Business personnel can directly generate SQL using natural language (e.g., "Query the gross profit margin for the third quarter") without IT support.
[0076] Dynamic table structure adaptation: Combined with real-time database table information, field names are automatically mapped (e.g., "income" → revenue or income) to adapt to multiple financial systems.
[0077] Safe and Controllable: Limit queries to a single table to avoid performance risks and data leakage caused by complex join tables.
[0078] 5. Complex SQL integration and execution (step 150): Automated cross-table join queries: Consolidate single-table sub-SQL statements into cross-table queries (e.g., "year-on-year revenue growth rate" requires joining current and historical data tables), reducing manual join errors.
[0079] meaning Figure 1 Consistency assurance: The original question and sub-SQL statements are combined to generate the final SQL statement to ensure that the result meets user requirements.
[0080] BI engine optimization: Execute optimized SQL through BI tools to improve query efficiency (such as avoiding slow queries).
[0081] 6. Data Summarization and Visualization (Step 160): Multimodal output: Integrates financial knowledge, rules, and query results into structured summaries (e.g., "Q3 gross profit margin fell 5%, below the industry warning line") to assist in decision-making.
[0082] Smart chart generation: Automatically convert query results into visual charts (such as a line chart showing revenue trends), lowering the threshold for data interpretation.
[0083] JSON standardized output: supports direct rendering by BI tools, enabling rapid sharing and reuse of analysis results.
[0084] In addition, this application Figure 2 The embodiment of this application provides a financial data analysis system based on a large model. Figure 2 As shown, the system provided in the embodiment of the present application mainly includes: The segmentation module 210 is used to obtain initial financial question data and split the initial financial question data into a financial question string, a rule question string, and a query question string; The knowledge acquisition module 220 is used to use the financial question string as an input parameter of the financial business knowledge retrieval function, and then obtain the corresponding financial knowledge based on the preset financial knowledge vector library; The knowledge acquisition module 220 includes a knowledge acquisition unit.
[0085] Used to store financial knowledge documents into a preset financial knowledge vector library through slicing vectorization; The financial business knowledge retrieval function semantically retrieves and recalls slices from the preset financial knowledge vector library based on the financial question string; calls the large model and processes the slices into financial knowledge based on the financial question string.
[0086] A rule acquisition module 230 is configured to use the rule question string as an input parameter of a financial warning threshold retrieval function, and then obtain the corresponding financial warning rule based on a preset financial warning vector library; The sub-SQL acquisition module 240 is used to use the query question string as the input parameter of the financial data SQL generation function, and then generate the corresponding query sub-SQL based on the database table information using the large model; The result acquisition module 250 is used to use the initial financial question data and the query sub-SQL as input parameters of the financial statement data query function; then, using the initial financial question data, the large model integrates all corresponding query sub-SQLs into the final query SQL; the execution engine executes the final query SQL to obtain the query result; The return module 260 is used to take financial knowledge, financial early warning rules, and query results as input parameters of the financial data summary function, thereby obtaining prompt words composed of financial knowledge, financial early warning rules, and query results, input the prompt words into the large model, and obtain the returned summary string.
[0087] The system also includes a display module, It is used to take the initial financial problem data and query results as input parameters of the financial chart generation function, obtain the chart generation prompt words containing the initial financial problem data and query results, input the chart generation prompt words into the large model, and obtain a preset display chart containing the initial financial problem data and query results.
[0088] In addition, an embodiment of the present application further provides a non-volatile computer storage medium on which executable instructions are stored. When the executable instructions are executed, a financial data analysis method based on a large model as described above is implemented.
[0089] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not limited to the embodiments shown herein but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A financial data analysis method based on a large model, characterized in that: The method comprises: Obtaining initial financial question data, and decomposing the initial financial question data into a financial question string, a rule question string, and a query question string; The financial question string is used as the input parameter of the financial business knowledge retrieval function, and then the corresponding financial knowledge is obtained based on the preset financial knowledge vector library; The rule question string is used as the input parameter of the financial warning threshold retrieval function, and then the corresponding financial warning rule is obtained based on the preset financial warning vector library; The query question string is used as the input parameter of the financial data SQL generation function, and then based on the database table information, the corresponding query sub-SQL is generated using the large model; The initial financial question data and query sub-SQL statements are used as input parameters for the financial statement data query function. The large model then uses the initial financial question data to integrate all corresponding query sub-SQL statements into the final query SQL statement. The execution engine executes the final query SQL statement to obtain the query result. Financial knowledge, financial early warning rules, and query results are used as input parameters of the financial data summary function to obtain prompt words composed of financial knowledge, financial early warning rules, and query results. The prompt words are input into the large model to obtain the returned summary string.
2. The financial data analysis method based on a large model according to claim 1, characterized in that: The financial question string is used as the input parameter of the financial business knowledge retrieval function, and then the corresponding financial knowledge is obtained based on the preset financial knowledge vector library, including: The financial knowledge documents are stored in the preset financial knowledge vector library through slicing and vectorization; The financial business knowledge retrieval function semantically retrieves and recalls slices from the preset financial knowledge vector library based on the financial question string; calls the large model and processes the slices into financial knowledge based on the financial question string.
3. The financial data analysis method based on a large model according to claim 1, characterized in that: The rule question string is used as the input parameter of the financial warning threshold retrieval function, and then the corresponding financial warning rules are obtained based on the preset financial warning vector library, including: The financial early warning rule document is stored in the preset financial early warning vector library through slicing vectorization; The financial warning threshold retrieval function semantically retrieves and recalls slices from the preset financial warning vector library based on the rule question string; calls the large model and processes the slices into financial warning rules based on the rule question string.
4. The financial data analysis method based on a large model according to claim 3, characterized in that: The financial warning threshold retrieval function semantically retrieves and recalls slices from the preset financial warning vector library based on the rule question string, specifically including: Using RAG enhanced retrieval technology, a semantic similarity comparison is performed from the preset financial warning vector library to recall the slice with the highest similarity.
5. The financial data analysis method based on a large model according to claim 1, characterized in that: The query question string is used as the input parameter of the financial data SQL generation function. Then, based on the database table information, the corresponding query sub-SQL is generated using the large model, including: Input the query question string and database table information into the preset prompt template to obtain the SQL prompt word, input the SQL prompt word into the large model to obtain the corresponding query sub-SQL.
6. The financial data analysis method based on a large model according to claim 1, characterized in that: The method further comprises: The initial financial problem data and the query results are used as input parameters of the financial chart generation function to obtain a chart generation prompt word containing the initial financial problem data and the query results. The chart generation prompt word is input into the large model to obtain a preset display chart containing the initial financial problem data and the query results.
7. A financial data analysis system based on a large model, characterized in that: The system comprises: A segmentation module is used to obtain initial financial question data and split the initial financial question data into a financial question string, a rule question string, and a query question string; The knowledge acquisition module is used to take the financial question string as the input parameter of the financial business knowledge retrieval function, and then obtain the corresponding financial knowledge based on the preset financial knowledge vector library; A rule acquisition module is used to use the rule question string as the input parameter of the financial warning threshold retrieval function, and then obtain the corresponding financial warning rule based on the preset financial warning vector library; The sub-SQL acquisition module is used to take the query question string as the input parameter of the financial data SQL generation function, and then generate the corresponding query sub-SQL based on the database table information using the large model; The result acquisition module is used to take the initial financial question data and query sub-SQL as input parameters of the financial statement data query function. Then, using the initial financial question data, the large model integrates all corresponding query sub-SQLs into the final query SQL. The execution engine executes the final query SQL to obtain the query result. The return module is used to take financial knowledge, financial early warning rules, and query results as input parameters of the financial data summary function, and then obtain prompt words composed of financial knowledge, financial early warning rules, and query results. The prompt words are input into the large model to obtain the returned summary string.
8. The financial data analysis system based on a large model according to claim 7 is characterized in that: The knowledge acquisition module includes a knowledge acquisition unit. Used to store financial knowledge documents into a preset financial knowledge vector library through slicing vectorization; The financial business knowledge retrieval function semantically retrieves and recalls slices from the preset financial knowledge vector library based on the financial question string; Call the big model and process the slices into financial knowledge based on the financial problem string.
9. The financial data analysis system based on a large model according to claim 7, characterized in that: The system further comprises a display module, It is used to take the initial financial problem data and query results as input parameters of the financial chart generation function, obtain the chart generation prompt words containing the initial financial problem data and query results, input the chart generation prompt words into the large model, and obtain a preset display chart containing the initial financial problem data and query results.
10. A non-volatile computer storage medium, characterized in that Computer instructions are stored thereon, and when the computer instructions are executed, a financial data analysis method based on a large model as described in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Financial system and method based on multi-dimensional data analysis
CN119311790A
Intelligent question and answer method, device and equipment based on tax field and medium
CN119623647A
Method and apparatus for knowledge answering, method and apparatus for generating knowledge answering system
EP4160490A2
Natural Language Question Answering Systems
US20190272296A1