WO2023165271A1 - 知识图谱的构建、和图计算 - Google Patents

知识图谱的构建、和图计算 Download PDF

Info

Publication number
WO2023165271A1
WO2023165271A1 PCT/CN2023/071509 CN2023071509W WO2023165271A1 WO 2023165271 A1 WO2023165271 A1 WO 2023165271A1 CN 2023071509 W CN2023071509 W CN 2023071509W WO 2023165271 A1 WO2023165271 A1 WO 2023165271A1
Authority
WO
WIPO (PCT)
Prior art keywords
graph
feature
node
edge
structural
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2023/071509
Other languages
English (en)
French (fr)
Inventor
唐坤
易鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alipay Hangzhou Information Technology Co Ltd
Original Assignee
Alipay Hangzhou Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alipay Hangzhou Information Technology Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to US18/842,582 priority Critical patent/US20250181935A1/en
Publication of WO2023165271A1 publication Critical patent/WO2023165271A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/02Knowledge representation; Symbolic representation
    • G06N5/022Knowledge engineering; Knowledge acquisition
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/36Creation of semantic tools, e.g. ontology or thesauri
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Definitions

  • One or more embodiments of this specification relate to computer technology, and in particular to methods and devices for knowledge graph construction and graph calculation.
  • a graph is an abstract data structure used to represent the relationship between objects, and is described by using nodes (Vertex) and edges (Edge), where nodes represent objects and edges represent relationships between objects.
  • nodes Vertex
  • edges Edge
  • a knowledge graph is generated based on the idea of graph.
  • a knowledge graph is essentially a semantic network that reveals the relationships between entities.
  • each node in the graph has its own various characteristics, and each edge also has its own various characteristics.
  • One or more embodiments of this specification describe a method and device for constructing a knowledge map, a method and a device for computing a graph, which can improve the flexibility of building a knowledge graph and improve the efficiency of graph computing.
  • a method for constructing a knowledge graph which includes: modeling each first type of business data as a node in the graph; modeling each second type of business data as a node in the graph An edge of ; according to the predetermined structural characteristics corresponding to the first type of business data, the structural characteristic value corresponding to each node is obtained; according to the predetermined structural characteristics corresponding to the second type of business data, the corresponding The structural feature value of each edge; wherein, the structural feature is a common feature in at least two application scenarios; use each node and the structural feature value of the node, each edge and the structural feature value of the edge to construct model to get the structure diagram.
  • the structure diagram after obtaining the structure diagram, it further includes: for each node in the structure diagram, obtaining the current application feature corresponding to the current application scenario from the application characteristics corresponding to the first type of business data; for the structure diagram For each edge in , the current application feature corresponding to the current application scenario is obtained from the application features corresponding to the second type of business data; wherein, the application feature is different from the structural feature; for each A node, mount the eigenvalue corresponding to the current application characteristic of the node to the node, and for each edge in the structure graph, mount the eigenvalue corresponding to the current application characteristic of the edge to the edge to form The feature map corresponding to the current application scenario.
  • the method further includes: setting a corresponding global ID for each node and each edge; storing and dynamically updating the correspondence between the global ID of each node and each application feature of the node in the graph feature library , and save and dynamically update the correspondence between the global ID of each edge and each application feature of the edge.
  • said obtaining the current application feature corresponding to the current application scene from each application feature corresponding to the node includes: finding each application feature corresponding to the global ID of the node from the graph feature library, and finding The current application features applicable to the current application scenario are selected from the various application features.
  • the obtaining the current application features corresponding to the current application scene from the application features corresponding to the edge includes: finding the application features corresponding to the global ID of the edge from the graph feature library, and obtaining the current application features corresponding to the edge from the found Filter out the current application features applicable to the current application scenario from the application features.
  • this method is applied to the construction of a time-series knowledge map.
  • the method is applied in the construction of a knowledge map of transaction business with time series;
  • the first type of business data includes account information;
  • the second type of business data includes transaction behavior;
  • the structure of the node The feature includes an account ID;
  • the structural feature of the edge includes at least one of the following: time, transaction ID, and amount.
  • a graph calculation method which includes: using any of the above methods to obtain a structure graph; loading graph structure information in the structure graph; the graph structure information includes each node, each edge, and each node Structural eigenvalues, structural eigenvalues of each edge, order of nodes and edges; use the loaded graph structure information to perform graph calculations to obtain circulation paths.
  • the graph calculation method further includes: performing graph calculation corresponding to the current application scenario by using the feature graph corresponding to the current application scenario and the flow path.
  • a knowledge map construction device which includes: a model building module configured to model each business data of the first type as a node in the graph; model each business data of the second type Modeling an edge in the graph; the structural feature screening module is configured to obtain the structural feature value corresponding to each node according to the predetermined structural feature corresponding to the first type of business data; according to the predetermined structural feature corresponding to the second type Structural features of type business data to obtain the structural feature value corresponding to each edge, said structural feature is a common feature in at least two application scenarios; the structural graph building module is configured to use each node and the node's The structural eigenvalues, each edge and the structural eigenvalues of the edge are modeled to obtain the structural graph.
  • an application feature screening module configured to obtain, for each node in the structure graph, the current application feature corresponding to the current application scenario from each application feature corresponding to the node; for each edge in the structure graph, from The current application feature corresponding to the current application scene is obtained from each application feature corresponding to the edge, and the application feature is different from the structural feature;
  • the feature graph construction module is configured to be for each node in the structural graph, and will correspond to the The eigenvalues of the current application characteristics of the node are mounted on the node, and for each edge in the structure graph, the eigenvalues of the current application characteristics corresponding to the edge are mounted on the edge to form a corresponding to the current application scenario feature map.
  • a graph calculation device which includes: a knowledge map construction device; and a flow path calculation module configured to load graph structure information in the structure graph; the graph structure information includes each node and each edge , the structural eigenvalue of each node, the structural eigenvalue of each edge, and the sequence of nodes and edges; using the loaded graph structure information to perform graph calculations to obtain circulation paths.
  • the graph calculation device further includes: a business analysis module configured to use the feature graph corresponding to the current application scenario and the flow path to perform graph calculation corresponding to the current application scenario.
  • a computing device including a memory and a processor, wherein executable code is stored in the memory, and when the processor executes the executable code, the method described in any embodiment of this specification is implemented. method.
  • the method and device for constructing a knowledge graph and the method and device for graph calculation provided in the embodiments of this specification do not use all the features of a node and an edge for modeling and calculation, but only use the structural features corresponding to nodes and edges to Carry out modeling and calculation, because structural features are common features in multiple application scenarios, therefore, structural features are part of all features of nodes or edges, so the obtained structure graph is a kind of feature that can be used in various application scenarios
  • the knowledge graph constructed in the embodiment of this specification will greatly reduce the knowledge graph with a simplified structure (or frame structure). The number of features used in the calculation process greatly improves the efficiency of graph calculation.
  • FIG. 1 is a schematic diagram of a knowledge map for sequential transaction services in the prior art.
  • Fig. 2 is a flow chart of a method for constructing a knowledge graph in an embodiment of this specification.
  • Fig. 3 is a schematic diagram of a structural diagram of a sequential transaction service in an embodiment of the present specification.
  • Fig. 4 is a flowchart of a method for constructing a knowledge map in an application scenario according to an embodiment of the present specification.
  • Fig. 5 is a schematic diagram of the composition of a knowledge map constructed in an embodiment of the present specification.
  • Fig. 6 is a flowchart of graph calculation based on a structure graph in an embodiment of the present specification.
  • Fig. 7 is a flowchart of graph calculation in an application scenario according to an embodiment of the present specification.
  • Fig. 8 is a schematic structural diagram of an apparatus for constructing a knowledge graph in an embodiment of the present specification.
  • Fig. 9 is a schematic structural diagram of an apparatus for constructing a knowledge map in another embodiment of the present specification.
  • Fig. 10 is a schematic structural diagram of a graph computing device in an embodiment of the present specification.
  • Fig. 11 is a schematic structural diagram of a graph computing device in another embodiment of the present specification.
  • the knowledge graph of a time-sequential transaction business as an example, as shown in Figure 1 (it can be understood that the number of nodes shown in Figure 1 is only schematic, where N is a positive integer), the The node is the user's account information, and the edge is the transaction behavior between users. Then, the features included in each node involve all the features of the account, such as account ID, crowd, gender, age, education, account information, Asset information, historical transaction habits and other information, and the characteristics included in each side involve all the characteristics of a transaction, such as transaction ID, time of transaction, place of transaction, amount, payment channel, nature of transaction such as Whether it is an illegal transaction, etc.
  • the features included in each node involve all the features of the account, such as account ID, crowd, gender, age, education, account information, Asset information, historical transaction habits and other information
  • the characteristics included in each side involve all the characteristics of a transaction, such as transaction ID, time of transaction, place of transaction, amount, payment channel, nature of transaction such as Whether it is an illegal transaction
  • a knowledge graph will include a large number of nodes and edges. Therefore, the knowledge graph is too large and lacks flexibility.
  • the magnitude of graph calculation is often on the order of tens of billions or more , if all the features of each node and each edge participate in the modeling and calculation process, the efficiency of graph calculation will be greatly reduced.
  • the computing side needs to store all the features of the nodes and all the features of the edges, so that they can be loaded and used during calculation. In this way, a large amount of storage resources of the computing side will be occupied.
  • all the features of each node and each edge participate in the graph calculation process, which will greatly occupy the computing resources of the computing side.
  • Fig. 2 is a flow chart of a method for constructing a knowledge graph in an embodiment of this specification.
  • the subject of execution of the method is a knowledge map construction device. It can be understood that the method can also be executed by any device, device, platform, or device cluster that has computing and processing capabilities. Referring to Fig. 2, the method includes the following steps.
  • Step 201 Model each business data of the first type as a node in the graph.
  • Step 203 Model each business data of the second type as an edge in the graph.
  • Step 205 Obtain the structural feature value corresponding to each node according to the predetermined structural feature corresponding to the first type of service data.
  • Step 207 Obtain the structural feature value corresponding to each edge according to the predetermined structural feature corresponding to the second type of business data.
  • the structural features are common features in at least two application scenarios.
  • Step 209 Use each node and its structural eigenvalues, each edge and its structural eigenvalues for modeling to obtain a structural diagram, each node and each edge in the structural diagram is mounted with a corresponding Structural eigenvalues.
  • each first type of business data is modeled as a node in the graph.
  • any kind of business data that can represent an object can be modeled as a graph node.
  • an account information can be modeled as a node in the graph.
  • accounts can be divided in units of products/containers, that is to say, different products/containers of the same user will correspond to different account information, and thus correspond to different nodes.
  • user A's bank account corresponds to node 1
  • user A's WeChat account corresponds to node 2.
  • each second type of business data is modeled as an edge in the graph.
  • any kind of business data that can represent the relationship between two objects can be modeled as an edge of the graph.
  • a transaction behavior can be modeled as an edge in .
  • Structural features are common features in at least two application scenarios. That is to say, structural features are features that are concerned in various application scenarios and are used for business analysis and calculation in various application scenarios. Application features are the remaining features except structural features, and different application scenarios will correspond to their respective application features.
  • the embodiment of this specification screens out structural features from various types of features of nodes and edges in advance, because structural features are only a part of many types of features, so it can ensure the accuracy of the features used in the graph calculation process.
  • the number is greatly reduced to improve the calculation efficiency.
  • the structural diagram obtained by using the graph calculation process can reflect the general path and flow applicable to various application scenarios. It can be used for subsequent analysis of various application scenarios, that is, to ensure that subsequent business analysis can be performed.
  • the nodes in the graph are account information
  • the edges are transaction behaviors between two accounts. That is to say, the first type of business data is various account information
  • the second type of business data is various transaction behaviors.
  • the feature that can be used commonly in various application scenarios is the account ID, that is, the account ID will be used no matter what business analysis in any application scenario is performed subsequently.
  • the common feature in each application scenario is at least one of the amount, time, and transaction ID. That is to say, no matter what business analysis in the subsequent application scenario, it will Use at least one of amount, time, and transaction ID.
  • the structural feature corresponding to the account information (that is, the first type of business data) is predefined as: account ID.
  • the application features corresponding to the account information are other features besides the account ID, such as including the group to which the account corresponds, the name, gender, age, education, bank information of the account, asset information, historical transaction habits, etc. various information.
  • the pre-defined structural features corresponding to the transaction behavior include time, transaction ID, and amount; the application features corresponding to the transaction behavior are other features except time, transaction ID, and amount, such as Including the place where the transaction occurred, the payment channel, the transaction scene, whether the transaction was successful, and the nature of the transaction, such as whether it was complained as an illegal transaction, etc.
  • step 205 Obtain the structural feature value corresponding to each node according to the predetermined structural feature corresponding to the first type of service data.
  • step 207 Obtain the structural feature value corresponding to each edge according to the predetermined structural feature corresponding to the second type of business data.
  • each node when modeling, each node only obtains and mounts the characteristic value of the structural feature of account ID, for example, for node 1, account The ID is 2088....0001.
  • account ID is: 5338 etc5; each edge only obtains and mounts the characteristic values of the three structural features of amount, time, and transaction ID.
  • the amount is 10:00 on January 5, 2021, and the transaction ID is 10000001.
  • the amount is 200,000 yuan, the time is 21:00 on February 15, 2021, and the transaction ID is 16009801.
  • step 209 use each node and its structural eigenvalue, each edge and its structural eigenvalue to model to obtain a structural diagram, and each node and each edge in the structural diagram are mounted There are corresponding structural eigenvalues.
  • the structure graph obtained in step 209 is a knowledge graph with a simplified structure and a frame form, and is a common knowledge graph in various application scenarios.
  • a feature map dedicated to one application scenario may be constructed for the application scenario, and the feature maps of different application scenarios are usually different.
  • the process of constructing a feature map dedicated to an application scenario includes the following steps.
  • Step 401 For each node in the structure diagram, obtain the current application feature corresponding to the current application scenario from the application features corresponding to the first type of service data.
  • Step 403 For each edge in the structure graph, obtain the current application feature corresponding to the current application scenario from the application features corresponding to the second type of business data. Wherein, the application features are different from the structural features.
  • Step 405 For each node in the structure graph, mount the feature value corresponding to the current application feature of the node to the node, and for each edge in the structure graph, mount the feature value corresponding to the current application feature of the edge Attached to this edge to form a feature map corresponding to the current application scenario.
  • the application features that a node needs to use include the historical transaction habits of the user corresponding to the account, and the application features that the node does not need include the gender of the user corresponding to the account , the application characteristics that a side needs to use include whether it is complained as an illegal transaction, and the application characteristics that this side does not need include whether the transaction is successful.
  • the application features that a node needs to use include the name and asset information of the user corresponding to the account, and the application features that the node does not need include the user’s corresponding account.
  • the application characteristics that need to be used in one side include the place where the transaction occurs, and the application characteristics that do not need to be used in this side include whether it is complained as an illegal transaction.
  • the process shown in Figure 4 above can be used to first obtain the current application characteristics of a node corresponding to the current application scenario, rather than all the application characteristics of the node, and an edge corresponding to The current application features of the current application scenario, rather than all the application features of the edge.
  • a feature map specially suitable for the current application scene is obtained. It can be understood that using the method in Figure 4, for different For application scenarios, different feature maps are usually obtained. In this way, by using the dedicated feature maps corresponding to an application scenario for graph calculation, targeted analysis can be obtained to obtain the analysis results for the application scenario, such as whether it is gambling or not. , or if fraud has occurred.
  • a graph feature library can be established in advance, and all application features that are not used in the structure diagram during modeling are first saved in the graph feature library, and can be saved according to the ID number and application feature The corresponding relationship is saved, that is, each node and each edge is set with a corresponding global ID, which can uniquely identify a node and an edge in the entire link.
  • save and Dynamically update the correspondence between the global ID of each node and the application features of the node at the same time, in the graph feature library, save and dynamically update the correspondence between the global ID of each edge and the application features of the edge relation. For example, save the correspondence between the global ID of node 1 and each application feature of node 1 in the graph feature database in the above figure 3, and save the correspondence between the global ID of edge 1 and each application feature of edge 1 in the graph feature database middle.
  • a specific implementation process of the above-mentioned step 401 includes: finding the application features corresponding to the global ID of the node from the graph feature library, and screening out the current application features applicable to the current application scene from the found application features.
  • a specific implementation process of the above step 403 includes: finding the application features corresponding to the global ID of the edge from the graph feature database, and screening out the current application features applicable to the current application scene from the found application features .
  • the method of first separating and then mounting is adopted. That is, all the features of nodes and edges are separated first, that is, the structural features and application features are separated, so that the structure graph is obtained by using the simplified features, and then the separated specific application features are mounted on the structure graph according to the application scenarios , that is, to combine the graph structure and features, so as to restore the complete feature graph suitable for an application scenario, so that the graph calculation of the specific application scenario can be performed.
  • the structure diagram that is, the framework structure of the knowledge graph
  • the feature map corresponding to each application scenario is obtained through the process shown in Figure 4.
  • the construction The knowledge map of can be shown in Figure 5 (it can be understood that the number of feature maps shown in Figure 5 is only schematic, where L is a positive integer), including a structure map and at least one feature map.
  • the graph calculation process includes the following steps.
  • Step 601 Get the structure diagram.
  • the structural diagram can be obtained by using the method of any embodiment of this specification.
  • Step 605 Perform graph calculation using the loaded graph structure information to obtain a flow path.
  • various methods of graph computing can be used to obtain the flow paths between nodes, such as traversal algorithms and community detection (Community Detection) algorithms.
  • step 605 includes the following steps.
  • Step 6051 Load the graph structure information in the structure graph.
  • the graph structure information includes each node, each edge, the structural feature value of each node, the structural feature value of each edge, and the sequence of nodes and edges. That is, no applied features of any nodes and edges will be loaded.
  • Step 6053 Only use the loaded graph structure information for message propagation, storage and calculation, and do not use application features for message propagation and storage.
  • the knowledge map constructed based on the embodiments of this specification will greatly reduce the number of features used in the graph calculation process and greatly improve the efficiency of graph calculations.
  • the calculation party does not need to store the values of all the features of massive nodes and edges, but only needs to store the values of the structural features of each node and edges. Therefore, The occupation of storage resources is greatly reduced.
  • the graph calculation process shown in Figure 6 above it is not necessary to propagate the values of all characteristics of massive nodes and edges between nodes, but only the values of structural characteristics need to be propagated. Bandwidth resources are saved.
  • Fig. 7 specifically includes the following steps.
  • Step 701 Get the feature map corresponding to the current application scene.
  • Step 703 Obtain the circulation path calculated by using the structure diagram.
  • Step 705 Perform graph calculation corresponding to the current application scenario by using the feature map and the flow path corresponding to the current application scenario.
  • the complete time-series flow path of each fund can be calculated through the calculation process of step 605 above, and this time-series flow path can be used in various subsequent application scenarios
  • illegal business such as money laundering
  • illegal business such as fraud
  • the method in the embodiment of this specification can be applied to the construction of a sequential knowledge graph and graph calculation, such as the above-mentioned construction of a sequential knowledge graph of a transaction business and the corresponding graph calculation.
  • an enterprise can be a node
  • an event such as a price increase event of a certain product can be an edge
  • the ID of the enterprise can be the structural feature of the node
  • other information of the enterprise such as the establishment time, and the relationship with other companies Whether it is a subsidiary, establishment location, legal person, etc. can be the application characteristics of the node
  • the event ID can be the structural characteristics of the edge
  • the time, place, content, etc. of the event can be the application characteristics of the edge.
  • the framework structure of the knowledge map for event business can be obtained, that is, the structural diagram, and then for different application scenarios, such as the application scenario of analyzing the reasons for the rise of a company's stock price and the application of analyzing the profit and loss of a company scenario, feature maps corresponding to different application scenarios can be obtained based on the method described in FIG. 4 above.
  • the structure diagram obtained in Figure 2 the flow path between enterprises based on the event impact relationship can be obtained.
  • the root cause of the event impact can be analyzed for an application scenario.
  • a device for constructing a knowledge graph includes: a model building module 801 configured to model each first type of business data into a Node; each second type of business data is modeled as an edge in the graph; the structural feature screening module 802 is configured to obtain the corresponding to each node according to the predetermined structural feature corresponding to the first type of business data Structural feature value; According to the predetermined structural feature corresponding to the second type of business data, the structural feature value corresponding to each edge is obtained; wherein, the structural feature is a common feature in at least two application scenarios;
  • the structural graph construction module 803 is configured to use each node and the structural eigenvalue of the node, each edge and the structural eigenvalue of the edge to perform modeling to obtain a structural graph, and each node and each edge in the structural graph are
  • the mount has a corresponding structure feature value.
  • an application feature screening module 901 configured to, for each node in the structure diagram, obtain the corresponding current application scenario from each application feature corresponding to the node The current application feature; for each edge in the structure diagram, the current application feature corresponding to the current application scene is obtained from each application feature corresponding to the edge; wherein, the application feature is different from the structural feature; the feature map
  • the construction module 902 is configured to, for each node in the structure diagram, mount the characteristic value corresponding to the current application characteristic of the node on the node, and for each edge in the structure diagram, mount the characteristic value corresponding to the current application characteristic of the edge The eigenvalues of are attached to this edge to form a feature map corresponding to the current application scenario.
  • the device is applied to the construction of a time-series knowledge graph, specifically, the construction of a time-series transaction business knowledge graph;
  • the first type of business data includes Account information;
  • the second type of business data includes transaction behavior;
  • the structural features of nodes include account IDs;
  • the structural features of edges include at least one of the following: time, transaction ID, and amount.
  • An embodiment of the present specification provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed in a computer, the computer is instructed to execute the method in any one of the embodiments in the specification.
  • An embodiment of this specification provides a computing device, including a memory and a processor, wherein executable code is stored in the memory, and when the processor executes the executable code, the implementation of any one of the embodiments in the specification is implemented. method.
  • the structure shown in the embodiment of the present specification does not constitute a specific limitation on the device of the embodiment of the present specification.
  • the above-mentioned apparatus may include more or less components than those shown in the illustrations, or combine certain components, or separate certain components, or arrange different components.
  • the illustrated components may be realized in hardware, software, or a combination of software and hardware.
  • each embodiment in this specification is described in a progressive manner, the same and similar parts of each embodiment can be referred to each other, and each embodiment focuses on the differences from other embodiments.
  • the description is relatively simple, and for relevant parts, please refer to part of the description of the method embodiment.
  • the functions described in the present invention may be implemented by hardware, software, pendants or any combination thereof.
  • the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Business, Economics & Management (AREA)
  • Evolutionary Computation (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Artificial Intelligence (AREA)
  • Finance (AREA)
  • Accounting & Taxation (AREA)
  • Databases & Information Systems (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本说明书涉及知识图谱的构建方法和图计算。根据一种知识图谱的构建方法的示例,将每一个第一类型的业务数据建模成图中的一个节点;将每一个第二类型的业务数据建模成图中的一条边;根据预先确定的对应于第一类型的业务数据的结构特征,得到对应于每一个节点的结构特征值;根据预先确定的对应于第二类型的业务数据的结构特征,得到对应于每一条边的结构特征值,所述结构特征为在至少两个应用场景中通用的特征;利用每一个节点及该节点的结构特征值、每一条边及该边的结构特征值进行建模,得到结构图,结构图中的每一个节点及每一条边均挂载有对应的结构特征值。

Description

知识图谱的构建、和图计算 技术领域
本说明书一个或多个实施例涉及计算机技术,尤其涉及用于知识图谱构建、图计算的方法及装置。
背景技术
图(Graph)是用于表示对象之间关联关系的一种抽象数据结构,使用节点(Vertex)和边(Edge)进行描述,其中,节点表示对象,边表示对象之间的关系。随着信息的爆炸式增长,为了体现各种信息之间的语义关系,基于图的思路产生了知识图谱(Knowledge Graph)。知识图谱本质上是一种揭示实体之间关系的语义网络。在知识图谱中,图中的每一个节点都具有自己的各种特征,每一个边也具有自己的各种特征。
目前构建的知识图谱中,会将一个节点及一条边的所有特征都挂载在知识图谱中,使得构建出的知识图谱异常庞大,缺乏灵活性。在基于此种知识图谱进行图计算的过程中,节点和边的所有特征都会参与计算过程,这样就会导致图计算的效率大大降低。
发明内容
本说明书一个或多个实施例描述了知识图谱的构建方法和装置、图计算方法及装置,能够提高知识图谱构建的灵活性,并提高图计算的效率。
根据第一方面,提供了一种知识图谱的构建方法,其包括:将每一个第一类型的业务数据建模成图中的一个节点;将每一个第二类型的业务数据建模成图中的一条边;根据预先确定的对应于第一类型的业务数据的结构特征,得到对应于每一个节点的结构特征值;根据预先确定的对应于第二类型的业务数据的结构特征,得到对应于每一条边的结构特征值;其中,所述结构特征为在至少两个应用场景中通用的特征;利用每一个节点及该节点的结构特征值、每一条边及该边的结构特征值进行建模,得到结构图。
其中,在所述得到结构图后,进一步包括:针对结构图中的每一个节点,从对应于第一类型的业务数据的各应用特征中得到对应于当前应用场景的当前应用特征;针对结构图中的每一条边,从对应于第二类型的业务数据的各应用特征中得到对应于当前应用场景的当前应用特征;其中,所述应用特征与所述结构特征不同;针对结构图中的每一 个节点,将对应该节点的当前应用特征的特征值挂载到该节点上,针对结构图中的每一条边,将对应该边的当前应用特征的特征值挂载到该边上,以形成对应于当前应用场景的特征图。
其中,该方法进一步包括:对每一个节点及每一条边均设置对应的全局ID;在图特征库中,保存并动态更新每一个节点的全局ID与该节点的各应用特征之间的对应关系,以及保存并动态更新每一条边的全局ID与该边的各应用特征之间的对应关系。相应地,所述从对应于该节点的各应用特征中得到对应于当前应用场景的当前应用特征,包括:从图特征库中查找到对应于该节点的全局ID的各应用特征,从查找到的该各应用特征中筛选出适用于当前应用场景的当前应用特征。所述从对应于该边的各应用特征中得到对应于当前应用场景的当前应用特征,包括:从图特征库中查找到对应于该边的全局ID的各应用特征,从查找到的该各应用特征中筛选出适用于当前应用场景的当前应用特征。
其中,该方法应用于具有时序性的知识图谱的构建中。
其中,该方法应用于具有时序性的交易类业务的知识图谱的构建中;则所述第一类型的业务数据包括账户信息;所述第二类型的业务数据包括交易行为;所述节点的结构特征包括账户ID;所述边的结构特征包括如下中的至少一项:时间、交易ID、金额。
根据第二方面,提供了图计算方法,其中包括:利用上述任一方法得到结构图;加载结构图中的图结构信息;所述图结构信息包括每一个节点、每一条边、每一个节点的结构特征值、每一条边的结构特征值、节点及边的顺序;利用加载的所述图结构信息进行图计算,得到流转路径。
得到结构图之后,该图计算方法进一步包括:利用对应于当前应用场景的特征图及所述流转路径,进行对应于当前应用场景的图计算。
根据第三方面,提供了知识图谱的构建装置,其包括:模型建立模块,配置为将每一个第一类型的业务数据建模成图中的一个节点;将每一个第二类型的业务数据建模成图中的一条边;结构特征筛选模块,配置为根据预先确定的对应于第一类型的业务数据的结构特征,得到对应于每一个节点的结构特征值;根据预先确定的对应于第二类型的业务数据的结构特征,得到对应于每一条边的结构特征值,所述结构特征为在至少两个应用场景中通用的特征;结构图构建模块,配置为利用每一个节点及该节点的结构特征值、每一条边及该边的结构特征值进行建模,得到结构图。
进一步包括:应用特征筛选模块,配置为针对结构图中的每一个节点,从对应于该 节点的各应用特征中得到对应于当前应用场景的当前应用特征;针对结构图中的每一条边,从对应于该边的各应用特征中得到对应于当前应用场景的当前应用特征,所述应用特征与所述结构特征不同;特征图构建模块,配置为针对结构图中的每一个节点,将对应该节点的当前应用特征的特征值挂载到该节点上,针对结构图中的每一条边,将对应该边的当前应用特征的特征值挂载到该边上,以形成对应于当前应用场景的特征图。
根据第四方面,提供了图计算装置,其包括:知识图谱的构建装置;以及流转路径计算模块,配置为加载结构图中的图结构信息;所述图结构信息包括每一个节点、每一条边、每一个节点的结构特征值、每一条边的结构特征值、节点及边的顺序;利用加载的所述图结构信息进行图计算,得到流转路径。
所述图计算装置进一步包括:业务分析模块,配置为利用对应于当前应用场景的特征图及所述流转路径,进行对应于当前应用场景的图计算。
根据第五方面,提供了一种计算设备,包括存储器和处理器,所述存储器中存储有可执行代码,所述处理器执行所述可执行代码时,实现本说明书任一实施例所述的方法。
本说明书实施例提供的知识图谱的构建方法及装置、图计算的方法及装置,不是使用一个节点及一条边的所有特征来进行建模及计算,而是仅使用节点及边对应的结构特征来进行建模及计算,因为结构特征是在多个应用场景中通用的特征,因此,结构特征是节点或边的所有特征中的一部分特征,因此得到的结构图是一种能够在各种应用场景中通用的、具有精简结构(或者说具有框架结构)的知识图谱,面对目前信息量的爆炸式增长及诸如百亿级别的图计算,基于本说明书实施例中构建的知识图谱将大大降低图计算过程中所利用的特征的数量,大大提高图计算的效率。
附图说明
为了更清楚地说明本说明书实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本说明书的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是在现有技术中对于具有时序性的交易类业务的知识图谱的示意图。
图2是本说明书一个实施例中知识图谱的构建方法的流程图。
图3是在本说明书一个实施例中对于具有时序性的交易类业务的结构图的示意图。
图4是本说明书一个实施例在一种应用场景中进行知识图谱的构建方法的流程图。
图5是本说明书一个实施例中构建的知识图谱的组成示意图。
图6是本说明书一个实施例中基于结构图进行图计算的流程图。
图7是本说明书一个实施例在一种应用场景中进行图计算的流程图。
图8是本说明书一个实施例中知识图谱的构建装置的结构示意图。
图9是本说明书另一个实施例中知识图谱的构建装置的结构示意图。
图10是本说明书一个实施例中图计算装置的结构示意图。
图11是本说明书另一个实施例中图计算装置的结构示意图。
具体实施方式
如前所述,现有技术中构建知识图谱时,节点和边的所有特征都会参与建模过程,相应地,无论哪一个应用场景,在进行图计算时都会使用节点和边的所有特征,这样就会导致知识图谱过于庞大,图计算的效率大大降低。
比如,以具有时序性的交易类业务的知识图谱为例,参见图1所示(可以理解,图1中示出的节点的数量仅仅是示意性的,其中N为正整数),图中的节点为用户的账户信息,边为用户之间的交易行为,那么,每一个节点包括的特征就涉及到账户的所有特征,比如账户ID、人群、相关用户的性别、年龄、学历、账户信息、资产信息、历史交易习惯等各种信息,而每一个边包括的特征就涉及到一个交易的所有特征,比如交易ID、交易发生的时间、交易发生的地点、金额、支付渠道、交易的性质比如是否属于违规交易等。而随着网络信息的爆炸式增长,一个知识图谱中会包括海量的节点及边,因此,导致知识图谱过于庞大,缺乏灵活性,同时,图计算的量级往往是百亿级别以上的量级,如果每一个节点及每一个边的所有特征都参与建模及计算过程,必定会大大降低图计算的效率。比如,在图计算的过程中,计算方需要把节点的所有特征及边的所有特征都存储起来,以便计算时加载使用,这样,就会占用计算方的大量存储资源。再如,每一个节点及每一个边的所有特征都参与图计算过程,会大大占用计算方的计算资源。
下面结合附图,对本说明书提供的方案进行描述。
图2是本说明书一个实施例中知识图谱的构建方法的流程图。该方法的执行主体为知识图谱的构建装置。可以理解,该方法也可以通过任何具有计算、处理能力的装置、 设备、平台、设备集群来执行。参见图2,该方法包括以下步骤。
步骤201:将每一个第一类型的业务数据建模成图中的一个节点。
步骤203:将每一个第二类型的业务数据建模成图中的一条边。
步骤205:根据预先确定的对应于第一类型的业务数据的结构特征,得到对应于每一个节点的结构特征值。
步骤207:根据预先确定的对应于第二类型的业务数据的结构特征,得到对应于每一条边的结构特征值。
其中,结构特征为在至少两个应用场景中通用的特征。
步骤209:利用每一个节点及该节点的结构特征值、每一条边及该边的结构特征值进行建模,得到结构图,结构图中的每一个节点及每一条边均挂载有对应的结构特征值。
可见,在图2所示的知识图谱的构建过程中,不是使用一个节点及一条边的所有特征来进行建模,而是仅使用节点及边对应的结构特征来进行建模,因为结构特征是在多个应用场景中通用的特征,因此,结构特征是节点或边的所有特征中的一部分特征,因此得到的结构图是一种能够在各种应用场景中通用的、具有精简结构(或者说具有框架结构)的知识图谱,此种知识图谱更具有灵活性。
下面结合附图及具体的例子对图2中的每一个步骤分别进行说明。
首先对于步骤201:将每一个第一类型的业务数据建模成图中的一个节点。
本步骤中,可以将任意一种能够表征一种对象的业务数据建模成图的节点。比如,对于交易类业务,可以将一个账户信息建模成图中的一个节。这里,账户可以是以产品/容器为单位划分的,也就是说,同一个用户的不同产品/容器会对应不同的账户信息,也就对应不同的节点。比如,用户A的银行账户对应节点1,用户A的微信账户对应节点2。
接下来对于步骤203:将每一个第二类型的业务数据建模成图中的一条边。
本步骤203中,可以将任意一种能够表征两个对象之间的关系的业务数据建模成图的边。比如,对于交易类业务,可以将一笔交易行为建模成中的一条边。
本说明书实施例预先定义了结构特征和应用特征。结构特征为在至少两个应用场景中通用的特征。也就是说,结构特征是在多种应用场景中都会被关注,并被用于进行多种应用场景的业务分析计算的特征。应用特征是除了结构特征之外剩余的特征,不同的 应用场景会对应各自的应用特征。
为了提高图计算的效率,本说明书实施例预先从节点及边的各种类型的特征中筛选出结构特征,因为结构特征只是众多类型特征中的一部分,因此能保证图计算过程中使用的特征的数量大大减少从而提高计算效率,同时,因为结构特征是在至少两个应用场景中通用的特征,因此利用图计算过程得到的结构图能够体现适用于各种应用场景的通用的路径及流转情况,可用于后续各种应用场景的分析,即保证能够进行后续的业务分析。
比如,以交易类的业务为例,在建模时,图中的节点为账户信息,边为两个账户之间的交易行为。也就是说,第一类型的业务数据是各种账户信息,第二类型的业务数据是各种交易行为。对应于账户信息这种类型的业务数据,能够在各个应用场景中通用的特征是账户ID,也就是说,无论后续进行何种应用场景中的业务分析,都会使用该账户ID。对应于交易行为这种类型的业务数据,能够在各个应用场景中通用的特征是金额、时间、交易ID中的至少一种,也就是说,无论后续进行何种应用场景中的业务分析,都会使用金额、时间、交易ID中的至少一种。因此,预先定义对应于账户信息(即第一类型的业务数据)的结构特征为:账户ID。这样,对应于账户信息的应用特征为除了账户ID之外的其他特征,比如包括所属人群、该账户对应的用户的姓名、性别、年龄、学历、账户所属银行信息、资产信息、历史交易习惯等各种信息。同时,预先定义对应于交易行为(即第二类型的业务数据)的结构特征包括时间、交易ID、金额;对应于交易行为的应用特征为除了时间、交易ID、金额之外的其他特征,比如包括交易发生的地点、支付渠道、交易场景、交易是否成功、交易的性质比如是否被投诉为违规交易等。
接下来对于步骤205:根据预先确定的对应于第一类型的业务数据的结构特征,得到对应于每一个节点的结构特征值。以及对于步骤207:根据预先确定的对应于第二类型的业务数据的结构特征,得到对应于每一条边的结构特征值。
比如,仍然以上述具有时序性质的交易类业务为例,参见图3所示,在建模时,每一个节点只得到并挂载账户ID这种结构特征的特征值,比如对于节点1,账户ID为2088….0001,对于节点2,账户ID为:5338…..1005;每一条边只得到并挂载金额、时间、交易ID这三种结构特征的特征值,比如对于边1,金额为200元,时间为2021年1月5日10:00,交易ID为10000001,对于边2,金额为20万元,时间为2021年2月15日21:00,交易ID为16009801。
接下来对于步骤209:利用每一个节点及该节点的结构特征值、每一条边及该边的结构特征值进行建模,得到结构图,结构图中的每一个节点及每一条边均挂载有对应的结构特征值。
步骤209中得到的结构图是一种具有精简结构的、框架形式的知识图谱,是在多种应用场景中通用的知识图谱。
如前所述,现有技术中是将节点的所有特征及边的所有特征都构建在知识图谱中,但是除了结构特征在各应用场景中通用之外,不同应用场景中用到的应用特征通常是不相同的。因此,在本说明书实施例中,可以针对应用场景来构建专用于一个应用场景的特征图,不同应用场景的特征图通常不同。参见图4,在本说明书一个实施例中,在步骤209之后,构建专用于一个应用场景的特征图的过程包括以下步骤。
步骤401:针对结构图中的每一个节点,从对应于第一类型的业务数据的各应用特征中得到对应于当前应用场景的当前应用特征。
步骤403:针对结构图中的每一条边,从对应于第二类型的业务数据的各应用特征中得到对应于当前应用场景的当前应用特征。其中,应用特征与所述结构特征不同。
步骤405:针对结构图中的每一个节点,将对应该节点的当前应用特征的特征值挂载到该节点上,针对结构图中的每一条边,将对应该边的当前应用特征的特征值挂载到该边上,以形成对应于当前应用场景的特征图。
下面对图4所示的过程进行说明。
如前所述,预先定义了节点对应的各种应用特征及边对应的应用特征。而不同的应用场景进行分析计算时,使用的应用特征是不完全相同的。比如,对于诈骗分析这种应用场景,在进行图计算时,一个节点需要用到的应用特征包括账户对应的用户的历史交易习惯,该节点不需要用到的应用特征包括账户对应的用户的性别,一条边需要用到的应用特征包括是否被投诉为违规交易,而该边不需要用到的应用特征包括交易是否成功。然而,对于洗钱分析这种应用场景,在进行图计算时,一个节点需要用到的应用特征包括账户对应的用户的姓名及资产信息,该节点不需要用到的应用特征包括账户对应的用户的学历,一条边需要用到的应用特征包括交易发生的地点,而该边不需要用到的应用特征包括是否被投诉为违规交易。
因此,当需要针对一个特定的当前应用场景进行分析时,可以利用上述图4所示过程首先得到一个节点对应于当前应用场景的当前应用特征,而不是节点的全部应用特征, 以及一条边对应于当前应用场景的当前应用特征,而不是边的全部应用特征,在形成了上述的特征图之后,就得到了专门适用于当前应用场景的特征图,可以理解,采用图4的方法,对于不同的应用场景,通常会得到不同的特征图,这样,再利用对应于一个应用场景的专用的特征图进行图计算,就可以有针对性地分析,得到对于该应用场景的分析结果,比如是否为赌博,或者是否出现了欺诈。
在本说明书实施例中,可以预先建立图特征库,在建模时在结构图中未使用的所有的应用特征都先保存在该图特征库中,在保存时可以按照ID号与应用特征的对应关系的方式进行保存,也就是说,对每一个节点及每一条边均分别设置对应的全局ID,这可以在全链路中唯一标识一个节点及一条边,在图特征库中,保存并动态更新每一个节点的全局ID与该节点的各应用特征之间的对应关系;同时,在图特征库中,保存并动态更新每一条边的全局ID与该边的各应用特征之间的对应关系。比如,将上述图3中节点1的全局ID与节点1的各应用特征的对应关系保存在图特征库中,将边1的全局ID与边1的各应用特征的对应关系保存在图特征库中。
当一个节点或者边对应的应用特征更新时,本说明书实施例中只需要在图特征库中进行离线方式的动态更新即可,无需更新结构图。而现有技术中,因为构建的是全链路图,一个节点或者边上加载有所有的特征,如果需要增加或者减少一个特征时,需要修改全链路的配置。可见,本说明书实施例动态更新图特征库的做法,大大降低了工作量,提升了图计算业务的灵活性。
这样,上述步骤401的一种具体实现过程包括:从图特征库中查找到对应于该节点的全局ID的各应用特征,从查找到的该各应用特征中筛选出适用于当前应用场景的当前应用特征。上述步骤403的一种具体实现过程包括:从图特征库中查找到对应于该边的全局ID的各应用特征,从查找到的该各应用特征中筛选出适用于当前应用场景的当前应用特征。
在本说明书的实施例中,因为将所有的应用特征都先保存在图特征库中,在计算得到结构图的过程中,所有应用特征都无需通过消息传输在各节点之间传递,只需要在针对一种具体的应用场景进行业务分析计算时,再从图特征库中找出对应于此种应用场景的应用特征即可,因此,极大提高了计算效率。
结合上述图2及图4所示的过程可以看出,在本说明书实施例中,采用了先分离再挂载的方式。即,先对节点及边的所有特征进行分离,即分离出结构特征及应用特征,从而利用精简的特征得到结构图,之后,再分应用场景将分离出的特定应用特征挂载到 结构图上,即进行图结构及特征的结合,从而还原出适用于一个应用场景的完整的特征图,这样就可以进行具体应用场景的图计算。
通过上述图2所示过程,得到了结构图,即知识图谱的框架结构,之后通过图4所示的过程得到了对应于每一个应用场景的特征图,这样,在本说明书实施例中,构建的知识图谱可以如图5所示(可以理解,图5中示出的特征图的数量仅仅是示意性的,其中L为正整数),包括结构图以及至少一个特征图。
在通过上述图2所示过程得到结构图之后,可以基于该结构图进行图计算,得到节点的流转路径,参见图6,该图计算的过程包括以下步骤。
步骤601:得到结构图。结构图可以是利用本说明书任一实施例的方法得到的。
步骤603:加载结构图中的图结构信息;所述图结构信息包括每一个节点、每一条边、每一个节点的结构特征值、每一条边的结构特征值、节点及边的顺序。
步骤605:利用加载的所述图结构信息进行图计算,得到流转路径。
在本步骤605中,可以针对不同的需求,利用图计算的各种方法得到节点之间的流转路径,比如遍历算法以及社区发现(Community Detection)算法等。
在本说明书一个实施例中,步骤605的具体实现过程包括以下步骤。
步骤6051:加载结构图中的图结构信息。所述图结构信息包括每一个节点、每一条边、每一个节点的结构特征值、每一条边的结构特征值、节点及边的顺序。也就是说,不会加载任何节点及边的应用特征。
步骤6053:只利用加载的图结构信息进行消息传播、存储及计算,而不会利用应用特征进行消息的传播及存储。
面对目前信息量的爆炸式增长及诸如百亿级别的图计算,基于本说明书实施例中构建的知识图谱将大大降低图计算过程中所利用的特征的数量,大大提高图计算的效率。比如,在上述图6所示的图计算的过程中,计算方不需要把海量的节点及边的所有特征的值都存储起来,而只需要存储各个节点及边的结构特征的值,因此,大大减少了对存储资源的占用。再如,在上述图6所示的图计算过程中,无需将海量的节点及边的所有特征的值在节点之间进行消息传播,而只需要将结构特征的值进行消息传播,因此,大大节约了带宽资源。又如,在上述图6所示的图计算过程中,无需将海量的节点及边的所有特征的值都参与计算过程,而只需要将结构特征的值参与计算过程,因此,大大节 约了计算方的计算资源。
在利用图4所示的过程得到了对应于一个应用场景的特征图以及利用图6所示过程得到了节点之间的流转路径之后,则可以在不同的应用场景中进行不同的业务分析,参见图7,具体包括以下步骤。
步骤701:得到对应于当前应用场景的特征图。
步骤703:得到利用结构图计算出的流转路径。
步骤705:利用对应于当前应用场景的特征图及流转路径,进行对应于当前应用场景的图计算。
比如,对于具有时序性质的交易类业务的图计算,通过上述步骤605的计算过程可以计算出每笔资金的完整时序流转路径,而这种时序流转路径可以在后续的多种不同的应用场景中被使用,比如对于洗钱这种违规业务,基于图7所示流程,利用对应于洗钱应用场景的特征图及上述流转路径进行图计算,得到一个用户是否涉及洗钱这种违规业务;再如,对于诈骗这种违规业务,基于图7所示流程,利用对应于诈骗应用场景的特征图及上述流转路径进行图计算,得到一个用户是否涉及诈骗这种违规业务等。
本说明书实施例的方法可以应用于各种类型的知识图谱的构建及图计算。
比如,本说明书实施例的方法可以应用于具有时序性的知识图谱的构建及图计算中,如上述的具有时序性的交易类业务的知识图谱的构建及相应的图计算中。
再如,本说明书实施例的方法应用于不具有时序性的知识图谱的构建及图计算中,比如对于事件类的知识图谱的构建及图计算中。在此类知识图谱中,比如,企业可以是节点,一个事件比如发生了某产品的涨价事件可以是边,企业的ID可以是节点的结构特征,企业的其他信息比如成立时间、与其他公司是否为子公司的关系、成立地点、法人等可以是节点的应用特征;事件ID可以是边的结构特征,事件发生的时间、地点、内容等可以是边的应用特征。基于上述图2所示方法可以得到针对事件类业务的知识图谱的框架结构即结构图,然后针对不同的应用场景,比如分析一个企业的股价上涨的原因的应用场景及分析一个企业盈亏情况的应用场景,则可以基于上述图4所述的方法得到对应于不同应用场景的特征图。基于图2得到的结构图,可以得到企业之间基于事件影响关系的流转路径,基于图4得到的特征图及图6得到的流转路径,可以针对一个应用场景分析事件影响的根本原因。
在本说明书的一个实施例中,提供了一种知识图谱的构建装置,参见图8,该装置 包括:模型建立模块801,配置为将每一个第一类型的业务数据建模成图中的一个节点;将每一个第二类型的业务数据建模成图中的一条边;结构特征筛选模块802,配置为根据预先确定的对应于第一类型的业务数据的结构特征,得到对应于每一个节点的结构特征值;根据预先确定的对应于第二类型的业务数据的结构特征,得到对应于每一条边的结构特征值;其中,所述结构特征为在至少两个应用场景中通用的特征;结构图构建模块803,配置为利用每一个节点及该节点的结构特征值、每一条边及该边的结构特征值进行建模,得到结构图,结构图中的每一个节点及每一条边均挂载有对应的结构特征值。
参见图9,在本说明书装置的一个实施例中,进一步包括:应用特征筛选模块901,配置为针对结构图中的每一个节点,从对应于该节点的各应用特征中得到对应于当前应用场景的当前应用特征;针对结构图中的每一条边,从对应于该边的各应用特征中得到对应于当前应用场景的当前应用特征;其中,所述应用特征与所述结构特征不同;特征图构建模块902,配置为针对结构图中的每一个节点,将对应该节点的当前应用特征的特征值挂载到该节点上,针对结构图中的每一条边,将对应该边的当前应用特征的特征值挂载到该边上,以形成对应于当前应用场景的特征图。
在结合图9描述的本说明书装置的一个实施例中,可以进一步包括图特征库;其中,图特征库,用于保存并动态更新每一个节点的全局ID与该节点的各应用特征之间的对应关系,以及保存并动态更新每一条边的全局ID与该边的各应用特征之间的对应关系;应用特征筛选模块901,配置为执行:从图特征库中查找到对应于该节点的全局ID的各应用特征,从查找到的该各应用特征中筛选出适用于当前应用场景的当前应用特征;从图特征库中查找到对应于该边的全局ID的各应用特征,从查找到的该各应用特征中筛选出适用于当前应用场景的当前应用特征。
在本说明书装置的一个实施例中,该装置应用于具有时序性的知识图谱的构建中,具体可以是具有时序性的交易类业务的知识图谱的构建中;所述第一类型的业务数据包括账户信息;所述第二类型的业务数据包括交易行为;节点的结构特征包括账户ID;边的结构特征包括如下中的至少一项:时间、交易ID、金额。
在本说明书一个实施例中,还提出了一种图计算装置,参见图10,该装置包括知识图谱的构建装置1001和流转路径计算模块1002。知识图谱的构建装置1001采用本说明书任一实施例提供的如结合图8或者图9描述的知识图谱的构建装置实现。流转路径计算模块1002,配置为:加载结构图中的图结构信息,所述图结构信息包括每一个节点、每一条边、每一个节点的结构特征值、每一条边的结构特征值、节点及边的顺序;利用 加载的所述图结构信息进行图计算,得到流转路径。
当图计算装置中采用结合图9描述的知识图谱的构建装置实现时,参见图11,图计算装置可以进一步包括:业务分析模块1101,配置为利用对应于当前应用场景的特征图及所述流转路径,进行对应于当前应用场景的图计算。
本说明书一个实施例提供了一种计算机可读存储介质,其上存储有计算机程序,当所述计算机程序在计算机中执行时,令计算机执行说明书中任一个实施例中的方法。
本说明书一个实施例提供了一种计算设备,包括存储器和处理器,所述存储器中存储有可执行代码,所述处理器执行所述可执行代码时,实现执行说明书中任一个实施例中的方法。
可以理解的是,本说明书实施例示意的结构并不构成对本说明书实施例的装置的具体限定。在说明书的另一些实施例中,上述装置可以包括比图示更多或者更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件、软件或者软件和硬件的组合来实现。
上述装置、系统内的各模块之间的信息交互、执行过程等内容,由于与本说明书方法实施例基于同一构思,具体内容可参见本说明书方法实施例中的叙述,此处不再赘述。
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
本领域技术人员应该可以意识到,在上述一个或多个示例中,本发明所描述的功能可以用硬件、软件、挂件或它们的任意组合来实现。当使用软件实现时,可以将这些功能存储在计算机可读介质中或者作为计算机可读介质上的一个或多个指令或代码进行传输。
以上所述的具体实施方式,对本发明的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上所述仅为本发明的具体实施方式而已,并不用于限定本发明的保护范围,凡在本发明的技术方案的基础之上,所做的任何修改、等同替换、改进等,均应包括在本发明的保护范围之内。

Claims (12)

  1. 知识图谱的构建方法,包括:
    将每一个第一类型的业务数据建模成图中的一个节点;
    将每一个第二类型的业务数据建模成图中的一条边;
    根据预先确定的对应于第一类型的业务数据的结构特征,得到对应于每一个节点的结构特征值;
    根据预先确定的对应于第二类型的业务数据的结构特征,得到对应于每一条边的结构特征值;
    其中,所述结构特征为在至少两个应用场景中通用的特征;
    利用每一个节点及该节点的结构特征值、每一条边及该边的结构特征值进行建模,得到结构图。
  2. 根据权利要求1所述的方法,其中,在所述得到结构图后,进一步包括:
    针对结构图中的每一个节点,从对应于第一类型的业务数据的各应用特征中得到对应于当前应用场景的当前应用特征;
    针对结构图中的每一条边,从对应于第二类型的业务数据的各应用特征中得到对应于当前应用场景的当前应用特征;
    其中,所述应用特征与所述结构特征不同;
    针对结构图中的每一个节点,将对应该节点的当前应用特征的特征值挂载到该节点上,针对结构图中的每一条边,将对应该边的当前应用特征的特征值挂载到该边上,以形成对应于当前应用场景的特征图。
  3. 根据权利要求2所述的方法,其中,
    该方法进一步包括:对每一个节点及每一条边均设置对应的全局ID;在图特征库中,保存并动态更新每一个节点的全局ID与该节点的各应用特征之间的对应关系,以及保存并动态更新每一条边的全局ID与该边的各应用特征之间的对应关系;
    则,所述从对应于该节点的各应用特征中得到对应于当前应用场景的当前应用特征,包括:从图特征库中查找到对应于该节点的全局ID的各应用特征,从查找到的该各应用特征中筛选出适用于当前应用场景的当前应用特征;
    则所述从对应于该边的各应用特征中得到对应于当前应用场景的当前应用特征,包括:从图特征库中查找到对应于该边的全局ID的各应用特征,从查找到的该各应用特征中筛选出适用于当前应用场景的当前应用特征。
  4. 根据权利要求1所述的方法,其中,该方法应用于具有时序性的知识图谱的构 建中。
  5. 根据权利要求4所述的方法,其中,该方法应用于具有时序性的交易类业务的知识图谱的构建中,则
    所述第一类型的业务数据包括账户信息;
    所述第二类型的业务数据包括交易行为;
    所述节点的结构特征包括账户ID;
    所述边的结构特征包括如下中的至少一项:时间、交易ID、金额。
  6. 图计算方法,其中包括:
    利用权利要求1至5中任一所述的方法得到结构图;
    加载结构图中的图结构信息;所述图结构信息包括每一个节点、每一条边、每一个节点的结构特征值、每一条边的结构特征值、节点及边的顺序;
    利用加载的所述图结构信息进行图计算,得到流转路径。
  7. 根据权利要求6所述的方法,当利用权利要求2所述的方法得到结构图之后,该图计算方法进一步包括:
    利用对应于当前应用场景的特征图及所述流转路径,进行对应于当前应用场景的图计算。
  8. 知识图谱的构建装置,包括:
    模型建立模块,配置为将每一个第一类型的业务数据建模成图中的一个节点;将每一个第二类型的业务数据建模成图中的一条边;
    结构特征筛选模块,配置为根据预先确定的对应于第一类型的业务数据的结构特征,得到对应于每一个节点的结构特征值;根据预先确定的对应于第二类型的业务数据的结构特征,得到对应于每一条边的结构特征值;其中,所述结构特征为在至少两个应用场景中通用的特征;
    结构图构建模块,配置为利用每一个节点及该节点的结构特征值、每一条边及该边的结构特征值进行建模,得到结构图。
  9. 根据权利要求8所述的装置,进一步包括:
    应用特征筛选模块,配置为针对结构图中的每一个节点,从对应于该节点的各应用特征中得到对应于当前应用场景的当前应用特征;针对结构图中的每一条边,从对应于该边的各应用特征中得到对应于当前应用场景的当前应用特征;其中,所述应用特征与所述结构特征不同;
    特征图构建模块,配置为针对结构图中的每一个节点,将对应该节点的当前应用特 征的特征值挂载到该节点上,针对结构图中的每一条边,将对应该边的当前应用特征的特征值挂载到该边上,以形成对应于当前应用场景的特征图。
  10. 一种图计算装置,包括:
    权利要求8或9所述的知识图谱的构建装置;以及
    流转路径计算模块,配置为加载结构图中的图结构信息;所述图结构信息包括每一个节点、每一条边、每一个节点的结构特征值、每一条边的结构特征值、节点及边的顺序;利用加载的所述图结构信息进行图计算,得到流转路径。
  11. 根据权利要求10所述的装置,当包括权利要求9所述的知识图谱的构建装置时,所述图计算装置进一步包括:
    业务分析模块,配置为利用对应于当前应用场景的特征图及所述流转路径,进行对应于当前应用场景的图计算。
  12. 一种计算设备,包括存储器和处理器,所述存储器中存储有可执行代码,所述处理器执行所述可执行代码时,实现权利要求1-7中任一项所述的方法。
PCT/CN2023/071509 2022-03-01 2023-01-10 知识图谱的构建、和图计算 Ceased WO2023165271A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US18/842,582 US20250181935A1 (en) 2022-03-01 2023-01-10 Knowledge graph construction and graph computing

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210191557.2 2022-03-01
CN202210191557.2A CN114282011B (zh) 2022-03-01 2022-03-01 知识图谱的构建方法和装置、图计算方法及装置

Publications (1)

Publication Number Publication Date
WO2023165271A1 true WO2023165271A1 (zh) 2023-09-07

Family

ID=80882175

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/071509 Ceased WO2023165271A1 (zh) 2022-03-01 2023-01-10 知识图谱的构建、和图计算

Country Status (3)

Country Link
US (1) US20250181935A1 (zh)
CN (1) CN114282011B (zh)
WO (1) WO2023165271A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114282011B (zh) * 2022-03-01 2022-08-23 支付宝(杭州)信息技术有限公司 知识图谱的构建方法和装置、图计算方法及装置
CN114491085B (zh) * 2022-04-15 2022-08-09 支付宝(杭州)信息技术有限公司 一种图数据存储方法和分布式图数据计算方法
CN117171705B (zh) * 2023-09-19 2026-01-09 浙江网商银行股份有限公司 数据处理方法及装置

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111324643A (zh) * 2020-03-30 2020-06-23 北京百度网讯科技有限公司 知识图谱的生成方法、关系挖掘方法、装置、设备和介质
CN111930774A (zh) * 2020-08-06 2020-11-13 全球能源互联网研究院有限公司 一种电力知识图谱本体自动构建方法及系统
CN112256927A (zh) * 2020-10-21 2021-01-22 网易(杭州)网络有限公司 基于属性图的知识图谱数据处理方法和装置
CN112966118A (zh) * 2021-02-04 2021-06-15 中铁信(北京)网络技术研究院有限公司 一种运维知识图谱构建方法
US20210304021A1 (en) * 2020-03-26 2021-09-30 Accenture Global Solutions Limited Agnostic creation, version control, and contextual query of knowledge graph
CN114282011A (zh) * 2022-03-01 2022-04-05 支付宝(杭州)信息技术有限公司 知识图谱的构建方法和装置、图计算方法及装置

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10496678B1 (en) * 2016-05-12 2019-12-03 Federal Home Loan Mortgage Corporation (Freddie Mac) Systems and methods for generating and implementing knowledge graphs for knowledge representation and analysis
CN110334130B (zh) * 2019-07-09 2021-11-23 北京万维星辰科技有限公司 一种交易数据的异常检测方法、介质、装置和计算设备
CN110414987B (zh) * 2019-07-18 2022-03-11 中国工商银行股份有限公司 账户集合的识别方法、装置和计算机系统
CN110472068B (zh) * 2019-08-20 2020-04-24 星环信息科技(上海)有限公司 基于异构分布式知识图谱的大数据处理方法、设备及介质
CN111522967B (zh) * 2020-04-27 2023-09-15 北京百度网讯科技有限公司 知识图谱构建方法、装置、设备以及存储介质
CN112215500B (zh) * 2020-10-15 2022-06-28 支付宝(杭州)信息技术有限公司 账号关系识别方法及装置
CN112463991B (zh) * 2021-02-02 2021-04-30 浙江口碑网络技术有限公司 历史行为数据的处理方法、装置、计算机设备及存储介质
CN113312494B (zh) * 2021-05-28 2025-01-17 中国电力科学研究院有限公司 垂直领域知识图谱构建方法、系统、设备及存储介质
AU2021104731A4 (en) * 2021-07-30 2021-10-07 Ansu, Alok DR Business Aligned Knowledge Management System from Unstructured data using Convolutional Neural Network

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210304021A1 (en) * 2020-03-26 2021-09-30 Accenture Global Solutions Limited Agnostic creation, version control, and contextual query of knowledge graph
CN111324643A (zh) * 2020-03-30 2020-06-23 北京百度网讯科技有限公司 知识图谱的生成方法、关系挖掘方法、装置、设备和介质
CN111930774A (zh) * 2020-08-06 2020-11-13 全球能源互联网研究院有限公司 一种电力知识图谱本体自动构建方法及系统
CN112256927A (zh) * 2020-10-21 2021-01-22 网易(杭州)网络有限公司 基于属性图的知识图谱数据处理方法和装置
CN112966118A (zh) * 2021-02-04 2021-06-15 中铁信(北京)网络技术研究院有限公司 一种运维知识图谱构建方法
CN114282011A (zh) * 2022-03-01 2022-04-05 支付宝(杭州)信息技术有限公司 知识图谱的构建方法和装置、图计算方法及装置

Also Published As

Publication number Publication date
US20250181935A1 (en) 2025-06-05
CN114282011B (zh) 2022-08-23
CN114282011A (zh) 2022-04-05

Similar Documents

Publication Publication Date Title
US11947524B2 (en) Transaction processing method and apparatus, computer device, and storage medium
US9916596B1 (en) Systems and methods for providing a direct marketing campaign planning environment
US11068789B2 (en) Dynamic model data facility and automated operational model building and usage
WO2023165271A1 (zh) 知识图谱的构建、和图计算
US20190287025A1 (en) Generation of training data to train a classifier to identify distinct physical user devices in a cross-device context
CN111858615A (zh) 数据库表生成方法、系统、计算机系统和可读存储介质
CN110134516A (zh) 金融数据处理方法、装置、设备及计算机可读存储介质
CN111046237B (zh) 用户行为数据处理方法、装置、电子设备及可读介质
CN111915316A (zh) 一种可疑交易的监控方法、装置、计算机设备和存储介质
CN113538137A (zh) 一种基于双图谱融合计算的资金流监控方法及装置
CN111427971A (zh) 用于计算机系统的业务建模方法、装置、系统和介质
CN118377936A (zh) 基于融入计算模型的图规则的事件关联分析方法及装置
Singh et al. Cloud based evaluation of databases for stock market data
CN112417018A (zh) 一种数据共享方法及装置
CN115080606A (zh) 业务数据查询方法、装置、设备及介质
US10936984B2 (en) System for mitigating exposure associated with identified impacts of technological system changes based on solution data modelling
CN114676168B (zh) 一种数据追踪方法、装置、电子设备及存储介质
CN111062800B (zh) 数据处理方法、装置、电子设备及计算机可读介质
CN116166879A (zh) 分享业务处理方法、装置、计算机设备和存储介质
CN119558984B (zh) 数据处理方法、装置、设备和介质
US12423704B2 (en) Graph computing for electronic communication risk detection
CN116703184B (zh) 数据处理方法、数据处理装置、电子设备及可读存储介质
CN119149179B (zh) 数据库的多版本并发控制方法、装置、设备和介质
CN120687752A (zh) 异常行为识别方法、装置、计算机设备和可读存储介质
Angle Towards Cloud-Based cost-effective serverless information system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23762672

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 18842582

Country of ref document: US

WWE Wipo information: entry into national phase

Ref document number: 11202405820U

Country of ref document: SG

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 23762672

Country of ref document: EP

Kind code of ref document: A1

WWP Wipo information: published in national office

Ref document number: 18842582

Country of ref document: US