Path processing method, device, storage medium and electronic device

By determining the node path type in the knowledge graph for path screening, the problems of large amount of path processing and long path loss in the prior art are solved, and efficient and accurate path processing is achieved.

CN115048529BActive Publication Date: 2025-03-25ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210552096.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-20
Publication Date
2025-03-25
Estimated Expiration
2042-05-20

AI Technical Summary

Technical Problem

The prior art has problems such as computing resource bottlenecks and uncontrollable time complexity in path processing, which leads to inability to be effectively applied to actual transactions, especially when valuable long paths are easily lost.

Method used

By obtaining the knowledge graph corresponding to the target transaction, determining the head entity and the tail entity, determining the node path types corresponding to at least two path nodes on the reference entity path from the knowledge graph, and performing path filtering on the knowledge graph based on these node path types to obtain the target entity path.

Benefits of technology

This method greatly reduces the computational amount of path processing and the complexity of path search, ensures the availability of high target entity paths, and avoids the loss of long paths, improving the efficiency and accuracy of path processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115048529B_ABST
    Figure CN115048529B_ABST
Patent Text Reader

Abstract

The present specification discloses a path processing method, device, storage medium and electronic device, wherein the method comprises: obtaining a knowledge graph corresponding to a target transaction, determining a head entity and a tail entity for the target transaction, determining a node path type corresponding to at least two path nodes on a reference entity path from the knowledge graph based on the head entity and the tail entity, and then performing path screening processing on the knowledge graph based on the at least two node path types to obtain at least one target entity path.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a path processing method, device, storage medium and electronic device. Background Art

[0002] With the rapid development of computer technology, the application of knowledge graphs is becoming more and more widespread. Knowledge graphs are knowledge bases that represent entities in the objective world and their relationships in the form of graphs. Entities can be objects in the real world or abstract concepts, and relationships represent the connections between entities. Therefore, knowledge graphs can represent human knowledge in a structured form. Through knowledge representation and reasoning technology, they can provide artificial intelligence systems with processable prior knowledge, allowing them to have the same ability to solve complex tasks as humans. Summary of the invention

[0003] This specification provides a path processing method, device, storage medium and electronic device, and the technical solution is as follows:

[0004] In a first aspect, this specification provides a path processing method, the method comprising:

[0005] Obtain the knowledge graph corresponding to the target transaction, and determine the head entity and the tail entity for the target transaction;

[0006] Determine, from the knowledge graph, node path types corresponding to at least two path nodes on a reference entity path based on the head entity and the tail entity;

[0007] The knowledge graph is subjected to path screening processing based on at least two of the node path types to obtain at least one target entity path.

[0008] In a second aspect, this specification provides a path processing device, the device comprising:

[0009] An entity determination module is used to obtain a knowledge graph corresponding to a target transaction and determine a head entity and a tail entity for the target transaction;

[0010] A type determination module, used to determine the node path type corresponding to at least two path nodes on the reference entity path from the knowledge graph based on the head entity and the tail entity, wherein the reference entity path is the path from the head entity to the tail entity in the knowledge graph;

[0011] A path screening module is used to perform path screening processing on the knowledge graph based on at least two of the node path types to obtain at least one target entity path.

[0012] In a third aspect, the present specification provides a computer storage medium, wherein the computer storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the above-mentioned method steps.

[0013] In a fourth aspect, the present specification provides an electronic device, which may include: a processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the above-mentioned method steps.

[0014] The beneficial effects brought by the technical solutions provided by some embodiments of this specification include at least:

[0015] In one or more embodiments of the present specification, by obtaining the knowledge graph corresponding to the target transaction, determining the node path types corresponding to at least two path nodes on the reference entity path from the knowledge graph based on the head entity and the tail entity of the target transaction, and then performing path screening processing on the knowledge graph using at least two of the node path types, at least one target entity path can be obtained. The path processing method based on the node path type can provide guidance for the determination of the target entity path in the path mining and screening, greatly reducing the amount of calculation for path processing and the complexity of path search; and the long path with reference value will not be lost during the entire path processing process, which improves the availability of high target entity paths. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in this specification or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0017] Figure 1 It is a scenario diagram of a path processing system provided in this specification;

[0018] Figure 2 It is a flowchart of a path processing method provided in this manual;

[0019] Figure 3 It is a flowchart of another path processing method provided in this manual;

[0020] Figure 4 It is a flowchart of another path processing method provided in this manual;

[0021] Figure 5 This is a schematic diagram of a path mining scenario provided in this manual;

[0022] Figure 6It is a structural schematic diagram of a path processing device provided in this specification;

[0023] Figure 7 It is a structural diagram of a type determination module provided in this specification;

[0024] Figure 8 It is a structural schematic diagram of a node determination unit provided in this specification;

[0025] Fig. 9 It is a structural schematic diagram of a path screening module provided in this specification;

[0026] Fig.10 It is a structural schematic diagram of an electronic device provided in this manual. DETAILED DESCRIPTION

[0027] The following will be combined with the drawings in this specification to clearly and completely describe the technical solutions in this specification. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0028] In the description of the present application, it should be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In the description of the present application, it should be noted that, unless otherwise clearly specified and limited, "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood in specific circumstances. In addition, in the description of the present application, unless otherwise specified, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B, which can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are an "or" relationship.

[0029] In application scenarios involving knowledge graphs, it is often necessary to perform path processing on the knowledge graphs. However, due to the bottleneck of computing resources and the uncontrollable time complexity, the path processing methods in related technologies are often not applicable in actual transactions. For example, in actual transactions, solutions using PRA-like algorithms require setting a threshold for path length or a hotspot prevention strategy to converge the complexity of the algorithm. The calculation is large and complex, and it is easy to lose valuable long paths, so it cannot be used in actual transactions. For example, traditional path search algorithms require a large amount of calculation to search for the most ideal path, and the time complexity of using dynamic programming methods is very high, so they cannot be used in actual transactions.

[0030] The present application is described in detail below with reference to specific embodiments.

[0031] See also Figure 1 , is a schematic diagram of a scenario of a path processing system provided in this specification. Figure 1 As shown, the path processing system may include at least a client cluster and a service platform 100 .

[0032] The client cluster may include at least one client, such as Figure 1 As shown, it specifically includes client 1 corresponding to user 1, client 2 corresponding to user 2, ..., client n corresponding to user n, where n is an integer greater than 0.

[0033] Each client in the client cluster may be an electronic device with communication function, including but not limited to: wearable device, handheld device, personal computer, tablet computer, vehicle-mounted device, smart phone, computing device or other processing device connected to a wireless modem, etc. Electronic devices may be called different names in different networks, such as: user equipment, access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication device, user agent or user device, cellular phone, cordless phone, personal digital assistant (PDA), electronic device in 5G network or future evolution network, etc.

[0034] The service platform 100 can be a separate server device, such as a rack-mounted, blade, tower, or cabinet-mounted server device, or a workstation, mainframe computer, or other hardware device with strong computing power; it can also be a server cluster composed of multiple servers, and the servers in the service cluster can be composed in a symmetrical manner, wherein each server has equivalent functions and status in the transaction link, and each server can provide services to the outside independently, and the independent service can be understood as not requiring the assistance of other servers.

[0035] In one or more embodiments of the present specification, the service platform 100 may establish a communication connection with at least one client in the client cluster, and complete data interaction during the path processing based on the communication connection, such as online transaction data interaction. For example, the service platform 100 may recommend content to the client based on several target entity paths obtained based on the path processing method of the present specification. For example, the service platform 100 may obtain structured transaction data in a target transaction scenario from the client to construct a knowledge graph. For example, the head entity and the tail entity of the target transaction may be determined based on the application tasks for the client under the target transaction, so as to determine several target entity paths based on the knowledge graph.

[0036] It should be noted that the service platform 100 and at least one client in the client cluster establish a communication connection through a network for interactive communication, wherein the network can be a wireless network or a wired network, the wireless network includes but is not limited to a cellular network, a wireless local area network, an infrared network or a Bluetooth network, and the wired network includes but is not limited to Ethernet, a universal serial bus (USB) or a controller local area network. In one or more embodiments of the specification, technologies and / or formats including Hyper Text Mark-up Language (HTML), Extensible Markup Language (XML), etc. are used to represent data (such as a target compressed package) exchanged through a network. In addition, conventional encryption technologies such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), Internet Protocol Security (IPsec), etc. can also be used to encrypt all or some links. In other embodiments, customized and / or dedicated data communication technologies can also be used to replace or supplement the above data communication technologies.

[0037] The path processing system embodiment provided in this specification and the path processing method in one or more embodiments belong to the same concept. The execution subject corresponding to the path processing method involved in one or more embodiments of the specification can be the above-mentioned service platform 100; the execution subject corresponding to the path processing method involved in one or more embodiments of the specification can also be the electronic device corresponding to the client, which is determined based on the actual application environment. The implementation process of the path processing system embodiment can be detailed in the following method embodiment, which will not be repeated here.

[0038] based on Figure 1The scene diagram is shown, and the path processing method provided by one or more embodiments of this specification is introduced in detail below.

[0039] See also Figure 2 , a flow chart of a path processing method is provided for one or more embodiments of the present specification, the method can be implemented by a computer program and can be run on a path processing device based on the von Neumann system. The computer program can be integrated into an application or run as an independent tool application. The model processing device can be a service platform.

[0040] Specifically, the path processing method includes:

[0041] S102: Obtain a knowledge graph corresponding to a target transaction, and determine a head entity and a tail entity for the target transaction;

[0042] It is understandable that in many different types of transaction scenarios, a large amount of structured data and information are accumulated, and the process involves the need to describe these structured data and information. Based on this, in these actual transaction scenarios, it is often necessary to use knowledge graph technology to structure and represent these large amounts of information or even data in the form of knowledge graphs and store them.

[0043] It can be understood that in practical applications, knowledge graph construction technology can be used to pre-construct knowledge graphs for corresponding target transactions (such as financial transaction scenarios, shopping transaction scenarios, instant messaging transaction scenarios, etc.).

[0044] Specifically, after the knowledge graph is pre-built, some application tasks in the target transaction will involve the need to quickly mine the corresponding entity paths from the knowledge graph in order to provide corresponding transaction services based on the mined entity paths. For example, when it comes to application tasks in the target transaction such as answering knowledge questions, web search, semantic analysis, content recommendation, and relationship extraction, the knowledge graph will be involved in corresponding path mining.

[0045] The following is an explanation of the knowledge graph pre-built by the target firm.

[0046] Structured data in the form of knowledge graphs are widely used in actual target transaction scenarios, such as financial transaction scenarios, shopping transaction scenarios, etc. In some embodiments, the knowledge graph corresponding to the target transaction can be regarded as a semantic network, specifically a graph-based data structure for the target transaction. The knowledge graph corresponding to the target transaction consists of points and edges. In the knowledge graph, each point represents an entity in the target transaction scenario, and each edge is the relationship between entities.

[0047] In a feasible implementation, the head entity and tail entity can be determined based on the application tasks generated by monitoring the actual target transaction. For example, the application task can be a content recommendation task, and the head entity and tail entity for path mining can be determined based on the recommendation strategy corresponding to the content recommendation task; for another example, the application task can be a network search task, and the head entity and tail entity for path mining can be determined based on the search statement input by the network search task, and so on.

[0048] In a feasible implementation, entities are extracted based on transaction data in an actual target transaction scenario, that is, by obtaining the transaction data to be extracted in the target transaction scenario, and performing entity extraction processing on the transaction data to be extracted, the head entity and the tail entity after extraction can be obtained.

[0049] S104: Determine, from the knowledge graph, node path types corresponding to at least two path nodes on the reference entity path based on the head entity and the tail entity;

[0050] It can be understood that after determining the head entity and the tail entity, there will be a large number of paths corresponding to the head entity to the tail entity in the knowledge graph;

[0051] Optionally, in the knowledge graph, the path from the head entity through several entity nodes to the tail entity can be called a reference entity path, and any entity node existing on the reference entity path can be called a path node. In some embodiments, when the reference entity path includes a head entity and a tail entity, the reference entity path can be called a first reference entity path.

[0052] Optionally, in the knowledge graph, there is a reachable path from the head entity to a certain node and from the certain node to the tail entity, then the path from the head entity to the aforementioned node can also be called a reference entity path, and any entity node existing on the reference entity path can be called a path node. At this time, the reference entity path only contains the head entity but not the tail entity. At this time, the reference entity path can be called a second reference entity path.

[0053] In some embodiments, the execution process of the path screening process based on the first reference physical path and the execution process of the path screening process based on the second reference physical path are different.

[0054] Schematically, path screening is performed based on the first reference entity path: the service platform usually first determines several first reference entity paths from the head entity to the tail entity from the knowledge graph, and then determines the node path type corresponding to at least two path nodes on each first reference entity path; then based on at least two of the node path types, path screening is performed on the knowledge graph (usually the first reference entity path is screened) to obtain at least one target entity path. It can be understood that at this time, all first reference entity paths are determined first, and then path screening is performed.

[0055] Schematically, path screening processing is performed based on the second reference entity path: 1. The service platform usually first takes the head entity as the first path node from the knowledge graph, obtains at least one second path node linked to the first path node, and the second path node value has a reachable path to the tail entity, and the first path node and the second path node form a second reference entity path; 2. Determine the first node path type corresponding to the first path node and the second node path type corresponding to the second path node, determine the first graph embedding corresponding to the first node path type and the second graph embedding corresponding to the second node path type; 3. Determine the path type weight based on the first graph embedding and the second graph embedding; 4. Sort and filter the at least one second path node based on the path type weight to obtain at least one reference path node, and obtain at least one second path node linked to the reference path node; 5. If the second path node is not the tail entity, take the reference path node as the first path node to perform the step of obtaining the path type weight of the first path node and the at least one second path node linked to it; if the second path node is the tail entity, take the second reference entity path from the head entity to the second path node as the target entity path. It can be understood that at this time, the paths are filtered by batches of path nodes, and finally the target entity path is obtained after the filtering is completed.

[0056] The node path type can be understood as the node type divided for the nodes in the knowledge graph. For example, the node path type can be divided based on the node attribute information of the node.

[0057] In one or more embodiments of the present specification, by executing the path processing method, several target entity paths with good path quality, high reference value and good availability are screened out based on the knowledge graph, instead of recommending all relevant paths. In addition, executing the path processing method at the same time can take into account the path mining efficiency and save path mining time.

[0058] In a feasible implementation, the knowledge graph of the target transaction may be used in advance to obtain each entity node in the knowledge graph, and all entity nodes may be classified into entity path types (also referred to as reference node path types in some embodiments);

[0059] Optionally, entity nodes may be classified into entity path types based on the attribute information of all entity nodes in the knowledge graph from the dimension of semantic information;

[0060] Optionally, entity path types of entity nodes can be divided from the transaction function dimension based on the transaction function attributes of all entity nodes in the knowledge graph. The transaction function attribute is the transaction function associated with the entity node in the target transaction, that is, the entity path type of entity nodes is divided from the specific transaction service;

[0061] Optionally, feature engineering can be used to extract entity features from entity nodes and perform feature vectorization. Several entity nodes can be mapped into a vector feature space through feature engineering, and then the entity feature vectors corresponding to these entity nodes can be clustered to obtain several cluster centers. A cluster theme can be determined based on each cluster center, and the cluster theme is also the entity path type.

[0062] In a feasible implementation method, in practical applications, in order to improve the referenceability and accuracy of path mining, in the process of dividing entity path types of entity nodes in the knowledge graph, the entity path types can be comprehensively divided from two dimensions: the entity node itself and the relationship associated with the entity node. The relationship associated with the entity node in the knowledge graph is also the directed edge of the entity node. The relationship of the entity node can provide more in-depth feedback on the node structure. Based on this, the relationship of the entity node, that is, the directed edge of the node in the knowledge graph, is included in the reference, which can greatly improve the referenceability and accuracy of the path.

[0063] Optionally, feature engineering can be used to extract node entity features for entity nodes and node relationship features for directed edges of entity nodes, and then feature vectorization and vector fusion processing are performed on the node entity features and node relationship features for entity nodes. Through feature engineering, several entity nodes are mapped to a vector feature space. In the vector feature space, these entity nodes will correspond to an entity feature vector. Then, feature clustering processing is performed on these entity feature vectors to obtain several cluster centers. A cluster theme can be determined based on each cluster center. The cluster theme is also the entity path type.

[0064] The entity path types divided in this way optimize the path mining process. Through the entity path types, the structural characteristics of the entity nodes can be mined at a deeper level, which can greatly improve the reference and accuracy of the path in the subsequent path mining stage.

[0065] It can be understood that after obtaining the knowledge graph of the target transaction and determining the head entity and the tail entity, all reference entity paths based on the head entity and the tail entity in the knowledge graph can be determined by traversing the node structure of the knowledge graph, and the entity path type of any entity node on the knowledge graph has been predetermined. Based on this, the node path types corresponding to several path nodes on the reference entity path can be obtained, and usually at least two node path types can be obtained.

[0066] In one or more embodiments of the present specification, the node path types corresponding to several path nodes on the second reference entity path starting from the head entity can be traversed in batches. For example, the second reference entity paths are screened one by one with every two path nodes as reference, and the second reference entity paths that meet the requirements for inclusion in the reference are retained (that is, the intermediate path nodes on the second reference entity path are retained), and the reference entity paths that do not meet the requirements for inclusion in the reference are filtered out.

[0067] Using the above method, it can be understood that: at least two node path types corresponding to the path node are determined from the knowledge graph, and the at least one node path type does not refer to the total number of node path types corresponding to the reference entity path. The at least one node path type refers to the process of path screening. In each round of screening, a number of node path types are included in the path screening. It can be understood that the specified number of node path types included in the path screening reference in each round of screening is at least two, and the node path types included in the path screening in each round of screening can be 2, 3, and so on.

[0068] Optionally, the number of "at least two node path types" included in the path screening in each round of screening processing can be determined based on the requirements of the actual task, and different task types correspond to different numbers.

[0069] Furthermore, the path screening process includes: a specified number of path nodes linked to each other on each path, and at least two node path types corresponding to the path nodes are determined. It can be understood that the path nodes adjacent to each other are linked by an edge.

[0070] It can be understood that by taking into reference the node path types corresponding to several adjacent linked path nodes, the structural characteristics of a certain path or a path related to a certain node can be considered as a whole to achieve accurate path mining.

[0071] Schematically, the path screening included in the screening process is: two path nodes linked to each other on the path, that is, the node path type corresponding to at least two path nodes on the reference entity path is determined from the knowledge graph based on the head entity and the tail entity, specifically: the service platform determines at least one group of two linked path nodes on the reference entity path from the knowledge graph based on the head entity and the tail entity, and then obtains the node path type corresponding to at least one group of two path nodes. Using the above method, it can be determined that the node path types included in the path screening by the screening process are 2.

[0072] S106: Perform path screening processing on the knowledge graph based on at least two of the node path types to obtain at least one target entity path.

[0073] The target entity path can be understood as the entity path obtained through path mining based on the knowledge graph.

[0074] It can be understood that the path screening process can be: at least two node path types included in each round of screening process (which can be one round of screening process) are used as references to measure the matching degree between "at least two node path types" in each round. In each round of path screening process, since there are multiple reference entity paths, multiple groups of matching degree parameters of "at least two node path types" are usually calculated separately, and the matching degree parameters are associated with their corresponding reference entity paths. Then, the reference entity paths with high matching degrees are retained, and the reference entity paths with low matching degrees are removed. In some embodiments, a matching degree threshold can be set to retain reference entity paths that are greater than the matching degree threshold.

[0075] In a feasible implementation, the matching degree parameter of "at least two of the node path types" in each group is obtained by performing graph embedding processing on the node path type based on the knowledge graph to obtain the graph embedding corresponding to the node path type, and then calculating the matching degree of "at least two node path types" in the group based on the graph embedding of at least two node path types, that is, by calculating the matching degree between at least two graph embeddings.

[0076] The graph embedding is usually represented in the form of feature vectors, feature matrices, etc.

[0077] Furthermore, a graph embedding model may be used to determine the graph embedding of the corresponding node path type based on the knowledge graph. The graph embedding model may be a model constructed based on a graph embedding algorithm, such as a TransE model, a neural network model, and the like.

[0078] In one or more embodiments of the present specification, the node path types corresponding to at least two path nodes starting from the head entity can be traversed in batches, and the reference entity paths in the knowledge graph can be screened based on the "at least two node path types". For example, the reference entity paths are screened one by one with every two path nodes as references, and the reference entity paths that meet the requirements for inclusion in the reference are retained, and the reference entity paths that do not meet the requirements for inclusion in the reference are filtered out. The path screening is completed until the end of the tail entity, so that all the remaining reference entity paths are the target entity paths.

[0079] Optionally, in the actual path screening process, the length of each reference entity path may be different. For example, the number of nodes of some reference entity paths is 3, the number of nodes of some reference entity paths is 4, and the number of nodes of some reference entity paths is 5....,

[0080] In the actual path screening process, the number of path nodes included in the reference in each round of screening is assumed to be x.

[0081] The first round of path screening: obtain the 1st entity node - the xth path node in all reference entity paths for reference, obtain the x entity path types corresponding to the 1st entity node - the xth path node respectively, and then screen the reference entity paths based on the current x entity path types, retain the reference entity paths that meet the requirements for inclusion in the reference, and filter out the reference entity paths that do not meet the requirements for inclusion in the reference.

[0082] The second round of path screening: obtain the xth entity node - 2xth path node in all reference entity paths for reference, obtain the x entity path types corresponding to the xth entity node - 2xth path nodes respectively, and then screen the reference entity paths based on the current x entity path types, retain the reference entity paths that meet the requirements for inclusion in the reference, and filter out the reference entity paths that do not meet the requirements for inclusion in the reference. ....

[0083] The i-th round of path screening: obtain the (i-1)*x-th entity node - i*x-th path node in all reference entity paths for reference, obtain the x entity path types corresponding to the (i-1)*x-th entity node - i*x-th path node respectively, and then screen the reference entity paths based on the current x entity path types, retain the reference entity paths that meet the requirements for reference inclusion, and filter out the reference entity paths that do not meet the requirements for reference inclusion.

[0084] Optionally, during the i-th round of path screening, if there is a tail entity in the (i-1)*x-th entity node - i*x-th path node, the reference entity path with the tail entity can be determined as the target entity path; and the reference entity path in which there is no tail entity in the (i-1)*x-th entity node - i*x-th path node is included in the screening.

[0085] It can be understood that by adopting the above method, the entity path can be deeply mined to avoid losing long paths with high reference value (that is, paths with a longer number of nodes). At the same time, screening based on entity path type rather than a single entity node can take into account screening efficiency.

[0086] In one or more embodiments of the present specification, by obtaining the knowledge graph corresponding to the target transaction, determining the node path types corresponding to at least two path nodes on the reference entity path from the knowledge graph based on the head entity and the tail entity of the target transaction, and then performing path screening processing on the knowledge graph using at least two of the node path types, at least one target entity path can be obtained. The path processing method based on the node path type can provide guidance for the determination of the target entity path in the path mining and screening, greatly reducing the amount of calculation for path processing and the complexity of path search; and the long path with reference value will not be lost during the entire path processing process, which improves the availability of high target entity paths.

[0087] See also Figure 3 , Figure 3 This is a flow chart of another embodiment of a path processing method proposed in one or more embodiments of this specification. Specifically:

[0088] S202: Obtain a knowledge graph corresponding to a target transaction, and determine a head entity and a tail entity for the target transaction;

[0089] For details, please refer to the method steps in other embodiments of this specification, which will not be repeated here.

[0090] S204: Determine at least one first path node on a reference entity path from the knowledge graph based on the head entity and the tail entity;

[0091] S206: Obtain at least one second path node linked to the first path node in the knowledge graph; the first path node and the second path node constitute a group of two linked path nodes.

[0092] The number of the first path nodes corresponds to the number of paths of the reference entity path. That is, a first path node and a second path node linked to the first path node are determined from each reference entity path, and the first path node and the second path node constitute a group of two linked path nodes.

[0093] It can be understood that the first path node can be selected from any path node on the reference entity path, such as the first path node can be the node where the head entity is located, and the second path node can be the next path node linked to the first path node.

[0094] Optionally, if multiple rounds of path screening are involved, the first path node is determined in each round of path screening. For example, the first round of path screening determines the first path node as the head entity, and the path node after the head entity and linked (that is, the second node) is the second path node; the second round of path screening determines the second node as the first path node, and the third node linked to the second node is the second path node, and so on.

[0095] S208: Obtain node path types corresponding to at least one group of first path nodes and second path nodes respectively;

[0096] According to some embodiments, the node path type can be understood as the node type divided for the nodes in the knowledge graph. For example, the node path type can be divided based on the node attribute information of the node.

[0097] In a feasible implementation, the knowledge graph of the target transaction may be used in advance to obtain each entity node in the knowledge graph, and to classify entity path types for all entity nodes;

[0098] Optionally, entity nodes may be classified into entity path types based on the attribute information of all entity nodes in the knowledge graph from the dimension of semantic information;

[0099] Optionally, entity path types of entity nodes can be divided from the transaction function dimension based on the transaction function attributes of all entity nodes in the knowledge graph. The transaction function attribute is the transaction function associated with the entity node in the target transaction, that is, the entity path type of entity nodes is divided from the specific transaction service;

[0100] Optionally, feature engineering can be used to extract entity features from entity nodes and perform feature vectorization. Several entity nodes can be mapped into a vector feature space through feature engineering, and then the entity feature vectors corresponding to these entity nodes can be clustered to obtain several cluster centers. A cluster theme can be determined based on each cluster center, and the cluster theme is also the entity path type.

[0101] According to some embodiments, in order to improve the referenceability and accuracy of path mining, in the process of dividing entity path types of entity nodes in the knowledge graph, the entity path types can be comprehensively divided from two dimensions: the entity node itself and the relationship associated with the entity node. The relationship associated with the entity node in the knowledge graph is also the directed edge of the entity node. The relationship of the entity node can provide more in-depth feedback on the node structure. Based on this, the relationship of the entity node, that is, the directed edge of the node in the knowledge graph, is included for reference, which can greatly improve the referenceability and accuracy of the path.

[0102] Optionally, feature engineering can be used to extract node entity features for entity nodes and node relationship features for directed edges of entity nodes, and then feature vectorization and vector fusion processing are performed on the node entity features and node relationship features for entity nodes. Through feature engineering, several entity nodes are mapped to a vector feature space. In the vector feature space, these entity nodes will correspond to an entity feature vector. Then, feature clustering processing is performed on these entity feature vectors to obtain several cluster centers. A cluster theme can be determined based on each cluster center. The cluster theme is also the entity path type.

[0103] The entity path types divided in this way optimize the path mining process. Through the entity path types, the structural characteristics of the entity nodes can be mined at a deeper level, which can greatly improve the reference and accuracy of the path in the subsequent path mining stage.

[0104] Optionally, after determining the entity path types of several entity nodes in the knowledge graph, they can be saved. In the actual application stage, at least one set of node path types corresponding to the first path node and the second path node can be obtained.

[0105] S210: Determine, from the knowledge graph, a first graph embedding and a second graph embedding corresponding to at least two of the node path types respectively;

[0106] In some embodiments, the first graph embedding is a graph embedding corresponding to a node path type of a first node path node; and the second graph embedding is a graph embedding corresponding to a node path type of a second node path node.

[0107] It can be understood that graph embedding is usually represented in the form of feature vectors, feature matrices, etc., such as the first graph embedding is the first graph embedding vector, and the second graph embedding is the second graph embedding vector.

[0108] Furthermore, a graph embedding model may be used to determine the graph embedding of the corresponding node path type based on the knowledge graph. The graph embedding model may be a model constructed based on a graph embedding algorithm, such as a TransE model, a neural network model, and the like.

[0109] In a feasible implementation, a graph embedding model is used to perform graph embedding processing on several similar entity nodes under a certain node path type in the knowledge graph to obtain a graph embedding of the node path type.

[0110] Schematically, by inputting the knowledge graph and the node path type into the graph embedding model, the graph embedding model automatically traverses all similar entity nodes under the node path type in the knowledge graph, and extracts the embedding feature vectors of several similar entity nodes from the graph embedding graph (which may also be referred to as entity graph embedding in some embodiments), and then performs feature fusion processing on the embedding feature vectors of these similar entity nodes, a fused fused embedding feature vector can be obtained, and the fused embedding feature vector is used as the graph embedding corresponding to the node path type. In a specific implementation, the knowledge graph and the node path type can be used as the input of the graph embedding model, and the graph embedding model can output the graph embedding for the node path type. Based on this, the first graph embedding and the second graph embedding corresponding to the aforementioned two node path types can be determined respectively.

[0111] Optionally, the feature fusion processing of the embedded feature vectors of these similar entity nodes can be that the embedded feature vectors of all similar entity nodes are subjected to vector embedding average processing to obtain the processed embedded feature vector; the embedded feature vectors of all similar entity nodes are subjected to vector concatenation to obtain the processed embedded feature vector, and so on.

[0112] In a feasible implementation, when determining the entity path type of the knowledge graph in advance, the node graph embedding vector (that is, the aforementioned embedding feature vector) of the same entity nodes under each entity path type can be extracted based on the graph embedding model, and then the graph embedding vectors of all the same entity nodes can be fused (feature) to obtain the fused embedding feature vector, which can be used as the graph embedding corresponding to the node path type; optionally, all entity nodes in the knowledge graph can be associated with the graph embedding of the node path type corresponding to the entity node, so that in the actual application stage, the first graph embedding and the second graph embedding corresponding to the aforementioned two node path types can be directly obtained based on the knowledge graph.

[0113] S212: Determine a path type weight based on the first graph embedding and the second graph embedding, and perform path screening processing on the knowledge graph based on the path type weight to obtain at least one target entity path.

[0114] It can be understood that the path screening process can be: at least two node path types included in each round of screening process (can be one round of screening process) are used as references to measure the matching degree between "at least two node path types". In the path screening process, since there are multiple reference entity paths, multiple groups of matching degree parameters of "at least two node path types" are usually calculated separately. It can be understood that the matching degree parameters in one or more embodiments of this specification can be calculated The path type weight embedded in the first graph and the second graph is associated with the path type weight and its corresponding reference entity path, that is, the path type weight is used as the path weight value corresponding to the reference entity path corresponding to the path node, and then the reference entity path with a high weight is retained, and the reference entity path with a low weight is removed. The above process can also be regarded as a sorting and filtering process for the reference entity path.

[0115] In some implementations, a weight threshold may be set, and reference entity paths with a weight greater than the weight threshold may be retained.

[0116] In some implementations, the target quantity can be set, and each reference entity path can be prioritized based on the path type weight, so as to obtain at least one target entity path indicated by the target quantity based on the priority size. If there are n reference entity paths and the target quantity is k, k target entity paths are selected from the n reference entity paths.

[0117] In a feasible implementation, the service platform determines the path type weight based on the first graph embedding and the second graph embedding, specifically by calculating the vector embedding distance between the first graph embedding and the second graph embedding, and using the vector embedding distance as the path type weight.

[0118] Optionally, the vector embedding distance may be a fit based on one or more of a Euclidean distance calculation method, a cosine distance calculation method, and a Hamming distance calculation method.

[0119] Taking the cosine distance calculation method to calculate the vector embedding distance as an example, it can be calculated based on the following formula:

[0120] w(E i ,E j )=cosine(E i ,E j )

[0121] Among them, w(Ei,Ej) represents the vector embedding distance, E i represents the first graph embedding, E j represents the second graph embedding.

[0122] Specifically, the first image embedding and the second image embedding are input into the above formula to obtain the vector embedding distance.

[0123] In one or more embodiments of the present specification, by obtaining the knowledge graph corresponding to the target transaction, determining the node path types corresponding to at least two path nodes on the reference entity path from the knowledge graph based on the head entity and the tail entity of the target transaction, and then performing path screening processing on the knowledge graph using at least two of the node path types, at least one target entity path can be obtained. The path processing method based on the node path type can provide guidance for the determination of the target entity path in path mining and screening, greatly reducing the amount of calculation for path processing and the complexity of path search; and the long paths with reference value will not be lost during the entire path processing process, improving the availability of high target entity paths; and path screening based on the graph embedding of the node path type can make the path processing fast, greatly reducing the complexity of analyzing and processing each node, and improving the efficiency of path search.

[0124] See also Figure 4 , Figure 4 This is a flow chart of another embodiment of a path processing method proposed in one or more embodiments of this specification. Specifically:

[0125] S302: Obtain a knowledge graph corresponding to the target transaction, determine at least one reference node path type from the knowledge graph, and obtain at least one reference entity node corresponding to the reference node path type in the knowledge graph;

[0126] According to some embodiments, the knowledge graph of the target transaction may be used in advance to obtain each entity node in the knowledge graph, and to divide all entity nodes into several reference entity path types;

[0127] Schematically, feature engineering can be used to extract entity features from entity nodes and perform feature vectorization. Several entity nodes can be mapped into a vector feature space through feature engineering, and then the entity feature vectors corresponding to these entity nodes can be clustered to obtain several cluster centers. A cluster theme can be determined based on each cluster center, and the cluster theme is also the reference entity path type.

[0128] Schematically, feature engineering can be used to extract node entity features for entity nodes and node relationship features for directed edges of entity nodes, and then feature vectorization and vector fusion processing are performed on the node entity features and node relationship features for entity nodes. Through feature engineering, several entity nodes are mapped to a vector feature space. In the vector feature space, these entity nodes will correspond to an entity feature vector. Then, these entity feature vectors are feature clustered to obtain several cluster centers. A cluster theme can be determined based on each cluster center. The cluster theme is also the reference entity path type.

[0129] The reference entity path type divided in this way optimizes the path mining process. The entity path type can be used to more deeply explore the structural characteristics of the entity nodes, which can greatly improve the referenceability and accuracy of the path in the subsequent path mining stage.

[0130] Optionally, after determining several reference node path types of the knowledge graph, the reference node path type in the knowledge graph can be associated with all entity nodes under its reference node path type, and the node information of the corresponding entity nodes can be updated in the knowledge graph in the form of structured information, so that the updated knowledge graph can feedback the reference node path type of any entity node.

[0131] S304: Determine an entity graph embedding corresponding to the reference entity node, and determine a reference graph embedding corresponding to the reference node path type based on at least one of the entity graph embeddings;

[0132] The entity graph embedding is also the graph embedding corresponding to the reference entity node. The entity graph embedding is usually represented in the form of an entity feature vector, an entity feature matrix, etc.

[0133] In one or more embodiments of the present specification, a graph embedding model can be constructed based on relevant graph embedding technology, with the knowledge graph as the input of the graph embedding model. The graph embedding model can perform graph embedding processing based on the knowledge graph to extract entity graph embeddings for each reference entity node.

[0134] Furthermore, since several entity nodes under the reference node path type have been predetermined, the service platform can group several similar entity nodes under each reference node path type, and fuse the entity graph embeddings corresponding to each group of similar entity nodes. In a specific implementation, these entity graph embeddings can be embedded feature vectors. By performing feature fusion processing on the embedded feature vectors of these similar entity nodes, a fused embedded feature vector can be obtained, and the fused embedded feature vector is used as the reference graph embedding corresponding to the reference node path type.

[0135] Optionally, the graph embedding model may be a model constructed based on a graph embedding algorithm, for example, the graph embedding model may be a TransE model, a neural network model, and the like.

[0136] It can be understood that the service platform executes the determination of the reference graph embedding corresponding to the reference node path type based on at least one of the entity graph embeddings, which can be: obtaining the reference graph embedding corresponding to the reference node path type by performing vector embedding averaging processing on at least one entity graph embedding.

[0137] It can be understood that the service platform performs the reference graph embedding corresponding to the reference node path type based on at least one of the entity graph embeddings, which can be: vector concatenation of the embedding feature vectors of all similar entity nodes to obtain a processed embedding feature vector,

[0138] S306: Determine a head entity and a tail entity for the target transaction;

[0139] S308: Determine, from the knowledge graph, node path types corresponding to at least two path nodes on the reference entity path based on the head entity and the tail entity;

[0140] S310: Perform path screening processing on the knowledge graph based on at least two of the node path types to obtain at least one target entity path.

[0141] Optionally, the service platform can usually first determine several first reference entity paths from the head entity to the tail entity from the knowledge graph, and then determine the node path type corresponding to at least two path nodes on each first reference entity path; then perform path screening processing on the knowledge graph based on at least two of the node path types (usually screening the first reference entity path) to obtain at least one target entity path. It can be understood that at this time, all first reference entity paths are determined first, and then path screening is performed.

[0142] Optionally, the service platform can usually be:

[0143] 1. The service platform usually first uses the head entity as the first path node from the knowledge graph, obtains at least one second path node linked to the first path node, and the second path node has a reachable path to the tail entity, and the first path node and the second path node form a second reference entity path;

[0144] 2. Determine a first node path type corresponding to the first path node and a second node path type corresponding to the second path node, and determine a first graph embedding corresponding to the first node path type and a second graph embedding corresponding to the second node path type;

[0145] 3. Determine a path type weight based on the first graph embedding and the second graph embedding;

[0146] 4. Sorting and filtering the at least one second path node based on the path type weight to obtain at least one reference path node, and acquiring at least one second path node linked to the reference path node;

[0147] Indicatively, Figure 5 As shown, Figure 5 It is a schematic diagram of a path mining scenario. The service platform determines the head entity h and the tail entity t in the knowledge graph according to the head entity and the tail entity of the target transaction. There are several reachable paths from the head entity h to the tail entity t. The service platform first takes the head entity h as the current first path node, and then obtains several second path nodes linked to the first path node, such as Figure 5 As shown, there are n second path nodes linked to the head entity h, which is equivalent to the current existence of n second reference entity paths starting from the head entity, and then the path type weight is calculated, and the n second path nodes are sorted and filtered based on the path type weight to obtain k reference path nodes, which is equivalent to retaining k in the current round.

[0148] 5. If the second path node is not the tail entity, taking the reference path node as the first path node to perform the step of acquiring the path type weight of the first path node and at least one second path node linked thereto;

[0149] 6. If the second path node is the tail entity, the second reference entity path from the head entity to the second path node is used as the target entity path.

[0150] It can be understood that at this time, the paths are filtered by batches of path nodes, and finally the target entity path is obtained after the filtering is completed.

[0151] In one or more embodiments of the present specification, by obtaining the knowledge graph corresponding to the target transaction, determining the node path types corresponding to at least two path nodes on the reference entity path from the knowledge graph based on the head entity and the tail entity of the target transaction, and then performing path screening processing on the knowledge graph using at least two of the node path types, at least one target entity path can be obtained. The path processing method based on the node path type can provide guidance for the determination of the target entity path in path mining and screening, greatly reducing the amount of calculation for path processing and the complexity of path search; and the long paths with reference value will not be lost during the entire path processing process, improving the availability of high target entity paths; and path screening based on the graph embedding of the node path type can make the path processing fast, greatly reducing the complexity of analyzing and processing each node, and improving the efficiency of path search.

[0152] The following will be combined Figure 6 , the path processing device provided in this specification is introduced in detail. It should be noted that, Figure 6 The path processing device shown is used to execute the present application Figure 1 to Figure 5 For the convenience of explanation, only the relevant parts of this specification are shown. For specific technical details not disclosed, please refer to this application. Figure 1 to Figure 5 The embodiment shown.

[0153] See also Figure 6 , which shows a schematic diagram of the structure of the path processing device of this specification. The path processing device 1 can be implemented as all or part of the user terminal through software, hardware or a combination of both. According to some embodiments, the path processing device 1 includes a path processing module 11, a path processing module 12 and a path processing module 13, which are specifically used to:

[0154] The entity determination module 11 is used to obtain the knowledge graph corresponding to the target transaction and determine the head entity and the tail entity for the target transaction;

[0155] A type determination module 12, configured to determine, from the knowledge graph, node path types corresponding to at least two path nodes on a reference entity path based on the head entity and the tail entity;

[0156] The path screening module 13 is used to perform path screening processing on the knowledge graph based on at least two of the node path types to obtain at least one target entity path.

[0157] Optional, such as Figure 7 As shown, the type determination module 12 includes:

[0158] A node determination unit 121, configured to determine at least one set of two linked path nodes on a reference entity path from the knowledge graph based on the head entity and the tail entity;

[0159] The type determination unit 122 is used to obtain at least one set of node path types corresponding to the two path nodes.

[0160] Optional, such as Figure 8 As shown, the node determination unit 121 includes:

[0161] A first node determination subunit 1211, configured to determine at least one first path node on a reference entity path from the knowledge graph based on the head entity and the tail entity;

[0162] The second node determination subunit 1211 is used to obtain at least one second path node linked to the first path node in the knowledge graph; the first path node and the second path node constitute a group of two linked path nodes.

[0163] Optional, such as Fig. 9 As shown, the path screening module 13 includes:

[0164] An embedding determination unit 131, configured to determine, from the knowledge graph, first graph embeddings and second graph embeddings corresponding to at least two of the node path types, respectively;

[0165] The path screening unit 132 is used to determine the path type weight based on the first graph embedding and the second graph embedding, and perform path screening processing on the knowledge graph based on the path type weight to obtain at least one target entity path.

[0166] Optionally, the path screening unit 132 is specifically configured to:

[0167] A vector embedding distance between the first graph embedding and the second graph embedding is calculated, and the vector embedding distance is used as a path type weight.

[0168] Optionally, the device 1 is further used for:

[0169] Determine at least one reference node path type from the knowledge graph, and obtain at least one reference entity node corresponding to the reference node path type in the knowledge graph;

[0170] Determining an entity graph embedding corresponding to the reference entity node, and determining a reference graph embedding corresponding to the reference node path type based on at least one of the entity graph embeddings;

[0171] The embedding determination unit 131 is specifically configured to:

[0172] Based on the reference graph embeddings corresponding to all the reference node path types, a first graph embedding and a second graph embedding respectively corresponding to at least two of the node path types are obtained.

[0173] Optionally, the device 1 is further used for:

[0174] Vector embedding averaging processing is performed on at least one of the entity graph embeddings to obtain a reference graph embedding corresponding to the reference node path type.

[0175] Optionally, the path screening unit 132 is used to:

[0176] The reference entity paths are sorted and filtered based on the path type weight to obtain at least one target entity path.

[0177] Optionally, the path screening unit 132 is used to:

[0178] Using the path type weight as the path weight value corresponding to the reference entity path;

[0179] The reference entity paths are sorted and filtered based on the path weight values ​​to obtain at least one target entity path.

[0180] Optionally, the path screening unit 132 is used to:

[0181] The path priority of each of the reference entity paths is determined based on the path type weight, and the target entity path indicated by the target quantity is selected based on the path priority of the reference entity path.

[0182] It should be noted that the path processing device provided in the above embodiment only uses the division of the above functional modules as an example when executing the path processing method. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the path processing device provided in the above embodiment and the path processing method embodiment belong to the same concept, and the implementation process thereof is detailed in the method embodiment, which will not be repeated here.

[0183] The above serial numbers in this specification are for description only and do not represent the advantages or disadvantages of the embodiments.

[0184] In one or more embodiments of the present specification, by obtaining the knowledge graph corresponding to the target transaction, determining the node path types corresponding to at least two path nodes on the reference entity path from the knowledge graph based on the head entity and the tail entity of the target transaction, and then performing path screening processing on the knowledge graph using at least two of the node path types, at least one target entity path can be obtained. The path processing method based on the node path type can provide guidance for the determination of the target entity path in path mining and screening, greatly reducing the amount of calculation for path processing and the complexity of path search; and the long paths with reference value will not be lost during the entire path processing process, improving the availability of high target entity paths; and path screening based on the graph embedding of the node path type can make the path processing fast, greatly reducing the complexity of analyzing and processing each node, and improving the efficiency of path search.

[0185] The present specification also provides a computer storage medium, which can store multiple instructions, which are suitable for being loaded and executed by a processor as described above. Figure 1 to Figure 5 The path processing method of the embodiment shown in the figure can be specifically executed by referring to Figure 1 to Figure 5 The specific description of the illustrated embodiment will not be repeated here.

[0186] The present application also provides a computer program product, which stores at least one instruction, and the at least one instruction is loaded and executed by the processor as described above. Figure 1 to Figure 5 The path processing method of the embodiment shown in the figure can be specifically executed by referring to Figure 1 to Figure 5 The specific description of the illustrated embodiment will not be repeated here.

[0187] See also Fig.10 , provides a structural diagram of another electronic device for the embodiment of the present application. Fig.10 As shown, the electronic device 2000 may include: at least one processor 2001 , at least one network interface 2004 , a user interface 2003 , a memory 2005 , and at least one communication bus 2002 .

[0188] The communication bus 2002 is used to realize the connection and communication between these components.

[0189] The user interface 2003 may include a display screen (Display), and the optional user interface 2003 may also include a standard wired interface and a wireless interface.

[0190] The network interface 2004 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).

[0191] Among them, the processor 2001 may include one or more processing cores. The processor 2001 uses various interfaces and lines to connect various parts in the entire server 2000, and executes various functions and processes data of the server 2000 by running or executing instructions, programs, code sets or instruction sets stored in the memory 2005, and calling data stored in the memory 2005. Optionally, the processor 2001 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 2001 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communication. It can be understood that the above-mentioned modem may not be integrated into the processor 2001, and it can be implemented separately through a chip.

[0192] Among them, the memory 2005 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory 2005 includes a non-transitory computer-readable storage medium. The memory 2005 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 2005 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 2005 may also be optionally at least one storage device located away from the aforementioned processor 2001. As Fig.10 As shown, the memory 2005 as a computer storage medium may include an operating system, a network communication module, a user interface module and an application program.

[0193] exist Fig.10In the electronic device 2000 shown, the electronic device 2000 may be a service platform, the user interface 2003 is mainly used to provide an input interface for the user and obtain data input by the user; and the processor 2001 may be used to call the application stored in the memory 2005 and specifically perform the following operations:

[0194] Obtain the knowledge graph corresponding to the target transaction, and determine the head entity and the tail entity for the target transaction;

[0195] Determine, from the knowledge graph, node path types corresponding to at least two path nodes on a reference entity path based on the head entity and the tail entity;

[0196] The knowledge graph is subjected to path screening processing based on at least two of the node path types to obtain at least one target entity path.

[0197] In one embodiment, when the processor 1001 determines the node path types corresponding to at least two path nodes on the reference entity path from the knowledge graph based on the head entity and the tail entity, the processor 1001 specifically performs the following operations:

[0198] Determine at least one set of two linked path nodes on a reference entity path from the knowledge graph based on the head entity and the tail entity;

[0199] Obtain at least one set of node path types corresponding to the two path nodes.

[0200] In one embodiment, when the processor 1001 determines at least one set of two linked path nodes on the reference entity path from the knowledge graph based on the head entity and the tail entity, the processor 1001 specifically performs the following operations:

[0201] Determine at least one first path node on a reference entity path from the knowledge graph based on the head entity and the tail entity;

[0202] At least one second path node linked to the first path node is obtained in the knowledge graph; the first path node and the second path node constitute a group of two linked path nodes.

[0203] In one embodiment, when the processor 1001 performs the path screening process on the knowledge graph based on at least two node path types to obtain at least one target entity path, the processor 1001 specifically performs the following steps:

[0204] Determine, from the knowledge graph, a first graph embedding and a second graph embedding corresponding to at least two of the node path types respectively;

[0205] A path type weight is determined based on the first graph embedding and the second graph embedding, and a path screening process is performed on the knowledge graph based on the path type weight to obtain at least one target entity path.

[0206] In one embodiment, when the processor 1001 determines the path type weight based on the first graph embedding and the second graph embedding, the processor 1001 specifically performs the following steps:

[0207] A vector embedding distance between the first graph embedding and the second graph embedding is calculated, and the vector embedding distance is used as a path type weight.

[0208] In one embodiment, the processor 1001 further performs the following steps when executing the path processing method:

[0209] Determine at least one reference node path type from the knowledge graph, and obtain at least one reference entity node corresponding to the reference node path type in the knowledge graph;

[0210] Determining an entity graph embedding corresponding to the reference entity node, and determining a reference graph embedding corresponding to the reference node path type based on at least one of the entity graph embeddings;

[0211] When determining the first graph embedding and the second graph embedding respectively corresponding to at least two of the node path types from the knowledge graph, the following steps are specifically performed:

[0212] Based on the reference graph embeddings corresponding to all the reference node path types, a first graph embedding and a second graph embedding respectively corresponding to at least two of the node path types are obtained.

[0213] In one embodiment, when the processor 1001 determines the reference graph embedding corresponding to the reference node path type based on at least one of the entity graph embeddings, the processor 1001 specifically performs the following steps:

[0214] Vector embedding averaging processing is performed on at least one of the entity graph embeddings to obtain a reference graph embedding corresponding to the reference node path type.

[0215] In one embodiment, when the processor 1001 performs the path screening process on the knowledge graph based on the path type weight to obtain at least one target entity path, the processor 1001 specifically performs the following steps:

[0216] The reference entity paths are sorted and filtered based on the path type weight to obtain at least one target entity path.

[0217] In one embodiment, when the processor 1001 performs the sorting process of the reference entity paths based on the path type weight to obtain at least one target entity path, the processor 1001 specifically performs the following steps:

[0218] Using the path type weight as the path weight value corresponding to the reference entity path;

[0219] The reference entity paths are sorted and filtered based on the path weight values ​​to obtain at least one target entity path.

[0220] In one embodiment, when the processor 1001 performs the sorting and filtering process on each of the reference entity paths based on the path weight value to obtain at least one target entity path, the processor 1001 specifically performs the following steps:

[0221] The path priority of each of the reference entity paths is determined based on the path type weight, and the target entity path indicated by the target quantity is selected based on the path priority of the reference entity path.

[0222] In one or more embodiments of the present specification, by obtaining the knowledge graph corresponding to the target transaction, determining the node path types corresponding to at least two path nodes on the reference entity path from the knowledge graph based on the head entity and the tail entity of the target transaction, and then performing path screening processing on the knowledge graph using at least two of the node path types, at least one target entity path can be obtained. The path processing method based on the node path type can provide guidance for the determination of the target entity path in path mining and screening, greatly reducing the amount of calculation for path processing and the complexity of path search; and the long paths with reference value will not be lost during the entire path processing process, improving the availability of high target entity paths; and path screening based on the graph embedding of the node path type can make the path processing fast, greatly reducing the complexity of analyzing and processing each node, and improving the efficiency of path search.

[0223] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only storage memory, or a random access memory, etc.

[0224] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.

Claims

1. A transaction processing method based on entity path, applied to a service platform, wherein the service platform calls an application stored in a memory through a processor to execute the transaction processing method, the method comprising: Obtain a knowledge graph stored for a target transaction, monitor application tasks generated under the target transaction, and determine the head entity and tail entity for the target transaction based on the application tasks, wherein the target transaction includes a financial transaction, a shopping transaction, and an instant messaging transaction, and the application tasks include at least one of a knowledge question answering task, a network search task, a semantic analysis task, a content recommendation task, and a relationship extraction task, wherein each point in the knowledge graph represents an entity existing under the target transaction, and each edge represents a relationship between entities; Determine, from the knowledge graph, node path types corresponding to at least two path nodes on a reference entity path based on the head entity and the tail entity; The knowledge graph is subjected to path screening processing based on at least two of the node path types to obtain at least one target entity path, and transaction services are provided to the client based on the target entity path.

2. According to the method of claim 1, the step of determining the node path types corresponding to at least two path nodes on the reference entity path from the knowledge graph based on the head entity and the tail entity comprises: Determine at least one set of two linked path nodes on a reference entity path from the knowledge graph based on the head entity and the tail entity; Obtain at least one set of node path types corresponding to the two path nodes.

3. According to the method of claim 2, the step of determining at least one set of two linked path nodes on the reference entity path from the knowledge graph based on the head entity and the tail entity comprises: Determine at least one first path node on a reference entity path from the knowledge graph based on the head entity and the tail entity; At least one second path node linked to the first path node is obtained in the knowledge graph; the first path node and the second path node constitute a group of two linked path nodes.

4. According to the method of claim 1, the step of performing path screening on the knowledge graph based on at least two of the node path types to obtain at least one target entity path comprises: Determine, from the knowledge graph, a first graph embedding and a second graph embedding corresponding to at least two of the node path types respectively; A path type weight is determined based on the first graph embedding and the second graph embedding, and a path screening process is performed on the knowledge graph based on the path type weight to obtain at least one target entity path.

5. The method according to claim 4, wherein determining the path type weight based on the first graph embedding and the second graph embedding comprises: A vector embedding distance between the first graph embedding and the second graph embedding is calculated, and the vector embedding distance is used as a path type weight.

6. The method according to claim 4, further comprising: Determine at least one reference node path type from the knowledge graph, and obtain at least one reference entity node corresponding to the reference node path type in the knowledge graph; Determining an entity graph embedding corresponding to the reference entity node, and determining a reference graph embedding corresponding to the reference node path type based on at least one of the entity graph embeddings; The determining, from the knowledge graph, a first graph embedding and a second graph embedding respectively corresponding to at least two of the node path types comprises: Based on the reference graph embeddings corresponding to all the reference node path types, a first graph embedding and a second graph embedding respectively corresponding to at least two of the node path types are obtained.

7. The method according to claim 6, wherein determining the reference graph embedding corresponding to the reference node path type based on at least one of the entity graph embeddings comprises: Vector embedding averaging processing is performed on at least one of the entity graph embeddings to obtain a reference graph embedding corresponding to the reference node path type.

8. According to the method of claim 4, the path screening process of the knowledge graph based on the path type weight to obtain at least one target entity path comprises: The reference entity paths are sorted and filtered based on the path type weight to obtain at least one target entity path.

9. The method according to claim 8, wherein the step of sorting the reference entity paths based on the path type weight to obtain at least one target entity path comprises: Using the path type weight as the path weight value corresponding to the reference entity path; The reference entity paths are sorted and filtered based on the path weight values ​​to obtain at least one target entity path.

10. The method according to claim 9, wherein the step of sorting and filtering the reference entity paths based on the path weight values ​​to obtain at least one target entity path comprises: The path priority of each of the reference entity paths is determined based on the path type weight, and the target entity path indicated by the target quantity is selected based on the path priority of the reference entity path.

11. A transaction processing device based on entity path, applied to a service platform, the device comprising: An entity determination module is used to obtain a knowledge graph stored for a target transaction, monitor application tasks generated under the target transaction, and determine a head entity and a tail entity for the target transaction based on the application tasks. The target transaction includes a financial transaction, a shopping transaction, and an instant messaging transaction. The application tasks include at least one of a knowledge question answering task, a network search task, a semantic analysis task, a content recommendation task, and a relationship extraction task. In the knowledge graph, each point represents an entity existing under the target transaction, and each edge is a relationship between entities. A type determination module, used to determine the node path type corresponding to at least two path nodes on the reference entity path from the knowledge graph based on the head entity and the tail entity; A path screening module is used to perform path screening processing on the knowledge graph based on at least two of the node path types to obtain at least one target entity path, and provide transaction services to the client based on the target entity path.

12. A computer storage medium storing a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the method steps according to any one of claims 1 to 10.

13. A computer program product, the computer program product storing at least one instruction, wherein the at least one instruction is loaded by the processor and executes the method steps according to any one of claims 1 to 10.

14. An electronic device comprising: A processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the method steps as claimed in any one of claims 1 to 10.

Citation Information

Patent Citations

  • Question and answer method and device, electronic equipment and storage medium

    CN110837550A

  • Personalized learning path recommendation method and system based on knowledge graph mining

    CN111309927A