Financial event analysis model training method, analysis method, equipment and storage medium

By introducing financial knowledge graphs and thought chain prompt templates into the training of large language models in the financial field, a fine-tuning dataset of instructions rich in reasoning logic is generated. The low-rank adaptive algorithm is then used for training, which solves the problems of shallow domain knowledge injection and uncontrollable reasoning logic, thereby improving the professionalism and analytical accuracy of the model.

CN121579668APending Publication Date: 2026-02-27WUHAN LANSHAN TECH CO LTD +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511388458.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-26
Publication Date
2026-02-27

AI Technical Summary

Technical Problem

Existing technologies for training large language models in the financial field suffer from shallow domain knowledge injection methods and uncontrollable model reasoning logic, making it difficult for the models to perform in-depth and reliable professional analysis.

Method used

By introducing financial domain knowledge graphs and thought chain prompt templates to augment the supervised dataset, an instruction fine-tuning dataset carrying reasoning processes is generated. A low-rank adaptive algorithm is then used for supervised fine-tuning training to generate a financial event analysis model rich in domain knowledge and with clear reasoning logic.

Benefits of technology

It significantly improves the model's professionalism, accuracy, interpretability, and output structure, solves the problems of shallow domain knowledge injection and uncontrollable model reasoning process, and achieves in-depth and reliable financial event analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121579668A_ABST
    Figure CN121579668A_ABST
Patent Text Reader

Abstract

The invention provides a training method and an analysis method of a financial event analysis model, equipment and a storage medium. According to the financial event analysis model training method provided by the invention, an original supervision data set is automatically enhanced by introducing a knowledge graph and a thinking chain prompt template, a high-quality instruction fine tuning data set containing clear reasoning logic is generated, and then fine tuning training of a base large language model is guided; according to the method, the technical problem that domain knowledge is injected into a shallow layer and the model reasoning process is uncontrollable is effectively solved, and the performance of the financial event analysis model obtained through final training in the aspects of specialty, accuracy, interpretability and output structuring degree is remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of natural language processing, and in particular to a financial event analysis model training method, an analysis method, a device and a storage medium. BACKGROUND

[0002] The financial domain large language model is represented as an artificial intelligence model with certain financial professional knowledge and term understanding ability obtained by further using professional text corpus in the financial field for supervised fine-tuning or continued pre-training based on a basic large language model obtained by pre-training on a large amount of general text.

[0003] In the related art, for the training of the financial domain large language model, there are defects of shallow field knowledge injection mode and uncontrollable model reasoning logic, which further leads to the technical problem that the trained model is difficult to perform deep and reliable professional analysis. SUMMARY

[0004] The present application aims to overcome the above technical deficiencies and provide a financial event analysis model training method, an analysis method, a device and a storage medium to solve the technical problem that in the related art, for the training of the financial domain large language model, there are defects of shallow field knowledge injection mode and uncontrollable model reasoning logic, which further leads to the technical problem that the trained model is difficult to perform deep and reliable professional analysis.

[0005] To achieve the above technical purpose, the present application adopts the following technical solution: In a first aspect, the present application provides a financial event analysis model training method, comprising: obtaining a pre-constructed financial domain knowledge graph; wherein the financial domain knowledge graph comprises financial entity nodes, event nodes and their associated sentiment attributes; obtaining a pre-labeled financial text supervision dataset; wherein the samples in the supervision dataset include financial event text and corresponding labeled information; based on the financial domain knowledge graph and a pre-constructed thought chain prompt template, performing data augmentation on the financial text supervision dataset to generate an instruction fine-tuning dataset carrying a reasoning process; wherein the thought chain prompt template is used to guide the model to perform step-by-step reasoning based on the knowledge in the financial domain knowledge graph; using the instruction fine-tuning dataset to perform supervised fine-tuning training on a pre-set base large language model to obtain a financial event analysis model.

[0006] Further, the step of performing data augmentation on the financial text supervision dataset based on the financial domain knowledge graph and the pre-constructed thought chain prompt template to generate an instruction fine-tuning dataset carrying a reasoning process comprises: For each sample in the financial text supervision data set, the following sub-steps are performed: According to the trigger word included in the sample, at least one sentiment knowledge triple associated with the trigger word is retrieved from the financial field knowledge graph; The retrieved sentiment knowledge triple, the financial event text of the sample, and the thinking chain prompt template are spliced to generate an enhanced input prompt; wherein the thinking chain prompt template includes instructions for guiding the model to observe, supplement knowledge, think, and derive conclusions; The enhanced input prompt is input into a preset data enhancement model, and an inference text including a step-by-step reasoning process output by the data enhancement model based on the enhanced input prompt is obtained; The inference text is used as an instruction, the financial event text of the sample and the retrieved sentiment knowledge triple are used as inputs, and the annotation information of the sample is used as an output to generate a training sample in the instruction fine-tuning data set.

[0007] Further, the step of using the instruction fine-tuning data set to supervise and fine-tune the preset base large language model to obtain a financial event analysis model comprises: Using the instruction fine-tuning data set and using a preset fine-tuning algorithm, a preset base large language model is supervised and fine-tuned; wherein the model parameters are optimized by minimizing the cross-entropy loss function during training.

[0008] Further, the preset fine-tuning algorithm is a low-rank adaptive algorithm; The minimized cross-entropy loss function is:

[0009] In the formula, is the size of the vocabulary, represents the value of the i-th position in the one-hot encoding representation of the true token. represents the predicted probability of the i-th position in the corresponding token predicted by the model.

[0010] In a second aspect, the present application provides a financial event analysis method, comprising: Receiving a user input financial event text; Performing similarity retrieval based on a pre-constructed vector knowledge base and the financial event text to obtain a corresponding knowledge fragment; wherein the vector knowledge base is obtained by performing vectorization processing on the financial field knowledge graph; Integrating the retrieved knowledge fragment with the user input financial event text to generate enhanced prompt information; The enhanced prompt information is input into the financial event analysis model to obtain structured financial event analysis results; wherein, the financial event analysis model is a financial event analysis model trained using the training method of any one of the financial event analysis models described in claims 1-4.

[0011] Furthermore, the step of performing similarity retrieval based on the pre-built vector knowledge base and the financial event text to obtain the corresponding knowledge fragments includes: Entity recognition is performed on the aforementioned financial event text to obtain the target entity; Encoding processing is performed on the target entity to obtain a query vector; The query vector is compared with the node vectors in the pre-built vector knowledge base to obtain the corresponding knowledge fragments.

[0012] Furthermore, the vector knowledge base is obtained by performing vectorization processing on the financial domain knowledge graph, including: A graph neural network model is used to perform vector embedding processing on the nodes in the financial domain knowledge graph to generate a corresponding vector representation for each node. The generated node vector representations and their identifiers are stored in a preset vector database to construct the vector knowledge base. The graph neural network model updates the node vector representations in the following way: for each target node in the financial domain knowledge graph, the vector representations of its neighboring nodes in the previous layer are aggregated to obtain an aggregated vector representation; the vector representation of the target node in the previous layer is concatenated with the aggregated vector representation to obtain a concatenated result; the concatenated result is multiplied by a learnable weight matrix and processed by a nonlinear activation function to obtain the vector representation of the target node in the current layer.

[0013] Furthermore, the graph neural network model updates the vector representation of the nodes using the following formula:

[0014] In the formula, This is represented as the target node identifier. For neighbor node identifiers, The set of neighbors of the target node. This is an index for the number of layers in a neural network. Neighboring nodes exist Layer vectors, For the target node exist Layer vectors, Aggregate results for neighbors Layer vectors, for The learnable weight matrix of the layer, is a non-linear activation function, AGGREGATE is an aggregation function, and CONCAT is a vector concatenation operation.

[0015] Thirdly, the present invention provides an electronic device, comprising: a memory, and one or more processors communicatively connected to the memory; the memory stores instructions executable by the one or more processors, the instructions being executed by the one or more processors to cause the one or more processors to implement the method described above.

[0016] Fourthly, the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.

[0017] Beneficial effects: The financial event analysis model training method provided by this invention automatically enhances the original supervised dataset by introducing a financial domain knowledge graph and a thought chain prompt template, generating a high-quality instruction fine-tuning dataset containing clear reasoning logic, which in turn guides the fine-tuning training of the base large language model. This method effectively solves the technical problems of shallow domain knowledge injection and uncontrollable model reasoning process, and significantly improves the performance of the finally trained financial event analysis model in terms of professionalism, accuracy, interpretability, and output structure. Attached Figure Description

[0018] Figure 1 This is one of the flowcharts illustrating a training method for a financial event analysis model provided in an embodiment of the present invention; Figure 2 This is a second schematic flowchart of a training method for a financial event analysis model provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of a financial knowledge graph provided in an embodiment of the present invention; Figure 4 This is the third flowchart illustrating a training method for a financial event analysis model provided in this embodiment of the invention; Figure 5 This is the fourth flowchart illustrating a training method for a financial event analysis model provided in this embodiment of the invention; Figure 6 This is a block diagram of an electronic device used in an embodiment of the present invention. Detailed Implementation

[0019] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0020] In related technologies, with the rapid development of natural language processing technology, intelligent analysis systems based on large language models (LLM) have become important tools for processing financial text data (such as news, announcements, and research reports).

[0021] In related technologies, the architecture of intelligent analysis systems can include a data layer, an algorithm layer, and an application layer. The data layer is responsible for storing financial domain knowledge (e.g., knowledge graphs) and text datasets; the core of the algorithm layer is a finely tuned large language model responsible for understanding the input text and generating analytical conclusions; the application layer provides the model's analysis results to end users in the form of interfaces or user interfaces to assist in investment decisions, risk monitoring, and other scenarios. However, in this system environment, related technologies have significant shortcomings in the core process of model training, which restricts the improvement of the final analysis results.

[0022] In related technologies, when fine-tuning general-purpose large language models for the financial domain, a common approach is to directly supervise the model's fine-tuning using manually labeled (financial event text - analysis results) samples. Alternatively, to incorporate domain knowledge, one possible approach is to simply concatenate relevant facts from a knowledge graph into the input text as plain text, and then let the model learn from it. These related technical approaches have significant difficulties and pain points: First, the domain knowledge injection method is too superficial. The model struggles to truly understand and internalize structured knowledge derived from simple text concatenation. The knowledge graph and model parameters fail to achieve deep integration, resulting in the learned knowledge remaining isolated and rigid, unable to be applied flexibly.

[0023] Secondly, the model's reasoning logic is uncontrollable and lacks guidance. The training process only focuses on whether the final output is correct, completely ignoring the internal reasoning process by which the model arrives at that conclusion. This makes the model a "black box," whose internal reasoning chain cannot be constrained or standardized, making it highly susceptible to factual errors or logical confusion (i.e., "illusions") when faced with complex financial logic, thus its output lacks reliability and interpretability.

[0024] In-depth analysis reveals that the root cause of the aforementioned technical problems lies in: The data construction methods used during the training phase are disconnected from the objectives. The training data for related technologies only provide "question-answer" pairs, without providing the "domain knowledge" and "reasoning logic" needed to arrive at the answers. The model is forced to explore and memorize shallow statistical patterns from the parameters, rather than learning a reusable, knowledge-based deep reasoning ability. This directly results in trained models with insufficient professional analytical capabilities, making them unsuitable for demanding financial event analysis tasks.

[0025] To address the aforementioned technical problems, the core inventive concept of this invention lies in enhancing training data by introducing knowledge graphs and thought chain prompt templates. This constructs a fine-tuning dataset rich in domain knowledge and with a clear reasoning process, guiding the training process of a large language model and thus solving the problems of shallow domain knowledge injection and uncontrollable model reasoning logic. Specifically, during the training phase, this invention combines structured knowledge from the knowledge graph with the generative capabilities of the large language model to automatically generate a large number of high-quality training samples in the format of "instruction (reasoning logic) - input (event + knowledge) - output (result)". This method forces the model to not only learn "what" during training but, more importantly, learn "why," thereby deeply internalizing domain knowledge into the model parameters in the form of reasoning logic, ultimately training an expert model capable of deep and reliable financial analysis.

[0026] like Figure 1 As shown, this embodiment provides a training method for a financial event analysis model, including: Step S12: Obtain a pre-constructed financial domain knowledge graph; wherein the financial domain knowledge graph includes financial entity nodes, event nodes and their associated sentiment attributes.

[0027] In this embodiment, the financial domain knowledge graph can be represented as a structured semantic knowledge base designed for financial sentiment analysis. The construction of this financial domain knowledge graph can be based on a predefined ontology layer and schema layer, and then filled with specific entities, attributes, and relationships through a data layer, thereby forming a structured knowledge base containing rich sentiment attributes.

[0028] Specifically, the ontology layer of the financial knowledge graph can define two main categories: emotion and vocabulary. Emotion nodes represent basic feelings or emotion categories, such as "joy," "disappointment," and "panic." Vocabulary nodes represent specific words, phrases, or terms in the financial field, such as "stock price increase," "resignation," and "increased holdings."

[0029] At the schema layer, detailed attributes are defined for the above categories. For lexical nodes, their attributes include at least: Part of speech, which is used to characterize the grammatical properties of a word, such as verb, noun, adjective, etc.; Emotional polarity is used to characterize the basic emotional tendency implied by a word, such as "positive," "negative," or "neutral." Emotional intensity, which is used to characterize the intensity of the emotion conveyed by a word in a quantitative value (e.g., a range of 0-10); The associated emotion category is used to characterize the more granular specific emotion category associated with the word, and can be associated with one or more "emotion category" nodes.

[0030] The construction of the data layer can be accomplished through a combination of automated information extraction technology and manual proofreading. The specific process may include: extracting financial terms as entities from massive amounts of financial text (e.g., financial news, company announcements, brokerage research reports) and financial dictionaries; subsequently, based on professional knowledge and annotation standards, labeling these terminology entities with the various sentiment attributes defined in the aforementioned pattern layer, forming a large number of sentiment terminology triples centered on (entity-attribute-attribute value); finally, storing these triples in a graph database (e.g., Neo4j) to form a large-scale financial sentiment knowledge graph.

[0031] In this embodiment, the financial entity node can be represented as a node in a financial knowledge graph that represents a specific object or subject participating in financial activities. The financial entity node represents a static financial entity with a clear denotation.

[0032] Specifically, the financial entity node may include: Institutional entities, such as specific commercial banks, securities companies, and listed companies, etc.

[0033] Individual figures, such as well-known corporate executives and economists.

[0034] Entities of financial products and instruments, such as specific stocks, bonds, funds, financial derivatives, etc.

[0035] In this embodiment, the event node can be represented as a node in a financial knowledge graph that represents a specific action, state change, or event occurring in the financial field. The event node represents dynamic financial activities that often have time attributes.

[0036] Specifically, the event node can include: corporate governance events, capital operation events, and operating performance events, etc.

[0037] In this embodiment, the associated sentiment attributes can be represented as non-independent nodes, but rather as weights / labels on attributes or edges, which are used to quantitatively or qualitatively describe the characteristics of financial entities or events that can trigger market sentiment responses.

[0038] Specifically, for an event node, its associated sentiment attributes directly describe the emotional tendency inherent in the event itself. For example, an event node of "executive resignation" can directly possess attributes such as sentiment polarity: negative, sentiment intensity: 7 (0-10 scale), and associated emotion: worry.

[0039] For financial entity nodes, their sentiment attributes can be expressed as the aggregation of sentiment attributes of events related to the entity (e.g., the average sentiment intensity of all events related to a company over a period of time), or the sentiment color of the entity's name as a word itself.

[0040] Therefore, in this embodiment, the financial domain knowledge graph organically integrates financial entity nodes, event nodes, and associated sentiment attributes into a unified graph structure, forming a complex knowledge network that can deeply represent the semantic and sentiment associations in the financial domain, providing rich and structured prior knowledge for subsequent in-depth analysis.

[0041] Step S14: Obtain a pre-annotated financial text supervision dataset; wherein the samples in the supervision dataset include financial event texts and corresponding annotation information.

[0042] In this embodiment, the pre-annotated financial text supervision dataset can be represented as a high-quality, structured dataset pre-built for training financial domain-specific analysis models.

[0043] In a specific implementation plan, a financial text supervision dataset can be pre-built and labeled in the following manner: First, data collection and preprocessing are crucial. Web crawling technology can be deployed to systematically and massively collect raw text data from multiple authoritative data sources (or publicly available datasets) using a series of core financial event triggers (e.g., "stock price," "resignation," "increased holdings," "share buybacks," "financial reports," etc.) as search terms. These data sources can cover mainstream financial portals, listed company announcements, and industry analysis reports and company research reports published by well-known securities firms or research institutions. Understandably, the collected raw text often includes a large amount of noise irrelevant to the analysis task; therefore, preprocessing procedures can be performed, such as removing HTML / XML tags, filtering advertising text, removing special and illegal characters, and performing text normalization (e.g., encoding standardization), resulting in clean and standardized text to be annotated.

[0044] Next, manual annotation is performed. Existing open-source annotation platforms can be used, where professional annotators with financial expertise can perform fine-grained reading and annotation of each preprocessed text. The core of annotation is to identify the financial events described in the text and annotate them with structured information according to predefined specifications. In the final supervised dataset, each sample corresponds to an annotated financial event, and its annotation information can be stored in the form of structured metadata.

[0045] In one specific implementation, the annotation information can be in a quintuple data format, which can include annotation fields in the following five dimensions: When a financial event is mentioned, it refers to a specific passage or sentence in the text that describes the event. Coarse-grained event classification, which is represented by the highest-level category to which the event belongs; Fine-grained event classification, which represents a more specific subclass of the event under the coarse classification; Trigger words are keywords or phrases in the text that best represent the occurrence of the event. Sentiment classification is the overall emotional tendency judgment conveyed by the event.

[0046] Step S16: Based on the financial domain knowledge graph and the pre-built thought chain prompt template, perform data augmentation on the financial text supervision dataset to generate an instruction fine-tuning dataset carrying the reasoning process; wherein, the thought chain prompt template is used to guide the model to perform step-by-step reasoning based on the knowledge in the financial domain knowledge graph.

[0047] In this embodiment, the thought chain prompt template can be represented as a pre-designed structured text template used to guide the large language model to simulate the reasoning patterns of human experts, that is, to analyze financial events according to the chain logic of "observation-knowledge supplementation-thinking-conclusion". This template will be applied to the data augmentation process to transform simple labeled data into high-quality training samples containing explicit reasoning processes. The template specifically defines the reasoning steps the model must follow and its output format.

[0048] In this embodiment, the mind chain prompt template may include: The Observation section guides the model to perform initial perception and fact extraction on the given financial event text. Its core task is to identify potential emotional representation elements or logical conflicts in the text. A typical instruction can be expressed as: "Observation: Carefully analyze the provided financial event text, identify the emotional cues expressed directly or implicitly, and determine whether there are emotional conflicts or inconsistencies in the text." The knowledge supplement instruction forces the model to transcend the limitations of the current text and actively invoke an external structured knowledge base—the aforementioned financial domain knowledge graph—as the background and basis for analysis. It explicitly requires the model to retrieve and incorporate sentiment knowledge related to trigger words or core entities in the text. A typical instruction could be expressed as: "Knowledge Supplement: Based on the financial sentiment knowledge graph, retrieve sentiment knowledge (including but not limited to sentiment polarity, sentiment intensity, and associated emotion categories) associated with key event trigger words or entities in the text, and use this knowledge as background information for subsequent reasoning." The "Thinking" section guides the model to integrate the findings from the first two steps (i.e., textual observations and external knowledge) and conduct in-depth, logically rigorous deductive analysis. It simulates the thought process of an expert weighing different pieces of evidence and arriving at a preliminary judgment. A typical instruction is: "Thinking: Combining the information obtained from your 'observations' and 'knowledge supplements,' proceed with step-by-step reasoning. If emotional conflict exists, analyze the weight and credibility of different emotional cues; based on the emotional attributes provided by the knowledge graph, determine which emotion best represents the final overall tendency of the event, and explain your reasoning logic." In conclusion, this instruction requires the model to provide a final structured judgment based on all the aforementioned reasoning steps. Its output format is strictly limited to ensure that the generated data can be used for supervised training.

[0049] In this embodiment, the instruction fine-tuning dataset can be represented as a high-quality, structured dataset specifically constructed for supervised fine-tuning of a large language model. Each sample in this dataset is no longer the original simple "input-output" pair, but has been reconstructed and enhanced into a standard "instruction-input-output" triple format. Its core feature is that the "instruction" part includes a complete, step-by-step reasoning process text generated by another language model based on a thought chain prompt template.

[0050] In one specific implementation, a single training sample in the instruction fine-tuning dataset can consist of three sub-modules: The instruction submodule can be a piece of natural language text whose content is not a simple task description, but a complete reasoning process for a specific input event, generated by an auxiliary large language model acting as a data augmenter based on the thought chain prompt template.

[0051] This text can be used to simulate the logical chain of "observation-knowledge supplementation-thinking-conclusion," and to demonstrate in detail the thought process of using external knowledge graphs to analyze current events and draw final conclusions.

[0052] For example, in a specific implementation plan, a generated instruction might be: "Observation: The text 'Company X announced huge losses' directly expresses a negative operating result. Knowledge Supplement: According to the knowledge graph, the emotional polarity of the trigger word 'loss' is 'negative,' with an intensity of 9. Reflection: The text statement is direct and clear, highly consistent with the knowledge graph information, and there is no emotional conflict. Conclusion: This event is classified as negative." The input submodule, which integrates specific contextual information to be analyzed, may further include: The original financial event text is a fragment of the original text describing a financial event, obtained from a supervised dataset.

[0053] Relevant graph knowledge refers to the relevant sentiment knowledge triples retrieved and extracted from the financial domain knowledge graph based on trigger words or core entities in the text. This knowledge can be inserted into the input in a structured form (e.g., JSON) or in the form of a natural language statement.

[0054] The output inherits the annotation information of the corresponding samples in the original supervised dataset, i.e., the structured quintuple conclusion. That is, it serves as the unique correct standard answer that the model needs to learn to generate given the "instructions" and "inputs".

[0055] Understandably, the final generated instruction fine-tuning dataset is a large-scale training sample set rich in explicit reasoning logic and structured domain knowledge. It is used to directly train the target model to learn to understand and follow complex instructions that "utilize external knowledge for multi-step reasoning," and on this basis, stably generate accurate structured analysis results in a preset format.

[0056] Step S18: Use the instruction fine-tuning dataset to perform supervised fine-tuning training on the preset base large language model to obtain the financial event analysis model.

[0057] In this embodiment, the base large language model can be a Qwen series model (e.g., Qwen2.5-7B, Qwen2.5-14B, Qwen2.5-72B, etc.), a ChatGLM series model, an LLaMA series model, etc.

[0058] The financial event analysis model training method provided in this embodiment automatically enhances the original supervised dataset by introducing a financial domain knowledge graph and a thought chain prompt template, generating a high-quality instruction fine-tuning dataset containing clear reasoning logic, which in turn guides the fine-tuning training of the base large language model. This method effectively solves the technical problems of shallow domain knowledge injection and uncontrollable model reasoning process, and significantly improves the performance of the finally trained financial event analysis model in terms of professionalism, accuracy, interpretability, and output structure.

[0059] In some implementations, the step of performing data augmentation on the financial text supervision dataset based on the knowledge graph and a pre-built thought chain prompt template to generate an instruction fine-tuning dataset carrying the reasoning process includes: For each sample in the financial text supervision dataset, perform the following sub-steps: Step S162: Based on the trigger words included in the sample, retrieve at least one sentiment knowledge triple associated with the trigger word from the financial domain knowledge graph.

[0060] In this implementation, the "trigger word" field already labeled in the current sample can be used as a query key. This key can then be used to query the pre-built financial domain knowledge graph (stored in graph databases such as Neo4j). The purpose of the query is to retrieve sentiment knowledge triples in the knowledge graph that use the trigger word as the "subject" or "core entity".

[0061] Step S164: The retrieved sentiment knowledge triplet, the financial event text of the sample, and the thought chain prompt template are concatenated to generate an enhanced input prompt; wherein, the thought chain prompt template includes instructions for guiding the model to observe, supplement knowledge, think, and derive conclusions.

[0062] In this embodiment, the aforementioned outputs can be spliced ​​and merged. The resulting enhanced input prompt is a complete and clearly defined text. It not only tells the data augmentation model "what to analyze" (event text and knowledge), but more importantly, it clearly instructs "how to analyze" (following the thought chain template), thereby strongly guiding the model to generate an output containing a logical chain in the desired format for this embodiment.

[0063] Step S166: Input the enhanced input prompt into a preset data augmentation model, and obtain the reasoning text output by the data augmentation model based on the enhanced input prompt, which includes a step-by-step reasoning process.

[0064] In this embodiment, the data augmentation model can also be a general large language model.

[0065] In this embodiment, after inputting the enhanced input prompt generated in the previous step into this model, the model can strictly follow the thought chain template instructions embedded in the prompt to perform step-by-step analysis and deduction on the given events and knowledge. Its final output reasoning text is a complete natural language discourse that simulates the expert's thought process, and it details each step of reasoning from observation to conclusion.

[0066] Step S168: Take the inference text as the instruction, take the financial event text of the sample and the retrieved sentiment knowledge triple as input, and take the labeled information of the sample as output to generate a training sample in the instruction fine-tuning dataset.

[0067] This implementation method transforms the original "input-output" samples into structured "instruction-input-output" triples through an automated process. Its beneficial effect is that by introducing knowledge graph retrieval and mind chain-guided automated reasoning text generation, labeled data is transformed into high-quality training samples rich in logical reasoning processes. This significantly improves the model's understanding of domain knowledge, the controllability of the reasoning process, and the structuredness and accuracy of the final analysis results in subsequent model fine-tuning.

[0068] In some implementations, the step of using the instruction fine-tuning dataset to perform supervised fine-tuning training on a preset base large language model to obtain a financial event analysis model includes: Step S182: Use the instructions to fine-tune the dataset and employ a preset fine-tuning algorithm to perform supervised fine-tuning training on the preset base large language model; wherein, during the training process, the model parameters are optimized by minimizing the cross-entropy loss function.

[0069] This implementation adopts a training paradigm that combines supervised fine-tuning with cross-entropy loss optimization, and introduces a parameter-efficient fine-tuning algorithm. Its advantages are that it can effectively utilize the instruction fine-tuning dataset rich in reasoning logic while significantly reducing computational resource consumption and overfitting risk. This allows the base large language model to stably learn the complex mapping relationship between input and structured output, and ultimately efficiently obtain a financial event analysis expert model that can deeply integrate domain knowledge, follow logical reasoning chains, and output highly accurate structured results.

[0070] In some implementations, the preset fine-tuning algorithm is a low-rank adaptive algorithm; The minimized cross-entropy loss function is:

[0071] In the formula, For vocabulary size, The value at the i-th position in the one-hot encoded representation of the real token; This represents the predicted probability of the i-th position in the corresponding token as predicted by the model.

[0072] This embodiment provides a financial event analysis method, including: Step S22: Receive the financial event text input by the user.

[0073] Step S24: Perform similarity retrieval based on the pre-built vector knowledge base and the financial event text to obtain the corresponding knowledge fragments; wherein, the vector knowledge base is obtained by performing vectorization processing on the financial domain knowledge graph.

[0074] Step S26: Integrate the retrieved knowledge fragments with the financial event text input by the user to generate enhanced prompt information; Step S28: Input the enhanced prompt information into the financial event analysis model to obtain structured financial event analysis results; wherein, the financial event analysis model is a financial event analysis model trained using the above-mentioned training method for a financial event analysis model.

[0075] In some implementations, the step of performing similarity retrieval based on a pre-built vector knowledge base and the financial event text to obtain corresponding knowledge fragments includes: Step S242: Perform entity recognition on the financial event text to obtain the target entity.

[0076] In this embodiment, a named entity recognition algorithm can be used to automatically analyze and process the received financial event text.

[0077] Step S244: Perform encoding processing on the target entity to obtain the query vector.

[0078] In this implementation, a text encoder model (e.g., a pre-trained deep learning model such as Sentence-BERT or BERT) can be invoked to process each identified target entity string. This text encoder model can map variable-length text input into a fixed-length, high-dimensional dense vector (i.e., the query vector). This vector represents the deep semantic features of the target entity in the vector space. Through this encoding process, entities with similar semantics will have their corresponding vectors close in space, while entities with significant semantic differences will have their vectors far apart.

[0079] Step S246: Perform a similarity search between the query vector and the node vectors in the pre-built vector knowledge base to obtain the corresponding knowledge fragments.

[0080] In this implementation, the top-K most similar nodes can be identified by calculating the similarity between the query vector and all node vectors in the vector knowledge base (cosine similarity or inner product can be used as the metric). Then, based on the identifiers of the most similar nodes, the complete knowledge fragments (i.e., structured information such as node attributes and relationships) corresponding to these most similar nodes are retrieved from the original knowledge graph database (Neo4j).

[0081] This implementation combines entity recognition, vector encoding, and similarity retrieval. Its advantages lie in its ability to accurately extract key entities from user-input financial event text as retrieval anchors, and to transform the semantic matching problem into an efficient high-dimensional space nearest neighbor search using vectorized representation. This allows for the rapid and accurate identification of the most relevant knowledge fragments from massive amounts of knowledge, providing a reliable and efficient knowledge supply guarantee for subsequent enhanced prompts and in-depth analysis.

[0082] In some implementations, the vector knowledge base is obtained by performing vectorization processing on the financial domain knowledge graph, including: A graph neural network model is used to perform vector embedding processing on the nodes in the financial domain knowledge graph, generating a corresponding vector representation for each node.

[0083] In this embodiment, the graph neural network model can be a graph convolutional network (GCN), a graph attention network (GAT), a relational graph convolutional network (R-GCN), etc.

[0084] The generated node vector representations and their identifiers are stored in a preset vector database to construct the vector knowledge base. The graph neural network model updates the node vector representations in the following way: for each target node in the knowledge graph, the vector representations of its neighboring nodes in the previous layer are aggregated to obtain an aggregated vector representation; the vector representation of the target node in the previous layer is concatenated with the aggregated vector representation to obtain a concatenated result; the concatenated result is multiplied by a learnable weight matrix and processed by a nonlinear activation function to obtain the vector representation of the target node in the current layer.

[0085] In some implementations, the graph neural network model updates the vector representation of the nodes using the following formula:

[0086] In the formula, This is represented as the target node identifier. For neighbor node identifiers, The set of neighbors of the target node. This is an index for the number of layers in a neural network. Neighboring nodes exist Layer vectors, For the target node exist Layer vectors, Aggregate results for neighbors Layer vectors, for The learnable weight matrix of the layer, is a non-linear activation function, AGGREGATE is an aggregation function, and CONCAT is a vector concatenation operation.

[0087] In one specific implementation plan, a financial event analysis method and system that integrates knowledge graphs and large language models is provided.

[0088] In today's information-driven financial markets, massive amounts of textual data, such as financial news, company announcements, industry research reports, and social media discussions, contain key information that influences market dynamics. The rapid, accurate capture and in-depth analysis of this information are crucial for effective investment decisions, risk warnings, and public opinion monitoring.

[0089] Existing financial text analysis methods have many limitations. Early keyword- or rule-based methods, while simple to implement, cannot handle complex semantics and contextual relationships, and are prone to misjudgments. In recent years, artificial intelligence technologies, represented by large language models, have demonstrated powerful text understanding capabilities, but when directly applied to the financial field, they still face two major challenges: First, the "knowledge gap"—general-purpose large language models lack in-depth and accurate financial domain knowledge, and when faced with professional terminology and complex financial logic, the analysis results often remain superficial, and may even produce "illusionary" content that contradicts the facts; second, "static knowledge"—the model's knowledge is stored in its parameters, which are updated lagging behind and cannot keep up with the ever-changing dynamics of the financial market in real time.

[0090] To compensate for the lack of specialized knowledge in large language models, some research has introduced knowledge graphs. Knowledge graphs can store massive amounts of accurate financial entities and relationships in a structured manner. However, how to efficiently and organically combine the static, structured knowledge of knowledge graphs with the dynamic, generative reasoning capabilities of large language models remains an unresolved challenge. Simple concatenation or independent queries cannot achieve deep integration of the two, resulting in the model's inability to flexibly access the most relevant knowledge during reasoning. Therefore, there is an urgent need for a novel method that can optimize knowledge representation, enhance the model's domain capabilities, and achieve dynamic knowledge injection to improve the accuracy, depth, and timeliness of financial event analysis.

[0091] First, the technical terms in this implementation plan will be explained and clarified: Knowledge Graph (KG): A technique that uses graph structures to model the relationships between knowledge and entities; it is a structured semantic knowledge base.

[0092] GraphSAGE: An inductive learning framework for processing large-scale graph data, which generates embedded representations of target nodes by sampling and aggregating features of neighboring nodes.

[0093] Qwen2.5-7B: A large-scale language model developed by Alibaba Group, possessing powerful text understanding and generation capabilities.

[0094] Retrieval-Augmented Generation (RAG): A technical framework that combines information retrieval systems with generative models to obtain relevant information from external knowledge sources before generating answers.

[0095] Faiss: A high-performance similarity search library developed by Facebook AI for retrieving data from large-scale vector sets.

[0096] Chain-of-Thought (CoT): A prompting engineering technique that enhances the ability of models to solve complex problems by guiding them to demonstrate their reasoning steps.

[0097] See Figure 2 This implementation plan provides a financial event analysis method that integrates knowledge graphs and large language models, including the following steps: Step 1: Financial data collection and annotation to build a supervisory dataset.

[0098] This step aims to prepare high-quality, labeled financial event data for model fine-tuning. The preferred implementation method in the example includes the following sub-steps: Step 1.1: Data Acquisition and Preprocessing. Using web crawling technology, financial texts were collected in batches from major financial portals, listed company announcements, and brokerage research reports, using trigger words for financial events such as "stock price" and "resignation" as themes. The collected raw texts were then cleaned to remove HTML tags, advertisements, illegal characters, and other noise.

[0099] Step 1.2: Build an annotation platform and perform manual annotation. Establish a visual data annotation platform. Professional annotators will annotate the cleaned text to form structured five-tuple data: {Financial event mention, coarse-grained event category, fine-grained event category, trigger word, sentiment category (negative, positive, neutral)}. For example, the text "Breaking News: Due to personal reasons, XXX announces his resignation as CEO of the company." can be annotated as: {Main event category: "Personnel Change", Sub-event category: "Resignation", Trigger word: "Resignation", Sentiment category: "Negative"}.

[0100] Step 2: Construct a domain knowledge graph.

[0101] This step aims to build a knowledge graph specifically for the financial field, containing rich emotional attributes, to provide accurate domain knowledge for subsequent data augmentation and model inference.

[0102] See Figure 3 The construction of knowledge graphs is divided into different levels: Ontology and Schema Layer Definitions: First, the top-level structure of the knowledge graph is defined. The ontology layer contains two basic categories: sentiment and lexical. The schema layer defines specific attributes for these categories. For example, "lexical" nodes have attributes such as "part of speech," "sentiment polarity," "sentiment intensity," and "associated sentiment category."

[0103] Data layer entity and relation filling: Utilizing automated information extraction technology combined with manual proofreading, financial vocabulary entities are extracted from massive amounts of financial texts and professional dictionaries. Then, sentiment annotation is performed on these financial vocabulary entities to form sentiment vocabulary triples.

[0104] Step 3: Vectorize the knowledge graph.

[0105] This step aims to transform the structured knowledge graph constructed in step 2 into a dense vector representation, facilitating subsequent rapid retrieval and integration with large language models. The preferred proposed solution is: The GraphSAGE graph neural network model is used to embed vectors into each word node in the knowledge graph.

[0106] Its core neighbor aggregation and update formula is:

[0107] in, For nodes In the Vector representation of layers, For nodes The set of neighboring nodes, where AGGREGATE is the aggregation function and CONCAT is the vector concatenation operation. The weight matrix is ​​a learnable matrix. This is a non-linear activation function. Using this model, a fixed high-dimensional vector is generated for each node in the knowledge graph, and the vectors of all nodes and their IDs are stored in the Faiss vector database, constructing a vector knowledge base capable of high-speed similarity retrieval. Specifically, It is represented as a node In the Vector representation of a layer ( It is a node (neighboring nodes), This represents the learnable weight matrix of the k-th layer. Let N(u) be the vector representation of the set of neighboring nodes of node u after aggregation at the k-th layer.

[0108] Step 4: Data augmentation based on knowledge graphs and thought chains.

[0109] This step aims to leverage the existing knowledge graph and financial event quintuple dataset to generate a high-quality instruction fine-tuning dataset containing explicit reasoning processes through mind chain prompting engineering, thereby training the model to learn how to perform deep analysis using background knowledge.

[0110] See Figure 4 The specific implementation of this process is as follows: Design a thought process chain prompt template: Design a template to guide the model in "observation-thinking-conclusion" reasoning, using chain thinking to prompt the model how to use sentiment knowledge in a knowledge graph to analyze the current financial event. Observation: Does the text contain sentiment conflict or inconsistencies in sentiment? Knowledge Supplement: Use existing sentiment knowledge from the financial sentiment knowledge graph as the sentiment background. Thinking: If sentiment conflict exists, what is the relationship between the sentiment in the first half and the sentiment in the second half? Analyze the sentiment knowledge in the knowledge graph to determine which sentiment better represents the final sentiment. Conclusion: Based on observation and thinking, the event is classified as {negative / neutral / positive}.

[0111] Generate Enhanced Data: For each labeled data point in Step 1, knowledge related to the "trigger words" or core entities in the data is first retrieved from the vector knowledge base in Step 3. Then, the original event text, the retrieved knowledge graph facts, and the thought chain prompt template are integrated into a complete input, which is then fed into a powerful basic large language model. The model generates a detailed text containing the analysis process based on the prompts. It should be noted that this is not a direct concatenation, but a structured integration according to the logical structure of "original event text + retrieved knowledge graph facts + thought chain prompt template," forming a complete input containing "input context (event + knowledge graph knowledge) and reasoning guidance (thought chain template)." Through clear module division (input layer, guidance layer), the large language model can clearly identify the material to be analyzed and the reasoning requirements, thereby obtaining a high-quality output containing a complete analysis process.

[0112] The specific process is as follows: use a high-performance model and high-quality input to obtain a high-quality output, thereby fine-tuning the base model.

[0113] Constructing "instruction-input-output" question-answer pairs: The original events and retrieved knowledge are used as "input", the thought chain reasoning process is used as "instruction", and the structured results marked in step 1 are used as "output", together forming a high-quality fine-tuning data.

[0114] Original input: Text "Due to personal reasons, XXX announces his resignation as CEO of the company." KG knowledge "{word: resignation, emotion category: disappointment, emotional polarity: negative, emotional intensity: 7}".

[0115] Reasoning process: "Observation: Are there any emotional conflicts or inconsistencies in the emotions presented in the text? Knowledge supplement: The existing financial sentiment knowledge graph serves as the emotional background. Reflection: What is the relationship between the emotions in the first half and the emotions in the second half? Which emotion is more representative of the final emotion? Conclusion: This event is classified as negative / neutral / positive." Enhanced training data: The text of the above "observation-thinking-conclusion" reasoning process is combined with the original text as new input for the next step of model fine-tuning.

[0116] Specifically, such as Figure 3 The diagram illustrates the generation process of instruction fine-tuning data samples provided in this embodiment of the invention. The diagram clearly shows the entire process of transforming the original financial event quintuple dataset into a high-quality instruction fine-tuning dataset for training financial event analysis models by combining it with knowledge graph and thought chain technologies. The process begins with the financial event quintuple dataset, which includes manually labeled structured data. Each sample includes at least five dimensions of label information: financial event mention, event category (main class), event subclass, trigger words, and sentiment classification. This dataset serves as the foundational material for subsequent data augmentation.

[0117] The left side of the workflow displays the knowledge supply from the Neo4J graph database. Specifically, the system uses the trigger word in the quintuple data as the core key to query the financial sentiment knowledge graph stored in Neo4J, retrieving rich financial vocabulary and its sentiment knowledge (e.g., sentiment polarity, sentiment intensity, associated emotions, etc.) associated with the trigger word. This knowledge is obtained in a structured form.

[0118] The core of the process demonstrates the construction paradigm of the fine-tuned dataset. Retrieved graph knowledge is combined with the original financial event text to form the enhanced Input section, providing the model with ample analytical context. The Instruction section is generated through a thought chain derivation process; it is a natural language text guiding the model through step-by-step reasoning, following a logical chain of "observation-knowledge supplementation-thinking-conclusion," detailing how to utilize the information in the input for analysis. The Output section directly uses the labeled information from the quintuple dataset, but its content is expanded and refined. It not only includes basic labels such as event main class, event subclass, sentiment classification, and trigger words, but also further incorporates deeper analytical results, such as sentiment percentages (i.e., the distribution of different sentiment types) and other richer structured information.

[0119] Ultimately, the large number of training samples consisting of (Instruction, Input, Output) triplets generated through the above process are used for supervised fine-tuning of the financial event analysis model. By learning and internalizing the reasoning logic and domain knowledge contained in these samples, the model eventually gains the ability to receive user input and automatically output in-depth, structured analysis reports.

[0120] Step 5: Model fine-tuning.

[0121] This step aims to transform the general-purpose big language model into an expert model proficient in financial analysis.

[0122] Qwen2.5-7B was selected as the base large language model, and the enhanced instruction dataset generated in step 4 was used for training via supervised fine-tuning. Efficient parameter fine-tuning techniques such as LoRA (Low-Rank Adaptation) were combined to save computational resources. The training process was optimized using the cross-entropy loss function, the formula of which is:

[0123] in, For vocabulary size, A one-hot encoded representation of the real token. Let be the probability of the corresponding token predicted by the model. By minimizing this loss function, the model learns to stably generate JSON analysis results in a preset format based on inputs containing background knowledge and reasoning logic. Specifically, yi represents the value at the i-th position in the one-hot encoded representation of the real token. This represents the predicted probability of the i-th position in the corresponding token, as predicted by the model. One is the actual value, and the other is the predicted probability.

[0124] Step 6: RAG-based enhancement analysis and output.

[0125] This step describes how, in a practical application, the system receives user input and generates the final analysis report.

[0126] See Figure 5 When a user inputs a text segment of a financial event to be analyzed, the system's reasoning process is as follows: Step 6.1, Entity Recognition and Vector Query. The system first performs core entity recognition on the input text. Then, these entities are encoded into query vectors.

[0127] Step 6.2, Knowledge Retrieval. Using query vectors, perform efficient similarity retrieval in the Faiss vector library constructed in Step 3 to find the most relevant knowledge graph nodes.

[0128] Step 6.3: Dynamically Enhance Input Prompts. Integrate the retrieved relevant knowledge with the user's original input text to dynamically construct a more informative and enhanced input prompt.

[0129] Step 6.4, Model Inference and Structured Output. Input the enhanced hint into the financial event analysis model fine-tuned in Step 5. After in-depth analysis, the model generates and outputs structured JSON results. For example: {"type":"Stock Transaction", "subtype":"Stock Price Increase", "trigger":"Increase", "classification": "Positive", "emotion_distribution": [{"emotion":"Joy", "percentage": "70%"}, {"emotion":"Happy", "percentage": "30%"}]}.

[0130] According to an embodiment of the present invention, an electronic device is provided; please refer to... Figure 6 The electronic device in this embodiment may include one or more of the following components: a processor, a network interface, memory, non-volatile memory, and one or more application programs, wherein the one or more application programs may be stored in non-volatile memory and configured to be executed by one or more processors, and the one or more programs are configured to perform the methods as described in the foregoing method embodiments.

[0131] According to embodiments of the present invention, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a computer, causes the computer to perform the method described in any of the above embodiments.

[0132] According to embodiments of the present invention, a computer program product comprising instructions is also provided, which, when executed by a computer, cause the computer to perform a method in any of the above embodiments.

[0133] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0134] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments, and will not be repeated here.

[0135] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0136] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0137] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A training method for a financial event analysis model, characterized in that, include: Obtain a pre-constructed knowledge graph in the financial field; wherein the knowledge graph includes financial entity nodes, event nodes, and their associated sentiment attributes; Obtain a pre-labeled financial text supervision dataset; wherein, the samples in the supervision dataset include financial event texts and corresponding annotation information; Based on the financial domain knowledge graph and the pre-built thought chain prompt template, the financial text supervision dataset is augmented to generate a fine-tuning dataset with instructions carrying the reasoning process; wherein, the thought chain prompt template is used to guide the model to reason step by step based on the knowledge in the financial domain knowledge graph; The financial event analysis model is obtained by using the instruction fine-tuning dataset to conduct supervised fine-tuning training on the preset base large language model.

2. The training method according to claim 1, characterized in that, The step of augmenting the financial text supervision dataset based on the financial domain knowledge graph and pre-built thought chain prompt templates to generate an instruction fine-tuning dataset carrying the reasoning process includes: For each sample in the financial text supervision dataset, perform the following sub-steps: Based on the trigger words included in the sample, at least one sentiment knowledge triple associated with the trigger word is retrieved from the financial domain knowledge graph; The retrieved sentiment knowledge triplet, the financial event text of the sample, and the thought chain prompt template are concatenated to generate enhanced input prompts; wherein, the thought chain prompt template includes instructions for guiding the model to observe, supplement knowledge, think, and derive conclusions; The enhanced input prompt is input into a preset data augmentation model, and the reasoning text, which includes a step-by-step reasoning process, is obtained by the data augmentation model based on the enhanced input prompt. The inference text is used as an instruction, the financial event text of the sample and the retrieved sentiment knowledge triple are used as input, and the labeled information of the sample is used as output to generate a training sample in the instruction fine-tuning dataset.

3. The training method according to claim 1, characterized in that, The step of using the instruction fine-tuning dataset to perform supervised fine-tuning training on the preset base large language model to obtain the financial event analysis model includes: The dataset is fine-tuned using the instructions, and a pre-defined fine-tuning algorithm is used to perform supervised fine-tuning training on a pre-defined base large language model; wherein, during the training process, the model parameters are optimized by minimizing the cross-entropy loss function.

4. The training method according to claim 3, characterized in that, The preset fine-tuning algorithm is a low-rank adaptive algorithm; The minimized cross-entropy loss function is: In the formula, For vocabulary size, The value at the i-th position in the one-hot encoded representation of the real token; This represents the predicted probability of the i-th position in the corresponding token as predicted by the model.

5. A financial event analysis method, characterized in that, include: Receive text of financial events input by the user; Similarity retrieval is performed based on a pre-built vector knowledge base and the financial event text to obtain corresponding knowledge fragments; wherein, the vector knowledge base is obtained by performing vectorization processing on the financial domain knowledge graph; The retrieved knowledge fragments are integrated with the financial event text input by the user to generate enhanced prompts. The enhanced prompt information is input into the financial event analysis model to obtain structured financial event analysis results; wherein, the financial event analysis model is a financial event analysis model trained using the training method of any one of the financial event analysis models described in claims 1-4.

6. The financial event analysis method according to claim 5, characterized in that, The step of performing similarity retrieval based on a pre-built vector knowledge base and the financial event text to obtain corresponding knowledge fragments includes: Entity recognition is performed on the aforementioned financial event text to obtain the target entity; Encoding processing is performed on the target entity to obtain a query vector; The query vector is compared with the node vectors in the pre-built vector knowledge base to obtain the corresponding knowledge fragments.

7. The financial event analysis method according to claim 5, characterized in that, The vector knowledge base is obtained by performing vectorization processing on the financial domain knowledge graph, including the following steps: A graph neural network model is used to perform vector embedding processing on the nodes in the financial domain knowledge graph to generate a corresponding vector representation for each node. The generated node vector representations and their identifiers are stored in a preset vector database to construct the vector knowledge base. The graph neural network model updates the node vector representations in the following way: for each target node in the financial domain knowledge graph, the vector representations of its neighboring nodes in the previous layer are aggregated to obtain an aggregated vector representation; the vector representation of the target node in the previous layer is concatenated with the aggregated vector representation to obtain a concatenated result; the concatenated result is multiplied by a learnable weight matrix and processed by a nonlinear activation function to obtain the vector representation of the target node in the current layer.

8. The financial event analysis method according to claim 7, characterized in that, The graph neural network model updates the vector representation of the nodes using the following formula: In the formula, This is represented as the target node identifier. For neighbor node identifiers, The set of neighbors of the target node. This is an index for the number of layers in a neural network. For neighboring nodes exist Layer vectors, For the target node exist Layer vectors, Aggregate results for neighbors in Layer vectors, for The learnable weight matrix of the layer, is a non-linear activation function, AGGREGATE is an aggregation function, and CONCAT is a vector concatenation operation.

9. An electronic device, characterized in that, include: A memory, and one or more processors communicatively connected to the memory; The memory stores instructions that can be executed by the one or more processors, which are executed by the one or more processors to enable the one or more processors to implement a training method for a financial event analysis model as described in any one of claims 1 to 4 or to implement a financial event analysis method as described in any one of claims 5 to 8.

10. A computer-readable storage medium, characterized in that, The readable storage medium stores a computer program, which, when executed by a processor, implements a training method for a financial event analysis model according to any one of claims 1 to 4, or implements a financial event analysis method according to any one of claims 5 to 8.

Citation Information

Patent Citations

  • Large language model training method and device based on knowledge graph

    CN116662577A

  • Fine adjustment method, system and equipment based on large language model and medium

    CN117290480A

  • Financial event extraction and analysis method and device based on large language model

    CN118296155A