Knowledge graph construction method and device, equipment and storage medium
By identifying the entity types and basic relationships in financial activities, building an initial map and generating feature matrix, combining with graph convolution operation optimization representation, the shortcomings of the existing technology in processing dynamic characteristics of financial transactions are solved, and the analysis of knowledge graphs and reasoning capability, especially in anti-money laundering and risk management.
Patent Information
- Application Number
- CN202411278181.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-12
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2044-09-12
AI Technical Summary
The existing knowledge graph construction methods have limitations when dealing with dynamic characteristics in financial transactions, and it is difficult to effectively capture the changes in capital flows and the evolution of relationships in the time dimension, resulting in insufficient in anti-money laundering, risk management and capital flow analysis.
By identifying and defining entity types and basic relationships in financial activities, an initial graph structure is constructed, and a time series feature matrix and direction feature matrix are generated based on time features and direction features, and graph convolution operations are performed in combination with multi-dimensional features to optimize nodes and edges. Indicates that ultimately form a target knowledge graph.
It significantly improves the performance ability of the knowledge graph in timing analysis and directional reasoning, can dynamically adapt to knowledge needs in different scenarios, and improves the analysis and identification capabilities of complex financial networks, especially in anti-money laundering and risk management.
Smart Images

Figure CN119149753A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a knowledge graph construction method, device, equipment and storage medium. Background Art
[0002] In the financial field, with the rapid growth of the complexity of financial transactions and the amount of data, how to effectively manage and analyze this data has become crucial. Traditional financial data analysis methods often rely on rule-driven or statistical models, which face many challenges in dealing with complex financial relationship networks, especially when analyzing multi-relationship and multi-dimensional financial transaction data. These data usually involve interactions between multiple entities (such as customers, accounts, enterprises, etc.), and these interactions have highly dynamic characteristics in terms of time and direction.
[0003] In order to better understand and manage these complex financial relationship networks, knowledge graphs have been introduced into financial data analysis as an emerging technical means. Knowledge graphs can represent entities and their relationships in the form of graph structures, forming a complete network graph by representing entities in the data as nodes and relationships as edges. This graph can not only help identify and analyze direct relationships between entities, but also discover potential complex relationships through reasoning and inference.
[0004] However, existing knowledge graph construction methods have certain limitations when dealing with dynamic features in financial transactions, such as time features and direction features. For example, traditional methods often have difficulty effectively capturing changes in capital flows and the evolution of relationships in the time dimension, which is crucial in applications such as anti-money laundering, risk management, and capital flow analysis. In order to overcome these challenges, it is necessary to introduce more advanced feature processing and optimization techniques, such as graph neural networks (GNNs), in the process of knowledge graph construction to enhance the application effect of knowledge graphs in complex financial environments. Summary of the invention
[0005] The main purpose of the present invention is to provide a knowledge graph construction method, device, equipment and storage medium, aiming to solve the technical problem that the existing technology cannot effectively handle the time and direction characteristics of the basic relationship between entities, resulting in deficiencies in dynamic change analysis and flow direction identification in complex networks.
[0006] To achieve the above objectives, the present invention provides a knowledge graph construction method, comprising:
[0007] Based on the need to build a knowledge graph, identify and determine multiple entity types involved in the activity, and define the basic relationships between the entity types;
[0008] Constructing the entity types and the basic relationships into an initial graph structure in the form of nodes and edges to form a preliminary knowledge graph;
[0009] Creating a time series feature weight matrix according to the time features of the basic relationship, and storing the time series feature weight matrix together with the attributes of the basic relationship in the graph structure of the preliminary knowledge graph;
[0010] Extracting directional features from each basic relationship, creating a directional feature matrix for the basic relationship based on the extracted directional features, and storing the directional feature matrix together with the attributes of the basic relationship in the graph structure of the preliminary knowledge graph;
[0011] The multi-dimensional features of nodes and edges in the preliminary knowledge graph are combined and optimized to generate updated representations, which are applied to the preliminary knowledge graph to form the target knowledge graph.
[0012] In one embodiment, the entity types and the basic relationships are constructed into an initial graph structure in the form of nodes and edges to form a preliminary knowledge graph, including:
[0013] Constructing the entity types and the basic relationships into an initial graph structure in the form of nodes and edges to form a preliminary relationship network;
[0014] Expanding the preliminary relationship network into a complete knowledge graph structure, determining the node types and edge types in the knowledge graph, assigning feature vectors to each node and edge, and forming a basic representation of the knowledge graph;
[0015] Create a vector representation for each basic relationship, which contains the type information and time characteristics of the basic relationship;
[0016] The attributes of the basic relations are embedded into the node and edge representations of the knowledge graph, and jointly learned with the node embeddings to form the preliminary knowledge graph.
[0017] In one embodiment, the attributes of the basic relations are embedded into the node and edge representations of the knowledge graph, and jointly learned with the node embeddings to form the preliminary knowledge graph, including:
[0018] Extracting a relation type feature from each basic relation, wherein the relation type feature is used to describe the specific properties of the basic relation and is represented as a first Embedding vector;
[0019] Extracting event occurrence time features from each basic relationship, wherein the event occurrence time features are used to represent the time sequence or time point of occurrence of the basic relationship and are represented as the second Embedding vector;
[0020] After combining the first Embedding vector with the second Embedding vector, the vectors are input into the CompGCN model together with the Embedding vectors of the corresponding nodes for joint learning;
[0021] Through the joint learning of the CompGCN model, the updated feature representations of the nodes and edges are generated, and the updated feature representations of the nodes and edges are integrated into the graph structure to generate the preliminary knowledge graph.
[0022] In one embodiment, the multi-dimensional features of nodes and edges in the preliminary knowledge graph are combined and optimized to generate updated representations, which are applied to the preliminary knowledge graph to form a target knowledge graph, including:
[0023] Embedding multi-dimensional features for each node and edge in the preliminary knowledge graph, vectorizing attribute features, time features, direction features, and relationship type features of the nodes and edges to form an initial feature representation;
[0024] The initial feature representation is input into the CompGCN model, and the multi-dimensional features of nodes and edges are aggregated through multi-layer graph convolution operations to integrate the feature information of the node and its adjacent nodes and associated edges;
[0025] After each layer of graph convolution operation, a nonlinear activation function is applied to activate the aggregated features and improve the feature representation of nodes and edges;
[0026] After multi-layer graph convolution and nonlinear activation processing, the features output by each layer are combined to generate updated representations of nodes and edges;
[0027] The updated representations of nodes and edges are reapplied to the preliminary knowledge graph to replace the original representations, and finally the target knowledge graph is formed.
[0028] In one embodiment, multi-dimensional features of nodes and edges are aggregated through multi-layer graph convolution operations, including:
[0029] Determine the aggregation function based on the multi-dimensional features of nodes and edges in the preliminary knowledge graph;
[0030] In each layer of graph convolution operation, the node's own features are combined with the features of neighboring nodes to generate an updated node representation, and the edge's own features are combined with the features of its associated nodes to generate an updated edge representation;
[0031] In multi-layer graph convolution operations, aggregation functions are applied layer by layer, and each layer performs new aggregation and updates based on the node and edge representations generated by the previous layer, gradually optimizing the representation of nodes and edges to capture deeper feature information.
[0032] In one embodiment, the entity types and the basic relationships are constructed into an initial graph structure in the form of nodes and edges to form a preliminary knowledge graph, including:
[0033] Representing the entity types as nodes, and creating corresponding nodes for each entity type in a graph structure;
[0034] Representing the basic relations as edges, and creating corresponding edges for each basic relation in the graph structure;
[0035] Add a reverse relationship to each basic relationship, forming a reverse edge corresponding to the original relationship in the graph structure;
[0036] Add a self-loop edge to each node in the graph structure to retain the node's own information;
[0037] Perform feature vectorization on reverse edges and self-loop edges, represent them as vectors, and combine them with the feature vectors of the basic relations to construct the initial graph structure;
[0038] The feature vectors of the nodes and edges are stored in an initial graph structure, and a complete preliminary knowledge graph is finally formed by integrating basic relationships, reverse edges and self-loop edges.
[0039] In one embodiment, directional features are extracted from each basic relationship, and based on the extracted directional features, a directional feature matrix is created for the basic relationship, including:
[0040] Extracting a direction feature from each basic relationship, wherein the direction feature represents the flow direction of funds in the relationship;
[0041] The extracted directional features are mapped to binary values, where 0 indicates no directionality or a bidirectional relationship, and 1 indicates a clear directionality or a unidirectional relationship;
[0042] The mapped directional features are quantized and converted into quantitative values that can represent the strength or importance of the directionality, and a directional feature matrix is created based on the quantized directional features.
[0043] Furthermore, to achieve the above-mentioned purpose, the present invention also provides a knowledge graph construction device, comprising:
[0044] The entity and relationship definition module, based on the needs of building a knowledge graph, identifies and determines multiple entity types involved in the activity and defines the basic relationships between the entity types;
[0045] An initial graph structure construction module constructs the entity types and the basic relationships into an initial graph structure in the form of nodes and edges to form a preliminary knowledge graph;
[0046] A time series feature processing module, which creates a time series feature weight matrix according to the time features of the basic relationship, and stores the time series feature weight matrix together with the attributes of the basic relationship in the graph structure of the preliminary knowledge graph;
[0047] A directional feature processing module extracts directional features from each basic relationship, creates a directional feature matrix for the basic relationship based on the extracted directional features, and stores the directional feature matrix together with the attributes of the basic relationship in the graph structure of the preliminary knowledge graph;
[0048] The feature combination and optimization module combines and optimizes the multi-dimensional features of nodes and edges in the preliminary knowledge graph, generates an updated representation, and applies it to the preliminary knowledge graph to form the target knowledge graph.
[0049] Furthermore, to achieve the above-mentioned purpose, the present invention also provides a computer device, which includes a memory, a processor, and a knowledge graph construction program stored in the memory and executable on the processor, and the knowledge graph construction program, when executed by the processor, implements the steps of the knowledge graph construction method as described above.
[0050] Furthermore, to achieve the above-mentioned purpose, the present invention also provides a computer storage medium, on which a knowledge graph construction program is stored, and when the knowledge graph construction program is executed by a processor, the steps of the knowledge graph construction method as described above are implemented.
[0051] Beneficial effects: The present invention relates to a method for constructing a knowledge graph. According to the needs of constructing a knowledge graph, multiple entity types participating in an activity are identified and determined, and the basic relationships between the entity types are defined. A preliminary knowledge graph is formed by constructing the entity types and the basic relationships into an initial graph structure in the form of nodes and edges. According to the time characteristics of the basic relationships, a temporal feature weight matrix is created, and it is stored in the preliminary knowledge graph together with the attributes of the basic relationships. Then, directional features are extracted from the basic relationships, a directional feature matrix is generated, and stored together with other features. The multi-dimensional features of the nodes and edges in the preliminary knowledge graph are combined and optimized, and finally an updated representation is generated, and a target knowledge graph is formed. The present invention can not only dynamically adapt to the knowledge needs in different scenarios, but also significantly improve the performance of the knowledge graph in temporal analysis and directional reasoning through the introduction of temporal features and directional features. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] The present invention will be further described below with reference to the accompanying drawings and embodiments, in which:
[0053] Figure 1 This is a flow chart of an embodiment of a method for constructing a knowledge graph according to the present invention;
[0054] Figure 2 A schematic diagram of functional modules of a preferred embodiment of the knowledge graph construction device of the present invention;
[0055] Figure 3 It is a structural diagram of the device hardware operating environment involved in the computer device embodiment of the present invention. DETAILED DESCRIPTION
[0056] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0057] In the financial field, with the rapid growth of the complexity of financial transactions and the amount of data, how to effectively manage and analyze this data has become crucial. Traditional financial data analysis methods often rely on rule-driven or statistical models, which face many challenges in dealing with complex financial relationship networks, especially when analyzing multi-relationship and multi-dimensional financial transaction data. These data usually involve interactions between multiple entities (such as customers, accounts, enterprises, etc.), and these interactions have highly dynamic characteristics in terms of time and direction.
[0058] In order to better understand and manage these complex financial relationship networks, knowledge graphs have been introduced into financial data analysis as an emerging technical means. Knowledge graphs can represent entities and their relationships in the form of graph structures, forming a complete network graph by representing entities in the data as nodes and relationships as edges. This graph can not only help identify and analyze direct relationships between entities, but also discover potential complex relationships through reasoning and inference.
[0059] However, existing knowledge graph construction methods have certain limitations when dealing with dynamic features in financial transactions, such as time features and direction features. For example, traditional methods often have difficulty effectively capturing changes in capital flows and the evolution of relationships in the time dimension, which is crucial in applications such as anti-money laundering, risk management, and capital flow analysis. In order to overcome these challenges, it is necessary to introduce more advanced feature processing and optimization techniques, such as graph neural networks (GNNs), in the process of knowledge graph construction to enhance the application effect of knowledge graphs in complex financial environments.
[0060] See also Figure 1 , Figure 1 A flowchart of an embodiment of a knowledge graph construction method provided by the present invention. It should be noted that although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown here.
[0061] like Figure 1 As shown, the knowledge graph construction method proposed in the present invention includes the following steps:
[0062] S10, based on the need to build a knowledge graph, identifying and determining multiple entity types participating in the activity, and defining basic relationships between the entity types;
[0063] In this embodiment, "activity" refers to any interaction, process or operation involving multiple entities in the knowledge graph. These activities can be widely used in different fields, such as:
[0064] Business activities: such as transactions, cooperation, contract signing, etc., which may involve multiple entities such as customers, companies, and suppliers.
[0065] Social activities: such as communication, sharing, and recommendations in social networks. Entities may be users, posts, comments, etc.
[0066] Technical processes: such as data flow, communication, and processing in technical systems, involving entities such as devices, applications, and data flows.
[0067] Scientific research: such as experimental process, scientific research cooperation, etc., involving researchers, experimental equipment, experimental data, etc.
[0068] In this embodiment and the following embodiments, financial activities are used as an example for explanation. The entity type in financial activities refers to the key participants who play different roles in financial transactions or financial relationship networks. These entities can be individuals, enterprises, financial institutions or other legal entities, which are interconnected through various financial activities. Specific entity types include but are not limited to: Customer: an individual or enterprise, usually as a source or destination of funds, plays a key role in transactions. Account: a financial account associated with a customer or enterprise, through which operations such as transfers, deposits, loans, etc. are performed. Enterprise: a company or legal entity involved in financial activities, which may involve complex financial behaviors such as lending, investing, and trading. Financial institutions: banks, insurance companies, investment funds, etc., which play the role of intermediaries, guarantees or fund management in financial activities.
[0069] Identify key participants in financial activities based on the goals of graph construction (such as anti-money laundering, credit assessment, etc.). These participants are usually entity types directly related to the core business. For example, in anti-money laundering scenarios, customers, accounts, trading platforms, banks, etc. are all key entities. Under the premise of ensuring that the graph can be effectively reasoned, determine a variety of entity types to cover various roles in financial activities. For example, in addition to borrowers and lenders, loan relationships may also include entities such as guarantors and insurance companies. The choice of entity types also needs to consider how these entities are connected through relationships and whether these relationships help reasoning. For example, the "transaction" relationship between a bank and a customer may play a key role in anti-money laundering reasoning. The definition of entity types should consider integration with existing data to ensure that entities obtained from different data sources can be accurately represented in the knowledge graph and can be associated with each other.
[0070] In specific applications, the identification of entity types is not limited to static definitions, but may also involve dynamic adjustments. For example, new entity types may be introduced for different financial product or service scenarios, such as "borrower", "guarantor", "investor", etc. By accurately defining these entity types, the foundation can be laid for subsequent relationship construction and the formation of knowledge graphs.
[0071] Based on the identified entity types, define the basic relationships between these entities. Basic relationships refer to the most basic interactions and connections between these entities in financial activities. These relationships determine how funds flow between different entities and constitute the core content of the financial relationship network. Specific basic relationships include but are not limited to: Transfer: The process of transferring funds from one account to another, usually involving interactions between customers and banks. Borrowing: An entity (such as an individual or an enterprise) borrows funds from a financial institution or other entity and promises to repay the principal and interest in the future. Holding: An individual or institution holds shares in a company and participates in the shareholder rights of the company. Insurance: A protection service provided by a financial institution to customers, paying compensation when a specific risk event occurs. Each relationship includes not only a static definition, but may also involve the attributes of the relationship, such as "loan amount", "interest rate", "guarantee period", etc. In a complex financial network, the definition of basic relationships needs to fully consider the interaction patterns and business logic between entities to ensure the integrity and accuracy of the knowledge graph.
[0072] In one specific embodiment, in a financial transaction monitoring system, various entity types involved in a transaction are first identified and classified. The system not only identifies standard financial entities, such as customers and bank accounts, but also further expands the definition of entity types, including virtual currency wallets and cross-border payment platforms. The basic relationship between these entities is not limited to transfers and loans, but also extends to include cross-border transactions and multi-currency exchanges. The system builds a preliminary knowledge graph based on these extended definitions. When processing time features, the system creates a time series feature weight matrix that not only considers the specific time when the transaction occurs, but also adds the impact of time zone differences and transaction delays. In the processing of directional features, the system assigns directional features to each financial relationship and further expands it to handle multi-directional relationships (such as multi-level paths for transferring funds). Finally, by combining and optimizing multi-dimensional features, more complex node and edge representations are generated to cope with complex international financial transaction networks, and finally form a target knowledge graph.
[0073] In another specific embodiment, in an anti-fraud detection system, the system identifies and classifies more detailed entity types, such as high-frequency trading accounts, accounts associated with known fraudsters, and accounts registered using anonymous emails. When defining basic relationships, the system not only handles direct fund transfers, but also expands to include indirect associations (such as multi-level transfers through intermediary accounts). When creating a time series feature weight matrix, the system expands the scope of time features, considers the frequency and regularity of historical transactions, and uses machine learning models to predict the time patterns of future transactions. In the process of creating a directional feature matrix, the system introduces adaptive directional feature processing, which can dynamically adjust the directional feature matrix to adapt to changing fraud patterns. Finally, the system generates updated node and edge representations through a more complex aggregation and optimization process, so that the knowledge graph can capture and identify signs of fraud in real time.
[0074] By defining the entity types and basic relationships in financial activities, an accurate and comprehensive knowledge graph can be constructed to effectively reflect the structure and dynamic changes of the financial transaction network. This improves the accuracy and depth of financial data analysis and provides strong technical support for risk management, anti-money laundering, and transaction monitoring.
[0075] S20, constructing the entity type and the basic relationship into an initial graph structure in the form of nodes and edges to form a preliminary knowledge graph;
[0076] In this embodiment, in financial activities, entity types and basic relationships are constructed as an initial graph structure in the form of nodes and edges to form a preliminary knowledge graph in order to clearly represent different entities and the relationships between them in the graph.
[0077] Nodes are the basic units in the graph structure, and each node represents a financial entity type, such as customers, accounts, companies, etc. By converting entity types into nodes, the system can intuitively express the position and role of these entities in the financial network.
[0078] An edge is a line connecting two nodes, representing the basic relationship between two entities, such as transfers, loans, holdings, etc. Each edge not only shows the existence of a relationship, but can also include attribute information of the relationship, such as amount, timestamp, etc., further enriching the data expression capabilities of the graph.
[0079] By integrating all identified nodes and edges into a unified graph structure, a preliminary knowledge graph is formed, which can provide a global view for subsequent data analysis and processing, help identify potential risks, discover emerging financial relationships, and provide a basis for in-depth analysis.
[0080] In one embodiment, in a financial fraud detection system, the system identifies entity types in financial transactions, such as individual customers, merchants, and bank accounts, and represents them as nodes in a graph structure. The system also identifies financial relationships between these entities, such as payments, transfers, refunds, etc., and represents them as edges. On this basis, the system expands the features of each edge to include information such as transaction frequency and time interval, thereby constructing a preliminary knowledge graph. This knowledge graph is used to detect abnormal transaction patterns, such as money laundering behavior with multiple small transfers.
[0081] By constructing the financial entity types and basic relationships into a preliminary knowledge graph in the form of nodes and edges, the relationship structure in the financial network can be fully presented. It not only improves the visualization and understanding of financial data, but also provides a strong data foundation for subsequent risk management, anti-money laundering analysis and credit assessment, significantly improving the accuracy and efficiency of financial data analysis.
[0082] S30, creating a time series feature weight matrix according to the time features of the basic relationship, and storing the time series feature weight matrix together with the attributes of the basic relationship in the graph structure of the preliminary knowledge graph;
[0083] In this embodiment, in financial activities, a time series feature weight matrix is created based on the time characteristics of the basic relationship, in order to better capture and analyze the dynamic changes in financial transactions.
[0084] Temporal features refer to the time points or time periods in financial relationships where transactions occur. These features are critical to understanding the timing of fund flows and identifying abnormal transaction behaviors. For example, frequent large transfers in a short period of time may be a sign of money laundering.
[0085] Based on the extracted time features, a time series feature weight matrix is constructed. The element values of this matrix reflect the weights of the same type of basic relationships at different time points. This matrix can quantify the impact of time features on financial relationships and help identify the cumulative effect of funds in different time periods.
[0086] The created time series feature weight matrix is stored in the graph structure of the preliminary knowledge graph together with other attributes of the basic relationship (such as amount, direction features, etc.). By incorporating time features into the knowledge graph, the graph can more accurately reflect the dynamic changes of capital flows and provide richer data support for subsequent analysis.
[0087] In one specific implementation, the system extracts time features for cross-border transactions, creates a time feature weight matrix, and analyzes the time and space distribution features of these transactions in combination with the geographic location data of each transaction. This matrix is embedded in the preliminary knowledge graph, allowing the system to capture the time features of cross-border money laundering activities, such as transactions conducted simultaneously at multiple locations. Ultimately, by analyzing these complex time patterns, the system can identify hidden money laundering networks and fund transfer chains.
[0088] By creating and applying the time series feature weight matrix, the ability of the financial activity knowledge graph to process dynamic time features is significantly enhanced. Especially in the anti-money laundering scenario, it can more accurately identify and analyze money laundering behaviors, enhance the ability of financial institutions to prevent illegal capital flows, and thus improve the security and compliance of the entire system.
[0089] S40, extracting directional features from each basic relationship, creating a directional feature matrix for the basic relationship based on the extracted directional features, and storing the directional feature matrix together with the attributes of the basic relationship in the graph structure of the preliminary knowledge graph;
[0090] In this embodiment, in financial activities, directional features are extracted from each basic relationship, and a directional feature matrix is created based on these directional features, in order to better represent and analyze the direction of capital flow in the financial network.
[0091] Directional features refer to the direction in which funds flow in a financial relationship, such as from one account to another, or from one company to its subsidiaries. Extracting these directional features can clarify the flow path of funds, which is particularly important when identifying complex financial behaviors such as money laundering and fund transfers.
[0092] Based on the extracted directional features, a directional feature matrix is created. This matrix is used to represent the directionality of different basic relationships, for example, 0 represents no directionality or a two-way relationship, and 1 represents a clear directionality or a one-way relationship. Through this matrix representation, the system can better identify and analyze the pattern of capital flow.
[0093] The directional feature matrix is stored in the graph structure of the preliminary knowledge graph together with the attributes of other basic relationships (such as amount, time features, etc.). The purpose of this is to integrate the directional features into the representation of the graph, so that the entire knowledge graph can not only show the existence of financial relationships, but also intuitively reflect the direction of capital flow, supporting subsequent analysis and reasoning.
[0094] In one specific implementation, the system analyzes directional features in cross-border fund transfers, with a particular focus on the path of funds from one country to another. The extracted directional features are used to create a matrix for tracking the direction of international fund flows. By storing this information in a knowledge graph, the system is able to identify cross-border money laundering networks, especially in complex fund transfers involving multiple countries, and can track the final destination of the funds, thereby enhancing monitoring of illegal fund flows.
[0095] By extracting and applying directional features, the visualization and analysis capabilities of capital flows in financial relationship networks can be significantly improved. Especially in anti-money laundering scenarios, the use of directional feature matrices enables the system to more accurately identify complex capital flow paths and potential money laundering behaviors, thereby improving the security and risk management capabilities of the financial system.
[0096] S50, combining and optimizing the multi-dimensional features of the nodes and edges in the preliminary knowledge graph, generating an updated representation, and applying it to the preliminary knowledge graph to form a target knowledge graph.
[0097] In this embodiment, the multi-dimensional features include node attributes (such as type, importance), edge attributes (such as relationship type, weight, time feature, direction feature), etc. The combination of these features is to integrate information of different dimensions through algorithms to more comprehensively represent the roles and functions of nodes and edges in the financial network.
[0098] Optimization refers to adjusting the representation of nodes and edges through algorithms so that their role in the graph structure is more consistent with the dynamic changes of the actual financial transaction network. The optimization process may involve machine learning techniques such as graph convolutional networks (GCNs), which iteratively calculate the graph structure so that the representation of each node and edge gradually approaches the optimal solution.
[0099] The combined and optimized nodes and edges generate new feature representations that more accurately reflect the state of entities and relationships in the knowledge graph. The generation of new representations is for better reasoning and analysis in the graph.
[0100] The updated representations of nodes and edges are reapplied to the preliminary knowledge graph to form the final target knowledge graph, which is the core data structure used by the system for financial data analysis, prediction, and reasoning.
[0101] In one specific implementation, first, each node and edge in the preliminary knowledge graph is embedded with multi-dimensional features, including attribute features, time features, direction features, and relationship type features of the nodes and edges.
[0102] The embedded multi-dimensional features are input into the CompGCN model, and feature aggregation and update are performed using the following formula:
[0103]
[0104] in, represents the new feature representation of node v in the k+1th layer; f represents the activation function, which is used to introduce nonlinearity to make the model more expressive; ∑ (u,r∈N(v)) It means to sum the neighbor nodes u and edges r of node v, and N(v) represents the set of neighbor nodes of node v; Represents the projection matrix of relation type r at the kth layer, which is used to transform the features of the relation type; The projection matrix representing the temporal features of relation type r at the kth layer is used to map the temporal features into the new representation space; The projection matrix representing the directional features of relation type r at the kth layer maps the directional features into a suitable representation space; Symbols represent node characteristics and edge features It can be a specific operation between . It can be a Hadamard product (element-wise multiplication) or other forms of feature combination operations.
[0105] In this process, the system will update the feature representation of each node and edge layer by layer through multi-layer graph convolution operations. Each layer of convolution operation integrates the feature information of neighboring nodes and edges into the target node. Through the nonlinear activation function f, the system can enhance the expressiveness of the features. After multiple layers of convolution operations, updated node and edge representations are generated. These updated representations can better reflect the position and relationship of nodes and edges in the entire knowledge graph. The updated node and edge representations are reapplied to the preliminary knowledge graph to replace the original representation, and finally the target knowledge graph is generated. This target knowledge graph has stronger expressive power and can be used for more precise reasoning and analysis.
[0106] In another specific implementation, the system expands the edges and nodes in the preliminary knowledge graph and adds geographic location features to analyze cross-border capital flows. The system generates updated node and edge representations by combining these multi-dimensional features (such as transaction amount, direction features, and geographic location). The system then uses a clustering algorithm to optimize these representations and identify the flow patterns of funds between different countries and regions. The optimized representations are further integrated back into the preliminary knowledge graph to form a target knowledge graph that reflects the trend of international capital flows. This graph helps the system identify key paths in the international money laundering network.
[0107] In the anti-money laundering system, reasoning based on the target knowledge graph can be used to identify potential money laundering behaviors. The target knowledge graph has been combined and optimized through multi-dimensional features in the early stage, and contains rich information about financial entities and their relationships, such as transaction amounts, direction features, time features, geographic locations, etc. By using this information, the system can perform deep reasoning to identify and analyze complex fund flow paths. Specific steps may include:
[0108] Preliminary analysis and node screening: The system first screens high-risk nodes in the target knowledge graph. High-risk nodes are usually marked by features such as historical transaction records, geographic location, and direction of capital flow. These nodes may represent suspicious accounts, entities that frequently conduct large transactions, or accounts that have participated in multiple cross-border transactions.
[0109] Path reasoning: Based on the selected high-risk nodes, the system starts the path reasoning algorithm. Path reasoning focuses on all the intermediate nodes and edges that funds flow through from a high-risk node to the target node. The system uses the relational data in the knowledge graph to infer the possible flow path of funds and identify suspicious behaviors, such as circular transfer of funds and layered transfers.
[0110] Pattern matching: The system matches the inferred fund flow paths with known money laundering patterns. These patterns can include typical money laundering techniques, such as split transactions, circular transactions, and cross-region transactions. Through pattern matching, the system can quickly identify which paths meet the characteristics of money laundering and mark these paths as high risk.
[0111] Reasoning result analysis: Once the system identifies a high-risk path, further reasoning analysis will focus on key nodes and key relationships. The system will analyze the transaction frequency, transaction amount changes, and direction characteristics between these nodes to further verify whether these relationships are highly correlated with money laundering behavior.
[0112] Generate reports and warnings: Finally, the system generates a detailed analysis report based on the inference results, including the identified high-risk capital flow paths, the high-risk nodes involved, and potential money laundering patterns. The system will also send warning signals to relevant departments, suggesting further investigation and action.
[0113] By combining and optimizing the multi-dimensional features of nodes and edges in the preliminary knowledge graph, a more accurate and dynamic target knowledge graph can be generated. The system's ability to analyze capital flows and relationship changes in complex financial networks has been significantly enhanced, especially in anti-money laundering scenarios, which can more effectively identify hidden money laundering paths and abnormal capital flows, and enhance the risk prevention and control capabilities of the financial system.
[0114] The present invention relates to a method for constructing a knowledge graph. According to the needs of constructing a knowledge graph, multiple entity types participating in an activity are identified and determined, and the basic relationships between the entity types are defined. A preliminary knowledge graph is formed by constructing the entity types and the basic relationships into an initial graph structure in the form of nodes and edges. According to the time characteristics of the basic relationships, a temporal feature weight matrix is created, and it is stored in the preliminary knowledge graph together with the attributes of the basic relationships. Then, directional features are extracted from the basic relationships, a directional feature matrix is generated, and stored together with other features. The multi-dimensional features of the nodes and edges in the preliminary knowledge graph are combined and optimized, and finally an updated representation is generated, and a target knowledge graph is formed. The present invention can not only dynamically adapt to the knowledge needs in different scenarios, but also significantly improve the performance of the knowledge graph in temporal analysis and directional reasoning through the introduction of temporal features and directional features.
[0115] In one embodiment, the above S20 includes:
[0116] S201, constructing the entity type and the basic relationship into an initial graph structure in the form of nodes and edges to form a preliminary relationship network;
[0117] S202, expanding the preliminary relationship network into a complete knowledge graph structure, determining the node type and edge type in the knowledge graph, assigning a feature vector to each node and edge, and forming a basic representation of the knowledge graph;
[0118] S203, creating a vector representation for each basic relationship, including type information and time characteristics of the basic relationship;
[0119] S204, embedding the attributes of the basic relationship into the node and edge representation of the knowledge graph, and jointly learning with the node embedding to form the preliminary knowledge graph.
[0120] In this embodiment, all financial entities and the relationships between them are mapped as nodes and edges in a graph structure. Nodes represent financial entities (such as customers, accounts, companies, etc.), while edges represent basic relationships between entities (such as transfers, loans, etc.). In this way, a preliminary relationship network is formed, showing the basic financial network structure.
[0121] The expansion is based on the preliminary relationship network to further enrich the structure and content of the graph. Specifically, by adding more node types and edge types (such as classifying customers into high-risk and low-risk, or dividing transactions into normal transactions and suspicious transactions), the knowledge graph can more comprehensively represent complex financial networks.
[0122] A feature vector is a set of numerical vectors used to describe the properties of a node or edge. For example, a node's feature vector may include the entity's type, risk score, transaction frequency, etc., while an edge's feature vector may include transaction amount, direction features, time features, etc. These feature vectors give each node and edge in the knowledge graph unique properties, making the graph more expressive.
[0123] A detailed vector representation is created for each basic relationship, which contains the type information (such as transfer, loan) and time characteristics (such as the time point or frequency of transaction) related to the relationship. This vector representation helps to accurately capture the characteristics of the relationship in the graph and provide basic data for subsequent analysis.
[0124] Embedding refers to integrating the attributes of the underlying relationship (such as time features, transaction amounts, etc.) into the representation of nodes and edges. This step uses joint learning to allow the representation of nodes and edges to influence and optimize each other, thereby generating a graph structure that is more in line with the actual situation. Through this joint learning process, the system ultimately generates a preliminary knowledge graph that can more accurately reflect the complexity and dynamics of financial relationships.
[0125] Through these steps, the system of this embodiment can expand from the preliminary relationship network and generate a more comprehensive and accurate preliminary knowledge graph, so that it can not only display the basic financial network structure, but also capture more complex financial relationships and their characteristics. Especially in the anti-money laundering scenario, the system significantly enhances the ability to identify complex capital flows and potential risks through joint learning and feature embedding, and effectively improves the depth and accuracy of financial data analysis.
[0126] In one embodiment, the above S204 includes:
[0127] S2041, extracting a relationship type feature from each basic relationship, where the relationship type feature is used to describe a specific property of the basic relationship and is represented as a first Embedding vector;
[0128] S2042, extracting event occurrence time features from each basic relationship, wherein the event occurrence time features are used to represent the time sequence or time point of occurrence of the basic relationship and are represented as a second Embedding vector;
[0129] S2043, combining the first Embedding vector with the second Embedding vector, and inputting the vectors together with the Embedding vectors of the corresponding nodes into the CompGCN model for joint learning;
[0130] S2044, generating updated feature representations of nodes and edges through joint learning of the CompGCN model, integrating the updated feature representations of nodes and edges into the graph structure, and generating the preliminary knowledge graph.
[0131] In this embodiment, the relationship type feature refers to information used to describe the nature of financial relationships, such as transfers, loans, investments, etc. These features are represented as vectors through a specific algorithm (such as the Embedding method), and this vector is the first Embedding vector. This vector can express the nature of the relationship in numerical form, which is convenient for calculation and analysis. The event occurrence time feature is used to record the time information of financial relationships, such as the time point or frequency of transactions. These time features are converted into the second Embedding vector through the Embedding method and expressed in the form of a numerical vector to capture information on the time dimension. This is very important for analyzing the timing of capital flows and identifying abnormal trading behaviors. After combining the relationship type feature (the first Embedding vector) with the time feature (the second Embedding vector), a comprehensive feature vector is formed. This feature vector is input into the CompGCN (graph convolutional network) model together with the Embedding vector of the corresponding node. Through joint learning, the model can capture the complex financial relationships between nodes, especially in scenarios with strong dynamics and timing. In the CompGCN model, the feature representations of nodes and edges are processed by multiple layers of convolution and activation functions to generate updated representations. These updated representations can more accurately reflect the roles and relationships of nodes and edges in financial networks. Ultimately, these features are integrated into the graph structure to form a preliminary knowledge graph. This knowledge graph not only covers the static information of financial relationships, but also dynamically reflects the complex paths of capital flows.
[0132] Through the above steps, this embodiment can generate a dynamic and rich preliminary knowledge graph, which can effectively analyze and identify complex capital flow patterns.
[0133] In one embodiment, the above S50 includes:
[0134] S501, embedding multi-dimensional features for each node and edge in the preliminary knowledge graph, vectorizing the attribute features, time features, direction features and relationship type features of the nodes and edges to form an initial feature representation;
[0135] S502, inputting the initial feature representation into the CompGCN model, aggregating the multi-dimensional features of nodes and edges through multi-layer graph convolution operations to integrate feature information of the node and its adjacent nodes and associated edges;
[0136] S503, after each layer of graph convolution operation, a nonlinear activation function is applied to activate the aggregated features to improve the feature representation of nodes and edges;
[0137] S504, after multi-layer graph convolution and nonlinear activation processing, the features output by each layer are combined to generate updated representations of nodes and edges;
[0138] S505, reapply the updated representations of nodes and edges to the preliminary knowledge graph to replace the original representations, and finally form the target knowledge graph.
[0139] In this embodiment, multi-dimensional feature embedding refers to converting various attributes of nodes and edges (such as node type, edge relationship type, transaction time, directionality, etc.) into vector representations. These feature vectors provide a rich description for each node and edge, making them not just simple connections in the graph, but carrying specific information and being able to express more complex relationships.
[0140] The initial feature representation is input into the CompGCN model, which processes these features through multiple layers of graph convolution operations (Graph Convolutional Network, GCN). In each layer of convolution, the model aggregates the features of the node with the features of its adjacent nodes and their associated edges. This process gradually integrates more contextual information through layer-by-layer convolution, so that the representation of each node and edge can contain a wider range of network information.
[0141] Non-linear activation functions (such as ReLU and Sigmoid) are used to process aggregated features after each layer of convolution operations. By applying these activation functions, the model can introduce non-linear capabilities, making the feature representation of nodes and edges more complex and sophisticated.
[0142] After multiple convolutional layers and activation functions, the model generates updated node and edge representations. These updated representations incorporate multi-dimensional information and can more accurately reflect the roles and relationships of nodes and edges in the graph.
[0143] Finally, the system reapplies the updated node and edge representations to the preliminary knowledge graph, replacing the previous initial representations to form the target knowledge graph. This target knowledge graph has higher expressive power and analytical accuracy, and can support complex reasoning and decision-making processes, especially in financial network analysis and anti-money laundering scenarios.
[0144] In one specific implementation, the system not only extracts basic features of nodes and edges (such as transaction amount, time features, and direction features), but also adds features such as risk score and geographic location. These newly added multi-dimensional features further enrich the initial feature representation, allowing the system to more comprehensively analyze the capital flow path and potential money laundering risks in cross-border transactions.
[0145] Through the above steps, this embodiment can generate an optimized target knowledge graph. Especially in the anti-money laundering scenario, the system can more accurately analyze and identify complex capital flow paths. By combining multi-dimensional features and graph convolutional networks, the system improves the ability to express financial relationships, and can more deeply understand and reveal abnormal behaviors hidden in financial networks, thereby effectively enhancing the security and compliance of the financial system.
[0146] In one embodiment, in the above S502, the multi-dimensional features of nodes and edges are aggregated through multi-layer graph convolution operations, including:
[0147] S5021, determining an aggregation function according to multi-dimensional features of nodes and edges in the preliminary knowledge graph;
[0148] S5022, in each layer of graph convolution operation, combining the node's own features with the features of its neighboring nodes to generate an updated node representation, and combining the edge's own features with the features of its associated nodes to generate an updated edge representation;
[0149] S5023, in the multi-layer graph convolution operation, the aggregation function is applied layer by layer, and each layer performs new aggregation and update based on the node and edge representations generated by the previous layer, gradually optimizing the representation of nodes and edges to capture deeper feature information.
[0150] In this embodiment, the system first analyzes the multi-dimensional features of each node and edge in the preliminary knowledge graph, which may include attribute features, time features, direction features, relationship type features, etc. Based on these features, the system selects a suitable aggregation function, which will be used for subsequent graph convolution operations. The selection of the aggregation function is crucial to the final node and edge representation, which determines how to integrate feature information of different dimensions.
[0151] The choice of aggregation function can be based on the type of node and edge features. For example, for numerical features (such as transaction amount, account balance), you can use weighted average or sum function to balance the importance of different features. For categorical features (such as account type, transaction type), you can use the majority or voting mechanism to determine the most representative category.
[0152] You can also choose an aggregation function based on your ultimate goal. For example, if your goal is to detect abnormal trading behavior, you may prefer to use the maximum function to highlight extreme values. If your goal is to capture the overall trend of the network, using a weighted average can better reflect the overall characteristics.
[0153] When choosing an aggregation function, consider the connection complexity of nodes and edges in the network: in a dense network (where there are many nodes and edges and they are closely related to each other), a weighted average can be used to balance the influence of different nodes and edges. In a sparse network (where there are few nodes and edges and the relationships are loose), a summation function can be used to enhance the influence of fewer connected features.
[0154] Some aggregation functions (such as weighted average) make it easy to explain the behavior of the model, while other complex aggregation methods may be difficult to understand. In some application scenarios, easy interpretability may be an important criterion for selecting an aggregation function.
[0155] In graph convolution operations, the system combines the features of each node with the features of its neighboring nodes. This combination process allows the representation of each node to contain more information about its surrounding environment. Similarly, the system combines the features of the edge with the features of its associated nodes to generate an updated edge representation. This combination process can capture deeper relationship information in the network structure, making the representation of nodes and edges more accurate and contextually relevant.
[0156] The system optimizes the representation of nodes and edges layer by layer through multi-layer graph convolution operations. In each layer of operation, the system applies the previously determined aggregation function to perform new aggregation and updates based on the node and edge representations generated in the previous layer. Each layer of convolution makes the representation of nodes and edges more refined and gradually captures deeper feature information. This layer-by-layer aggregation and optimization process ensures that the final node and edge representation can fully reflect the complex relationships of the entire network.
[0157] In one specific implementation, the system adds geographic location features when processing cross-border capital flows to better analyze the paths and risks of cross-border transactions. The aggregation function uses weighted average to comprehensively consider the impact of transaction amount and geographic location. In multi-layer graph convolution, the system uses four layers of convolution to capture deep cross-border capital flow patterns, and uses the ReLU activation function to improve nonlinear expression capabilities.
[0158] In another specific implementation, the system simplifies the feature dimensions for high-frequency trading scenarios and focuses only on transaction frequency and amount features. The system selects the maximum function as the aggregation function to highlight outliers in high-frequency trading. In the graph convolution operation, the system uses only two layers of convolution to quickly detect abnormal patterns in high-frequency trading, and uses the sigmoid activation function to process the probability output.
[0159] This embodiment can generate more representative and accurate node and edge representations and a more precise target knowledge graph by combining and optimizing the multi-dimensional features of nodes and edges in the preliminary knowledge graph.
[0160] In one embodiment, the above S20 includes:
[0161] S205, representing the entity type as a node, and creating a corresponding node for each entity type in a graph structure;
[0162] S206, representing the basic relationships as edges, and creating corresponding edges for each basic relationship in the graph structure;
[0163] S207, adding a reverse relationship to each basic relationship, forming a reverse edge corresponding to the original relationship in the graph structure;
[0164] S208, adding a self-loop edge to each node in the graph structure to retain the node's own information;
[0165] S209, performing feature vectorization processing on the reverse edges and the self-loop edges, representing the reverse edges and the self-loop edges as vectors, and combining them with the feature vectors of the basic relations to construct an initial graph structure;
[0166] S210, storing the feature vectors of the nodes and edges in an initial graph structure, and finally forming a complete preliminary knowledge graph by integrating basic relationships, reverse edges and self-loop edges.
[0167] In this embodiment, the system first identifies the entity types in all financial activities, such as customers, accounts, companies, etc. Each entity type is mapped to a node in the graph structure, which will serve as the basic elements in the preliminary knowledge graph, representing the key participants in the financial network. Basic relationships, such as transfers, loans, investments, etc., are represented as edges between nodes. Each relationship type is mapped to a corresponding edge in the graph structure, which connects different nodes and shows the direct relationship and interaction between entities.
[0168] To capture bidirectional relationships in financial networks, the system adds a reverse edge to each basic relationship. The reverse edge corresponds to the original edge but in the opposite direction, which can more fully represent the mutuality of capital flows and relationships. Self-loop edges are edges pointing from a node to itself, and are usually used to retain the node's own information, such as account balances, transaction frequencies, etc. This design ensures that in subsequent analysis, the characteristics of the node itself will not be ignored due to its relationship with other nodes.
[0169] After creating reverse edges and self-loop edges, the system performs feature vectorization on these edges and represents them as vectors. These vectors are then combined with the feature vectors of the base relationships to form a more complex and accurate graph structure. This step ensures that the graph structure accurately reflects the multi-dimensional relationships in the financial network. All generated feature vectors are stored in the initial graph structure. By integrating the base relationships, reverse edges, and self-loop edges, the system eventually forms a complete preliminary knowledge graph. This knowledge graph contains the basic structure and key relationships of the financial network and is the basis for subsequent reasoning and analysis.
[0170] In one implementation, the system expands the representation of nodes to include risk scores and historical trading behavior when analyzing high-risk capital flows. The generation rules for reverse edges are adjusted to only generate large cross-border transactions, and weights are increased to highlight their importance. Self-looping edges dynamically update the status of nodes in combination with real-time market data to ensure that the graph reflects current market conditions. The features are vectorized through a deep learning model, and the resulting preliminary knowledge graph has higher timeliness and accuracy.
[0171] In another specific implementation, when the system processes internal transactions of an enterprise, self-loop edges are used to capture the time series data of each node to analyze the changing trend of transaction behavior. The weight of the reverse edge is set to dynamically adjust according to historical data to capture abnormal behavior of reverse capital flow. The feature vectorization adopts a linear embedding method to quickly process large-scale low-dimensional data. The generated preliminary knowledge graph focuses on the analysis of internal capital flow of the enterprise and optimizes the detection ability of transaction risks.
[0172] Through the above steps, the system of this embodiment can build a preliminary knowledge graph containing rich information. The addition of reverse edges enables the network to capture bidirectional relationships, while the introduction of self-loop edges retains the node's own information. Through feature vectorization processing, the graph structure can more accurately represent complex financial relationships. The resulting preliminary knowledge graph provides a solid foundation for further analysis and reasoning, and improves the comprehensiveness and accuracy of financial network analysis.
[0173] In one embodiment, in the above S40, directional features are extracted from each basic relationship, and based on the extracted directional features, a directional feature matrix is created for the basic relationship, including:
[0174] S401, extracting a direction feature from each basic relationship, wherein the direction feature represents the flow direction of funds in the relationship;
[0175] S402, mapping the extracted directional features into binary values, where 0 indicates no directionality or a bidirectional relationship, and 1 indicates a clear directionality or a unidirectional relationship;
[0176] S403, quantizing the mapped directional features, converting them into quantized values that can represent the strength or importance of the directionality, and creating a directional feature matrix based on the quantized directional features.
[0177] In this embodiment, the system extracts directional features from each basic relationship, which are used to indicate the specific flow direction of funds in the relationship. For example, whether funds flow from one account to another, or in both directions. This feature is crucial for accurately modeling and analyzing the flow path of funds, especially when analyzing the flow network of funds, which can help identify the inflow and outflow paths of funds.
[0178] The extracted directional features are mapped to binary values, with 0 representing no directionality (such as bidirectional capital flow) or a multi-directional relationship, and 1 representing a unidirectional relationship with a clear directionality. This binary mapping simplifies the representation of directional features and facilitates subsequent processing and calculation.
[0179] The system further quantifies the mapped directional features and converts them into numerical values that can represent the strength or importance of the directionality. These quantitative values are used to construct a directional feature matrix, which can describe the directional characteristics of capital flows in financial relationships in more detail. This matrix provides basic data for subsequent analysis, especially in the reasoning and detection of complex financial networks.
[0180] In one specific implementation, when analyzing high-risk cross-border transactions, the system extracts directional features not only by considering the direction of capital flow, but also by combining transaction amount and time characteristics, and dynamically adjusts the mapping method to achieve more accurate quantification of directional strength.
[0181] In another specific embodiment, when the system uses the directional characteristic matrix in the capital flow network within the enterprise, it increases the influence of historical transaction data, and the generated matrix can reflect long-term trends and provide stronger support for high-risk transactions in the analysis.
[0182] In other specific implementations, in real-time monitoring scenarios, the system dynamically updates the directional feature matrix to ensure that the analysis results can reflect the latest changes in the network and help to promptly discover potential abnormal transaction behaviors.
[0183] Through the above steps, the system of this embodiment can accurately extract and process the directional features in financial relations, and the directional feature matrix finally generated provides important basic data for subsequent financial network analysis. The quantitative processing of directional features not only simplifies the representation of data, but also improves the model's ability to analyze the path and intensity of capital flow, which helps to more accurately identify potential risks and abnormal behaviors in complex financial relations.
[0184] The present invention also provides a knowledge graph construction device, referring to Figure 2 , Figure 2 This is a functional module diagram of a preferred embodiment of the knowledge graph construction device of the present invention. The knowledge graph construction device comprises:
[0185] The entity and relationship definition module, based on the needs of building a knowledge graph, identifies and determines multiple entity types involved in the activity and defines the basic relationships between the entity types;
[0186] An initial graph structure construction module constructs the entity types and the basic relationships into an initial graph structure in the form of nodes and edges to form a preliminary knowledge graph;
[0187] A time series feature processing module, which creates a time series feature weight matrix according to the time features of the basic relationship, and stores the time series feature weight matrix together with the attributes of the basic relationship in the graph structure of the preliminary knowledge graph;
[0188] A directional feature processing module extracts directional features from each basic relationship, creates a directional feature matrix for the basic relationship based on the extracted directional features, and stores the directional feature matrix together with the attributes of the basic relationship in the graph structure of the preliminary knowledge graph;
[0189] The feature combination and optimization module combines and optimizes the multi-dimensional features of nodes and edges in the preliminary knowledge graph, generates an updated representation, and applies it to the preliminary knowledge graph to form the target knowledge graph.
[0190] The specific implementation of the knowledge graph construction device of the present invention is basically the same as the various embodiments of the above-mentioned knowledge graph construction method, and will not be repeated here.
[0191] The present invention also provides a computer device, such as Figure 3As shown, the computer device may include: a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0192] Those skilled in the art will understand that Figure 3 The hardware structure of the computer device shown in the figure does not constitute a limitation on the computer device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0193] like Figure 3 As shown, the memory 1005 as a storage medium may include an operating system, a network communication module, a user interface module, and a knowledge graph construction program. Among them, the operating system is a program for managing and controlling computer equipment and software resources, supporting the operation of the network communication module, the user interface module, the knowledge graph construction program, and other programs or software; the network communication module is used to manage and control the network interface 1004; the user interface module is used to manage and control the user interface 1003.
[0194] exist Figure 3 In the computer device hardware structure shown, the network interface 1004 is mainly used to connect to the background server and communicate data with the background server; the user interface 1003 is mainly used to connect to the client and communicate data with the client; the processor 1001 can call the knowledge graph construction program stored in the memory 1005 and perform the same operations as the knowledge graph construction method.
[0195] The specific implementation of the computer device of the present invention is basically the same as the various embodiments of the above-mentioned knowledge graph construction method, and will not be repeated here.
[0196] In addition, an embodiment of the present invention also proposes a computer storage medium, on which a knowledge graph construction program is stored. When the knowledge graph construction program is executed by a processor, the steps of the knowledge graph construction method described above are implemented.
[0197] The specific implementation methods of the computer storage medium of the present invention are basically the same as the embodiments of the above-mentioned knowledge graph construction method, and will not be repeated here.
Claims
1. A knowledge graph construction method, characterized in that: The following steps are involved: Based on the needs of building a knowledge graph, identify and determine multiple entity types of activities, and define basic relationships between the entity types; Constructing the entity types and the basic relationships into an initial graph structure in the form of nodes and edges to form a preliminary knowledge graph; Creating a time series feature weight matrix according to the time features of the basic relationship, and storing the time series feature weight matrix together with the attributes of the basic relationship in the graph structure of the preliminary knowledge graph; Extracting directional features from each basic relationship, creating a directional feature matrix for the basic relationship based on the extracted directional features, and storing the directional feature matrix together with the attributes of the basic relationship in the graph structure of the preliminary knowledge graph; The multi-dimensional features of nodes and edges in the preliminary knowledge graph are combined and optimized to generate updated representations, which are applied to the preliminary knowledge graph to form the target knowledge graph.
2. The knowledge graph construction method according to claim 1, characterized in that: The entity types and the basic relationships are constructed into an initial graph structure in the form of nodes and edges to form a preliminary knowledge graph, including: Constructing the entity types and the basic relationships into an initial graph structure in the form of nodes and edges to form a preliminary relationship network; Expanding the preliminary relationship network into a complete knowledge graph structure, determining the node types and edge types in the knowledge graph, assigning feature vectors to each node and edge, and forming a basic representation of the knowledge graph; Create a vector representation for each basic relationship, which contains the type information and time characteristics of the basic relationship; The attributes of the basic relations are embedded into the node and edge representations of the knowledge graph, and jointly learned with the node embeddings to form the preliminary knowledge graph.
3. The knowledge graph construction method according to claim 2, characterized in that: The attributes of the basic relations are embedded into the node and edge representations of the knowledge graph, and jointly learned with the node embedding to form the preliminary knowledge graph, including: Extracting a relation type feature from each basic relation, wherein the relation type feature is used to describe the specific properties of the basic relation and is represented as a first Embedding vector; Extracting event occurrence time features from each basic relationship, wherein the event occurrence time features are used to represent the time sequence or time point of occurrence of the basic relationship and are represented as the second Embedding vector; After combining the first Embedding vector with the second Embedding vector, the vectors are input into the CompGCN model together with the Embedding vectors of the corresponding nodes for joint learning; Through the joint learning of the CompGCN model, the updated feature representations of the nodes and edges are generated, and the updated feature representations of the nodes and edges are integrated into the graph structure to generate the preliminary knowledge graph.
4. The knowledge graph construction method according to claim 1, characterized in that: The multi-dimensional features of nodes and edges in the preliminary knowledge graph are combined and optimized to generate updated representations, which are then applied to the preliminary knowledge graph to form the target knowledge graph, including: Embedding multi-dimensional features for each node and edge in the preliminary knowledge graph, vectorizing attribute features, time features, direction features, and relationship type features of the nodes and edges to form an initial feature representation; The initial feature representation is input into the CompGCN model, and the multi-dimensional features of nodes and edges are aggregated through multi-layer graph convolution operations to integrate the feature information of the node and its adjacent nodes and associated edges; After each layer of graph convolution operation, a nonlinear activation function is applied to activate the aggregated features and improve the feature representation of nodes and edges; After multi-layer graph convolution and nonlinear activation processing, the features output by each layer are combined to generate updated representations of nodes and edges; The updated representations of nodes and edges are reapplied to the preliminary knowledge graph to replace the original representations, and finally the target knowledge graph is formed.
5. The knowledge graph construction method as claimed in claim 4, characterized in that: Through multi-layer graph convolution operations, multi-dimensional features of nodes and edges are aggregated, including: Determine the aggregation function based on the multi-dimensional features of nodes and edges in the preliminary knowledge graph; In each layer of graph convolution operation, the node's own features are combined with the features of neighboring nodes to generate an updated node representation, and the edge's own features are combined with the features of its associated nodes to generate an updated edge representation; In multi-layer graph convolution operations, aggregation functions are applied layer by layer, and each layer performs new aggregation and updates based on the node and edge representations generated by the previous layer, gradually optimizing the representation of nodes and edges to capture deeper feature information.
6. The knowledge graph construction method according to claim 1, characterized in that: The entity types and the basic relationships are constructed into an initial graph structure in the form of nodes and edges to form a preliminary knowledge graph, including: Representing the entity types as nodes, and creating corresponding nodes for each entity type in a graph structure; Representing the basic relations as edges, and creating corresponding edges for each basic relation in the graph structure; Add a reverse relationship to each basic relationship, forming a reverse edge corresponding to the original relationship in the graph structure; Add a self-loop edge to each node in the graph structure to retain the node's own information; Perform feature vectorization on reverse edges and self-loop edges, represent them as vectors, and combine them with the feature vectors of the basic relations to construct the initial graph structure; The feature vectors of the nodes and edges are stored in an initial graph structure, and a complete preliminary knowledge graph is finally formed by integrating basic relationships, reverse edges and self-loop edges.
7. The knowledge graph construction method according to claim 1, characterized in that: Directional features are extracted from each basic relationship, and based on the extracted directional features, a directional feature matrix is created for the basic relationship, including: Extracting a direction feature from each basic relationship, wherein the direction feature represents the flow direction of funds in the relationship; The extracted directional features are mapped to binary values, where 0 indicates no directionality or a bidirectional relationship, and 1 indicates a clear directionality or a unidirectional relationship; The mapped directional features are quantized and converted into quantitative values that can represent the strength or importance of the directionality, and a directional feature matrix is created based on the quantized directional features.
8. A knowledge graph construction device, characterized in that: The knowledge graph construction device comprises: The entity and relationship definition module, based on the needs of building a knowledge graph, identifies and determines multiple entity types involved in the activity and defines the basic relationships between the entity types; An initial graph structure construction module constructs the entity types and the basic relationships into an initial graph structure in the form of nodes and edges to form a preliminary knowledge graph; A time series feature processing module, which creates a time series feature weight matrix according to the time features of the basic relationship, and stores the time series feature weight matrix together with the attributes of the basic relationship in the graph structure of the preliminary knowledge graph; A directional feature processing module extracts directional features from each basic relationship, creates a directional feature matrix for the basic relationship based on the extracted directional features, and stores the directional feature matrix together with the attributes of the basic relationship in the graph structure of the preliminary knowledge graph; The feature combination and optimization module combines and optimizes the multi-dimensional features of nodes and edges in the preliminary knowledge graph, generates an updated representation, and applies it to the preliminary knowledge graph to form the target knowledge graph.
9. A computer device, characterized in that: The computer device includes a memory, a processor, and a knowledge graph construction program stored in the memory and executable on the processor. When the knowledge graph construction program is executed by the processor, the steps of the knowledge graph construction method as described in any one of claims 1 to 7 are implemented.
10. A computer storage medium, characterized in that: The storage medium stores a knowledge graph construction program, which, when executed by a processor, implements the steps of the knowledge graph construction method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Event factuality prediction method and device, electronic equipment, and storage medium
CN113761874A
Cited By
Process knowledge graph dynamic reasoning method and system based on sparse activation
CN120069076A
Method and system for identifying collection implicit fraud based on time sequence atlas
CN122155825A
