Graph data processing method, device, equipment, storage medium and program product

By determining the sum of edge weights of respective subgraphs among multiple nodes and calculating the total intensity, the accuracy problem of multiple institutional graph federal calculations is solved, and efficient and secure graph data processing is achieved.

CN113254727BActive Publication Date: 2025-03-25WEBANK (CHINA)
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110657239.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-11
Publication Date
2025-03-25
Estimated Expiration
2041-06-11

AI Technical Summary

Technical Problem

The prior art is difficult to realize graph federal computing by multiple institutions, resulting in poor accuracy of graph data processing.

Method used

By determining the sum of edge weights of respective subgraphs among multiple nodes, and calculating the total intensity of each node based on these intensities, the evaluation result of the node is then determined. This method implements multi-graph federated computing without sharing the original data.

Benefits of technology

It improves the accuracy of graph data processing, ensures data privacy security, and realizes joint computing by multiple parties.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113254727B_ABST
    Figure CN113254727B_ABST
Patent Text Reader

Abstract

The present invention discloses a graph data processing method, apparatus, device, storage medium and program product, wherein the method comprises: determining the first strength of each node in the first subgraph according to the directed relationship of each node in the first subgraph, wherein the first strength of each node is used to represent the sum of the edge weights of the node pointing to other nodes in the first subgraph; determining the total strength of each node in a plurality of nodes, wherein the total strength of each node is determined by the first strength and / or second strength of the node, the second strength is determined by the second participant according to the directed relationship of each node in the second subgraph, and the second strength is used to represent the sum of the edge weights of the node pointing to other nodes in the second subgraph; determining the evaluation result corresponding to each node according to the total strength of each node in the plurality of nodes, and being able to jointly process graph data by multiple parties without the directed relationship data being output locally, thereby effectively improving the accuracy of graph data processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of graph data processing technology, and in particular to a graph data processing method, device, equipment, storage medium and program product. Background Art

[0002] PageRank is an important node evaluation indicator in graph data calculation. Through the directed relationship between nodes in the graph data, the node score corresponding to the node can be obtained. It has important applications in the fields of web page sorting, recommendation systems, etc.

[0003] However, in practical applications, massive amounts of graph data are often distributed across different institutions. Due to data privacy requirements, a single institution cannot use the graph data of other institutions for analysis and processing. Therefore, it is impossible to implement graph federation computing across multiple institutions, and the accuracy of graph data processing is poor. Summary of the invention

[0004] The main purpose of the present invention is to provide a graph data processing method, device, equipment, storage medium and program product, aiming to realize graph federation computing of multiple institutions and improve the accuracy of graph data processing.

[0005] To achieve the above object, the present invention provides a graph data processing method, the method is used to process graph data containing multiple nodes, the graph data includes a first subgraph belonging to a first participant and a second subgraph belonging to a second participant, the first subgraph and the second subgraph have at least one common node; the method is applied to the first participant; the method includes:

[0006] Determine, according to the directed relationships of the nodes in the first subgraph, a first strength of each node in the first subgraph, wherein the first strength of each node is used to represent the sum of edge weights of the node pointing to other nodes in the first subgraph;

[0007] Determine the total strength of each node in the multiple nodes, wherein the total strength of each node is determined by the first strength and / or the second strength of the node, the second strength is determined by the second participant according to the directed relationship of each node in the second subgraph, and the second strength is used to represent the sum of edge weights of the node pointing to other nodes in the second subgraph;

[0008] According to the total strength of each node in the plurality of nodes, an evaluation result corresponding to each node is determined.

[0009] Optionally, the method further includes:

[0010] Determine the common nodes between the first subgraph and the second subgraph by using a privacy intersection technique;

[0011] According to the common node, number the nodes in the graph data; wherein the sequence number of the common node is between the sequence numbers of the first node and the second node; the first node is a node that belongs to the first subgraph and does not belong to the second subgraph, and the second node is a node that belongs to the second subgraph and does not belong to the first subgraph;

[0012] Accordingly, determining the first strength of each node in the first subgraph according to the directed relationship of each node in the first subgraph includes:

[0013] Based on the numbered nodes, construct a corresponding first edge weight matrix according to the directed relationship between the nodes in the first subgraph, wherein the element in the i-th row and the j-th column in the first edge weight matrix is ​​used to represent the edge weight from the i-th node to the j-th node;

[0014] For each node among the multiple nodes, a row of elements corresponding to the node in the first edge weight matrix is ​​added to obtain a first strength corresponding to the node.

[0015] Optionally, determining the evaluation result corresponding to each node according to the total strength of each node in the multiple nodes includes:

[0016] Generate a coefficient matrix according to the total strength corresponding to each node; wherein in each column of the coefficient matrix, each element is equal to the inverse of the total strength of the node corresponding to the column;

[0017] Multiplying the first edge weight matrix by the coefficient matrix to obtain a normalized first edge weight matrix;

[0018] The evaluation results corresponding to the respective nodes are determined according to the normalized first edge weight matrix.

[0019] Optionally, the evaluation result includes a node score corresponding to the node; and determining the evaluation result corresponding to each node according to the normalized first edge weight matrix includes:

[0020] The node score corresponding to each node is determined through multiple iterations, wherein each iteration includes the following steps:

[0021] Multiplying the current score matrix by the normalized first edge weight matrix to obtain a first score matrix;

[0022] Obtaining a second score matrix obtained by the second participant multiplying the current score matrix by a normalized second edge weight matrix, wherein the normalized second edge weight matrix is ​​calculated by the second participant according to a second edge weight matrix constructed based on the second subgraph and the total strength of each node;

[0023] Calculating an updated score matrix according to the first score matrix and the second score matrix;

[0024] Determine whether the updated score matrix meets the requirements;

[0025] If the requirements are met, the score matrix is ​​output, and the score matrix includes the node score corresponding to each node;

[0026] If not satisfied, the next iteration process is performed according to the updated score matrix;

[0027] The current score matrix corresponding to the first iteration process is the initial score matrix, and each element in the initial score matrix is ​​equal.

[0028] Optionally, the nodes included in the graph data are used to represent users, and the directed relationships between the nodes are used to represent the transfer relationship between users; the transfer relationship includes at least one of the following: the number of transfers, the transfer amount, and the transfer frequency;

[0029] Determining, according to the directed relationship between the nodes in the first subgraph, a first strength of each node in the first subgraph, includes:

[0030] For each node in the first subgraph, according to the transfer relationship between the node and other nodes, the edge weights of the node pointing to other nodes are calculated, and the edge weights of the node pointing to other nodes are added to obtain the first strength corresponding to the node;

[0031] Accordingly, the method further includes: after determining the evaluation results corresponding to each node, determining the business risk information of the user corresponding to each node according to the evaluation results corresponding to each node.

[0032] Optionally, determining the total strength of each of the multiple nodes includes:

[0033] Acquire a second strength of each node in the second subgraph sent by the second participant;

[0034] For each node among the multiple nodes, a total strength corresponding to the node is calculated according to the first strength and / or the second strength corresponding to the node.

[0035] Optionally, the number of the second participants is at least two, and multiple participants formed by the at least two second participants and the first participant sequentially transmit data, the number of the multiple participants is M, and the first participant is the kth participant among the multiple participants;

[0036] Determining the total strength of each of the plurality of nodes includes:

[0037] Adding the calculated first strength to the random value corresponding to the first participant to obtain the encrypted first strength;

[0038] If k is not equal to 1 and is not equal to M, then the strength information sent by the previous participant is obtained, and the strength information includes the sum of the scrambled second strengths calculated by the first k-1 participants, wherein the scrambled second strength corresponding to each second participant is obtained by adding the second strength corresponding to the second participant and the random value corresponding to the second participant; the obtained strength information is added to the calculated scrambled first strength to obtain updated strength information and send it to the next participant, so that the next participant calculates the updated strength information according to the obtained strength information and the corresponding scrambled second strength and transmits it backward; after the last participant completes the calculation, the total strength is obtained, and the total strength is the updated strength information calculated by the last participant;

[0039] If k is equal to 1, the encrypted first strength is sent to the next participant, so that the next participant calculates the updated strength information according to the acquired first strength and the corresponding encrypted second strength and transmits it backward; after the last participant completes the calculation, the total strength calculated by the last participant is obtained;

[0040] If k is equal to M, then obtain the strength information sent by the previous participant, add the strength information to the scrambled first strength to obtain the total strength, and send the total strength to the first k-1 participants;

[0041] Among them, for each node, each participant is set with M-1 random values ​​for adding to the strength of the node, and the M-1 random values ​​of each participant are the random values ​​of the participant relative to other participants, and among any two participants, the random value of one participant relative to the other participant, plus the random value of the other participant relative to the one participant, is equal to 0 when added.

[0042] The present invention also provides a graph data processing device, the device is used to process graph data containing multiple nodes, the graph data includes a first subgraph belonging to a first participant and a second subgraph belonging to a second participant, the first subgraph and the second subgraph have at least one common node; the device is applied to the first participant; the device includes:

[0043] A first determination module, configured to determine a first strength of each node in the first subgraph according to a directed relationship of each node in the first subgraph, wherein the first strength of each node is used to represent the sum of edge weights of the node pointing to other nodes in the first subgraph;

[0044] a second determination module, configured to determine a total strength of each of the plurality of nodes, wherein the total strength of each node is determined by a first strength and / or a second strength of the node, wherein the second strength is determined by the second participant according to a directed relationship between each node in the second subgraph, and the second strength is used to represent a sum of edge weights from the node to other nodes in the second subgraph;

[0045] The evaluation module is used to determine the evaluation result corresponding to each node according to the total strength of each node in the multiple nodes.

[0046] The present invention also provides a graph data processing device, which includes: a memory, a processor, and a graph data processing program stored in the memory and executable on the processor, wherein the graph data processing program, when executed by the processor, implements the steps of the graph data processing method as described in any one of the foregoing items.

[0047] The present invention also provides a computer-readable storage medium, on which a graph data processing program is stored. When the graph data processing program is executed by a processor, the steps of the graph data processing method as described in any of the above items are implemented.

[0048] The present invention also provides a computer program product, comprising a computer program, which implements any of the aforementioned methods when executed by a processor.

[0049] In the present invention, graph data containing multiple nodes can be processed, the graph data including a first subgraph belonging to a first participant and a second subgraph belonging to a second participant, the first subgraph and the second subgraph having at least one common node, the first participant can determine the first strength of each node in the first subgraph according to the directed relationship between the nodes in the first subgraph, wherein the first strength of each node is used to represent the sum of the edge weights of the node pointing to other nodes in the first subgraph, and determine the total strength of each node in the multiple nodes, wherein the total strength of each node is determined by the first strength and / or the second strength of the node, and the second strength is the first strength of the second participant. The second strength is determined according to the directed relationship of each node in the second subgraph, and is used to represent the sum of the edge weights of the node pointing to other nodes in the second subgraph. The evaluation result corresponding to each node is determined according to the total strength of each node in the multiple nodes. It is possible to jointly process the graph data with multiple parties without the directed relationship data leaving the local area. Moreover, since the processing results of the first subgraph by the first participant and the processing results of the second subgraph by the second participant are integrated in the process of analyzing the nodes, the evaluation results can be obtained more comprehensively and accurately. On the basis of protecting data security, multi-party graph federation computing is realized, and the accuracy of graph data processing is effectively improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 A schematic diagram of an application scenario provided by an embodiment of the present invention;

[0051] Figure 2 A schematic diagram of graph data provided by an embodiment of the present invention;

[0052] Figure 3 A schematic diagram of a flow chart of a graph data processing method provided by an embodiment of the present invention;

[0053] Figure 4 A schematic flow chart of another graph data processing method provided by an embodiment of the present invention;

[0054] Figure 5 A schematic diagram of a process for iteratively calculating node scores provided by an embodiment of the present invention;

[0055] Figure 6 An interactive schematic diagram of a graph data processing method provided by an embodiment of the present invention;

[0056] Figure 7 A schematic diagram of the structure of a graph data processing device provided by an embodiment of the present invention;

[0057] Figure 8 A schematic diagram of the structure of a graph data processing device provided in an embodiment of the present invention.

[0058] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0059] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present invention and to enable the scope of the present invention to be fully communicated to those skilled in the art.

[0060] PageRank can implement functions such as web page ranking based on graph data, which is an extremely important digital asset of an organization and cannot be shared with other organizations in most cases. Considering that the graph data of a single organization is usually incomplete, if multiple organizations can be combined to perform calculations without sharing data, the PageRank evaluation results will be more reliable.

[0061] Currently, there is no multi-party PageRank calculation method under data privacy protection.

[0062] Figure 1A schematic diagram of an application scenario provided by an embodiment of the present invention. Figure 1 As shown, there are two institutions as participants in the graph data processing, respectively recorded as the first participant and the second participant. Exemplarily, the first participant and the second participant can both be banks, and the first participant and the second participant both hold information of multiple users, wherein a natural person can be regarded as a user, or a bank account can be regarded as a user. Specifically, the first participant has information of users 1 to 5, and the second participant has information of users 4 to 8. The corresponding graph data can be constructed based on this information, and the score of the node, that is, the PR (PageRank) value, can be calculated based on the graph data. The nodes can be sorted based on the PR value to determine the influence or importance of each node. Alternatively, abnormal nodes that are different from ordinary nodes can be found based on the PR value to monitor the nodes.

[0063] Figure 2 A schematic diagram of a graph data provided by an embodiment of the present invention. Figure 2 As shown, the first participant can construct a first subgraph, including nodes 1 to 5, corresponding to users 1 to 5, respectively, and the directed relationship between the nodes represents the transfer relationship between users. Similarly, the second participant can construct a second subgraph, including nodes 4 to 8, corresponding to users 4 to 8, respectively, and the directed relationship between the nodes represents the transfer relationship between users.

[0064] The transfer relationship can be represented by a connecting line, and the connecting line can be directed. The direction of the arrow in the figure can be used to represent the transfer direction. For example, node 1 points to node 2, indicating that node 1 has initiated a transfer to node 2.

[0065] According to the first subgraph and the second subgraph, the transfer relationship of all nodes can be obtained. Figure 2 As shown, the first subgraph plus the second subgraph can be equivalent to the graph data below, which contains multiple nodes, among which node 4 and node 5 are common nodes of the two subgraphs.

[0066] Since the graph data contains the transfer relationship of the nodes, the PR value of the node can be calculated based on the graph data. The PR value can be used for sorting, predicting risks, identifying abnormal accounts, etc. to meet monitoring needs.

[0067] In actual applications, since the transfer data between the participants cannot be shared, the first participant can only process according to the first subgraph, and the second participant can only process according to the second subgraph. The valid information of the nodes in other participants is lost, resulting in poor accuracy of graph data processing.

[0068] In view of this, an embodiment of the present invention provides a graph data processing method, wherein a first participant can determine the sum of edge weights from each node in the first subgraph to other nodes based on the directed relationships between each node in the first subgraph, and a second participant can determine the sum of edge weights from each node in the second subgraph to other nodes based on the directed relationships between each node in the second subgraph. The first participant and the second participant can exchange the corresponding sums of edge weights, and calculate the PR value corresponding to each node based on the sums of edge weights, so that different participants can be jointly processed for graph data.

[0069] Through the PageRank calculation method under the privacy security situation provided by the embodiment of the present invention, it is possible to jointly process the graph data with multiple parties on the basis that the original data of each participant does not leave the local. Since the processing results of the first participant on the first subgraph and the processing results of the second participant on the second subgraph are integrated in the process of analyzing the node, the PR value can be obtained more comprehensively and accurately, and the accuracy of graph data processing can be effectively improved on the basis of ensuring data security, while maintaining the necessary privacy security of the original data.

[0070] In the following, some embodiments of the present invention are described in detail in conjunction with the accompanying drawings. In the case where there is no conflict between the embodiments, the following embodiments and features in the embodiments can be combined with each other.

[0071] Figure 3 A flowchart of a graph data processing method provided by an embodiment of the present invention. The method can be used to process graph data containing multiple nodes, wherein the graph data includes a first subgraph belonging to a first participant and a second subgraph belonging to a second participant, wherein the first subgraph and the second subgraph have at least one common node.

[0072] Specifically, the first party can hold a node set U a and the directed relationship E between nodes a , forming the first subgraph G1=U a +E a ; The second participant holds the node set U b and the directed relationship E between nodes b , forming the second subgraph G2 = U b +E b .

[0073] The nodes of the first subgraph and the second subgraph partially overlap, and the overlapping nodes are recorded as common nodes. In other words, a common node may refer to a node that belongs to both the first subgraph and the second subgraph. For example, the first subgraph includes nodes 1 to 5, and the second subgraph includes nodes 4 to 8, then nodes 4 and 5 are common nodes of the first subgraph and the second subgraph.

[0074] Figure 3 The method shown can be applied to the first party. Figure 3 As shown, the method in this embodiment may include:

[0075] Step 301: Determine a first strength of each node in the first subgraph according to a directed relationship between each node in the first subgraph.

[0076] The first strength of each node is used to represent the sum of edge weights from the node to other nodes in the first subgraph.

[0077] by Figure 2 Taking the graph data shown as an example, the edge weight between any two nodes can be determined based on the directed relationship between nodes 1 to 5, and the sum of the edge weights corresponding to each node in nodes 1 to 5 can be calculated based on the edge weight.

[0078] The edge weight can be used to represent the degree of correlation between nodes. In a simple example, the edge weight can take values ​​between 0 and 1. For example, if there is a connection line from node i to node j, the edge weight from node i to node j is 1. If there is no connection line from node i to node j, the edge weight from node i to node j is 0.

[0079] For each node, the edge weights of the node pointing to other nodes can be determined based on the directed relationships of the node. For example, for node 1 in the graph, it points to nodes 2 and 4, so the edge weight of node 1 pointing to node 2 is 1, the edge weight of node 1 pointing to node 4 is also 1, and the edge weights of node 1 pointing to nodes 3 and 5 are both 0. Therefore, the sum of the edge weights of node 1 pointing to other nodes is 1+1=2, which represents the degree to which the node points to other nodes.

[0080] Optionally, a more refined edge weight may be calculated based on a specific directed relationship, that is, the value of the edge weight is not limited to 1 and 0. For example, the stronger the relationship between two nodes, the greater the corresponding edge weight may be.

[0081] Optionally, the nodes contained in the graph data are used to represent users, and the directed relationships between the nodes are used to represent transfer relationships between users; the transfer relationship includes at least one of the following: number of transfers, transfer amount, and transfer frequency.

[0082] Determining the first strength of each node in the first subgraph according to the directed relationship between each node in the first subgraph may include: for each node in the first subgraph, according to the transfer relationship between the node and each other node, calculating the edge weight of the node pointing to each other node, and adding the edge weights of the node pointing to each other node to obtain the first strength corresponding to the node.

[0083] For example, if node 1 has not transferred money to node 3, the edge weight of node 1 pointing to node 3 is 0; if node 1 has transferred money to node 2 once, the edge weight of node 1 pointing to node 2 can be 1; if node 1 has transferred money to node 4 five times, the edge weight of node 1 pointing to node 3 can be 5.

[0084] Furthermore, factors such as transfer amount and transfer frequency can be added. Optionally, the larger the transfer amount, the larger the corresponding edge weight; the higher the transfer frequency within a certain period of time, the larger the corresponding edge weight. Thus, the degree of transfer between nodes can be reflected through the edge weight between nodes.

[0085] After obtaining the edge weights between nodes, the edge weights from each node to other nodes are added together to obtain the first strength corresponding to the node.

[0086] Similarly, the second participant may also determine the second strength of each node in the second subgraph based on the directed relationships between the nodes in the second subgraph, wherein the second strength of each node may be used to represent the sum of edge weights of the node pointing to other nodes in the second subgraph.

[0087] Step 302: Determine the total strength of each of the multiple nodes.

[0088] Among them, the total strength of each node is determined by the first strength and / or second strength of the node, the second strength is determined by the second participant according to the directed relationship between each node in the second subgraph, and the second strength is used to represent the sum of the edge weights of the node pointing to other nodes in the second subgraph.

[0089] Optionally, determining the total strength of each of the multiple nodes may include: obtaining the second strength of each of the multiple nodes sent by the second participant; and for each of the multiple nodes, calculating the total strength corresponding to the node based on the first strength and the second strength corresponding to the node.

[0090] The total strength is used to represent the sum of the edge weights of the node pointing to other nodes in the entire graph data. For each of the multiple nodes: if the node belongs only to the first subgraph, the total strength of the node is the first strength of the node; if the node belongs only to the second subgraph, the total strength of the node is the second strength of the node; if the node is a common node of the first subgraph and the second subgraph, the total strength of the node can be the sum of the first strength and the second strength.

[0091] by Figure 2For example, since node 1 only belongs to the first subgraph, there is no information about node 1 in the second subgraph, and naturally there is no directed relationship of node 1, so the strength of node 1 pointing to other nodes obtained from the second subgraph can be ignored, or the strength is assumed to be 0, so the total strength of node 1 is the first strength corresponding to node 1. Similarly, the total strength corresponding to node 8 is the second strength of node 8.

[0092] For node 4, since it belongs to both the first subgraph and the second subgraph, the total strength can be calculated based on the first strength and the second strength corresponding to node 4. For example, the first strength and the second strength are added together to obtain the total strength, which represents the sum of the edge weights corresponding to node 4 in the entire graph data.

[0093] Similarly, the second participant may also obtain the first strength corresponding to each node calculated by the first participant, and calculate the total strength corresponding to each node based on the first strength and / or second strength of each node.

[0094] The first party directly obtains the second strength from the second party and calculates it. The architecture is simple and easy to calculate. The second strength is the sum of the edge weights of the nodes in the second subgraph, and does not reveal the directed relationship between the nodes. It can realize the joint processing of graph data on the basis of protecting data privacy.

[0095] In other optional implementations, a third party may be introduced as a collaborating party. After calculating the first strength or the second strength, the first party and the second party may send the first strength or the second strength to the collaborating party, and the collaborating party may calculate the corresponding total strength based on the first strength and / or second strength of each node and feed it back to the first party and the second party.

[0096] By introducing collaborators to assist in the calculation of total strength, the burden on the first and second participants can be effectively reduced, the overall efficiency of the system can be improved, and the processing speed of graph data can be increased.

[0097] Step 303: Determine the evaluation result corresponding to each node according to the total strength of each node in the multiple nodes.

[0098] The evaluation result may include a node score and / or a node ranking result.

[0099] For each node, the total strength can be used to represent the sum of the edge weights corresponding to the node in the entire graph data. Therefore, the corresponding node score, that is, the PR value, can be calculated based on the total strength. After determining the node score, the nodes can also be sorted based on the node scores corresponding to each node to obtain the sorting result.

[0100] Optionally, in a scenario where the graph data is used to characterize transfer relationships between users, the method further includes: after determining the evaluation results corresponding to each node, determining the business risk information of the user corresponding to each node according to the evaluation results corresponding to each node.

[0101] By jointly processing the transfer relationships held by different participants, multiple participants can jointly calculate the PR value based on the transfer relationship without disclosing the transfer relationship to other participants, and predict business risk information based on the PR value. For example, if the PR value of some nodes is significantly different from that of most nodes, these nodes may have illegal behavior and are abnormal accounts that need to be closely monitored. Therefore, based on the transfer relationships of multiple participants, business risk monitoring can be achieved while protecting data privacy, thereby improving monitoring effectiveness.

[0102] In another optional implementation, the first participant and the second participant may be social platforms, the nodes in the graph data may be used to represent users, and the directed relationships between nodes may be used to represent social behaviors between users, such as comments, likes, reposts, and attention, etc. Based on the methods provided in the embodiments of the present invention, the PR value corresponding to each user may be calculated on the basis of social data that is not interoperable between the two platforms, and the importance or influence of each user may be determined based on the PR value, and then sorting or advertising promotion may be performed based on the importance or influence, etc. Since the data of different social platforms are integrated, the accuracy of calculating the social attributes of users may be effectively improved.

[0103] In another optional implementation, the first participant and the second participant may be shopping platforms. In the graph data, both users and commodities may be nodes, and the directed relationship between nodes may be constructed by at least one of the following: whether the user purchases the commodity, whether the user is associated with other users, whether the commodity page is linked to other commodity pages, etc. Based on the methods provided in various embodiments of the present invention, the PR values ​​corresponding to the user and the commodity may be obtained, which respectively represent the purchasing power of the user and the popularity of the commodity, so that commodity recommendations or rankings may be implemented more accurately based on purchasing power and popularity.

[0104] The graph data processing method provided in this embodiment can be used to process graph data containing multiple nodes, wherein the graph data includes a first subgraph belonging to a first participant and a second subgraph belonging to a second participant, wherein the first subgraph and the second subgraph have at least one common node, and the first participant can determine the first strength of each node in the first subgraph based on the directed relationship between the nodes in the first subgraph, wherein the first strength of each node is used to represent the sum of the edge weights of the node pointing to other nodes in the first subgraph, and determine the total strength of each node in the multiple nodes, wherein the total strength of each node is determined by the first strength and / or second strength of the node, and the second strength is the first strength of the node. The second participant is determined according to the directed relationship of each node in the second subgraph, the second strength is used to represent the sum of the edge weights of the node pointing to other nodes in the second subgraph, and the evaluation result corresponding to each node is determined according to the total strength of each node in the multiple nodes. It is possible to jointly process the graph data with multiple parties without the directed relationship data leaving the local area, and because the processing results of the first subgraph by the first participant and the processing results of the second subgraph by the second participant are integrated in the process of analyzing the nodes, the evaluation results can be obtained more comprehensively and accurately, and on the basis of protecting data security, multi-party graph federation computing can be realized, effectively improving the accuracy of graph data processing.

[0105] Figure 4 A flowchart of another method for processing graph data provided by an embodiment of the present invention is shown below. Figure 4 As shown, the method includes:

[0106] Step 401: Determine the common nodes of the first subgraph and the second subgraph by using a private intersection technique.

[0107] Among them, the Private Set Intersection (PSI) technology enables two parties holding their own sets to jointly calculate the intersection of two sets. In this embodiment, based on the Private Set Intersection technology, the intersection of the node sets of the two parties can be obtained without leaking other information, that is, the common nodes corresponding to the two parties.

[0108] Step 402: Number the nodes in the graph data according to the common nodes.

[0109] Among them, the serial number of the common node is between the serial numbers of the first node and the second node; the first node is a node that belongs to the first subgraph and does not belong to the second subgraph, and the second node is a node that belongs to the second subgraph and does not belong to the first subgraph.

[0110] In this embodiment, for the convenience of calculation, each node is renumbered, wherein nodes numbered 1 to m1 are given to nodes belonging to the first subgraph but not the second subgraph (first nodes), nodes numbered (m1+1) to m2 are given to nodes belonging to both the first subgraph and the second subgraph (common nodes), and nodes numbered (m2+1) to N are given to nodes belonging to the second subgraph but not the first subgraph (second nodes), wherein m1, m2, and N are all natural numbers, m1 is the number of first nodes, m2 is the number of first nodes plus common nodes, and N is the total number of nodes in the graph data.

[0111] Step 403: Based on the numbered nodes, a corresponding first edge weight matrix is ​​constructed according to the directed relationships between the nodes in the first subgraph.

[0112] Optionally, the first edge weight matrix may be an N×N matrix, in which the element in the i-th row and the j-th column of the first edge weight matrix is ​​used to represent the edge weight from the i-th node to the j-th node, and i and j both take values ​​between 1 and N.

[0113] Similarly, the second participant constructs a second edge weight matrix based on the second subgraph. The edge weight matrix corresponding to the entire graph data can be determined based on the first edge weight matrix and the second edge weight matrix.

[0114]

[0115] In formula (1), G represents the edge weight matrix corresponding to the entire graph data, G a and G b They represent the first edge weight matrix corresponding to the first subgraph and the second edge weight matrix corresponding to the second subgraph respectively. E represents the edge weight matrix corresponding to some nodes in the graph data. In the subscript of E, a represents the first subgraph, b represents the second subgraph, and in the numbers after a or b, 00 represents the edge weight matrix from only nodes of this subgraph to only nodes of this subgraph, 01 represents the edge weight matrix from only nodes of this subgraph to common nodes, 10 represents the edge weight matrix from common nodes to only nodes of this subgraph, and 11 represents the edge weight matrix from common nodes to common nodes.

[0116] The only node of the first subgraph is the first node, and the only node of the second subgraph is the second node.

[0117] For example, E a01 represents the edge weight matrix from each first node to each common node. In the case of m1 first nodes and (m2-m1) common nodes, E a01 It is a matrix of m1×(m2-m1), and the elements in the matrix represent the edge weights from each first node to each common node.

[0118] For example, if m1, m2 and N are 3, 5 and 8 respectively, nodes 1 to 3 belong only to the first subgraph, nodes 4 to 5 belong to both the first subgraph and the second subgraph, and nodes 6 to 8 belong only to the second subgraph.

[0119] Then, G a and G b They can all be represented as an 8*8 matrix, where the element in the i-th row and j-th column represents the edge weight from the i-th node to the j-th node. For example, if the element in the 1st row and 2nd column is 1, it means that the edge weight from node 1 to node 2 is 1, and if the element in the 2nd row and 3rd column is 0, it means that the edge weight from node 2 to node 3 is 0.

[0120] Optional, in G a In the figure, the 5×5 elements in the upper left corner are valid, and the rest of the elements are 0, because there is no information about nodes 6 to 8 in the first subgraph. Similarly, G b In the graph, the 5×5 elements in the lower right corner are valid, and the rest of the elements are 0, because there is no information about nodes 1 to 3 in the second subgraph. Optionally, the element in the i-th row and i-th column can also be 0, and the default edge weight of a node pointing to itself is also 0.

[0121] From formula (1), we can know that the edge weight matrix obtained based on the entire graph data is equal to the sum of the edge weight matrix obtained based on the first subgraph and the edge weight matrix obtained based on the second subgraph. Therefore, the corresponding evaluation result can be calculated based on the first edge weight matrix and the second edge weight matrix.

[0122] Step 404: For each node among the multiple nodes, add a row of elements corresponding to the node in the first edge weight matrix to obtain a first strength corresponding to the node.

[0123] Among them, the elements of a row are the edge weights of the node corresponding to the row pointing to all other nodes. For example, the first edge weight matrix G a By adding up all the elements in the first row of , we can get the sum of the edge weights from the first node to all other nodes, which is recorded as the first strength.

[0124] Optionally, the first edge weight matrix G can be calculated a The sum of the column vectors of a It is used to represent the first strength of each node. a The i-th element in is used to represent the first intensity corresponding to the i-th node.

[0125] In this embodiment, step 403 and step 404 can be used to determine the first strength of each node in the first subgraph according to the directed relationship of each node in the first subgraph.

[0126] Similarly, the second participant can construct a corresponding second edge weight matrix G according to the directed relationship of each node in the second subgraph. b Then, for each of the plurality of nodes, the second edge weight matrix G b The elements of a row corresponding to the node in G are added to obtain the second strength corresponding to the node. b Add the column vectors of b .

[0127] Step 405: Determine the total strength of each of the multiple nodes.

[0128] Specifically, the corresponding total strength may be determined according to the first strength and the second strength calculated by the second participant, wherein the first strength and the second strength corresponding to each node are added together to obtain the total strength of the node.

[0129] Optionally, the vector d obtained by the first participant and the second participant can be a and d b Add them together to get a vector d, where each element of d is used to represent the total strength of the corresponding node.

[0130] Step 406: Generate a coefficient matrix according to the total strength corresponding to each node.

[0131] The coefficient matrix is ​​an N×N matrix, and in each column of the coefficient matrix, each element is equal to the inverse of the total strength of the node corresponding to the column.

[0132] Optionally, assume that the vector d contains elements d1, d2, ..., d N , respectively represent the total strength of node 1 to node N, then the coefficient matrix D can be constructed by the following formula.

[0133]

[0134] Among them, for each column in the coefficient matrix, all elements in the column are equal to the reciprocal of the total strength of the corresponding node in the column. For example, the total strength of the first node is 10, then the values ​​of all elements in the first column are the reciprocal of the total strength of the first node, that is, 1 / 10.

[0135] Step 407: multiply the first edge weight matrix by the coefficient matrix to obtain a normalized first edge weight matrix.

[0136] Specifically, the first edge weight matrix G a Multiply it with the coefficient matrix D to obtain the normalized first edge weight matrix G a ', G a '=G a D.

[0137] Similarly, the second participant can calculate the normalized second edge weight matrix G b ', G b '=G b D.

[0138] Step 408: Determine the evaluation results corresponding to the nodes according to the normalized first edge weight matrix.

[0139] In this embodiment, through steps 406 to 408, it is possible to determine the evaluation result corresponding to each node according to the total strength of each node in the multiple nodes.

[0140] The normalized first edge weight matrix contains both edge weight information in the first subgraph and edge weight information in the second subgraph. Therefore, the normalized first edge weight matrix incorporates more information and can determine the evaluation result more accurately.

[0141] The graph data processing method provided in this embodiment determines the common nodes of the first subgraph and the second subgraph through the privacy intersection technology, and numbers the nodes in the graph data according to the common nodes. Based on the numbered nodes, the corresponding first edge weight matrix is ​​constructed according to the directed relationship of each node in the first subgraph. For each of the multiple nodes, a row of elements corresponding to the node in the first edge weight matrix is ​​added to obtain the first strength corresponding to the node. The edge weight matrix can be used to process each node, which is convenient for calculation and effectively improves the efficiency and accuracy of subsequent matrix calculations. In addition, the inverse of the total strength is introduced to construct the coefficient matrix, which can accurately reflect the normalized strength of each node, so that on the basis of integrating the edge weight information of the first participant and the second participant, the evaluation result can be calculated quickly and accurately, further improving the accuracy.

[0142] Based on the technical solution provided in the above embodiment, optionally, if the evaluation result includes a node score corresponding to the node, then when determining the evaluation result corresponding to each node according to the normalized first edge weight matrix, the node score corresponding to each node can be determined specifically through multiple iterative processes.

[0143] Figure 5 A schematic diagram of a process for iteratively calculating node scores provided by an embodiment of the present invention. Figure 5 As shown, in each iteration process, the following steps can be performed:

[0144] Step 501: multiply the current score matrix by the normalized first edge weight matrix to obtain a first score matrix.

[0145] The current score matrix corresponding to the first iteration process may be an initial score matrix, and each element in the initial score matrix is ​​equal.

[0146] Specifically, in the first iteration, the initial score matrix e1 = [1,1,…,1], which is a 1×N matrix, and each element in the matrix is ​​1. The first participant can calculate the initial score matrix e1 and the normalized first edge weight matrix G a ', calculate the first score matrix e a,1 =e1G a '.

[0147] When k≠1, in the kth iteration, the current score matrix is ​​e k , the first participant can use the current score matrix e k And the normalized first edge weight matrix G a ', calculate the first score matrix e a,k =e k G a '.

[0148] Step 502: Obtain a second score matrix obtained by the second participant by multiplying the current score matrix with the normalized second edge weight matrix.

[0149] The normalized second edge weight matrix is ​​calculated by the second participant based on the second edge weight matrix constructed based on the second subgraph and the total strength of each node.

[0150] Specifically, during the kth iteration, the second participant can use the current score matrix e k And the normalized second edge weight matrix G b ', calculate the second score matrix e b,k =e k G b '.

[0151] Among them, the normalized second edge weight matrix G b 'The second participant calculates the coefficient matrix D through the total strength, and according to D and the second edge weight matrix G b Got it.

[0152] Step 503: Calculate an updated score matrix according to the first score matrix and the second score matrix.

[0153] Optionally, the first score matrix and the second score matrix may be added to obtain an updated score matrix.

[0154] Alternatively, a damping coefficient may be introduced to calculate an updated score matrix. Optionally, calculating the updated score matrix according to the first score matrix and the second score matrix may include: adding the first score matrix and the second score matrix and multiplying the result by the damping coefficient to obtain a damping matrix; multiplying the initial score matrix by the undamped coefficient to obtain an undamped matrix; wherein the sum of the undamped coefficient and the damping coefficient is equal to 1; and adding the damped matrix and the undamped matrix to obtain an updated score matrix.

[0155] Specifically, during the kth iteration, the updated score matrix can be calculated by the following formula.

[0156] e k+1 =(1-f)e1+f(e a,k +e b,k ) (3)

[0157] Among them, f is the parameter for calculating PageRank, denoted as the damping coefficient, 1-f is the undamped coefficient, and e k+1 is the updated score matrix. By setting the damping coefficient, the processing of isolated nodes can be achieved and the smoothness of the algorithm can be improved.

[0158] Optionally, the damping coefficient f may be between 0 and 1. For example, f may be equal to 0.85.

[0159] Step 504, determine whether the updated score matrix meets the requirements: if it meets the requirements, output the score matrix, which includes the node scores corresponding to each node; if it does not meet the requirements, execute the next iteration process according to the updated score matrix.

[0160] Specifically, after obtaining the updated score matrix e k+1 After that, we can calculate Is it less than the given error? If so, the iteration process ends and the final score matrix is ​​obtained.

[0161] The final score matrix can be used to determine the node scores corresponding to each node, and the node score of the i-th node is the value of the i-th element in the final score matrix. Alternatively, the node score of the i-th node is the i-th element in the final score matrix divided by N. Alternatively, the left half of formula (3) can be multiplied by N, which is similar to the effect of dividing by N after the final score matrix is ​​obtained.

[0162] If the updated score matrix e k+1 If the requirements are not met, the next iteration process is performed until the score matrix e k+1 Meet the requirements.

[0163] During multiple iterations, the corresponding first score matrix is ​​calculated based on the normalized first edge weight matrix, and then the second score matrix calculated by the second participant based on the normalized second edge weight matrix is ​​obtained, and the updated score matrix is ​​obtained based on the first score matrix and the second score matrix. Not only does the normalized edge weight matrix integrate the edge weight information corresponding to each participant, the score matrix can also integrate the calculation results of each participant during multiple iterations, thereby further improving the accuracy of the calculation node scores.

[0164] Figure 6 The following is an interactive schematic diagram of a graph data processing method provided by an embodiment of the present invention. Figure 6 As shown, the first participant and the second participant can calculate the node score without the assistance of other parties.

[0165] First, the first participant and the second participant respectively construct corresponding matrices locally and calculate the sum of column vectors.

[0166] Specifically, the first participant constructs a first edge weight matrix G according to the first subgraph a , and calculate G a The sum of the column vectors gives the vector d a , d a It is used to represent the first strength of each node; the second participant constructs the second edge weight matrix G according to the second subgraph b , and calculate G b The sum of the column vectors gives the vector d b , d b Used to represent the secondary strength of each node.

[0167] The first participant and the second participant can exchange the obtained vectors, that is, the first participant will exchange d a Send it to the second party, and the second party will b The first and second parties send the a and d b Calculate d = d a +d b The obtained vector d is used to represent the total strength of each node, and then the coefficient matrix D is generated based on d.

[0168] After obtaining the coefficient matrix D, the first participant calculates the normalized first edge weight matrix G according to D a '=G a D, the second participant calculates the normalized second edge weight matrix G based on D b '=G b D. The first participant and the second participant obtain the initial score matrix e1 again, and perform an iterative loop according to the initial score matrix e1 and the number of times k.

[0169] During the kth iteration, the first participant calculates the first score matrix e a,k =e k G a ', the second participant calculates the second score matrix e b,k =e k G b '. The first participant and the second participant then exchange the calculated e a,k and e b,k , and calculate e k+1 =(1-f)e1+f(e a,k +e b,k ).

[0170] Finally, the first and second parties calculate e k+1 Whether the accuracy requirement is met, if so, exit the loop and output the final score matrix e, if not, continue to execute the k+1th iteration until the accuracy meets the requirement.

[0171] The specific implementation principles of the second participant in calculating various matrices and parameters may be similar to those of the first participant.

[0172] Based on the technical solutions provided in the above embodiments, optionally, the number of the second participants can be multiple. When there are multiple second participants, the sum of the edge weights of all participants can still be added to obtain the total strength. Specifically, each second participant can calculate the corresponding second strength, and the first strength of the first participant is added to the multiple second strengths corresponding to the multiple second participants to obtain the total strength.

[0173] Similarly, during the iterative loop, multiple second participants can calculate the corresponding second score matrices respectively, and the first participant can obtain multiple second score matrices corresponding to the multiple second participants, and add the multiple second score matrices together, and determine the updated score matrix according to the addition result. For example, in formula (3), e b,k It can be replaced by adding multiple second score matrices.

[0174] Optionally, the first participant may be connected to multiple second participants respectively, obtain corresponding data from each second participant and perform calculations. Alternatively, the first participant may implement data interaction with multiple second participants by sequentially transmitting data.

[0175] Optionally, when the number of second participants is at least two, multiple participants formed by at least two second participants and the first participant sequentially transmit data, and the data may be any data used in the process of calculating node scores. It can be seen that the embodiment of the present invention can be applied to the scenario where at least three participants jointly calculate PageRank, and the method provided by the embodiment of the present invention can be applied to any of the participants. When applied to a certain participant, the participant can be recorded as the first participant, and the other participants can be recorded as the second participant for easy distinction.

[0176] The embodiment of the present invention does not limit the transmission order of the first participant and the at least two second participants. The first participant can be located at any position in the data transmission process, for example, it can be the first, the last, or the middle.

[0177] When determining the total strength of each of the multiple nodes, the first participant can calculate the sum of its corresponding edge weights and pass the sum of the edge weights to the next participant. The next participant adds the sum of the edge weights calculated by itself to the data received from the previous participant, and sends the result to the next participant, and so on, until the last participant completes the calculation and obtains the total strength.

[0178] Optionally, for each participant, the calculated result can be added with a random value before being sent to the next participant, so as to further protect data privacy by introducing the random value. The following is an explanation for participants in different positions.

[0179] Assume that the number of the plurality of participants is M, and the first participant is the kth participant in the data transmission process. M is a positive integer greater than or equal to 3, and k is between 1 and M. When determining the total strength of each of the plurality of nodes, the first participant may specifically perform the following steps.

[0180] The calculated first strength is added to the random value corresponding to the first participant to obtain the encrypted first strength.

[0181] If k is not equal to 1 and is not equal to M, then the strength information sent by the previous participant is obtained, and the strength information includes the sum of the scrambled second strengths calculated by the first k-1 participants, wherein the scrambled second strength corresponding to each second participant is obtained by adding the second strength corresponding to the second participant and the random value corresponding to the second participant; the obtained strength information is added to the calculated scrambled first strength to obtain updated strength information and send it to the next participant, so that the next participant calculates the updated strength information according to the obtained strength information and the corresponding scrambled second strength and transmits it backward; after the last participant completes the calculation, the total strength is obtained, and the total strength is the updated strength information calculated by the last participant.

[0182] For each second participant, a similar operation can be performed, the data obtained from the previous participant is added to the scrambled second strength corresponding to itself, and the obtained data is sent to the next participant. The final determined total strength can be equal to the sum of the first strength of the first participant and the second strengths corresponding to all second participants.

[0183] If k is equal to 1, that is, the first participant is the first participant to transmit data backward, then the encrypted first strength is directly sent to the next participant, so that the next participant calculates the updated strength information according to the acquired first strength and the corresponding encrypted second strength and transmits it backward; after the last participant completes the calculation, the total strength calculated by the last participant is obtained.

[0184] If k is equal to M, that is, the first participant is the last participant, then the strength information sent by the previous participant is obtained, the strength information is added to the encrypted first strength to obtain the total strength, and the total strength is sent to the first k-1 participants.

[0185] Among them, for each node, each participant is set with M-1 random values ​​for adding to the strength of the node (the first strength or the second strength), and the M-1 random values ​​of each participant are the random values ​​of the participant relative to other participants, and among any two participants, the random value of one participant relative to the other participant, plus the random value of the other participant relative to the one participant, is equal to 0 when added.

[0186] Specifically, for each of the M participants, a random value can be set for each node, wherein M-1 random values ​​are set for each node, which are the random values ​​of the participant relative to the other M-1 participants, and the random value of the i-th participant relative to the j-th participant is equal to 0 when added to the random value of the k-th participant relative to the i-th participant.

[0187] For example, there are three participants, denoted as U, V, and W. For node 1, the random values ​​of U relative to V and W are 1 and 2, respectively, the random values ​​of V relative to U and W are -1 and 3, respectively, and the random values ​​of W relative to U and V are -2 and -3. Each participant can know the random value related to itself, but cannot determine the random value between any two other participants.

[0188] Assuming that participants U, V, and W are the first, second, and third participants respectively, that is, the data transmission direction is UVW, then for node 1, U can first calculate the strength s corresponding to node 1 based on its own subgraph u And add random values ​​1 and 2 to get the scrambled data s u +1+2 is passed to V.

[0189] V calculates the strength s corresponding to node 1 v Add random values ​​-1, 3 to get the scrambled data s v -1+3, and then add it to the data obtained from U to get (s u +1+2)+(s v -1+3) and pass it to W.

[0190] W calculates the strength s corresponding to node 1 w Add random values ​​-2 and -3 to get the scrambled data s w -2-3, and then add it to the data obtained from V to get (s u +1+2)+(s v -1+3)+(s w -2-3)=s u +s v +s w , which is consistent with the result obtained without adding random values.

[0191] For other nodes, the strength summation can also be achieved in a similar way.

[0192] It is understandable that when the strengths of multiple nodes are represented by vectors or matrices, a corresponding random value vector or random value matrix can be constructed and added to them. By introducing random values, no party can infer the strength calculated by other parties, further improving privacy security.

[0193] Similarly, in the process of loop iteration, the sum of the score matrices corresponding to multiple participants can also be calculated by adding random values ​​and passing them in sequence. The specific implementation process is similar to that of calculating the total strength and will not be repeated here.

[0194] Figure 7A schematic diagram of the structure of a graph data processing device provided in an embodiment of the present invention. The device is used to process graph data containing multiple nodes, the graph data including a first subgraph belonging to a first participant and a second subgraph belonging to a second participant, the first subgraph and the second subgraph having at least one common node. The device is applied to the first participant.

[0195] like Figure 7 As shown, the graph data processing device may include:

[0196] A first determination module 701 is used to determine a first strength of each node in the first subgraph according to a directed relationship of each node in the first subgraph, wherein the first strength of each node is used to represent the sum of edge weights of the node pointing to other nodes in the first subgraph;

[0197] A second determination module 702 is used to determine the total strength of each node in the multiple nodes, wherein the total strength of each node is determined by the first strength and / or the second strength of the node, the second strength is determined by the second participant according to the directed relationship of each node in the second subgraph, and the second strength is used to represent the sum of the edge weights of the node pointing to other nodes in the second subgraph;

[0198] The evaluation module 703 is used to determine the evaluation result corresponding to each node according to the total strength of each node in the multiple nodes.

[0199] Optionally, the first determining module 701 is further configured to:

[0200] Determine the common nodes between the first subgraph and the second subgraph by using a privacy intersection technique;

[0201] According to the common node, number the nodes in the graph data; wherein the sequence number of the common node is between the sequence numbers of the first node and the second node; the first node is a node that belongs to the first subgraph and does not belong to the second subgraph, and the second node is a node that belongs to the second subgraph and does not belong to the first subgraph;

[0202] Accordingly, when the first determining module 701 determines the first strength of each node in the first subgraph according to the directed relationship of each node in the first subgraph, it is specifically configured to:

[0203] Based on the numbered nodes, construct a corresponding first edge weight matrix according to the directed relationship between the nodes in the first subgraph, wherein the element in the i-th row and the j-th column in the first edge weight matrix is ​​used to represent the edge weight from the i-th node to the j-th node;

[0204] For each node among the multiple nodes, a row of elements corresponding to the node in the first edge weight matrix is ​​added to obtain a first strength corresponding to the node.

[0205] Optionally, the evaluation module 703 is specifically used for:

[0206] Generate a coefficient matrix according to the total strength corresponding to each node; wherein in each column of the coefficient matrix, each element is equal to the inverse of the total strength of the node corresponding to the column;

[0207] Multiplying the first edge weight matrix by the coefficient matrix to obtain a normalized first edge weight matrix;

[0208] The evaluation results corresponding to the respective nodes are determined according to the normalized first edge weight matrix.

[0209] Optionally, the evaluation result includes a node score corresponding to the node; when the evaluation module 703 determines the evaluation result corresponding to each node according to the normalized first edge weight matrix, it is specifically used to:

[0210] The node score corresponding to each node is determined through multiple iterations, wherein each iteration includes the following steps:

[0211] Multiplying the current score matrix by the normalized first edge weight matrix to obtain a first score matrix;

[0212] Obtaining a second score matrix obtained by the second participant multiplying the current score matrix by a normalized second edge weight matrix, wherein the normalized second edge weight matrix is ​​calculated by the second participant according to a second edge weight matrix constructed based on the second subgraph and the total strength of each node;

[0213] Calculating an updated score matrix according to the first score matrix and the second score matrix;

[0214] Determine whether the updated score matrix meets the requirements;

[0215] If the requirements are met, the score matrix is ​​output, and the score matrix includes the node score corresponding to each node;

[0216] If not satisfied, the next iteration process is performed according to the updated score matrix;

[0217] The current score matrix corresponding to the first iteration process is the initial score matrix, and each element in the initial score matrix is ​​equal.

[0218] Optionally, the nodes included in the graph data are used to represent users, and the directed relationships between the nodes are used to represent the transfer relationship between users; the transfer relationship includes at least one of the following: the number of transfers, the transfer amount, and the transfer frequency;

[0219] When determining the first strength of each node in the first subgraph according to the directed relationship of each node in the first subgraph, the first determining module 701 is specifically configured to:

[0220] For each node in the first subgraph, according to the transfer relationship between the node and other nodes, the edge weights of the node pointing to other nodes are calculated, and the edge weights of the node pointing to other nodes are added to obtain the first strength corresponding to the node;

[0221] Correspondingly, the evaluation module 703 is further used to: after determining the evaluation results corresponding to each node, determine the business risk information of the user corresponding to each node according to the evaluation results corresponding to each node.

[0222] Optionally, the second determining module 702 is specifically configured to:

[0223] Acquire a second strength of each node in the second subgraph sent by the second participant;

[0224] For each node among the multiple nodes, a total strength corresponding to the node is calculated according to the first strength and / or the second strength corresponding to the node.

[0225] Optionally, the number of the second participants is at least two, and multiple participants formed by the at least two second participants and the first participant sequentially transmit data, the number of the multiple participants is M, and the first participant is the kth participant among the multiple participants;

[0226] The second determining module 702 is specifically configured to:

[0227] Adding the calculated first strength to the random value corresponding to the first participant to obtain the encrypted first strength;

[0228] If k is not equal to 1 and is not equal to M, then the strength information sent by the previous participant is obtained, and the strength information includes the sum of the scrambled second strengths calculated by the first k-1 participants, wherein the scrambled second strength corresponding to each second participant is obtained by adding the second strength corresponding to the second participant and the random value corresponding to the second participant; the obtained strength information is added to the calculated scrambled first strength to obtain updated strength information and send it to the next participant, so that the next participant calculates the updated strength information according to the obtained strength information and the corresponding scrambled second strength and transmits it backward; after the last participant completes the calculation, the total strength is obtained, and the total strength is the updated strength information calculated by the last participant;

[0229] If k is equal to 1, the encrypted first strength is sent to the next participant, so that the next participant calculates the updated strength information according to the acquired first strength and the corresponding encrypted second strength and transmits it backward; after the last participant completes the calculation, the total strength calculated by the last participant is obtained;

[0230] If k is equal to M, then obtain the strength information sent by the previous participant, add the strength information to the scrambled first strength to obtain the total strength, and send the total strength to the first k-1 participants;

[0231] Among them, for each node, each participant is set with M-1 random values ​​for adding to the strength of the node, and the M-1 random values ​​of each participant are the random values ​​of the participant relative to other participants, and among any two participants, the random value of one participant relative to the other participant, plus the random value of the other participant relative to the one participant, is equal to 0 when added.

[0232] The graph data processing device provided in any of the aforementioned embodiments is used to execute the technical solution of any of the aforementioned method embodiments. Its implementation principle and technical effects are similar and will not be repeated here.

[0233] Figure 8 A schematic diagram of the structure of a graph data processing device provided by an embodiment of the present invention. Figure 8 As shown, the device may include: a memory 801, a processor 802, and a graph data processing program stored in the memory 801 and executable on the processor 802. When the graph data processing program is executed by the processor 802, the steps of the graph data processing method described in any of the foregoing embodiments are implemented.

[0234] Optionally, the memory 801 may be independent or integrated with the processor 802 .

[0235] The implementation principle and technical effects of the device provided in this embodiment can be found in the aforementioned embodiments and will not be described in detail here.

[0236] An embodiment of the present invention further provides a computer-readable storage medium, on which a graph data processing program is stored. When the graph data processing program is executed by a processor, the steps of the graph data processing method described in any of the aforementioned embodiments are implemented.

[0237] An embodiment of the present invention further provides a computer program product, including a computer program, which implements the method described in any of the above embodiments when executed by a processor.

[0238] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation, for example, multiple modules can be combined or integrated into another system, or some features can be ignored or not executed.

[0239] The above-mentioned integrated module implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the method described in each embodiment of the present invention.

[0240] It should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be implemented by a combination of hardware and software modules in the processor.

[0241] The memory may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk memory, and may also be a USB flash drive, a mobile hard disk, a read-only memory, a magnetic disk or an optical disk, etc.

[0242] The above storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The storage medium can be any available medium that can be accessed by a general or special purpose computer.

[0243] An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the storage medium can also exist as discrete components in an electronic device or a main control device.

[0244] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0245] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0246] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0247] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A graph data processing method, characterized in that: The method is used to process graph data containing multiple nodes, wherein the nodes contained in the graph data are used to represent users, and the directed relationship between the nodes is used to represent the transfer relationship between users; the transfer relationship includes at least one of the following: the number of transfers, the transfer amount, and the transfer frequency; the graph data includes a first subgraph belonging to a first participant and a second subgraph belonging to a second participant, and the first subgraph and the second subgraph have at least one common node; the method is applied to the first participant; the method includes: For each node in the first subgraph, according to the transfer relationship between the node and other nodes, the edge weights from the node to other nodes are calculated, and the edge weights from the node to other nodes are added to obtain a first strength corresponding to the node, wherein the first strength of each node is used to represent the sum of the edge weights from the node to other nodes in the first subgraph; Obtaining a second strength of each node in the second subgraph sent by the second participant, wherein the second strength is determined by the second participant according to the directed relationship between each node in the second subgraph, and the second strength is used to represent the sum of edge weights of the node pointing to other nodes in the second subgraph; For each node among the plurality of nodes, calculating a total strength corresponding to the node according to the first strength and / or the second strength corresponding to the node; Determining an evaluation result corresponding to each node according to the total strength of each node in the plurality of nodes; According to the evaluation results corresponding to the nodes, the business risk information of the user corresponding to each node is determined.

2. The method according to claim 1, characterized in that Before acquiring the second strength of each node in the second subgraph sent by the second participant, the method further includes: Determine the common nodes between the first subgraph and the second subgraph by using a privacy intersection technique; According to the common node, number the nodes in the graph data; wherein the sequence number of the common node is between the sequence numbers of the first node and the second node; the first node is a node that belongs to the first subgraph and does not belong to the second subgraph, and the second node is a node that belongs to the second subgraph and does not belong to the first subgraph; Based on the numbered nodes, construct a corresponding first edge weight matrix according to the directed relationship between the nodes in the first subgraph, wherein the element in the i-th row and the j-th column in the first edge weight matrix is ​​used to represent the edge weight from the i-th node to the j-th node; For each node among the multiple nodes, a row of elements corresponding to the node in the first edge weight matrix is ​​added to obtain a first strength corresponding to the node.

3. The method according to claim 2, characterized in that Determining, according to the total strength of each node in the plurality of nodes, an evaluation result corresponding to each node, including: Generate a coefficient matrix according to the total strength corresponding to each node; wherein in each column of the coefficient matrix, each element is equal to the inverse of the total strength of the node corresponding to the column; Multiplying the first edge weight matrix by the coefficient matrix to obtain a normalized first edge weight matrix; The evaluation results corresponding to the respective nodes are determined according to the normalized first edge weight matrix.

4. The method according to claim 3, characterized in that The evaluation result includes a node score corresponding to the node; Determining the evaluation results corresponding to the nodes according to the normalized first edge weight matrix includes: The node score corresponding to each node is determined through multiple iterations, wherein each iteration includes the following steps: Multiplying the current score matrix by the normalized first edge weight matrix to obtain a first score matrix; Obtaining a second score matrix obtained by the second participant multiplying the current score matrix by a normalized second edge weight matrix, wherein the normalized second edge weight matrix is ​​calculated by the second participant according to a second edge weight matrix constructed based on the second subgraph and the total strength of each node; Calculating an updated score matrix according to the first score matrix and the second score matrix; Determine whether the updated score matrix meets the requirements; If the requirements are met, the score matrix is ​​output, and the score matrix includes the node score corresponding to each node; If not satisfied, the next iteration process is performed according to the updated score matrix; The current score matrix corresponding to the first iteration process is the initial score matrix, and each element in the initial score matrix is ​​equal.

5. The method according to any one of claims 1 to 4, characterized in that: The number of the second participants is at least two, and multiple participants formed by the at least two second participants and the first participant transmit data in sequence, the number of the multiple participants is M, and the first participant is the kth participant among the multiple participants; for each node in the first subgraph, according to the transfer relationship of the node to other nodes, the edge weight of the node pointing to other nodes is calculated, and the edge weights of the node pointing to other nodes are added to obtain the first strength corresponding to the node, the method further includes: Adding the calculated first strength to the random value corresponding to the first participant to obtain the encrypted first strength; If k is not equal to 1 and is not equal to M, then the strength information sent by the previous participant is obtained, and the strength information includes the sum of the scrambled second strengths calculated by the first k-1 participants, wherein the scrambled second strength corresponding to each second participant is obtained by adding the second strength corresponding to the second participant and the random value corresponding to the second participant; the obtained strength information is added to the calculated scrambled first strength to obtain updated strength information and send it to the next participant, so that the next participant calculates the updated strength information according to the obtained strength information and the corresponding scrambled second strength and transmits it backward; after the last participant completes the calculation, the total strength is obtained, and the total strength is the updated strength information calculated by the last participant; If k is equal to 1, the encrypted first strength is sent to the next participant, so that the next participant calculates the updated strength information according to the acquired first strength and the corresponding encrypted second strength and transmits it backward; after the last participant completes the calculation, the total strength calculated by the last participant is obtained; If k is equal to M, then obtain the strength information sent by the previous participant, add the strength information to the scrambled first strength to obtain the total strength, and send the total strength to the first k-1 participants; Among them, for each node, each participant is set with M-1 random values ​​for adding to the strength of the node, and the M-1 random values ​​of each participant are the random values ​​of the participant relative to other participants, and among any two participants, the random value of one participant relative to the other participant, plus the random value of the other participant relative to the one participant, is equal to 0 when added.

6. A graph data processing device, characterized in that: The device is used to process graph data containing multiple nodes, wherein the nodes contained in the graph data are used to represent users, and the directed relationship between the nodes is used to represent the transfer relationship between users; the transfer relationship includes at least one of the following: the number of transfers, the transfer amount, and the transfer frequency; the graph data includes a first subgraph belonging to a first participant and a second subgraph belonging to a second participant, and the first subgraph and the second subgraph have at least one common node; the device is applied to the first participant; The device comprises: A first determination module is configured to calculate, for each node in the first subgraph, edge weights from the node to other nodes according to the transfer relationship between the node and other nodes, and add the edge weights from the node to other nodes to obtain a first strength corresponding to the node, wherein the first strength of each node is used to represent the sum of edge weights from the node to other nodes in the first subgraph; a second determination module, for obtaining a second strength of each node in the second subgraph sent by the second participant, wherein the second strength is determined by the second participant according to the directed relationship between the nodes in the second subgraph, and the second strength is used to represent the sum of edge weights of the node pointing to other nodes in the second subgraph; and for calculating, for each of the multiple nodes, a total strength corresponding to the node according to the first strength and / or the second strength corresponding to the node; The evaluation module is used to determine the evaluation results corresponding to each node according to the total strength of each node in the multiple nodes; and is used to determine the business risk information of the user corresponding to each node according to the evaluation results corresponding to each node.

7. A graph data processing device, characterized in that: The graph data processing device includes: a memory, a processor, and a graph data processing program stored in the memory and executable on the processor. When the graph data processing program is executed by the processor, the steps of the graph data processing method according to any one of claims 1 to 5 are implemented.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a graph data processing program, which, when executed by a processor, implements the steps of the graph data processing method according to any one of claims 1 to 5.

9. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Transaction risk identification method, apparatus and device, and medium

    CN111932273A