A method for estimating the sum of graph neighborhood edge information and related products

By introducing the parameter server, the single-point bottleneck and resource consumption problems of the Spark platform graph neighborhood edge information and estimation scheme are solved, and the performance of ultra-large-scale graph data processing is improved.

CN114661471BActive Publication Date: 2024-08-30TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210318668.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-29
Publication Date
2024-08-30
Estimated Expiration
2042-03-29

AI Technical Summary

Technical Problem

Existing graph neighborhood edge information sum estimation solutions based on the Spark platform have problems such as single-point network bottlenecks, high resource consumption, and high network overhead, making it difficult to effectively process very large-scale graph data.

Method used

By introducing the parameter server, the driver, executor and parameter server interact, and the parameter server is used for distributed storage and parallel update of the counter matrix to avoid single-point bottlenecks and resource waste on the Spark platform and reduce network overhead.

Benefits of technology

It improves graph data processing performance, reduces resource consumption and network overhead, and can effectively process ultra-large-scale graph data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114661471B
    Figure CN114661471B
Patent Text Reader

Abstract

The present application discloses a method for estimating graph neighborhood edge information and related products, which can be applied to various scenarios such as cloud technology, artificial intelligence, smart transportation, and assisted driving. In the method, the executor obtains the first-order update message counter of the target node according to the edge formed by the target node in the target graph and pushes it up to the parameter server to initialize the first-order counter of the target node; the parameter server contains a counter matrix of the target graph created according to the application of the driver; the counter matrix stores multi-order counters of each node of the target graph; the executor pulls the i-1-order counter of the same-edge source node of the target node from the parameter server, obtains the i-order update message counter of the target node according to the i-1-order counter and pushes it up to the parameter server, so as to obtain the i-order counter according to the i-order update message counter and i-1-order counter of the target node, and iterates until the r-order counter is obtained. The processing performance is improved by introducing the parameter server.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a method for estimating graph neighborhood edge information and related products. Background Art

[0002] At present, the scheme for estimating the sum of the neighborhood edge information of nodes in the graph is usually implemented purely based on the Spark platform. However, this scheme for estimating the sum of the neighborhood edge information of the graph based purely on the Spark platform has many problems: first, it is easy to encounter the single-point network bottleneck of the Spark platform driver, which limits the data processing performance; second, during the data processing process, since the RDD (Resilient Distributed Dataset) created by the Spark platform is immutable, it is necessary to create and store new RDDs (Resilient Distributed Datasets) for iteration, which consumes a lot of resources; third, when the data processing process involves ultra-large-scale graph data at the level of tens of billions or hundreds of billions, it will generate huge network overhead, affecting the data processing performance.

[0003] It can be seen that the current technology of estimating graph neighborhood edge information based solely on the Spark platform has many problems, which leads to poor data processing performance of the Spark platform and makes it difficult to cope with ultra-large-scale graph data. Summary of the invention

[0004] The embodiments of the present application provide a method for estimating the sum of graph neighborhood edge information and related products to solve the problem that the estimation solution of the sum of graph neighborhood edge information based solely on the Spark platform is difficult to cope with the situation of ultra-large-scale graph data.

[0005] The embodiments of the present application disclose the following technical solutions:

[0006] In a first aspect, an embodiment of the present application provides a method for estimating graph neighborhood edge information and , including:

[0007] The executor obtains the first-order update message counter of the target node according to the edge formed by the target node in the target graph, and pushes the first-order update message counter to the parameter server, so that the parameter server initializes the first-order counter of the target node in the counter matrix; the parameter server contains the counter matrix of the target graph created according to the application of the driver; the counter matrix stores the 0 to r order counters of each node in the target graph, which are respectively used to store the edge information encoding array of the corresponding order neighborhood edge set of the corresponding node and the estimated value of the side information sum of the corresponding order neighborhood edge set; r is the target estimation order, r≥2;

[0008] The executor pulls the i-1 order counter of the same edge source node of the target node from the parameter server, and obtains the i-th order update message counter of the target node according to the i-1 order counter of the same edge source node of the target node; 2≤i≤r;

[0009] The executor pushes the i-th order update message counter of the target node to the parameter server, so that the parameter server updates the i-1-th order counter of the target node in the counter matrix according to the i-th order update message counter of the target node and the i-1-th order counter of the target node to obtain the i-th order counter, and iterates until the update of the r-1-th order counter of the target node is completed to obtain the r-th order counter.

[0010] In a second aspect, an embodiment of the present application provides another method for estimating the sum of graph neighborhood edge information, wherein the target estimation order is 1, and the method comprises:

[0011] The driver sends a request to the parameter server so that the parameter server creates a counter matrix of the target graph; the counter matrix stores the 0th order counter and the 1st order counter of each node in the target graph, which are respectively used to store the side information encoding array of the corresponding order neighborhood edge set of the corresponding node and the estimated value of the side information sum of the corresponding order neighborhood edge set;

[0012] The executor obtains the first-order update message counter of the target node according to the edge formed by the target node in the target graph, and pushes the first-order update message counter to the parameter server so that the parameter server initializes the first-order counter of the target node in the counter matrix; the parameter server contains the counter matrix of the target graph created according to the application of the driver; the counter matrix stores the 0-order counter and the 1-order counter of each node in the target graph, which are respectively used to store the edge information encoding array of the corresponding order neighborhood edge set of the corresponding node and the estimated value of the side information sum of the corresponding order neighborhood edge set.

[0013] In a third aspect, an embodiment of the present application provides a graph neighborhood edge information and estimation system, including: a parameter server, a driver and an executor; the driver and the executor communicate with the parameter server respectively;

[0014] The driver is used to send a request to the parameter server;

[0015] The parameter server is used to create a counter matrix of the target graph; the counter matrix stores 0 to r order counters of each node in the target graph, which are respectively used to store the edge information encoding array of the corresponding order neighborhood edge set of the corresponding node and the estimated value of the side information sum of the corresponding order neighborhood edge set; the r is the target estimation order, r≥2; according to the i-th order update message counter of the target node pushed up by the executor and the i-1 order counter of the target node, the i-1 order counter of the target node in the counter matrix is ​​updated to obtain the i-order counter, and the loop is iterated until the update of the r-1 order counter of the target node is completed to obtain the r-order counter;

[0016] The executor is used to initialize the 1st-order counter of the target node in the counter matrix through the parameter server according to the edges formed by the target nodes in the target graph; pull the i-1th-order counter of the same-edge source node of the target node from the parameter server, and obtain the i-th-order update message counter of the target node according to the i-1th-order counter of the same-edge source node of the target node; 2≤i≤r; push the i-th-order update message counter of the target node to the parameter server.

[0017] In a fourth aspect, an embodiment of the present application provides a device for estimating the sum of graph neighborhood edge information, the device comprising a processor and a memory; the memory is used to store program code and transmit the program code to the processor; the processor is used to execute the steps of the method for estimating the sum of graph neighborhood edge information described in the first aspect or the second aspect according to the instructions in the program code.

[0018] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store program code, and the program code is used to execute the steps of the above-mentioned method for estimating the graph neighborhood edge information and .

[0019] In a sixth aspect, an embodiment of the present application provides a computer program product, including a computer program or instructions, which, when executed by a processor, implement the steps of the above-mentioned graph neighborhood edge information and estimation method.

[0020] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:

[0021] In an embodiment of the present application, the driver can use the parameter server to create a counter matrix of the target graph to store the 0 to r order counters of each node in the target graph, and these counters are used to store the edge information encoding array of the corresponding order neighborhood edge set of the corresponding node and the estimated value of the edge information and of the corresponding order neighborhood edge set. In this way, in the first iteration, the executor can obtain the 1st order update message counter of the target node according to the edge formed by the target node in the target graph, and push the 1st order update message counter to the parameter server so that the parameter server initializes the 1st order counter of the target node in the counter matrix. In non-first iterations, the executor can pull the i-1 order counter of the same edge source node of the target node from the parameter server, and obtain the i-th order update message counter of the target node according to the i-1 order counter of the same edge source node of the target node. In addition, the executor can push the i-th order update message counter of the target node to the parameter server, so that the parameter server can update the i-1th order counter of the target node in the counter matrix according to the i-th order update message counter of the target node and the i-1th order counter of the target node to obtain the i-th order counter, and iterate until the update of the r-1th order counter of the target node is completed to obtain the target estimated order (r-th order) counter. After the update, the counter matrix in the parameter server stores the estimated value of the r-th order neighborhood edge set edge information and of the target node. It can be seen that the embodiment of the present application introduces a parameter server to enable the driver, the executor and the parameter server to interact. With the use of the parameter server, the driver can be used only to issue an application to the parameter server without participating in iterative operations. The large-scale counter matrix is ​​distributedly stored on the parameter server, and the matrix can be distributed and updated in parallel, thereby eliminating the single-point network bottleneck of the Spark platform driver, avoiding the creation and storage of new RDDs on the Spark platform during the estimation process of the graph neighborhood edge information and, and can also avoid the huge network overhead generated by the ultra-large-scale data volume, thereby reducing resource consumption and comprehensively improving the processing performance of graph data. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 It is a schematic diagram of a graph neighborhood edge information and estimation system provided by an embodiment of the present application;

[0023] Figure 2 It is a flowchart of a method for estimating graph neighborhood edge information and provided in an embodiment of the present application;

[0024] Figure 3 It is a flowchart of another method for estimating graph neighborhood edge information and provided in an embodiment of the present application;

[0025] Figure 4 It is a schematic diagram of converting an undirected graph into a directed graph provided by an embodiment of the present application;

[0026] Figure 5 It is a flowchart of another method for estimating graph neighborhood edge information and provided in an embodiment of the present application;

[0027] Figure 6 It is a flowchart of another method for estimating graph neighborhood edge information and provided in an embodiment of the present application;

[0028] Figure 7 It is a structural diagram of a server provided in an embodiment of the present application;

[0029] Figure 8 It is a structural diagram of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0030] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0031] As mentioned above, the existing estimation schemes of graph neighborhood edge information and , which are purely based on the Spark platform, have many problems: First, it is easy to encounter the single-point network bottleneck of the Spark platform driver, which limits the data processing performance; second, in the data processing process, since the RDD (Resilient Distributed Dataset) created by the Spark platform is immutable, it is necessary to create and store new RDDs (Resilient Distributed Datasets) for iteration, which consumes a lot of resources; third, when the data processing process involves ultra-large-scale graph data at the level of tens of billions or hundreds of billions, it will generate huge network overhead, affecting the data processing performance.

[0032] Based on the above problems, the embodiments of the present application provide a method for estimating the sum of graph neighborhood edge information and related products. By introducing a parameter server, the driver, executor and parameter server are interacted to avoid using the Spark platform alone for data processing, thereby eliminating the single-point network bottleneck of the Spark platform driver, avoiding the additional creation and storage of new RDDs on the Spark platform during the estimation process of the sum of graph neighborhood edge information, and avoiding the huge network overhead generated by ultra-large-scale data volumes, thereby reducing resource consumption and comprehensively improving the processing performance of graph data. The various non-limiting implementation methods of the embodiments of the present application are described in detail below in conjunction with the embodiments and drawings.

[0033] In the embodiments of the present application, the term "Spark platform" refers to a fast and general computing engine designed specifically for large-scale data processing.

[0034] The term "corresponding order neighborhood edge set" means: Based on the definition of the corresponding order neighborhood vertex set, the corresponding order r (r ≥ 1) neighborhood edge set of node x is defined as ε r (x)={(m,n)|m,n∈N r (x); (m, n) ∈ E; d (m, x) ≠ d (n, x) = r}.

[0035] The term "corresponding order neighbor vertex set" means: in a graph G(V,E), V is a vertex set, E is an edge set, for any two vertices x, y∈V, the shortest path length from x to y is denoted as d(x,y), then the corresponding order r (r≥1) neighbor vertex set of node x is defined as N r (x)={y|y∈V;d(y,x)≤r}, that is: the set of vertices in graph G whose shortest path to node x is no greater than r, including node x itself.

[0036] Figure 1 It is a schematic diagram of a graph neighborhood edge information and estimation system provided in an embodiment of the present application.

[0037] Combination Figure 1 As shown, the graph neighborhood edge information and estimation system provided by the embodiment of the present application may include a driver, an executor, and a parameter server. In an optional implementation, the above system can be implemented by the Spark on Angel platform. The Spark on Angel platform is different from the Spark platform, and a parameter server is introduced in the Spark on Angel platform.

[0038] Specifically, after the driver sends an application to the parameter server, the parameter server can create a counter matrix for storing the counters of each node in the target graph at each iteration, and the above counters are used to store the edge information encoding array of the corresponding order neighborhood edge set of the corresponding node and the estimated value of the edge information and of the corresponding order neighborhood edge set. In addition, the counter can be divided into a read counter and a write counter. In the first iteration, the executor can obtain the first-order update message counter of the target node and push the first-order update message counter to the parameter server so that the parameter server initializes the counter of the target node at this iteration; in non-first iterations, the executor can directly pull the counter of the same-edge source node corresponding to the target node at the previous iteration from the parameter server, and obtain the update message counter of the target node at this iteration based on the counter of the same-edge source node corresponding to the target node at the previous iteration. Then, the update message counter of the target node at this iteration is pushed to the parameter server, and the parameter server can update the counter of the target node at this iteration based on the update message counter of the target node at this iteration and the counter of the target node at the previous iteration. This cycle is repeated until the counter of the target node is updated at the target iteration number. The specific implementation method can be found in the following introduction.

[0039] The technical solution of the present application can be implemented by a server or a terminal device. Among them, taking the parameter server as an example, the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and basic cloud computing services such as big data and artificial intelligence platforms. Terminals include but are not limited to mobile phones, computers, intelligent voice interaction devices, smart home appliances, vehicle terminals, aircraft, etc. The embodiments of the present invention can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, smart transportation, assisted driving, etc. Cloud storage is a new concept extended and developed from the concept of cloud computing. A distributed cloud storage system (hereinafter referred to as a storage system) refers to a storage system that uses cluster applications, grid technology, and distributed storage file systems to bring together a large number of storage devices of various types in the network (storage devices are also called storage nodes) through application software or application interfaces to work together and provide data storage and business access functions to the outside world.

[0040] At present, the storage method of the storage system is: create a logical volume, and when creating a logical volume, allocate physical storage space for each logical volume. The physical storage space may be composed of disks of a storage device or several storage devices. The client stores data on a logical volume, that is, stores the data on the file system. The file system divides the data into many parts, each of which is an object. The object contains not only data but also additional information such as data identification (ID, ID entity). The file system writes each object into the physical storage space of the logical volume, and the file system records the storage location information of each object, so that when the client requests to access the data, the file system can allow the client to access the data according to the storage location information of each object.

[0041] The process of the storage system allocating physical storage space to a logical volume is as follows: based on the estimated capacity of the objects stored in the logical volume (this estimate often has a large margin relative to the actual capacity of the objects to be stored) and the grouping of independent redundant disk arrays (RAID, Redundant Array of Independent Disks), the physical storage space is pre-divided into stripes. A logical volume can be understood as a stripe, thereby allocating physical storage space to the logical volume.

[0042] Figure 2 It is a flowchart of a method for estimating graph neighborhood edge information and provided in an embodiment of the present application.

[0043] Combination Figure 2 As shown, the method for estimating the graph neighborhood edge information and provided in the embodiment of the present application is implemented by the interaction of the driver, the executor and the parameter server as the steps of the execution subject description scheme. The method for estimating the graph neighborhood edge information and may include:

[0044] Step 201: The driver sends a request to the parameter server.

[0045] Step 202: The parameter server creates a counter matrix of the target graph; the counter matrix stores 0 to r order counters of each node in the target graph, which are respectively used to store the edge information encoding array of the corresponding order neighborhood edge set of the corresponding node and the estimated value of the side information sum of the corresponding order neighborhood edge set; r is the target estimation order, r≥2.

[0046] Step 203: The executor obtains the first-order update message counter of the target node according to the edge formed by the target node in the target graph, and pushes the first-order update message counter to the parameter server so that the parameter server initializes the first-order counter of the target node in the counter matrix.

[0047] Step 204: The executor pulls the i-1 order counter of the same edge source node of the target node from the parameter server, and obtains the i-th order update message counter of the target node according to the i-1 order counter of the same edge source node of the target node; 2≤i≤r.

[0048] Step 205: The executor pushes the i-th order update message counter of the target node to the parameter server.

[0049] Step 206: The parameter server updates the i-1-order counter of the target node in the counter matrix according to the i-th order update message counter of the target node and the i-1-order counter of the target node to obtain the i-order counter, and iterates the loop until the update of the r-1-order counter of the target node is completed to obtain the r-order counter.

[0050] Here, in the estimation process, the executor can not only perform relevant operations on the target node, such as initializing the 1st-order counter of the target node, pulling the i-1th-order counter of the target node, obtaining the i-th-order update message counter of the target node, etc., but also perform the above operations on other nodes, so that after loop iterations, the estimation of the side information and of the r-order neighborhood edge set of each node in the target graph is realized. In order to facilitate understanding of the estimation method of the graph neighborhood edge information and for a specific node in the target graph, in the embodiment of the present application, a detailed description is made using the target node as an example. In the embodiment of the present application, the target graph refers to the graph data to which the target node belongs, and its scale can be large or small, and is not limited here.

[0051] The driver sends an application to the parameter server, the purpose of which is to request the parameter server to establish the counter matrix of the target graph. As mentioned above, the created counter matrix stores the 0 to r order counters of each node in the target graph, which are used to store the side information encoding array of the corresponding order neighborhood edge set of the corresponding node and the estimated value of the side information sum of the corresponding order neighborhood edge set. For example, the 1st order counter of the target node stores the side information encoding array of the 1st order neighborhood edge set of the target node and the estimated value of the side information sum of the 1st order neighborhood edge set. Similarly, the 2nd order counter of the target node stores the side information encoding array of the 2nd order neighborhood edge set of the target node and the estimated value of the side information sum of the 2nd order neighborhood edge set. The initial values ​​of the node counters of each order stored in the counter matrix can be empty, and it is necessary to gradually iterate to complete the update and filling of the content therein. Each iteration represents the increase of the order of the node neighborhood edge set. For example, in the first iteration, the update of the node 1st order counter can be realized, and in the second iteration, the update of the node 2nd order counter can be realized, and so on. The number of iterations of different nodes in the counter matrix in the graph can be synchronized. For example, each node in the graph performs the first iteration uniformly, and after the first iteration is completed, the nodes uniformly perform the second iteration.

[0052] Optionally, the driver may send a request to one or more parameter servers. In addition, the number of executors may be more than one. When multiple executors are used, the multiple executors all communicate with the parameter server; the multiple executors are responsible for different parts of the target graph associated with the target node. In other words, multiple executors may be responsible for different edges formed by the same node. In this way, multiple executors interact with one or more parameter servers in parallel, and participate in the update of the estimated value of the edge information and the corresponding order neighborhood edge set in the counter, thereby improving the estimation efficiency and processing performance.

[0053] Correspondingly, the operation of obtaining the i-th order update message counter of the target node in step 204 may specifically include: at least one of the multiple executors calculates and obtains the i-th order update message counter of the target node based on the i-1-th order counter of the source node on the same edge of the target node and the part of the target graph that it is responsible for. In other words, among the multiple executors, one or more executors may work to obtain the i-th order update message counter of the target node. The number of executors that calculate and obtain the i-th order update message counter of the target node is not limited here.

[0054] Regarding the operation of the executor pushing the i-th order update message counter of the target node to the parameter server in step 205, it may specifically include: at least one executor among the multiple executors pushes the i-th order update message counter of the target node obtained by itself to the parameter server.

[0055] The operation of obtaining the i-order counter by the parameter server in step 206 by updating the i-1-order counter of the target node in the counter matrix may specifically include: the parameter server updates the i-1-order counter of the target node in the counter matrix to obtain the i-order counter according to the i-th order update message counter of the target node provided by at least one of the multiple executors and the i-1-order counter of the target node.

[0056] Optionally, the 0 to r order counter includes a 0 to r order read counter and a 0 to r order write counter. Both the read counter and the write counter are used to store the side information encoding array of the corresponding order neighborhood edge set of the corresponding node and the estimated value of the side information sum of the corresponding order neighborhood edge set. The difference is that the estimated value of the side information sum of the corresponding order neighborhood edge set of the corresponding node stored in the write counter can be continuously updated with each iteration, and at the end of each iteration, it is assigned to the estimated value of the side information sum of the corresponding order neighborhood edge set of the corresponding node stored in the read counter for subsequent iterations. Taking the target node as an example, the write counter is updated at least once with the corresponding order update message counter of the target node pushed up by at least one executor among the multiple executors and / or the corresponding order update message counter of the target node pushed up in batches by a single executor; the read counter is assigned to be consistent with the corresponding order write counter of the target node at the end of the current iteration. The read-write counter and the counter are set in this way so that the read counter is updated only once at the end of each iteration, which can avoid iteration confusion caused by repeated data updates during the iteration process.

[0057] Correspondingly, the operation of the executor pulling the i-1-order counter of the same-edge source node of the target node in step 204 may specifically include: the executor pulling the i-1-order read counter of the same-edge source node of the target node from the parameter server.

[0058] In addition, the executor pushes the corresponding order update message counters of the target nodes to the parameter server in batches, which can avoid transmitting a large amount of data at one time and help improve the transmission efficiency between the executor and the parameter server.

[0059] It can be understood that in the first iteration, the information contained in the counter created in the parameter server is empty and needs to be initialized. Therefore, for step 203, the first-order update message counter of the target node is obtained according to the edge formed by the target nodes in the target graph, and the first-order update message counter is pushed to the parameter server so that the parameter server initializes the first-order counter of the target node in the counter matrix. The operation may specifically include: the executor takes the edge in the target graph with the target node in the target graph as the tail node as the target edge, and creates the source node counter of the target edge; when it is determined that the label of the target edge belongs to the target label set, the edge information encoding array of the target edge is stored in the source node counter, and the number of elements in the edge information encoding array of the target edge is stored in the source node counter as the estimated value of the edge information of the target edge, otherwise, the estimated value of the edge information in the source node counter is set to 0; the executor merges the source node counters of all target edges of the target node with the initial counter of the target node to obtain the first-order update message counter of the target node; the executor pushes the first-order update message counter of the target node to the parameter server, so that the parameter server merges the first-order update message counter of the target node with the 0-order counter of the target node, and initializes the first-order counter of the target node with the fusion result. It should be noted that the estimated value of the edge information stored in the initial counter is 0; the 0-order neighborhood edge set of the target node in the counter matrix is ​​an empty set.

[0060] In addition, this solution can also be applied to special graph data with labeled edges. Specifically, the above operation of initializing the first-order counter of the target node can use the edge label as a screening condition when the edges in the target graph are labeled, thereby screening out the target edges that need to be estimated for edge information and , thereby improving the applicability of the estimation solution for graph neighborhood edge information and .

[0061] In non-first iterations, the executor may pull the counter of the target node in the previous iteration from the parameter server to use the counter for iteration. Correspondingly, the operation of obtaining the i-th order update message counter of the target node in step 204 may specifically include: the executor sends the i-1th order counter of the source node of the target edge to all tail nodes of the source node including the target node; the executor fuses the i-1th order counters received by the target node from all source nodes to obtain the i-th order update message counter of the target node.

[0062] The above is the estimation method of the graph neighborhood edge information and provided in the embodiment of the present application. By introducing the parameter server, the driver, executor and parameter server are interacted to avoid simply using the Spark platform for data processing, thereby eliminating the single-point network bottleneck of the Spark platform driver, and avoiding the additional creation and storage of new RDDs on the Spark platform during the estimation process of the graph neighborhood edge information and . It can also avoid the huge network overhead caused by ultra-large-scale data volumes, thereby reducing resource consumption and comprehensively improving the processing performance of graph data.

[0063] In some existing estimation schemes of graph neighborhood edge information and , the input defaults to a directed graph, and there is a lack of compatible schemes for inputting undirected graphs. That is to say, when the input target graph is an undirected graph, the undirected graph will still be estimated according to the estimation scheme of the directed graph, which results in the estimation result of the node neighborhood edge information and of the undirected graph being inaccurate and having poor applicability. In response to this problem, an embodiment of the present application also provides another estimation method of graph neighborhood edge information and , and when the input target graph is an undirected graph, the undirected graph is first converted into an equivalent directed graph for representation, and then the edge information is encoded. In this way, when estimating the graph neighborhood edge information and , the situation where the input is an undirected graph can be compatible, thereby improving the applicability of the estimation scheme and the accuracy of the estimation result. The estimation method of the graph neighborhood edge information and is described below in conjunction with the embodiments and accompanying drawings, respectively.

[0064] Figure 3 It is a schematic diagram of another method for estimating graph neighborhood edge information and provided in an embodiment of the present application. Figure 4 It is a schematic diagram of converting an undirected graph into a directed graph provided in an embodiment of the present application.

[0065] Combination Figure 3 As shown, the estimation method of the graph neighborhood edge information and provided in the embodiment of the present application is implemented by using the executor, the driver and the parameter server as the execution subject to describe the steps of the scheme. The estimation method may include:

[0066] Step 301: The executor obtains and stores a first adjacency list of the target graph; the first adjacency list includes multiple data of the target graph, wherein one data corresponds to one edge, and one data includes information of the source node and the tail node of the corresponding edge and edge information of the corresponding edge.

[0067] Here, each piece of data included in the first adjacency list can be represented as (information of the source node of the edge, information of the tail node of the edge, and edge information of the edge). Furthermore, if the corresponding edge has a label, the piece of data can be represented as (information of the source node of the edge, information of the tail node of the edge, edge information of the edge, and edge label).

[0068] Step 302: If the target graph contains undirected edges, the executor expands the data of the undirected edges in the stored first adjacency table into data of two directed edges to obtain a second adjacency table; the information of the source nodes and the information of the tail nodes of the two directed edges are reversed.

[0069] It can be understood that the nodes that constitute directed edges in a directed graph can be clearly divided into source nodes or tail nodes. For example, a directed edge from point a to point b has a source node at point a and a tail node at point b. However, the nodes that constitute undirected edges in an undirected graph cannot be divided into source nodes or tail nodes. For example, an undirected edge connecting point c and point d actually includes a directed edge from point c to point d, and another directed edge from point d to point c. In other words, any undirected edge can be equivalently represented as two directed edges, and the directions of the two directed edges are opposite. Therefore, combined with Figure 4 As shown, the executor expands the data of undirected edges into data of two directed edges in opposite directions, which can be compatible with the case where the input is an undirected graph, improve the applicability of the estimation scheme, and avoid the situation where the undirected edge is processed as a directed edge by default and the other undirected edge is lost, thereby ensuring the accuracy of the graph neighborhood edge information and the estimation results.

[0070] Step 303: The executor encodes the edge information in the second adjacency list to obtain an edge information encoding array.

[0071] Optionally, the executor encodes the edge information in the second adjacency list to obtain an edge information encoding array, which may specifically include: when the data of the second adjacency list stored by the executor is distributedly stored in D data partitions, the edge information stored in the D data partitions is summed up according to the data partitions to obtain D sum values; D is a positive integer; the executor determines the encoding value intervals corresponding to the D data partitions according to the D sum values; for each data partition, the executor encodes the stored edge information of the edge in the corresponding encoding value interval into an array with a length equal to the encoded edge information. Here, the data in the second adjacency list is distributedly stored in multiple data partitions, and the data stored in each of the multiple data partitions is encoded, which helps to improve data processing efficiency.

[0072] Specifically, the executor sums the side information stored in D data partitions according to the data partitions, and can obtain D sum values ​​{S1, S2, …, S D Taking the encoding value starting from 0 as an example, the executor can determine the encoding value intervals {[0,S1-1], [S1, S1+S2-1], … [S1+S2+ … + S D-1 ,S1+S2+…+S D-1]}. For example, a partition stores two edges, the encoding interval of the partition is [0,6], and the values ​​of the two edge information are 4 and 3 respectively. The executor encodes the two edge information values ​​4 and 3 stored in the encoding value interval [0,6] into arrays Array(0,1,2,3) and Array(4,5,6) with the same length as the encoded edge information.

[0073] Each piece of data included in the second adjacency list after the above encoding can be represented as (information of the source node of the edge, information of the tail node of the edge, encoding array of the edge information). Furthermore, if the edge has a label, the data can be represented as (information of the source node of the edge, information of the tail node of the edge, encoding array of the edge information, edge label of the edge).

[0074] Step 304: The executor aggregates the information of the tail node in the second adjacency list and the edge information encoding array of the edge according to the source node to generate table data.

[0075] Here, the aggregated second adjacency list, i.e., each piece of data included in the table data, can be represented as a set of (information of the source node of the edge, information of the tail node of the edge, encoding array of the edge information)). Furthermore, if the edge has a label, the piece of data can be represented as a set of (information of the source node of the edge, information of the tail node of the edge, encoding array of the edge information, edge label of the edge)).

[0076] Step 305: The driver sends a request to the parameter server.

[0077] Step 306: The parameter server creates a counter matrix of the target graph; the counter matrix stores 0 to r order counters of each node in the target graph, which are respectively used to store the edge information encoding array of the corresponding order neighborhood edge set of the corresponding node and the estimated value of the side information sum of the corresponding order neighborhood edge set; r is the target estimation order, r≥2.

[0078] Here, the parameter server creates a counter matrix of the target graph, which may specifically include: the parameter server creates the counter matrix according to the above table data.

[0079] Step 307: The executor obtains the first-order update message counter of the target node according to the edge formed by the target node in the target graph, and pushes the first-order update message counter to the parameter server so that the parameter server initializes the first-order counter of the target node in the counter matrix.

[0080] Step 308: The executor pulls the i-1-order counter of the same-edge source node of the target node from the parameter server, and obtains the i-th order update message counter of the target node according to the i-1-order counter of the same-edge source node of the target node; the target node is any node in the target graph; 2≤i≤r.

[0081] Step 309: The executor pushes the i-th order update message counter of the target node to the parameter server.

[0082] Step 310: The parameter server updates the i-1-order counter of the target node in the counter matrix according to the i-th order update message counter of the target node and the i-1-order counter of the target node to obtain the i-order counter, and iterates the loop until the update of the r-1-order counter of the target node is completed to obtain the r-order counter.

[0083] From the above description, it can be seen that the method for estimating the graph neighborhood edge information and provided in the embodiment of the present application can convert the target graph whose input is an undirected graph into an equivalent directed graph for representation, thereby being compatible with the case where the input is an undirected graph, improving the applicability of the method for estimating the graph neighborhood edge information and , and the accuracy of estimating the node neighborhood edge information and of the undirected graph.

[0084] It can be understood that the above-mentioned scheme of loop iteration until the update of the r-1-order counter of the target node is completed to obtain the r-order counter is a scheme in the data processing stage. In order to improve the application scenario of the scheme for estimating the graph neighborhood edge information and , the embodiment of the present application also provides another method for estimating the graph neighborhood edge information and , which can perform data analysis on the estimated value of the graph neighborhood edge information and obtained after loop iteration, and further realize the node situation analysis of each node in the graph. The following describes the method for estimating the graph neighborhood edge information and in combination with the embodiments and the accompanying drawings.

[0085] Figure 5 It is a schematic diagram of another method for estimating graph neighborhood edge information and provided in an embodiment of the present application.

[0086] Combination Figure 5 As shown, the estimation method of the graph neighborhood edge information and provided in the embodiment of the present application is implemented by using the driver, the executor and the parameter server as the execution subject to describe the steps of the scheme. The estimation method may include:

[0087] Step 501: The driver sends a request to the parameter server.

[0088] Step 502: The parameter server creates a counter matrix of the target graph; the counter matrix stores 0 to r order counters of each node in the target graph, which are respectively used to store the edge information encoding array of the corresponding order neighborhood edge set of the corresponding node and the estimated value of the side information sum of the corresponding order neighborhood edge set; r is the target estimation order, r≥2.

[0089] Step 503: The executor obtains the first-order update message counter of the target node according to the edge formed by the target node in the target graph, and pushes the first-order update message counter to the parameter server so that the parameter server initializes the first-order counter of the target node in the counter matrix.

[0090] Step 504: The executor pulls the i-1-order counter of the target node from the parameter server, and obtains the i-th order update message counter of the target node according to the i-1-order counter of the source node on the same edge of the target node; the target node is any node in the target graph; 2≤i≤r.

[0091] Step 505: The executor pushes the i-th order update message counter of the target node to the parameter server.

[0092] Step 506: The parameter server updates the i-1 order counter of the target node in the counter matrix according to the i-th order update message counter of the target node and the i-1 order counter of the target node to obtain the i-th order counter, and iterates the loop until the update of the r-1 order counter of the target node is completed to obtain the r-th order counter.

[0093] Step 507: Determine whether the target node is an abnormal node according to the estimated value of the sum of edge information of the r-order neighborhood edge set of the target node in the r-order counter and a preset abnormality determination threshold.

[0094] Here, the difference between the estimated value of the sum of the edge information of the r-order neighborhood edge set of the target node and the abnormality determination threshold can also be calculated. The larger the difference, the higher the possibility that the target node is abnormal.

[0095] From the above description, it can be seen that the estimation method of the graph neighborhood edge information and provided in the embodiment of the present application can analyze the edge information and of the r-order neighborhood edge set of the target node obtained by the final iteration, determine the abnormal situation of the target node, and thus improve the application prospect of the estimation scheme.

[0096] It is understandable that at the first iteration, the information contained in the counter created in the parameter server is empty and needs to be initialized. To address this problem, the embodiment of the present application provides another method for estimating the graph neighborhood edge information and for the first iteration, that is, when the target estimation order is 1. The following describes the method for estimating the graph neighborhood edge information and in conjunction with the embodiments and the accompanying drawings.

[0097] Figure 6 This is a flowchart of another method for estimating graph neighborhood edge information and provided in an embodiment of the present application.

[0098] Combination Figure 6As shown, the method for estimating the graph neighborhood edge information and provided in the embodiment of the present application is implemented by using the driver, executor and parameter server to interact as the steps of the execution subject description scheme. The target estimation order is 1, and the method for estimating the graph neighborhood edge information and may include:

[0099] Step 601: The driver sends a request to the parameter server.

[0100] Step 602: The parameter server creates a counter matrix of the target graph; the counter matrix stores the 0th-order counter and the 1st-order counter of each node in the target graph, which are respectively used to store the edge information encoding array of the corresponding order neighborhood edge set of the corresponding node and the estimated value of the side information sum of the corresponding order neighborhood edge set.

[0101] Step 603: The executor obtains the first-order update message counter of the target node according to the edge formed by the target node in the target graph, and pushes the first-order update message counter to the parameter server so that the parameter server initializes the first-order counter of the target node in the counter matrix.

[0102] For the operation of the first-order counter of the target node in the executor initialization counter in step 603, reference may be made to the implementation method of step 203 in the aforementioned embodiment, which will not be described in detail here.

[0103] The above is a method for estimating the graph neighborhood edge information and when the target estimation order is 1 provided in an embodiment of the present application. By introducing a parameter server, the driver, executor and parameter server interact with each other, thereby avoiding the use of the Spark platform alone for data processing, thereby eliminating the single-point network bottleneck of the Spark platform driver, and avoiding the additional creation and storage of new RDDs on the Spark platform during the estimation process of the graph neighborhood edge information and. It can also avoid the huge network overhead caused by ultra-large-scale data volumes, thereby reducing resource consumption and comprehensively improving the processing performance of graph data.

[0104] In practical applications, the technical solution provided by the embodiment of the present application can be applied to the financial field, such as in financial risk control products. Specifically, each node can represent the capital account of each user; the edge can represent the transaction record; the edge information can represent the amount of each transaction or the number of transactions; the edge information and can represent the total amount of multiple transactions or the total number of transactions; the edge label can represent the transaction type, such as normal transaction, abnormal transaction, etc.

[0105] It is understandable that in the specific implementation of this application, data related to transaction information, transaction accounts, etc. is involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0106] In one implementation, when a user registers an account for the product, a financial risk control product prompts the user through a pop-up window regarding the collection and use of user information during the user's use of the product. When the user clicks the control to agree, it means that the user agrees to the collection and use of the relevant information presented by the user on the product during the use of the product. Of course, the method of soliciting user permission or consent is not limited to this and is not limited here.

[0107] Correspondingly, the side information takes the amount of each transaction as an example. The driver can first send an application to the parameter server to enable the parameter server to create a counter matrix; the counter matrix stores the counters of each capital account at each iteration, and the counters are used to store the amount encoding array of each transaction of the corresponding iteration number of the corresponding capital account and the estimated value of the total amount of multiple transactions. At the first iteration, the executor initializes the counter of the target capital account at the first iteration in the counter matrix through the parameter server according to the transaction record corresponding to the target capital account. At the non-first iteration, the executor pulls the counter of the capital outflow account corresponding to the same transaction record as the target capital account at the previous iteration from the parameter server, and obtains the update message counter of the target capital account at this iteration according to the counter of the capital outflow account at the previous iteration, and then the executor pushes the update message counter of the target capital account at this iteration to the parameter server, so that the parameter server updates the counter of the target capital account at this iteration in the counter matrix according to the update message counter of the target capital account at this iteration and the counter of the target capital account at the previous iteration. Iterate in this way until the counter of the target capital account at the target iteration number is obtained.

[0108] Specifically, the executor can first obtain and store the first adjacency list, in which one piece of data corresponds to one transaction. Therefore, one piece of data in the first adjacency list can be expressed as (funds outflow account, funds inflow account, transaction amount, transaction evaluation record). If there is a transaction record that cannot distinguish between the funds inflow account and the funds outflow account, the executor can expand the transaction record into two mutually reverse transaction records to obtain a second adjacency list. The executor encodes the transaction amount in the second adjacency list to obtain a transaction amount encoding array. The executor can aggregate other data in the second adjacency list according to the funds outflow account to obtain table data, which can be expressed as (funds outflow account, (funds inflow account, transaction amount encoding array, transaction evaluation) set). Then, the driver can send a request to the parameter server so that the parameter server creates a read counter and a write counter for storing each iteration starting from the first iteration based on the above-aggregated table data.

[0109] In the first iteration, when the executor determines that the transaction type of the target transaction record corresponding to the target funds inflow account belongs to the abnormal evaluation set, the transaction amount encoding array corresponding to the target transaction record can be stored in the counter of the target transaction record, and the number of elements in the transaction amount encoding array can be stored in the counter of the above target transaction record as the estimated value of the transaction amount corresponding to the target transaction record; otherwise, the estimated value of the transaction amount in the counter of the target transaction record is set to 0. Then, the executor merges the counters of all target transaction records corresponding to the target funds inflow account and the initial counter of the target funds inflow account to obtain the update message counter of the target funds inflow account at this iteration. Here, the estimated value of the transaction amount stored in the initial counter is 0. Further, the executor pushes the update message counter at this iteration to the parameter server, so that the parameter server merges the update message counter of the target funds inflow account at this iteration with the counter when it is not iterated, and initializes the write counter of the target funds inflow account at this iteration with the fusion result. Here, the transaction record set of the target funds inflow account when it is not iterated is an empty set.

[0110] In non-first iteration, the executor can pull the read counter of the funds outflow account corresponding to the same transaction record as the target funds outflow account in the previous iteration from the parameter server, and send the read counter of the funds outflow account in the previous iteration to all funds inflow accounts corresponding to the target funds outflow account. Then, the executor merges the read counters received by the target funds inflow account from all funds outflow accounts in the previous iteration to obtain the update message counter of the target funds outflow account in this iteration. Further, the executor pushes the update message counter of the target funds account in this iteration to the parameter server, so that the parameter server updates the write counter of the target funds account in this iteration in the counter matrix according to the update message counter of the target funds account in this iteration and the write counter of the target funds inflow account in the previous iteration. Iterate in this way until the counter of the target funds account at the target iteration number is obtained. It can be understood that the total transaction amount of the target funds account in the counter after the target iteration number can be compared with the preset abnormal judgment threshold to determine whether the target funds account is abnormal, thereby realizing the risk control of abnormal funds accounts in financial scenarios.

[0111] The following introduces the structure of the device for implementing graph neighborhood edge information and estimation in server form and terminal device form respectively.

[0112] Figure 7: This is a schematic diagram of a server structure provided in an embodiment of the present application. The server 900 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 922 (for example, one or more processors) and a memory 932, and one or more storage media 930 (for example, one or more mass storage devices) storing application programs 942 or data 944. Among them, the memory 932 and the storage medium 930 can be short-term storage or permanent storage. The program stored in the storage medium 930 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Furthermore, the central processing unit 922 can be configured to communicate with the storage medium 930 and execute a series of instruction operations in the storage medium 930 on the server 900.

[0113] The server 900 may also include one or more power supplies 926, one or more wired or wireless network interfaces 950, one or more input and output interfaces 958, and / or one or more operating systems 941, such as Windows Server 2000. TM , Mac OS X TM , Unix TM ,Linux TM , FreeBSD TM etc.

[0114] The steps performed by the server in the above embodiment can be based on the Figure 7 The server structure shown.

[0115] The CPU 922 is used to execute the following steps:

[0116] Obtain the first-order update message counter of the target node according to the edge formed by the target node in the target graph, and push the first-order update message counter to the parameter server, so that the parameter server initializes the first-order counter of the target node in the counter matrix; the parameter server contains the counter matrix of the target graph created according to the application of the driver; the counter matrix stores the 0 to r-order counters of each node in the target graph, which are respectively used to store the edge information encoding array of the corresponding order neighborhood edge set of the corresponding node and the estimated value of the side information sum of the corresponding order neighborhood edge set; r is the target estimation order, r≥2;

[0117] Pull the i-1-order counter of the target node from the parameter server, and obtain the i-th order update message counter of the target node according to the i-1-order counter of the source node on the same edge of the target node; 2≤i≤r;

[0118] The i-th order update message counter of the target node is pushed up to the parameter server, so that the parameter server updates the i-1-th order counter of the target node in the counter matrix according to the i-th order update message counter of the target node and the i-1-th order counter of the target node to obtain the i-th order counter, and iterates until the update of the r-1-th order counter of the target node is completed to obtain the r-th order counter.

[0119] The present application embodiment also provides another device for estimating graph neighborhood edge information and, for example, Figure 8 For the sake of convenience, only the parts related to the embodiments of the present application are shown. For specific technical details not disclosed, please refer to the method part of the embodiments of the present application. The terminal can be any terminal device including a mobile phone, a tablet computer, a personal digital assistant (English full name: Personal Digital Assistant, English abbreviation: PDA), a sales terminal (English full name: Point of Sales, English abbreviation: POS), a car computer, etc., taking the terminal as a mobile phone as an example:

[0120] Figure 8 FIG. 1 is a block diagram showing a partial structure of a mobile phone related to a terminal provided in an embodiment of the present application. Figure 8 The mobile phone includes: a radio frequency (RF) circuit 1010, a memory 1020, an input unit 1030, a display unit 1040, a sensor 1050, an audio circuit 1060, a wireless fidelity (WiFi) module 1070, a processor 1080, and a power supply 1090. Those skilled in the art can understand that Figure 8 The mobile phone structure shown in the figure does not constitute a limitation on the mobile phone, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0121] Combine the following Figure 8 A detailed introduction to the various components of the mobile phone:

[0122] The RF circuit 1010 can be used for receiving and sending signals during information transmission or calls. In particular, after receiving the downlink information of the base station, it is sent to the processor 1080 for processing; in addition, the designed uplink data is sent to the base station. Generally, the RF circuit 1010 includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (full name: LowNoiseAmplifier, English abbreviation: LNA), a duplexer, etc. In addition, the RF circuit 1010 can also communicate with the network and other devices through wireless communication. The above-mentioned wireless communications may use any communication standard or protocol, including but not limited to Global System of Mobile communications (Global System of Mobile communication, English abbreviation: GSM), General Packet Radio Service (General Packet Radio Service, GPRS), Code Division Multiple Access (Code Division Multiple Access, English abbreviation: CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (Long Term Evolution, English abbreviation: LTE), e-mail, Short Messaging Service (SMS), etc.

[0123] The memory 1020 can be used to store software programs and modules. The processor 1080 executes various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory 1020. The memory 1020 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory 1020 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0124] The input unit 1030 can be used to receive input digital or character information, and to generate key signal input related to the user settings and function control of the mobile phone. Specifically, the input unit 1030 may include a touch panel 1031 and other input devices 1032. The touch panel 1031, also known as a touch screen, can collect the user's touch operation on or near it (such as the user's operation on the touch panel 1031 or near the touch panel 1031 using any suitable object or accessory such as a finger, stylus, etc.), and drive the corresponding connection device according to a pre-set program. Optionally, the touch panel 1031 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it to the processor 1080, and can receive and execute commands sent by the processor 1080. In addition, the touch panel 1031 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel 1031, the input unit 1030 may further include other input devices 1032. Specifically, the other input devices 1032 may include but are not limited to one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.

[0125] The display unit 1040 can be used to display information input by the user or information provided to the user and various menus of the mobile phone. The display unit 1040 may include a display panel 1041. Optionally, the display panel 1041 may be configured in the form of a liquid crystal display (full name in English: Liquid Crystal Display, English abbreviation: LCD), an organic light-emitting diode (full name in English: Organic Light-Emitting Diode, English abbreviation: OLED), etc. Further, the touch panel 1031 may cover the display panel 1041. When the touch panel 1031 detects a touch operation on or near it, it is transmitted to the processor 1080 to determine the type of touch event. Subsequently, the processor 1080 provides a corresponding visual output on the display panel 1041 according to the type of touch event. Although in Figure 8 In the embodiment, the touch panel 1031 and the display panel 1041 are used as two independent components to realize the input and output functions of the mobile phone, but in some embodiments, the touch panel 1031 and the display panel 1041 can be integrated to realize the input and output functions of the mobile phone.

[0126] The mobile phone may also include at least one sensor 1050, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 1041 according to the brightness of the ambient light, and the proximity sensor may turn off the display panel 1041 and / or the backlight when the mobile phone is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors that can be configured in the mobile phone, such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be repeated here.

[0127] The audio circuit 1060, the speaker 1061, and the microphone 1062 can provide an audio interface between the user and the mobile phone. The audio circuit 1060 can transmit the received audio data to the speaker 1061 after converting the received audio data into an electrical signal, which is converted into a sound signal for output; on the other hand, the microphone 1062 converts the collected sound signal into an electrical signal, which is received by the audio circuit 1060 and converted into audio data, and then the audio data is output to the processor 1080 for processing, and then sent to another mobile phone through the RF circuit 1010, or the audio data is output to the memory 1020 for further processing.

[0128] WiFi is a short-range wireless transmission technology. The mobile phone can help users send and receive emails, browse web pages and access streaming media through the WiFi module 1070. It provides users with wireless broadband Internet access. Figure 8 A WiFi module 1070 is shown, but it is understandable that it is not an essential component of the mobile phone and can be omitted as needed without changing the essence of the invention.

[0129] The processor 1080 is the control center of the mobile phone. It uses various interfaces and lines to connect various parts of the entire mobile phone. By running or executing software programs and / or modules stored in the memory 1020, and calling data stored in the memory 1020, it executes various functions of the mobile phone and processes data, thereby collecting overall data and information of the mobile phone. Optionally, the processor 1080 may include one or more processing units; preferably, the processor 1080 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 1080.

[0130] The mobile phone also includes a power supply 1090 (such as a battery) for supplying power to various components. Preferably, the power supply can be logically connected to the processor 1080 through a power management system, so that the power management system can manage functions such as charging, discharging, and power consumption.

[0131] Although not shown, the mobile phone may also include a camera, a Bluetooth module, etc., which will not be described in detail here.

[0132] In the embodiment of the present application, the processor 1080 included in the terminal also has the following functions:

[0133] Obtain the first-order update message counter of the target node according to the edge formed by the target node in the target graph, and push the first-order update message counter to the parameter server, so that the parameter server initializes the first-order counter of the target node in the counter matrix; the parameter server contains the counter matrix of the target graph created according to the application of the driver; the counter matrix stores the 0 to r-order counters of each node in the target graph, which are respectively used to store the edge information encoding array of the corresponding order neighborhood edge set of the corresponding node and the estimated value of the side information sum of the corresponding order neighborhood edge set; r is the target estimation order, r≥2;

[0134] Pull the i-1-order counter of the target node from the parameter server, and obtain the i-th order update message counter of the target node according to the i-1-order counter of the source node on the same edge of the target node; 2≤i≤r;

[0135] The i-th order update message counter of the target node is pushed up to the parameter server, so that the parameter server updates the i-1-th order counter of the target node in the counter matrix according to the i-th order update message counter of the target node and the i-1-th order counter of the target node to obtain the i-th order counter, and iterates until the update of the r-1-th order counter of the target node is completed to obtain the r-th order counter.

[0136] An embodiment of the present application also provides a computer-readable storage medium for storing program code, wherein the program code is used to execute any one of the methods for estimating the sum of graph neighborhood edge information described in the aforementioned embodiments.

[0137] An embodiment of the present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute any one of the methods for estimating the sum of graph neighborhood edge information described in the aforementioned embodiments.

[0138] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0139] In the several embodiments provided in the present application, it should be understood that the disclosed systems, 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 units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0140] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0141] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0142] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (full name in English: Read-Only Memory, English abbreviation: ROM), random access memory (full name in English: Random Access Memory, English abbreviation: RAM), disk or optical disk and other media that can store program codes.

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

Claims

1. A method for estimating the sum of graph neighborhood edge information, characterized in that: include: The executor obtains the first-order update message counter of the target node according to the edge formed by the target node in the target graph, and pushes the first-order update message counter to the parameter server, so that the parameter server fuses the first-order update message counter of the target node and the 0-order counter of the target node, and initializes the first-order counter of the target node in the counter matrix with the fusion result; The 0th-order neighborhood edge set of the target node is an empty set; The parameter server includes a counter matrix of the target graph created according to the application of the driver; the counter matrix stores 0 to r order counters of each node in the target graph, which are respectively used to store the side information encoding array of the corresponding order neighborhood edge set of the corresponding node and the estimated value of the side information sum of the corresponding order neighborhood edge set; r is the target estimation order, r≥2; The executor pulls the i-1 order counter of the same edge source node of the target node from the parameter server, and obtains the i-th order update message counter of the target node according to the i-1 order counter of the same edge source node of the target node; 2≤i≤r; The executor pushes the i-th order update message counter of the target node to the parameter server, so that the parameter server updates the i-1-th order counter of the target node in the counter matrix according to the i-th order update message counter of the target node and the i-1-th order counter of the target node to obtain the i-th order counter, and iterates until the update of the r-1-th order counter of the target node is completed to obtain the r-th order counter.

2. The method for estimating the sum of graph neighborhood edge information according to claim 1, characterized in that: A plurality of executors are in communication with the parameter server; the plurality of executors are respectively responsible for different parts of the target graph associated with the target node; The step of obtaining the i-th order update message counter of the target node according to the i-1-th order counter of the same edge source node of the target node specifically includes: At least one of the multiple executors calculates and obtains the i-th order update message counter of the target node according to the i-1 order counter of the same edge source node of the target node and the corresponding portion of the target graph for which it is responsible; The executor pushes the i-th order update message counter of the target node to the parameter server, so that the parameter server updates the i-1-th order counter of the target node in the counter matrix according to the i-th order update message counter of the target node and the i-1-th order counter of the target node to obtain the i-th order counter, specifically including: At least one executor among the multiple executors pushes the i-th order update message counter of the target node obtained by itself to the parameter server, so that the parameter server updates the i-1-th order counter of the target node in the counter matrix according to the received i-th order update message counter of the target node and the i-1-th order counter of the target node to obtain the i-th order counter.

3. The method for estimating the graph neighborhood edge information and according to claim 2, characterized in that: The 0 to r order counter includes a 0 to r order read counter and a 0 to r order write counter; the read counter and the write counter are both used to store the side information encoding array of the corresponding order neighborhood edge set of the corresponding node and the estimated value of the side information sum of the corresponding order neighborhood edge set; wherein the i-1 order write counter is updated at least once with the i-order update message counter of the target node pushed up by at least one executor of the multiple executors and / or the i-order update message counter of the target node pushed up in batches by a single executor; the read counter is assigned a value consistent with the corresponding order write counter of the target node at the end of the iteration; The executor pulls the i-1-order counter of the same-edge source node of the target node from the parameter server, including: The executor pulls the i-1-order reading counter of the same-edge source node of the target node from the parameter server.

4. The method for estimating the graph neighborhood edge information and according to claim 1, characterized in that: The executor obtains the first-order update message counter of the target node according to the edge formed by the target node in the target graph, and pushes the first-order update message counter to the parameter server, so that the parameter server fuses the first-order update message counter of the target node and the 0-order counter of the target node, and initializes the first-order counter of the target node in the counter matrix with the fusion result, including: The executor uses the edge in the target graph with the target node as the tail node as the target edge, and creates a source node counter of the target edge; When the executor determines that the label of the target edge belongs to the target label set, the edge information encoding array of the target edge is stored in the source node counter, and the number of elements in the edge information encoding array of the target edge is stored in the source node counter as the estimated value of the edge information of the target edge; otherwise, the estimated value of the edge information in the source node counter is set to 0; The executor merges the source node counters of all target edges of the target node with the initial counter of the target node to obtain the first-order update message counter of the target node; the estimated value of the edge information stored in the initial counter is 0; The executor pushes the 1st-order update message counter of the target node to the parameter server, so that the parameter server fuses the 1st-order update message counter of the target node and the 0th-order counter of the target node, and initializes the 1st-order counter of the target node with the fusion result.

5. The method for estimating the graph neighborhood edge information and according to claim 4, characterized in that: The step of obtaining the i-th order update message counter of the target node according to the i-1-th order counter of the same edge source node of the target node specifically includes: The executor sends the i-1 order counter of the source node of the target edge to all tail nodes of the source node including the target node; The executor performs fusion according to the i-1 order counters received by the target node from all source nodes to obtain the i-th order update message counter of the target node.

6. The method for estimating the sum of graph neighborhood edge information according to claim 1, characterized in that: Also includes: The executor obtains and stores a first adjacency list of the target graph; the first adjacency list includes multiple pieces of data of the target graph, wherein one piece of data corresponds to one edge, and one piece of data includes information of a source node and an end node of the corresponding edge and edge information of the corresponding edge; If the target graph contains undirected edges, the executor expands the data of the undirected edges in the first adjacency table stored in the first adjacency table into data of two directed edges to obtain a second adjacency table; the information of the source nodes and the information of the tail nodes of the two directed edges are reversed; The executor encodes the edge information in the second adjacency list to obtain an edge information encoding array; The executor aggregates the information of the tail node in the second adjacency list and the edge information encoding array of the edge according to the source node to generate table data; the table data serves as the data basis for the parameter server to create the counter matrix.

7. The method for estimating the sum of graph neighborhood edge information according to claim 6, characterized in that: The executor encodes the edge information in the second adjacency list to obtain an edge information encoding array, which specifically includes: When the data of the second adjacency table stored by the executor is distributedly stored in D data partitions, the side information stored in the D data partitions is summed up according to the data partitions to obtain D sum values; D is a positive integer; The executor determines the encoding value intervals corresponding to the D data partitions respectively according to the D sum values; For each data partition, the executor encodes the stored edge information of the edge within the corresponding encoding value interval into an array having a length equal to the encoded edge information.

8. The method for estimating the sum of graph neighborhood edge information according to any one of claims 1 to 7, characterized in that: After loop iteration until the update of the r-1 order counter of the target node is completed to obtain the r order counter, the method further includes: According to the estimated value of the sum of the edge information of the r-order neighborhood edge set of the target node in the r-order counter and a preset abnormality determination threshold, it is determined whether the target node is an abnormal node.

9. A method for estimating the sum of graph neighborhood edge information, characterized in that: The target estimation order is 1, and the method comprises: The executor obtains the first-order update message counter of the target node according to the edge formed by the target node in the target graph, and pushes the first-order update message counter to the parameter server, so that the parameter server fuses the first-order update message counter of the target node and the 0-order counter of the target node, and initializes the 1-order counter of the target node in the counter matrix with the fusion result; the 0-order neighborhood edge set of the target node is an empty set; the parameter server contains the counter matrix of the target graph created according to the application of the driver; the counter matrix stores the 0-order counter and the 1-order counter of each node in the target graph, which are respectively used to store the edge information encoding array of the corresponding order neighborhood edge set of the corresponding node and the estimated value of the side information sum of the corresponding order neighborhood edge set.

10. The method for estimating the sum of graph neighborhood edge information according to claim 9, characterized in that: The executor obtains the first-order update message counter of the target node according to the edge formed by the target node in the target graph, and pushes the first-order update message counter to the parameter server, so that the parameter server fuses the first-order update message counter of the target node and the 0-order counter of the target node, and initializes the first-order counter of the target node in the counter matrix with the fusion result, including: The executor uses the edge in the target graph with the target node as the tail node as the target edge, and creates a source node counter of the target edge; When the executor determines that the label of the target edge belongs to the target label set, the edge information encoding array of the target edge is stored in the source node counter, and the number of elements in the edge information encoding array of the target edge is stored in the source node counter as the estimated value of the edge information of the target edge; otherwise, the estimated value of the edge information in the source node counter is set to 0; The executor merges the source node counters of all target edges of the target node with the initial counter of the target node to obtain the first-order update message counter of the target node; the estimated value of the edge information stored in the initial counter is 0; The executor pushes the 1st-order update message counter of the target node to the parameter server, so that the parameter server fuses the 1st-order update message counter of the target node and the 0th-order counter of the target node, and initializes the 1st-order counter of the target node with the fusion result.

11. The method for estimating the sum of graph neighborhood edge information according to claim 9, characterized in that: Also includes: The executor obtains and stores a first adjacency list of the target graph; the first adjacency list includes multiple pieces of data of the target graph, wherein one piece of data corresponds to one edge, and one piece of data includes information of a source node and an end node of the corresponding edge and edge information of the corresponding edge; If the target graph contains undirected edges, the executor expands the data of the undirected edges in the first adjacency table stored in the first adjacency table into data of two directed edges to obtain a second adjacency table; the information of the source nodes and the information of the tail nodes of the two directed edges are reversed; The executor encodes the edge information in the second adjacency list to obtain an edge information encoding array; The executor aggregates the information of the tail node in the second adjacency list and the edge information encoding array of the edge according to the source node to generate table data; the table data serves as the data basis for the parameter server to create the counter matrix.

12. A system for estimating the sum of graph neighborhood edge information, characterized in that: include: parameter servers, drivers, and executors; The driver and the actuator communicate with the parameter server respectively; The driver is used to send a request to the parameter server; The parameter server is used to create a counter matrix of the target graph; the counter matrix stores 0 to r order counters of each node in the target graph, which are respectively used to store the edge information encoding array of the corresponding order neighborhood edge set of the corresponding node and the estimated value of the side information sum of the corresponding order neighborhood edge set; the r is the target estimation order, r≥2; according to the i-th order update message counter of the target node pushed up by the executor and the i-1 order counter of the target node, the i-1 order counter of the target node in the counter matrix is ​​updated to obtain the i-order counter, and the loop is iterated until the update of the r-1 order counter of the target node is completed to obtain the r-order counter; The executor is used to fuse the first-order update message counter of the target node and the zero-order counter of the target node through the parameter server according to the edge formed by the target node in the target graph, and initialize the first-order counter of the target node in the counter matrix with the fusion result; The 0th-order neighborhood edge set of the target node is an empty set; Pull the i-1-order counter of the same-edge source node of the target node from the parameter server, and obtain the i-th order update message counter of the target node according to the i-1-order counter of the same-edge source node of the target node; 2≤i≤r; push the i-th order update message counter of the target node to the parameter server.

13. A device for estimating graph neighborhood edge information and, characterized in that: The device comprises a processor and a memory; The memory is used to store program code and transmit the program code to the processor; The processor is used to execute the steps of the method for estimating the graph neighborhood edge information and according to any one of claims 1-11 according to the instructions in the program code.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store program codes, and the program codes are used to execute the steps of the method for estimating the graph neighborhood edge information and according to any one of claims 1 to 11.

15. A computer program product, characterized in that The method comprises a computer program or an instruction, which, when executed by a processor, implements the steps of the method for estimating the graph neighborhood edge information and the graph neighborhood edge information as described in any one of claims 1 to 11.

Citation Information

Patent Citations

  • Mixed partition method of graph data and parameter data based on parameter server architecture

    CN113191486A

  • Digraph node updating method and device

    CN113836156A