Federation map calculation methods, federated map calculation configuration methods, apparatus and electronic equipment

By employing federated graph computation methods, the problem of low graph computation efficiency in federated learning is solved, achieving efficient graph data processing and data protection, and avoiding data aggregation and leakage.

CN115344753BActive Publication Date: 2025-10-31CHINA CONSTRUCTION BANK +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210986912.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-17
Publication Date
2025-10-31
Estimated Expiration
2042-08-17

AI Technical Summary

Technical Problem

In federated learning, graph computation is inefficient, and the methods for aggregating graph data between different enterprises are cumbersome, leading to inefficiency.

Method used

The federated graph computation method utilizes federated nodes to load graph data, receives and processes messages from active vertices, updates vertex states based on preset processing functions, and completes iterative computation when stopping conditions are met. Simultaneously, messages are sent between federated nodes and encrypted before being sent.

Benefits of technology

It improves the efficiency of graph computing under the federated learning architecture, avoids the need for data aggregation, enhances data protection, and prevents data leakage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115344753B_ABST
    Figure CN115344753B_ABST
Patent Text Reader

Abstract

This invention discloses a federated graph computation method, a federated graph computation configuration method, an apparatus, and an electronic device. This invention relates to the field of data processing technology. The method includes: the current federated node loading graph data; the current federated node receiving messages from active vertices in the previous hyperstep, processing the messages from the previous hyperstep based on a preset processing function, and updating the vertex state of the corresponding active vertex in the current hyperstep based on the processing result; the current federated node sending messages to the associated federated nodes of vertices corresponding to the outgoing edges of active vertices in the current hyperstep based on the outgoing edges in the graph data; wherein, the iterative computation process is completed when the current hyperstep meets the stopping condition. This invention, by combining federated learning with graph computation, enables graph computation within a federated learning architecture without the need for graph data aggregation, solving the problem of low efficiency of graph computation when applied to federated learning and improving the efficiency of graph computation within a federated learning architecture.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of data processing technology, and in particular to federated graph calculation methods, federated graph calculation configuration methods, apparatus and electronic equipment. Background Technology

[0002] With the development of artificial intelligence and big data, the demand for data is increasing. In fields such as social networks, knowledge graphs, information recommendation, and financial risk control, graph computing has unparalleled advantages.

[0003] Currently, enterprises are breaking down data silos through federated learning. Federated learning algorithms are mainly focused on traditional machine learning. However, multi-step computation based on relationships is inefficient in traditional machine learning. Furthermore, current modeling of relationships results in different graph data from different enterprises, and the methods for aggregating different graph data are very cumbersome, making graph computation inefficient when applied to federated learning. Summary of the Invention

[0004] This invention provides a federated graph computation method, a federated graph computation configuration method, an apparatus, and an electronic device to solve the problem of low efficiency in graph computation when applied to federated learning.

[0005] In a first aspect, embodiments of the present invention provide a federated graph computation method, applied to federated nodes in a federated graph computation system, wherein the federated graph computation system includes at least two federated nodes, including:

[0006] The current federated node loads graph data, which includes vertices and edges, with vertices having relationships connected by edges;

[0007] The current federated node receives the message of the active vertex in the previous superstep, processes the message of the previous superstep based on a preset processing function, and updates the vertex state of the corresponding active vertex in the current superstep based on the processing result. The active vertex in the previous superstep and the corresponding active vertex in the current superstep are associated.

[0008] The current federation node sends a message to the associated federation node to which the vertex corresponding to the outgoing edge belongs, based on the outgoing edge of the active vertex in the current superstep in the graph data.

[0009] The iterative calculation process is completed when the current overstep meets the stopping condition.

[0010] Furthermore, the method also includes:

[0011] If any vertex on either side of the graph data of the current federation node is a remote vertex, create a state routing table between the current federation node and the associated federation node to which the remote vertex belongs;

[0012] Accordingly, sending a message to the associated federation node to which the vertex corresponding to the outgoing edge belongs includes:

[0013] If the endpoint vertex of the outgoing edge of the active vertex in the current superstep is a remote vertex, a message is sent to the associated federation node to which the vertex corresponding to the outgoing edge belongs based on the state routing table.

[0014] Furthermore, creating the state routing table for the current federated node and associated federated nodes includes:

[0015] The intersection of the vertices is determined based on the remote vertices and each associated federation node, and a state routing table is formed based on the intersection of the vertices.

[0016] Furthermore, the message from the previous superstep is processed based on a preset processing function, including:

[0017] At least one received message is aggregated using an aggregation function to obtain the aggregation result.

[0018] The current state information of the corresponding active vertex in the current superstep and the aggregation result are processed based on the vertex update function to obtain the processing result.

[0019] Furthermore, the aggregation function includes one or more of the following: comparison function, algebraic operation function, and logical operation function;

[0020] The vertex update function includes one or more of the following: comparison function, algebraic operation function, and logical operation function.

[0021] Furthermore, before the current federation node sends a message to the associated federation node to which the vertex corresponding to the outgoing edge belongs based on the outgoing edge of the active vertex in the current superstep in the graph data, the method further includes:

[0022] Based on the outgoing edges of the active vertices in the current superstep in the graph data, and the starting and ending vertices corresponding to the outgoing edges, triplet data is generated, and a message to be sent is generated based on the triplet data.

[0023] Accordingly, a message is sent to the associated federation node to which the vertex corresponding to the outgoing edge belongs, including:

[0024] The message to be sent is sent to the associated federation node to which the vertex corresponding to the outgoing edge belongs.

[0025] Furthermore, at least two federation nodes in the federated graph computing system include a task initiation node;

[0026] After the current federation node sends a message to the associated federation node of the vertex corresponding to the outgoing edge based on the outgoing edge of the target vertex in the graph data, the method further includes:

[0027] Send statistical information to the task initiating node so that the task initiating node can count the number of iterations and / or determine the amount of information sent in the current iteration, and determine whether the current overstep meets the stopping condition.

[0028] Furthermore, the stopping conditions include the number of iterations reaching a preset iteration threshold, or the amount of information sent in the current iteration being zero.

[0029] Furthermore, the messages between the vertices are encrypted.

[0030] Furthermore, the computational task of the federated graph computing system is to determine the single-source shortest path; the graph data includes multiple objects and the relationships between them, the message of the active vertex in the previous superstep includes the shortest distance between the active vertex in the previous superstep and the source object, and the vertex state of the corresponding active vertex in the current superstep includes the shortest distance between the corresponding active vertex in the current superstep and the source object.

[0031] Secondly, embodiments of the present invention provide a configuration method for federated graph computation, including:

[0032] Obtain a calculation rule template and a configuration file, wherein the preset processing function field in the calculation rule template is empty; and the configuration file includes the preset processing function.

[0033] The computation rule template is updated based on the configuration file to obtain graph computation rules, which are then configured on each federation node. The graph computation rules are applied in the current scenario to execute the federation graph computation method described in any embodiment of the present invention.

[0034] Thirdly, embodiments of the present invention also provide a federated graph computing apparatus, applied to federated nodes in a federated graph computing system, wherein the federated graph computing system includes at least two federated nodes, and the apparatus includes:

[0035] The graph data loading module is used to load graph data for the current federation node. The graph data includes vertices and edges, and vertices with relationships are connected by edges.

[0036] The message processing module is used for the current federated node to receive messages from active vertices in the previous hyperstep, and to process the messages from the previous hyperstep based on a preset processing function. Based on the processing result, the vertex state of the corresponding active vertex in the current hyperstep is updated. The active vertex in the previous hyperstep and the corresponding active vertex in the current hyperstep are associated.

[0037] The message sending module is used by the current federation node to send a message to the associated federation node to which the vertex corresponding to the outgoing edge belongs, based on the outgoing edge of the active vertex in the current superstep in the graph data.

[0038] The iteration stopping module is used to complete the iterative calculation process if the current overstep meets the stopping condition.

[0039] Fourthly, embodiments of the present invention also provide a configuration apparatus for federated graph computation, the apparatus comprising:

[0040] The acquisition module is used to acquire a calculation rule template and a configuration file, wherein the preset processing function field in the calculation rule template is empty; and the configuration file includes a preset processing function.

[0041] The calculation rule template update module is used to update the calculation rule template based on the configuration file to obtain graph calculation rules, and configure them on each federation node. The graph calculation rules are applied in the current scenario to execute the federation graph calculation method described in any embodiment of the present invention.

[0042] Fifthly, embodiments of the present invention also provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the federated graph calculation method and / or the configuration method for federated graph calculation as described in any embodiment of the present invention.

[0043] In a sixth aspect, embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the federated graph computation method and / or the configuration method for federated graph computation as described in any embodiment of the present invention.

[0044] In a seventh aspect, embodiments of the present invention also provide a computer program product, including a computer program that, when executed by a processor, implements the federated graph computation method and / or the configuration method for federated graph computation as described in any embodiment of the present invention.

[0045] In this embodiment of the invention, by combining federated learning with graph computation, graph computation is performed under a federated learning architecture, which solves the problem of low efficiency of graph computation when applied to federated learning. Under the federated learning architecture, the graph data formed by each federated node is the same, eliminating the need for graph data aggregation and improving the efficiency of graph computation under the federated learning architecture. At the same time, each federated node in the federated graph computation system encrypts messages before sending them, avoiding data leakage and strengthening data protection. Attached Figure Description

[0046] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0047] Figure 1 A flowchart of a federation graph calculation method provided in an embodiment of the present invention;

[0048] Figure 2 A relational diagram of federated nodes is provided for an embodiment of the present invention;

[0049] Figure 3 A flowchart illustrating a configuration method for federated graph computation provided in an embodiment of the present invention;

[0050] Figure 4 This is a schematic diagram of the structure of a federated graph computing device provided in an embodiment of the present invention;

[0051] Figure 5 This is a schematic diagram of the configuration device for federated graph computation provided in an embodiment of the present invention;

[0052] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0053] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention, and not all of the structures.

[0054] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this invention, terms such as "first," "second," etc., are used only for distinguishing descriptions and should not be construed as indicating or implying relative importance. The acquisition, storage, use, and processing of data in the technical solutions of this application all comply with the relevant provisions of national laws and regulations.

[0055] Figure 1 This is a flowchart illustrating a federated graph computation method provided in an embodiment of the present invention. This embodiment is applicable to situations where graph computation is applied to federated learning. The method can be executed by a federated graph computation device, which can be implemented in hardware and / or software and can be configured in the electronic device provided in this embodiment. The method is applied to federated nodes in a federated graph computation system, which includes at least two federated nodes, such as... Figure 1 As shown, the method includes:

[0056] S110. The current federated node loads graph data, wherein the graph data includes vertices and edges, and vertices with related relationships are connected by edges.

[0057] S120. The current federated node receives the message of the active vertex in the previous superstep, processes the message of the previous superstep based on a preset processing function, and updates the vertex state of the corresponding active vertex in the current superstep based on the processing result. The active vertex in the previous superstep and the corresponding active vertex in the current superstep are associated.

[0058] S130. The current federation node sends a message to the associated federation node to which the vertex corresponding to the outgoing edge belongs, based on the outgoing edge of the active vertex in the current superstep in the graph data.

[0059] S140. If the current overstep meets the stopping condition, complete the iterative calculation process.

[0060] In this embodiment, the federated graph computing system includes at least two federated nodes. Each federated node can be an electronic device or a set of electronic devices from different data providers. That is, each federated node stores graph data. The type of graph data stored by the federated nodes is not limited, nor is the type of data provider limited. Information can be transmitted between the federated nodes, for example, through communication connections. By transmitting information between multiple federated nodes in the federated graph computing system and processing the information based on local data at each federated node, data processing can be achieved across multiple federated nodes without the need to aggregate or transmit data from each node, thus ensuring data security. A federated node is a graph data provider in the federated graph computing system. The type of federated node varies depending on the data processing scenario. For example, in the field of financial risk control, each financial institution can be a graph data provider; correspondingly, each financial institution in the federated graph computing system is a federated node.

[0061] In this system, the current federated node can be any federated node in the federated graph computing system. When federated computing starts, each federated node loads its local graph data; that is, it loads local graph data for the current federated node. It should be noted that each federated node can store different types of graph data. Accordingly, depending on the computing task or application scenario of the federated computing, each federated node can read the required type of graph data. For example, for financial institutions, graph data may include, but is not limited to, account graph data containing financial transactions, fund flow graph data, etc.

[0062] In this embodiment, the graph data includes vertices and edges, where vertices with relationships are connected by edges. Specifically, graph data refers to data that can be described by a graph. A graph is an abstract data structure that represents the relationships between objects. Vertices represent objects, and edges represent the relationships between objects. A graph is constructed with objects as vertices and the relationships between objects as edges. In different application scenarios, the objects that serve as vertices and the relationships between objects differ. For example, in the friend recommendation scenario of a communication software, users of the communication software are the objects, and the relationships between users are the edges that form the graph. The relationships between users can be friends, relatives, etc. Correspondingly, users of the communication software are vertices, and users with relationships such as friends or relatives are connected by edges. Vertices and edges form the graph.

[0063] During the federated computation process, steps S120 and S130 are executed iteratively, with each iteration completing the processing of one superstep. The federated node performing computation in each superstep can be one or more federated nodes in the federated graph computation system. In each iteration, the current federated node can be the federated node that is currently processing data in the current superstep, i.e., the federated node to which the corresponding vertex belongs.

[0064] An active vertex is a vertex whose state is updated in each superstep. The active vertices of the previous superstep are those whose state was updated in that superstep, and the corresponding active vertices in the current superstep are those whose state is updated in the current superstep. There is a relationship between active vertices corresponding to adjacent supersteps; that is, active vertices of adjacent supersteps are connected by edges. The relationship between an active vertex of the previous superstep and its corresponding active vertex in the current superstep can be one-to-one, many-to-one, or one-to-many, etc., and is not limited thereto; it is determined based on the connectivity relationships between vertices in the graph data.

[0065] In each iteration, after receiving a message from an active vertex in the previous superstep, the active vertex in the current federation node reads the message from the previous superstep and performs the corresponding processing operation. Based on the processing result, it updates the vertex state of the active vertex corresponding to the current superstep. The preset processing function is pre-set according to the needs of the computation task or computation scenario and is not limited here. The current federation node sends a message along the outgoing edge of the active vertex in the current superstep to the associated federation node to which the vertex corresponding to the outgoing edge belongs. The federation node to which the vertex corresponding to the outgoing edge belongs is the federation node corresponding to the next superstep. In the next superstep, the active vertex corresponding to the federation node of the next superstep receives the message sent along the outgoing edge of the current superstep. In the above iteration process, if the current superstep meets the stopping condition, the iterative calculation process is completed; otherwise, the above iterative calculation process continues.

[0066] It should be noted that when the current superstep is 0, all vertices in the current federated node are active vertices. An initial message is defined for all vertices, and an initial preset processing function is also defined. The initial message and the initial preset processing function are set by those skilled in the art based on experience and requirements, and are not limited here.

[0067] Based on the above embodiments, optionally, after the current federation node loads graph data, if any vertex on either side of the graph data of the current federation node is a remote vertex, a state routing table is created between the current federation node and the associated federation node to which the remote vertex belongs; correspondingly, sending a message to the associated federation node to which the vertex corresponding to the outgoing edge belongs includes: if the endpoint vertex of the outgoing edge of the active vertex in the current superstep is a remote vertex, sending a message to the associated federation node to which the vertex corresponding to the outgoing edge belongs based on the state routing table.

[0068] Figure 2This invention provides an association graph of federated nodes. In this embodiment, the current federated node traverses the edges in the graph data to distinguish the vertex types of the vertices at both ends of the edge. The vertex types include local vertices and remote vertices. Local vertices are those whose federated node is the current federated node, while remote vertices are those that are not local vertices, i.e., those whose federated node is different from the current federated node. For example, as shown... Figure 2 As shown, taking federated node X as the current federated node, we traverse the edges of federated node X. In edge (A,E), vertex A is a local vertex, while vertex E belongs to federated node Y and is a non-local vertex, i.e., a remote vertex. In edge (B,C), vertices B and C are both local vertices. Similarly, in edge (A,C), vertices A and C are both local vertices.

[0069] In this context, an associated federation node refers to a federation node to which a remote node belongs. Vertices in the current federation node are associated with vertices in the associated federation node; that is, a vertex in the associated federation node is a remote vertex of the current federation node. For example, if... Figure 2 If the federated node X is the current federated node, then the federated node Y to which the remote vertex E belongs is the associated federated node. In this embodiment, when any vertex on any edge in the graph data of the current federated node is a remote vertex, a state routing table is established between the current federated node and the associated federated nodes to which the remote vertex belongs. For example, as shown... Figure 2 As shown, given that vertex E in edge (A,E) of federated node X is a remote vertex, and satisfying the condition that any vertex on any edge of the current federated node's graph data is a remote vertex, a state routing table is established between federated node X and federated node Y. Accordingly, in this embodiment, when the endpoint vertex of the outgoing edge of an active vertex in the current superstep is a remote vertex, the current federated node sends a message to the associated federated node to which the endpoint vertex belongs based on the state routing table created by the current federated node and the federated node corresponding to the endpoint vertex. For example, as... Figure 2 As shown, with vertex A as the active vertex in the current superstep, the outgoing edges of active vertex A include edge (A,E) and edge (A,C), and the corresponding destination vertices are vertex E and vertex C. It is known that vertex E is a remote vertex. If the condition that the destination vertex of the outgoing edge of the active vertex in the current superstep is a remote vertex is satisfied, then federation node X sends a message to federation node Y according to the state routing table established with federation node Y.

[0070] In some embodiments, the message is sent to the endpoint vertex corresponding to the outgoing edge via multiple edges, and the route of the message from the current federation node to the associated federation node to which the endpoint vertex belongs is planned through a state routing table.

[0071] Based on the above embodiments, optionally, the step of creating the state routing table of the current federated node and associated federated nodes includes: determining the vertex intersection based on the remote vertex and each associated federated node, and forming the state routing table based on the vertex intersection.

[0072] In this embodiment, the edges in the current federated node graph data are traversed to determine the remote vertices. The intersection of the remote vertices with each associated federated node is obtained, and the vertex intersection is used as a state routing table. The current federated node sends a message to the associated federated node corresponding to the remote vertex along the outgoing edge of the vertex in the current superstep according to the state routing table. When the current federated node needs information from the associated federated node corresponding to the remote vertex, the associated federated node corresponding to the remote vertex sends a message to the current federated node according to the state routing table.

[0073] Based on the above embodiments, optionally, the message of the previous superstep is processed based on a preset processing function, including: performing aggregation processing on at least one received message based on an aggregation function to obtain an aggregation result; and processing the current state information of the corresponding active vertex in the current superstep and the aggregation result based on a vertex update function to obtain a processing result.

[0074] In this embodiment, after receiving the message sent in the previous superstep, the received message is aggregated using an aggregation function to obtain an aggregation result; the current state information of active vertices in the current superstep is updated using a vertex update function to obtain updated state information; and the aggregation result is further processed using the vertex update function to obtain a message reception summary table. In this embodiment, before sending a message, the previous superstep performs local aggregation of the message to be sent using an aggregation function to reduce global communication volume and improve message sending efficiency.

[0075] Based on the above embodiments, optionally, the aggregation function includes one or more of the following: a comparison function, an algebraic operation function, and a logical operation function; the vertex update function includes one or more of the following: a comparison function, an algebraic operation function, and a logical operation function.

[0076] In this embodiment, the aggregation function can be one or more of the following: comparison function, algebraic operation function, and logical operation function; similarly, the vertex update function can be one or more of the following: comparison function, algebraic operation function, and logical operation function; algebraic operation functions include, but are not limited to, exponential functions, logarithmic functions, and addition functions; logical operation functions include, but are not limited to, AND functions and OR functions.

[0077] Based on the above embodiments, optionally, before the current federation node sends a message to the associated federation node to which the vertex corresponding to the outgoing edge belongs based on the outgoing edge of the active vertex in the current superstep in the graph data, the method further includes: generating triplet data based on the outgoing edge of the active vertex in the current superstep in the graph data, and the starting vertex and ending vertex corresponding to the outgoing edge, and generating a message to be sent based on the triplet data; correspondingly, sending the message to the associated federation node to which the vertex corresponding to the outgoing edge belongs includes: sending the message to be sent to the associated federation node to which the vertex corresponding to the outgoing edge belongs.

[0078] In this embodiment, the starting vertex refers to the active vertex in the current superstep, and the ending vertex refers to the vertex corresponding to the outgoing edge of the active vertex in the current superstep. The information of the active vertex in the current superstep is used as the starting vertex information, the outgoing edge information of the active vertex is used as the outgoing edge information, and the information of the vertex corresponding to the outgoing edge of the active vertex is used as the ending vertex information to form a triplet. Based on the triplet data and the sending function, a message to be sent is generated. The current federation node, based on the state routing table, sends the message to be sent along the outgoing edge of the active vertex in the current superstep to the associated federation node to which the outgoing edge corresponds. The starting vertex information, outgoing edge information, and ending vertex information in the triplet data are related to the specific computation task, and all information values ​​can be empty. The message to be sent refers to the message sent to the associated federation node to which the outgoing edge corresponds.

[0079] Based on the above embodiments, optionally, at least two federation nodes in the federated graph computing system include a task initiating node; after the current federation node sends a message to the associated federation node to which the vertex corresponding to the outgoing edge belongs based on the outgoing edge of the target vertex in the graph data, the method further includes: sending information and statistical information to the task initiating node so that the task initiating node can count the number of iterations and / or determine the current information sending amount, and determine whether the current overstep meets the stopping condition.

[0080] In this context, the task initiating node refers to the federated node that initiates the current task. Any federated node in the federated graph computing system can act as a task initiating node, and all federated nodes are equal. When a federated node initiates a task, that node acts as the task initiating node, while the other federated nodes only act as graph data providers. In this embodiment, after step S130, the sent messages are aggregated using an aggregation function to obtain information sending statistics. These statistics are then sent to the task initiating node so that it can count the number of iterations and / or determine the current information sending volume. Based on the current superstep iteration count and / or the current information sending volume, it can determine whether the current superstep meets the stopping condition. The current information sending volume refers to the information sending volume of the current superstep.

[0081] Based on the above embodiments, optionally, the stopping conditions include the number of iterations reaching a preset iteration threshold, or the current information transmission volume being zero.

[0082] In this embodiment, the stopping condition is determined based on the number of iterations of the current superstep and / or the amount of information sent in the current step. When the number of iterations of the current superstep reaches a preset iteration threshold, the iteration stops and the iterative calculation process is completed; or, when the amount of information sent in the current step is zero, the iteration stops and the iterative calculation process is completed.

[0083] Based on the above embodiments, optionally, the messages between vertices are encrypted messages.

[0084] In this embodiment, before sending messages between vertices, the federated nodes encrypt the messages. The messages sent between vertices are encrypted messages. Optionally, the encryption of messages can be achieved through secure multi-party computation (MPC) or through obfuscated circuits. No limitation is made here.

[0085] The technical solution of this embodiment combines federated learning with graph computation to achieve graph computation under the federated learning architecture, which solves the problem of low efficiency of graph computation when applied to federated learning. Under the federated learning architecture, the graph data formed by each federated node is the same, and there is no need to aggregate the graph data, which improves the efficiency of graph computation under the federated learning architecture. At the same time, each federated node in the federated graph computation system encrypts the message before sending it, avoiding the problem of data leakage and strengthening the protection of the data.

[0086] Based on the above embodiments, optionally, the computational task of the federated graph computation system is to determine the single-source shortest path; the graph data includes multiple objects and the relationships between them, the message of the active vertex in the previous superstep includes the shortest distance between the active vertex in the previous superstep and the source object, and the vertex state of the corresponding active vertex in the current superstep includes the shortest distance between the corresponding active vertex in the current superstep and the source object.

[0087] In this embodiment, determining the single-source shortest path is the computational task of the federated graph computing system. Graph data is loaded at the federated nodes of the federated graph computing system, with objects as vertices and the relationships between objects as edges. The source object is determined from the loaded objects. The current federated node receives the shortest distance between the active vertex and the source object in the previous superstep. Based on a preset processing function, the shortest distance between the active vertex and the source object in the previous superstep, and the distance between the active vertex in the previous superstep and the active vertex in the current superstep, the distance between the current superstep active vertex and the source object is calculated. The calculated distance between the current superstep active vertex and the source object is then compared with the distance between the corresponding active vertex in the current superstep. The vertex states of vertices are compared. When the calculated distance between the active vertex in the current superstep and the source object is less than the vertex state of the corresponding active vertex in the current superstep, the vertex state of the corresponding active vertex in the current superstep is updated with the calculated distance between the active vertex in the current superstep and the source object. The current federation node sends the shortest distance between the active vertex in the current superstep and the source object to the vertex corresponding to the outgoing edge of the active vertex in the current superstep. When the information transmission volume in the current superstep is zero, the iteration stops, and the iterative calculation process is completed. The vertex state of each object's corresponding vertex is the shortest distance between that object and the source object. Specifically, the shortest distance between the active vertex in the 0th superstep and the source object is defined as zero, and a preset processing function is initialized. Optionally, the preset processing function can be an addition function in algebraic functions, used to calculate the sum of the shortest distance between the active vertex in the previous superstep and the source object and the distance between the active vertex in the previous superstep and the active vertex in the current superstep, to obtain the distance between the active vertex in the current superstep and the source object.

[0088] Figure 3 This is a flowchart illustrating a configuration method for federated graph computation according to an embodiment of the present invention. This embodiment is an application of the federated graph computation method described in the above embodiments, and the method is applicable to arbitrary graph computation application scenarios. Figure 3 As shown, the method includes:

[0089] S210. Obtain the calculation rule template and configuration file, wherein the preset processing function field in the calculation rule template is empty; the configuration file includes the preset processing function.

[0090] S220. The calculation rule template is updated based on the configuration file to obtain graph calculation rules, which are then configured on each federation node. The graph calculation rules are applied in the current scenario to execute the federation graph calculation method provided in any embodiment of the present invention.

[0091] The computation rule template refers to the template for generating graph computation rules. The preset processing function field in the computation rule template is empty. Based on the current application scenario, a configuration file corresponding to the current application scenario is set. The configuration file includes preset processing functions for updating the computation rule template. The preset processing functions are added to the preset processing function field of the computation rule template to obtain the graph computation rules corresponding to the current application scenario.

[0092] The configuration file refers to the preset processing functions obtained based on the current scenario. These preset processing functions are configured in the preset processing function field of the calculation rule template. These preset processing functions include, but are not limited to, aggregation functions for aggregating at least one message, vertex update functions for updating the state of active vertices, and sending functions for generating messages to be sent based on triplet data. It should be noted that the above functions can differ for different vertices and can be preset through the configuration file.

[0093] In this embodiment, a computation rule template and a configuration file are obtained respectively. The preset processing function in the configuration file is added to the preset processing function field in the computation rule module. The computation rule template is updated to obtain the graph computation rule. The graph computation rule is configured in the federated node of the federated graph computation system corresponding to the current application scenario. The computation task initiated by any task initiating node is processed based on the graph computation rule.

[0094] The technical solution in this embodiment, by setting a computation rule template as a federated graph computation framework, allows for the generation of federated graph computation rules for different computation tasks or scenarios through configuration files. This improves the reusability of the federated graph computation framework and simplifies the generation process of federated graph computation rules. Configuring corresponding preprocessing functions in the computation rule template generates graph computation rules applicable to the current scenario, simplifying the application of federated graph computation in real-world scenarios. Only the preprocessing functions need to be updated to obtain graph computation rules adapted to the current scenario, thus improving the efficiency of federated graph computation development.

[0095] Figure 4 This is a schematic diagram of a federated graph computing device provided in an embodiment of the present invention. The device is applied to federated nodes in a federated graph computing system, which includes at least two federated nodes, such as... Figure 4 As shown, the device includes:

[0096] The graph data loading module 310 is used to load graph data for the current federation node, wherein the graph data includes vertices and edges, and vertices with relationships are connected by edges;

[0097] The message processing module 320 is used by the current federated node to receive messages from active vertices in the previous hyperstep, process the messages from the previous hyperstep based on a preset processing function, and update the vertex state of the corresponding active vertex in the current hyperstep based on the processing result. The active vertex in the previous hyperstep is associated with the corresponding active vertex in the current hyperstep.

[0098] The message sending module 330 is used by the current federation node to send a message to the associated federation node to which the vertex corresponding to the outgoing edge belongs, based on the outgoing edge of the active vertex in the current superstep in the graph data.

[0099] The iteration stopping module 340 is used to complete the iterative calculation process when the current overstep meets the stopping condition.

[0100] Optionally, the device further includes: a state routing table creation module for creating a state routing table between the current federation node and the associated federation node to which the remote vertex belongs, when any vertex on either side of the graph data of the current federation node is a remote vertex; correspondingly, the message sending module 330 is also used to send a message to the associated federation node to which the vertex corresponding to the outgoing edge belongs, based on the state routing table, when the endpoint vertex of the outgoing edge of the active vertex in the current superstep is a remote vertex.

[0101] Optionally, the state routing table creation module is also used to determine the vertex intersection based on the remote vertex and each associated federation node, and to form a state routing table based on the vertex intersection.

[0102] Optionally, the message processing module 320 is further configured to perform aggregation processing on at least one received message based on an aggregation function to obtain an aggregation result; and to process the current state information of the corresponding active vertex in the current superstep and the aggregation result based on a vertex update function to obtain a processing result.

[0103] Optionally, the aggregation function includes one or more of the following: alignment function, algebraic operation function, and logical operation function; the vertex update function includes one or more of the following: alignment function, algebraic operation function, and logical operation function.

[0104] Optionally, before the current federation node sends a message to the associated federation node to which the vertex corresponding to the outgoing edge belongs based on the outgoing edge of the active vertex in the current superstep in the graph data, the device further includes: a message to be sent generation module for generating triplet data based on the outgoing edge of the active vertex in the current superstep in the graph data, and the starting vertex and ending vertex corresponding to the outgoing edge, and generating a message to be sent based on the triplet data; correspondingly, the message sending module 330 is also used to send the message to be sent to the associated federation node to which the vertex corresponding to the outgoing edge belongs.

[0105] Optionally, at least two federation nodes in the federated graph computing system include a task initiating node; after the current federation node sends a message to the associated federation node to which the vertex corresponding to the outgoing edge belongs based on the outgoing edge of the target vertex in the graph data, the device further includes: a statistics information sending module for sending statistics information to the task initiating node so that the task initiating node can count the number of iterations and / or determine the current information sending amount, and determine whether the current overstep meets the stopping condition.

[0106] Optionally, the stopping conditions include the number of iterations reaching a preset iteration threshold, or the amount of information sent in the current iteration being zero.

[0107] Optionally, messages between vertices are encrypted.

[0108] Optionally, the computational task of the federated graph computation system is to determine the single-source shortest path; the graph data includes multiple objects and the relationships between them, the message of the active vertex in the previous superstep includes the shortest distance between the active vertex in the previous superstep and the source object, and the vertex state of the corresponding active vertex in the current superstep includes the shortest distance between the corresponding active vertex in the current superstep and the source object.

[0109] The federated graph computing device provided in the embodiments of the present invention can execute the federated graph computing method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the method.

[0110] Figure 5 This is a schematic diagram of a configuration device for federated graph calculation provided in an embodiment of the present invention. Figure 5 As shown, the device includes:

[0111] The acquisition module 410 is used to acquire a calculation rule template and a configuration file, wherein the preset processing function field in the calculation rule template is empty; and the configuration file includes a preset processing function.

[0112] The calculation rule template update module 420 is used to update the calculation rule template based on the configuration file to obtain graph calculation rules, and configure them on each federation node. The graph calculation rules are applied in the current scenario to execute the federation graph calculation method provided in any embodiment of the present invention.

[0113] The configuration apparatus for federated graph computation provided in this embodiment of the invention can execute the configuration method for federated graph computation provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0114] Figure 6This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0115] like Figure 6 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0116] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0117] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as federated graph computing methods and / or configuration methods for federated graph computing.

[0118] In some embodiments, the federated graph computation method and / or the configuration method for federated graph computation may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the federated graph computation method and / or the configuration method for federated graph computation described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the federated graph computation method and / or the configuration method for federated graph computation by any other suitable means (e.g., by means of firmware).

[0119] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0120] Computer programs for implementing the federated graph computation method and / or the configuration method for federated graph computation of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The computer programs may be executed entirely on the machine, partially on the machine, as a standalone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0121] This invention also provides a computer-readable storage medium storing computer instructions for causing a processor to execute a federated graph computation method applied to federated nodes in a federated graph computation system, wherein the federated graph computation system includes at least two federated nodes, and the method includes:

[0122] The current federation node loads graph data, which includes vertices and edges, with related vertices connected by edges. The current federation node receives messages from active vertices in the previous superstep and processes these messages using a preset processing function. Based on the processing result, it updates the vertex state of the corresponding active vertex in the current superstep. The active vertices in the previous superstep and the corresponding active vertices in the current superstep are related. The current federation node sends messages to the associated federation nodes of the vertices corresponding to the outgoing edges of the active vertices in the current superstep, based on the outgoing edges from the active vertices in the graph data. The iterative calculation process is completed if the current superstep meets the stopping condition.

[0123] And / or, perform a configuration method for federated graph computation, the method comprising:

[0124] Obtain the computation rule template and configuration file, wherein the preset processing function field in the computation rule template is empty; the configuration file includes the preset processing function; update the computation rule template based on the configuration file to obtain the graph computation rules, and configure them in each federation node. The graph computation rules are used to execute any federation graph computation method in the embodiments of the present invention.

[0125] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0126] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0127] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0128] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0129] This invention also provides a computer program product, including a computer program that, when executed by a processor, implements the federated graph computation method and / or the configuration method for federated graph computation as provided in any embodiment of this invention.

[0130] In implementing the computer program product, computer program code for performing the operations of this invention can be written in one or more programming languages ​​or a combination thereof. Programming languages ​​include object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0131] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.

Claims

1. A method for calculating federated graphs, characterized in that, The method, applied to federated nodes in a federated graph computation system, wherein the federated graph computation system includes at least two federated nodes, comprises: The current federated node loads graph data, which includes vertices and edges, with vertices having relationships connected by edges; The current federated node receives the message of the active vertex in the previous superstep, processes the message of the previous superstep based on a preset processing function, and updates the vertex state of the corresponding active vertex in the current superstep based on the processing result. The active vertex in the previous superstep and the corresponding active vertex in the current superstep are associated. The current federation node sends a message to the associated federation node to which the vertex corresponding to the outgoing edge belongs, based on the outgoing edge of the active vertex in the current superstep in the graph data. The iterative calculation process is completed when the current overstep meets the stopping condition.

2. The method according to claim 1, characterized in that, The method further includes: If any vertex on either side of the graph data of the current federation node is a remote vertex, create a state routing table between the current federation node and the associated federation node to which the remote vertex belongs; Accordingly, sending a message to the associated federation node to which the vertex corresponding to the outgoing edge belongs includes: If the endpoint vertex of the outgoing edge of an active vertex in the current superstep is a remote vertex, a message is sent to the associated federation node to which the vertex corresponding to the outgoing edge belongs based on the state routing table.

3. The method according to claim 2, characterized in that, The creation of the state routing table for the current federated node and associated federated nodes includes: The intersection of the vertices is determined based on the remote vertices and each associated federation node, and a state routing table is formed based on the intersection of the vertices.

4. The method according to claim 1, characterized in that, The message from the previous superstep is processed based on a preset processing function, including: At least one received message is aggregated using an aggregation function to obtain the aggregation result. The current state information of the corresponding active vertex in the current superstep and the aggregation result are processed based on the vertex update function to obtain the processing result.

5. The method according to claim 4, characterized in that, The aggregation function includes one or more of the following: comparison function, algebraic operation function, and logical operation function; The vertex update function includes one or more of the following: comparison function, algebraic operation function, and logical operation function.

6. The method according to claim 1, characterized in that, Before the current federation node sends a message to the associated federation node of the vertex corresponding to the outgoing edge based on the outgoing edge of the active vertex in the current superstep in the graph data, the method further includes: Based on the outgoing edges of the active vertices in the current superstep in the graph data, and the starting and ending vertices corresponding to the outgoing edges, triplet data is generated, and a message to be sent is generated based on the triplet data. Accordingly, a message is sent to the associated federation node to which the vertex corresponding to the outgoing edge belongs, including: The message to be sent is sent to the associated federation node to which the vertex corresponding to the outgoing edge belongs.

7. The method according to claim 1, characterized in that, At least two federation nodes in the federated graph computing system include a task initiation node; After the current federation node sends a message to the associated federation node of the vertex corresponding to the outgoing edge based on the outgoing edge of the target vertex in the graph data, the method further includes: Send statistical information to the task initiating node so that the task initiating node can count the number of iterations and / or determine the amount of information sent in the current iteration, and determine whether the current overstep meets the stopping condition.

8. The method according to claim 7, characterized in that, The stopping conditions include the number of iterations reaching a preset iteration threshold, or the amount of information sent in the current iteration being zero.

9. The method according to any one of claims 1-8, characterized in that, The messages between the vertices are encrypted.

10. The method according to any one of claims 1-8, characterized in that, The computational task of the federated graph computing system is to determine the single-source shortest path; the graph data includes multiple objects and the relationships between them; the message of the active vertex in the previous superstep includes the shortest distance between the active vertex in the previous superstep and the source object; the vertex state of the corresponding active vertex in the current superstep includes the shortest distance between the corresponding active vertex in the current superstep and the source object.

11. A configuration method for federated graph computation, characterized in that, include: Obtain a calculation rule template and a configuration file, wherein the preset processing function field in the calculation rule template is empty; and the configuration file includes the preset processing function. The computation rule template is updated based on the configuration file to obtain graph computation rules, which are then configured on each federation node. The graph computation rules are applied in the current scenario to execute the federation graph computation method as described in any one of claims 1-10.

12. A federated graph computing device, characterized in that, A device for use in federated nodes in a federated graph computation system, wherein the federated graph computation system includes at least two federated nodes, the device comprising: The graph data loading module is used to load graph data for the current federation node. The graph data includes vertices and edges, and vertices with relationships are connected by edges. The message processing module is used for the current federated node to receive messages from active vertices in the previous hyperstep, and to process the messages from the previous hyperstep based on a preset processing function. Based on the processing result, the vertex state of the corresponding active vertex in the current hyperstep is updated. The active vertex in the previous hyperstep and the corresponding active vertex in the current hyperstep are associated. The message sending module is used by the current federation node to send a message to the associated federation node to which the vertex corresponding to the outgoing edge belongs, based on the outgoing edge of the active vertex in the current superstep in the graph data. The iteration stopping module is used to complete the iterative calculation process if the current overstep meets the stopping condition.

13. A configuration apparatus for federated graph computation, characterized in that, include: The acquisition module is used to acquire a calculation rule template and a configuration file, wherein the preset processing function field in the calculation rule template is empty; and the configuration file includes a preset processing function. The calculation rule template update module is used to update the calculation rule template based on the configuration file to obtain graph calculation rules, and configure them on each federation node. The graph calculation rules are applied in the current scenario to execute the federation graph calculation method as described in any one of claims 1-10.

14. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the federated graph computation method of any one of claims 1-10 and / or the configuration method for federated graph computation of claim 11.

15. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the federated graph computation method of any one of claims 1-10 and / or the configuration method for federated graph computation of claim 11.

16. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the federated graph computation method according to any one of claims 1-10 and / or the configuration method for federated graph computation according to claim 11.

Citation Information

Patent Citations

  • Federal learning method and system based on graph calculation

    CN114444659A

  • Graph federation method and system based on confusion technology

    CN114692209A