Financial knowledge graph construction method and system based on large language model

Through the financial knowledge graph construction method based on large language model, the problems of low efficiency and poor accuracy of traditional financial knowledge graph construction are solved, efficient financial text data processing and knowledge extraction are achieved, and more accurate and regular financial knowledge graphs are generated.

CN119311900APending Publication Date: 2025-01-14SHANGHAI HONGZE INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411368101.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-29
Publication Date
2025-01-14

AI Technical Summary

Technical Problem

The traditional way of building financial knowledge graphs relies on manual analysis, which is inefficient and difficult to keep up with the growth rate of data, and it is difficult to ensure the accuracy and regularity of analysis results.

Method used

The financial knowledge graph construction method based on large language models is adopted to generate the final knowledge graph by constructing knowledge paradigms, generating original knowledge graphs, fusion and merging of knowledge, reducing manual demands, and improving the accuracy and regularity of extracting knowledge.

Benefits of technology

It significantly improves the efficiency of processing massive financial text data, reduces manual demand, and improves the accuracy and regularity of knowledge extraction, making the financial knowledge graph more comprehensive and accurate, and supports subsequent data analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119311900A_ABST
    Figure CN119311900A_ABST
Patent Text Reader

Abstract

The invention discloses a financial knowledge graph construction method based on a large language model. The method comprises the following steps: S1, constructing a knowledge normal form; s2, text content is processed according to the knowledge normal form constructed in the S1, and an original knowledge graph is generated; s3, analyzing the original knowledge graph obtained in the S2, and performing knowledge fusion to obtain an optimized knowledge graph; and S4, merging and integrating the optimized knowledge graph obtained in the S3 with the existing knowledge graph, and performing alignment processing to generate a final knowledge graph. According to the method, the industrial financial knowledge normal form is constructed, and the text content is analyzed and concluded, so that the processing efficiency of mass financial text data is improved, and the labor demand during financial text data processing is greatly reduced. And meanwhile, knowledge extraction results are merged and aligned, so that the accuracy and regularity of knowledge extraction are remarkably improved. In addition, compatibility with the existing knowledge graph is realized, so that the constructed financial knowledge graph is more comprehensive and accurate, and subsequent data analysis is facilitated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of financial analysis technology, and in particular to a method and system for constructing a financial knowledge graph based on a large language model. Background Art

[0002] The knowledge graph aims to model entities or concepts in the real world and their relationships. It is a new way to organize, manage and utilize massive data. It identifies entities in the data, extracts relationships and builds instances, ultimately forming a knowledge network containing rich semantic information. In the financial field, knowledge graphs can help analysts better understand and utilize data, and improve analysis efficiency and accuracy.

[0003] The traditional way of constructing knowledge graphs is mainly based on manual analysis and summarization. On the one hand, manual analysis is inefficient for a large amount of text data in different forms. On the other hand, with the development of the industry, the total amount of data that needs to be analyzed and summarized is increasing, and the growth rate of manual analysis efficiency is difficult to keep up with the growth rate of analysis needs. At the same time, manual analysis is also difficult to guarantee the accuracy and regularity of the analysis results. Summary of the invention

[0004] The purpose of the present invention is to provide a method for constructing a financial knowledge graph based on a large language model to achieve efficient processing of financial text data, reduce manual requirements, and improve the accuracy and regularity of extracted knowledge.

[0005] In order to solve the above technical problems, the present invention provides a method for constructing a financial knowledge graph based on a large language model, comprising:

[0006] S1: Constructing knowledge paradigm;

[0007] S2: Process the text content according to the knowledge paradigm constructed in S1 to generate an original knowledge graph;

[0008] S3: Analyze the original knowledge graph obtained by S2, perform knowledge fusion, and obtain the optimized knowledge graph;

[0009] S4: Merge and integrate the optimized knowledge graph obtained in S3 with the existing knowledge graph and align them to generate the final knowledge graph.

[0010] Furthermore, the knowledge paradigm construction in step S1 is divided into key entity types and relationship types.

[0011] Furthermore, the key entity type includes dividing the key entity into a plurality of different industry nodes, and the specific division types are as follows:

[0012] Company: a listed company or other related corporate entity on the stock market;

[0013] Organization: Non-corporate entity;

[0014] Business: the company's business line or operating activities;

[0015] Product: the product or service produced or sold by the company;

[0016] Technology: key technologies used or developed by the company;

[0017] Location: Geographic location;

[0018] Event: a major event that can affect the stock price;

[0019] Theme: A specific investment direction or concept in the stock market.

[0020] Furthermore, the relationship type includes classifying the financial relationship of the key entity, and the specific classification types are as follows:

[0021] ENGAGES_IN: indicates the business activities in which the company or organization is involved;

[0022] PRODUCES: indicates the products produced by the company;

[0023] BELONGS_TO: indicates a subordinate relationship, used for organizational structure or classification;

[0024] PROVIDES: indicates the technology provided by the company;

[0025] HAS: indicates the assets or characteristics owned by the company;

[0026] PARTNERS_WITH: indicates the partnership between entities;

[0027] IS_A: indicates a classification relationship;

[0028] COMPETES_WITH: indicates the competitive relationship between companies;

[0029] LOCATED_IN: Indicates the geographic location of the entity.

[0030] Furthermore, the step S2 includes: knowledge extraction, knowledge verification and knowledge storage;

[0031] Knowledge extraction: pre-processing the financial data into financial text content with a unified format; using the large language model according to the knowledge paradigm established in step S1, extracting knowledge from the financial text;

[0032] Knowledge verification: In the knowledge extraction step, multi-threaded extraction is used to cross-validate the extracted knowledge content to confirm that it conforms to the knowledge paradigm established in step S1; after the knowledge extraction is completed, a large language model is used to perform a secondary check on the results;

[0033] Knowledge storage: After verifying that the content of the knowledge extraction conforms to the knowledge paradigm established in step S1, the extracted knowledge is inserted into the graph database and saved as the original knowledge graph.

[0034] Furthermore, the knowledge fusion described in S3 includes: performing similarity calculation, verification and knowledge fusion of key entity types and relationship types.

[0035] Further, the key entity type and relationship type similarity calculation and verification steps include: entity and relationship similarity calculation and large language model verification;

[0036] Entity and relationship similarity calculation: The semantic similarity between entities in the original knowledge graph is calculated by using the embedding method; the text similarity between entities and relationships in the original knowledge graph is calculated by applying a tf-idf-like algorithm; the preliminary similarity score is obtained by combining the results of embedding and tf-idf-like. When the similarity score is greater than 0.9, it is a high similarity; when the similarity score is greater than 0.7 and less than or equal to 0.9, it is a medium similarity; when the similarity score is less than or equal to 0.7, it is a low similarity;

[0037] Large language model verification: Use prompts to ask the large language model whether the key entity types and relationship types refer to the same concept and provide judgment basis and confidence score.

[0038] Furthermore, the knowledge fusion includes: knowledge fusion and optimized knowledge graph generation;

[0039] Knowledge fusion: Based on the similarity scores obtained from the entity and relationship similarity calculation and verification steps and the judgment basis and confidence provided by the large language model, the knowledge in the original knowledge graph is integrated;

[0040] Optimize knowledge graph generation: according to the results of the knowledge fusion, update the nodes and edges in the original knowledge graph, recalculate the statistical features of the graph to evaluate the fusion effect; generate a fusion report to record the fusion information.

[0041] Furthermore, the S4 step includes fixing nodes and relationships, integrating the existing industry chain knowledge graph and generating the final knowledge graph;

[0042] Fixed nodes and relationships: Import listed company information as fixed nodes, use company names as node labels and company stock codes as unique identifiers, import industry index information, create industry nodes, and establish fixed relationships between industries and related listed companies;

[0043] Integrate the existing industrial chain knowledge graph: import the optimized knowledge graph generated by the S3 step, and import the existing industrial chain knowledge graph; align the data in the imported existing industrial chain knowledge graph and the optimized knowledge graph generated by the S3 step according to the fixed relationship of the fixed nodes constructed in the step of fixing the nodes and relationships; merge the entity information in the imported optimized knowledge graph into the fixed nodes, retain the core attributes of the fixed nodes, and supplement the additional information imported into the industrial chain knowledge graph; redirect the fixed relationships in the optimized knowledge graph and the fixed relationships in the industrial chain knowledge graph to the fixed nodes, and when the fixed nodes corresponding to the entities are the same, retain the entity relationships in the industrial chain knowledge graph;

[0044] Generation of the final knowledge graph: Based on the results of the above integration of the existing industrial chain knowledge graph, the node and edge information is updated in the graph database to generate the final knowledge graph.

[0045] The present invention also provides a financial knowledge graph construction system based on a large language model, comprising:

[0046] Knowledge paradigm building module, used to build knowledge paradigm;

[0047] The knowledge graph is used to process text content according to the constructed knowledge paradigm to generate an original knowledge graph; analyze the acquired original knowledge graph, perform knowledge fusion, and obtain an optimized knowledge graph; and merge and integrate the acquired optimized knowledge graph with the existing knowledge graph and align it to generate a final knowledge graph.

[0048] Compared with the prior art, the present invention has at least the following beneficial effects:

[0049] By constructing an industry financial knowledge paradigm and analyzing and summarizing text content, we can improve the efficiency of processing massive amounts of financial text data and significantly reduce the need for manual processing of financial text data. By merging and aligning the extracted knowledge results, we generate a knowledge graph, which significantly improves the accuracy and regularity of the extracted knowledge. By being compatible with and merging existing knowledge graphs, we make the constructed financial knowledge graph more comprehensive and accurate, which is beneficial for subsequent data analysis. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 It is a schematic diagram of the implementation process of the present invention;

[0051] Figure 2It is a schematic diagram of the similarity fusion judgment matrix table of the present invention;

[0052] Figure 3 It is a block diagram of a specific implementation mode of the present invention. DETAILED DESCRIPTION

[0053] The present invention will be described in more detail below in conjunction with the schematic diagram, wherein the preferred embodiment of the present invention is shown, and it should be understood that those skilled in the art can modify the present invention described herein, and still achieve the beneficial effects of the present invention. Therefore, the following description should be understood as being widely known to those skilled in the art, and not as a limitation of the present invention.

[0054] The present invention is described in more detail in the following paragraphs by way of example with reference to the accompanying drawings. The advantages and features of the present invention will become more apparent from the following description. It should be noted that the accompanying drawings are in very simplified form and are not in exact proportions, and are only used to facilitate and clearly assist in illustrating the purpose of the embodiments of the present invention.

[0055] like Figure 1 As shown, the embodiment of the present invention proposes a method for constructing a financial knowledge graph based on a large language model, including:

[0056] S1: Constructing knowledge paradigm.

[0057] S2: Process the text content according to the knowledge paradigm constructed in S1 to generate the original knowledge graph.

[0058] S3: Analyze the original knowledge graph obtained by S2, perform knowledge fusion, and obtain the optimized knowledge graph.

[0059] S4: Merge and integrate the optimized knowledge graph obtained in S3 with the existing knowledge graph and align them to generate the final knowledge graph.

[0060] Furthermore, the knowledge paradigm construction in step S1 is divided into key entity types and relationship types.

[0061] Specifically, the key entity type is to divide the key entity into multiple different industry nodes based on financial industry knowledge, and the specific division types are as follows:

[0062] Company: A listed company or other related corporate entity on the stock market

[0063] Organization: Non-corporate entities, such as government agencies, industry associations, research institutions, etc.

[0064] Business: The company's specific business line or operating activities

[0065] Product: The specific product or service that the company produces or sells

[0066] Technology: Key technologies used or developed by the company

[0067] Location: Geographical location, such as country, city, region, etc.

[0068] Event: major events that may affect stock prices, such as mergers and acquisitions, policy releases, etc.

[0069] Theme: A specific investment direction or concept in the stock market.

[0070] Furthermore, the relationship definition is to classify the financial relationships of key entities based on financial industry knowledge, and the specific classification types are as follows:

[0071] ENGAGES_IN: Indicates that the company or organization is involved in a certain business activity

[0072] PRODUCES: indicates that the company produces certain products

[0073] BELONGS_TO: indicates a subordinate relationship, used for organizational structure or classification

[0074] PROVIDES: Indicates that the company provides certain technology

[0075] HAS: Indicates that the company has certain assets or characteristics

[0076] PARTNERS_WITH: indicates the partnership between entities

[0077] IS_A: indicates classification relationship

[0078] COMPETES_WITH: indicates the competitive relationship between companies

[0079] LOCATED_IN: Indicates the geographic location of the entity.

[0080] In a specific embodiment, since there are usually a large number of financial-related texts that need to be classified and processed, the financial knowledge to be extracted is pre-classified and standardized by constructing a financial knowledge paradigm and defining key entity types and relationship types, so that the knowledge obtained in the data processing process can be consistent and comparable, which is conducive to the subsequent sorting and analysis of the extracted financial knowledge.

[0081] Further, such as Figure 2 As shown, the S2 step includes: knowledge extraction, knowledge verification and knowledge storage:

[0082] Specifically, the knowledge extraction includes: firstly, preprocessing the financial data to convert it into financial text content with a unified format; and then extracting knowledge from the financial text using the large language model according to the knowledge paradigm established in step S1.

[0083] Specifically, the knowledge verification includes: in the knowledge extraction step, using multi-threaded extraction and cross-validation to confirm that the extracted knowledge content conforms to the knowledge paradigm established in step S1. After the knowledge extraction is completed, a large language model is used to perform a secondary check on the results.

[0084] Specifically, the knowledge storage includes: after verifying that the content of the knowledge extraction conforms to the knowledge paradigm established in step S1, the extracted knowledge is inserted into the graph database and saved as the original knowledge graph.

[0085] In a specific embodiment, for a large amount of financial knowledge extracted directly according to the knowledge paradigm constructed in step S1, the data is still in a relatively primitive state, the overall data is not regular enough, the analysis is difficult, and the ability to directly generate the original knowledge graph is not available. Therefore, it is necessary to verify the extracted financial knowledge.

[0086] First, in the extraction process, a multi-threaded sampling extraction method is used to design multiple extraction tasks, each task is for a specific entity type or relationship type, and then the results are cross-validated, and the output results of different extraction tasks are compared to ensure the accuracy of the output results. Next, a large language model is used to perform a secondary check on the extraction results to ensure that the extracted financial knowledge conforms to the financial knowledge paradigm defined in step S1. At the same time, the classification model is used to determine whether the extraction results meet the preset entity and relationship type requirements. After confirming the accuracy and consistency of the extracted financial knowledge, next, according to the data format of the extracted financial knowledge, the extracted results are stored in the form of a self-developed Python class, and the class structure corresponds to the predefined entity and relationship types. After that, the verified results are generated as Cypher insert statements suitable for graph databases, and the results are inserted into the graph database through Cypher insert statements to form the original knowledge graph.

[0087] Furthermore, the knowledge fusion described in S3 includes: entity and relationship similarity calculation and verification and knowledge fusion.

[0088] Specifically, the entity and relationship similarity calculation and verification steps include: entity and relationship similarity calculation and large language model verification:

[0089] The entity and relationship similarity calculation includes: calculating the semantic similarity between entities in the original knowledge graph by using the embedding method. Then using the tf-idf-like algorithm to calculate the text similarity of entities and relationships in the original knowledge graph. Finally, the results of embedding and tf-idf-like are combined to obtain a preliminary similarity score. When the similarity score is greater than 0.9, it is a high similarity; when the similarity score is greater than 0.7 and less than or equal to 0.9, it is a medium similarity; when the similarity score is less than or equal to 0.7, it is a low similarity.

[0090] The large language model verification includes: designing prompts to ask the large language model whether these entities or relations refer to the same concept and providing judgment basis and confidence score.

[0091] Specifically, the knowledge fusion includes: knowledge fusion and optimization knowledge graph generation:

[0092] The knowledge fusion includes: fusing the knowledge in the original knowledge graph according to the similarity score obtained by the entity and relationship similarity calculation and verification steps and the judgment basis and confidence provided by the large language model.

[0093] The optimized knowledge graph generation includes: updating the nodes and edges in the original knowledge graph according to the result of the knowledge fusion, and then recalculating the statistical features of the graph, including node degree distribution, clustering coefficient, etc., to evaluate the fusion effect. Finally, a fusion report is generated to record the number of fused entities and relationships, fusion decision distribution and other information.

[0094] In a specific embodiment, for the original knowledge graph extracted and generated in step S2, there is still a large amount of data with a repetitive nature, which is highly complex and still needs to be analyzed and data tidied. First, by calculating and verifying the similarity of entities and relationships in the original knowledge graph, find the data with higher similarity in the original knowledge graph data.

[0095] Specifically, we first use the embedding method to calculate the semantic similarity between entities in the original knowledge graph. The embedding method is a technology that converts discrete data into dense vectors in a continuous vector space. This conversion allows us to measure the similarity between original data by calculating the similarity between vectors.

[0096] Then, the text similarity of entities and relations in the original knowledge graph is calculated using the TF-IDF algorithm. The TF-IDF algorithm is a feature extraction method widely used in text mining and information retrieval. It evaluates the importance of a word in a document collection by combining word frequency and inverse document frequency. After converting the data into a TF-IDF feature vector, the cosine similarity method can be used to calculate the similarity between data.

[0097] Finally, the results of embedding and tf-idf are combined to obtain a preliminary similarity score. When the similarity score is greater than 0.9, it is a high similarity, when the similarity score is greater than 0.7 and less than or equal to 0.9, it is a medium similarity, and when the similarity score is less than or equal to 0.7, it is a low similarity.

[0098] For entity and relationship pairs that are initially determined to be similar, use the large language model for multiple verifications: design prompts to ask the large language model whether these entities or relationships refer to the same concept and require the large language model to provide judgment basis and confidence. Based on the similarity calculation and large language model verification results, design Figure 3 The fusion decision matrix shown divides the data into keeping the data as it is, automatically merging, and merging after manual review. For cases that require manual review, a review task list is generated, and the experts make the final decision on whether to merge. For entities and relationships that are automatically fused and confirmed to be fused after expert decision: merge attribute information, retain more comprehensive or updated data, update related edges and relationships, and ensure the consistency of the graph structure.

[0099] After data fusion, a large language model is first used to perform a sample check on the fused entities and relationships to ensure the correctness of the fusion. Then a graph data consistency check is run to ensure that the fusion operation does not introduce logical errors or structural problems. Next, based on the fusion results, the nodes and edges in the graph database are updated. The statistical features of the graph, including node degree distribution, clustering coefficient, etc., are recalculated for experts to evaluate the fusion effect. Finally, an optimized knowledge graph and fusion report are generated, recording information such as the number of fused entities and relationships, and the distribution of fusion decisions, to facilitate data experts to analyze and summarize the data.

[0100] Furthermore, the S4 step includes fixing the nodes and relationships, integrating the existing industry chain knowledge graph and generating the final knowledge graph:

[0101] The fixing of the nodes and relationships includes: importing listed company information as fixed nodes, using company names as node labels, and company stock codes as unique identifiers, and then importing industry index information, creating industry nodes, and establishing fixed relationships between industries and related listed companies.

[0102] The integration of the existing industrial chain knowledge graph includes: importing the optimized knowledge graph generated by the S3 step and the existing industrial chain knowledge graph. Align the data in the two graphs of the imported existing industrial chain knowledge graph and the optimized knowledge graph generated by the S3 step according to the fixed relationship of the fixed nodes constructed in the step of fixing the nodes and relationships; merge the entity information in the imported optimized knowledge graph into the fixed nodes, retain the core attributes of the fixed nodes, and supplement the additional information imported into the industrial chain knowledge graph. Redirect the fixed relationships in the optimized knowledge graph and the fixed relationships in the industrial chain knowledge graph to fixed nodes. When the fixed nodes corresponding to the entities are the same, the entity relationships in the industrial chain knowledge graph are preferentially retained.

[0103] The generation of the final knowledge graph includes: updating the information of nodes and edges in the graph database according to the results of the above-mentioned integration of the existing industrial chain knowledge graph, and generating the final knowledge graph.

[0104] In a specific embodiment, Figure 3 As shown, because financial knowledge needs to have a certain degree of expansibility to be compatible with the existing financial knowledge base. Therefore, it is necessary to fix the nodes and relationships and integrate the existing industrial chain knowledge graph. Specifically, first import the information of listed companies as fixed nodes, use the company name as the node label, and the company stock code as the unique identifier. Then import the industry index information, create industry nodes, and establish a fixed relationship between the industry and related listed companies. Then import the existing industrial chain knowledge graph, and regularize the existing industrial chain knowledge graph data according to the fixed nodes and relationships to ensure compatibility with the ontology structure of the existing knowledge graph. Align the data in the two graphs based on the fixed relationship of the fixed nodes constructed in the step of fixing the nodes and relationships; merge the entity information in the imported optimized knowledge graph into the fixed node, retain the core attributes of the fixed node, and supplement the additional information imported into the industrial chain knowledge graph. Redirect the fixed relationship in the optimized knowledge graph and the fixed relationship in the industrial chain knowledge graph to the fixed node. When the fixed nodes corresponding to the entities are the same, the entity relationship in the industrial chain knowledge graph is preferentially retained. Entities and relationships that fail to align with fixed nodes or manually constructed knowledge are retained in the knowledge graph and marked. Finally, based on the alignment and merging results, the node and edge information is updated in the graph database to generate the final knowledge graph.

[0105] In summary, compared with the prior art, the present invention has at least the following beneficial effects:

[0106] By constructing an industry financial knowledge paradigm and analyzing and summarizing text content, we can improve the efficiency of processing massive amounts of financial text data and significantly reduce the need for manual processing of financial text data. By merging and aligning the extracted knowledge results, we generate a knowledge graph, which significantly improves the accuracy and regularity of the extracted knowledge. By being compatible with and merging existing knowledge graphs, we make the constructed financial knowledge graph more comprehensive and accurate, which is beneficial for subsequent data analysis.

[0107] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A method for constructing a financial knowledge graph based on a large language model, characterized in that: include: S1: Constructing knowledge paradigm; S2: Process the text content according to the knowledge paradigm constructed in S1 to generate the original knowledge graph; S3: Analyze the original knowledge graph obtained by S2, perform knowledge fusion, and obtain the optimized knowledge graph; S4: Merge and integrate the optimized knowledge graph obtained in S3 with the existing knowledge graph and align them to generate the final knowledge graph.

2. A method for constructing a financial knowledge graph based on a large language model as claimed in claim 1, characterized in that: The knowledge paradigm construction described in step S1 is divided into key entity types and relationship types.

3. A method for constructing a financial knowledge graph based on a large language model as claimed in claim 2, characterized in that: The key entity types include dividing the key entities into multiple different industry nodes, and the specific division types are as follows: Company: a listed company or other related corporate entity on the stock market; Organization: Non-corporate entity; Business: the company's business line or operating activities; Product: the product or service produced or sold by the company; Technology: key technologies used or developed by the company; Location: Geographic location; Event: a major event that can affect the stock price; Theme: A specific investment direction or concept in the stock market.

4. A method for constructing a financial knowledge graph based on a large language model as claimed in claim 3, characterized in that: The relationship type includes the classification of the financial relationship of the key entity, and the specific classification types are as follows: ENGAGES_IN: indicates the business activities in which the company or organization is involved; PRODUCES: indicates the products produced by the company; BELONGS_TO: indicates a subordinate relationship, used for organizational structure or classification; PROVIDES: indicates the technology provided by the company; HAS: indicates the assets or characteristics owned by the company; PARTNERS_WITH: indicates the partnership between entities; IS_A: indicates a classification relationship; COMPETES_WITH: indicates the competitive relationship between companies; LOCATED_IN: Indicates the geographic location of the entity.

5. A method for constructing a financial knowledge graph based on a large language model as claimed in claim 1, characterized in that: Its S2 step includes: knowledge extraction, knowledge verification and knowledge storage; Knowledge extraction: pre-processing the financial data into financial text content with a unified format; using the large language model according to the knowledge paradigm established in step S1, extracting knowledge from the financial text; Knowledge verification: In the knowledge extraction step, multi-threaded extraction is used to cross-validate the extracted knowledge content to confirm that it conforms to the knowledge paradigm established in step S1; after the knowledge extraction is completed, a large language model is used to perform a secondary check on the results; Knowledge storage: After verifying that the content of the knowledge extraction conforms to the knowledge paradigm established in step S1, the extracted knowledge is inserted into the graph database and saved as the original knowledge graph.

6. A method for constructing a financial knowledge graph based on a large language model as claimed in claim 2, characterized in that: The knowledge fusion described in S3 includes: performing similarity calculation, verification and knowledge fusion of key entity types and relationship types.

7. A method for constructing a financial knowledge graph based on a large language model as claimed in claim 6, characterized in that: The key entity type and relationship type similarity calculation and verification steps include: entity and relationship similarity calculation and large language model verification; Entity and relationship similarity calculation: The semantic similarity between entities in the original knowledge graph is calculated by using the embedding method; the text similarity between entities and relationships in the original knowledge graph is calculated by applying a tf-idf-like algorithm; the preliminary similarity score is obtained by combining the results of embedding and tf-idf-like. When the similarity score is greater than 0.9, it is a high similarity; when the similarity score is greater than 0.7 and less than or equal to 0.9, it is a medium similarity; when the similarity score is less than or equal to 0.7, it is a low similarity; Large language model verification: Use prompts to ask the large language model whether the key entity types and relationship types refer to the same concept and provide judgment basis and confidence score.

8. A method for constructing a financial knowledge graph based on a large language model as claimed in claim 6, characterized in that: The knowledge fusion includes: knowledge fusion and optimized knowledge graph generation; Knowledge fusion: Based on the similarity scores obtained from the entity and relationship similarity calculation and verification steps and the judgment basis and confidence provided by the large language model, the knowledge in the original knowledge graph is integrated; Optimize knowledge graph generation: according to the results of the knowledge fusion, update the nodes and edges in the original knowledge graph, recalculate the statistical features of the graph to evaluate the fusion effect; generate a fusion report to record the fusion information.

9. A method for constructing a financial knowledge graph based on a large language model as claimed in claim 1, characterized in that: The S4 step includes fixing nodes and relationships, integrating the existing industry chain knowledge graph and generating the final knowledge graph; Fixed nodes and relationships: Import listed company information as fixed nodes, use company names as node labels and company stock codes as unique identifiers, import industry index information, create industry nodes, and establish fixed relationships between industries and related listed companies; Integrate the existing industrial chain knowledge graph: import the optimized knowledge graph generated by step S3, and import the existing industrial chain knowledge graph; align the data in the imported existing industrial chain knowledge graph and the optimized knowledge graph generated by step S3 according to the fixed relationship of the fixed nodes constructed in the step of fixing the nodes and relationships; merge the entity information in the imported optimized knowledge graph into the fixed nodes, retain the core attributes of the fixed nodes, and supplement the additional information imported into the industrial chain knowledge graph; Redirect the fixed relationships in the optimization knowledge graph and the fixed relationships of entities in the industrial chain knowledge graph to fixed nodes. When the fixed nodes corresponding to the entities are the same, retain the entity relationships in the industrial chain knowledge graph. Generation of the final knowledge graph: Based on the results of the above integration of the existing industrial chain knowledge graph, the node and edge information is updated in the graph database to generate the final knowledge graph.

10. A financial knowledge graph construction system based on a large language model, characterized in that: include: Knowledge paradigm building module, used to build knowledge paradigm; A knowledge graph is used to process text content according to the constructed knowledge paradigm to generate an original knowledge graph; Analyze the original knowledge graph obtained, perform knowledge fusion, and obtain the optimized knowledge graph; The obtained optimized knowledge graph is merged and integrated with the existing knowledge graph and aligned to generate the final knowledge graph.

Citation Information

Cited By

  • Intelligent knowledge architecture graph construction method and system based on large model

    CN120144790A

  • Financial activity information mining system and method based on multiple base large language models

    CN120688024A

  • Dynamic knowledge graph construction and application method and device for financial service analysis, equipment and medium

    CN121638411A