Method for improving advertisement delivery accuracy and cloud computing device

By optimizing subgraph matching and graph compression algorithms through decomposition and merging strategies, the performance bottleneck of large-scale graph data processing is solved, enabling efficient graph data querying and connected component calculation, thereby improving processing efficiency and storage effectiveness.

CN115795102BActive Publication Date: 2026-04-28ALIBABA (CHINA) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ALIBABA (CHINA) CO LTD
Filing Date
2022-11-05
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Existing technologies struggle to efficiently process massive graph data, causing traditional graph computation methods to encounter performance bottlenecks and become unable to effectively handle large-scale graph data.

Method used

By decomposing the target graph and subgraphs into identical meta-structural units and performing intersection merging through a series of merging strategies, combined with graph compression algorithms, subgraph matching and connected component calculation are optimized to achieve efficient processing of large-scale graph data.

Benefits of technology

It supports graph data query and matching capabilities with hundreds of billions of edges and tens of billions of nodes, improving processing efficiency and reducing storage costs after graph compression, while accelerating the calculation speed of connected components.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115795102B_ABST
    Figure CN115795102B_ABST
Patent Text Reader

Abstract

The application provides a method for subgraph matching and graph compression and determining connected components of graph big data. A method for subgraph matching includes: obtaining a target graph set and a subgraph set, the target graph set and the subgraph set being stored in a big data platform in the form of an edge table; respectively disassembling the target graph set and the subgraph set according to the same meta structure to obtain a target graph meta structure unit set and a subgraph meta structure unit set respectively including a plurality of meta structure units; determining a merging strategy for restoring to the subgraph set for the subgraph meta structure unit set; executing the merging strategy on the target graph meta structure unit set to obtain a merging result; and obtaining a subgraph matching result according to the merging result. The method according to the example embodiment can efficiently support the query and matching of massive graph data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of big data and computer technology, and more specifically, to a method and cloud computing device for subgraph matching and graph compression and for determining the connected components of graph big data. Background Technology

[0002] Graphs are one of the most intuitive languages ​​for describing the real world. In the digital age, large-scale graph data mining has become a fundamental tool for modeling social, communication, and information networks. The rapid development of internet platforms in recent years has accumulated massive amounts of relational data, which can be stored, analyzed, and processed using graph computing techniques. This massive data involves an enormous number and scale of graphs; for example, collected logs can reach hundreds of billions in scale, and correspondingly, connected components can reach tens of billions. Furthermore, the scale of these graphs is enormous, reaching billions of nodes and trillions of edges. This massive amount of data has caused traditional graph computing to encounter performance bottlenecks in practice, making it unable to effectively handle such large-scale graph data.

[0003] Therefore, it is necessary to develop new graph computation methods that can effectively process massive amounts of graph data. Summary of the Invention

[0004] This application aims to provide a method and cloud computing device for subgraph matching, graph compression, and determining the connected components of large graph data, which can efficiently process massive graph data.

[0005] The user features and advantages of this application will become apparent from the following detailed description, or may be learned in part from practice of this application.

[0006] According to one aspect of this application, a method for subgraph matching is provided, comprising:

[0007] Obtain the target graph set and the subgraph set, and store the target graph set and the subgraph set in the form of an edge table in the big data platform;

[0008] The target graph set and the subgraph set are decomposed according to the same meta-structure to obtain a target graph meta-structure unit set and a subgraph meta-structure unit set, each including multiple meta-structure units;

[0009] A merging strategy for restoring to the subgraph set is determined for the subgraph primitive structural unit set;

[0010] The merging strategy is executed on the target primitive structural unit set to obtain the merging result;

[0011] The subgraph matching result is obtained based on the merging result.

[0012] According to the aforementioned method, the target graph set and the subgraph set are decomposed according to the same meta-structure, including:

[0013] Obtain the edge tables corresponding to the target graph set and the subgraph set respectively;

[0014] The edge table is decomposed into triples, such that the resulting set of meta-structural units contains all the edges of the corresponding edge table, and each meta-structural unit is unique and has other meta-structural units that share at least one node.

[0015] According to the aforementioned method, the decomposition results are further iteratively optimized through the following process:

[0016] Gradually increase the number of nodes in the meta-structural unit and estimate the cost of disassembling it into a new meta-structural unit;

[0017] If the cost is not greater than the cost threshold, then the edge table is decomposed using a new meta-structural unit;

[0018] If the cost exceeds the cost threshold, the optimization process is stopped.

[0019] After obtaining the corresponding edge table according to the aforementioned method, the process also includes:

[0020] If the edge table is determined not to be a bipartite graph, then bidirectional edge storage is performed.

[0021] According to the aforementioned method, determining the merging strategy for restoring the subgraph set to the subgraph set includes:

[0022] Randomly select a first element structure unit from the set of sub-element structure units;

[0023] After removing the first metastructure unit from the set of sub-metastructure units, repeat the following operations until the first metastructure unit contains all the edges that the set of sub-metastructure units initially had, thus obtaining the merging strategy:

[0024] From the set of sub-graph element structural units, select element structural units that have at least one node in common with the first element structural unit to form a neighbor set;

[0025] Determine the intersection conditions between the first meta-structural unit and the meta-structural units in the neighbor set;

[0026] The execution cost of the intersection condition on the target primitive structural unit set is estimated using the CBO algorithm;

[0027] Select the intersection condition and the corresponding metastructure unit of the neighbor set with the minimum execution cost, add the intersection condition to the merging strategy, update the first metastructure unit with the corresponding intersection result, and remove the corresponding metastructure unit of the neighbor set from the subgraph metastructure unit set.

[0028] According to the aforementioned method, the merging strategy is executed on the target primitive structural unit set, including repeatedly performing the following operations until all intersection conditions in the merging strategy are executed:

[0029] Obtain the intersection conditions sequentially from the merging strategy;

[0030] The target primitive structural unit set is merged according to the intersection condition, and the target primitive structural unit set is updated with the merged result.

[0031] According to the aforementioned method, the subgraph matching result is obtained based on the merging result, including:

[0032] Count the number of matches in the merged results; and / or

[0033] Get the matching nodes.

[0034] According to another aspect of this application, a method for graph compression is provided, comprising:

[0035] Obtain the set of target images to be compressed;

[0036] Repeat the following procedure until the termination condition is met:

[0037] Each node in the target graph set is obtained as a rotating node, and the first-order neighbors of the rotating node are obtained to form a first set;

[0038] Select the node with the smallest identifier value from the first set;

[0039] The edge connecting any node in the first-order neighbor to the rotating node is converted into an edge connecting any node to the node with the minimum identifier value, thereby compressing the edge set of the target graph set.

[0040] The target graph set is updated with the compressed edge set.

[0041] According to the aforementioned method, the termination condition is that the edge set no longer changes or the number of repeated rounds reaches a threshold.

[0042] According to another aspect of this application, a method for determining the connected components of a large data graph is provided, comprising:

[0043] Obtain a target graph set and a subgraph set. The target graph set and the subgraph set are stored in the big data platform in the form of an edge table. The subgraph set includes at least one star-shaped subgraph.

[0044] Based on the set of subgraphs, graph compression and subgraph matching are repeatedly performed on the target graph set using the aforementioned methods for subgraph matching and graph compression to filter star structures from the target graph set.

[0045] Perform connected component calculations on the remaining non-star-shaped structures after filtering;

[0046] Output the final result of the connected components.

[0047] According to the aforementioned method, graph compression and subgraph matching are repeatedly performed on the target graph set to filter star structures from the target graph set, including:

[0048] Repeat the following operations:

[0049] Graph compression is performed on the target graph set to obtain an updated target graph set;

[0050] Filter star graphs from the target graph set using subgraph matching;

[0051] If the proportion of the remaining non-star-shaped structures after filtering is greater than the threshold, the remaining non-star-shaped structures will be used as the updated target map set.

[0052] If the proportion of the remaining non-star-shaped structures after filtering is not greater than the threshold, then graph compression and subgraph matching are stopped.

[0053] According to another aspect of this application, a method for determining the connected components of a large data graph is provided, comprising:

[0054] Obtain a target graph set and a subgraph set. The target graph set and the subgraph set are stored in the big data platform in the form of an edge table. The subgraph set includes at least one star-shaped subgraph.

[0055] Based on the set of subgraphs, the aforementioned subgraph matching method is used to perform subgraph matching on the target set of subgraphs, thereby identifying the star graph in the target set of subgraphs;

[0056] Perform connected component calculations on non-star graphs other than the star graph;

[0057] Output the final result of the connected components.

[0058] According to another aspect of this application, a method for segmenting a data graph is provided, comprising:

[0059] Determine multiple predefined feature subgraphs for a given scenario;

[0060] Obtain scene data maps for the predetermined scene;

[0061] Using the aforementioned method, subgraph matching is performed on the scene data graph to obtain a matching set including at least one matching instance, where each matching instance is isomorphic to one of the plurality of predefined feature subgraphs;

[0062] The attribution relationship of a node is determined based on the relationship between the nodes in the scene data graph and the matching set;

[0063] The connected components of the scene data graph are obtained based on the affiliation of the nodes, thereby realizing the segmentation of the scene data graph.

[0064] According to another aspect of this application, a method for improving the accuracy of advertising delivery is provided, comprising:

[0065] Generate device data diagrams based on device logs;

[0066] The connected components of the device data graph are obtained according to the aforementioned method;

[0067] Based on the client profiles obtained from one or more nodes in the same connected component, the same or similar advertisements are delivered to all nodes in the corresponding connected component.

[0068] According to another aspect of this application, a cloud computing device is provided, comprising:

[0069] processor;

[0070] A memory, on which computer programs are stored;

[0071] The aforementioned method is implemented when the processor executes the computer program.

[0072] According to the subgraph matching scheme in the example embodiment, the subgraph and the target graph are decomposed into identical meta-structural units, and then the meta-structural units are intersected and merged through a series of merging strategies to obtain all subgraph instances that are isomorphic between the target graph and the subgraph. Based on the technical solution of this application, it can support large-scale graph data query and matching capabilities, such as hundreds of billions of edges and tens of billions of nodes.

[0073] It should be understood that the above general description and the following detailed description are merely exemplary and do not limit this application. Attached Figure Description

[0074] The above and other objectives, features and advantages of this application will become more apparent from a detailed description of exemplary embodiments thereof with reference to the accompanying drawings.

[0075] Figure 1 A method for subgraph matching according to an example embodiment of this application is shown.

[0076] Figure 2 The flowchart shows the process of decomposing the target graph set and the subgraph set according to the same meta-structure.

[0077] Figure 3 This illustrates a method for determining a merging strategy for restoring a subgraph set based on an example embodiment.

[0078] Figure 4A A method for graph compression according to an example embodiment is shown.

[0079] Figure 4B An example of star compression is shown.

[0080] Figure 5 This illustrates a method for determining the connected components of a large data graph according to an example embodiment.

[0081] Figure 6 This illustrates a method for repeatedly performing graph compression and subgraph matching on a target graph set to filter star structures from the target graph set, according to an embodiment.

[0082] Figure 7 A method for determining the connected components of a large data graph according to another embodiment is shown.

[0083] Figures 8A-8E This shows a specific example of the subgraph matching process.

[0084] Figure 9 A method for segmenting a data graph according to an example embodiment is shown.

[0085] Figure 10 A block diagram of a cloud computing device according to an example embodiment of this application is shown. Detailed Implementation

[0086] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein; rather, they are provided so that this application will be thorough and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted.

[0087] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough understanding of embodiments of this application. However, those skilled in the art will recognize that the technical solutions of this application can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of this application.

[0088] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.

[0089] The terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.

[0090] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment that is mutually exclusive with other embodiments. Those skilled in the art will understand that the embodiments described herein can be combined with other embodiments.

[0091] Before describing the embodiments of this application, some terms involved in the embodiments of this application will be explained.

[0092] Subgraph matching: Finding a subgraph that is isomorphic to a given smaller graph within a given larger graph.

[0093] Graph isomorphism: If there is a one-to-one mapping function relationship between the nodes and edges of two graphs, then they are considered to be two completely equivalent graphs, i.e., graph isomorphism.

[0094] Graph compression: Compressing the number of edges in a graph without changing its connectivity, enabling low-cost data storage and computation.

[0095] MapReduce: A computing model, framework, and platform for parallel processing of big data.

[0096] Large data graph: A network graph formed by large relational data has a huge number of nodes, which is time-consuming or difficult to process using conventional methods. It is generally called a large data graph.

[0097] CBO: Cost-Based Optimization. It is an optimization strategy that the database engine uses when executing SQL statements. It generates a set of possible execution plans based on table statistics, estimates the cost of each plan, and selects the plan with the lowest cost to be executed by the executor. The table statistics typically include table size, number of rows, row length, data distribution in a single column, and index information.

[0098] k-tuples, also known as k-meta-paths, refer to a simplified naming of a type of subgraph structure according to certain rules, such as naming according to node type. For a bipartite graph, there are only two types of nodes, denoted as a and d, so the 2-meta-path is ad / da, and the 3-meta-path is ada / dad.

[0099] A connected component (CC) is a maximal connected subgraph of an undirected graph G. Every connected graph has only one connected component, which is itself. A disconnected undirected graph has multiple connected components, and every node in each connected component is connected by at least one path.

[0100] Graph querying or subgraph matching is suitable for identifying valuable graph patterns and structures from graph data. In processing massive amounts of data on big data platforms, a crucial process is learning the graph structure, and subgraph matching is a core algorithmic technique for understanding graph structures. However, some current subgraph matching schemes suffer from performance issues with large-scale graph data. For example, breadth-first search-based multi-way join algorithms transform subgraph matching into multi-way set intersection operations to obtain the query result. However, this algorithm is highly dependent on the graph structure of the query graph and the efficiency of the underlying set intersection operation. Meanwhile, depth-first search-based algorithms, which construct a search tree to obtain the final query result, are only suitable for subgraph matching on small-scale datasets.

[0101] This invention proposes a scheme for subgraph matching of large-scale data, based on the same decomposition strategy and system merging strategy. The underlying logic of this scheme can be understood as follows: if a subgraph q and a target graph g are decomposed using the same decomposition strategy to obtain consistent meta-structural units, and merged using the same merging strategy to ensure consistent results at each merging step, ultimately resulting in a non-empty result set f, then q is a subgraph of g. In fact, assuming q is not a subgraph of g, i.e., at least one node a1 or one edge e1(a1,a2) in q cannot be mapped to g, and assuming node a1 or edge (a1,a2) participates in the merging at the k-th step, since the merging results are consistent, g needs to have a node and edge corresponding to q, which contradicts the assumption, and the aforementioned conclusion should hold.

[0102] The subgraph matching scheme proposed in this application decomposes the subgraph and the target graph into identical meta-structural units, and then performs intersection and merging of these meta-structural units through a series of merging strategies, ultimately obtaining all subgraph instances that are isomorphic between the target graph and the subgraph. According to the technical solution of this application, it can support subgraph query functions for edge table data, and supports large-scale graph data query / matching capabilities such as hundreds of billions of edges and tens of billions of nodes.

[0103] The technical solution and its advantages of this application will be described in detail below with reference to the embodiments.

[0104] Figure 1 A method for subgraph matching according to an example embodiment of this application is shown.

[0105] See Figure 1 In S101, obtain the target graph set and the subgraph set.

[0106] According to the example embodiment, the target graph set and subgraph set are stored in the big data platform in the form of edge tables. For example, the device's data graph set and the subgraph set required for subgraph matching are stored in the big data platform in the form of edge tables, but this application is not limited to this. The big data platform can process massive amounts of data and serves the storage / computation of massive amounts of data, analysis and modeling of big data, etc. In some scenarios, the device's data graph can be generated as the target graph set by collecting device logs, etc.

[0107] In S103, the target graph set and the subgraph set are decomposed according to the same meta-structure, so as to obtain the target graph meta-structure unit set and the subgraph meta-structure unit set, which each include multiple meta-structure units.

[0108] According to some embodiments, during the decomposition, the corresponding edge tables of the target graph set and the subgraph set are obtained. Then, the edge tables are decomposed into triples, such that the resulting set of meta-structural units contains all the edges of the corresponding edge tables, and each meta-structural unit is unique and shares at least one node.

[0109] By unifying the edge data into suitable basic meta-structural units, such as k-meta path, the search space of subsequent merging modules can be reduced.

[0110] According to some embodiments, the number of nodes in the meta-structural unit can also be adjusted to adaptively iteratively optimize the decomposition results and improve decomposition efficiency.

[0111] According to some embodiments, after obtaining the corresponding edge table, it is determined whether the edge table is a bipartite graph. If it is not a bipartite graph, bidirectional edge storage is performed to ensure the integrity of the decomposition result.

[0112] In S105, a merging strategy for restoring to the subgraph set is determined for the set of subgraph primitive structural units.

[0113] According to the example embodiment, by searching the merging strategy, the meta-structural units (k-tuples) and intersection conditions (join operations) for each round of merging when recovering the subgraph set can be determined. In addition, the merging strategy can be optimized by combining the target graph set data, thereby reducing the overall number of calculations and narrowing the search space for each round, which will be described in detail later.

[0114] In S107, a merging strategy is executed on the target primitive structural unit set to obtain the merging result.

[0115] According to the example embodiment, after obtaining the merging strategy, the intersection conditions are obtained from the merging strategy in sequence. Then, the target primitive structural unit set is merged according to the intersection conditions, and the target primitive structural unit set is updated with the obtained merging result. Then, the merging continues under the next intersection condition.

[0116] In S109, the subgraph matching result is obtained based on the aforementioned merging result. For example, the number of matches in the merging result can be counted; and / or the matched nodes can be obtained.

[0117] Figure 2 The flowchart shows the process of decomposing the target graph set and the subgraph set according to the same meta-structure.

[0118] See Figure 2 In S201, the edge tables corresponding to the target graph set and the subgraph set are obtained respectively. As mentioned above, the target graph set and the subgraph set can be stored in the form of edge tables.

[0119] In S203, determine if the edge list is a bipartite graph. If it is, proceed to S207; otherwise, proceed to S205.

[0120] In S205, when the edge table is not a bipartite graph, all edges are stored bidirectionally to ensure the integrity of the decomposition results.

[0121] In S207, the edge table is decomposed into triples.

[0122] According to the scheme of this application, in order to reduce the search space of subsequent merging operations, the target graph set and the subgraph set are uniformly processed into suitable basic meta-structural units (k-tuples or k-meta paths).

[0123] In S209, it is determined whether the obtained set of meta-structural units satisfies the following conditions: it contains all the edges of the corresponding edge table, and any meta-structural unit therein is unique and has other meta-structural units sharing at least one node. If it does not satisfy the condition, proceed to S207 to continue decomposition; if it does satisfy the condition, increase the number of nodes of the meta-structural unit by one, and proceed to S211.

[0124] In S211, the cost of decomposing into new meta-structural units is estimated. In research practice, the inventors found that the algorithm performs better when k=3, but this application is not limited to this. Specific meta-structural units are automatically found based on the subgraph structure. Furthermore, as described here, the algorithm can adjust the number of nodes in the meta-structural units based on k=3 to adaptively iteratively optimize the decomposition results and improve computational efficiency.

[0125] In S213, determine whether the cost is greater than the cost threshold. If it is not greater than the cost threshold, proceed to S207 to continue the decomposition; otherwise, stop the optimization process and output the decomposition result.

[0126] Figure 3 This illustrates a method for determining a merging strategy for restoring a subgraph set based on an example embodiment.

[0127] See Figure 3 In S301, the first metastructure unit q is randomly selected from the set of sub-metastructure units Qs.

[0128] In S303, the first element structure unit is removed from the set of sub-element structure units, i.e., Qs = Qs\q.

[0129] In S305, meta-structural units with the same nodes or edges as the first meta-structural unit q are selected from the set of sub-graph meta-structural units Qs to form the neighbor set Nq.

[0130] In S307, the intersection conditions between the first metastructural unit q and each metastructural unit in the neighbor set Nq are determined respectively.

[0131] In S309, the execution cost of intersection conditions on the target primitive structural unit set Gs is estimated using the CBO algorithm.

[0132] To further reduce the number of subgraph matching iterations and shrink the solution space, it is necessary to determine the order of merging meta-structural units. Here, we can draw on the cost estimation strategy of CBO in SQL to evaluate the execution cost of each merging strategy, ultimately providing a merging strategy with the lowest execution cost to guide the rapid merging of Gs.

[0133] In S311, select the intersection condition and the corresponding metastructure unit q' of the neighbor set that have the lowest execution cost, add the intersection condition to the merging strategy M, update the first metastructure unit q with the corresponding intersection result, and remove the corresponding metastructure unit q' of the neighbor set from the subgraph metastructure unit set Qs.

[0134] In S313, determine whether the first primitive structural unit q contains all the edges initially present in the sub-primitive structural unit set Qs. If the result is no, proceed to S305; otherwise, obtain the completed merging strategy.

[0135] The subgraph matching method in the example embodiment supports edge tables and can handle graph matching tasks with hundreds of billions of edges through decomposition and merging strategies. Furthermore, through adaptive decomposition and adaptive merging modules, the search space for each round can be reduced based on the query graph structure, thereby optimizing overall computational efficiency.

[0136] When processing complex graph structures, graph compression algorithms can improve processing efficiency. Therefore, this application also proposes a graph compression scheme.

[0137] Figure 4A A method for graph compression according to an example embodiment is shown. Figure 4A The illustrated embodiment proposes a graph edge compression algorithm that reduces the number of edges while allowing the graph to exhibit a star-shaped structure. An example of star-shaped compression is shown below. Figure 4B .

[0138] See Figure 4A In S401, obtain the target graph set to be compressed. For example, the target graph set G = (V, E), where V is the set of nodes and E is the set of edges.

[0139] In S403, each node u (u∈V) of the target graph set G is obtained as a rotating node and the first-order neighbor N(u) of the rotating node u is obtained to form the first set S(u)=N(u)∪u.

[0140] In S405, select the node with the smallest identifier value m(u) = argmin(S(u)) from the first set.

[0141] In S407, the edge connecting any node in the first-order neighbors to the rotating node is transformed into the edge connecting that arbitrary node to the node with the minimum identifier value, thereby compressing the edge set of the target graph set. That is, the edge (v,u) of any node v in N(u) is transformed into (v,m(u)).

[0142] In S409, update the target graph set with the compressed edge set E.

[0143] In S411, determine if the termination condition is met. If it is, output the updated edge set E; otherwise, go to S403. The termination condition can be that the edge set E no longer changes or the number of repetitions reaches a threshold (e.g., the threshold is 3).

[0144] The aforementioned process can be described as the following algorithm flow:

[0145] (1) Initialization: Large graph set G = (V, E), where V is the set of nodes and E is the set of edges.

[0146] (2) The following processes are processed in parallel:

[0147] a) Obtain each node u (where u belongs to V) and its respective first-order neighbors N(u), forming a set S(u) =

[0148] N(u)U{u};

[0149] b) Select the node with the smallest label value from S(u) as m(u) = argmin(S(u));

[0150] c) For any node v in N(u), the edge (v,u) is transformed into (v,m(u)), thereby compressing the set E N(u).

[0151] (3) Output the updated E.

[0152] The graph compression algorithm according to the embodiments of this application can reduce edge storage without changing connectivity, and can thus be used to speed up the calculation of connected components described later.

[0153] Connected component analysis, as one of the most fundamental algorithms in graph analysis, is the core of many data mining algorithms. However, in big data scenarios, traditional connected component calculation encounters performance bottlenecks in practice. This invention proposes an optimized connected component calculation algorithm based on subgraph matching and graph compression. This method enables stable and rapid calculation of connected components in large-scale graph data.

[0154] Figure 5 This illustrates a method for determining the connected components of a large data graph according to an example embodiment.

[0155] See Figure 5In S501, the target graph set and the subgraph set are obtained. The target graph set and the subgraph set are stored in the big data platform in the form of an edge table. The subgraph set includes at least one star-shaped subgraph.

[0156] In S503, based on the subgraph set, the aforementioned methods for subgraph matching and graph compression are used to repeatedly perform graph compression and subgraph matching on the target graph set to filter star structures from the target graph set. A star structure graph is a form that stores connected graphs with the minimum number of edges.

[0157] According to the example embodiment, the connected component calculation optimization algorithm based on subgraph matching and star graph compression can simplify the graph structure into a star structure without changing the connectivity, and can be quickly identified by combining the star subgraph matching algorithm. On the other hand, edge compression can save storage costs and speed up the calculation of connected components of large-scale graphs.

[0158] In S505, connected component calculations are performed on the remaining non-star structures after filtering. This step can be accomplished using other general graph computation schemes, which will not be elaborated here.

[0159] In S507, the final result of the connected components is output.

[0160] According to some examples, for dense data graphs (such as device identifier relationship networks), the optimization calculation method according to the aforementioned embodiments can optimize the computation from hundreds of billions of original edges to tens of billions, and for tens of billions of original edges, the optimization can reduce the computation speed to 50%. For hundreds of billions of original edges, existing technologies struggle to handle this, while the technical solution according to the embodiments of this application can complete the computation using 70 servers. For tens of billions of original edges, existing technologies require 50 servers, while the technical solution according to the embodiments of this application only requires 25 servers.

[0161] Figure 6 This illustrates a method for repeatedly performing graph compression and subgraph matching on a target graph set to filter star structures from the target graph set, according to an embodiment.

[0162] See Figure 6 First, the target graph set and subgraph set are obtained. Then, graph compression of k rounds is performed on the target graph set (generally k can be 3 rounds, this value is affected by the structure of the input graph), resulting in an updated target graph set.

[0163] Next, subgraph matching is used to filter star graphs from the target graph set.

[0164] After performing subgraph matching, it is determined whether the proportion of the remaining non-star-shaped structures after filtering is greater than a threshold (e.g., 30%). If it is still greater than the threshold, the remaining non-star-shaped structures are used as the updated target graph set, and compression is continued.

[0165] Conversely, if the proportion of the remaining non-star-shaped structures after filtering is not greater than the threshold, then graph compression and subgraph matching are stopped, and the remaining non-star-shaped structures are output.

[0166] Figure 7 A method for determining the connected components of a large data graph according to another embodiment is shown.

[0167] Figure 7 The method and Figure 5-6 The difference in the method shown is that graph compression is not used. Figure 7 The method shown is suitable for sparse graphs, and according to some examples, it still achieves a significant efficiency improvement even without graph compression.

[0168] See Figure 7 First, obtain the target graph set and the subgraph set. The target graph set and the subgraph set are stored in the big data platform in the form of an edge table. The subgraph set includes at least one star-shaped subgraph.

[0169] Then, based on the subgraph set, the aforementioned subgraph matching method is used to perform subgraph matching on the target graph set, thereby identifying the star graph in the target graph set.

[0170] After subgraph matching is performed, connected component calculation is performed on the non-star graphs other than the filtered star graphs. Finally, the final results of the connected components can be output.

[0171] Based on some examples, for sparse data graphs (such as device identifier relationship networks), the optimization calculation method according to the aforementioned embodiments can be optimized to the level of hundreds of millions for original edges in the billions. For original edges in the billions, the prior art requires 10 servers to complete the calculation, while the technical solution according to the embodiments of this application only requires 2 servers.

[0172] Figures 8A-8E This shows a specific example of the subgraph matching process.

[0173] like Figure 8A As shown, a specific example is given of the subgraph set, the edge table stored in the subgraph set, the target graph set, and the edge table stored in the target graph set.

[0174] Figure 8B It is the disassembly result obtained after disassembly.

[0175] See Figure 8C In S801, a metastructural unit q is randomly selected from Qs, for example, q = q0.

[0176] In S803, after removing q from Qs, Qs = {q1, q2} is selected, and the set of subgraphs with the same nodes / edges as q0 is selected, denoted as Nq.

[0177] In S805, if q0 is merged with q1 first, we get M(0) = Qs join Qs on Qs.node1 = Qs.node1 and Qs.node3 = Qs.node3 and Qs.node2! = Qs.node2; if q0 is merged with q2 first, we get M(0) = Qs join Qs on Qs.node3 = Qs.node1 and Qs.node1! = Qs.node3 and Qs.node2! = Qs.node2. The costs of the two strategies can be estimated using the CBO algorithm and Gs data, and finally, we determine M(0) = Qs join Qs on Qs.node1 = Qs.node1 and Qs.node3 = Qs.node3 and Qs.node2! = Qs.node2. We then update q using the result of merging q and q1 (the structure is shown in the figure), and after removing q1 from Qs, Qs = {q2}.

[0178] In S807, select the set Nq' = {q2} from Qs that has the same nodes / edges as q.

[0179] In S809, since Nq' contains only one metastructure, there is only one merging strategy: M(1) = Qs join R(0) on Qs.node2 = R(0).node4 and Qs.node1 = R(0).node3.

[0180] Referring to 8D, apply the merging strategy M(0,1) to the target primitive structural unit Gs. According to the strategy M(0) = Gs joinGs on Gs.node1 = Gs.node1 and Gs.node3 = Gs.node3 and Gs.node2! = Gs.node2, the result F(0) is obtained.

[0181] Following the strategy M(1) = Gs join F(0) on Gs.node2 = F(0).node4 and Gs.node1 = F(0).node3, we obtain the result F(1).

[0182] By comparing F(1) and R(1), we can obtain Figure 8E The subgraph matching results are shown.

[0183] Figure 9 A method for segmenting a data graph according to an example embodiment is shown, wherein the aforementioned subgraph matching technique is applied.

[0184] See Figure 9In step S901, multiple predefined feature sub-graphs of a predetermined scene are determined. According to the example embodiment, multiple predefined feature sub-graphs of a predetermined scene can be determined automatically or manually through statistical analysis, machine learning, manual analysis, etc.

[0185] In S902, obtain the scene data map of the predetermined scene.

[0186] According to the example embodiment, the scene data graph and multiple predefined feature subgraphs are stored in the big data platform in the form of an edge table, but this application is not limited thereto.

[0187] According to some embodiments, after acquiring the scene data graph, a connected component algorithm can be performed on the scene data graph to obtain connected component clustering results. Then, the number of nodes in each connected component is determined, and connected components with a number of nodes higher or lower than a threshold are excluded from the scene data graph to be segmented, reducing the processing pressure and improving the efficiency of subsequent processing.

[0188] In S903, subgraph matching is performed on the scene data graph to obtain a matching set that includes at least one matching instance. Each matching instance is isomorphic to one of a plurality of predefined feature subgraphs.

[0189] According to some embodiments, existing mature subgraph matching algorithms can be used to identify matching instances in the scene data graph that are isomorphic to any predefined feature subgraph, and all identified matching instances constitute a matching set.

[0190] According to some embodiments, as described above, after obtaining at least one matching instance, matching instances with inclusion relationships can be merged to obtain an updated matching set, thereby reducing the pressure of subsequent processing.

[0191] In S905, the attribution relationship of a node is determined based on the relationship between the node in the scene data graph and the matching set.

[0192] For any node in the scene data graph, it may exist in multiple matching instances in the matching set, so it is necessary to determine the node's affiliation.

[0193] According to some embodiments, the affiliation of a node can be determined based on its own attributes or its characteristics within the structure. Depending on the application objective, abnormal nodes can be excluded or retained.

[0194] According to some embodiments, for each matching instance in the matching set, the score of the matching instance can be determined based on factors such as the number of instances associated with the node, or instance attribute characteristics, or instance structure characteristics, and / or node characteristics, so as to determine the matching instance to which each node belongs through a voting mechanism.

[0195] In S907, the connected components of the scene data graph are obtained based on the node affiliation, thereby realizing the segmentation of the scene data graph.

[0196] After determining the affiliation of nodes, nodes with the same affiliation can be selected to obtain the connected components of the scene data graph (e.g., Figure 4B As shown in the example, this completes the segmentation of the scene data graph. Each connected component can correspond to a physical scene, entity, entity set, or relation set, thereby enabling targeted application processing.

[0197] Based on the data segmentation scheme, this application also proposes a method to improve the accuracy of ad targeting.

[0198] According to the embodiment, a device data graph is generated based on device collection logs. Device identifiers appearing in the same log entry can be considered different descriptions of the same device. The device data graph can be generated by collecting device logs, etc., where device identifier nodes form a device relationship network graph through connecting edges.

[0199] Then, the connected components of the device data graph can be obtained using the aforementioned method. The raw collected log data contains a large amount of noise, such as abnormal behaviors like device switching, flashing, device farming, and software generation, which introduce numerous noisy edges, causing multiple physical devices to connect together and form a large graph. This will prevent accurate user location. If the same advertisement is delivered to all clients associated with nodes in the large graph, it will result in inefficient and erroneous ad delivery.

[0200] Therefore, the device data graph can be segmented using the method described above according to the embodiments of this application to obtain multiple connected components, each of which can correspond to an actual normal device.

[0201] In this way, based on the client profiles obtained from one or more nodes of the same connected component, the same or similar advertisements are delivered to all nodes of the corresponding connected component.

[0202] By accurately mapping connected components to physical devices and precisely pushing ads based on client profiles, the conversion efficiency of ad delivery can be improved.

[0203] Figure 10 A block diagram of a cloud computing device according to an example embodiment of this application is shown.

[0204] like Figure 10 As shown, the cloud computing device 30 includes a processor 12 and a memory 14. The cloud computing device 30 may also include a bus 22, a network interface 16, and an I / O interface 18. The processor 12, memory 14, network interface 16, and I / O interface 18 can communicate with each other via the bus 22.

[0205] The processor 12 may include one or more general-purpose CPUs (Central Processing Units), microprocessors, or application-specific integrated circuits, etc., for executing relevant program instructions.

[0206] Memory 14 may include a machine system readable medium in the form of volatile memory, such as random access memory (RAM), read-only memory (ROM), and / or cache memory. Memory 14 is used to store one or more programs containing instructions, as well as data. Processor 12 may read the instructions stored in memory 14 to perform the methods described above according to embodiments of this application.

[0207] The cloud computing device 30 can also communicate with one or more networks through the network interface 16. The network interface 16 can be a wired network interface, a wireless network interface, or a virtual network interface.

[0208] The cloud computing device 30 can also communicate with one or more external devices (such as audio input devices, audio output devices, cameras, keyboards, mice, monitors, various sensors, etc.) through the input / output (I / O) interface 18.

[0209] Bus 22 may include an address bus, a data bus, a control bus, etc. Bus 22 provides a path for exchanging information between various components.

[0210] It should be noted that, in specific implementations, the cloud computing device 30 may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the device described above may only include the components necessary for implementing the embodiments of this specification, and not necessarily all the components shown in the figures.

[0211] This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method. The computer-readable storage medium may include, but is not limited to, any type of disk, including floppy disks, optical disks, DVDs, CD-ROMs, microdrives, as well as magneto-optical disks, ROMs, RAMs, EPROMs, EEPROMs, DRAMs, VRAMs, flash memory devices, magnetic cards or optical cards, nanosystems (including molecular memory ICs), network storage devices, cloud storage devices, or any type of medium or device suitable for storing instructions and / or data.

[0212] This application also provides a computer program product including a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the methods described in the above method embodiments.

[0213] Those skilled in the art will clearly understand that the technical solutions of this application can be implemented using software and / or hardware. In this specification, "unit" and "module" refer to software and / or hardware capable of independently performing or cooperating with other components to perform a specific function, where the hardware may be, for example, a field-programmable gate array (FPGA), integrated circuit, etc.

[0214] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0215] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0216] In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some service interface; the indirect coupling or communication connection between apparatuses or units may be electrical or other forms.

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

[0218] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0219] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage device. Based on this understanding, the technical solution of this application, in essence, 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. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application.

[0220] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0221] The embodiments of this application have been described and explained in detail above. It should be clearly understood that this application describes how specific examples are formed and used, but this application is not limited to any details of these examples. Rather, based on the teachings of the disclosure of this application, these principles can be applied to many other embodiments.

[0222] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or refuse.

[0223] Through the description of the example embodiments, those skilled in the art will readily understand that the technical solutions according to the embodiments of this application have at least one or more of the following advantages.

[0224] According to some implementations, it can support subgraph query function of edge table data, and support large-scale graph data query / matching capabilities such as hundreds of billions of edges and tens of billions of nodes.

[0225] According to some embodiments of graph compression algorithms, edge storage can be reduced without changing connectivity, thereby accelerating the computational speed of subsequent data processing.

[0226] According to some embodiments of the connected component computation optimization algorithm based on subgraph matching and graph compression, the connected components of large-scale graph data can be computed stably and quickly.

[0227] Exemplary embodiments of this application have been specifically shown and described above. It should be understood that this application is not limited to the detailed structures, arrangements, or implementation methods described herein; rather, this application is intended to cover various modifications and equivalent arrangements contained within the spirit and scope of the appended provisions.

Claims

1. A method for improving the accuracy of advertising targeting, characterized in that, include: Based on the device's collected logs, generate device data graphs as the target graph set; Multiple predefined feature subgraphs are identified as a set of subgraphs, and the target graph set and the set of subgraphs are stored in the form of an edge table. The target graph set and the subgraph set are decomposed according to the same meta-structure to obtain a target graph meta-structure unit set and a subgraph meta-structure unit set, each including multiple meta-structure units. The edge tables corresponding to the target graph set and the subgraph set are obtained respectively. The edge tables are decomposed into triples, such that the obtained meta-structure unit set contains all the edges of the corresponding edge table and each meta-structure unit is unique and has other meta-structure units that share at least one node. A merging strategy for restoring to the subgraph set is determined for the subgraph primitive structural unit set; The merging strategy is executed on the target primitive structural unit set to obtain the merging result; Based on the merging result, a matching set is obtained, which includes at least one matching instance, and each matching instance is isomorphic to one of the plurality of predefined feature subgraphs; The attribution relationship of the node is determined based on the relationship between the node in the scene data graph and the matching set; The connectivity components of the device data graph are obtained based on the node affiliation relationships. Based on the client profiles obtained from one or more nodes in the same connected component, the same or similar advertisements are delivered to all nodes in the corresponding connected component.

2. The method as described in claim 1, characterized in that, This also includes iterative optimization of the disassembly results through the following process: Gradually increase the number of nodes in the meta-structural unit and estimate the cost of disassembling it into a new meta-structural unit; If the cost is not greater than the cost threshold, then the edge table is decomposed using a new meta-structural unit; If the cost exceeds the cost threshold, the optimization process is stopped.

3. The method as described in claim 1, characterized in that, The method further includes obtaining the edge tables corresponding to the target graph set and the subgraph set, respectively, and: If the edge table is determined not to be a bipartite graph, then bidirectional edge storage is performed.

4. The method as described in claim 1, characterized in that, Determining a merging strategy for restoring the subgraph set to the subgraph set includes: Randomly select a first element structure unit from the set of sub-element structure units; After removing the first metastructure unit from the set of sub-metastructure units, repeat the following operations until the first metastructure unit contains all the edges that the set of sub-metastructure units initially had, thus obtaining the merging strategy: From the set of sub-graph element structural units, select element structural units that have at least one node in common with the first element structural unit to form a neighbor set; Determine the intersection conditions between the first meta-structural unit and the meta-structural units in the neighbor set; The execution cost of the intersection condition on the target primitive structural unit set is estimated using the CBO algorithm; Select the intersection condition and the corresponding metastructure unit of the neighbor set with the minimum execution cost, add the intersection condition to the merging strategy, update the first metastructure unit with the corresponding intersection result, and remove the corresponding metastructure unit of the neighbor set from the subgraph metastructure unit set.

5. The method as described in claim 4, characterized in that, The merging strategy is executed on the target primitive structural unit set, including repeatedly performing the following operations until all intersection conditions in the merging strategy have been executed: Obtain the intersection conditions sequentially from the merging strategy; The target primitive structural unit set is merged according to the intersection condition, and the target primitive structural unit set is updated with the merged result.

6. A cloud computing device, characterized in that, include: processor; A memory, on which computer programs are stored; When the processor executes the computer program, it implements the method as described in any one of claims 1-5.