Financial data processing method and device
By using an intent-entity joint identification model, the complexity of traditional financial analysis tools is solved, enabling non-financial professionals to quickly obtain financial information efficiently and accurately.
Patent Information
- Application Number
- CN202511668522.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-14
- Publication Date
- 2026-02-10
AI Technical Summary
Traditional financial analysis tools are complex, making it difficult for non-financial professionals to quickly obtain useful information, resulting in low efficiency.
An intent and entity joint recognition model is adopted. Word embedding vectors and sparse feature vectors are generated through word segmentation. Combined with attention-based deep learning layers and hierarchical attention networks, the model identifies intents and entities in financial data, performs processing actions, and generates results.
It improves the efficiency and accuracy of financial data processing, reduces the operational difficulty for non-financial professionals, and meets the needs of intelligent and efficient financial analysis.
Smart Images

Figure CN121503494A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of big data technology, and specifically to a financial data processing method and apparatus. Background Technology
[0002] Currently, enterprises have an ever-increasing demand for financial data analysis and decision-making. Traditional financial analysis tools are relatively complex and difficult to quickly obtain effective information. These financial tools are not user-friendly for non-financial professionals and are not efficient to use, for example, requiring manual setting of search terms and processing functions.
[0003] Therefore, a new method and apparatus for processing financial data is needed. Summary of the Invention
[0004] In view of the above problems, this application provides a more convenient and efficient method for processing financial data.
[0005] According to a first aspect of this application, a financial data processing method is provided, characterized in that the method includes: in response to receiving a question from a user regarding financial data, inputting the question into a feature recognition module of an intent-entity joint recognition model to determine a semantic feature vector of the question, wherein the intent-entity joint recognition model further includes an intent recognition module and an entity recognition module; inputting the semantic feature vector into the intent recognition module to obtain the intent of the question; inputting the semantic feature vector into the entity recognition module to obtain at least one entity in the question; determining a processing action for the financial data based on the intent and the at least one entity; and performing the processing action on the financial data to obtain a processing result.
[0006] According to an embodiment of this application, the step of determining the semantic feature vector of the question input intent and entity joint recognition model includes: generating word embedding vectors and sparse feature vectors based on the word units obtained by word segmentation of the question; inputting the word embedding vectors and sparse feature vectors into an attention-based deep learning layer to obtain initial attention features; and inputting the initial attention features into a hierarchical attention network to generate a semantic feature vector, wherein the semantic feature vector includes sentence-level and word-level attention features.
[0007] According to an embodiment of this application, the step of generating word embedding vectors and sparse feature vectors based on the word segments obtained from the word segmentation process of the problem includes: inputting the word segments into a word embedding model trained with a financial dictionary to generate word embedding vectors; and encoding the word segments to obtain sparse feature vectors.
[0008] According to an embodiment of this application, determining the intent of the question by inputting the semantic feature vector into the intent recognition module includes: generating intent features based on the semantic feature vector; comparing the semantic feature vector with a preset intent vector corresponding to at least one preset intent, determining a target preset intent that meets the similarity requirement, and using it as the intent of the question.
[0009] According to embodiments of this application, the method further includes: when the similarity between the semantic feature vector and the preset intent vector corresponding to at least one preset intent is less than a preset threshold, providing the user with an option for at least one preset intent; and in response to receiving a target preset intent selected by the user, using the target preset intent as the intent of the question.
[0010] According to an embodiment of this application, determining the processing action for the financial data based on the intent and the at least one entity includes: adding the entity to a dialogue slot according to a dialogue management model, and generating a current dialogue state by fusing the intent and historical dialogue states; and determining the processing action for the financial data based on the current dialogue state.
[0011] According to an embodiment of this application, the step of performing the processing action on the financial data to obtain the processing result includes: querying the financial data according to the query content in the processing action to obtain the query result, wherein the query content is determined based on the entity; and inputting the query result and the question into a large language model to obtain the processing result.
[0012] According to a second aspect of this application, a financial data processing apparatus is provided, characterized in that the apparatus comprises: a semantic feature vector determination module, configured to, in response to receiving a question posed by a user regarding financial data, input the question into a feature recognition module of an intent-entity joint recognition model to determine a semantic feature vector of the question, wherein the intent-entity joint recognition model further comprises an intent recognition module and an entity recognition module; an intent determination module, configured to input the semantic feature vector into the intent recognition module to obtain the intent of the question; an entity determination module, configured to input the semantic feature vector into the entity recognition module to obtain at least one entity in the question; a processing action determination module, configured to determine a processing action for the financial data based on the intent and the at least one entity; and a processing action execution module, configured to execute the processing action on the financial data to obtain a processing result.
[0013] A third aspect of this application provides an electronic device comprising: one or more processors; and a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the method described above.
[0014] A fourth aspect of this application also provides a computer-readable storage medium having a computer program or instructions stored thereon, which, when executed by a processor, implement the steps of the above-described method.
[0015] The fifth aspect of this application also provides a computer program product, including a computer program or instructions that, when executed by a processor, implement the steps of the above-described method. Attached Figure Description
[0016] The above-mentioned contents, other objects, features and advantages of this application will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:
[0017] Figure 1 The illustrations depict application scenarios of financial data processing methods, apparatuses, devices, media, and program products according to embodiments of this application.
[0018] Figure 2a A schematic diagram of an intent-entity joint identification model according to an embodiment of this application is shown;
[0019] Figure 2b A schematic diagram of a feature recognition module according to an embodiment of this application is shown;
[0020] Figure 2c A schematic diagram of an intent recognition module according to an embodiment of this application is shown;
[0021] Figure 3 A flowchart illustrating a financial data processing method according to an embodiment of this application is shown schematically.
[0022] Figure 4 A schematic diagram illustrating the processing of user input issues according to an embodiment of this application is shown;
[0023] Figure 5 This schematic diagram illustrates a structural block diagram of a financial data processing apparatus according to an embodiment of the present application;
[0024] Figure 6 A block diagram schematically illustrates an electronic device suitable for implementing a financial data processing method according to an embodiment of this application. Detailed Implementation
[0025] The embodiments of this application will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of this application. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of this application for ease of explanation. However, it will be apparent that one or more embodiments may be implemented without these specific details. Furthermore, descriptions of well-known structures and technologies are omitted in the following description to avoid unnecessarily obscuring the concepts of this application.
[0026] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0027] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0028] When using expressions such as "at least one of A, B and C", they should generally be interpreted in accordance with the meaning that is commonly understood by those skilled in the art (e.g., "a system having at least one of A, B and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B and C, etc.).
[0029] It should be noted that the financial data processing methods, apparatus, devices, media, and program products defined in this application can be used in the fields of big data technology and fintech, and can also be used in a variety of other fields besides those mentioned above. The application fields of the financial data processing methods, apparatus, devices, media, and program products provided in the embodiments of this application are not limited.
[0030] It should be noted that in the embodiments of this application, certain software, components, models and other existing solutions in the industry may be mentioned. These should be regarded as exemplary and are only intended to illustrate the feasibility of implementing the technical solution of this application. However, it does not mean that the applicant has used or necessarily used the solution.
[0031] In the technical solution of this application, the user information (including but not limited to user data, user personal information, user image information, user device information, such as location information) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved 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 related data all comply with relevant laws, regulations, and standards, and necessary measures have been taken to ensure that they do not violate public order and good morals. Corresponding operation entry points are provided for users to choose to authorize or refuse.
[0032] In scenarios involving automated decision-making using personal information, the methods, devices, and systems provided in this application all offer users corresponding entry points for choosing to agree to or reject the automated decision-making results. If the user chooses to reject, the process proceeds to the expert decision-making stage. Here, "automated decision-making" refers to the activity of automatically analyzing and evaluating an individual's behavioral habits, interests, or economic, health, and credit status through computer programs, and then making a decision. Here, "expert decision-making" refers to the activity of making decisions by personnel who specialize in a particular field, possess specialized experience, knowledge, and skills, and have reached a certain level of professional expertise.
[0033] Embodiments of this application provide a financial data processing method, apparatus, device, medium, and program product.
[0034] Figure 1 The illustrations depict application scenarios of financial data processing methods, apparatuses, devices, media, and program products according to embodiments of this application.
[0035] like Figure 1 As shown, application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 serves as a medium for providing a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.
[0036] Users can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 via the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc. (for example only).
[0037] The first terminal device 101, the second terminal device 102, and the third terminal device 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, laptops, and desktop computers.
[0038] Server 105 can be a server that provides various services, such as a backend management server that supports websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103 (this is just an example). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.
[0039] It should be noted that the financial data processing method provided in this application embodiment can generally be executed by server 105. Correspondingly, the financial data processing device provided in this application embodiment can generally be located in server 105. The financial data processing method provided in this application embodiment can also be executed by a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105. Correspondingly, the financial data processing device provided in this application embodiment can also be located in a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105.
[0040] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0041] To enable non-financial professionals to process financial data, this application constructs an intent-entity joint identification model (hereinafter referred to as the model). Users only need to provide input to the model, and the model will automatically process the input, including executing the financial data processing method of this application, to obtain the desired processing result.
[0042] The inputs users provide to the model express their intentions to manipulate financial data. Specific inputs can be questions, such as providing information on any anomalies within a month or the average debt growth rate over a year.
[0043] To parse user-input questions and accurately determine their intents and the entities they contain, this application constructs and trains a joint intent and entity recognition model. The entities included in the question are the relevant parameters for realizing the intent.
[0044] Figure 2aA schematic diagram of an intent-entity joint identification model according to one embodiment of this application is shown. Figure 2a As shown, the joint intent and entity recognition model 200 includes a feature recognition module 210, an intent recognition module 220, an entity recognition module 230, and an output module 240. The feature recognition module 210 processes the input question to obtain a semantic feature vector of the question. The intent recognition module 220 and the entity recognition module 230 share a common input, namely the semantic feature vector output by the feature recognition module 210. The intent recognition module 220 determines the intent of the question based on the semantic feature vector. The entity recognition module 230 determines at least one entity included in the question based on the semantic feature vector.
[0045] Intent recognition and entity extraction are two core tasks in natural language processing. Training separate models to perform these tasks fails to leverage the interrelationships between them, hindering overall performance optimization, resulting in poor performance and wasted computational resources. Therefore, this application proposes a joint intent and entity recognition model that can jointly train and utilize the feature recognition module. This allows the model to learn intent recognition while simultaneously leveraging relevant information acquired in entity extraction. This sharing helps the model better capture semantic relationships, improving the overall performance of both tasks. Furthermore, parameter sharing reduces model complexity, enhances robustness, and significantly improves model effectiveness.
[0046] Figure 2b A schematic diagram of a feature recognition module according to an embodiment of this application is shown. Figure 2b As shown, the feature recognition module 210 includes an initial feature vector generation module 211. The initial feature vector generation module 211 is used to generate word embedding vectors and sparse feature vectors based on the word segments obtained from the word segmentation process of the problem.
[0047] According to one implementation, word segmentation of a question can yield multiple word units. For example, after segmenting the question "Provide what abnormal data was generated within a month", the resulting word units include "provide", "one", "month", "within", "have", "which", "abnormal", and "data".
[0048] According to one embodiment, the feature recognition module 210 may include multiple initial feature vector generation modules, wherein each initial feature vector generation module can process one word simultaneously. For example, when the feature recognition module 210 includes three initial feature vector generation modules, multiple words such as "provide", "one", and "month" can be input into the three initial feature vector generation modules for processing respectively.
[0049] Each initial feature vector generation module 211 includes a sparse feature transformation layer 212, a first feedforward layer 213, a pre-trained embedding layer 214, and a second feedforward layer 215. The sparse feature transformation layer 212 and the pre-trained embedding layer 214 share the same input: word segments after word segmentation. After inputting word segments, the sparse feature transformation layer 212 encodes the word segments and maps them to sparse feature vectors, such as the first sparse feature vector. The first feedforward layer 213 performs a non-linear transformation on the first intermediate sparse feature vector to obtain the second sparse feature vector, enhancing the complexity of the feature representation and the model's learning ability. After inputting word segments, the pre-trained embedding layer 214 generates word embedding vectors using a word embedding model trained with a financial dictionary. This application pre-constructs a financial dictionary, which includes various financial terms specific to the financial field, and sets corresponding vectors for these terms. By using a word embedding model trained with a financial dictionary to generate word embedding vectors, this application helps the model better understand the semantics of words, making the generated word embedding vectors more accurate.
[0050] According to one embodiment of this application, if it is necessary to process data from other business domains, a relevant dictionary can be constructed for the other business domains, and a word embedding model can be trained based on the relevant dictionary to improve the feature mining and recognition capabilities of the joint intent and entity recognition model in that vertical domain.
[0051] According to one implementation, a first feedforward layer 213 generates a second sparse feature vector, and a pre-trained embedding layer 214 generates a word embedding vector. Subsequently, the second sparse feature vector and the word embedding vector are fused to obtain a first fused vector. The first fused vector is then input into a second feedforward layer 215 for nonlinear transformation to obtain a second fused vector. This step is performed on each input word to ensure that each word receives sufficient feature extraction.
[0052] According to one implementation, the second fusion vector generated from multiple lexical units is input together into an attention-based deep learning layer 216 to obtain initial attention features.
[0053] According to one implementation, the attention-based deep learning layer 216 can specifically be implemented as a transformer model. In this application, the attention-based deep learning layer 216 includes a 6-layer encoder and a 6-layer decoder. Each word in the input question is processed through the 6-layer encoder and 6-layer decoder, allowing the model to not only pay attention to the current word but also to words in other positions based on a self-attention mechanism. This enables the model to better understand contextual relationships, thereby enhancing its ability to represent text.
[0054] According to one implementation, the initial attention features are then input into a hierarchical attention network 217 to generate a semantic feature vector, which includes sentence-level and word-level attention features.
[0055] According to one implementation, a Hierarchical Attention Network (HAN) is a deep learning model for processing text data. It combines recurrent neural networks and attention mechanisms to effectively model and classify text. Its core idea is to utilize a hierarchical structure and attention mechanisms to progressively extract information from different levels of the text. HAN can employ a two-layer structure: word-level attention and sentence-level attention. At the word level, the attention mechanism automatically focuses on words that contribute significantly to the semantics of the sentence; at the sentence level, the attention mechanism highlights key sentences relevant to the topic in the document. In this way, HAN can effectively filter out important information, reduce the impact of noise and redundant information, and improve the model's performance and generalization ability. When HAN processes the initial attention features, the word-level attention layer calculates attention weights for each word vector in the sentence, representing the sentence as a weighted sum of word vectors; then, the sentence-level attention layer takes the sentence vectors as input and applies the attention mechanism again to obtain the document-level representation. This application, based on different levels of attention mechanisms, finds the most important input units, focusing on the words or characters most relevant to the task. HAN combines sentence-level and word-level attention to ensure that the model can capture important information in the text at multiple levels, thereby improving the performance of subsequent entity recognition and intent classification. According to one implementation, the intent recognition module 220 is used to determine the intent of the user-input question based on the semantic feature vector.
[0056] Figure 2c A schematic diagram of an intent recognition module according to an embodiment of this application is shown. Figure 2c As shown, the intent recognition module 220 may specifically include an embedding layer 221, a similarity calculation module 222, and an intent determination layer 223. The embedding layer 221 can map one or more preset intents from a preset intent list into vector representations, obtaining preset intent vectors corresponding to the preset intents. Subsequently, the similarity calculation module 222 calculates the similarity between the semantic feature vectors and each preset intent vector, obtaining multiple similarity scores.
[0057] According to one implementation, the intent determination layer 223 compares the semantic feature vector with a preset intent vector corresponding to at least one preset intent, and determines a target preset intent that meets the similarity requirement as the intent of the question. Meeting the similarity requirement includes having the highest similarity or a similarity greater than a preset threshold. At least one preset intent can be stored in a preset intent list, and the preset intent can be implemented as querying indicators, analyzing indicators, generating diagnostic reports, etc. This application does not limit the specific setting of the similarity requirement. By comparing similarity, this application can determine the most likely intent of the question, improving the accuracy and efficiency of the determined intent.
[0058] The intention determination layer 223 compares multiple similarities, determines the preset intention vector with the highest similarity to the semantic feature vector, and uses the target preset intention corresponding to the preset intention vector with the highest similarity as the intention of the question.
[0059] According to one implementation, the intention determination layer 223 can also preset a preset threshold in advance, determine at least one target similarity greater than the preset threshold among the multiple similarities, provide the target preset intention corresponding to the at least one target similarity for the user to select, and use the target preset intention selected by the user as the intention of the question.
[0060] According to one implementation, when the similarities between the semantic feature vector and the preset intention vectors corresponding to at least one preset intention are all less than the preset threshold, the intention determination layer 223 can also sort the multiple similarities according to their magnitudes, and provide the options of at least one preset intention corresponding to the largest at least one similarity to the user. In response to receiving the target preset intention selected by the user, the target preset intention is used as the intention of the question. In this application, when the similarities between the semantic feature vector and multiple preset intentions are all less than the preset threshold, options of at least one preset intention are provided to the user, so as to confirm the user's intention when the intention determined according to the question input by the user is relatively ambiguous, and improve the accuracy of the finally determined intention.
[0061] According to one implementation, the entity recognition module 230 is used to determine at least one entity included in the user input question according to the semantic feature vector.
[0062] According to one implementation, the entity recognition module 230 can be specifically implemented as a conditional random field. A conditional random field (CRF) is a sequence labeling model based on a probabilistic graphical model. The core is to model the joint probability of the output label sequence under the condition of a given input sequence. The conditional random field is suitable for processing entity recognition tasks and can consider the interdependence between labels under the condition of a given input sequence. Through the CRF, accurate entity recognition can be performed on each input token. For example, characters such as "gong" and "si" in the input are recognized as the "company" entity and the corresponding entity category is labeled. The CRF ensures that the model can generate a label sequence that conforms to semantic logic by learning the transition probabilities between labels. The CRF can effectively utilize context information for sequence labeling. By defining appropriate feature functions, lexical, syntactic, and semantic information in the text can be captured, improving the accuracy of labeling. In addition, different from some models based on local decisions, the CRF aims to find the global optimal solution during both the training and decoding processes. This makes it more stable and reliable when dealing with complex sequence labeling problems.
[0063] According to one embodiment, after the intent recognition module 220 determines the intent of the question and the entity recognition module determines at least one entity included in the question, the output module 240 can simultaneously or asynchronously output the intent corresponding to the question and at least one entity included in the intent.
[0064] According to one implementation, the constructed intent-entity joint recognition model can be trained using a training set. The training set includes multiple training samples, each containing a user-input question, the intent labeled in the question, and the entities labeled in the question. The parameters of each module in the intent-entity joint model are trained using the training set for subsequent invocation.
[0065] Figure 3 A flowchart illustrating a financial data processing method according to an embodiment of this application is shown.
[0066] like Figure 3 As shown, the financial data processing method 300 of this embodiment includes operations 310-350, and the financial data processing method can be executed in an electronic device.
[0067] First, operation 310 is executed. In response to receiving a question from the user regarding financial data, the question is input into the feature recognition module of the intent and entity joint recognition model to determine the semantic feature vector of the question. The intent and entity joint recognition model also includes an intent recognition module and an entity recognition module.
[0068] Secondly, operation 320 is executed to input the semantic feature vector into the intent recognition module to obtain the intent of the question;
[0069] Next, perform operation 330 to input the semantic feature vector into the entity recognition module to obtain at least one entity in the problem;
[0070] Subsequently, operation 340 is performed to determine the processing action for the financial data based on the intent and at least one entity;
[0071] Finally, operation 350 is executed to process the financial data and obtain the processing results. This application provides users with a joint intent and entity recognition model. Users only need to ask simple questions to instantly analyze the intents and entities contained within, and generate analysis results based on these intents and entities, greatly improving the efficiency and accuracy of financial statement interpretation. This application not only provides users with an efficient and convenient way to obtain financial information, but also significantly reduces the cost and time investment of enterprises in financial analysis, meeting the demand for intelligent and more efficient products. Furthermore, if intent recognition and entity extraction are trained separately to perform related tasks, the correlation between tasks cannot be utilized, resulting in low overall performance and poor results. This application adopts a joint intent and entity recognition model, using a shared feature extraction module to determine features for identifying intents and entities. This application uses a shared feature recognition module to help the model better capture the semantic correlation, improving the overall performance of both tasks. Moreover, parameter sharing reduces model complexity, enhances model robustness, and greatly improves the model's ability to recognize intents and entities.
[0072] According to one implementation, the semantic feature vector of the joint intent and entity recognition model is determined by the feature recognition module of the model by: generating word embedding vectors and sparse feature vectors based on the word segments obtained from word segmentation of the question; inputting the word embedding vectors and sparse feature vectors into an attention-based deep learning layer to obtain initial attention features; and inputting the initial attention features into a hierarchical attention network to generate semantic feature vectors. In the joint intent and entity recognition model of this application, the intent recognition module and the entity recognition module share the output of the feature recognition module, and through feature extraction at different levels, richer features in the question are obtained, improving the recognition effect of both tasks and reducing computational resource consumption.
[0073] According to one implementation, determining the processing action for financial data based on intent and at least one entity includes: adding the entity to a dialogue slot according to a dialogue management model, and generating a current dialogue state by fusing intent and historical dialogue states; and determining the processing action for the financial data based on the current dialogue state.
[0074] According to one implementation, this application can use a dialogue management model to receive user-input questions. After the dialogue management model receives the user-input questions, it invokes an intent and entity joint identification model, including: extracting core information from the user-input questions using the intent and entity joint identification model, including identifying the user's intent from the user-input questions and clarifying the user's core needs. Simultaneously, it extracts entities that match the intent; these are key parameters for realizing the intent. If an entity is missing, the dialogue management model will mark the missing entity to prepare for subsequent follow-up questions.
[0075] The core of the dialogue management model is maintaining the dialogue state, which records the current dialogue progress, acquired information, and unfulfilled needs. The dialogue management model extracts entities and fills them into the corresponding dialogue slots for the intent, then integrates relevant intents and historical dialogue states to generate the current dialogue state. If the intent is clear and the entities are complete, business logic is triggered, i.e., determining the processing action for financial data based on the current dialogue state. After executing the processing action, the model updates the dialogue state, marking the completion status of the current intent, and preparing for the next round of dialogue. This application, by filling in entities and integrating intents and historical dialogue states, can improve the accuracy of determining processing operations based on the problem.
[0076] According to one embodiment, the processing actions include operations such as querying, calculating, and editing financial data. This application does not limit the specific form of the processing actions.
[0077] According to one implementation, processing financial data to obtain processing results includes: querying the financial data based on the query content in the processing action to obtain query results, where the query content is determined based on the entity; and inputting the query results and the question into a large language model to obtain processing results. The processing action may include the query content, specifically search terms for querying financial data. The dialogue management model can retrieve financial data from the database based on the query content. After obtaining the query results, the dialogue management model can also call the large language model to process the financial data according to the processing action, satisfying the user's financial data processing intent and processing result format requirements included in the question. This application improves the accuracy and richness of the processing results information and enhances the user experience when performing financial processing by accurately manipulating financial data and integrating the query results and related information based on the large language model.
[0078] Figure 4 A schematic diagram illustrating the processing of user input issues according to an embodiment of this application is shown. Figure 4As shown, first, operation 410 is executed, inputting the user's question into the dialogue management model. Then, operation 420 is executed, where the dialogue management model invokes the intent and entity joint recognition model to vectorize the user's input question, obtaining a semantic feature vector. During this process, for example, if a set of text characters is input, these characters are converted into sparse feature vectors and word embedding vectors. For example, words or characters in the text such as "X", "company", etc., are represented independently and used as the initial input to the model. The purpose of this step is to extract basic features from the input text so that subsequent deep networks can further learn useful features. Then, based on the semantic feature vector, the intent of the question and at least one entity included are identified. The entity recognition result labels the entities in the question and returns the specific entity category (e.g., company, organization, location, etc.). The intent recognition result returns the user's intent, helping to understand what kind of operation the user might need and what their needs are (e.g., querying information, generating reports, etc.).
[0079] If the intent identified by the joint intent and entity recognition model is not clear enough, for example, if the similarity calculated based on the semantic feature vector and the preset intent is less than the preset threshold, then step 430 needs to be executed to confirm the ambiguous intent a second time and determine the user's true intent based on the user's answer.
[0080] If the intent identified by the joint intent and entity recognition model is clear, then step 440 is executed directly. The dialogue management model adds the entity to the dialogue slot and integrates the intent and historical dialogue state to generate the current dialogue state. Based on the current dialogue state, the processing action for the financial data is determined.
[0081] Finally, step 450 is executed to perform processing actions and obtain the results, such as querying financial statement data. Then, historical messages and financial statement data are input into the large language model, which generates the final answer.
[0082] This application employs a multi-layered model architecture for the joint intent and entity recognition model, enabling efficient completion of text entity recognition and intent classification tasks. Combining the Transformer model, attention mechanisms, and CRF not only enhances the model's context awareness but also strengthens its ability to handle different task types. During the training of the joint intent and entity recognition model, a large amount of intent recognition and entity extraction data is labeled in the financial statement analysis vertical domain, improving its vertical capabilities and resulting in a superior user experience in the field of intelligent financial analysis.
[0083] This application proposes a financial data processing method that combines semantic feature extraction, intent recognition and entity extraction, slot filling, dialogue management, financial data query and large model to generate the final response process. By combining a small model such as the intent and entity joint recognition model with a large language model, the efficiency and accuracy of financial statement interpretation are greatly improved, meeting the needs of enterprises for intelligent and efficient financial analysis.
[0084] Based on the above-described financial data processing method, this application also provides a financial data processing apparatus. The following will be combined with... Figure 5 The device is described in detail.
[0085] Figure 5 A schematic block diagram of a financial data processing apparatus according to an embodiment of this application is shown.
[0086] like Figure 5 As shown, the financial data processing apparatus 500 of this embodiment includes a semantic feature vector determination module 510, an intent determination module 520, an entity determination module 530, a processing action determination module 540, and a processing action execution module 550.
[0087] The semantic feature vector determination module 510 is used to respond to receiving a question from a user regarding financial data, by inputting the question into the feature recognition module of the intent and entity joint recognition model to determine the semantic feature vector of the question. The intent and entity joint recognition model also includes an intent recognition module and an entity recognition module. In one embodiment, the semantic feature vector determination module 510 can be used to perform step 310 described above, which will not be repeated here.
[0088] According to one implementation, the semantic feature vector determination module 510 includes a word embedding vector and coefficient feature vector generation module, used to generate word embedding vectors and sparse feature vectors based on the word units obtained by word segmentation of the problem; an initial attention feature generation module, used to obtain initial attention features by inputting the word embedding vectors and sparse feature vectors into an attention-based deep learning layer; and a semantic feature vector generation submodule, used to input the initial attention features into a hierarchical attention network to generate semantic feature vectors.
[0089] According to one implementation, the word embedding vector and coefficient feature vector generation module includes a word embedding vector generation module, which generates word embedding vectors by inputting word elements into a word embedding model trained with a financial dictionary; and a sparse feature vector generation module, which encodes word elements to obtain sparse feature vectors.
[0090] The intent determination module 520 is used to input the semantic feature vector into the intent recognition module to obtain the intent of the question. In one embodiment, the intent determination module 520 can be used to perform the operation 320 described above, which will not be repeated here.
[0091] According to one embodiment, the intent determination module 520 includes a comparison module for comparing a semantic feature vector with a preset intent vector corresponding to at least one preset intent, determining a target preset intent that meets the similarity requirement and using it as the intent of the question.
[0092] According to one embodiment, the intent determination module 520 further includes an option providing module, configured to provide the user with an option for at least one preset intent when the similarity between the semantic feature vector and the preset intent vector corresponding to at least one preset intent is less than a preset threshold; and an intent determination submodule, configured to, in response to receiving the target preset intent selected by the user, take the target preset intent as the intent of the question.
[0093] The entity determination module 530 is used to input semantic feature vectors into the entity recognition module to obtain at least one entity in the problem. In one embodiment, the entity determination module 530 can be used to perform the operation 330 described above, which will not be repeated here.
[0094] The processing action determination module 540 is configured to determine a processing action for the financial data based on the intent and the at least one entity. In one embodiment, the processing action determination module 540 may be used to perform the operation 340 described above, which will not be repeated here.
[0095] According to one embodiment, the processing action determination module 540 includes a current dialogue state generation module, used to add the entity to the dialogue slot according to the dialogue management model and generate the current dialogue state by fusing intent and historical dialogue state; and a processing action determination module, used to determine the processing action for financial data according to the current dialogue state.
[0096] The processing action execution module 550 is used to perform processing actions on financial data to obtain processing results. In one embodiment, the processing action determination module 550 can be used to execute the operation 350 described above, which will not be repeated here.
[0097] According to one embodiment, the processing action execution module 550 includes a query module for querying financial data based on the query content in the processing action to obtain query results, wherein the query content is determined based on the entity; and a processing result generation module for inputting the query results and the question into a large language model to obtain processing results.
[0098] According to embodiments of this application, any plurality of modules among the semantic feature vector determination module 510, intent determination module 520, entity determination module 530, processing action determination module 540, and processing action execution module 550 can be merged into one module, or any one of these modules can be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules can be combined with at least part of the functionality of other modules and implemented in one module. According to embodiments of this application, at least one of the semantic feature vector determination module 510, intent determination module 520, entity determination module 530, processing action determination module 540, and processing action execution module 550 can be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or any other reasonable means of integrating or packaging circuitry, or implemented in software, hardware, or firmware, or in any appropriate combination of any of these three implementation methods. Alternatively, at least one of the semantic feature vector determination module 510, intent determination module 520, entity determination module 530, processing action determination module 540, and processing action execution module 550 may be at least partially implemented as a computer program module, which can perform corresponding functions when the computer program module is run.
[0099] Figure 6 A block diagram schematically illustrates an electronic device suitable for implementing a financial data processing method according to an embodiment of this application.
[0100] like Figure 6 As shown, an electronic device 600 according to an embodiment of this application includes a processor 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage portion 608 into a random access memory (RAM) 603. The processor 601 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 601 may also include onboard memory for caching purposes. The processor 601 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of this application.
[0101] RAM 603 stores various programs and data required for the operation of electronic device 600. Processor 601, ROM 602, and RAM 603 are interconnected via bus 604. Processor 601 executes various operations of the method flow according to embodiments of this application by executing programs in ROM 602 and / or RAM 603. It should be noted that the programs may also be stored in one or more memories other than ROM 602 and RAM 603. Processor 601 may also execute various operations of the method flow according to embodiments of this application by executing programs stored in said one or more memories.
[0102] According to embodiments of this application, the electronic device 600 may further include an input / output (I / O) interface 605, which is also connected to a bus 604. The electronic device 600 may also include one or more of the following components connected to the input / output (I / O) interface 605: an input section 606 including a keyboard, mouse, etc.; an output section 607 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the input / output (I / O) interface 605 as needed. A removable medium 611, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 610 as needed so that computer programs read from it can be installed into the storage section 608 as needed.
[0103] This application also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs, which, when executed, implement the method according to the embodiments of this application.
[0104] According to embodiments of this application, the computer-readable storage medium can be a non-volatile computer-readable storage medium, such as including but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this application, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of this application, the computer-readable storage medium may include ROM 602 and / or RAM 603 and / or one or more memories other than ROM 602 and RAM 603 described above.
[0105] Embodiments of this application also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowchart. When the computer program product is run on a computer system, the program code is used to enable the computer system to implement the financial data processing method provided in the embodiments of this application.
[0106] When the computer program is executed by the processor 601, it performs the functions defined in the system / apparatus of this application embodiment. According to the embodiments of this application, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0107] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and downloaded and installed via the communication section 609, and / or installed from the removable medium 611. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.
[0108] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 609, and / or installed from the removable medium 611. When the computer program is executed by the processor 601, it performs the functions defined in the system of this application embodiment. According to the embodiments of this application, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0109] According to embodiments of this application, program code for executing the computer programs provided in the embodiments of this application can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C", or similar programming languages. The program code can be executed entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0110] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0111] Those skilled in the art will understand that the features described in the various embodiments of this application can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in this application. In particular, the features described in the various embodiments of this application can be combined and / or combined in various ways without departing from the spirit and teachings of this application. All such combinations and / or combinations fall within the scope of this application.
[0112] The embodiments of this application have been described above. However, these embodiments are merely illustrative and not intended to limit the scope of this application. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. Without departing from the scope of this application, those skilled in the art can make various substitutions and modifications, all of which should fall within the scope of this application.
Claims
1. A financial data processing method, characterized in that, The method includes: In response to receiving a user's question about financial data, the question is input into the feature recognition module of the intent and entity joint recognition model to determine the semantic feature vector of the question. The intent and entity joint recognition model also includes an intent recognition module and an entity recognition module. The semantic feature vector is input into the intent recognition module to obtain the intent of the question; The semantic feature vector is input into the entity recognition module to obtain at least one entity in the question; Based on the stated intent and the at least one entity, determine the processing action for the financial data; The processing action is performed on the financial data to obtain the processing result.
2. The method according to claim 1, characterized in that, The step of determining the semantic feature vector of the question by combining the question input intent with the entity joint recognition model includes: Based on the word segmentation process obtained from the problem, word embedding vectors and sparse feature vectors are generated; The initial attention features are obtained by inputting the word embedding vector and sparse feature vector into the attention-based deep learning layer; The initial attention features are input into a hierarchical attention network to generate semantic feature vectors.
3. The method according to claim 2, characterized in that, The word embedding vector and sparse feature vector generated by word segmentation of the problem include: The word embedding vectors are generated by using a word embedding model trained with a financial dictionary as input word units; The lexical units are encoded to obtain sparse feature vectors.
4. The method according to any one of claims 1-3, characterized in that, Determining the intent of the question by inputting the semantic feature vector into the intent recognition module includes: The semantic feature vector is compared with the preset intent vector corresponding to at least one preset intent to determine the target preset intent that meets the similarity requirement and use it as the intent of the question.
5. The method according to claim 4, characterized in that, The method further includes: If the similarity between the semantic feature vector and the preset intent vector corresponding to at least one preset intent is less than a preset threshold, the user is provided with an option for at least one preset intent. In response to receiving a user-selected target preset intent, the target preset intent is used as the intent of the question.
6. The method according to any one of claims 1-3, characterized in that, The step of determining the processing action for the financial data based on the intent and the at least one entity includes: The entity is added to the dialogue slot according to the dialogue management model, and the current dialogue state is generated by fusing the intent and the historical dialogue state. The processing action for the financial data is determined based on the current dialogue state.
7. The method according to any one of claims 1-3, characterized in that, The processing result obtained by performing the processing action on the financial data includes: The financial data is queried according to the query content in the processing action to obtain query results, wherein the query content is determined based on the entity; The query results and the question are input into a large language model to obtain the processing results.
8. A financial data processing device, characterized in that, The device includes: A semantic feature vector determination module is used to, in response to receiving a question from a user regarding financial data, input the question into the feature recognition module of the intent and entity joint recognition model to determine the semantic feature vector of the question. The intent and entity joint recognition model further includes an intent recognition module and an entity recognition module. An intent determination module is used to input the semantic feature vector into the intent recognition module to obtain the intent of the question; An entity determination module is used to input the semantic feature vector into the entity recognition module to obtain at least one entity in the question; A processing action determination module is used to determine a processing action for the financial data based on the intent and the at least one entity; The processing action execution module is used to perform the processing action on the financial data to obtain the processing result.
9. An electronic device, comprising: One or more processors; Memory, used to store one or more computer programs. The characteristic feature is that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1-7.
10. A computer-readable storage medium having a computer program or instructions stored thereon, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method according to any one of claims 1-7.
11. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method according to any one of claims 1-7.