Incremental uncertainty graph query method and device based on dynamic index

By adopting the incremental query method of dynamic indexing on uncertain graphs, the problem of low index construction and update efficiency in the existing technology is solved, efficient query and real-time index update are realized, and it is suitable for application scenarios of large-scale uncertain graphs.

CN119862309AInactive Publication Date: 2025-04-22ZHEJIANG UNIV CITY COLLEGE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510344191.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-24
Publication Date
2025-04-22
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art is difficult to achieve efficient index construction and dynamic updates on uncertain graphs, which makes it difficult to ensure query efficiency and accuracy, especially in large graphs and incremental update scenarios.

Method used

The incremental uncertain graph query method based on dynamic index is adopted, and real-time query is realized by initializing the index structure, node-by-node graph sampling, pre-calculating key attributes, generating initial state labels, and partially resampling and dynamically updating the index labels when the graph data is incrementally changed, real-time query is realized.

Benefits of technology

It improves query efficiency and index construction efficiency, can be applied on large images, and quickly updates indexes when graph data changes in real time, and is suitable for social network analysis, traffic flow forecasting and other fields.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119862309A_ABST
    Figure CN119862309A_ABST
Patent Text Reader

Abstract

The invention relates to an incremental uncertain graph query method and device based on a dynamic index, and the method comprises the steps: carrying out the initialization of an index structure of input graph data, sorting graph nodes, and determining a sampling sequence of an index construction label calculation process; performing graph sampling node by node, pre-calculating key attributes, generating an initial state tag, and storing the initial state tag as an index structure; when incremental change of the graph data occurs, determining an affected node range, performing partial resampling, and dynamically updating an index tag; and scanning the corresponding index tag, and carrying out a calculation method based on two-hop coverage. The method has the beneficial effects that by using the index structure, the query efficiency is greatly improved; compared with the existing uncertain graph indexing method, the method has the advantages that the estimated value with theoretical guarantee can be obtained by sampling each node once, and the efficiency of index construction is remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of graph query technology, and more specifically, to an incremental uncertain graph query method and device based on dynamic indexing. Background Art

[0002] With the advent of the big data era, graph data is increasingly used, playing an important role in social network communication, traffic path management, bioinformatics and other fields. As a special graph structure, uncertain graphs can not only express the fuzziness of nodes and edges, but also reflect the uncertainty of information in the real world. Therefore, they have been widely studied and applied in the field of graph learning.

[0003] Graph query is a basic task in graph learning. Graph query tasks are mainly responsible for mining graph data to obtain relevant information and attributes of specific nodes, edges or subgraphs. It can reveal key information in complex graph structures and provide practical solutions for practical problems such as influence maximization, traffic management, and financial analysis. Two common graph query tasks on uncertain graphs are reachability probability and expected distance query between two points. Among them, reachability probability query aims to evaluate the probability of connectivity between two points in an uncertain graph. This query can help users understand connectivity in an uncertain environment and support decision making; expected distance query focuses on the expectation of the shortest distance between two points, taking into account all paths in the graph and their corresponding connectivity probabilities. This query provides a theoretical basis for path optimization and resource allocation. Research on reachability probability query and expected distance query for uncertain graphs can not only improve the accuracy and efficiency of graph queries, but also provide more reliable data support for a variety of application scenarios.

[0004] Indexing methods have been widely used in the field of deterministic graph queries and can efficiently support various query tasks. However, due to the complexity of the structure of uncertain graphs, important properties of deterministic graph indexes such as the triangle rule no longer exist on uncertain graphs, which also poses a great challenge to the construction of indexes. Therefore, mainstream uncertain graph query algorithms are usually optimizations of sampling algorithms to approximate the calculation of query results. However, this method will result in significant time and space consumption on large graphs, and the efficiency and accuracy of the query are difficult to be theoretically guaranteed. Therefore, the research on efficient indexing methods for uncertain graphs is particularly important.

[0005] In real-world scenarios, graph data is constantly changing. For example, user relationships in social networks, road conditions in traffic networks, and interactions in biological networks may all be updated as new data emerges. These updates mainly refer to incremental updates, including the addition of nodes and edges. At this point, the dynamic update of the corresponding index is particularly critical. Traditional static indexing methods often require overall reconstruction when faced with incremental updates, which is not only time-consuming but also almost infeasible in large-scale graphs. Summary of the invention

[0006] The purpose of the present invention is to address the deficiencies of the prior art and to propose an incremental uncertain graph query method and device based on dynamic indexing.

[0007] In the first aspect, an incremental uncertain graph query method based on dynamic index is provided, including:

[0008] Step 1: Initialize the index structure of the input graph data, sort the graph nodes, and determine the sampling order of the index construction label calculation process.

[0009] Step 2: According to the sampling order, perform graph sampling node by node, pre-calculate key attributes and generate initial state labels, which are stored as index structures.

[0010] Step 3: When the graph data undergoes incremental changes, determine the affected node range, partially resample the nodes within the range, and dynamically update the index labels.

[0011] Step 4: According to the query request, scan the corresponding index tag, perform a two-hop coverage-based calculation method, and output the estimated value of the reachability probability and expected distance between the two points.

[0012] Preferably, step 1 comprises:

[0013] Step 1.1, construct an empty index label for each node and construct a reverse graph for the input graph;

[0014] Step 1.2: Sort the nodes according to their specific attributes to determine the order of subsequent sampling.

[0015] Preferably, step 2 comprises:

[0016] Step 2.1: Based on the improved pruning breadth-first search method, sample each node, estimate the reachability probability and expected distance between nodes, and generate the initial state label;

[0017] Step 2.2: Store the constructed labels in the form of indexes to obtain the corresponding index structure.

[0018] Preferably, in step 2.1, the improved pruning breadth-first search method includes: performing synchronous detection during the sampling process, using existing labels to perform detection queries on the current sampling nodes, and terminating the current sampling if a better solution to the current query is found in the existing labels.

[0019] Preferably, step 3 comprises:

[0020] Step 3.1: When the graph data changes incrementally, determine the affected node range through breadth-first search;

[0021] Step 3.2, partially resample the affected nodes;

[0022] Step 3.3: Update the index label so that the index structure reflects the changes in the graph data in real time.

[0023] Preferably, in step 3.3, updating the index tag includes:

[0024] If the label to be updated does not exist in the index, it is directly added to the index label of the corresponding node; if the label information to be updated exists in the index, the updated estimated value obtained by resampling the information is used to overwrite the original label.

[0025] Preferably, in step 4, a common intermediate node set of the query node pair is constructed, and the estimated values ​​of the reachability probability and the expected distance are calculated by scanning the two-hop coverage information in the index label; if the query node pair itself exists in the index label of the other party, the estimated value in the label is directly returned.

[0026] In a second aspect, an incremental uncertain graph query device based on a dynamic index is provided, which is used to execute any method described in the first aspect, including:

[0027] The initialization module is used to initialize the index structure of the input graph data, sort the graph nodes, and determine the sampling order of the index construction label calculation process;

[0028] A sampling module, used to perform graph sampling node by node according to the sampling order, pre-calculate key attributes and generate initial state labels, and store them as an index structure;

[0029] The update module is used to determine the affected node range when the graph data undergoes incremental changes, partially resample the nodes within the range, and dynamically update the index labels;

[0030] The output module is used to scan the corresponding index tag according to the query request, perform a calculation method based on two-hop coverage, and output the estimated value of the reachability probability and expected distance between two points.

[0031] According to a third aspect, a computer storage medium is provided, wherein a computer program is stored in the computer storage medium; when the computer program is executed on a computer, the computer executes any method described in the first aspect.

[0032] In a fourth aspect, an electronic device is provided, including:

[0033] Memory, used to store computer programs;

[0034] A processor is used to execute the computer program to implement any method as described in the first aspect.

[0035] The beneficial effects of the present invention are as follows: the use of the index structure of the present invention greatly improves query efficiency; compared with the existing uncertain graph indexing method, only one sampling of each node is required to obtain an estimated value with theoretical guarantee, which significantly improves the efficiency of index construction; the introduction of the pruning method avoids repeated calculations in the index construction process, and also avoids the introduction of a large number of repeated labels, compressing the index scale so that it can be applied to large graphs. The introduction of the index dynamic update method ensures that the index can be quickly updated at a relatively low cost when the graph data changes in real time, so that the present invention can be well applied in the fields of social network analysis, traffic flow prediction, risk assessment, etc., and has good theoretical properties. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 A flowchart of an incremental uncertain graph query method based on dynamic indexing provided by an embodiment of the present invention;

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

[0038] Figure 3 A framework diagram of the initial index construction process provided by an embodiment of the present invention;

[0039] Figure 4 A framework diagram of the dynamic update process provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0040] The present invention is further described below in conjunction with embodiments. The description of the following embodiments is only used to help understand the present invention. It should be noted that for ordinary persons in the art, without departing from the principle of the present invention, the present invention can also be modified in some ways, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.

[0041] Embodiment 1:

[0042] In a social network application scenario, such as a video website, the attention relationship between users can be regarded as a directed uncertain graph structure. If user A follows user B, then A has a certain probability of receiving the information disseminated by user B. Such an attention relationship can be regarded as a directed edge from node B to node A. The edge probability is the trust of user A in user B, that is, the probability that user A receives information from user B. Since the propagation speed of each edge in the network is basically the same, the path length for user B to propagate information to user A can reflect the speed of information propagation; the expected distance between the two is the average time for information propagation. The attention between users will change over time, which can be corresponded to the dynamic increment on the uncertain graph. When reading in data, the attention and trust between users are pre-stored as index tags in the form of an uncertain graph, and the index structure is updated in real time with the addition of attention between users. This can efficiently respond to queries on trust between users and average propagation time at any time, thereby calculating the probability of information propagation between corresponding users, which belongs to the graph query task.

[0043] Figure 2 A simple example of an abstract social network relation uncertainty graph is given. The nodes represent network users, the edges represent the attention relationship between users, and the edge probability is the probability of information transmission between the two. For example, the node to There is a probability The edge means that the user Followed users , and the user The message sent is The probability of being used by the user Receive. Node to There is a dashed line between them with probability The edges represent the newly added information that users pay attention to during the development of the network. As new information is input, the information dissemination between users will also change. On this incremental social network, Figure 1 As shown, Embodiment 1 of the present application provides an incremental uncertain graph query method based on a dynamic index, including:

[0044] Step 1: Initialize the index structure of the input graph data, sort the graph nodes, and determine the sampling order of the index construction label calculation process.

[0045] For example, in step 1, the graph data may be a social network, and the graph nodes are users.

[0046] Step 2: According to the sampling order, perform graph sampling node by node, pre-calculate key attributes and generate initial state labels, which are stored as index structures.

[0047] For example, according to the obtained sampling order, the user trust relationship is sampled node by node, the key attributes are pre-calculated, the initial state label is obtained and stored; pruning is performed in the sampling and pre-calculation process to optimize the calculation. After completing the sampling of all users, the corresponding index structure is obtained.

[0048] Pre-calculation completes the sampling of trust relationships and propagation speeds between users. After pre-calculation, each user on the video website obtains the trust relationship and information propagation time labels between other users on the website. After processing by the pruning module, the duplicate labels are removed to ensure that as few labels as possible can cover as much propagation information as possible; after index storage, the calculated labels are constructed into a complete index structure. The index stores the trust relationship and information reception time between each user and other users, providing a basis for efficient query of subsequent user relationships.

[0049] Step 3: When the graph data undergoes incremental changes, determine the affected node range, partially resample the nodes within the range, and dynamically update the index labels.

[0050] For example, newly added user attention information is input to determine the users whose labels will change, and a partial resampling of users within this range is performed to complete the dynamic update of the index label.

[0051] Step 4: According to the query request, scan the corresponding index tag, perform a two-hop coverage-based calculation method, and output the estimated value of the reachability probability and expected distance between the two points.

[0052] For example, for the input query information, the index tags corresponding to the user to be queried are scanned, and calculations based on two-hop coverage are performed to obtain estimates of the reachability probability and expected distance between two points on the uncertain graph, which are the trust between users and the average time required for information dissemination.

[0053] Embodiment 2:

[0054] Based on Example 1, Example 2 of the present application provides a more specific incremental uncertain graph query method based on dynamic index, including:

[0055] Step 1: Initialize the index structure of the input graph data, sort the graph nodes, and determine the sampling order of the index construction label calculation process.

[0056] Step 1 specifically includes:

[0057] Step 1.1. Construct an empty index label for each node and construct a reverse graph for the input graph.

[0058] Specifically, in step 1.1, construct an empty index label for each node And for the input graph Constructing a reverse graph Each node The index labels are divided into positive labels and reverse labels , which are all initialized to empty at this stage. and The same structure, consisting of a series of triplets Composition, of which represents the pre-computed estimate of the reachability probability, Represents a precomputed estimate of the expected distance. Forward label Tags in Represents a slave node To Node The reachability probability is , the expected distance is ; Similarly, the reverse label The labels in the table represent slave nodes. To Node The reachability probability is , the expected distance is . and The point set is the same as the edge set, but all edges are The reverse edge of the middle edge. The initialization process obtains the overall label ,in . Reverse graph It facilitates the subsequent sampling process. During the sampling process, the forward labels of the relevant sampling nodes are constructed by searching the path on the reverse graph, thereby completing the index query based on two-hop coverage. The construction of the reverse graph helps to improve the efficiency and accuracy of the method and simplify the complexity of the method.

[0059] Step 1.2: Sort the nodes according to their specific attributes to determine the order of subsequent sampling.

[0060] Specifically, in step 1.2, the user access priority is sorted according to a specific attribute to determine the subsequent pre-calculated user access order. In this step, the node degree-based sorting is used. When reading the graph data, the degree of each user is counted and stored. The user degree is the number of users who follow the user. Then the users are sorted in descending order of degree to obtain an ordered user node list. , as the order in which users are accessed in subsequent steps. Figure 2 The network in is sorted according to the node degree to obtain the sampling order .

[0061] Step 2: Figure 3As shown, according to the sampling order, graph sampling is performed node by node, key attributes are pre-calculated and initial state labels are generated and stored as an index structure.

[0062] Step 2 includes:

[0063] Step 2.1: Based on the improved pruning breadth-first search method, sample each node, estimate the reachability probability and expected distance between nodes, and generate the initial state label.

[0064] Specifically, according to the constructed user access list , the nodes in the graph are sampled one by one based on the improved pruned breadth-first search method, so that the reachability probability and expected distance between two points can be efficiently estimated through one sampling. The traditional pruned breadth-first search is a node-based sampling method used to determine the shortest path index construction of the graph. Each node is visited at most once, and only the shortest path between two points is considered. In contrast, the improved breadth-first search method is an edge-based breadth-first sampling method that visits each edge at most once. It can sample multiple different paths between two points and consider the connection of multiple paths at the same time, thereby realizing the calculation of the reachability probability and expected distance in an uncertain graph, and the estimated value is a theoretically guaranteed lower bound of the true value.

[0065] Further, step 2.1 includes:

[0066] Step 2.1.1: Ordered node list Visit the nodes one by one in the order For each visited node , perform the following initialization operations: mark all edges in the graph as unvisited; set the reachability probability of all nodes , expected distance visits , the current access path length , access count counter , . Then the node The corresponding access volume is initialized to , , , . Initialize an empty access queue , then the node Join middle.

[0067] Step 2.1.2: Execute graph attribute pre-calculation based on the improved pruning breadth-first search algorithm. The specific execution process is as follows: When it is not empty, it iteratively performs the following process: pop the first element of the queue . Record the time before this pre-calculation process Estimated probability of reachability and the expected distance estimate .

[0068] Step 2.1.3: Call the improved pruning breadth-first search method to determine whether to prune at this time. If pruning is required, proceed directly to step 2.1.6, otherwise, execute in sequence.

[0069] Step 2.1.4: All outgoing neighbors of , perform the following calculation to adjust the node Corresponding estimates between: If the edge has been visited, no subsequent operations are performed, and the next neighbor is directly jumped to for calculation; if the edge Not visited, first temporarily store the current reachability probability estimate , then update the visit count counter ; Current access path length ; Estimated probability of reaching If at this time or , expected distance estimate ,otherwise .

[0070] Step 2.1.5: Complete the storage and update of index tags. Stored to the corresponding reverse label middle.

[0071] Step 2.1.6: Reverse graph of Execute steps 2.1.2 to 2.1.4, and then make a judgment and store the tags that need to be stored. Store to the corresponding forward label 's construction.

[0072] Step 2.1.7: Join the access queue middle.

[0073] Step 2.1.8: If it is not empty, iteratively execute steps 2.1.2-2.1.7 until the queue is accessed. Is empty, at which point the construction of the initial state uncertain graph index is completed.

[0074] Step 2.2: Store the constructed labels in the form of indexes to obtain the corresponding index structure.

[0075] Specifically, the constructed labels are stored in the form of indexes to obtain the corresponding index structure for subsequent fast query. The index structure is constructed by the initialization step. Index By positive label and reverse labels Composition, that is ; The labels contain triplet information obtained by sampling.

[0076] A triple consisting of the estimated values ​​obtained during the forward sampling process For example, step 2.2 includes:

[0077] Step 2.2.1: If The containing node does not exist , and store it directly in Inside;

[0078] Step 2.2.2, if The node already exists in , let the existing label be ,make , using triples Cover the original label.

[0079] Need to explain, construct positive label The process is the same as above, just pay attention to the direction of the corresponding label.

[0080] In addition, the improved pruning breadth-first search method is as follows: synchronous detection is performed during the sampling process in step 2.1. Use the existing labels to perform a detection query on the current sampling node. If there is a better solution to the current query in the existing label (with a greater reachability probability and expected distance), it means that there is no need to obtain a better solution in the subsequent nodes through this round of sampling. At this time, the current sampling is terminated to minimize duplication and invalid labels.

[0081] For example, the specific implementation of pruning is:

[0082] (1) When The sampling process that starts detects the node When using the detection function Detection is performed within the existing tags. The detection function can query based on the tag situation in the current index. The specific query method is to reach the probability detection value , expected distance detection value .

[0083] (2) Compare it with the current estimate and Make a comparison.

[0084] (3) Classification discussion based on the comparison results:

[0085] Case 1: At this point, a better solution than the existing sampling process can be obtained within the current label, so subsequent sampling is not required. The subsequent sampling here is pruned, and the pre-calculation steps (4)-(5) are directly skipped. There is no need to process its subsequent neighbors and add them to the access queue.

[0086] Case 2: At this time, there is a more optimal solution with reachable probability within the current label, and no more optimal solution with expected distance. Sampling continues; call the index storage step to store the triple Save as index tag.

[0087] Case 3: At this time, there is a better solution with expected distance in the current label, and no better solution with reachable probability. Sampling continues; call the index storage step to store the triple Save as index tag.

[0088] Case 4: At this point, the current sample can get a better solution than the existing label. Sampling continues.

[0089] Step 3: Figure 4 As shown, when the graph data changes incrementally, the affected node range is determined, and the nodes in the range are partially resampled, and the index labels are dynamically updated.

[0090] Step 3 includes:

[0091] Step 3.1: When the graph data undergoes incremental changes, determine the range of affected nodes through breadth-first search.

[0092] For example, after inputting the newly added attention information, the users whose labels may change are determined, and a user node set whose index labels may change is obtained. This is the return result of the dynamic update process scoping.

[0093] For example, when a user on a video website Add new follower , which means that the user The information will likely be disseminated to users , which is equivalent to adding a new edge in the uncertain graph . Assume that the corresponding edge probability is . At this point, step 3.1 includes:

[0094] Step 3.1.1: Add new edges to the input ,Pick The backward tag and The forward label of .like or To add a new node, first construct an index label for it.

[0095] Step 3.1.2: Initialize an empty point set .

[0096] Step 3.1.3: and All nodes included in Join If The middle node contains the node and The label of , delete it. At this time, the node set where the index update will occur is obtained , and clear the changed index tags.

[0097] Step 3.2: Partially resample the affected nodes.

[0098] For example, The nodes in the algorithm are resampled one by one to obtain the changes in the relationship between users on the website after the incremental update. The resampling process is similar to the previous one, but the sampling starting point is different from the previous algorithm. The resampling is performed in the middle to avoid repeated calculations and improve efficiency. Specifically, step 3.2 includes:

[0099] Step 3.2.1. From Departure, in Forward sampling is performed on the hop, where one hop neighbor only To take samples; from Start in the reverse diagram Reverse sampling is performed on the hop, where the one-hop neighbor only Take samples.

[0100] Step 3.2.2: Centropygus Node ,exist Forward sampling is performed on the node, where the sampling queue starts at node The estimated value of the initial reachability probability is , the initial expected distance estimate is . , When no edge update occurs in the current label Property estimates; and For the current label within Estimated value of the property.

[0101] Step 3.2.3: Centropygus Node ,exist Reverse sampling is performed on the node The estimated value of the initial reachability probability is , the initial expected distance estimate is . , When no edge update occurs in the current label Property estimates; and For the current label within Estimated value of the property.

[0102] Step 3.2.4: Call the pruning detection function during sampling Determine whether to terminate the current sampling. The pruning detection function is similar to the detection function in the initial index construction process. It performs a detection query on the attributes between two points in the current real-time index and compares the detection result with the updated result. If there is a reachable probability detection value Or expected distance detection value , then terminate the current sampling and proceed The sampling of the next node in .

[0103] Step 3.2.5: During the sampling process, update the tags that need to be updated.

[0104] In the above sampling process, the sampling process is the same as the breadth-first search method based on pruning in the pre-computation process. The difference in the update process lies in the sampling starting position and the pruning detection function.

[0105] Step 3.3: Update the index label so that the index structure reflects the changes in the graph data in real time.

[0106] In step 3.3, updating the index label includes: if the label to be updated does not exist in the index, directly adding it to the index label of the corresponding node; if the label information to be updated exists in the index, overwriting the original label with the updated estimated value obtained by resampling the information.

[0107] Specifically, step 3.3 includes:

[0108] Step 3.3.1: If the label to be updated does not exist in the index, add it directly to the index label of the corresponding node.

[0109] Step 3.3.2: If there is label information that needs to be updated in the index, the updated estimated value obtained by resampling the information will overwrite the original label. Departure to visit The updated labels obtained during the forward sampling process are stored in In Departure to visit The updated labels obtained during the reverse sampling process are stored in middle.

[0110] To update the index tags for newly added user attention information on the website, we first define the user set whose index may change through the scope definition module. Figure 2 Take the social network as an example. When a new directed edge After first taking and The set of nodes whose constituent indices have changed and need to be resampled; Since the node is not directly related to the newly added edge, its label content will not change and it does not need to be resampled. Then, starting from the two parties directly concerned, all users in the changed user set are processed by the resampling module to complete the recalculation of the corresponding attributes. To improve efficiency, mid-way sampling is used to avoid repeated sampling of unchanged parts, for example, During the resampling process, due to The connection relationship between them is not affected by the newly added edge, so it is directly connected from the end point of the newly added edge. In the sampling process, for the label information that needs to be updated, the index label that has changed is updated through the index dynamic update module. In specific operations, The forward sampling label of the outgoing In the reverse label of The reverse sampling label of the departure is updated to The forward label of is used to efficiently update the index of the dynamic graph with a small computational cost.

[0111] Step 4: According to the query request, scan the corresponding index tag, perform a two-hop coverage-based calculation method, and output the estimated value of the reachability probability and expected distance between the two points.

[0112] In step 4, a common intermediate node set of the query node pair is constructed, and the estimated values ​​of the reachability probability and expected distance are calculated by scanning the two-hop coverage information in the index label; if the query node pair itself exists in the index label of the other party, the estimated value in the label is directly returned.

[0113] Specifically, on the uncertain graph, for any starting point To the end Reachability Probability Query and expected distance query , using the two-hop coverage-based calculation formula, we can get the trust between users and the average time it takes for information to propagate between two users. In the calculation process, we first construct a set of public intermediate nodes , which contains Forward index of and Reverse index of All the common nodes in . That is, . Common intermediate node set That is, information from users Spread to users The process of scanning requires the use of intermediate users, which constitute the "bridge" of information transmission. All nodes in and The labels in are combined to obtain the estimated value of the corresponding query.

[0114] The estimation method for reachability probability query is:

[0115]

[0116] Right now and The estimated value of the probability of being reachable between The probability of reaching The maximum value of the product of the estimated probability of reachability between two nodes.

[0117] The expected distance is estimated by:

[0118]

[0119] Right now and The estimated value of the expected distance between The expected distance between The minimum sum of the expected distance estimates between the two nodes.

[0120] In particular, if or Itself is in the index tag of the other party, that is or , without going through the above process for calculation, it only needs to directly return the estimated value of the reachability probability and expected distance in the corresponding label. If both exist in the label of the other node at the same time, and their trust and propagation time are different, the label with greater trust and smaller propagation time is selected as the query result.

[0121] This query method is applicable to the index structure at any time, that is, the initial index labels obtained in step 2 and the index structure that has been partially dynamically updated can complete the graph query response through this calculation method. The above query methods can strictly guarantee that the results obtained are a lower bound of the accurate value in theory.

[0122] In addition, it also includes: Step 5, based on the query results of the trust between users and the speed of information dissemination, evaluate the probability and time of video recommendations, opinion analysis and other contents made by users at the query starting point being received by users at the query end point, and then find opinion leaders, key users, etc. in tasks such as advertising marketing and video recommendation, so as to maximize the dissemination of information in a relatively short period of time and complete the social network analysis task.

[0123] Specifically, when the client completes the query of the trust between users and the speed of information dissemination, it can obtain the user The information produced is used by the user The probability and speed of receiving. After making a video recommendation, if you want to understand the user The probability of trusting the recommended information can be calculated by using the reachable probability calculation formula to query the trust between the two. If an advertiser wants to introduce his product to a specified user, When selecting a promoter within a certain range, you can use the expected distance query to search for users with the shortest expected distance. Launch products, because the information of this user will be spread to users the fastest .

[0124] It should be noted that the parts in this embodiment that are the same or similar to those in Embodiment 1 can be referenced to each other and will not be described in detail in this application.

[0125] Embodiment 3:

[0126] Based on embodiments 1 and 2, embodiment 3 of the present application provides an incremental uncertain graph query device based on a dynamic index, including:

[0127] The initialization module is used to initialize the index structure of the input graph data, sort the graph nodes, and determine the sampling order of the index construction label calculation process;

[0128] A sampling module, used to perform graph sampling node by node according to the sampling order, pre-calculate key attributes and generate initial state labels, and store them as an index structure;

[0129] The update module is used to determine the affected node range when the graph data undergoes incremental changes, partially resample the nodes within the range, and dynamically update the index labels;

[0130] The output module is used to scan the corresponding index tag according to the query request, perform a calculation method based on two-hop coverage, and output the estimated value of the reachability probability and expected distance between two points.

[0131] Specifically, the device provided in this embodiment is a device corresponding to the method provided in Embodiments 1 and 2. Therefore, the parts in this embodiment that are the same or similar to Embodiments 1 and 2 can be referenced to each other and will not be repeated in this application.

[0132] In summary, the present invention proposes an incremental uncertain graph query method based on dynamic index, which solves the drawbacks of low efficiency and unsuitability for dynamic structures of traditional methods. Compared with other existing methods, the present invention can return effective query results on large-scale uncertain graphs in a very short time, improves query performance, expands the scope of application, and has good theoretical properties.

Claims

1. An incremental uncertain graph query method based on dynamic index, characterized in that: include: Step 1: Initialize the index structure of the input graph data, sort the graph nodes, and determine the sampling order of the index construction label calculation process; Step 2: Sample the graph node by node according to the sampling order, pre-calculate key attributes and generate initial state labels, which are stored as index structures; Step 3: When the graph data changes incrementally, determine the affected node range, partially resample the nodes within the range, and dynamically update the index labels; Step 4: According to the query request, scan the corresponding index tag, perform a two-hop coverage-based calculation method, and output the estimated value of the reachability probability and expected distance between the two points.

2. The incremental uncertain graph query method based on dynamic index according to claim 1 is characterized in that: Step 1 includes: Step 1.1, construct an empty index label for each node and construct a reverse graph for the input graph; Step 1.2: Sort the nodes according to their specific attributes to determine the order of subsequent sampling.

3. The incremental uncertain graph query method based on dynamic index according to claim 2 is characterized in that: Step 2 includes: Step 2.1: Based on the improved pruning breadth-first search method, sample each node, estimate the reachability probability and expected distance between nodes, and generate the initial state label; Step 2.2: Store the constructed labels in the form of indexes to obtain the corresponding index structure.

4. The incremental uncertain graph query method based on dynamic index according to claim 3 is characterized in that: In step 2.1, the improved pruning breadth-first search method includes: performing synchronous detection during the sampling process, using existing labels to perform detection queries on the current sampling nodes, and terminating the current sampling if a better solution to the current query is found in the existing labels.

5. The incremental uncertain graph query method based on dynamic index according to claim 4 is characterized in that: Step 3 includes: Step 3.1: When the graph data changes incrementally, determine the affected node range through breadth-first search; Step 3.2, partially resample the affected nodes; Step 3.3: Update the index label so that the index structure reflects the changes in the graph data in real time.

6. The incremental uncertain graph query method based on dynamic index according to claim 5 is characterized in that: In step 3.3, updating the index tag includes: If the label to be updated does not exist in the index, it is directly added to the index label of the corresponding node; if the label information to be updated exists in the index, the updated estimated value obtained by resampling the information is used to overwrite the original label.

7. The incremental uncertain graph query method based on dynamic index according to claim 6 is characterized in that: In step 4, a common intermediate node set of the query node pair is constructed, and the estimated values ​​of the reachability probability and expected distance are calculated by scanning the two-hop coverage information in the index label; if the query node pair itself exists in the index label of the other party, the estimated value in the label is directly returned.

8. An incremental uncertain graph query device based on dynamic index, characterized in that: Used to perform the method according to any one of claims 1 to 7, comprising: The initialization module is used to initialize the index structure of the input graph data, sort the graph nodes, and determine the sampling order of the index construction label calculation process; A sampling module, used to perform graph sampling node by node according to the sampling order, pre-calculate key attributes and generate initial state labels, and store them as an index structure; The update module is used to determine the affected node range when the graph data undergoes incremental changes, partially resample the nodes within the range, and dynamically update the index labels; The output module is used to scan the corresponding index tag according to the query request, perform a calculation method based on two-hop coverage, and output the estimated value of the reachability probability and expected distance between two points.

9. A computer storage medium, characterized in that The computer storage medium stores a computer program; when the computer program is executed on a computer, the computer executes any one of the methods described in claims 1 to 7.

10. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the method according to any one of claims 1 to 7.