Data processing, model training, risk identification method, device and storage medium

By coarsening the five-tuple fact-main triples in the hyper-relational knowledge graph into nodes, the problem of risk identification ambiguity in traditional knowledge graphs on e-commerce platforms is solved, and more accurate product risk identification is achieved.

CN114942997BActive Publication Date: 2025-10-21ALIBABA (CHINA) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210426844.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-21
Publication Date
2025-10-21
Estimated Expiration
2042-04-21

AI Technical Summary

Technical Problem

Traditional knowledge graphs cannot accurately match product information and risk knowledge on e-commerce platforms, resulting in risk identification ambiguity. The existing hyper-relational knowledge graph embedding rationality is poor and cannot effectively capture the association between main triples and attribute information.

Method used

The main triple of the five-tuple fact in the hyper-relational knowledge graph is coarsened into a node and graph embedding is performed to capture the association information between the main triple and the qualifier, thus constructing a more accurate knowledge graph.

Benefits of technology

The rationality of the embedded representation of quintuple facts in the hyper-relational knowledge graph is improved, and the accuracy and efficiency of commodity risk identification are enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114942997B_ABST
    Figure CN114942997B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a data processing method, a model training method, a risk identification method, a device and a storage medium. The method comprises the following steps: determining a five-tuple fact from a hyper-relation knowledge graph; modifying the five-tuple fact into a first target triple fact by replacing a main triple in the five-tuple fact with a first node; constructing a first knowledge graph according to the first target triple fact; determining an initial embedding representation of the first node according to an embedding representation of the main triple; performing graph embedding processing on the first knowledge graph according to the initial embedding representation of the first node to obtain an embedding representation of the first target triple fact; and determining an embedding representation of the five-tuple fact according to the embedding representation of the first target triple fact. The scheme provided by the embodiments of the present application can improve the embedding rationality of hyper-relation facts in the hyper-relation knowledge graph.
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 data processing, model training, risk identification method, device and storage medium. Background Art

[0002] A knowledge graph (KG) is a structured description of real-world conceptual entities and the relationships between them. Currently, knowledge graph technology has been widely applied in various fields, such as e-commerce, finance, and healthcare. Traditional knowledge graphs consist of a large number of triples of facts.

[0003] Take the e-commerce sector as an example. With the increasing adoption of new network technologies, e-commerce services are becoming increasingly important in people's daily lives. However, while these e-commerce platforms provide convenience for netizens' daily lives, they also foster a breeding ground for the widespread dissemination of harmful information. The openness of e-commerce platforms has been exploited by some merchants to trade prohibited goods, which may contain content that endangers national security and public safety and disrupts social order. With the surge in the number of e-commerce platform users, the distribution of prohibited goods has also become increasingly widespread, posing a significant threat to both users and e-commerce platforms. Therefore, risk auditing of products on e-commerce platforms is essential. To assist risk auditors in disseminating knowledge, improving audit accuracy, and reducing their workload, a risk knowledge graph is created for products on e-commerce platforms. Subsequently, product information for the products under review is matched (also called linked) with the risk knowledge in the risk knowledge graph (which is stored in fact-based units) to identify the risks of the products under review. Summary of the Invention

[0004] The embodiments of the present application provide a data processing, model training, risk identification method, device and storage medium for improving the rationality of embedding hyper-relational facts in a hyper-relational knowledge graph.

[0005] Therefore, in one embodiment of the present application, a data processing method is provided, which includes:

[0006] Determine quintuple facts from the hyper-relational knowledge graph;

[0007] Modify the five-tuple fact into a first target triplet fact by replacing the main triplet in the five-tuple fact with the first node;

[0008] Constructing a first knowledge graph based on the first target triple fact;

[0009] determining an initial embedding representation of the first node according to the embedding representation of the main triple;

[0010] Performing graph embedding processing on the first knowledge graph according to the initial embedding representation of the first node to obtain an embedding representation of the first target triple fact;

[0011] An embedding representation of the five-tuple fact is determined according to the embedding representation of the first target three-tuple fact.

[0012] In another embodiment of the present application, a model training method is provided, which includes:

[0013] Determine quintuple facts from the sample hyper-relational knowledge graph;

[0014] Modify the five-tuple fact into a first target triplet fact by replacing the main triplet in the five-tuple fact with the first node;

[0015] Constructing a first knowledge graph based on the first target triple fact;

[0016] determining an initial embedding representation of the first node according to the embedding representation of the main triple;

[0017] According to the initial embedding representation of the target node, performing graph embedding processing on the first target knowledge graph using a computational model based on a graph neural network to obtain an embedding representation of the first target triple fact;

[0018] Determining a first possibility that the five-tuple fact is true according to the embedded representation of the first target three-tuple fact;

[0019] The computational model is optimized based on the first possibility and the training labels of the five-tuple fact.

[0020] In another embodiment of the present application, a commodity risk identification method is provided, which includes:

[0021] Determine five-tuple facts from the hyper-relational risk knowledge graph;

[0022] Modify the five-tuple fact into a first target triplet fact by replacing the main triplet in the five-tuple fact with the first node;

[0023] Constructing a first knowledge graph based on the first target triple fact;

[0024] determining an initial embedding representation of the first node according to the embedding representation of the main triple;

[0025] Performing graph embedding processing on the first knowledge graph according to the initial embedding representation of the first node to obtain an embedding representation of the first target triple fact;

[0026] Determining an embedding representation of the quintuple fact according to the embedding representation of the first target triple fact;

[0027] Risk identification is performed on the commodity to be identified based on the hyper-relational risk knowledge graph and the embedded representation of the five-tuple fact in the hyper-relational risk knowledge graph.

[0028] In another embodiment of the present application, an electronic device is provided. The electronic device includes: a memory and a processor, wherein:

[0029] The memory is used to store programs;

[0030] The processor is coupled to the memory and is configured to execute the program stored in the memory to implement any of the above methods.

[0031] In another embodiment of the present application, a computer-readable storage medium storing a computer program is provided. When the computer program is executed by a computer, any of the above-mentioned methods can be implemented.

[0032] In the technical solution provided in the embodiment of the present application, the quintuple fact in the hyper-relational knowledge graph includes a main triple and a qualifier that qualifies the main triple, and the qualifier is also the attribute information corresponding to the main triple. The main triple of the quintuple fact in the hyper-relational knowledge graph is coarsened into a node to replace it. In this way, when the graph embedding processing is performed subsequently, the association information between the main triple as a whole and the qualifier in the quintuple fact can be captured, that is, the association information between the main triple as a whole and the attribute information corresponding to the main triple in the quintuple fact can be captured, which can effectively improve the rationality of the embedded representation of the quintuple fact in the hyper-relational knowledge graph. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0034] Figure 1 A flowchart of a data processing method provided in one embodiment of the present application;

[0035] Figure 2 A hyper-relationship risk knowledge graph for e-commerce scenarios provided in one embodiment of the present application;

[0036] Figure 3A hyper-relationship risk knowledge graph for medical scenarios provided in one embodiment of the present application;

[0037] Figure 4 A hyper-relationship risk knowledge graph for financial scenarios provided in one embodiment of the present application;

[0038] Figure 5 A flowchart of a model training method provided in one embodiment of the present application;

[0039] Figure 6 A flowchart of a commodity risk identification method provided in one embodiment of the present application;

[0040] Figure 7a A coarse-grained graph provided in an embodiment of the present application;

[0041] Figure 7b A fine-grained graph provided in an embodiment of the present application;

[0042] Figure 8 This is a flowchart illustrating a method for identifying commodity risks according to an embodiment of the present application;

[0043] Figure 9 This is a structural block diagram of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0044] Still taking the e-commerce field as an example, the traditional risk knowledge graph organizes risk knowledge in the form of triples. However, when matching the product information of the product to be reviewed with the risk knowledge in the risk knowledge graph, sometimes there will be multiple triples matching between the product information and the risk knowledge graph, resulting in the problem of inability to accurately match. The essential reason is that the triple form in the traditional knowledge graph cannot well describe some complex semantic scenarios, such as risk knowledge with attribute information, which makes it impossible to accurately match the risk when matching the product information with the risk knowledge. In order to represent the knowledge with attribute information, some people have proposed a hyper-relational knowledge graph. This type of knowledge graph can provide richer knowledge, thereby improving the organizational ability of the knowledge graph. Therefore, in order to solve the problems existing in the work of identifying product risks, the technical solution provided in the embodiment of the present application adopts a hyper-relational knowledge graph to organize risk knowledge. Among them, the hyper-relational knowledge graph includes hyper-relational facts, and the hyper-relational facts include main triples and qualifiers (or qualifiers). The qualifier is also the attribute information that qualifies the main triple. Modeling product risk identification based on a hyper-relational knowledge graph provides richer knowledge than traditional knowledge graphs that only contain triples. By associating qualifiers with ambiguous risk knowledge, the hyper-relational knowledge graph eliminates ambiguity in risk knowledge, thus providing more accurate predictions. Using a hyper-relational knowledge graph for product risk identification primarily addresses ambiguity when linking product information and risk knowledge.

[0045] At present, there is a problem of poor embedding rationality in the existing embedding work for hyper-relational knowledge graphs. Through research, the applicant found that in the existing embedding work for hyper-relational knowledge graphs, the relations and keys in the hyper-relational facts are usually combined to obtain abstract composite relations, or the hyper-relational facts are converted into entity-relationship pairs and the entities are defined as instances of relations, or graph neural networks are introduced to learn hyper-relational facts, and the representation of key-value pairs is merged into the relational representation through a combination function to explore the influence of key-value pairs on the main triples. However, this combination, conversion or merging method causes the qualifiers to lose their semantic information. Moreover, when learning hyper-relational facts based on graph neural networks, the focus is on single-granularity encoding, especially fine-grained encoding, which captures the correlation between fine-grained elements in hyper-relational facts, resulting in the model not reasonably modeling the association information between the main triple as a whole and the attribute information, which to a certain extent limits the further improvement of the representation performance.

[0046] In order to solve or partially solve the above technical problems, the present application proposes a new embedding scheme. Specifically, the main triple of the quintuple fact (that is, the super-relational fact) in the hyper-relational knowledge graph is coarsened into a node to replace it. In this way, when the subsequent graph embedding processing is performed, the association information between the main triple in the quintuple fact as a whole and the qualifier can be captured, that is, the association information between the main triple in the quintuple fact as a whole and the attribute information corresponding to the main triple can be captured, which can effectively improve the rationality of the embedded representation of the quintuple fact in the hyper-relational knowledge graph.

[0047] In order to enable those skilled in the art to better understand the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below based on the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0048] In addition, some of the processes described in the specification, claims and the above-mentioned figures of this application include multiple operations that appear in a specific order. These operations may not be executed in the order in which they appear in this document or may be executed in parallel. The serial numbers of the operations, such as 101, 102, etc., are only used to distinguish between different operations, and the serial numbers themselves do not represent any order of execution. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this document are used to distinguish different messages, devices, modules, etc., and do not represent the order of precedence, nor do they limit "first" and "second" to be different types.

[0049] Figure 1 The flowchart of the data processing method provided by an embodiment of the present application is shown. The execution subject of the method can be a client or a server. The client can be a hardware with an embedded program integrated on the terminal, or an application software installed in the terminal, or a tool software embedded in the terminal operating system, etc., which is not limited in the embodiment of the present application. The terminal can be any terminal device including a mobile phone, a tablet computer, a vehicle-mounted terminal device, etc. The server can be a common server, a cloud or a virtual server, etc., which is not specifically limited in the embodiment of the present application. Figure 1 As shown, the method includes:

[0050] 101. Determine quintuple facts from the hyperrelational knowledge graph.

[0051] 102. Modify the quintuple fact into a first target triplet fact by replacing the main triplet in the quintuple fact with the first node.

[0052] 103. Construct a first knowledge graph based on the first target triple fact.

[0053] 104. Determine an initial embedding representation of the first node according to the embedding representation of the main triple;

[0054] 105. Perform graph embedding processing on the first knowledge graph based on the initial embedding representation of the first node to obtain an embedding representation of the first target triple fact.

[0055] 106. Determine an embedded representation of the quintuple fact based on the embedded representation of the first target triple fact.

[0056] In step 101 above, the hyper-relational knowledge graph may be related to scenarios such as e-commerce, finance, and healthcare. In one example, the hyper-relational knowledge graph may be a hyper-relational risk knowledge graph. In the e-commerce scenario, the hyper-relational risk knowledge graph may be constructed based on product information of existing products on the e-commerce platform.

[0057] The five-tuple fact includes a main triple and a qualifier. The main triple includes: a head entity node, a tail entity node, and a relationship edge connecting the head entity node and the tail entity node; the qualifier includes: a key edge and a value node.

[0058] The following describes several examples of hyper-relational knowledge graphs based on specific scenarios:

[0059] Figure 2 An example diagram of a hyper-relationship risk knowledge graph for an e-commerce scenario is shown. Figure 2 As shown in Figure 2, the facts contained in the hyper-relational risk knowledge graph are:

[0060] (Prohibited goods, including controlled drugs)

[0061] (Prohibited goods, including knives and guns)

[0062] (Controlled drugs, including ephedrine, risk interpretation, ephedrine is a stimulant)

[0063] (Controlled drugs, including ecstasy, risk interpretation, ecstasy is a hallucinogen)

[0064] Among them, (prohibited goods, including controlled drugs) and (prohibited goods, including knives and guns) are triple facts in the hyper-relational risk knowledge graph; (controlled drugs, including ephedrine, risk interpretation, ephedrine is a stimulant) and (controlled drugs, including ecstasy, risk interpretation, ecstasy is a hallucinogen) are quintuple facts in the hyper-relational risk knowledge graph, also known as hyper-relational facts. In the quintuple fact (controlled drugs, including ephedrine, risk interpretation, ephedrine is a stimulant), (controlled drugs, including ephedrine) is the primary triple, and (risk interpretation, ephedrine is a stimulant) is the qualifier. Specifically, "risk interpretation" is the key edge, and "ephedrine is a stimulant" is the value node.

[0065] Figure 3 An example diagram of a hyper-relational medical knowledge graph related to medical scenarios is shown. Figure 3 As shown, the facts contained in the hyper-relational medical knowledge graph are:

[0066] (Cold, symptoms, fever)

[0067] (Cold, Symptoms, Headache)

[0068] (fever, medication, cefradine, medication explanation, cefradine is used to reduce fever)

[0069] (Headache, medication, ibuprofen, medication explanation, ibuprofen for pain relief)

[0070] Among them, (cold, symptoms, fever) and (cold, symptoms, headache) are triple facts in the hyper-relational medical knowledge graph; (fever, medication, cefradine, medication explanation, cefradine is used to reduce fever) and (headache, medication, ibuprofen, medication explanation, ibuprofen is used to relieve pain) are quintuple facts in the hyper-relational medical knowledge graph, also known as hyper-relational facts. In the quintuple fact (fever, medication, cefradine, medication explanation, cefradine is used to reduce fever), (fever, medication, cefradine) is the primary triple, and (medication explanation, cefradine is used to reduce fever) is the qualifier. Specifically, "medication explanation" is the key edge, and "cefradine is used to reduce fever" is the value node.

[0071] Typically, in a hyper-relational knowledge graph, there are multiple quintuple facts.

[0072] Figure 4 An example diagram of a hyper-relational financial knowledge graph related to a financial scenario is shown. Figure 4 As shown in Figure 2, the facts contained in this hyper-relational financial knowledge graph are:

[0073] (Apple, supplier, Foxconn)

[0074] (Apple, main product, iPhone, product analysis, iPhone has a high market share)

[0075] Among them, (Apple, Supplier, Foxconn) is a triplet fact in the hyper-relational financial knowledge graph; (Apple, Main Product, iPhone, Product Interpretation, iPhone has a high market share) is a quintuple fact in the hyper-relational financial knowledge graph, also known as a hyper-relational fact. In this quintuple fact (Apple, Main Product, iPhone, Product Interpretation, iPhone has a high market share), (Apple, Main Product, iPhone) is the primary triplet, and (Product Interpretation, iPhone has a high market share) is the qualifier. Specifically, "Product Interpretation" is the key edge, and "iPhone has a high market share" is the value node.

[0076] In practical applications, the above-mentioned hyper-relational knowledge graph may include multiple facts, and the multiple facts may include quintuple facts and / or triple facts.

[0077] In step 102 above, the first target triple fact includes the first node and the qualifier of the quintuple fact. The qualifier includes a key edge and a value node. That is, the first target triple fact includes the first node, the value node, and a key edge connecting the first node and the value node.

[0078] by Figure 2 Taking the five-tuple fact (headache, medication, ibuprofen, medication explanation, ibuprofen is used to relieve pain) as an example, after modification, the first target triple fact is (#, medication explanation, ibuprofen is used to relieve pain). The specific content of "#" can be edited according to actual needs. Among them, # is the node used to replace the main triple (headache, medication, ibuprofen).

[0079] The above step 102 can be used to modify multiple five-tuple facts in the hyper-relational knowledge graph to obtain multiple first target three-tuple facts; the multiple first target three-tuple facts correspond one-to-one to the multiple five-tuple facts.

[0080] In the above 103, a first knowledge graph is constructed based on the first target triple fact, and the first knowledge graph includes the first target triple fact. Note: Any triple fact consists of two nodes and an edge connecting the two nodes.

[0081] When there are multiple first target triple facts, the multiple first target triple facts can be merged to obtain a first knowledge graph. Merging multiple first target triple facts means merging the same nodes in the multiple first target triple facts to obtain the first knowledge graph.

[0082] In practical applications, in addition to quintuple facts, hyperrelational knowledge graphs usually also include triple facts. In one example, when constructing the first knowledge graph, the triple facts in the hyperrelational knowledge graph can be ignored, that is, the first knowledge graph is constructed only based on the first target triple facts corresponding to the quintuple facts in the hyperrelational knowledge graph. In practical applications, the number of triple facts in the hyperrelational knowledge graph accounts for a large proportion of the entire hyperrelational knowledge graph. If the triple facts in the hyperrelational knowledge graph are ignored, the number of nodes in the final first knowledge graph will be much smaller than the number of nodes in the hyperrelational knowledge graph.

[0083] In order to ensure that the number of nodes in the final first knowledge graph is close to the number of nodes in the hyper-relational knowledge graph, the triple facts in the hyper-relational knowledge graph can be taken into account when constructing the first knowledge graph. In this way, the number of nodes in the final first knowledge graph is close to the number of nodes in the hyper-relational knowledge graph, thereby avoiding information loss and improving the rationality of the embedded representation of the first target triple facts, that is, improving the rationality of the embedded representation of the quintuple facts. Specifically, the above method may also include:

[0084] 107. Determine triple facts from the hyper-relational knowledge graph.

[0085] 108. Replace the target node in the triple fact with a second node used to represent the triple fact to obtain a third target triple fact.

[0086] A triple fact includes a head entity node, a tail entity node, and a relationship edge connecting the head entity node and the tail entity node. The target node can be either the head entity node or the tail entity node. If the target node can be the head entity node, the third target triple fact includes: a second node representing the triple fact, a tail entity node, and a relationship edge connecting the second node representing the triple fact and the tail entity node.

[0087] In this embodiment, it is equivalent to filling in the qualifier for the triple fact according to the triple fact.

[0088] In the above step 103, “building a first knowledge graph according to the first target triple fact” may include:

[0089] Construct a first knowledge graph based on the first target triple fact and the third target triple fact.

[0090] The number of the first target triple facts can be one or more, and the number of the third target triple facts can be one or more. The first target triple facts and the third target triple facts can be merged to obtain a first knowledge graph.

[0091] In a hyper-relational knowledge graph, there is usually a situation where the value node of a quintuple fact is the same as the head entity node or the tail entity node of a triple fact. That is to say, when constructing the first knowledge graph, the first target triple fact and the third target triple fact may be merged due to the existence of the same node. Then, when performing graph embedding processing on the first knowledge graph to obtain the embedded representation of the first target triple fact, it can be combined with the third target triple fact, that is, it can be combined with the triple facts in the hyper-relational knowledge graph, which is conducive to improving the rationality of the embedded representation. Similarly, when performing graph embedding processing on the first knowledge graph to obtain the embedded representation of the third target triple fact, it can be combined with the first target triple fact, that is, it can be combined with the quintuple fact in the hyper-relational knowledge graph, which is conducive to improving the rationality of the embedded representation.

[0092] In the above 104, the initial embedding representation of the first node is determined according to the embedding representation of the main triple.

[0093] In one example, the embedding representation of the main triple may include: the embedding representation of the head entity node, the embedding representation of the tail entity node, and the embedding representation of the edge connecting the head entity node and the tail entity node; the embedding representation of the head entity node, the embedding representation of the tail entity node, and the embedding representation of the edge connecting the head entity node and the tail entity node may be merged to obtain an initial embedding representation of the first node. For example, the merged embedding representation may be used as the initial embedding representation of the first node. The merging method may be addition of corresponding elements, multiplication of corresponding elements, or vector concatenation, etc.

[0094] In one example, the following formula may be used for merging:

[0095] h b =W b (h u ||h r ||h e ) (1)

[0096] Among them, h b is the embedding representation of triple fact b, W b is the merge matrix, h u 、h r 、h e are the embedding representations of the head entity node, relationship edge, and tail entity node in the main triple, respectively. u ||h r ||h e It is h i 、h r 、h e Perform vector stitching.

[0097] In step 105 above, graph embedding processing is performed on the first knowledge graph, that is, the embedding representation of each node and each edge in the first knowledge graph is updated once or multiple times to obtain a final embedding representation of each node and a final embedding representation of each edge; based on the final embedding representation of each node and the final embedding representation of each edge, the embedding representation of the triple fact in the first knowledge graph is determined. The embedded representation of the triple fact in the first knowledge graph includes: the embedded representation of each of the two nodes of the triple fact and the embedded representation of the edge connecting the two nodes.

[0098] The initial embedding representation of other nodes and edges in the first knowledge graph except the above-mentioned first node can be achieved in the following way: word embedding is performed on the node information of other nodes to obtain the initial embedding representation; word embedding is performed on the edge information of the edges to obtain the initial embedding representation.

[0099] When the first knowledge graph includes the third target triple fact, the above method may further include:

[0100] 109. Determine an initial embedding representation of the second node according to the embedding representation of the triple fact.

[0101] In one example, the embedded representation of a triple fact may include: an embedded representation of a head entity node, an embedded representation of a tail entity node, and an embedded representation of a relationship edge connecting the head entity node and the tail entity node; the embedded representation of the head entity node, the embedded representation of the tail entity node, and the embedded representation of the relationship edge connecting the head entity node and the tail entity node may be merged to obtain an initial embedded representation of the second node. For example, the merged embedded representation may be used as the initial embedded representation of the second node. The merging method may be addition of corresponding elements, multiplication of corresponding elements, or vector concatenation, etc.

[0102] In the above step 105, “performing graph embedding processing on the first knowledge graph according to the initial embedding representation of the first node to obtain an embedding representation of the first target triple fact” includes:

[0103] According to the initial embedding representation of the first node and the initial embedding representation of the second node, graph embedding processing is performed on the first knowledge graph to obtain the embedding representation of the first target triple fact and the embedding representation of the third target triple fact.

[0104] The facts in the first knowledge graph are all triple facts. By performing graph embedding processing on the first knowledge graph, the embedded representation of all triple facts in the first knowledge graph can be obtained.

[0105] In the above 106, usually, there are multiple triple facts in the first knowledge graph, and the multiple triple facts include the above first target triple fact.

[0106] The embedded representation of the first target triple fact may include: an embedded representation of the first node, an embedded representation of the value node, and an embedded representation of a key edge connecting the first node and the value node.

[0107] In one example, the embedding representation of the first target triple fact is used as the embedding representation of the quintuple fact, that is, the embedding representation of the quintuple fact includes: the embedding representation of the first target triple fact.

[0108] In another example, the embedding representation of the quintuple fact can be determined based on the embedding representation of the first target triple fact and the embedding representation of the main triple, where the embedding representation of the quintuple fact includes: the embedding representation of the first target triple fact and the embedding representation of the main triple.

[0109] Optionally, the above method may further include:

[0110] According to the embedding representation of the third target triple fact, the target embedding representation of the triple fact in the hyper-relational knowledge graph is determined.

[0111] In one example, the embedding representation of the third target triple fact can be used as the target embedding representation of the triple fact in the hyper-relational knowledge graph. Of course, in actual applications, the embedding representation of the triple fact can be directly used as the target embedding representation of the triple fact in the hyper-relational knowledge graph.

[0112] In the technical solution provided in the embodiment of the present application, the main triple of the quintuple fact in the hyper-relational knowledge graph is coarsened into a node to replace it. In this way, when the graph embedding processing is performed subsequently, the association information between the main triple in the quintuple fact as a whole and the qualifier can be captured, that is, the association information between the main triple in the quintuple fact as a whole and the attribute information corresponding to the main triple can be captured, which can effectively improve the rationality of the embedded representation of the quintuple fact in the hyper-relational knowledge graph.

[0113] The following describes a method for determining the embedding representation of the main triple. Specifically, the above method may further include:

[0114] 110. Modify the quintuple fact into a second target triplet fact by deleting the qualifier in the quintuple fact.

[0115] 111. Construct a second knowledge graph based on the second target triple fact.

[0116] 112. Perform graph embedding processing on the second knowledge graph to obtain an embedded representation of the second target triple fact.

[0117] 113. Determine an embedding representation of the main triple based on the embedding representation of the second target triple fact.

[0118] Among the above 110, Figure 2 For example, the five-tuple fact (headache, medication, ibuprofen, medication explanation, ibuprofen is used to relieve pain) is modified to obtain the second target triple fact (headache, medication, ibuprofen). The second target triple fact only includes the main triple in the five-tuple fact and does not include the qualifier in the five-tuple fact.

[0119] In the above 111, there can be multiple quintuple facts, so there can also be multiple second target triple facts, and the multiple second target triple facts correspond one-to-one to the multiple quintuple facts.

[0120] Multiple second target triple facts can be merged to obtain a second knowledge graph.

[0121] In one example, a second knowledge graph may be constructed based on the second target triple fact and the triple facts in the hyper-relational knowledge graph. The second target triple fact and the triple facts in the hyper-relational knowledge graph may be merged to obtain the second knowledge graph.

[0122] In the above 112, the graph embedding processing is performed on the second knowledge graph, which can not only obtain the embedded representation of the second target triple fact, but also obtain the embedded representation of the triple fact in the hyper-relational knowledge graph.

[0123] Since the facts in the second knowledge graph are all triple facts, the specific process of graph embedding the second knowledge graph can be referenced in the relevant content of the prior art. For example, a computational model based on a graph neural network can be used to perform graph embedding on the second knowledge graph to obtain an embedded representation of all triple facts in the second knowledge graph.

[0124] To improve the graph embedding effect, the above step 105 of "performing graph embedding processing on the first knowledge graph according to the initial embedding representation of the first node to obtain the embedding representation of the first target triple fact" can be implemented by the following steps:

[0125] 1051. Based on the initial embedding representation of the first node, perform graph embedding processing on the first knowledge graph using a computational model based on a graph neural network to obtain an embedding representation of the first target triple fact.

[0126] The computational model is trained based on the sample hyper-relational knowledge graph and its training labels, and the specific training process will be described in detail in the following embodiments.

[0127] The above-mentioned graph neural network may specifically include: Graph Attention Network (GAT) or Graph Convolutional Networks (GCN).

[0128] According to the initial embedding representation of the first node, the first knowledge graph is subjected to graph embedding processing using a computational model based on a graph neural network to obtain an embedding representation of triple facts in the first knowledge graph.

[0129] In one feasible solution, the first knowledge graph includes a third node. The computing model is used to:

[0130] S11. Determine multiple neighborhood elements of the third node in the first knowledge graph.

[0131] The multiple neighborhood elements of the third node include neighboring nodes of the third node and edges between the neighboring nodes and the third node.

[0132] S12. Update the embedded representation of the third node according to the embedded representations of multiple neighborhood elements of the third node.

[0133] The third node mentioned above refers to any node in the first knowledge graph.

[0134] In the above S11, the third node has one or more neighbor nodes.

[0135] In the above S12, in one example, the embedding representations of multiple neighborhood elements may be fused to obtain a fused embedding representation; and the fused embedding representation is used as the embedding representation of the updated third node.

[0136] In another example, the third node has multiple neighboring nodes, and the multiple neighboring nodes of the third node include the first neighboring node. The above step of "updating the embedded representation of the third node according to the embedded representations of the multiple neighboring elements of the third node" in S12 can be implemented by the following steps:

[0137] S121. Merge the embedded representation of the first neighbor node and the embedded representation of the edge between the first neighbor node and the third node to obtain a merged embedded representation corresponding to the first neighbor node.

[0138] The merging method may include: adding, multiplying or concatenating corresponding elements.

[0139] S122: Fusing the merged embedding representations corresponding to the plurality of neighboring nodes of the third node to obtain a fused embedding representation as an updated embedding representation of the third node.

[0140] An aggregation function can be used to capture the influence of the third node's neighbors on the third node, that is, the embedding representation of the third node is updated by aggregating neighborhood information. This can be achieved using the following formula:

[0141] h er =ψ(h e , h r ) (2)

[0142] h u =f agg (N u ) (3)

[0143]

[0144] Where u is the third node, e is the first neighbor node, r is the edge between the first neighbor node and the third node, h e and h r are the embedded representations of e and r respectively, ψ is the merging function, and h er is the merged embedding representation corresponding to the first neighbor node; N u Refers to the set of neighborhood elements of u; where f agg () is a weighted sum aggregator; LeakyReLU() is a nonlinear activation function; |N u | for N u The number of first neighbor nodes in W π(r) It is the fusion matrix corresponding to the relationship type to which r belongs.

[0145] The third node may be any node in the first target triple fact (for example, the first node or value node used to represent the main triple), or any node in the third target triple fact.

[0146] The computing model includes a first network layer, wherein the first network layer is used to perform the above step S12. The embedded representations of multiple neighborhood elements of the third node are all input information of the first network layer.

[0147] The computational model may include multiple sequentially connected first network layers, each of which is configured to update the embedding representation of the third node once. The output of a preceding network layer in the multiple sequentially connected first network layers serves as the input of a subsequent network layer, i.e., the subsequent network layer is configured to update the embedding representation of the third node output by the preceding network layer.

[0148] Optionally, the first knowledge graph includes a first edge; and the computing model is further used to:

[0149] S13: Determine the relationship type to which the first edge belongs.

[0150] S14. Update the embedded representation of the first edge according to the update parameter corresponding to the relationship type to which the first edge belongs.

[0151] In the above S13, Figure 3 For example, the relationship types are symptoms and medication.

[0152] Different relationship types correspond to different update parameters, specifically an update matrix. The embedding representation of the first edge can be multiplied by the update matrix to obtain the updated embedding representation of the first edge.

[0153] Among them, the parameter values ​​in the update matrix can be obtained through model training.

[0154] In one example, each first network layer executes the above steps S11 , S12 , S13 and S14 .

[0155] In practical application, the above method may further include:

[0156] 114. Perform knowledge matching on the information to be matched based on the hyper-relational knowledge graph and the embedded representation of the quintuple fact in the hyper-relational knowledge graph.

[0157] In one example, feature extraction can be performed on the information to be matched to obtain the features of the information to be matched. The matching degree of the features is calculated with the embedded representations of all facts in the hyper-relational knowledge graph, and the fact with the highest matching degree is determined as the target fact, which is used as the knowledge matching result.

[0158] As described above, the embedded representation of a five-tuple fact in a hyperrelational knowledge graph includes the embedded representation of the first target triple fact and the embedded representation of the main triple. The embedded representation of the first target triple fact includes the embedded representation of the first node, the embedded representation of the key edge, and the embedded representation of the value node; the embedded representation of the main triple includes the embedded representation of the head entity node, the relationship edge, and the tail entity node.

[0159] Therefore, we can calculate the similarity between the feature and each of the embedded representations of the five-tuple fact. The sum of the similarities between the sample feature and each of the embedded representations of the five-tuple fact is used as the matching degree. In practical applications, the matching degree can be normalized.

[0160] In the e-commerce product risk identification scenario, the above-mentioned information to be matched can be the product information of the product to be identified, and the risk points of the product to be identified can be determined based on the knowledge matching results.

[0161] In the medication consultation scenario, the information to be matched may be the symptom information input by the user, and medication recommendations may be determined based on the knowledge matching results.

[0162] In one example, the above-mentioned calculation model can be used to extract features from the information to be matched to obtain features.

[0163] In one feasible solution, the step of "performing graph embedding processing on the second knowledge graph to obtain an embedded representation of the second target triple fact" in step 111 above can be implemented using the following steps:

[0164] The computing model is used to perform graph embedding processing on the second knowledge graph to obtain an embedded representation of the triple facts in the second knowledge graph.

[0165] There are multiple triple facts in the second knowledge graph, and the multiple triple facts include: the second target triple fact.

[0166] The second knowledge graph includes a fourth node. The computing model is specifically used for:

[0167] S21. Determine multiple neighborhood elements of the fourth node in the second knowledge graph.

[0168] The multiple neighborhood elements of the fourth node include neighboring nodes of the fourth node and edges between the neighboring nodes and the fourth node.

[0169] S22. Update the embedded representation of the fourth node according to the embedded representations of multiple neighboring elements of the fourth node.

[0170] The fourth node has multiple neighbor nodes, the multiple neighbor nodes include a second neighbor node, and the second neighbor node is any one of the multiple neighbor nodes.

[0171] In S22 above, the embedded representation of the second neighbor node and the embedded representation of the edge between the second neighbor node and the fourth node may be merged to obtain a merged embedded representation corresponding to the second neighbor node. The merging method can be found in the corresponding content of the above embodiment and will not be repeated here. The merged embedded representations corresponding to the multiple neighbor nodes of the fourth node are fused to obtain a fused embedded representation, which serves as the updated embedded representation of the fourth node.

[0172] The specific merging and fusion processes can be found in the corresponding content of the first knowledge graph mentioned above, and will not be repeated here.

[0173] Through the above steps, the embedded representations of the two nodes of each triple fact in the second knowledge graph and the embedded representation of the edge connecting the two nodes can be obtained.

[0174] The following will be combined with the figure Figure 5 The model training method provided in the embodiment of this application is introduced. Figure 5As shown, the model training method includes:

[0175] 201. Determine quintuple facts from the sample hyperrelational knowledge graph.

[0176] The five-tuple fact includes a main triple and a qualifier.

[0177] 202. Modify the quintuple fact into a first target triplet fact by replacing the main triplet in the quintuple fact with the first node.

[0178] 203. Construct a first knowledge graph based on the first target triple fact.

[0179] 204. Determine an initial embedding representation of the first node according to the embedding representation of the main triple;

[0180] 205. Based on the initial embedding representation of the target node, perform graph embedding processing on the first target knowledge graph using a computational model based on a graph neural network to obtain an embedding representation of the first target triple fact.

[0181] 206. Determine a first possibility that the quintuple fact is true based on the embedded representation of the first target triple fact.

[0182] 207. Optimize the computing model according to the first possibility and the training label of the quintuple fact.

[0183] The specific implementation of the above steps 201-205 can refer to the corresponding content in the above embodiments and will not be described in detail here.

[0184] In the above 206, at least one first convolutional layer in the computing model can be used to perform convolution processing on the embedded representation of the first target triple fact to obtain a convolution processing result; and the first possibility that the five-tuple fact is true is determined based on the convolution processing result.

[0185] In the above 207 , the training label of the five-tuple fact is used to indicate whether the five-tuple fact is true. For example, when the training label is 1, it indicates that the five-tuple fact is true; when the training label is 0, it indicates that the five-tuple fact is not true.

[0186] The training labels of the five-tuple facts and their first likelihood can be input into the representation loss function to obtain the representation loss value; and the computational model is optimized according to the representation loss value.

[0187] The specific optimization process can refer to the existing technology and will not be described in detail here. For example, the gradient descent method can be used for parameter optimization.

[0188] Optionally, the above method further includes:

[0189] 208. Modify the quintuple fact into a second target triplet fact by deleting the qualifier in the quintuple fact;

[0190] 209. Construct a second knowledge graph based on the second target triple fact;

[0191] 210. Perform graph embedding processing on the second knowledge graph using the computing model to obtain an embedded representation of the second target triple fact;

[0192] 211. Determine a second possibility that the quintuple fact is true based on the embedded representation of the second target triple fact.

[0193] The specific implementation of the above steps 208-210 can refer to the corresponding content in the above embodiments and will not be described in detail here.

[0194] At least one second convolutional layer in the computing model can be used to perform convolution processing on the embedded representation of the second target triple fact to obtain a convolution processing result; and a second possibility that the five-tuple fact is true is determined based on the convolution processing result.

[0195] Accordingly, the step of “optimizing the calculation model according to the first possibility and the training label of the five-tuple fact” in 207 above can be implemented by the following steps:

[0196] determining a target possibility based on the first possibility and the second possibility;

[0197] The computational model is optimized based on the target likelihood and the training labels of the five-tuple facts.

[0198] The first possibility and the second possibility can be weighted and summed to obtain the target possibility, wherein the weights corresponding to the first possibility and the second possibility can be set according to actual needs, and the embodiments of the present application do not make specific limitations on this.

[0199] The target probability and the training labels of the five-tuple facts can be input into the representation loss function to obtain a representation loss value, and the computational model is optimized according to the representation loss value.

[0200] Optionally, the above method may further include:

[0201] 212. Get sample information.

[0202] 213. Using the computational model to extract features from the sample information, obtain sample features of the sample information.

[0203] 214. Determine a degree of match between the sample feature and the embedded representation of the quintuple fact in the sample hyper-relational knowledge graph.

[0204] 215. Determine a matching loss value based on the matching degree and the training label of the sample information.

[0205] The sample information may include product information of sample products, user information of sample users, and the like.

[0206] The specific implementation process of extracting features from the sample information using the calculation model in the above 213 can be found in the prior art and will not be described in detail here.

[0207] In the above 214, as described above, the embedded representation of the five-tuple fact includes the embedded representation of the first target triple fact and the embedded representation of the main triple. The embedded representation of the first target triple fact includes the embedded representation of the first node, the embedded representation of the key edge, and the embedded representation of the value node; the embedded representation of the main triple includes the embedded representation of the head entity node, the relationship edge, and the tail entity node.

[0208] Therefore, we can calculate the similarity between the sample feature and each of the embedded representations of the five-tuple fact. The sum of the similarities between the sample feature and each of the embedded representations of the five-tuple fact is used as the matching degree. In practical applications, the matching degree can be normalized.

[0209] In the above 215, the training label of the sample information includes the expected five-tuple fact. The matching degree and the training label of the sample information can be input into a matching loss function to obtain a matching loss value.

[0210] It should be noted that the specific form of the loss function in the embodiment of the present application can be set according to actual needs, and the embodiment of the present application does not make any specific limitations on this.

[0211] Accordingly, the step of “optimizing the calculation model according to the first possibility and the training label of the five-tuple fact” in 207 above includes:

[0212] 2071. Determine a representation loss value based on the first possibility and the training label of the five-tuple fact.

[0213] 2072. Optimize the calculation model according to the representation loss value and the matching loss value.

[0214] The representation loss value and the matching loss value can be weighted and summed to obtain the total loss value; the calculation model is optimized based on the total loss value.

[0215] In the technical solution provided in the embodiment of the present application, the main triple of the quintuple fact in the hyper-relational knowledge graph is coarsened into a node to replace it. In this way, when the graph embedding processing is performed subsequently, the association information between the main triple in the quintuple fact as a whole and the qualifier can be captured, that is, the association information between the main triple in the quintuple fact as a whole and the attribute information corresponding to the main triple can be captured, which can effectively improve the rationality of the embedded representation of the quintuple fact in the hyper-relational knowledge graph.

[0216] It should be noted that for any steps not fully described in detail in the methods provided in the embodiments of the present application, reference may be made to the corresponding contents in the aforementioned embodiments, and no further elaboration is required here. Furthermore, in addition to the aforementioned steps, the methods provided in the embodiments of the present application may also include some or all of the other steps in the aforementioned embodiments, for which reference may be made to the corresponding contents in the aforementioned embodiments, and no further elaboration is required here.

[0217] Figure 6 A flow chart of a commodity risk identification method is shown in FIG. Figure 6 As shown, the method includes:

[0218] 601. Determine quintuple facts from the hyper-relational risk knowledge graph.

[0219] The five-tuple fact includes a main triple and a qualifier;

[0220] 602. Modify the quintuple fact into a first target triplet fact by replacing the main triplet in the quintuple fact with the first node.

[0221] 603. Construct a first knowledge graph based on the first target triple fact.

[0222] 604. Determine an initial embedding representation of the first node according to the embedding representation of the main triple.

[0223] 605. Perform graph embedding processing on the first knowledge graph based on the initial embedding representation of the first node to obtain an embedding representation of the first target triple fact.

[0224] 606. Determine an embedded representation of the quintuple fact according to the embedded representation of the first target triple fact.

[0225] 607. Perform risk identification on the commodity to be identified based on the hyper-relational risk knowledge graph and the embedded representation of the quintuple fact in the hyper-relational risk knowledge graph.

[0226] In the above 607, knowledge matching is performed on the product information of the product to be identified based on the hyper-relational knowledge graph and the embedded representation of the five-tuple fact in the hyper-relational knowledge graph; and the risk of the product to be identified is determined based on the knowledge matching result.

[0227] The knowledge matching process can be found in the corresponding content of the above embodiments and will not be repeated here. The knowledge matching result includes the five-tuple facts matched by the product information. The risk of the product to be identified can be determined based on the relevant information of the five-tuple facts matched by the product information.

[0228] In the technical solution provided in the embodiment of the present application, the main triple of the quintuple fact in the hyper-relational knowledge graph is coarsened into a node to replace it. In this way, when the graph embedding processing is performed subsequently, the association information between the main triple in the quintuple fact as a whole and the qualifier can be captured, that is, the association information between the main triple in the quintuple fact as a whole and the attribute information corresponding to the main triple can be captured, which can effectively improve the rationality of the embedded representation of the quintuple fact in the hyper-relational knowledge graph.

[0229] It should be noted that for any steps not fully described in detail in the methods provided in the embodiments of the present application, reference may be made to the corresponding contents in the aforementioned embodiments, and no further elaboration is required here. Furthermore, in addition to the aforementioned steps, the methods provided in the embodiments of the present application may also include some or all of the other steps in the aforementioned embodiments, for which reference may be made to the corresponding contents in the aforementioned embodiments, and no further elaboration is required here.

[0230] The following will use the e-commerce product risk identification scenario as an example to introduce the technical solution provided by the embodiment of this application:

[0231] Step 1: Obtain the hyper-relationship risk knowledge graph of e-commerce products.

[0232] Step 2: Based on the hyper-relational risk knowledge graph, determine the coarse-grained graph 10 (such as Figure 7a As shown, that is, the first knowledge graph mentioned above) and the fine-grained graph 20 (as shown Figure 7b As shown, that is, the second knowledge graph mentioned above).

[0233] like Figure 7a As shown, a fact in the coarse-grained graph consists of a square node 100 (corresponding to the first node), a circular node 200 (corresponding to the value node) and an edge 300 (corresponding to the key edge); Figure 7b As shown, a fact in the fine-grained graph consists of two nodes 400 (corresponding to the head and tail entity nodes) and an edge 500 (corresponding to the relationship edge).

[0234] Step 3: Use the graph convolutional neural network (GCN) to encode the fine-grained graph and obtain the embedded representation of each triple fact in the fine-grained graph.

[0235] Step 4: Determine the initial embedding representation of each square node in the coarse-grained graph based on the embedding representation of each triple fact in the fine-grained graph.

[0236] Step 5: Based on the initial embedding representation of each square node in the coarse-grained graph, the coarse-grained graph is encoded using the graph convolutional neural network (GCN) to obtain the embedding representation of each triple fact in the coarse-grained graph.

[0237] Step 6: Determine the embedding representation of each fact in the hyper-relational risk knowledge graph based on the embedding representation of each triple fact in the fine-grained graph and the embedding representation of each triple fact in the coarse-grained graph.

[0238] in, Figure 8 The embedding representation of the hyper-relational risk knowledge graph includes the embedding representation of each fact in the hyper-relational risk knowledge graph.

[0239] For the specific determination process, please refer to the corresponding content in the above embodiments.

[0240] Step 7: Get the keywords of the product to be identified.

[0241] The keywords include the keywords in the title and the keywords in the abstract.

[0242] Step 8: Extract features of keywords to obtain features.

[0243] Step 9: Match the feature with the embedded representation of each fact in the hyper-relational risk knowledge graph to obtain the target fact matched by the feature.

[0244] Step 10: Determine the risk points of the product to be identified based on the target facts.

[0245] Steps 7 to 10 above correspond to Figure 8 The step of risk identification of the goods to be identified.

[0246] Figure 9 FIG. 1 shows a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. Figure 9As shown, the electronic device includes a memory 1101 and a processor 1102. The memory 1101 can be configured to store various other data to support operations on the electronic device. Examples of such data include instructions for any application or method operating on the electronic device. The memory 1101 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0247] The memory 1101 is used to store programs;

[0248] The processor 1102 is coupled to the memory 1101 and is configured to execute the program stored in the memory 1101 to implement the methods provided in the above method embodiments.

[0249] Further, if Figure 9 As shown, the electronic device also includes: a communication component 1103, a display 1104, a power component 1105, an audio component 1106 and other components. Figure 9 Only some components are shown schematically, which does not mean that the electronic device only includes Figure 9 Components shown.

[0250] Accordingly, an embodiment of the present application further provides a computer-readable storage medium storing a computer program, which, when executed by a computer, can implement the steps or functions of the methods provided in the above-mentioned method embodiments.

[0251] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.

[0252] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, or of course, by means of hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the prior art can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiments.

[0253] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A data processing method, wherein: include: Determine a five-tuple fact from a hyper-relational knowledge graph, wherein the five-tuple fact includes a main triple and a qualifier, wherein the main triple includes a head entity node, a tail entity node, and a relationship edge connecting the head entity node and the tail entity node, and the qualifier includes a key edge and a value node; Modifying the five-tuple fact into a first target triple fact by replacing a main triple in the five-tuple fact with a first node, where the first target triple fact includes the first node, the value node, and a key edge connecting the first node and the value node; Constructing a first knowledge graph based on the first target triple fact; Acquire an embedding representation of the main triple, where the embedding representation of the main triple includes a first embedding representation of the head entity node, a second embedding representation of the tail entity node, and a third embedding representation of the relationship edge; Determining an initial embedding representation of the first node according to the embedding representation of the main triple, including: merging the first embedding representation, the second embedding representation, and the third embedding representation to obtain the initial embedding representation of the first node; Performing graph embedding processing on the first knowledge graph according to the initial embedding representation of the first node to obtain an embedding representation of the first target triple fact; Determining an embedding representation of the quintuple fact according to the embedding representation of the first target triple fact; Performing risk identification on the commodity to be identified based on the hyper-relational knowledge graph and the embedded representation of the quintuple facts in the hyper-relational knowledge graph; Among them, the facts contained in the super-relationship knowledge graph are: (prohibited goods, including, controlled drugs), (prohibited goods, including, involving knives and guns), (controlled drugs, including, controlled drugs 1, risk interpretation, controlled drugs 1 is a stimulant), (controlled drugs, including, controlled drugs 2, risk interpretation, controlled drugs 2 is a hallucinogen); among them, (prohibited goods, including, controlled drugs) and (prohibited goods, including, involving knives and guns) are triple facts in the super-relationship knowledge graph; (controlled drugs, including, controlled drugs 1, risk interpretation, controlled drugs (Controlled drug 1 is a stimulant) and (Controlled drugs, including, Controlled drug 2, Risk interpretation, Controlled drug 2 is a hallucinogen) are five-tuple facts in the hyper-relational knowledge graph; in (Controlled drugs, including, Controlled drug 1, Risk interpretation, Controlled drug 1 is a stimulant), (Controlled drugs, including, Controlled drug 1) is the primary triple, in (Controlled drugs, including, Controlled drug 1, Risk interpretation, Controlled drug 1 is a stimulant), (Risk interpretation, Controlled drug 1 is a stimulant) is the qualifier, Risk interpretation is the key edge, and Controlled drug 1 is a stimulant is the value node.

2. The method according to claim 1, wherein Also includes: Modifying the five-tuple fact into a second target triple-tuple fact by deleting a qualifier in the five-tuple fact; Constructing a second knowledge graph based on the second target triple fact; Performing graph embedding processing on the second knowledge graph to obtain an embedded representation of the second target triple fact; An embedding representation of the main triple is determined according to the embedding representation of the second target triple fact.

3. The method according to claim 1, wherein Also includes: Determining triple facts from the hyper-relational knowledge graph; Replacing the target node in the triple fact with a second node used to represent the triple fact to obtain a third target triple fact; Constructing a first knowledge graph based on the first target triple fact includes: Construct a first knowledge graph based on the first target triple fact and the third target triple fact.

4. The method according to claim 3, wherein: Also includes: Determining an initial embedding representation of the second node according to the embedding representation of the triple fact; Performing graph embedding processing on the first knowledge graph according to the initial embedding representation of the first node to obtain an embedding representation of the first target triple fact includes: According to the initial embedding representation of the first node and the initial embedding representation of the second node, graph embedding processing is performed on the first knowledge graph to obtain the embedding representation of the first target triple fact and the embedding representation of the third target triple fact.

5. The method according to claim 4, wherein Performing graph embedding processing on the first knowledge graph according to the initial embedding representation of the first node to obtain an embedding representation of the first target triple fact includes: Performing graph embedding processing on the first knowledge graph using a graph neural network-based computing model based on the initial embedding representation of the first node to obtain an embedding representation of the first target triple fact; The computational model is trained based on the sample hyper-relational knowledge graph and its training labels.

6. The method according to claim 5, wherein: The first knowledge graph includes a third node; The computational model is used to: Determining a plurality of neighboring elements of the third node in the first knowledge graph; The plurality of neighborhood elements of the third node include neighboring nodes of the third node and edges between the neighboring nodes and the third node; The embedded representation of the third node is updated according to the embedded representations of the plurality of neighboring elements of the third node.

7. The method according to claim 6, wherein: There are multiple neighboring nodes of the third node; the multiple neighboring nodes of the third node include the first neighboring node; Updating the embedded representation of the third node according to the embedded representations of the plurality of neighboring elements of the third node includes: Merging the embedded representation of the first neighbor node and the embedded representation of the edge between the first neighbor node and the third node to obtain a merged embedded representation corresponding to the first neighbor node; The merged embedding representations corresponding to the plurality of neighboring nodes of the third node are fused to obtain a fused embedding representation as an updated embedding representation of the third node.

8. The method according to any one of claims 1 to 4, wherein Based on the hyper-relational knowledge graph and the embedded representation of the quintuple facts in the hyper-relational knowledge graph, risk identification is performed on the commodity to be identified, including: Performing knowledge matching on the information to be matched according to the hyper-relational knowledge graph and the embedded representation of the quintuple fact in the hyper-relational knowledge graph; Determine the risk points of the goods to be identified based on the knowledge matching results.

9. A model training method, wherein: include: Determine a five-tuple fact from the sample hyper-relational knowledge graph, wherein the five-tuple fact includes a main triple and a qualifier, wherein the main triple includes a head entity node, a tail entity node, and a relationship edge connecting the head entity node and the tail entity node, and the qualifier includes a key edge and a value node; Modifying the five-tuple fact into a first target triple fact by replacing a main triple in the five-tuple fact with a first node, where the first target triple fact includes the first node, the value node, and a key edge connecting the first node and the value node; Constructing a first knowledge graph based on the first target triple fact; Acquire an embedding representation of the main triple, where the embedding representation of the main triple includes a first embedding representation of the head entity node, a second embedding representation of the tail entity node, and a third embedding representation of the relationship edge; Determining an initial embedding representation of the first node according to the embedding representation of the main triple, including: merging the first embedding representation, the second embedding representation, and the third embedding representation to obtain the initial embedding representation of the first node; According to the initial embedding representation of the target node, the first knowledge graph is subjected to graph embedding processing using a computational model based on a graph neural network to obtain an embedding representation of the first target triple fact; Determining a first possibility that the five-tuple fact is true according to the embedded representation of the first target three-tuple fact; Optimizing the computing model based on the first possibility and the training label of the five-tuple fact to identify product risks; Among them, the facts contained in the sample hyper-relation knowledge graph are: (prohibited goods, including, controlled drugs), (prohibited goods, including, involving knives and guns), (controlled drugs, including, controlled drug 1, risk interpretation, controlled drug 1 is a stimulant), (controlled drugs, including, controlled drug 2, risk interpretation, controlled drug 2 is a hallucinogen); among them, (prohibited goods, including, controlled drugs) and (prohibited goods, including, involving knives and guns) are triple facts in the sample hyper-relation knowledge graph; (controlled drugs, including, controlled drug 1, risk interpretation, (Controlled drug 1 is a stimulant) and (Controlled drugs, including, Controlled drug 2, risk interpretation, Controlled drug 2 is a hallucinogen) are five-tuple facts in the sample hyper-relational knowledge graph; in (Controlled drugs, including, Controlled drug 1, risk interpretation, Controlled drug 1 is a stimulant), (Controlled drugs, including, Controlled drug 1) is the primary triple, in (Controlled drugs, including, Controlled drug 1, risk interpretation, Controlled drug 1 is a stimulant), (Risk interpretation, Controlled drug 1 is a stimulant) is the qualifier, Risk interpretation is the key edge, and Controlled drug 1 is a stimulant is the value node.

10. The method according to claim 9, wherein: Also includes: Modifying the five-tuple fact into a second target triple-tuple fact by deleting a qualifier in the five-tuple fact; Constructing a second knowledge graph based on the second target triple fact; Performing graph embedding processing on the second knowledge graph using the computing model to obtain an embedded representation of the second target triple fact; Determining a second possibility that the five-tuple fact is true according to the embedded representation of the second target three-tuple fact; Optimizing the computing model according to the first possibility and the training label of the quintuple fact includes: determining a target possibility based on the first possibility and the second possibility; The computational model is optimized based on the target likelihood and the training labels of the five-tuple facts.

11. The method according to claim 9, wherein Also includes: Obtain sample information; Extracting features from the sample information using the computational model to obtain sample features of the sample information; Determining a degree of match between the sample features and an embedded representation of a quintuple fact in the sample hyper-relational knowledge graph; Determining a matching loss value based on the matching degree and the training label of the sample information; Optimizing the computing model according to the first possibility and the training label of the quintuple fact includes: determining a representation loss value based on the first possibility and the training label of the quintuple fact; The calculation model is optimized according to the representation loss value and the matching loss value.

12. An electronic device, wherein: include: memory and a processor, wherein The memory is used to store programs; The processor is coupled to the memory, and is configured to execute the program stored in the memory to implement the method according to any one of claims 1 to 11.

13. A computer-readable storage medium storing a computer program, wherein: When the computer program is executed by a computer, the method according to any one of claims 1 to 11 can be implemented.

Citation Information

Patent Citations

  • Knowledge processing method and device based on multilayer network space knowledge representation

    CN111611410A

  • Method for training multivariate relationship generation model, electronic device and medium

    US20220004892A1