Methods, devices, equipment, and storage media for constructing and using knowledge graphs for tracing origins
By acquiring source data as source entities, establishing interactive relationships and generating one-way relationship degrees, the problem of insufficient accuracy and flexibility in knowledge graph construction in existing technologies is solved, and more efficient source graph construction and querying are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-23
- Publication Date
- 2026-03-13
AI Technical Summary
Existing technologies suffer from low accuracy and poor flexibility when constructing knowledge graphs.
By acquiring traceability data, treating it as a traceability entity, establishing interactive relationships, generating one-way relationship degrees, determining target relationship degrees, and constructing a target traceability graph.
It improves the accuracy and flexibility of knowledge graph construction, simplifies the process of determining relation degrees, and enhances the accuracy of tracing results.
Smart Images

Figure CN115510240B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence knowledge graph technology, and in particular to a method, apparatus, device and storage medium for constructing and using a traceability knowledge graph. Background Technology
[0002] A knowledge graph, also known as a scientific knowledge graph, is a graph-based data structure composed of nodes and edges. In a knowledge graph, each node represents a real-world entity, and each edge represents a relationship between entities. The degree of the relationship between entities reflects the closeness of the edge relationship. Therefore, problems can be analyzed based on the degree of the relationships between entities in a knowledge graph.
[0003] In existing technologies, constructing a knowledge graph requires exhaustively enumerating different relationships when determining the relationship degree. However, knowledge graphs constructed using this method suffer from low accuracy and poor flexibility. Summary of the Invention
[0004] This application provides a method, apparatus, device, and storage medium for constructing and using a knowledge graph for tracing origins, so as to improve the flexibility and accuracy of knowledge graph construction.
[0005] In a first aspect, embodiments of this application provide a method for constructing a source-tracing knowledge graph, including:
[0006] Obtain traceability data;
[0007] Each source data is treated as a source entity, and edge relationships are established between source entities that have interactive relationships;
[0008] Based on the interaction data between source entities with edge relationships, generate the one-way relation degree of each source entity in the corresponding edge relationship;
[0009] Based on the one-way relation degree of the source entity with an edge relationship, determine the target relation degree of the corresponding edge relationship;
[0010] Based on the source entity, edge relationship, and target relationship degree, construct the target source map.
[0011] Secondly, embodiments of this application also provide a method for using a source tracing knowledge graph, including:
[0012] Obtain the data to be queried and the target source map; the target source map is constructed based on the source knowledge graph construction method.
[0013] The source entities that match the data to be queried in the target source map are taken as the target entities;
[0014] Based on the target entity and the target tracing map, determine the tracing chain of the data to be queried.
[0015] Thirdly, embodiments of this application also provide a knowledge graph construction apparatus for tracing origins, the apparatus comprising:
[0016] The data acquisition module is used to acquire traceability data;
[0017] The edge relationship establishment module is used to treat each source data as a source entity and establish edge relationships between source entities that have interactive relationships.
[0018] The one-way relation degree determination module is used to generate the one-way relation degree of each source entity in the corresponding edge relationship based on the interaction data between the source entities with edge relationships.
[0019] The target relation degree determination module is used to determine the target relation degree of the corresponding edge relationship based on the one-way relation degree of the source entity with an edge relationship.
[0020] The graph construction module is used to construct a target tracing graph based on the source entity, edge relationship, and target relationship degree.
[0021] Fourthly, embodiments of this application also provide an apparatus for using a source tracing knowledge graph, the apparatus comprising:
[0022] The data acquisition module is used to acquire the data to be queried and the target tracing graph; the target tracing graph is constructed based on the tracing knowledge graph construction device.
[0023] The target entity determination module is used to identify the source entities that match the data to be queried in the target source map as target entities.
[0024] The traceability chain determination module is used to determine the traceability chain of the data to be queried based on the target entity and the target traceability map.
[0025] Fifthly, embodiments of this application also provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the source knowledge graph construction method provided in the first aspect of this application, and / or implements the source knowledge graph usage method provided in the second aspect of this application.
[0026] Sixthly, embodiments of this application also provide a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the source tracing knowledge graph construction method provided in the first aspect of this application, and / or implements the source tracing knowledge graph usage method provided in the second aspect of this application.
[0027] In a seventh aspect, embodiments of this application also provide a computer program product, including a computer program that, when executed by a processor, implements the source knowledge graph construction method provided in the first aspect of this application, and / or implements the source knowledge graph usage method provided in the second aspect of this application.
[0028] The source tracing knowledge graph construction scheme provided in this application involves: acquiring source tracing data; treating each source tracing data as a source tracing entity and establishing edge relationships between source tracing entities with interactive relationships; generating one-way relation degrees for each source tracing entity in the corresponding edge relationship based on the interactive data between source tracing entities with edge relationships; determining the target relation degree of the corresponding edge relationship based on the one-way relation degree of the source tracing entities with edge relationships; and constructing a target source tracing graph based on the source tracing entities, edge relationships, and target relation degrees. This scheme, by determining the target relation degree based on the one-way relation degree as the basis for constructing the target source tracing graph, improves the accuracy of the target source tracing graph construction results and helps improve the accuracy of the source tracing results. Furthermore, this application eliminates the need for exhaustive enumeration of different relationships when determining the target relation degree, making it more convenient, faster, and more flexible. Attached Figure Description
[0029] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0030] Figure 1 This is a flowchart of a method for constructing a knowledge graph for tracing origins, provided in an embodiment of this application.
[0031] Figure 2 This is a flowchart of a method for constructing a knowledge graph for tracing origins, provided in an embodiment of this application.
[0032] Figure 3 This is a flowchart of a method for constructing a knowledge graph for tracing origins, provided in an embodiment of this application.
[0033] Figure 4 This is a flowchart illustrating a method for using a knowledge graph for tracing origins, as provided in an embodiment of this application.
[0034] Figure 5 This is a schematic diagram of the structure of a knowledge graph construction device for tracing origins, provided in an embodiment of this application.
[0035] Figure 6 This is a schematic diagram of the structure of a knowledge graph tracing device provided in an embodiment of this application;
[0036] Figure 7 This is a schematic diagram of the structure of an electronic device that implements a method for constructing and / or using a source knowledge graph, as provided in an embodiment of this application. Detailed Implementation
[0037] The present application will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the application and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present application, not the entire structure.
[0038] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this application, terms such as "first" and "second" are used only to distinguish descriptions and should not be construed as indicating or implying relative importance. The acquisition, storage, use, and processing of traceability data and interactive data in the technical solution of this application all comply with relevant national laws and regulations.
[0039] To facilitate understanding of the technical solution of this application, the method for constructing the source knowledge graph of this application will be described in detail first.
[0040] The source tracing knowledge graph construction methods and apparatuses provided in this application are applicable to application scenarios of constructing target knowledge graphs for data source tracing. The source tracing knowledge graph construction methods provided in this application can be executed by a source tracing knowledge graph construction apparatus, which can be implemented in software and / or hardware and specifically configured in an electronic device with certain computing and storage capabilities.
[0041] To facilitate understanding, we will first provide a detailed explanation of the method for constructing a knowledge graph for tracing origins.
[0042] See Figure 1 The method for constructing a knowledge graph for tracing origins, as shown, includes:
[0043] S110. Obtain traceability data.
[0044] In this context, traceability data refers to reference data that can be used to construct a traceability knowledge graph. Specifically, traceability data includes data of different traceability types, and traceability data of different types are related. The traceability type is used to characterize the type to which the traceability data belongs. For example, the traceability type may include at least one of account type, operator type, and device type; correspondingly, the traceability data may include at least one of account identifier, operator identifier, and device identifier.
[0045] Specifically, at least one type of traceability data can be obtained from a pre-set database or the cloud.
[0046] S120. Treat each source data as a source entity and establish edge relationships between source entities that have interactive relationships.
[0047] In this context, the source entity can be understood as a node in the source knowledge graph.
[0048] Here, an interaction relationship refers to a data interaction behavior between any two traceability entities. For example, an interaction relationship can be a directed interaction relationship or a non-directed interaction relationship. If the interaction relationship is a directed interaction relationship, it can optionally be a one-way interaction relationship between any two traceability entities; or it can optionally be a two-way interaction relationship between any two entities.
[0049] Here, edge relationships are used to characterize whether there is an interaction relationship between any two traceable entities. The directionality of the edge relationship can be determined based on the directionality of the interaction relationship. For example, if there is a directional interaction relationship between any two traceable entities, then there is a directional edge relationship between the two traceable entities; if there is a non-directional interaction relationship between any two traceable entities, then there is a non-directional edge relationship between the two traceable entities.
[0050] Specifically, each source data is treated as a source entity. For any two source entities, if there is an interaction relationship between them, then an edge relationship is constructed between the corresponding source entities.
[0051] S130. Based on the interaction data between the traceable entities with edge relationships, generate the one-way relation degree of each traceable entity in the corresponding edge relationship.
[0052] Interaction data refers to the data generated by the interaction between any two traceability entities. Interaction data can be determined based on the interaction relationship. For example, if the interaction between traceability entities with an edge relationship is unidirectional, the interaction data can be a set of unidirectional interaction data generated under that unidirectional relationship. If the interaction between traceability entities with an edge relationship is bidirectional, the interaction data can be two sets of unidirectional interaction data with opposite directions generated under that bidirectional relationship. Unidirectional interaction data refers to the data generated when one traceability entity actively initiates an interaction with another traceability entity within a set of traceability entities with an edge relationship.
[0053] The one-way relationship degree is used to characterize the degree of association between two current entities through one-way interaction. Specifically, the one-way relationship degree is determined based on the one-way interaction data.
[0054] Optionally, for any edge relationship, if the edge relationship is a one-way edge relationship, then based on the one-way interaction data between the two traceability entities connected by the edge relationship, a one-way relationship degree of the traceability entity corresponding to the edge relationship is generated; if the edge relationship is a two-way edge relationship, or if the edge relationship is two one-way edge relationships pointing in opposite directions, then based on the one-way interaction data between the two traceability entities connected by the edge relationship, two one-way relationship degrees of the traceability entities corresponding to the corresponding edge relationships are generated respectively; if the edge relationship is an undirected edge relationship, then based on the one-way interaction data between the two traceability entities connected by the edge relationship, two one-way relationship degrees of the traceability entities corresponding to the corresponding edge relationships are generated respectively.
[0055] S140. Determine the target relation degree of the corresponding edge relationship based on the one-way relation degree of the source entity with an edge relationship.
[0056] The target relation degree can be used to characterize the closeness between two source entities that have an interaction relationship. The target relation degree can serve as the weight of an edge relationship, quantifying the closeness between the source entities corresponding to that edge relationship. For example, the target relation degree can be determined based on the unidirectional relation degree.
[0057] For example, for any two traceable entities, if there is an edge relationship between the two traceable entities, the target relationship degree of the corresponding edge relationship is determined based on the one-way relationship degree of the two traceable entities.
[0058] Optionally, for any two source entities with an edge relationship, if the edge relationship is directed, the one-way relation degree can be directly used as the target relation degree. Specifically, if the edge relationship is one-way, the number of one-way relation degrees is 1, and correspondingly, the number of target relation degrees is 1; if the edge relationship is two-way, the number of one-way relation degrees is 2, and correspondingly, the number of target relation degrees is 2.
[0059] Alternatively, if the edge relationship is undirected, then generate the one-way relation degree for each of the two source entities of the corresponding edge relationship, and determine the target relation degree of the corresponding edge relationship based on the two one-way relation degrees. In this case, the number of target relation degrees is 1.
[0060] S150. Construct a target tracing graph based on the source entity, edge relationship, and target relationship degree.
[0061] Among them, the target tracing graph can be understood as a knowledge graph used for data tracing.
[0062] For example, each traceable entity can be used as a node to establish connecting edges between nodes with edge relationships, and the target relationship degree can be used as the edge weight of the corresponding edge relationship to obtain the target traceability graph.
[0063] In an optional embodiment, if the traceability data includes data of different traceability types, a corresponding target traceability map can be constructed for each type of traceability data.
[0064] To reduce the number of target tracing graphs and facilitate subsequent tracing of the graphs, in another optional embodiment, a hierarchical tracing graph of the corresponding tracing type can be constructed based on the tracing entities, edge relationships, and target relationship degree under the same tracing type for the tracing data of each tracing type; and edge relationships of each level of tracing graph can be established based on the association relationship to obtain the target tracing graph.
[0065] A hierarchical source graph refers to a knowledge graph containing only one type of source entity. A target source graph can include at least one hierarchical source graph. The number of hierarchical source graphs is determined by the source type. When there are at least two hierarchical source graphs, since there are relationships between source data of different source types, connection edges can be established between source entities of different hierarchical source graphs based on the relationships between the source data and their corresponding source entities. This allows different hierarchical source graphs to be combined to obtain the target source graph.
[0066] For example, if the tracing type includes at least one of account type, operator type and device type, then the target tracing map includes at least one of the corresponding account-level tracing map, operator-level tracing map and device-level tracing map.
[0067] In an optional embodiment, since the operator can interact with data by operating the account it holds, the edge relationship between the traceability entities of the account-level traceability graph and the operator-level traceability graph can be constructed, thereby realizing the connection between the account-level traceability graph and the operator-level traceability graph, and thus generating a target traceability graph including the account-level traceability graph and the operator-level traceability graph.
[0068] In another optional embodiment, since the operator can realize data interaction through its own devices, the edge relationship between the traceability entities of the operator-level traceability graph and the device-level traceability graph can be constructed, thereby realizing the connection between the operator-level traceability graph and the device-level traceability graph, and thus generating a target traceability graph including the operator-level traceability graph and the device-level traceability graph.
[0069] Understandably, by constructing a hierarchical source map of at least one source map type, the target source map is obtained, which improves the richness of the target source map's content and thus enhances its scalability, laying the foundation for subsequent hierarchical data source tracing based on the target source map.
[0070] The source tracing knowledge graph construction scheme provided in this application involves: acquiring source tracing data; treating each source tracing data as a source tracing entity and establishing edge relationships between source tracing entities with interactive relationships; generating one-way relation degrees for each source tracing entity in the corresponding edge relationship based on the interactive data between source tracing entities with edge relationships; determining the target relation degree of the corresponding edge relationship based on the one-way relation degree of the source tracing entities with edge relationships; and constructing a target source tracing graph based on the source tracing entities, edge relationships, and target relation degrees. This scheme, by determining the target relation degree based on the one-way relation degree as the basis for constructing the target source tracing graph, improves the accuracy of the target source tracing graph construction results and helps improve the accuracy of the source tracing results. Furthermore, this application eliminates the need for exhaustive enumeration of different relationships when determining the target relation degree, making it more convenient, faster, and more flexible.
[0071] Based on the above embodiments, this application also provides an optional embodiment. In this optional embodiment, the process for determining the target relation degree is further defined. It should be noted that for parts not described in detail in the embodiments of this application, please refer to the descriptions of other embodiments.
[0072] Furthermore, the operation of "generating the one-way relation degree of each tracer entity in the corresponding edge relationship based on the interaction data between tracer entities with edge relationships" is refined into "taking any pair of tracer entities with edge relationships as the current entity; for any current entity, generating the one-way relation degree of the current entity based on the interaction data generated by the current entity actively initiating an interaction behavior to another current entity", in order to improve the mechanism for determining the target relation degree.
[0073] See Figure 2 The method for constructing a knowledge graph for tracing origins, as shown, includes:
[0074] S210. Obtain traceability data.
[0075] S220. Treat each source data as a source entity and establish edge relationships between source entities that have interactive relationships.
[0076] S230. Take any pair of source entities with an edge relationship as the current entity.
[0077] The current entity can be any source entity in the source entity pair for which the degree of the target relation to be determined is to be represented. For each source entity pair, there are two current entities.
[0078] S240. For any current entity, generate the one-way relation degree of the current entity based on the interaction data generated by the current entity actively initiating an interaction behavior with another current entity.
[0079] Interaction behavior refers to actions by which one entity relates to another. For example, if one entity initiates a transfer to another, that transfer is an interaction behavior; similarly, if one entity initiates a payment to another, that payment is an interaction behavior. One-way relationship degree characterizes the extent to which a one-way interaction exists between two entities.
[0080] For example, a one-way relationship degree of the current entity can be generated based on a pre-built relationship degree determination function, according to the statistical data of the interaction data generated when the current entity actively initiates an interaction with another current entity. The relationship degree determination function is a monotonically increasing function of the statistical data, which can be set by technical personnel according to needs or experience, or determined repeatedly through numerous experiments.
[0081] For example, generating the one-way relationship degree of the current entity based on the interaction data generated by the current entity actively initiating an interaction with another current entity includes: generating the one-way relationship degree of the current entity based on the valid full interaction data of the current entity and / or the valid full interaction data of another current entity, as well as the interaction data generated by the current entity actively initiating an interaction with another current entity.
[0082] Optionally, valid full interaction data can be the full interaction data generated by the current entity.
[0083] To reduce the impact of interaction data between the current entity and itself on the determination of the degree of one-way relationship, the effective full interaction data can optionally be the result of removing the interaction data generated by the current entity's interaction with itself from the current entity's full interaction data. For example, if the current entity is the operator, since the same operator may have multiple accounts, when the operator initiates a transfer, there may be transfer interactions between the operator's two accounts, i.e., the operator transferring money to itself. Removing the interaction data of the operator transferring money to itself from the operator's interaction data will yield the operator's effective full interaction data.
[0084] In one optional embodiment, generating the one-way relationship degree of the current entity based on the valid full interaction data of the current entity and / or the valid full interaction data of another current entity, as well as the interaction data generated by the current entity actively initiating an interaction with another current entity, includes: determining the first relationship degree of the current entity based on the statistical proportion of the interaction data generated by the current entity actively initiating an interaction with another current entity in the valid full interaction data of the current entity; determining the second relationship degree of the current entity based on the statistical proportion of the interaction data generated by the current entity actively initiating an interaction with another current entity in the valid full interaction data of the other current entity; and generating the one-way relationship degree of the current entity based on the first relationship degree and / or the second relationship degree of the current entity.
[0085] The first relation degree refers to the degree of association between the current entity and another current entity, determined based on the current entity's full and valid interaction data. It is used to quantify the one-way interaction behavior between the current entity and another current entity, representing the degree of interaction between the current entities. The second relation degree refers to the degree of association between the current entity and another current entity, determined based on the other current entity's full and valid interaction data. It is used to quantify the one-way interaction behavior between the current entity and another current entity, representing the degree of interaction between the current entities.
[0086] The following section, taking the interaction behavior as a transfer behavior and the interaction data including the transfer amount as an example, will explain in detail the process of determining the first degree of relation and the second degree of relation.
[0087] The current entity is operator A, and the other current entity is operator B. Within a preset time period, if operator A transfers a portion of the funds to operator B amounting to m... AB The total amount of money transferred by operator A to non-operator A (i.e., excluding interactive data of operator A transferring money to itself) is m. A The portion of the transfer from operator B to operator A is m. BA The total amount of transfers from operator B to non-operator B (i.e., excluding interactive data where operator B transfers to itself) is m. B It should be noted that the embodiments of this application do not impose any limitation on the length of the preset time period, which can be set by technicians as needed.
[0088] Accordingly, the first relation degree of the current entity operator A is determined using the following formula:
[0089]
[0090] Where, ω A1 This is the first relation degree of operator A.
[0091] Accordingly, the second relation degree of the current entity operator A is determined using the following formula:
[0092]
[0093] Where, ω A2 This is the second relation degree of operator A.
[0094] Accordingly, the first degree of relation of the current entity B is determined using the following formula:
[0095]
[0096] Where, ω B1 This represents the first relation degree of operator B.
[0097] Accordingly, the second relation degree of the current entity operator B is determined using the following formula:
[0098]
[0099] Where, ω B2 This is the second relational degree of operator B.
[0100] Optionally, the first relation degree of operator A can be directly taken as the one-way relation degree ω(A->B) of operator A, that is, ω(A->B)=ω A1 The first relation degree of operator B is directly taken as the one-way relation degree ω(B->A) of operator B, that is, ω(B->A)=ω B1 .
[0101] Alternatively, the second relation degree of operator A can be directly taken as the one-way relation degree ω(A->B) of operator A, that is, ω(A->B)=ω A2 The second relation degree of operator B is directly taken as the one-way relation degree ω(B->A) of operator B, that is, ω(B->A)=ω B2 .
[0102] Alternatively, the unidirectional relation degree of operator A can be generated based on the weighted average of the first and second relation degrees, i.e., ω(A->B)=β1ω A1 +β2ω A2 Based on the weighted average of the first and second degree of relation of operator B, the unidirectional degree of relation of operator B is generated, i.e., ω(B->A)=β'1ω B1 +β'2ω B2 The specific values of β1, β2, β'1 and β'2 can be empirical or experimental values. It is only necessary to ensure that the sum of β1 and β2 is 1 and the sum of β'1 and β'2 is 1.
[0103] The following section, using the example of a transfer as the interaction behavior and the number of transfers as the interaction data, details the process of determining the first and second degree of relation.
[0104] The current entity is operator A, and the other current entity is operator B. Within a preset time period, if operator A transfers funds to operator B a total of n times... AB The total number of transfers from operator A to non-operator A (excluding data involving transfers from operator A to itself) is n. A The number of partial transfers from operator B to operator A is n. BA The total number of transfers from operator B to non-operator B (excluding data involving transfers from operator B to itself) is n. B It should be noted that the embodiments of this application do not impose any limitation on the length of the preset time period, which can be set by technicians as needed.
[0105] Accordingly, the first relation degree of the current entity operator A is determined using the following formula:
[0106]
[0107] Where, ω A1 This is the first relation degree of operator A.
[0108] Accordingly, the second relation degree of the current entity operator A is determined using the following formula:
[0109]
[0110] Where, ω A2 This is the second relation degree of operator A.
[0111] Accordingly, the first degree of relation of the current entity B is determined using the following formula:
[0112]
[0113] Where, ω B1 This represents the first relation degree of operator B.
[0114] Accordingly, the second relation degree of the current entity operator B is determined using the following formula:
[0115]
[0116] Where, ω B2 This is the second relational degree of operator B.
[0117] Optionally, the first relation degree of operator A can be directly taken as the one-way relation degree ω(A->B) of operator A, that is, ω(A->B)=ωA1 The first relation degree of operator B is directly taken as the one-way relation degree ω(B->A) of operator B, that is, ω(B->A)=ω B1 .
[0118] Alternatively, the second relation degree of operator A can be directly taken as the one-way relation degree ω(A->B) of operator A, that is, ω(A->B)=ω A2 The second relation degree of operator B is directly taken as the one-way relation degree ω(B->A) of operator B, that is, ω(B->A)=ω B2 .
[0119] Alternatively, the unidirectional relation degree of operator A can be generated based on the weighted average of the first and second relation degrees, i.e., ω(A->B)=β1ω A1 +β2ω A2 Based on the weighted average of the first and second degree of relation of operator B, the unidirectional degree of relation of operator B is generated, i.e., ω(B->A)=β'1ω B1 +β'2ω B2 The specific values of β1, β2, β'1 and β'2 can be empirical or experimental values. It is only necessary to ensure that the sum of β1 and β2 is 1 and the sum of β'1 and β'2 is 1.
[0120] Understandably, determining the degree of one-way relationship based on the first degree of relationship and / or the second degree of relationship can improve the richness and diversity of methods for determining the degree of one-way relationship. Furthermore, determining the degree of one-way relationship based on both the first degree of relationship and the second degree of relationship can avoid inaccuracies when determining the degree of one-way relationship based on the proportion of interaction data in a single valid full set of interaction data, thus improving the accuracy of determining the degree of one-way relationship.
[0121] In an optional embodiment, since the interaction data includes at least two interaction types, the one-way relation degree of the current entity is generated based on the valid full interaction data of the current entity and / or the valid full interaction data of another current entity, as well as the interaction data generated by the current entity actively initiating an interaction with another current entity. This includes: for any interaction type, generating the one-way relation degree of the current entity under that interaction type based on the valid full interaction data of the current entity under that interaction type and / or the valid full interaction data of another current entity under that interaction type, as well as the interaction data generated by the current entity actively initiating an interaction with another current entity under that interaction type; and using the average of the one-way relation degrees of the current entity under different interaction types as the one-way relation degree of the current entity.
[0122] The interaction type can be used to display the interaction behavior between the current entity and another entity. Specifically, the interaction type can include behavior type and / or degree type. Behavior type refers to the type of interaction behavior between the current entity and another entity, such as at least one of types like transfer, payment, and loan. Degree type refers to a data type that reflects the degree of interaction behavior between the current entity and another entity, such as the number of interactions or the amount of interaction.
[0123] Optionally, if there is only one degree type in the interaction type, the one-way relation degree under that interaction type can be used as the one-way relation degree of the current entity; if there are at least two degree types in the interaction type, the one-way relation degree under each degree type is determined separately, and the weighted sum of the one-way relation degrees under each degree type is used as the one-way relation degree of the current entity. The weights corresponding to each degree type can be set or adjusted by technical personnel according to needs or experience; this application does not impose any limitations on the specific weight values.
[0124] Understandably, by introducing behavior type and / or degree type, the methods for determining the degree of one-way relationship have been expanded and enriched.
[0125] The following section uses the behavior type of the interaction, namely money transfer, and the degree type of the interaction data, including amount and frequency, as an example to explain in detail the process of determining the first degree of relation and the second degree of relation.
[0126] The current entity is operator A, and the other current entity is operator B. Within a preset time period, if operator A transfers a portion of the funds to operator B amounting to m... AB The total amount of money transferred by operator A to non-operator A (i.e., excluding interactive data of operator A transferring money to itself) is m. A The number of partial transfers from operator A to operator B is n. AB The total number of transfers from operator A to non-operator A (excluding data involving transfers from operator A to itself) is n. A The transfer amount from operator B to operator A is m. BA The total amount of transfers from operator B to non-operator B (excluding data involving transfers from operator B to itself) is m. B The number of partial transfers from operator B to operator A is n. BA The total number of transfers from operator B to non-operator B (excluding data involving transfers from operator B to itself) is n. B It should be noted that the embodiments of this application do not impose any limitation on the length of the preset time period, which can be set by technicians as needed.
[0127] Accordingly, the first relation degree of the current entity operator A is determined using the following formula:
[0128]
[0129] Where, ω A1 Let α1 and α2 be the first degree of relation of operator A; α1 and α2 are weighting coefficients. The specific values of α1 and α2 can be set or adjusted by technicians as needed, and this embodiment does not impose any limitations on this. The specific values of α1 and α2 can be the same or different, as long as their sum is 1.
[0130] Accordingly, the second relation degree of the current entity operator A is determined using the following formula:
[0131]
[0132] Where, ω A2 α3 represents the second relational degree of operator A; α4 and α5 are weighting coefficients. The specific values of α3 and α4 can be set or adjusted by technicians as needed, and this embodiment does not impose any limitations on this. The specific values of α3 and α4 can be the same or different.
[0133] Accordingly, the first degree of relation of the current entity B is determined using the following formula:
[0134]
[0135] Where, ω B1 Let α'1 be the first relational degree of operator B, and α'2 be the weighting coefficients. The specific values of α'1 and α'2 can be set or adjusted by technicians as needed, and this embodiment does not impose any limitations on this. The specific values of α'1 and α'2 can be the same or different, as long as their sum is equal to 1.
[0136] Accordingly, the second relation degree of the current entity operator B is determined using the following formula:
[0137]
[0138] Where, ω B2 α'3 and α'4 represent the second degree of relation for operator B; α'3 and α'4 are weighting coefficients. The specific values of α'3 and α'4 can be set or adjusted by technicians as needed, and this embodiment does not impose any limitations on this. The specific values of α'3 and α'4 can be the same or different.
[0139] Optionally, the first relation degree of operator A can be directly taken as the one-way relation degree ω(A->B) of operator A, that is, ω(A->B)=ωA1 The first relation degree of operator B is directly taken as the one-way relation degree ω(B->A) of operator B, that is, ω(B->A)=ω B1 .
[0140] Alternatively, the second relation degree of operator A can be directly taken as the one-way relation degree ω(A->B) of operator A, that is, ω(A->B)=ω A2 The second relation degree of operator B is directly taken as the one-way relation degree ω(B->A) of operator B, that is, ω(B->A)=ω B2 .
[0141] Alternatively, the unidirectional relation degree of operator A can be generated based on the weighted average of the first and second relation degrees, i.e., ω(A->B)=β1ω A1 +β2ω A2 Based on the weighted average of the first and second degree of relation of operator B, the unidirectional degree of relation of operator B is generated, i.e., ω(B->A)=β'1ω B1 +β'2ω B2 The specific values of β1, β2, β'1 and β'2 can be empirical or experimental values. It is only necessary to ensure that the sum of β1 and β2 is 1 and the sum of β'1 and β'2 is 1.
[0142] The following section uses the example of interactive behaviors including transfers and payments, and the degree type of interactive data being monetary, to explain in detail the process of determining the first and second degree of relation.
[0143] The current entity is operator A, and the other current entity is operator B. Within a preset time period, if operator A transfers a portion of the funds to operator B amounting to m... AB The total amount of money transferred by operator A to non-operator A (i.e., excluding interactive data of operator A transferring money to itself) is m. A The partial payment made by operator A to operator B is p. AB The total payment amount from operator A to non-operator A (i.e., excluding interactive data where operator A transfers funds to itself) is p. A The transfer amount from operator B to operator A is m. BA The total amount of transfers from operator B to non-operator B (i.e., excluding interactive data where operator B transfers to itself) is m. B The partial payment made by operator B to operator A is p. BA The total payment amount from operator B to non-operator B (i.e., excluding interactive data from operator B to itself) is p. BIt should be noted that the embodiments of this application do not impose any limitation on the length of the preset time period, which can be set by technicians as needed.
[0144] Accordingly, the first relation degree of the current entity operator A is determined using the following formula:
[0145]
[0146] Where, ω A1 Let α1 and α2 be the first degree of relation of operator A; α1 and α2 are weighting coefficients. The specific values of α1 and α2 can be set or adjusted by technicians as needed, and this embodiment does not impose any limitations on this. The specific values of α1 and α2 can be the same or different, as long as their sum is 1.
[0147] Accordingly, the second relation degree of the current entity operator A is determined using the following formula:
[0148]
[0149] Where, ω A2 α3 represents the second relational degree of operator A; α4 and α5 are weighting coefficients. The specific values of α3 and α4 can be set or adjusted by technicians as needed, and this embodiment does not impose any limitations on this. The specific values of α3 and α4 can be the same or different.
[0150] Accordingly, the first degree of relation of the current entity B is determined using the following formula:
[0151]
[0152] Where, ω B1 Let α'1 be the first relational degree of operator B, and α'2 be the weighting coefficients. The specific values of α'1 and α'2 can be set or adjusted by technicians as needed, and this embodiment does not impose any limitations on this. The specific values of α'1 and α'2 can be the same or different, as long as their sum is equal to 1.
[0153] Accordingly, the second relation degree of the current entity operator B is determined using the following formula:
[0154]
[0155] Where, ω B2 α'3 and α'4 represent the second degree of relation for operator B; α'3 and α'4 are weighting coefficients. The specific values of α'3 and α'4 can be set or adjusted by technicians as needed, and this embodiment does not impose any limitations on this. The specific values of α'3 and α'4 can be the same or different.
[0156] Optionally, the first relation degree of operator A can be directly taken as the one-way relation degree ω(A->B) of operator A, that is, ω(A->B)=ω A1 The first relation degree of operator B is directly taken as the one-way relation degree ω(B->A) of operator B, that is, ω(B->A)=ω B1 .
[0157] Alternatively, the second relation degree of operator A can be directly taken as the one-way relation degree ω(A->B) of operator A, that is, ω(A->B)=ω A2 The second relation degree of operator B is directly taken as the one-way relation degree ω(B->A) of operator B, that is, ω(B->A)=ω B2 .
[0158] Alternatively, the unidirectional relation degree of operator A can be generated based on the weighted average of the first and second relation degrees, i.e., ω(A->B)=β1ω A1 +β2ω A2 Based on the weighted average of the first and second degree of relation of operator B, the unidirectional degree of relation of operator B is generated, i.e., ω(B->A)=β'1ω B1 +β'2ω B2 The specific values of β1, β2, β'1 and β'2 can be empirical or experimental values. It is only necessary to ensure that the sum of β1 and β2 is 1 and the sum of β'1 and β'2 is 1.
[0159] Understandably, for at least two interaction types, the one-way relation degree of the current entity under one interaction type is determined separately, and the one-way relation degree of the current entity is determined based on the average of the one-way relation degrees under at least two interaction types. This achieves a comprehensive determination of the one-way relation degree of the current entity based on fully considering that there may be at least one interaction type between the current entity and another current entity, making the determination result of the one-way relation degree of the current entity more accurate.
[0160] S250. Determine the target relation degree of the corresponding edge relationship based on the one-way relation degree of the source entity with an edge relationship.
[0161] Optionally, if there is a directed edge relationship between two current entities, the one-way relationship degree between the two current entities is the target relationship degree of the corresponding edge relationship; if there is an undirected edge relationship between two current entities, the one-way relationship degrees between the two current entities are weighted and summed to obtain the target relationship degree of the corresponding edge relationship.
[0162] Specifically, for any two current entities with an undirected edge relationship, if one current entity initiates an interaction with the other, the resulting one-way relationship degree is the first one-way relationship degree; if the other current entity initiates an interaction with the current entity, the resulting one-way relationship degree is the second one-way relationship degree. The weighted sum of the first and second one-way relationship degrees is then used as the target relationship degree for the corresponding edge relationship between the two current entities. It should be noted that the first and second one-way relationship degrees can be the same or different.
[0163] For example, if operator A initiates an interaction with operator B, the degree of the first one-way relationship generated is ω. AB Operator B initiates an interaction with operator A, generating a second one-way relationship with a degree of ω. BA Then the target relation degree of the corresponding edge relationship between operator A and operator B is ω = β. A ω AB +β B ω BA At this time, β A and β B The specific values can be set by technical personnel according to their needs or experience. The two values can be the same or different, as long as the sum of the two is 1.
[0164] S260. Construct a target tracing graph based on the source entity, edge relationship, and target relationship degree.
[0165] The source knowledge graph construction scheme provided in this application refines the determination of the target relation degree by taking any pair of source entities with edge relations as the current entity; for any current entity, the one-way relation degree of the current entity is generated based on the interaction data generated by the current entity actively initiating an interaction behavior to another current entity; by determining the target relation degree of the corresponding edge relation based on the one-way relation degree of the current entity, the one-way relation degree of each current entity with edge relations is fully considered, avoiding the omission of one-way relation degrees, which would lead to inaccurate target relation degrees of the corresponding edge relations, thus improving the accuracy of the determination result of the target relation degree of the corresponding edge relations.
[0166] Based on the above technical solutions, this application also provides an optional embodiment. In this optional embodiment, the updating process of the target tracing map is further defined. It should be noted that for parts not described in detail in the embodiments of this application, please refer to the descriptions of other embodiments.
[0167] Furthermore, after the operation "Construct a target traceability graph based on the traceability entity, edge relationship and target relationship degree", add the operation "Cluster each traceability entity according to the interaction data between each traceability entity in the target traceability graph to obtain target traceability clusters; Update the target traceability graph according to the target traceability clusters" to improve the update mechanism of the target traceability graph.
[0168] See Figure 3 The method for constructing a knowledge graph for tracing origins, as shown, includes:
[0169] S310. Obtain traceability data.
[0170] S320. Treat each source data as a source entity and establish edge relationships between source entities that have interactive relationships.
[0171] S330. Based on the interaction data between the traceable entities with edge relationships, generate the one-way relation degree of each traceable entity in the corresponding edge relationship.
[0172] S340. Determine the target relation degree of the corresponding edge relationship based on the one-way relation degree of the source entity with an edge relationship.
[0173] S350. Construct a target tracing graph based on the source entity, edge relationship, and target relationship degree.
[0174] S360. Based on the interaction data between each traceability entity in the target traceability map, cluster each traceability entity to obtain the target traceability cluster.
[0175] In this context, a target tracing cluster refers to a cluster obtained by clustering the tracing entities in the target tracing map. Specifically, each target tracing cluster includes at least one tracing entity. This application embodiment does not limit the number of target tracing clusters; they can be set by a technician as needed or determined based on the actual clustering situation. This application embodiment does not limit the clustering method; it can be selected by a technician as needed.
[0176] In one optional embodiment, at least one preset clustering algorithm based on existing technology can be used to cluster each traceability entity according to the interaction data between each traceability entity in the target traceability map to obtain the target traceability cluster.
[0177] In another optional embodiment, an initial traceability cluster can be established for each traceability entity; one of the initial traceability clusters is taken as the current traceability cluster, and the current traceability cluster is merged with other initial traceability clusters to obtain a merged traceability cluster; the merging relationship degree of the corresponding merged traceability cluster is determined based on the interaction data between each merged traceability cluster and other initial traceability clusters; the merged traceability cluster with a higher merging relationship degree is selected as the new initial traceability cluster to replace the initial traceability cluster before merging, and the traceability cluster merging operation is continued until the merging cutoff condition is met.
[0178] Preferably, the merged traceability cluster with the highest merging relation can be selected as the new initial traceability cluster to replace the initial traceability cluster before merging, so that the correlation between each traceability entity in the merged cluster is closer, and the accuracy of the target traceability cluster is higher.
[0179] In this context, the initial traceability cluster refers to the traceability clusters to be merged. Each initial traceability cluster contains only one traceability entity, and the traceability entities in each initial traceability cluster are different. The current traceability cluster refers to the traceability cluster to be merged in this instance, selected from the initial traceability clusters. Other initial traceability clusters refer to the initial traceability clusters excluding the current traceability cluster. The merged traceability cluster refers to the new traceability cluster obtained by merging different initial traceability clusters. The merging relation degree is used to quantitatively characterize the degree of association between the traceability entities in the merged traceability cluster.
[0180] The merging cutoff condition refers to the condition under which each initial traceability cluster will no longer be merged. This merging cutoff condition can be set by technical personnel according to their needs or experience.
[0181] For example, if there are ten initial traceability clusters, the tenth initial traceability cluster is taken as the current traceability cluster. This current traceability cluster is merged with the other nine initial traceability clusters to obtain nine merged traceability clusters. For any one of the nine merged traceability clusters, the merging relationship degree of the merged traceability cluster is determined based on the interaction data between the merged traceability cluster and the corresponding initial traceability cluster. The merged traceability cluster with the highest merging relationship degree is selected as the new initial traceability cluster, replacing the two initial traceability clusters generated before the merged traceability cluster was generated. The remaining nine initial traceability clusters are processed in the same way to obtain eight new merged traceability clusters. This process continues until the merging cutoff condition is met.
[0182] Understandably, merging initial source clusters based on the degree of merging relationship avoids the possibility of inaccurate selection of merged source clusters when the differences in the degree of association between source entities in each merged source cluster are small, thus improving the accuracy of selecting merged source clusters as new initial source clusters. Simultaneously, by setting merge cutoff conditions, invalid merging processes can be avoided, reducing resource waste and improving merging efficiency.
[0183] In one optional embodiment, the merging cutoff condition includes: the number of merging attempts reaching a preset threshold, and / or, the difference between the merging relationship degree of the initial source cluster after merging and the merging relationship degree before merging is less than a preset threshold. This application embodiment does not impose any limitation on the size of the preset threshold or the preset number of attempts threshold; these can be set by a technician based on experience or determined repeatedly through numerous experiments. For example, the preset threshold can be 5, and the preset threshold can be 0.5.
[0184] Understandably, by introducing preset number thresholds and preset thresholds to control the merging process, the richness of the merging cutoff conditions is improved, the limitations of controlling the merging process with a single merging cutoff condition are reduced, and the timeliness of controlling the merging process cutoff is improved.
[0185] S370. Update the target source map based on the target source cluster.
[0186] Specifically, the target source tracing map is updated by merging the target source tracing clusters.
[0187] The source tracing knowledge graph construction scheme provided in this application improves the update operation of the target source tracing graph by adding clustering of each source entity based on the interaction data between them, resulting in target source tracing clusters. The target source tracing graph is then updated based on these clusters, enriching the information it carries. Furthermore, grouping closely related source entities into the same source clusters facilitates subsequent association of source entities based on these clusters, thus improving the source tracing efficiency when using the target source tracing graph.
[0188] This application also provides an optional embodiment, which provides a method for using a source tracing knowledge graph that is applicable to application scenarios where data source tracing is performed using the target source tracing graph constructed in the foregoing embodiments. This method for using a source tracing knowledge graph can be executed by a source tracing knowledge graph application device, which can be implemented in software and / or hardware and specifically configured in an electronic device with a certain computing power.
[0189] See Figure 4 The method of using a knowledge graph for tracing origins, as shown, includes:
[0190] S410. Obtain the data to be queried and the target source map; wherein, the target source map is constructed based on the source knowledge graph construction method.
[0191] The data to be queried can be the data associated with the traceability entity that the traceability requester needs to query. The data to be queried can refer to the traceability entity itself, or it can be other data including the traceability entity; this application does not limit the specific content of the data to be queried. For example, the data to be queried can be at least one of account identifiers, operator identifiers, and device identifiers.
[0192] Specifically, based on the data to be queried, a source map of the target is determined.
[0193] S420. The source entity that matches the data to be queried in the target source map is taken as the target entity.
[0194] The target entity refers to the source entity associated with the data to be queried.
[0195] Specifically, based on the data to be queried, determine the source entity in the target source map that corresponds to the data to be queried, and use the corresponding source entity as the target entity.
[0196] S430. Based on the target entity and the target traceability map, determine the traceability chain of the data to be queried.
[0197] The tracing chain is used to represent the relationship chain formed by various tracing entities that have an edge relationship with the target entity. Specifically, the tracing chain can be used to determine the data associated with the data to be queried, thereby enabling tracing.
[0198] It should be noted that upstream and downstream relationships exist within the traceability chain, which can be determined based on the degree of one-way relationship between any two traceability entities. For example, if the degree of one-way relationship between operator A and operator B is 0.9 and 0.4, then operator A can be considered upstream of operator B, and operator B downstream of operator A. It is understandable that the upstream and downstream relationships within the traceability chain are relative.
[0199] In one optional application scenario, risk attribution can be performed using a constructed attribution knowledge graph. During risk attribution, the data to be queried can be based on at least one of account identifiers, operator identifiers, and device identifiers. The attribution graph retrieves the attribution chain associated with the queried data. Based on the target correlation between the attribution entities in the attribution chain, abnormal attribution entities such as abnormal account identifiers and abnormal operating devices are identified during the risk attribution process. Furthermore, the clusters of attribution entities distributed among the abnormal attribution entities can be used to identify risk groups and implement vulnerability patching to mitigate risks.
[0200] If the target source tracing graph includes at least one hierarchical source tracing graph, the hierarchical source tracing graph to be queried can be selected from the target source tracing graph based on the source tracing type of the source entity corresponding to the data to be queried. This allows for the determination of the basic source tracing chain for the corresponding level of source entity within the hierarchical source tracing graph. Furthermore, based on the basic source tracing chain and the edge relationships between the hierarchical source tracing graphs, derived source tracing chains in other hierarchical source tracing graphs can be determined.
[0201] Specifically, based on the data to be queried as the account identifier, a basic tracing chain is determined in the account-level tracing graph. The party to be traced that owns the account on the basic tracing chain is found. Then, based on the basic tracing chain, the corresponding derivative tracing chains for the party to be traced are determined in different levels of the tracing graph. The tracing information is presented based on the complete set of information associated with the basic and derivative tracing chains, including but not limited to account information, bank information, device information, IP (Internet Protocol) information, and fund transaction information. Furthermore, based on the input elements of the party to be traced (e.g., IP information used by the customer's device within 12 hours), information related to the input elements (e.g., other devices associated with the IP within those 12 hours, the actual operator, and account information) can be displayed layer by layer according to the tracing graph to which the tracing chain belongs. It should be noted that, based on the analysis and interaction of the traceability requester, the node information of a traceability entity can be canceled or hidden (e.g., if the traceability requester has 3 account identifiers, one of which needs to be hidden), and the relationship of that node will be automatically masked in the next step of determining the derived traceability chain.
[0202] The source tracing knowledge graph usage scheme provided in this application involves acquiring the data to be queried and the target source tracing graph. The target source tracing graph is constructed based on a source tracing knowledge graph construction method. The source tracing entities that match the data to be queried in the target source tracing graph are taken as target entities. Based on the target entities and the target source tracing graph, the source tracing chain of the data to be queried is determined. When performing data source tracing, using the target source tracing graph constructed in the aforementioned embodiment improves the accuracy of the tracing results.
[0203] As an implementation of the aforementioned methods for constructing source-tracing knowledge graphs, this application also provides optional embodiments of an execution device for implementing these methods. See [link to relevant documentation]. Figure 5 The illustrated knowledge graph construction device includes: a data acquisition module 510, an edge relationship establishment module 520, a one-way relationship degree determination module 530, a target relationship degree determination module 540, and a graph construction module 550.
[0204] Data acquisition module 510 is used to acquire traceability data;
[0205] The edge relationship establishment module 520 is used to treat each traceability data as a traceability entity and establish edge relationships between traceability entities that have interactive relationships.
[0206] The one-way relation degree determination module 530 is used to generate the one-way relation degree of each source entity in the corresponding edge relationship based on the interaction data between the source entities with edge relationships.
[0207] The target relation degree determination module 540 is used to determine the target relation degree of the corresponding edge relationship based on the one-way relation degree of the source entity with an edge relationship.
[0208] The graph construction module 550 is used to construct a target tracing graph based on the source entity, edge relationship, and target relationship degree.
[0209] The source tracing knowledge graph construction scheme provided in this application acquires source tracing data through a data acquisition module; establishes edge relationships between source tracing entities by treating each source data as a source entity through an edge relationship establishment module; generates the one-way relationship degree of each source entity in the corresponding edge relationship based on the interaction data between the source entities with edge relationships through a one-way relationship degree determination module; determines the target relationship degree of the corresponding edge relationship based on the one-way relationship degree of the source entities with edge relationships through a target relationship degree determination module; and constructs the target source tracing graph based on the source entities, edge relationships, and target relationship degrees through a graph construction module. This scheme, by determining the target relationship degree based on the one-way relationship degree as the basis for constructing the target source tracing graph, improves the accuracy of the target source tracing graph construction results, thus contributing to the accuracy of the source tracing results. Furthermore, this application eliminates the need for exhaustive enumeration of different relationships when determining the target relationship degree, making it more convenient, faster, and more flexible.
[0210] Optionally, the one-way relationship degree determination module 530 includes:
[0211] The current entity determination unit is used to identify any pair of source entities with an edge relationship as the current entity.
[0212] The one-way relationship degree generation unit is used to generate the one-way relationship degree of any current entity based on the interaction data generated by the current entity actively initiating an interaction behavior to another current entity.
[0213] Optional, one-way relation degree generation unit, including:
[0214] The one-way relation degree generation subunit is used to generate the one-way relation degree of the current entity based on the valid full interaction data of the current entity and / or the valid full interaction data of another current entity, as well as the interaction data generated by the current entity actively initiating an interaction behavior to another current entity.
[0215] Optional, a one-way relation degree generation subunit, specifically used for:
[0216] The first relation degree of the current entity is determined by the statistical proportion of the interaction data generated by the current entity actively initiating an interaction with another current entity in the total effective interaction data of the current entity.
[0217] The second relation degree of the current entity is determined by the statistical proportion of the interaction data generated by the current entity actively initiating an interaction with another current entity in the total effective interaction data of the other current entity.
[0218] Generate the one-way relation degree of the current entity based on its first relation degree and / or its second relation degree.
[0219] Optionally, the interactive data in the device includes at least two interaction types;
[0220] Correspondingly, the one-way relation degree generation subunit is specifically used for:
[0221] For any interaction type, based on the valid full interaction data of the current entity under the interaction type and / or the valid full interaction data of another current entity under the interaction type, as well as the interaction data under the interaction type generated by the current entity actively initiating an interaction behavior to another current entity, the one-way relation degree of the current entity under the interaction type is generated.
[0222] The average one-way relation degree of the current entity under different interaction types is taken as the one-way relation degree of the current entity.
[0223] Optionally, the interaction types in the device may include behavior types and / or degree types.
[0224] Optionally, the device may also include:
[0225] The full interaction data determination module is used to remove the interaction data generated by the current entity's interaction with itself from the current entity's full interaction data, so as to obtain the valid full interaction data of the current entity.
[0226] Optionally, the device may also include:
[0227] The target tracing cluster determination module is used to cluster each tracing entity based on the interaction data between each tracing entity in the target tracing map to obtain the target tracing cluster;
[0228] The target tracing cluster update module is used to update the target tracing map based on the target tracing cluster.
[0229] Optionally, the target tracing cluster determination module includes:
[0230] The initial traceability cluster determination unit is used to establish an initial traceability cluster for each traceability entity;
[0231] The merged traceability cluster determination unit is used to take one of the initial traceability clusters as the current traceability cluster, and merge the current traceability cluster with the other initial traceability clusters respectively to obtain the merged traceability cluster;
[0232] The merge relationship determination unit is used to determine the merge relationship degree of the corresponding merged traceability cluster based on the interaction data between each merged traceability cluster and other initial traceability clusters.
[0233] The initial traceability cluster replacement unit is used to select the traceability cluster with a higher degree of merging relationship as the new initial traceability cluster, replace the initial traceability cluster before merging, and return to continue the traceability cluster merging operation until the merging cutoff condition is met.
[0234] Optional, the consolidation cutoff criteria include:
[0235] The number of merges reaches a preset threshold; and / or,
[0236] The difference between the merged relationship degree of the initial traceability cluster and the merged relationship degree before the merge is less than a preset threshold.
[0237] Optionally, the traceability data in the device includes data of different traceability types, and the traceability data of different traceability types are related.
[0238] Correspondingly, the map construction module includes:
[0239] The hierarchical tracing graph construction unit is used to construct a hierarchical tracing graph of the corresponding tracing type based on the tracing entities, edge relationships, and target relationship degrees under the same tracing type.
[0240] The target tracing graph determination unit is used to establish the edge relationships of each level of the tracing graph based on the association relationship, so as to obtain the target tracing graph.
[0241] The knowledge graph construction apparatus provided in this application can execute the knowledge graph construction method provided in any embodiment of this application, and has the corresponding functional modules and beneficial effects of executing each knowledge graph construction method.
[0242] As an implementation of the above-mentioned method for using source tracing knowledge graphs, this application also provides an optional embodiment of a device for using source tracing knowledge graphs.
[0243] See Figure 6 The traceability knowledge graph device shown includes: a data acquisition module 610, a target entity determination module 620, and a traceability chain determination module 630.
[0244] The data acquisition module 610 is used to acquire the data to be queried and the target tracing graph; wherein, the target tracing graph is constructed based on the tracing knowledge graph construction device.
[0245] The target entity determination module 620 is used to identify the source entities that match the data to be queried in the target source map as target entities.
[0246] The traceability chain determination module 630 is used to determine the traceability chain of the data to be queried based on the target entity and the target traceability map.
[0247] The source tracing knowledge graph usage scheme provided in this application embodiment obtains the data to be queried and the target source tracing graph through a data acquisition module. The target source tracing graph is constructed based on a source tracing knowledge graph construction method. A target entity determination module identifies the source entities in the target source tracing graph that match the data to be queried as target entities. A source chain determination module determines the source chain of the data to be queried based on the target entities and the target source tracing graph. By using the target source tracing graph constructed in the aforementioned embodiment during data tracing, the accuracy of the tracing results is improved.
[0248] The traceability knowledge graph application device provided in this application embodiment can execute the traceability knowledge graph application method provided in any embodiment of this application, and has the corresponding functional modules and beneficial effects for executing the traceability knowledge graph application method.
[0249] Figure 7 This is a schematic diagram of the structure of an electronic device that implements a method for constructing and / or using a source knowledge graph, as provided in an embodiment of this application. Figure 7 A block diagram is shown of an exemplary electronic device 712 suitable for implementing embodiments of this application. Figure 7 The electronic device 712 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0250] like Figure 7 As shown, the electronic device 712 is presented in the form of a general-purpose computing device. The components of the electronic device 712 may include, but are not limited to: one or more processors or processing units 716, system memory 728, and bus 718 connecting different system components (including system memory 728 and processing unit 716).
[0251] Bus 718 represents one or more of several bus architectures, including memory buses or memory controllers, peripheral buses, graphics acceleration ports, processors, or local buses using any of the various bus architectures. Examples of these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.
[0252] Electronic device 712 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by electronic device 712, including volatile and non-volatile media, removable and non-removable media.
[0253] System memory 728 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 730 and / or cache memory 732. Electronic device 712 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 734 may be used to read and write non-removable, non-volatile magnetic media (…). Figure 7 Not shown; usually referred to as a "hard drive"). Although Figure 7 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 718 via one or more data media interfaces. Memory 728 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of this application.
[0254] A program / utility 740 having a set (at least one) of program modules 742 may be stored, for example, in memory 728. Such program modules 742 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 742 typically perform the functions and / or methods described in the embodiments of this application.
[0255] Electronic device 712 can also communicate with one or more external devices 714 (e.g., keyboard, pointing device, display 724, etc.), and with one or more devices that enable a user to interact with electronic device 712, and / or with any device that enables electronic device 712 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed via input / output (I / O) interface 722. Furthermore, electronic device 712 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 720. As shown, network adapter 720 communicates with other modules of electronic device 712 via bus 718. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 712, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0256] The processing unit 716 executes various functional applications and data processing by running at least one of the multiple programs stored in the system memory 728, such as implementing the source knowledge graph construction method and / or source knowledge graph usage method provided in the embodiments of this application.
[0257] This application also provides a computer-readable storage medium storing a computer program (or computer-executable instructions) thereon, which, when executed by a processor, is used to perform the source knowledge graph construction method and / or source knowledge graph usage method provided in this application.
[0258] The computer storage medium in this application embodiment can be any combination of one or more computer-readable media. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0259] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.
[0260] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0261] Computer program code for performing the operations of the embodiments of this application can be written in one or more programming languages or a combination thereof. These programming languages include object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as "C" or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0262] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the source knowledge graph construction method and / or source knowledge graph usage method provided in any embodiment of this application.
[0263] In the implementation of the computer program product, computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof. Programming languages include object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0264] Note that the above description is merely a preferred embodiment and the technical principles employed in this application. Those skilled in the art will understand that this application is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of this application. Therefore, although this application has been described in detail through the above embodiments, this application is not limited to the above embodiments. Many other equivalent embodiments may be included without departing from the concept of this application, and the scope of this application is determined by the scope of the appended claims.
Claims
1. A method for constructing a provenance knowledge graph, characterized in that, The method comprises: acquiring trace data; taking each of the trace data as a trace entity, and establishing an edge relationship between trace entities having an interaction relationship; generating a unidirectional relationship degree of each trace entity in a corresponding edge relationship according to interaction data between trace entities having an edge relationship, including: for any edge relationship, if the edge relationship is a unidirectional edge relationship, generating a unidirectional relationship degree of a trace entity corresponding to the edge relationship according to unidirectional interaction data between two trace entities connected by the edge relationship; if the edge relationship is a bidirectional edge relationship, or the edge relationship is two unidirectional edge relationships pointing in opposite directions, generating a unidirectional relationship degree of a trace entity corresponding to each of the two corresponding edge relationships according to unidirectional interaction data between two trace entities connected by the edge relationship; if the edge relationship is a non-directional edge relationship, generating a unidirectional relationship degree of a trace entity corresponding to each of the two corresponding edge relationships according to unidirectional interaction data between two trace entities connected by the edge relationship; wherein the interaction data comprises at least two types of interaction; the interaction type comprises a behavior type, and the behavior type comprises at least one of a transfer, a payment, and a loan type; determining a target relationship degree of a corresponding edge relationship according to the unidirectional relationship degree of the trace entity having the edge relationship; wherein the target relationship degree is used as a weight of the edge relationship, and the target relationship degree is used to quantify the closeness between the trace entities corresponding to the edge relationship; constructing a target trace graph according to the trace entity, the edge relationship, and the target relationship degree.
2. The method of claim 1, wherein, The method further comprises: taking any pair of trace entities having an edge relationship as a current entity; for any current entity, generating a unidirectional relationship degree of the current entity according to interaction data generated by the current entity actively initiating an interaction behavior to another current entity.
3. The method of claim 2, wherein, The method further comprises: generating a unidirectional relationship degree of the current entity according to effective full-amount interaction data of the current entity and / or effective full-amount interaction data of another current entity, and interaction data generated by the current entity actively initiating an interaction behavior to another current entity.
4. The method of claim 3, wherein, The method further comprises: determining a first relationship degree of the current entity according to a statistical proportion of the interaction data generated by the current entity actively initiating an interaction behavior to another current entity in the effective full-amount interaction data of the current entity; determining a second relationship degree of the current entity according to a statistical proportion of the interaction data generated by the current entity actively initiating an interaction behavior to another current entity in the effective full-amount interaction data of another current entity; generating a unidirectional relationship degree of the current entity according to the first relationship degree of the current entity and / or the second relationship degree of the current entity.
5. The method of claim 3, wherein, The unidirectional relationship degree of the current entity is generated according to the effective full-amount interaction data of the current entity and / or the effective full-amount interaction data of another current entity, and the interaction data generated by the current entity actively initiating an interaction behavior to another current entity, and the unidirectional relationship degree of the current entity is generated, including: For any interaction type, the unidirectional relationship degree of the current entity in the interaction type is generated according to the effective full-amount interaction data of the current entity in the interaction type and / or the effective full-amount interaction data of another current entity in the interaction type, and the interaction data in the interaction type generated by the current entity actively initiating an interaction behavior to another current entity; The average of the unidirectional relationship degrees of the current entity in different interaction types is taken as the unidirectional relationship degree of the current entity.
6. The method of claim 1, wherein, The interaction type further includes a degree type.
7. The method of claim 3, wherein, The method further includes: From the full-amount interaction data of the current entity, the interaction data generated by the current entity and itself generating an interaction behavior is excluded to obtain the effective full-amount interaction data of the current entity.
8. The method according to any one of claims 1 to 7, characterized in that, The method further includes: According to the interaction data between the target traceability entities in the target traceability graph, the target traceability clusters are obtained by clustering the target traceability entities; According to the target traceability clusters, the target traceability graph is updated.
9. The method of claim 8, wherein, The target traceability clusters are obtained by clustering the target traceability entities according to the interaction data between the target traceability entities in the target traceability graph, and the target traceability clusters are obtained, including: For each traceability entity, an initial traceability cluster is established; One of the initial traceability clusters is taken as a current traceability cluster, and the current traceability cluster is merged with other initial traceability clusters respectively to obtain merged traceability clusters; According to the interaction data between each merged traceability cluster and other initial traceability clusters, the merging relationship degree of the corresponding merged traceability cluster is determined; The merged traceability cluster with a higher merging relationship degree is selected as a new initial traceability cluster to replace the initial traceability cluster before merging, and the traceability cluster merging operation is continued to be performed until a merging stop condition is met.
10. The method of claim 9, wherein, The merging stop condition includes: The number of mergings reaches a preset number threshold; and / or The difference between the merging relationship degree of the initial traceability cluster after merging and the merging relationship degree before merging is less than a preset threshold. The traceability data includes data of different traceability types, and the traceability data of different traceability types has a correlation relationship; 11. The method according to any one of claims 1 to 7, characterized in that, Accordingly, the target traceability graph is constructed according to the traceability entity, the edge relationship and the target relationship degree, including: According to the traceability entity, the edge relationship and the target relationship degree under the same traceability type, a hierarchical traceability graph of the corresponding traceability type is constructed; According to the correlation relationship, the edge relationship of each hierarchical traceability graph is established to obtain the target traceability graph. It includes:
12. A method for using a knowledge graph for tracing origins, characterized in that, Obtaining to-be-queried data and a target traceability graph; wherein the target traceability graph is constructed based on the traceability knowledge graph construction method of any one of claims 1-11; The traceability entity matched with the to-be-queried data in the target traceability graph is taken as a target entity; According to the target entity and the target traceability graph, the traceability chain of the to-be-queried data is determined. It includes: 13.A traceability knowledge graph construction apparatus, characterized by comprising: A data acquisition module is configured to acquire traceability data; The edge relationship establishment module is configured to take each of the traceability data as a traceability entity, and establish an edge relationship between traceability entities having an interaction relationship; The one-way relationship degree determination module is configured to generate one-way relationship degrees of each traceability entity in a corresponding edge relationship according to interaction data between traceability entities having an edge relationship; the interaction data includes at least two interaction types; the interaction types include behavior types, and the behavior types include at least one of a transfer, a payment, and a loan type; The one-way relationship degree determination module is specifically configured to, for any edge relationship, if the edge relationship is a one-way edge relationship, generate a one-way relationship degree of a traceability entity corresponding to the edge relationship according to one-way interaction data between two traceability entities connected by the edge relationship; if the edge relationship is a two-way edge relationship or the edge relationship is two one-way edge relationships pointing in opposite directions, generate one-way relationship degrees of two traceability entities corresponding to the two corresponding edge relationships according to one-way interaction data between the two traceability entities connected by the edge relationship; and if the edge relationship is a non-directional edge relationship, generate one-way relationship degrees of two traceability entities corresponding to the two corresponding edge relationships according to one-way interaction data between the two traceability entities connected by the edge relationship; The target relationship degree determination module is configured to determine a target relationship degree of a corresponding edge relationship according to one-way relationship degrees of traceability entities having an edge relationship; the target relationship degree serves as a weight of the edge relationship, and the target relationship degree is used to quantify an intimacy degree between traceability entities corresponding to the edge relationship; The graph construction module is configured to construct a target traceability graph according to the traceability entities, the edge relationships, and the target relationship degrees.
14. The apparatus of claim 13, wherein, The one-way relationship degree determination module includes: A current entity determination unit configured to take any pair of traceability entities having an edge relationship as a current entity; A one-way relationship degree generation unit configured to, for any current entity, generate a one-way relationship degree of the current entity according to interaction data generated by the current entity actively initiating an interaction behavior to another current entity.
15. The apparatus of claim 14, wherein, The one-way relationship degree generation unit includes: A one-way relationship degree generation subunit configured to generate a one-way relationship degree of a current entity according to effective full-amount interaction data of the current entity and / or effective full-amount interaction data of another current entity, and interaction data generated by the current entity actively initiating an interaction behavior to another current entity.
16. The apparatus of any one of claims 13-15, wherein, The apparatus further includes: A target traceability cluster determination module configured to cluster each traceability entity according to interaction data between traceability entities in the target traceability graph, to obtain a target traceability cluster; A target traceability cluster update module configured to update the target traceability graph according to the target traceability cluster.
17. The apparatus of claim 16, wherein, The target traceability cluster determination module includes: An initial traceability cluster determination unit configured to establish an initial traceability cluster for each traceability entity; A merged traceability cluster determination unit configured to take one of the initial traceability clusters as a current traceability cluster, and merge the current traceability cluster with other initial traceability clusters respectively, to obtain a merged traceability cluster; A merged relationship degree determination unit configured to determine a merged relationship degree of a corresponding merged traceability cluster according to interaction data between the merged traceability cluster and other initial traceability clusters. The initial traceability cluster replacement unit is configured to select a merged traceability cluster with a high degree of merging relationship as a new initial traceability cluster, replace the initial traceability cluster before merging, and return to continue the traceability cluster merging operation until a merging stop condition is met.
18. The apparatus of any one of claims 13-15, wherein, The traceability data includes data of different traceability types, and the traceability data of different traceability types has a correlation relationship. Correspondingly, the graph construction module comprises: The hierarchical traceability graph construction unit is configured to construct a hierarchical traceability graph of a corresponding traceability type according to the traceability entity, the edge relationship and the target relationship degree under the same traceability type. The target traceability graph determination unit is configured to establish an edge relationship of each hierarchical traceability graph according to the correlation relationship, and obtain the target traceability graph.
19. A provenance knowledge graph usage apparatus, characterized by, It comprises: The data to be queried data acquisition module is configured to acquire data to be queried and a target traceability graph; wherein the target traceability graph is constructed based on the traceability knowledge graph construction device of any one of claims 13-18; The target entity determination module is configured to match the traceability entity of the target traceability graph in the data to be queried as a target entity; The traceability chain determination module is configured to determine the traceability chain of the data to be queried according to the target entity and the target traceability graph.
20. An electronic device, comprising: The computer program is executed by the processor to implement the traceability knowledge graph construction method of any one of claims 1-11, and / or implement the traceability knowledge graph use method of claim 12.
21. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the traceability knowledge graph construction method of any one of claims 1-11, and / or implement the traceability knowledge graph use method of claim 12.
22. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the traceability knowledge graph construction method of any one of claims 1-11, and / or implement the traceability knowledge graph use method of claim 12.
Citation Information
Patent Citations
Knowledge graph construction method, device and system
CN110197280A
Information merging method, transaction query method and apparatus, computer and storage medium
WO2020177450A1