Local large language model optimizing and calling method and device suitable for financial report analysis, equipment and storage medium

By building an industry indicator library and optimizing training samples for local large language models, combined with the analysis results of external large language models, the problems of insufficient data security and effectiveness in financial statement analysis are solved, and financial statement analysis with high accuracy and reliability are achieved , meet the needs of financial institutions and avoid leakage of sensitive information.

CN119294382AActive Publication Date: 2025-01-10GUANGDONG YUECAI FINANCIAL CLOUD TECH CO LTD

Patent Information

Application Number
CN202411058875.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-02
Publication Date
2025-01-10
Estimated Expiration
2044-08-02

AI Technical Summary

Technical Problem

Existing large language models have problems of data security risks and insufficient performance in financial statement analysis. Especially because localized models lack high-quality training data, it is difficult to learn effective analysis models and rules, resulting in insufficient accuracy and reliability. It cannot meet the actual needs of financial institutions, and the general model is difficult to achieve ideal results when applied across industries.

Method used

By calculating financial indicator statistical values ​​according to industry dimensions, building an industry indicator library, generating a propt to call external large language models for analysis, optimizing training samples of local large language models, and improving model performance through supervised fine-tuning, so that it can Combined with industry characteristics, output financial analysis reports.

Benefits of technology

Improve the accuracy and reliability of local large language models in financial report analysis, meet the practical application needs of financial institutions, and avoid sensitive information leakage when directly using external models, ensure data security, and solve cross-industry applications. industry differentiation challenges.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119294382A_ABST
    Figure CN119294382A_ABST
Patent Text Reader

Abstract

According to the method for optimizing and calling the local large language model suitable for financial statement analysis, financial statement data on the Internet are distinguished according to industries, the financial index statistical values of the financial statement data are calculated, the industry index library is constructed, and data with industry characteristics are provided. Then, prompt is generated based on the data, and a corresponding financial analysis report is output by using an external large language model. And taking the financial analysis reports as training samples to train a local large language model, so that the trained local large language model can be called to output an analysis result with industry characteristics for financial statement data to be analyzed in an enterprise. The problems that internal sensitive information is easy to leak when an external large language model is directly used for financial report analysis, and the external large language model is difficult to output different financial report analysis results in combination with industry characteristics are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of application deployment technology, and specifically relates to a method, device, equipment and storage medium for optimizing and calling a local large language model suitable for financial report analysis. Background Art

[0002] Financial statements are important documents that companies use to show their financial status and operating results. Analysis of financial statements is crucial for investors, management, creditors and other stakeholders. On the one hand, financial reports provide historical data. Analysis of financial reports allows companies to use this data to formulate budgets, make financial forecasts and long-term plans. On the other hand, investors analyze a company's financial reports to assess the company's financial health, profitability, risk level and future growth potential, and make investment decisions to buy, hold or sell.

[0003] With the rapid development of information technology, information technologies such as the Internet of Things, big data, cloud computing, and mobile Internet have emerged one after another. The financial industry has also undergone in-depth digital transformation. The demand of financial institutions for intelligent financial report analysis has become increasingly prominent. The use of large language models for financial report analysis brings many advantages, such as quickly processing large amounts of data, identifying patterns and trends, etc.

[0004] However, although the current big language model has made some progress in financial statement analysis, there are still significant constraints and challenges: on the one hand, when directly using external big language models for financial statement analysis, financial institutions face the potential risk of internal sensitive information leakage because the model involves data transmission and processing. This risk may lead to the illegal acquisition or abuse of the institution's core business data, thereby threatening its business secrets and customer privacy. On the other hand, although the localized big language model has advantages in data security and privacy protection, its performance is often not comparable to that of external advanced big language models. This is because although there is a vast amount of financial statement data on the Internet, high-quality data samples that can be used as training samples for local big language models are very scarce. This imbalance in data resources seriously restricts the ability of financial institutions to train local big language models suitable for financial statement analysis, making it difficult for the model to learn effective analysis patterns and rules, which in turn affects its accuracy and reliability in financial statement analysis. This makes it difficult for localized big language models to meet the actual application needs of financial institutions, thereby limiting their promotion and application in actual business. In particular, the financial statement data of companies in different industries have significant differences in content and characteristics. Therefore, it is often difficult to achieve ideal results when using a general large model to analyze financial statements in different industries. The existence of such industry differences makes the large language model face huge challenges when applied across industries, and it needs to be further optimized according to the characteristics of different industries. Summary of the invention

[0005] The purpose of the present invention is to solve the above-mentioned technical problems and provide a method for optimizing and calling a local large language model suitable for financial report analysis, which can avoid the leakage of internal sensitive information caused by directly using an external large language model to analyze internal financial statements, and can output different financial report analysis results for different industries.

[0006] In order to solve the above problems, the present invention is implemented according to the following technical solutions:

[0007] In a first aspect, the present invention provides a method for optimizing and calling a local large language model suitable for financial report analysis, the method comprising:

[0008] Calculate the statistical values ​​of financial indicators based on industry dimensions using data from multiple financial statements to form an industry indicator database;

[0009] Based on the industry indicator database, obtain the financial indicator statistics corresponding to the industry to which each piece of financial statement data belongs;

[0010] Obtaining a first original value of each account in each of the financial statement data, wherein the first original value is a value reported by each account in the financial statement data and not adjusted;

[0011] Based on each of the financial statement data, obtaining a first financial indicator value, wherein the first financial indicator value is obtained by calculating the financial indicator value of each company corresponding to the financial statement data;

[0012] Based on the financial indicator statistics corresponding to the industry to which the financial statement data belongs, the first original value, and the first financial indicator value, batch-generate a first prompt, wherein the first prompt is a prompt or instruction requesting an external large language model to output an analysis result of the financial statement data;

[0013] According to the first prompt, a first financial analysis report is obtained, wherein the first financial analysis report is a result of multiple analyses of the financial statement data by the multiple external large language models respectively;

[0014] Optimizing the local large language model through training samples, wherein the training samples include a manually annotated first financial analysis report;

[0015] Generate a second prompt for the financial statement data to be analyzed, wherein the second prompt is a prompt or instruction requesting the local large language model to output an analysis result for the financial statement data to be analyzed;

[0016] According to the second prompt, a second financial analysis report is obtained, wherein the second financial analysis report is an analysis result of the local large language model on the financial statement data to be analyzed.

[0017] Preferably, the data in the industry indicator library is panel data.

[0018] Preferably, the local large language model is optimized through supervised fine-tuning.

[0019] Preferably, the step of generating a second prompt for the financial statement data to be analyzed includes: obtaining, from the industry indicator library, financial indicator statistical values ​​corresponding to the financial statement data to be analyzed; obtaining a second original value of each account in the financial statement data to be analyzed, wherein the second original value is an unadjusted value reported for each account in the financial statement data to be analyzed; obtaining a second financial indicator value, wherein the second financial indicator statistical value is obtained by calculating the financial indicator value of the company corresponding to the financial statement data to be analyzed; and generating a second prompt based on the financial indicator statistical value, the second original value and the second financial indicator value corresponding to the financial statement data to be analyzed.

[0020] Preferably, the step of obtaining the statistical values ​​of financial indicators corresponding to the financial statement data to be analyzed from the industry indicator library includes: obtaining the industry to which the financial statement data to be analyzed belongs; obtaining the financial reporting time point of the financial statement data to be analyzed; and based on the industry and the financial reporting time point, obtaining the statistical values ​​of financial indicators corresponding to the financial statement data to be analyzed from the industry indicator library.

[0021] Preferably, the step of obtaining the second original value of each account in the financial statement data to be analyzed includes: performing data cleansing on the financial statement data to be analyzed; and obtaining the second original value of each account in the financial statement data to be analyzed based on the financial statement data to be analyzed after the data cleansing.

[0022] Preferably, the method steps for obtaining the second financial indicator value include: obtaining the second financial indicator value based on the financial statement data to be analyzed after data cleaning, wherein the second financial indicator statistical value is obtained by calculating the financial indicator value of the company corresponding to the financial statement data to be analyzed.

[0023] In a second aspect, the present invention provides an optimization and calling device for a local large language model suitable for financial report analysis. The optimization and calling device for a local large language model suitable for financial report analysis is configured to execute the optimization and calling method for the local large language model suitable for financial report analysis. The optimization and calling device for a local large language model suitable for financial report analysis includes:

[0024] An industry indicator library construction module, which is used to calculate the statistical values ​​of financial indicators according to the industry dimension of multiple financial statement data to form an industry indicator library;

[0025] A first prompt generation module, the first prompt generation module is used to obtain the financial indicator statistics corresponding to the industry to which each piece of the financial statement data belongs based on the industry indicator library; obtain the first original value of each subject in each piece of the financial statement data, wherein the first original value is the unadjusted value reported by each subject in the financial statement data; obtain the first financial indicator value based on each piece of the financial statement data, wherein the first financial indicator value is obtained by calculating the financial indicator value of each company corresponding to the financial statement data; based on the financial indicator statistics corresponding to the industry to which the financial statement data belongs, the first original value and the first financial indicator value, batch generate the first prompt, wherein the first prompt is a prompt or instruction requesting an external large language model to output an analysis result of the financial statement data;

[0026] an external large language model calling module, the external large language model calling module being used to obtain a first financial analysis report according to the first prompt, wherein the first financial analysis report is a result of multiple analyses of the financial statement data by multiple external large language models respectively;

[0027] A local large language model optimization module, wherein the local large language model optimization module is used to optimize the local large language model through training samples, wherein the training samples include a manually annotated first financial analysis report;

[0028] A local large language model calling module, wherein the local large language model calling module is used to generate a second prompt for the financial statement data to be analyzed, wherein the second prompt is a prompt or instruction requesting the local large language model to output an analysis result for the financial statement data to be analyzed; according to the second prompt, a second financial analysis report is obtained, wherein the second financial analysis report is the analysis result of the local large language model on the financial statement data to be analyzed.

[0029] In a third aspect, the present invention provides an electronic device, the electronic device comprising:

[0030] At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute any one of the above first aspects of a method for optimizing and calling a local large language model suitable for financial report analysis.

[0031] In a fourth aspect, the present invention provides a computer-readable storage medium storing a computer program, wherein the computer program is used to enable a processor to execute the method for optimizing and calling a local large language model suitable for financial report analysis as described in any one of the first aspects above.

[0032] Compared with the prior art, the beneficial effects of the present invention are as follows: the present invention provides an optimization and calling method for a local large language model suitable for financial report analysis, by differentiating unlabeled financial statement data by industry and calculating the statistical values ​​of financial indicators, constructing an industry indicator library, and providing industry indicator characteristics, so that when the local large language model is subsequently trained, the local large language model can output a financial analysis report in combination with industry characteristics, solving the problem that the existence of industry differences makes the large language model face huge challenges when applied across industries. In combination with industry indicator characteristics, a prompt is generated for each piece of financial statement data, and an external large language model is used to output a financial analysis report for these prompts, so that the unlabeled financial statement data originally on the Internet is transformed into training samples that can be used to train the local large language model, providing more extensive and comprehensive data support for the training of the local large language model, improving the accuracy and reliability of the data output by the local large language model in financial report analysis, and meeting the actual application needs of various financial institutions. Generate a prompt for the financial statement to be analyzed, and input the prompt into the trained local large language model to obtain the corresponding financial analysis report. This avoids the leakage of internal sensitive information when directly using an external large language model for internal financial report analysis, thus ensuring data security.

[0033] Therefore, according to the optimization and calling method of the local large language model suitable for financial report analysis provided by the present invention, it is possible to combine with the external large language model to convert the original unlabeled financial report data into training samples that can be used to train the local large language model, so that the internal financial report can be directly analyzed through the local large language model without calling the external large language model. At the same time, the local large language model can also output the financial report analysis results in combination with industry characteristics. This solves the problem that directly using an external large language model for financial report analysis can easily cause the leakage of internal sensitive information, and the external large language model is difficult to output different financial report analysis results in combination with industry characteristics.

[0034] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] The specific embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings, wherein:

[0036] Figure 1 It is a structural diagram of an optimization and calling method of a local large language model suitable for financial report analysis according to an embodiment of the present invention;

[0037] Figure 2 This is a specific implementation example diagram of building an industry indicator library in an embodiment of the present invention;

[0038] Figure 3 This is a specific implementation example diagram of batch generating the first prompt in an embodiment of the present invention;

[0039] Figure 4 This is a specific implementation example diagram of obtaining a local large language model training sample in an embodiment of the present invention;

[0040] Figure 5 This is a specific implementation example diagram of calling a local large language model to perform financial report analysis in an embodiment of the present invention;

[0041] Figure 6 It is a module diagram of an optimization and calling device of a local large language model suitable for financial report analysis in an embodiment of the present invention;

[0042] Figure 7 It is a structural schematic diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0043] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. 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 creative work should fall within the scope of protection of the present invention.

[0044] The terms used in this application are only for the purpose of describing specific embodiments and are not intended to limit this application. Unless otherwise defined, the technical terms or scientific terms used in this specification should be understood by people with ordinary skills in the field to which this application belongs. The words "first", "second" and similar words used in this specification and claims do not indicate any order, quantity or importance, but are only used to distinguish different technical features.

[0045] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.

[0046] Figure 1 The present invention is a structural diagram of a method for optimizing and calling a local large language model suitable for financial report analysis, which can be executed by an optimization and calling device for a local large language model suitable for financial report analysis, which can be implemented in the form of hardware and / or software, and can be configured in an electronic device. The method includes:

[0047] Step 101: Calculate the statistical values ​​of financial indicators based on the industry dimension of multiple financial statement data to form an industry indicator library.

[0048] It is worth noting that many financial statement data are financial statement data that can be collected on the Internet, such as financial statement data of listed companies.

[0049] It is worth noting that the data in the industry indicator library is panel data. Panel data, also known as longitudinal data or tracking data, is a type of statistical data that records the observations of multiple individuals (such as multiple financial statements, etc.) at multiple time points. The characteristics of panel data are that it has the characteristics of both time series (spanning multiple time points) and cross-sections (multiple individuals), which makes it very useful in data analysis and statistical modeling. In the present invention, panel data is used as the statistical data type of the industry indicator library, which can reduce the estimation bias caused by omitted variables by controlling individual fixed effects. The use of panel data can provide more information to infer the causal relationship between variables. In addition, compared with pure time series or cross-sectional data, panel data can provide more information, thereby improving the efficiency of estimation.

[0050] It is worth noting that the industry dimension refers to organizing and interpreting data according to the standards and characteristics of different industries during the analysis and research process. In the present invention, calculating the statistical values ​​of financial indicators according to the industry dimension means classifying financial statement data according to different industries and calculating the statistical values ​​of financial indicators of different industries respectively. Financial indicators such as debt-to-asset ratio, current ratio, profit margin, return on net assets and quick ratio, etc., the statistical values ​​refer to the minimum value, average value and maximum value, etc.

[0051] It is worth noting that the data time in the industry indicator library of the present invention needs to correspond to the data time in the financial statements.

[0052] Step 102: Based on the industry indicator database, obtain the financial indicator statistics corresponding to the industry to which each financial statement data belongs.

[0053] Step 103: Obtain the first original value of each account in each financial statement data, wherein the first original value is the unadjusted value reported by each account in the financial statement data.

[0054] It is understandable that in financial statements, "various subjects" refer to accounting subjects, which are the names used in accounting information systems to classify, record and summarize economic activities. Accounting subjects are divided into different categories according to their nature and purpose. For example, asset subjects, liability subjects, owner's equity subjects, cost subjects and profit and loss subjects, etc. When preparing financial statements, accountants will record each transaction under the corresponding accounting subject according to the actual economic activities. The data aggregation and analysis of "various subjects" are essential to understanding the financial status, operating results and cash flow of an enterprise. By analyzing the changes and relationships between different subjects, the financial health, profitability, liquidity and risk status of an enterprise can be evaluated.

[0055] Step 104: Based on each piece of financial statement data, a first financial indicator value is obtained, wherein the first financial indicator value is obtained by calculating the financial indicator value of each company corresponding to the financial statement data.

[0056] It is understandable that in every company, financial indicators are important tools to measure the company's financial status, operating efficiency and profitability, and they can help investors, management, creditors and other stakeholders assess the company's health and future potential. Financial indicators such as debt-to-asset ratio, current ratio, quick ratio, equity ratio, profit margin, return on net assets, etc.

[0057] Step 105: Based on the financial indicator statistical value corresponding to the industry to which the financial statement data belongs, the first original value and the first financial indicator value, batch generate the first prompt, wherein the first prompt is a prompt or instruction requesting an external large language model to output analysis results for the financial statement data.

[0058] It should be noted that in the use of large language models, "prompt" refers to the text input by the user, which is used to guide the large language model to give a specific answer or perform a specific task. The prompt can be a question, instruction, topic or any form of text input, which is used to stimulate the large language model to generate a response or perform an operation. In the present invention, the first prompt is a prompt or instruction requesting the external large language model to output the analysis results of the financial statement data.

[0059] In this embodiment, the first prompt example is such as: "You are a professional financial analyst. Please perform financial statement analysis based on the following data: ① The industry to which the enterprise belongs is XX industry, and the industry indicators are as follows: XXXX; ② The original financial statements of the enterprise are as follows: XXXX; ③ The commonly used financial indicators of the enterprise are as follows: XXXX".

[0060] It should be noted that external large language models refer to large machine learning models developed by other organizations or companies for processing natural language. When analyzing the company's internal financial statement data through external large language models, it is easy to cause the leakage of internal sensitive information. This problem may lead to the illegal acquisition or abuse of the organization's core business data, thereby threatening its business secrets and customer privacy.

[0061] Step 106: Obtain a first financial analysis report according to the first prompt, wherein the first financial analysis report is a result of multiple analyses of financial statement data by multiple external large language models.

[0062] Step 107: Optimize the local large language model through training samples, wherein the training samples include the manually annotated first financial analysis report.

[0063] It should be noted that a local large language model refers to a large language model deployed in the user's local environment (such as a company's internal computer, server, or local network). Since the model runs locally, sensitive data does not need to be uploaded to an external server, which enhances data privacy and security.

[0064] It should be noted that, in the present invention, manual annotation refers to the financial experts ranking or scoring multiple financial analysis reports of the same financial statement, so that the local large language model can be fine-tuned based on the manual annotation.

[0065] Specifically, by manually screening and labeling the first financial analysis report, higher quality samples can be identified from the first financial analysis report as training samples for training the local large language model. This can further improve the accuracy and reliability of the financial report analysis results output by the localized large model.

[0066] Specifically, the local large language model is optimized by supervised fine-tuning. Supervised fine-tuning is a method for optimizing machine learning models. In supervised fine-tuning, an already trained machine learning model (called a pre-trained model) is used as the initial state, and then fine-tuned on the training set (training samples) of the target task so that the model can better adapt to the target task. In supervised fine-tuning, the model learns from labeled training data so that it can predict or classify new, unseen data. Supervised fine-tuning can be performed using P-tuning, LoRA, and other methods. In the present invention, the overall performance of the trained local large language model is optimized and improved by supervised fine-tuning. The local large language model optimized by supervised fine-tuning can provide support for data-based decision-making and help enterprises and organizations extract valuable insights from historical data.

[0067] Step 108: Generate a second prompt for the financial statement data to be analyzed, wherein the second prompt is a prompt or instruction requesting the local large language model to output analysis results for the financial statement data to be analyzed.

[0068] Specifically, the steps of generating a second prompt for the financial statement data to be analyzed include: (1) obtaining the industry to which the financial statement data to be analyzed belongs and the time point of the financial report; based on the industry to which the financial statement data to be analyzed belongs and the time point of the financial report, obtaining the statistical value of the financial indicator of the industry corresponding to the financial statement data to be analyzed from the industry indicator library. (2) performing data cleaning on the financial statement data to be analyzed, and based on the financial statement data to be analyzed after the data cleaning, obtaining the second original value of each account in the financial statement data to be analyzed, wherein the second original value is the value reported by each account in the financial statement data to be analyzed and has not been adjusted. (3) Based on the financial statement data to be analyzed after the data cleaning, calculating the financial indicator value of the company corresponding to the financial statement data to be analyzed. (4) Generate a second prompt based on the statistical value of the financial indicator corresponding to the financial statement data to be analyzed, the second original value and the second financial indicator value.

[0069] It should be noted that the format of the second prompt is the same as the first prompt. An example of the second prompt is: "You are a professional financial analyst. Please analyze the financial statements based on the following data: ① The industry to which the enterprise belongs is XX industry, and the industry indicators are as follows: XXXX; ② The original financial statements of the enterprise are as follows: XXXX; ③ The commonly used financial indicators of the enterprise are as follows: XXXX".

[0070] It should be noted that financial reporting points refer to specific dates or time points in the financial reporting cycle, which are critical to determining the accuracy and completeness of financial data.

[0071] It should be noted that data cleaning refers to removing duplicate data, filling missing values, processing outliers, and unifying data formats from the collected data. This can reduce errors and deviations in data analysis, modeling, and model training, and improve the quality and reliability of data. Because in the process of data mining collection, there are a lot of incomplete (missing values), inconsistent, and abnormal data in the massive amount of raw data, which seriously affects the execution efficiency of data mining modeling and may even lead to deviations in mining results, so data cleaning is particularly important. Data cleaning is to improve the quality of data on the one hand, and to make the data better adapt to specific mining techniques or tools on the other.

[0072] Step 109: According to the second prompt, obtain a second financial analysis report, wherein the second financial analysis report is an analysis result output by the local large language model on the financial statement data to be analyzed.

[0073] In summary, the present invention provides a method for optimizing and calling a local large language model suitable for financial report analysis. By differentiating unlabeled financial statement data by industry and calculating the statistical values ​​of financial indicators, an industry indicator library is constructed, and industry indicator characteristics are provided. In this way, when the local large language model is subsequently trained, the local large language model can output a financial analysis report in combination with the industry characteristics, thereby solving the problem that the existence of industry differences makes the large language model face huge challenges when applied across industries.

[0074] Secondly, based on the characteristics of industry indicators, prompts are generated for each financial statement data, and financial analysis reports are output for these prompts using an external big language model. This allows the original financial statement data on the Internet to be transformed into training samples that can be used to train local big language models, providing more extensive and comprehensive data support for the training of local big language models, and improving the accuracy and reliability of data output by local big language models in financial report analysis, meeting the actual application needs of various financial institutions.

[0075] Finally, a prompt is generated for the financial statement to be analyzed. By inputting the prompt into the trained local large language model, the corresponding financial analysis report can be obtained. This avoids the leakage of internal sensitive information when directly using an external large language model for internal financial report analysis, thus ensuring data security.

[0076] Therefore, according to the optimization and calling method of the local large language model suitable for financial report analysis provided by the present invention, it is possible to combine with the external large language model to convert the original unlabeled financial report data into training samples that can be used to train the local large language model, so that the internal financial report can be directly analyzed through the local large language model without calling the external large language model. At the same time, the local large language model can also output the financial report analysis results in combination with industry characteristics. This solves the problem that directly using an external large language model for financial report analysis can easily cause the leakage of internal sensitive information, and the external large language model is difficult to output different financial report analysis results in combination with industry characteristics.

[0077] Figure 6 This is a module diagram of an optimization and calling device for a local large language model suitable for financial report analysis according to the present invention. Figure 6 As shown, the module includes:

[0078] 301. Industry indicator library construction module: The industry indicator library construction module is used to calculate the statistical values ​​of financial indicators according to industry dimensions based on multiple financial statement data to form an industry indicator library.

[0079] 302. A first prompt generation module, the first prompt generation module is used to obtain, based on an industry indicator library, a financial indicator statistical value corresponding to the industry to which each financial statement data belongs; obtain a first original value of each account in each financial statement data, wherein the first original value is an unadjusted value reported for each account in the financial statement data; obtain a first financial indicator value based on each financial statement data, wherein the first financial indicator value is obtained by calculating the financial indicator value of each company corresponding to the financial statement data; based on the financial indicator statistical value corresponding to the industry to which the financial statement data belongs, the first original value and the first financial indicator value, batch generate a first prompt, wherein the first prompt is a prompt or instruction requesting an external large language model to output an analysis result of the financial statement data.

[0080] 303. An external large language model calling module, where the external large language model calling module is used to obtain a first financial analysis report according to a first prompt, wherein the first financial analysis report is a result of multiple analyses of the financial statement data by multiple external large language models.

[0081] 304. A local large language model optimization module, where the local large language model optimization module is used to optimize the local large language model through training samples, wherein the training samples include a manually annotated first financial analysis report.

[0082] 305. A local large language model calling module, wherein the local large language model calling module is used to generate a second prompt for the financial statement data to be analyzed, wherein the second prompt is a prompt or instruction requesting the local large language model to output an analysis result of the financial statement data to be analyzed; according to the second prompt, a second financial analysis report is obtained, wherein the second financial analysis report is the analysis result of the local large language model on the financial statement data to be analyzed.

[0083] Figure 7 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0084] like Figure 7 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0085] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0086] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as solving an optimization and calling method for a local large language model suitable for financial report analysis.

[0087] In some embodiments, a method for optimizing and calling a local large language model suitable for financial report analysis can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the method for optimizing and calling a local large language model suitable for financial report analysis described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to execute a method for optimizing and calling a local large language model suitable for financial report analysis in any other appropriate manner (for example, by means of firmware).

[0088] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0089] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0090] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0091] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0092] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0093] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0094] An embodiment of the present invention further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements a method for optimizing and calling a local large language model suitable for financial report analysis as provided in an embodiment of the present invention.

[0095] In the process of implementation, the computer program product can be written in one or more programming languages ​​or a combination thereof to perform the computer program code of the present invention, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect through the Internet).

[0096] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0097] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for optimizing and calling a local large language model suitable for financial report analysis, characterized in that: include: Calculate the statistical values ​​of financial indicators based on industry dimensions using data from multiple financial statements to form an industry indicator database; Based on the industry indicator database, obtain the financial indicator statistics corresponding to the industry to which each piece of financial statement data belongs; Obtaining a first original value of each account in each of the financial statement data, wherein the first original value is a value reported by each account in the financial statement data and not adjusted; Based on each of the financial statement data, obtaining a first financial indicator value, wherein the first financial indicator value is obtained by calculating the financial indicator value of each company corresponding to the financial statement data; Based on the financial indicator statistics corresponding to the industry to which the financial statement data belongs, the first original value, and the first financial indicator value, batch-generate a first prompt, wherein the first prompt is a prompt or instruction requesting an external large language model to output an analysis result of the financial statement data; According to the first prompt, a first financial analysis report is obtained, wherein the first financial analysis report is a result of multiple analyses of the financial statement data by the multiple external large language models respectively; Optimizing the local large language model through training samples, wherein the training samples include a manually annotated first financial analysis report; Generate a second prompt for the financial statement data to be analyzed, wherein the second prompt is a prompt or instruction requesting the local large language model to output an analysis result for the financial statement data to be analyzed; According to the second prompt, a second financial analysis report is obtained, wherein the second financial analysis report is an analysis result of the local large language model on the financial statement data to be analyzed.

2. The method for optimizing and calling a local large language model suitable for financial report analysis according to claim 1, characterized in that: The data in the industry indicator database are panel data.

3. The optimization and calling method of a local large language model suitable for financial report analysis according to claim 1, characterized in that: Optimize the local large language model through supervised fine-tuning.

4. The optimization and calling method of a local large language model suitable for financial report analysis according to claim 1 is characterized in that: The step of generating a second prompt for the financial statement data to be analyzed includes: Obtaining, from the industry indicator database, financial indicator statistics corresponding to the financial statement data to be analyzed; Obtaining a second original value of each account in the financial statement data to be analyzed, wherein the second original value is a value reported by each account in the financial statement data to be analyzed and not adjusted; Obtaining a second financial indicator value, wherein the second financial indicator statistical value is obtained by calculating a financial indicator value of a company corresponding to the financial statement data to be analyzed; A second prompt is generated based on the financial indicator statistical value, the second original value and the second financial indicator value corresponding to the financial statement data to be analyzed.

5. The optimization and calling method of a local large language model suitable for financial report analysis according to claim 4 is characterized in that: The step of obtaining the financial indicator statistical values ​​corresponding to the financial statement data to be analyzed from the industry indicator library includes: Obtaining the industry to which the financial statement data to be analyzed belongs; Obtaining the financial report time point of the financial statement data to be analyzed; Based on the industry and the financial report time point, the financial indicator statistical values ​​corresponding to the financial statement data to be analyzed are obtained from the industry indicator library.

6. According to claim 4, a method for optimizing and calling a local large language model suitable for financial report analysis is characterized in that: The step of obtaining the second original value of each item in the financial statement data to be analyzed includes: Performing data cleaning on the financial statement data to be analyzed; Based on the financial statement data to be analyzed after data cleaning, a second original value of each item in the financial statement data to be analyzed is obtained.

7. The method for optimizing and calling a local large language model suitable for financial report analysis according to claim 6, characterized in that: The method steps for obtaining the second financial indicator value include: Based on the financial statement data to be analyzed after data cleaning, a second financial indicator value is obtained, wherein the second financial indicator statistical value is obtained by calculating the financial indicator value of the company corresponding to the financial statement data to be analyzed.

8. An optimization and calling device for a local large language model suitable for financial report analysis, characterized in that: The optimization and calling device for the local large language model suitable for financial report analysis is configured to execute the optimization and calling method for the local large language model suitable for financial report analysis, and the optimization and calling device for the local large language model suitable for financial report analysis includes: An industry indicator library construction module, which is used to calculate the statistical values ​​of financial indicators according to the industry dimension of multiple financial statement data to form an industry indicator library; A first prompt generation module, the first prompt generation module is used to obtain the financial indicator statistics corresponding to the industry to which each piece of the financial statement data belongs based on the industry indicator library; obtain the first original value of each subject in each piece of the financial statement data, wherein the first original value is the unadjusted value reported by each subject in the financial statement data; obtain the first financial indicator value based on each piece of the financial statement data, wherein the first financial indicator value is obtained by calculating the financial indicator value of each company corresponding to the financial statement data; based on the financial indicator statistics corresponding to the industry to which the financial statement data belongs, the first original value and the first financial indicator value, batch generate the first prompt, wherein the first prompt is a prompt or instruction requesting an external large language model to output an analysis result of the financial statement data; an external large language model calling module, the external large language model calling module being used to obtain a first financial analysis report according to the first prompt, wherein the first financial analysis report is a result of multiple analyses of the financial statement data by multiple external large language models respectively; A local large language model optimization module, wherein the local large language model optimization module is used to optimize the local large language model through training samples, wherein the training samples include a manually annotated first financial analysis report; A local large language model calling module, wherein the local large language model calling module is used to generate a second prompt for the financial statement data to be analyzed, wherein the second prompt is a prompt or instruction requesting the local large language model to output an analysis result for the financial statement data to be analyzed; according to the second prompt, a second financial analysis report is obtained, wherein the second financial analysis report is the analysis result of the local large language model on the financial statement data to be analyzed.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively coupled to the at least one processor; Wherein, the memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the optimization and calling method of a local large language model suitable for financial report analysis as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer readable storage medium stores a computer program, The computer program is used to enable a processor to implement the optimization and calling method of a local large language model suitable for financial report analysis as described in any one of claims 1 to 7 when executed.

Citation Information

Patent Citations

  • Automatic financial report question and answer method and device based on large model

    CN117235233A

  • Enterprise financial fraud identification method, device, equipment, medium and program product

    CN117994055A

  • Intelligent session method and system suitable for vertical field based on large model

    CN118035408A

  • Systems and methods for providing metadata-dependent language models

    US20140324434A1

Cited By

  • Large language model prediction and evaluation method for financial statement analysis

    CN120125366A

  • Open financial product AI question and answer method and system based on performance evaluation algorithm

    CN120541185A