Data analysis method and device, electronic equipment, storage medium and program product
By identifying the data analysis intent and selecting a matching target model for feature extraction in financial data analysis, the problem of insufficient accuracy in existing technologies is solved, and efficient and accurate financial data analysis is achieved.
Patent Information
- Application Number
- CN202511637412.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-10
- Publication Date
- 2026-02-10
AI Technical Summary
Existing data analysis methods suffer from poor accuracy when dealing with multi-dimensional feature data in complex scenarios. This is especially true in financial data analysis, where traditional methods rely on manual operations, which are inefficient and lack a unified data analysis process, resulting in incomplete extraction of key information.
By obtaining user instructions to determine the data analysis intent, a target data analysis model matching the intent is selected from multiple candidate models for feature extraction and analysis. Combining multi-turn dialogue interaction models and large language models ensures the accuracy and relevance of the analysis.
It improves the accuracy of data analysis, reduces the limitations of prompt word length and comprehension ability, enhances the robustness and fault tolerance of the system, and ensures the interpretability and credibility of data analysis results.
Smart Images

Figure CN121502205A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of financial technology or other related fields, and in particular to a data analysis method, apparatus, electronic device, storage medium and program product. Background Technology
[0002] Analyzing financial data allows for timely identification of risks in financial transactions and enables risk attribution. However, because financial data is typically large in volume, highly specialized, and dense, manual analysis in scenarios such as risk attribution or transaction characteristic analysis is time-consuming.
[0003] Currently, some existing data analysis methods also propose to use financial trees to drill down and attribute risk data, or to conduct preliminary analysis of transaction information based on large language models, combined with manual judgment by business personnel, to carry out data analysis.
[0004] However, when using the existing data analysis methods mentioned above, there is a problem of poor accuracy in data analysis for multi-dimensional feature data in complex scenarios. Summary of the Invention
[0005] This application provides a data analysis method, apparatus, electronic device, storage medium, and program product to solve the technical problem of poor accuracy in existing data analysis.
[0006] In a first aspect, this application provides a data analysis method, the method comprising:
[0007] Obtain the financial data to be analyzed, as well as the user's initial instructions;
[0008] Based on the financial data to be analyzed, and the first instruction, the data analysis intent is determined;
[0009] Based on the stated data analysis intent, a target data analysis model is determined from multiple candidate data analysis models;
[0010] The target data analysis model is used to extract features from the financial data to be analyzed, thereby obtaining the data features of the financial data to be analyzed.
[0011] Based on the financial data to be analyzed, the data analysis intent, and the data characteristics, the data analysis results of the financial data to be analyzed are obtained.
[0012] Secondly, this application provides a data analysis apparatus, the apparatus comprising:
[0013] The acquisition module is used to acquire the financial data to be analyzed, as well as the user's initial instructions;
[0014] The processing module is configured to: determine a data analysis intent based on the financial data to be analyzed and the first instruction; determine a target data analysis model from multiple candidate data analysis models based on the data analysis intent; extract features from the financial data to be analyzed using the target data analysis model to obtain data features of the financial data to be analyzed; and obtain a data analysis result of the financial data to be analyzed based on the financial data to be analyzed, the data analysis intent, and the data features.
[0015] Thirdly, this application provides an electronic device, including: a processor, and a memory communicatively connected to the processor;
[0016] The memory stores computer-executed instructions;
[0017] The processor executes computer execution instructions stored in the memory to implement the method as described in any of the first aspects.
[0018] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any of the first aspects.
[0019] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the method described in any one of the first aspects.
[0020] The data analysis method, apparatus, electronic device, storage medium, and program product provided in this application can determine the user's data analysis intent based on the financial data to be analyzed and the user's initial instruction. Then, based on this intent, a target data analysis model can be determined from multiple candidate models. Because the target model is determined based on the data analysis intent, the specificity of feature extraction from the financial data to be analyzed by the target model is ensured, thus improving the accuracy of feature extraction and obtaining the data features of the financial data to be analyzed based on the target model. Then, based on the data features, the financial data to be analyzed, and the data analysis intent, the data analysis results can be obtained. Through this method, by ensuring the accuracy of the data analysis intent, the degree of limitation on prompt length and comprehension ability is reduced, and data analysis is performed based on data features extracted from the target data analysis model that matches the data analysis intent, thereby improving the accuracy of data analysis. Attached Figure Description
[0021] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0022] Figure 1 A flowchart illustrating a data analysis method provided in this application;
[0023] Figure 2 A flowchart illustrating another data analysis method provided in this application;
[0024] Figure 3 A flowchart illustrating the process of determining data analysis intent provided in this application;
[0025] Figure 4 A flowchart illustrating the process of obtaining data analysis results provided in this application;
[0026] Figure 5 A schematic diagram illustrating another process for obtaining data analysis results provided in this application;
[0027] Figure 6 A schematic diagram of the structure of a data analysis device provided in this application;
[0028] Figure 7 This is a schematic diagram of the hardware structure of an electronic device provided in this application.
[0029] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0030] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0031] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of the relevant data all comply with the relevant laws, regulations, and standards of the relevant countries and regions, have taken necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation access points for users to choose to authorize or refuse.
[0032] Furthermore, the technical solution involved in this application, which involves big data analysis of user information (including but not limited to personal biometrics, identity data, consumption data, asset data, electronic terminal operation data, etc.) and the use of artificial intelligence technology for automated decision-making, and makes decisions that have a significant impact on personal rights based on the results of automated decision-making, provides users with corresponding operation entry points for users to choose to agree to or reject the results of automated decision-making; if the user chooses to reject, the process will proceed to the expert decision-making process.
[0033] It should be noted that the data analysis methods, devices, electronic devices, storage media, and program products provided in this application can be used in the fintech field, or in any field other than fintech. The application fields of the data analysis methods, devices, electronic devices, storage media, and program products in this application are not limited.
[0034] The application scenarios of this application can be, for example, financial data analysis scenarios, such as risk and profit / loss attribution, and analysis of transaction characteristics.
[0035] In financial data analysis scenarios, financial data is typically characterized by its large volume, high level of specialization, and high information density. Whether attributing risk and profit or conducting in-depth analysis of transaction behavior characteristics, traditional methods relying on manual operation are inefficient and require a high level of expertise from personnel.
[0036] Therefore, some existing solutions propose intelligent analysis systems based on the Retrieval Augmented Generation (RAG) framework. For example, some existing data analysis methods, based on RAG, propose using financial trees for risk data drill-down attribution, or using large language models to perform preliminary analysis of transaction information, combined with manual judgment by business personnel, to conduct data analysis.
[0037] However, existing data analysis methods have significant limitations. For example, various data analysis functions are usually designed only for specific scenarios, and different modules use independent data analysis technologies, resulting in low system integration, cumbersome operation processes, and a lack of a unified data analysis process.
[0038] When using existing data analysis methods, accuracy can suffer if the financial data being analyzed is multi-dimensional and highly sparse, reflecting complex business scenarios. Furthermore, current technologies have limitations in understanding the length of prompts and the comprehension capabilities of large language models. When handling highly specialized and data-intensive data analysis tasks, issues such as information overload or disjointed responses can arise, leading to incomplete extraction of key information and consequently, poor accuracy.
[0039] In view of the aforementioned problems with existing data analysis methods, this application proposes a method that can accurately analyze a user's data analysis intent and select a target data analysis model that matches that intent for data analysis. By ensuring the accuracy of the data analysis intent, the limitations imposed by prompt word length and comprehension ability are reduced, and by performing data analysis through a target data analysis model that matches the intent, the accuracy of data analysis is improved.
[0040] The data analysis methods, apparatus, electronic devices, storage media, and program products provided in this application are intended to solve the above-mentioned technical problems of the prior art.
[0041] Optionally, the execution entity of the data analysis method provided in this application can be any electronic device with processing capabilities, such as a terminal or a server. Alternatively, in some embodiments, the execution entity of the data analysis method can also be a data analysis system. This data analysis system can be deployed in a cloud environment or a server cluster, for example. This application does not limit the deployment environment of the data analysis system.
[0042] The following describes the technical solution of this application and how it solves the aforementioned technical problems, taking the data analysis system as the executing entity of the data analysis method provided in this application as an example, in conjunction with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0043] Figure 1 This is a flowchart illustrating a data analysis method provided in this application. Figure 1 As shown, the method includes the following steps:
[0044] S101. Obtain the financial data to be analyzed, as well as the user's initial instructions.
[0045] Optionally, the aforementioned financial data to be analyzed may refer to financial-related data that requires data analysis and processing. It should be understood that this application does not limit the type or format of the financial data to be analyzed. For example, the aforementioned financial data to be analyzed may include risk and profit / loss data, transaction characteristic data, financial transaction market data, etc.
[0046] Optionally, the user's first instruction may refer to a data analysis request, command, or question raised by the user. For example, the first instruction may be used to inquire about the analysis results of the aforementioned financial data to be analyzed, or it may be used to instruct the user to perform a specified analysis operation on the aforementioned financial data to be analyzed. For instance, the first instruction may be "Based on the given financial data to be analyzed, analyze the reasons for the portfolio's losses" or "Based on the given financial data to be analyzed, perform feature analysis on the transaction data," etc.
[0047] It should be understood that this application does not limit how the financial data to be analyzed and the aforementioned first instruction are obtained. For example, the data analysis system may receive the aforementioned financial data to be analyzed and the aforementioned first instruction from the user through an application programming interface (API) or a graphical user interface (GUI).
[0048] S102. Based on the financial data to be analyzed, and the first instruction, determine the data analysis intent.
[0049] Optionally, the aforementioned data analysis intent may refer to the goal or direction of analyzing the financial data to be analyzed. It should be understood that this application does not limit the specific content of the data analysis intent. For example, the data analysis intent may include risk attribution analysis intent, transaction characteristic analysis intent, market trend prediction intent, etc.
[0050] Optionally, the data analysis system can, for example, concatenate the metadata of the financial data to be analyzed (such as data field names, types, etc.) with the text content of the first instruction mentioned above to obtain a prompt word, and input the prompt word into a natural language processing model (such as any existing large language model) to obtain the aforementioned data analysis intent.
[0051] Alternatively, the data analysis system can extract the keywords of the first instruction mentioned above, and based on the keywords, determine the candidate data analysis intent that matches the keywords from multiple candidate data analysis intents as the aforementioned data analysis intent.
[0052] S103. Based on the data analysis intent, determine the target data analysis model from multiple candidate data analysis models.
[0053] Optionally, the aforementioned candidate data analysis models can refer to pre-established data analysis models suitable for financial analysis scenarios. Optionally, among the aforementioned multiple candidate data analysis models, different candidate data analysis models can be applied to different financial analysis scenarios.
[0054] Optionally, the target data analysis model mentioned above can refer to the candidate data analysis model that best matches the data analysis intent mentioned above.
[0055] For example, a data analysis system can calculate the similarity between the data analysis intent and the functional description text of each candidate data analysis model. Based on the similarity calculation results, it can then determine the candidate data analysis model with the highest similarity from among multiple candidate models, and use this as the target data analysis model. The functional description text can be used to describe the applicable data analysis scenarios and functional characteristics of the candidate data analysis model.
[0056] S104. Using the target data analysis model, feature extraction is performed on the financial data to be analyzed to obtain the data features of the financial data to be analyzed.
[0057] For example, the aforementioned data features can be information extracted from the financial data to be analyzed, which can characterize the core patterns of the financial data to be analyzed. For example, data features may include statistical features (such as mean, volatility), time series features (such as trend), risk features, etc.
[0058] Optionally, the target data analysis model can extract features from the financial data to be analyzed, thereby obtaining the data features of the financial data. For example, it can refer to any existing data analysis model for financial data analysis, which will not be elaborated here. The data analysis system can input the aforementioned financial data to be analyzed into the target data analysis model to obtain the aforementioned data features.
[0059] S105. Based on the financial data to be analyzed, the data analysis intent, and the data characteristics, obtain the data analysis results of the financial data to be analyzed.
[0060] For example, a data analysis system can concatenate the financial data to be analyzed, the data analysis intent, and the data features to obtain prompt words, and input the prompt words into a large language model to obtain the data analysis results of the aforementioned financial data to be analyzed.
[0061] In this embodiment, the user's data analysis intent can be determined through the financial data to be analyzed and the user's initial instruction. Based on this intent, a target data analysis model can be selected from multiple candidate models. Because this target model is determined based on the data analysis intent, the specificity of its feature extraction from the financial data to be analyzed is ensured. This improves the accuracy of feature extraction based on the target model, resulting in the data features of the financial data to be analyzed. Then, based on these data features, the financial data to be analyzed, and the data analysis intent, the data analysis results can be obtained. This method, by ensuring the accuracy of the data analysis intent, reduces the limitations imposed by prompt length and comprehension ability. Furthermore, by performing data analysis based on data features extracted from a target data analysis model that matches the data analysis intent, the accuracy of the data analysis is improved.
[0062] The following section details how a data analysis system determines the data analysis intent based on the financial data to be analyzed and the first indication:
[0063] As one possible implementation, the data analysis system could, for example, first input the aforementioned financial data to be analyzed, along with a first instruction, into a multi-turn dialogue interaction model to obtain candidate analysis methods for the financial data. Then, the data analysis system could output the candidate analysis method.
[0064] For example, the above multi-turn dialogue interaction model can be any existing large language model.
[0065] Then, the data analysis system can obtain the user's second instruction. This second instruction is edited by the user based on the aforementioned candidate analysis methods. The data analysis system can then further determine the data analysis intent based on this second instruction through the aforementioned multi-turn dialogue interaction model.
[0066] Optionally, the multi-turn dialogue interaction model can be a fine-tuned large language model used to understand and guide user needs in financial data analysis scenarios during multi-turn dialogues. For example, after receiving the financial data to be analyzed and the first instruction from the user, the multi-turn dialogue interaction model can generate one or more candidate analysis methods.
[0067] The aforementioned candidate analysis methods can clarify, refine, or provide professional suggestions to the user's original intent. For example, if the user's first instruction is "Analyze this data," the multi-turn dialogue interaction model can output the following candidate analysis methods: "Suggestion 1: Conduct risk attribution analysis of the investment portfolio; Suggestion 2: Conduct cluster analysis of trading behavior to identify the characteristics of different user groups; Suggestion 3: Conduct volatility analysis and prediction of time series data."
[0068] After seeing the system's recommended candidate analysis methods, users can select or edit them. That is, the aforementioned second instruction can be feedback provided to the user based on the candidate analysis methods. For example, the data analysis system can receive one of the candidate analysis methods selected by the user from the provided candidate list as the second instruction. Alternatively, the data analysis system can also receive the user's textual modifications to a selected candidate analysis method as the second instruction.
[0069] In this embodiment, a multi-turn dialogue interaction model is used to generate candidate analysis methods based on the user's first instruction and obtain the user's second instruction to ultimately determine the data analysis intent. This method achieves guided intent confirmation interaction, solving the problem that users may find it difficult to accurately describe their needs due to the highly specialized nature of financial data, thus improving the accuracy of the data analysis intent. The aforementioned multi-turn feedback mechanism ensures that the final determined data analysis intent accurately reflects the user's true analysis goals, laying the foundation for the subsequent accurate determination of the target data analysis model, thereby enhancing the accuracy of the data analysis.
[0070] The following section details how a data analysis system determines the target data analysis model from multiple candidate models based on the data analysis intent:
[0071] As one possible implementation, the data analysis system can, based on the aforementioned data analysis intent and the functional description text of the candidate data analysis models, determine the candidate data analysis model that matches the data analysis intent from multiple candidate data analysis models. Then, the data analysis system can use the "candidate data analysis model that matches the data analysis intent" as the aforementioned target data analysis model.
[0072] Optionally, the above-mentioned functional description text can be text used to describe the functions, applicable scenarios, and other information of the candidate data analysis model.
[0073] Optionally, the data analysis system can, for example, construct prompt words based on the aforementioned data analysis intent and the functional description text of multiple candidate data analysis models, and input these prompt words into a large language model to obtain the candidate data analysis models that match the data analysis intent. These prompt words can be used to indicate which candidate data analysis models match the data analysis intent based on the aforementioned data analysis intent and the functional description text of multiple candidate data analysis models.
[0074] In this embodiment, the target data analysis model is determined by matching the data analysis intent with the functional description text of each candidate data analysis model. This ensures that the capabilities of the selected target data analysis model are highly consistent with the user's data analysis intent, thereby laying the foundation for the accuracy of the data features obtained by subsequent feature extraction based on the target data analysis model.
[0075] As one possible implementation, the data analysis system can also respond to the above multiple candidate data analysis models. If there is no "candidate data analysis model that matches the data analysis intention", the preset data analysis model can be used as the target data analysis model.
[0076] The preset data analysis model can be a data analysis model with strong versatility and high generalization ability. In some embodiments, the preset data analysis model can be, for example, a large language model that has been fine-tuned and trained in the field of financial data mining.
[0077] As one possible implementation, the data analysis system can calculate the similarity (e.g., cosine similarity) between the textual representation of the data analysis intent and the textual representation of the functional description of each candidate data analysis model. If the similarity calculation result of at least one candidate data analysis model is greater than or equal to a preset similarity threshold, the data analysis system can determine that there are candidate data analysis models that match the data analysis intent, and select the candidate data analysis model with the highest similarity as the target data analysis model.
[0078] If the similarity calculation results for all candidate data analysis models are less than the preset similarity threshold, the data analysis system can determine that there is no candidate data analysis model that matches the data analysis intent. Therefore, the data analysis system can use the preset data analysis model as the target data analysis model.
[0079] By employing the above method, when no candidate data analysis model matching the data analysis intent is found among multiple candidate data analysis models, the preset data analysis model is used as the target data analysis model. This achieves the construction of a reliable safety net mechanism, ensuring that the analysis process will not be interrupted when facing edge tasks or special scenarios that the existing candidate data analysis models cannot handle. The preset data analysis model can still be activated to provide basic analysis capabilities, thereby significantly enhancing the robustness and fault tolerance of the entire data analysis system and ensuring the continuity of data analysis services.
[0080] The following section details how a data analysis system uses a target data analysis model to extract features from the financial data to be analyzed, thereby obtaining the data features of the financial data to be analyzed:
[0081] As one possible implementation, the data analysis system can use this preset data analysis model to extract key feature points from the target financial data in the financial data to be analyzed, thereby obtaining the key feature points of the financial data to be analyzed.
[0082] Then, the data analysis system can use the preset data analysis model to extract features from the financial data to be analyzed based on the aforementioned key feature points, thereby obtaining the data features of the financial data to be analyzed.
[0083] Optionally, the target financial data can be all or part of the financial data to be analyzed. For example, to improve processing efficiency and focus on core information, the target financial data is typically a subset or summary of the financial data to be analyzed. Key features can refer to data elements or statistical indicators that characterize the core content of the financial data to be analyzed, exhibit significant anomalies, or are closely related to the analytical intent. For example, for a financial market risk report, key features might include: maximum drawdown, value at risk, peak volatility, concentration risk of a specific asset class, and the date and amount of unusual transactions.
[0084] In some embodiments, the data analysis system can combine target financial data with data analysis intent. Figure 1 The data is sent as input to a pre-configured data analysis model. This model can be a pre-configured model with natural language understanding and data pattern recognition capabilities to output structured text describing the key features identified from the target financial data.
[0085] As one possible implementation, the data analysis system can construct cue words that include key feature points and data analysis intent, and input these cue words into a pre-defined data analysis model. These cue words can instruct the model to perform targeted analysis and information mining on the more complete financial data to be analyzed, based on the identified key feature points, thereby generating structured data features.
[0086] For example, data features can be an explanation of the causal relationship between key feature points, an assessment of the overall risk situation based on key feature points, or relevant contextual information supplementing the key feature points.
[0087] The above method first extracts key feature points from the target financial data, and then performs complete feature extraction based on these key feature points, achieving step-by-step feature extraction. By first identifying key feature points based on the target financial data, clear guidance is provided for the subsequent feature extraction process, thus improving the accuracy of feature extraction of the financial data to be analyzed and obtaining its data features.
[0088] In some embodiments, before the data analysis system extracts key feature points from the target financial data in the financial data to be analyzed through a preset data analysis model to obtain the key feature points of the financial data to be analyzed, it may first extract the first preset number of tokens in the financial data to be analyzed as the target financial data based on the number of tokens in the financial data to be analyzed and the preset number of tokens.
[0089] For example, the aforementioned preset number of lexical units can be pre-stored in the data analysis system.
[0090] Optionally, a lexical may correspond to a word, a subword, or a character, and this application does not limit this.
[0091] Optionally, the aforementioned preset number of lexical units can be pre-stored in the data analysis system.
[0092] As one possible implementation, the data analysis system first calls a word segmenter that matches the preset data analysis model to segment the financial data to be analyzed and obtain the number of tokens in the data. Then, the data analysis system can compare the number of tokens in the financial data to be analyzed with the preset number of tokens.
[0093] The data analysis system can perform a truncation operation if the number of tokens in the financial data to be analyzed exceeds a preset number of tokens. For example, the truncation method could be to directly truncate the beginning of the text content of the financial data to be analyzed, so that the number of tokens after word segmentation equals the preset number of tokens, and use this as the target financial data. Alternatively, the data analysis system can use all the financial data to be analyzed as the target financial data if the number of tokens in the financial data to be analyzed is less than or equal to the preset number of tokens.
[0094] By comparing the number of lexical units in the financial data to be analyzed with the preset number of lexical units, the target financial data can be extracted, ensuring that the amount of data input into the preset data analysis model is within the set range. This improves the efficiency of subsequent key feature point extraction based on the target financial data to obtain the key feature points of the financial data to be analyzed.
[0095] The following section provides a detailed explanation of how a data analysis system, based on the financial data to be analyzed, the data analysis intent, and the data characteristics, obtains the data analysis results for the financial data to be analyzed:
[0096] As one possible approach, the data analysis system can first construct target prompts based on the financial data to be analyzed, the data analysis intent, and the data characteristics.
[0097] The aforementioned target prompts can be used to indicate the data analysis to be performed on the financial data to be analyzed, based on the aforementioned data analysis intent and data characteristics.
[0098] For example, a data analysis system can fill the aforementioned financial data to be analyzed, the data analysis intent, and the data characteristics into a preset prompt word template to obtain the aforementioned target prompt word.
[0099] The data analysis system can input the target prompt word into the large language model to obtain the above data analysis results.
[0100] The target prompt word is used to instruct the large language model to perform data analysis on the financial data to be analyzed based on the data analysis intent and data characteristics. Optionally, the data analysis system can fill the financial data to be analyzed, the data analysis intent, and the data characteristics into a preset target prompt word construction template to obtain the target prompt word.
[0101] The above method integrates the financial data to be analyzed, the data analysis intent, and data characteristics to construct target prompts, ensuring the accuracy of the target prompts. Furthermore, these target prompts provide the large language model with precise and rich contextual information, enabling the model to focus on the data analysis intent and suppressing the divergence of the output data analysis results, thus ensuring the accuracy of the data analysis results.
[0102] In some embodiments, the data analysis system may also acquire the text of the data analysis reasoning process in response to the data analysis mode being a deep data analysis mode.
[0103] The data analysis reasoning process text can be used to describe the reasoning process of "the above large language model reasoning based on target prompt words to obtain data analysis results".
[0104] Optionally, the data analysis system can also output the data analysis reasoning process text after obtaining it.
[0105] Optionally, the deep data analysis mode can be actively selected by the user through interactive elements such as checkboxes, switches, or drop-down menus on the graphical user interface before performing the analysis.
[0106] For example, the text of the data analysis reasoning process can be an explicit output of the thinking process of a large language model during the response process.
[0107] After obtaining the aforementioned data analysis reasoning process text, the data analysis system can output the text of the data analysis reasoning process.
[0108] In deep data analysis mode, the text describing the reasoning process is obtained, making the data analysis logic of the large language model transparent and traceable. Through this method, while providing users with the most comprehensive data analysis results, the text of the data analysis reasoning process can be obtained, enhancing the interpretability and credibility of the results and facilitating user understanding and verification of the analysis conclusions, thus improving the user experience.
[0109] Figure 2 A flowchart illustrating another data analysis method provided in this application. Figure 2 As shown, the data analysis system can first perform analysis suggestions and intent specification (i.e., user intent understanding) to determine the data analysis intent.
[0110] Then, the data analysis system can use the intelligent classification and routing module, through feature embedding and robust response mechanisms, to determine the target data analysis model (i.e., the vertical domain expert model, such as a customer transaction feature analysis model, a product-level profit and loss analysis model, a data table analysis and query positioning model, etc.). The vertical domain expert model can be an independent tool module, and it flexibly supports the addition and optimization of various data analysis models.
[0111] The data analysis system can use the aforementioned target data analysis model to perform distributed feature data extraction to obtain the data features of the financial data to be analyzed.
[0112] Then, the aforementioned data analysis intentions and data characteristics can be input into the large language model, and comprehensive data mining and analysis can be carried out through the large language model (i.e., the large model), and systematic deep reasoning can be performed to obtain the data analysis results.
[0113] For example, Figure 3 This application provides a flowchart illustrating a process for determining data analysis intent. For example... Figure 3 As shown, users can upload data files and ask questions. Through interactive control of the intelligent agent, multiple rounds of dialogue are conducted, and analysis suggestions are provided for the uploaded data files to confirm intent and obtain the data analysis intent.
[0114] For example, taking profit and loss analysis as an example, the above target data analysis model can be a branch of the profit and loss analysis model built based on the Shapley algorithm. Figure 4 This application provides a flowchart illustrating a process for obtaining data analysis results. For example... Figure 4 As shown, a profit and loss analysis model is used to extract features from the financial data to be analyzed, thus obtaining the data characteristics of the financial data. This profit and loss analysis model can be constructed based on the Shapley algorithm. The large language model can obtain the data analysis results and the text of the data analysis reasoning process based on the data analysis intent, data characteristics, and the financial data to be analyzed.
[0115] Figure 5 This application provides an alternative flowchart for obtaining data analysis results. It addresses scenarios where no candidate data analysis model matches the data analysis intent, such as... Figure 5 As shown, taking the data analysis intent as "Merchants want to access online payment scenarios and recommend popular APIs; additionally, the merchant's industry type is retail" as an example, the above-mentioned preset data analysis model can be a branch of a general data analysis model. Through this branch of the general data analysis model, feature extraction can be performed on the financial data to be analyzed, obtaining the data features of the financial data. The large language model can, based on the data analysis intent, data features, and the financial data to be analyzed, obtain the data analysis results, as well as the text of the data analysis reasoning process.
[0116] For the analysis scenarios mentioned above where the data cannot be accurately routed to the expert model, a preliminary screening and analysis of a portion of the data within the token length can be performed using a professional large-scale model in the field of data mining. This will identify key feature points in the data, and then the data can be mined using a feature extraction tool adapted to the output method of this professional large-scale model to obtain data features.
[0117] In this embodiment, a unified interactive intelligent agent enhances system compatibility and integration, reducing the interaction pressure caused by fragmented functions. Continuous optimization of model output across the entire chain ensures that modules work collaboratively in sequence, extracting key data information and efficiently alleviating the information overload problem of large models. Through guided prompting engineering and feedback intent mechanisms, user input is guided while confirming the analysis intent, avoiding the problem of insufficient human expertise with massive amounts of data. Furthermore, it supports flexible tuning of expert models, facilitating maintenance while accurately identifying the various types of analysis required by users. When no candidate data analysis model matching the data analysis intent exists, a preset data analysis model is used as the target data analysis model, improving robustness and ensuring the system possesses basic availability and fault tolerance. The end-to-end intelligent agent, with its data mining capabilities, expands business scenarios beyond the financial market risk domain, also demonstrating adaptability in areas such as customer-facing financial management.
[0118] Figure 6 This is a schematic diagram of the structure of a data analysis device provided in this application. Figure 6 As shown, the data analysis device 60 may include: an acquisition module 61 and a processing module 62.
[0119] The acquisition module 61 is used to acquire the financial data to be analyzed, as well as the user's initial instructions.
[0120] The processing module 62 is used to determine the data analysis intent based on the financial data to be analyzed and the first instruction; determine the target data analysis model from multiple candidate data analysis models based on the data analysis intent; extract features from the financial data to be analyzed through the target data analysis model to obtain the data features of the financial data to be analyzed; and obtain the data analysis results of the financial data to be analyzed based on the financial data to be analyzed, the data analysis intent, and the data features.
[0121] Optionally, the processing module 62 is specifically used to determine, from multiple candidate data analysis models, a candidate data analysis model that matches the data analysis intent based on the data analysis intent and the functional description text of the candidate data analysis model; and to use the candidate data analysis model that matches the data analysis intent as the target data analysis model.
[0122] Optionally, the processing module 62 is also used to respond to the situation where there is no candidate data analysis model that matches the data analysis intention among multiple candidate data analysis models, and to use the preset data analysis model as the target data analysis model.
[0123] Optionally, the processing module 62 is specifically used to extract key feature points from the target financial data in the financial data to be analyzed through a preset data analysis model, thereby obtaining the key feature points of the financial data to be analyzed; and to extract features from the financial data to be analyzed based on the key feature points through the preset data analysis model, thereby obtaining the data features of the financial data to be analyzed.
[0124] Optionally, the processing module 62 is also used to extract the key feature points of the target financial data in the financial data to be analyzed based on the number of word units in the financial data to be analyzed and the preset number of word units before obtaining the key feature points of the financial data to be analyzed by extracting key feature points of the target financial data through the preset data analysis model, and to extract the first preset number of word units in the financial data to be analyzed as the target financial data.
[0125] Optionally, the processing module 62 is specifically used to input the financial data to be analyzed and the first instruction into a multi-turn dialogue interaction model to obtain candidate analysis methods for the financial data to be analyzed; output the candidate analysis methods; obtain the user's second instruction, which is edited by the user based on the candidate analysis methods; and determine the data analysis intent based on the second instruction through the multi-turn dialogue interaction model.
[0126] Optionally, the processing module 62 is specifically used to construct target prompt words based on the financial data to be analyzed, the data analysis intent, and the data characteristics; the target prompt words are used to instruct the financial data to be analyzed to be analyzed based on the data analysis intent and the data characteristics; the target prompt words are input into the large language model to obtain the data analysis results.
[0127] Optionally, the processing module 62 is also used to respond to the data analysis mode being a deep data analysis mode, to obtain the data analysis reasoning process text, which describes the reasoning process of the large language model based on the target prompt words to obtain the data analysis results.
[0128] The data analysis device 60 provided in this application is used to execute the aforementioned data analysis method embodiments. Its implementation principle and technical effect are similar, and will not be described in detail here.
[0129] Figure 7 This is a schematic diagram of the hardware structure of an electronic device provided in this application. Figure 7 The illustrated electronic device 70 includes a memory 71, a processor 72, and a communication interface 73. The memory 71, processor 72, and communication interface 73 are communicatively connected to each other. For example, the memory 71, processor 72, and communication interface 73 can be connected via a network. Alternatively, the electronic device 70 may also include a bus 74. The memory 71, processor 72, and communication interface 73 are communicatively connected to each other via the bus 74. Figure 7 It is an electronic device 70 in which the memory 71, processor 72, and communication interface 73 are connected to each other via bus 74.
[0130] The memory 71 can be a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 71 can store programs, and when the program stored in the memory 71 is executed by the processor 72, the processor 72 and the communication interface 73 are used to execute the data analysis method described in any of the foregoing embodiments. The memory can also store data required by the data analysis method.
[0131] The processor 72 can be a general-purpose CPU, microprocessor, application-specific integrated circuit (ASIC), graphics processing unit (GPU), or one or more integrated circuits.
[0132] Processor 72 can also be an integrated circuit chip with signal processing capabilities. In implementation, the data analysis method of this application can be completed through the integrated logic circuits in the hardware of processor 72 or through software instructions. The aforementioned processor 72 can also be a general-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments below. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments below can be directly implemented by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory 71, and processor 72 reads the information in memory 71 and, in conjunction with its hardware, completes the data analysis method of this application.
[0133] Communication interface 73 uses transceiver modules, such as, but not limited to, transceivers, to enable communication between electronic device 70 and other devices or communication networks. For example, data sets can be acquired through communication interface 73.
[0134] When the aforementioned electronic device 70 includes a bus 74, the bus 74 may include a path for transmitting information between various components of the electronic device 70 (e.g., memory 71, processor 72, communication interface 73).
[0135] This application also provides a computer-readable storage medium, which may include various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk. Specifically, the computer-readable storage medium stores program instructions, which are used in the methods described in the above embodiments.
[0136] This application also provides a program product including executable instructions stored in a readable storage medium. At least one processor of an electronic device can read the executable instructions from the readable storage medium, and the at least one processor executes the executable instructions to cause the electronic device to implement the data analysis methods provided in the various embodiments described above.
[0137] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to this application.
[0138] It should be understood that the above-described device embodiments are merely illustrative, and the device of this application can also be implemented in other ways. For example, the division of units / modules in the above embodiments is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple units, modules, or components may be combined, or integrated into another system, or some features may be ignored or not executed.
[0139] The term "multiple" in this document refers to two or more. The term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. Furthermore, the character " / " in this document generally indicates an "or" relationship between the preceding and following related objects; in formulas, " / " indicates a "division" relationship. Additionally, it should be understood that in the description of this application, words such as "first" and "second" are used only for descriptive purposes and should not be construed as indicating or implying relative importance or order.
[0140] It is understood that the various numerical designations used in the embodiments of this application are merely for descriptive convenience and are not intended to limit the scope of the embodiments of this application.
[0141] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A data analysis method, characterized in that, The method includes: Obtain the financial data to be analyzed, as well as the user's initial instructions; Based on the financial data to be analyzed, and the first instruction, the data analysis intent is determined; Based on the stated data analysis intent, a target data analysis model is determined from multiple candidate data analysis models; The target data analysis model is used to extract features from the financial data to be analyzed, thereby obtaining the data features of the financial data to be analyzed. Based on the financial data to be analyzed, the data analysis intent, and the data characteristics, the data analysis results of the financial data to be analyzed are obtained.
2. The method according to claim 1, characterized in that, The step of determining the target data analysis model from multiple candidate data analysis models based on the data analysis intent includes: Based on the data analysis intent and the functional description text of the candidate data analysis model, determine the candidate data analysis model that matches the data analysis intent from the plurality of candidate data analysis models; The candidate data analysis model that matches the data analysis intent is taken as the target data analysis model.
3. The method according to claim 2, characterized in that, The method further includes: If, among the plurality of candidate data analysis models, there is no candidate data analysis model that matches the data analysis intent, a preset data analysis model is adopted as the target data analysis model.
4. The method according to claim 3, characterized in that, The step of extracting features from the financial data to be analyzed using the target data analysis model to obtain the data features of the financial data to be analyzed includes: Using the preset data analysis model, key feature points are extracted from the target financial data in the financial data to be analyzed, and the key feature points of the financial data to be analyzed are obtained. Using the preset data analysis model, based on the key feature points, feature extraction is performed on the financial data to be analyzed to obtain the data features of the financial data to be analyzed.
5. The method according to claim 4, characterized in that, Before extracting key feature points from the target financial data in the financial data to be analyzed using the preset data analysis model to obtain the key feature points of the financial data to be analyzed, the method further includes: Based on the number of lexical units in the financial data to be analyzed, and a preset number of lexical units, lexical units of the preset number of lexical units in the financial data to be analyzed are extracted as the target financial data.
6. The method according to any one of claims 1-5, characterized in that, The determination of data analysis intent based on the financial data to be analyzed and the first instruction includes: The financial data to be analyzed, and the first instruction, are input into a multi-turn dialogue interaction model to obtain candidate analysis methods for the financial data to be analyzed. Output the candidate analysis method; Obtain the user's second instruction, which is edited by the user based on the candidate analysis method; Based on the second instruction, the data analysis intent is determined using the multi-turn dialogue interaction model.
7. The method according to any one of claims 1-5, characterized in that, The process of obtaining the data analysis results of the financial data to be analyzed based on the financial data to be analyzed, the data analysis intent, and the data characteristics includes: Based on the financial data to be analyzed, the data analysis intent, and the data characteristics, target prompt words are constructed; the target prompt words are used to indicate that the financial data to be analyzed is analyzed based on the data analysis intent and the data characteristics. The target prompt words are input into the large language model to obtain the data analysis results.
8. The method according to claim 7, characterized in that, The method further includes: In response to the data analysis mode being set to deep data analysis mode, the data analysis reasoning process text is obtained. This text describes the reasoning process by which the large language model infers the data analysis result based on the target prompt word.
9. A data analysis device, characterized in that, The device includes: The acquisition module is used to acquire the financial data to be analyzed, as well as the user's initial instructions; The processing module is configured to: determine a data analysis intent based on the financial data to be analyzed and the first instruction; determine a target data analysis model from multiple candidate data analysis models based on the data analysis intent; extract features from the financial data to be analyzed using the target data analysis model to obtain data features of the financial data to be analyzed; and obtain a data analysis result of the financial data to be analyzed based on the financial data to be analyzed, the data analysis intent, and the data features.
10. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1 to 8.
12. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method of any one of claims 1 to 8.