CN117171401A - Query method and device for shortest path in graph data based on hierarchical pre-calculation - Google Patents

Query method and device for shortest path in graph data based on hierarchical pre-calculation Download PDF

Info

Publication number
CN117171401A
CN117171401A CN202311457494.1A CN202311457494A CN117171401A CN 117171401 A CN117171401 A CN 117171401A CN 202311457494 A CN202311457494 A CN 202311457494A CN 117171401 A CN117171401 A CN 117171401A
Authority
CN
China
Prior art keywords
node
nodes
layer
target
path
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202311457494.1A
Other languages
Chinese (zh)
Other versions
CN117171401B (en
Inventor
王乐乐
王永恒
李炳强
罗实
巫英才
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Lab
Original Assignee
Zhejiang Lab
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Lab filed Critical Zhejiang Lab
Priority to CN202311457494.1A priority Critical patent/CN117171401B/en
Publication of CN117171401A publication Critical patent/CN117171401A/en
Application granted granted Critical
Publication of CN117171401B publication Critical patent/CN117171401B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The specification discloses a query method and a query device for shortest paths in graph data based on hierarchical pre-calculation, when a query request is received, determining an initial node and a target node, and determining the shortest paths in the graph data generated by each layer of the initial node and the target node as each target path according to the shortest paths between the common node and the landmark nodes and the shortest paths between the landmark nodes in each layer of the graph generated by the pre-constructed layers of the graph generated by each layer of the graph. Even if the number of nodes contained in the target graph data is large, the shortest path between the common node and the landmark node can be quickly queried by using less computing resources to store the shortest path between the initial node and the target node, so that the query efficiency is ensured.

Description

Query method and device for shortest path in graph data based on hierarchical pre-calculation
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for querying a shortest path in graph data based on hierarchical precomputation.
Background
At present, with the development of computer technology and the requirement of service integration, the graph structure is widely applied to various network structures such as social networks, computer networks, semantic networks, highway networks and the like due to the characteristic that the graph structure can be used for describing complex relations among various entities in the real world. When the graph structure is used for abstracting the concrete application problem, the shortest path between the calculation vertexes becomes the basic operation of the graph data.
A common query mode is to calculate and store the shortest path between other nodes in the graph structure and each node in the graph structure in advance, determine the node identification corresponding to the node to be queried when the query is needed, determine the node to be queried according to the node identification, and further determine the shortest path according to the prestored node to be queried.
However, when the number of nodes included in the graph structure is too large, the number of shortest paths to be stored is too large, and the required computing resources are also large, which may cause that the querying device does not have storage resources to store the corresponding data, and thus the querying device cannot query.
Based on the above, the specification provides a query method and device for the shortest path in the oversized network based on hierarchical pre-calculation.
Disclosure of Invention
The present disclosure provides a method and an apparatus for querying a shortest path in graph data based on hierarchical pre-computation, so as to partially solve the foregoing problems in the prior art.
The technical scheme adopted in the specification is as follows:
the present specification provides a method for querying a shortest path in hierarchical pre-computed graph data, the method comprising:
receiving a query request of target graph data, and determining a starting node and a target node corresponding to the query request;
determining generation diagram data corresponding to the target diagram data, wherein the generation diagram data comprises a plurality of layers of generation diagrams, each layer of generation diagram comprises landmark nodes and common nodes, and the next layer of generation diagram is constructed according to the common nodes in the generation diagram of the layer;
determining the shortest paths of the initial node and the target node in the layer generation diagram according to the shortest paths between each common node and each landmark node, the position of the initial node and the position of the target node in the layer generation diagram, and taking the shortest paths as target paths in the layer generation diagram;
and returning each target path according to the query request.
Optionally, the method is applied to a server, and for each layer of generated graph, the server stores shortest paths corresponding to each common node in the layer of generated graph and each landmark node in the layer of generated graph;
determining the shortest path of the initial node and the target node in the layer generation diagram according to the shortest path between each common node and each landmark node, the position of the initial node and the position of the target node in the layer generation diagram, and taking the shortest path as the target path in the layer generation diagram, wherein the method specifically comprises the following steps:
determining a specified number of specific paths according to the shortest paths between each common node and each landmark node, the position of the starting node and the position of the target node in the layer generating graph, wherein the specific paths are paths taking the starting node as a starting point and the target node as an end point in the layer generating graph;
and determining the path length corresponding to each specific path, and determining the specific path with the shortest path length from the specific paths according to the path lengths as the target path in the layer generation graph.
Optionally, the method further comprises:
taking a target path in the layer generation diagram as a candidate path, and determining a candidate length corresponding to the candidate path;
Judging whether a designated path which takes the starting node as a starting point, takes the target node as an ending point and has a path length smaller than the candidate length exists or not according to the candidate length;
if yes, determining the designated path as a target path;
if not, determining the candidate path as a target path.
Optionally, before determining the target path in the layer generation graph, the method further includes:
determining the layer number of the generated graph contained in the generated graph data to be generated, and determining the number of landmark nodes corresponding to each layer of the generated graph respectively;
constructing an initial generation diagram by taking all nodes contained in the target diagram data as full nodes contained in the initial generation diagram, determining all landmark nodes from the full nodes contained in the initial generation diagram according to the number of landmark nodes corresponding to the initial generation diagram, and taking nodes except all landmark nodes in the full nodes as common nodes;
constructing the intermediate generation diagram by taking all the ordinary nodes in the initial generation diagram as full nodes of the intermediate generation diagram, continuously determining landmark nodes and ordinary nodes contained in the intermediate generation diagram, taking the intermediate generation diagram as the initial generation diagram again, and continuously constructing the intermediate generation diagram according to the ordinary nodes of the initial generation diagram which are determined again until the number of the intermediate generation diagrams obtained by construction reaches a preset number threshold;
And determining the generation diagram of each layer and the order of the generation diagram of each layer as generation diagram data according to the determined initial generation diagrams and the construction order of the initial generation diagrams.
Optionally, determining each landmark node from the total nodes included in the initial generation diagram according to the number of the corresponding landmark nodes in the initial generation diagram, which specifically includes:
determining the number of neighbor nodes corresponding to each node in the initial generation graph;
and sequencing all the nodes in the initial generation diagram according to the number of neighbor nodes corresponding to all the nodes in the initial generation diagram, and determining all the landmark nodes according to the sequencing and the number of landmark nodes corresponding to the initial generation diagram.
Optionally, each common node in the initial generation graph is used as a full-scale node of an intermediate generation graph, and the construction of the intermediate generation graph specifically comprises the following steps:
deleting each landmark node in the initial generation diagram in the target diagram data, deleting paths respectively corresponding to the landmark nodes, and taking a deleting result as an intermediate generation diagram.
Optionally, the number of landmark nodes included in each layer of generated graph in the generated graph data is not identical.
The present specification provides a shortest path query apparatus in hierarchical pre-computed graph data, the apparatus comprising:
the receiving module is used for receiving a query request of target graph data and determining a starting node and a target node corresponding to the query request;
the determining module is used for determining the generated graph data corresponding to the target graph data, wherein the generated graph data comprises a plurality of layers of generated graphs, each layer of generated graph comprises landmark nodes and common nodes, and the next layer of generated graph is constructed according to the common nodes in the layer of generated graph;
the query module is used for generating a graph for each layer in the generated graph data, and determining the shortest paths of the initial node and the target node in the layer generated graph as target paths in the layer generated graph according to the shortest paths between each common node and each landmark node in the layer generated graph, the position of the initial node and the position of the target node;
and the return module is used for returning each target path according to the query request.
The present specification provides a computer readable storage medium storing a computer program which when executed by a processor implements a method of querying a shortest path in the hierarchical pre-computed graph data described above.
The present specification provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing a method of querying the shortest path in the hierarchical pre-computed graph data described above when executing the program.
The above-mentioned at least one technical scheme that this specification adopted can reach following beneficial effect:
when a query request is received, determining an initial node and a target node, and determining the shortest path in the data of each layer of the generated graph of the initial node and the target node as each target path according to the shortest path between the common node and the landmark nodes and the shortest path between the landmark nodes in each layer of the generated graph, wherein the generated graph comprises the landmark nodes and the common nodes, which are constructed in advance. Even if the number of nodes contained in the target graph data is large, the shortest path between the common node and the landmark node can be quickly queried by using less computing resources to store the shortest path between the initial node and the target node, so that the query efficiency is ensured.
Drawings
The accompanying drawings, which are included to provide a further understanding of the specification, illustrate and explain the exemplary embodiments of the present specification and their description, are not intended to limit the specification unduly. In the drawings:
FIG. 1 is a flow chart of a method for querying a shortest path in hierarchical pre-computed graph data provided in the present specification;
FIG. 2 is a schematic diagram of the structure of the generated graph data provided in the present specification;
FIG. 3 is a flow chart of a method for querying the shortest path in hierarchical pre-computed graph data provided in the present specification;
FIG. 4 is a schematic structural diagram of a shortest path query device in hierarchical pre-computed graph data provided in the present specification;
fig. 5 is a schematic view of the electronic device corresponding to fig. 1 provided in the present specification.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the present specification more apparent, the technical solutions of the present specification will be clearly and completely described below with reference to specific embodiments of the present specification and corresponding drawings. It will be apparent that the described embodiments are only some, but not all, of the embodiments of the present specification. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are intended to be within the scope of the present disclosure.
It should be noted that, in this specification, all actions for acquiring signals, information or data are performed under the condition of conforming to the corresponding data protection rule policy of the location, and obtaining the authorization given by the owner of the corresponding device.
At present, the graph structure is widely applied to various fields such as social networks, computer networks, semantic networks and the like due to the characteristic that the graph structure can be used for relations among entities. The calculation of the shortest path between nodes in the graph data has become one of the common processing methods in the graph data processing field. Wherein the graph data is characterized by a graph structure.
In general, a server for storing graph data may respond to a query request and determine an originating node and a target node contained in the query request. Wherein the query request is for querying a shortest path between the originating node and the target node in the graph data. Then, the server can calculate each path between the starting node and the target node in real time, and determine the path length corresponding to each path. And finally, determining the shortest path according to the path length, and returning the shortest path according to the query request.
However, when the number of nodes included in the graph data is large, the requirement for computing the shortest path between the start node and the target node in real time is high on the computing resources, and when the computing resources in the server are limited, it takes a long time to compute the shortest path, resulting in low query efficiency.
Based on the above, the present specification provides a new hierarchical pre-calculation shortest path query method, by constructing generated graph data including different numbers of nodes according to an original graph structure, and for each generated graph data, determining shortest paths of the start node and the target node in the generated graph data according to shortest paths between each normal node and landmark nodes of the node, shortest paths between each landmark nodes, and start node and target node included in the generated graph data. Even if the number of nodes contained in the original graph data is large, fewer computing resources can be used to store the shortest path between each common node and the adjacent landmark nodes, so that the shortest path between the initial node and the target node can be quickly queried, and the query efficiency is ensured.
The following describes in detail the technical solutions provided by the embodiments of the present specification with reference to the accompanying drawings.
Fig. 1 is a flow chart of a method for querying a shortest path in a graph network based on hierarchical pre-computation provided in the present specification. Wherein:
s100: and receiving a query request of target graph data, and determining an initial node and a target node corresponding to the query request.
In the present description, a method for querying a shortest path in a graph network is provided, and an execution process of the query method may be executed by an electronic device such as a server for storing graph data or a server for querying a shortest path.
Based on the above brief description of the query method in the present specification. It can be seen that the query method in this specification can first determine the start node and the target node.
Specifically, the server may receive a query request, where the query request may carry an origin node and a destination node corresponding to a shortest path to be queried.
The server may then parse the received query request to determine the node identification of the originating node and the target node carried in the query request.
Of course, the query request may also be automatically initiated when the server monitors that the server itself satisfies a query condition, where the query condition may be that a preset time is reached, or that the starting node and the target node for querying are monitored to be determined. In particular, how and when the query request is generated may be set as needed, which is not limited in this specification.
In the present description, the method for querying the shortest path in the hierarchical pre-computed graph data is a method for querying the shortest paths in the target graph data of the start node and the target node based on the pre-computed graph data generated by each layer.
S102: and determining the generated graph data corresponding to the target graph data, wherein the generated graph data comprises a plurality of layers of generated graphs, each layer of generated graph comprises landmark nodes and common nodes, and the next layer of generated graph is constructed according to the common nodes in the layer of generated graph.
In one or more embodiments provided herein, as previously described, the server may determine the target path by constructing generated graph data including a different number of nodes from the original graph structure, and for each generated graph data, the shortest path in the generated graph data for the start node and the target node. Thus, the server may first determine to generate the graph data.
Specifically, the server may store target map data and generated map data corresponding to the target map data in advance. Then, upon receiving the query request, the server can determine the generated map data corresponding to the target map data from among the data stored in advance. The target graph data is data of a graph structure obtained by abstracting an actual problem. The query request is used for querying the shortest path between the starting node and the target node in the target graph data. The generated graph data are a plurality of layers of graph data constructed based on target graph data. The number of landmark nodes contained in each layer of generated graph in the generated graph data is not identical.
The method comprises the steps of generating a graph aiming at each layer, wherein the generated graph comprises landmark nodes and common nodes, and the landmark nodes are key nodes. The server may determine the shortest path between the common nodes by the shortest path between the common nodes and the critical nodes and the shortest path between the critical nodes.
Further, for each layer of the generated graph, a common node in the generated graph is used for constructing a next layer of the generated graph. As shown in fig. 2.
Fig. 2 is a schematic structural diagram of the generated graph data provided in the present specification. In the graph, the left side is the upper layer of the generated graph, the right side is the lower layer of the generated graph, black dots in the graph represent landmark nodes, white dots represent common nodes, and the total nodes contained in the lower layer of the generated graph are common nodes in the upper layer of the generated graph.
S104: and determining the shortest paths of the initial node and the target node in the layer generation diagram according to the shortest paths between each common node and each landmark node, the position of the initial node and the position of the target node in the layer generation diagram, and taking the shortest paths as target paths in the layer generation diagram.
In one or more embodiments provided herein, as described above, the server may generate a graph for each layer in the generated graph data, and determine shortest paths of the start node and the target node in the generated graph data according to shortest paths between each normal node and landmark nodes of its nodes, shortest paths between each landmark nodes, and start node and target node included in the generated graph data. The server may then determine the target path.
Specifically, for each layer of the generated graph data, the server may store the shortest path between each common node and each landmark node in the layer generated graph, and the shortest path between each landmark node in the layer generated graph. Wherein, for each landmark node, the shortest path between the common node and the landmark node does not contain any landmark node except the landmark node in the layer generation graph,
the server may then determine, from the pre-stored data, a shortest path between each of the normal nodes and each of the landmark nodes in the layer-generated graph, and a shortest path between each of the landmark nodes in the layer-generated graph.
The shortest path between each common node and each landmark node may be the shortest path between the common node and each landmark node in the layer generation graph determined for each common node, and the shortest path between the common node and each landmark node in the layer generation graph is used as the shortest path. The shortest path between the landmark node closest to each normal node and the normal node may be determined for each normal node, and the shortest path between the normal node and the landmark node in the graph may be generated as the layer.
The server may then determine a shortest path between the originating node and the landmark node and a shortest path between the destination node and the landmark node based on the shortest paths between the common nodes and the landmark nodes.
Finally, the server may determine the target path based on the shortest path between the start node and the landmark nodes, the shortest path between the target node and the landmark nodes, and the shortest path between the landmark nodes.
Taking the shortest path between the common node and the landmark nodes as an example, the shortest paths respectively corresponding to the landmark nodes in the layer generation graph and the common node are taken as the shortest paths between the common node and the landmark nodes. The server may first determine the shortest path respectively corresponding between the start node and each landmark node as each first shortest path, and determine the shortest path respectively corresponding between the target node and each landmark node as each second shortest path. Then, from among the first shortest paths and the second shortest paths, a first shortest path and a second shortest path including the same landmark node are determined as the first path and the second path. The server may then combine the first path and the second path as a particular path. For each specific path, the specific path generates a path with a starting node as a starting point and a target node as an ending point in the graph for the layer. Finally, the server can determine the path length corresponding to each specific path, and determine the specific path with the shortest path length from the specific paths according to the path lengths, and the specific path is used as the target path in the layer generation graph. Or, according to the preset length threshold, determining a specific path with the path length smaller than the preset length threshold as the target path.
Of course, the server may also combine the start node, landmark nodes and target nodes to determine a specific path that starts at the start node and ends at the target node, and that has a number of landmark nodes passing through. And determining the path length of each specific path according to a first distance corresponding to a first shortest path between the starting node and a first landmark node contained in the specific path, a second distance corresponding to a second shortest path between the target node and a second landmark node contained in the specific path, and a third distance corresponding to a third shortest path between the first landmark node and the second landmark node. The first landmark node is a landmark node connected with the starting node in the specific path, the second landmark node is a landmark node connected with the target node in the specific path, and a third shortest path between the first landmark node and the second landmark node can pass through other landmark nodes or can not pass through other landmark nodes. Finally, the server may determine a target path from the determined candidate paths.
Taking the shortest path between the common node and the landmark node as an example, the shortest path between the landmark node closest to the common node and the common node in the layer generation graph is generated. The server may determine a shortest path between the start node and the landmark node as a first path and determine a first landmark node corresponding to the first path. Meanwhile, the server may determine a shortest path between the target node and the landmark node as a second path, and determine a second landmark node corresponding to the second path. The first landmark node is the landmark node closest to the initial node in the layer generation graph. The second landmark node is the landmark node closest to the target node in the layer generation graph. The server may then determine a shortest path between the first landmark node and the second landmark node as a third path. Finally, the server may determine a target path based on the first path, the second path, and the third path.
S106: and returning each target path according to the query request.
In one or more embodiments provided herein, after determining the target path, the server may present the target path to the user.
Specifically, for each layer of the generated graph, the server may determine a target path in the generated graph. Thus, the determined target path is plural.
The server may then return each determined target path to the user based on the query request.
Wherein each target path may be characterized using a different color.
Of course, the server may determine the target path with the shortest path length according to the path lengths corresponding to the target paths, and return the target path with the shortest path length to the user according to the query request.
Based on the query method shown in fig. 1, generating graph data comprising different numbers of nodes is constructed according to the original graph data, and for each generating graph data, the shortest paths of the initial node and the target node in the generating graph data are determined according to the shortest paths between each common node and landmark nodes of the common node, the shortest paths between landmark nodes and the initial node and the target node, which are contained in the generating graph data. Even if the number of nodes contained in the original graph data is large, fewer computing resources can be used to store the shortest path between each common node and the adjacent landmark nodes, so that the shortest path between the initial node and the target node can be quickly queried, and the query efficiency is ensured.
In addition, in the present specification, the determined target path may not be the shortest path in the layer generation graph of the start node and the target node, and then, after the determined target path, the server may further use the target path as a candidate path, and determine whether there is a specified path having a length smaller than the candidate length and starting from the start node and ending from the target node according to the candidate length of the candidate path.
Specifically, the server may use the determined target path as a candidate path.
The server may then determine a candidate length for the candidate path.
Then, according to the candidate length, the server can determine whether a designated path which takes the starting node as a starting point, takes the target node as an ending point and has a path length smaller than the candidate length exists.
If so, the server may determine that the layer generation graph includes a specified path that starts at the start node and ends at the target node and has a path length less than the candidate length, and may determine that the specified path is the shortest path between the start node and the target node in the layer generation graph, i.e., the target path.
If not, the server may determine that there is no designated path in the layer-generated graph starting at the start node and ending at the target node and having a path length less than the candidate length. That is, the candidate path is the shortest path between the starting node and the target node in the layer generation graph. The server may then determine the candidate path as the target path.
The server may determine the designated path by determining each path between the start node and the target node and determining whether the path length of each path is smaller than the candidate length, or may determine the number of search steps according to the candidate length, and search according to the number of search steps with at least one of the start node and the target node as a start point, to obtain a search result, and determine whether the designated path between the start node and the target node exists in the search result corresponding to the number of search steps according to the search result. If so, the server may determine that a specified path with a path length smaller than the candidate path exists in the layer generation graph, the server may use the specified path as a target path, if not, the server may determine that no specified path with a path length smaller than the candidate path exists in the layer generation graph, and the server may use the candidate path as a target path.
Further, in the present specification, the generated map data may be predetermined in the following manner:
specifically, the server may determine the number of layers of the generated graph included in the generated graph data to be generated, and determine the number of landmark nodes corresponding to each layer of the generated graph.
Then, the server may construct the initial generation map using each node included in the target map data as a total number of nodes included in the initial generation map.
And then, the server can determine all landmark nodes from the total nodes contained in the initial generation diagram according to the number of the corresponding landmark nodes in the initial generation diagram, and the nodes except all landmark nodes in the total nodes are used as all common nodes.
Then, the server can construct the intermediate generation graph by taking all the ordinary nodes in the initial generation graph as full nodes of the intermediate generation graph, continuously determining landmark nodes and ordinary nodes contained in the intermediate generation graph, re-taking the intermediate generation graph as the initial generation graph, and continuously constructing the intermediate generation graph according to the re-determined ordinary nodes of the initial generation graph until the number of the intermediate generation graph obtained by construction reaches a preset number threshold value.
And finally, determining the generation diagram of each layer and the order of the generation diagram of each layer as generation diagram data according to the determined initial generation diagrams and the construction order of the initial generation diagrams.
Further, the server may further determine landmark nodes corresponding to each generated graph in the following manner:
Specifically, for each node in the initial generation graph, the server may determine the number of neighbor nodes corresponding to the node.
The server may then sort the nodes in the initial generation graph according to the number of neighbor nodes corresponding to the nodes in the initial generation graph, and determine the landmark nodes according to the sorting and the number of landmark nodes corresponding to the initial generation graph.
In addition, when constructing the intermediate generation graph, the server may delete each landmark node in the initial generation graph in the target graph data, delete the path respectively corresponding to each landmark node, and use the deletion result as the intermediate generation graph.
Based on the same thought, the present disclosure provides a flow diagram of a method for querying a shortest path in hierarchical pre-computed graph data, as shown in fig. 3.
Fig. 3 is a flow chart of a shortest path query method in hierarchical pre-computed graph data provided in the present specification, where after determining target graph data, the server may determine an initial generation graph according to the target graph data, determine landmark nodes and ordinary nodes included in the initial generation graph, construct an intermediate generation graph according to ordinary nodes included in the initial generation graph, and re-use the constructed intermediate generation graph as the initial generation graph, and continuously determine landmark nodes and ordinary nodes in the initial generation graph, so as to obtain generation graph data. When a query request is subsequently received, the server can determine target paths corresponding to the start node and the end node corresponding to the query request in each layer of the generated graph according to shortest paths between the common nodes and the landmark nodes corresponding to each layer of the generated graph in the pre-generated graph data, and return the target paths.
In addition, for each layer of generated graph, the server can also construct a landmark graph corresponding to the generated graph, and determine the shortest path between each common node and each landmark node in the layer of generated graph according to the landmark graph.
Specifically, the server may select a small number of r landmark nodes in the kth layer of the generated graph as landmark nodes of the kth construction level.
Then, a landmark graph of the k-th layer generation graph is constructed based on landmark nodes in the k-th layer generation graph, and the shortest path between landmark nodes in the k-th layer generation graph is calculated and reserved.
The method includes that edges exist between corresponding landmark nodes in landmark graphs of a k-layer generation graph when shortest paths which do not pass through other landmark nodes exist between the corresponding landmark nodes in the k-layer generation graph, and the weights of the edges are corresponding shortest path distances. That is, for each path in the landmark graph, no other landmark nodes are included in the path.
The server may then determine, for each of the ordinary nodes in the k-th layer generation graph, the landmark node closest to the ordinary node, and determine a shortest path between the landmark node closest to the ordinary node and the ordinary node. It should be noted that the shortest path does not pass through other landmark nodes.
Finally, the server may construct and store the shortest path tag index in the k-th layer generated graph from the normal node to the nearby landmark node in the layer generated graph, while preserving the corresponding shortest path. The shortest path tag index is defined by { common nodes in the k-th layer generation graph: (a landmark node in the k-th layer generation graph that is in the vicinity of the common node, a corresponding shortest path distance), and a key-value pair. The k-layer generating diagram represents landmark nodes, wherein the distance between the landmark nodes located near the common node and the common node is smaller than a preset distance threshold value.
Based on the above manner, the server can determine the shortest path between each common node and each landmark node in each layer of the generated graph based on each layer of the pre-constructed generated graph, and then when the path query is performed later, the server can determine the shortest path between the start node and the target node in each layer of the generated graph based on the shortest path between each common node and each landmark node in each layer of the generated graph. The condition that the shortest path can be obtained by inquiring with more calculation force under the condition that the nodes contained in the graph data are too many is avoided, and the inquiring efficiency is ensured.
Further, when the server performs the query, the server may perform the query in the following manner:
first, the server may determine that there is a directly connected edge between the starting node and the target node in the target graph data.
If so, the server can return the edge connected between the starting node and the target node in the target graph data as a query result according to the query request.
If not, the server may determine the generated graph data including the largest number of nodes from the generated graph data corresponding to the target graph data, that is, determine the first layer generated graph data.
Then, the server can determine the shortest path between each landmark node and each common node in the first layer generated graph data from each data stored by the server, and determine the target paths of the initial node and the target node in the first layer generated graph according to the shortest path between each landmark node and each common node in the first layer generated graph data.
And then, the server can continuously determine second-layer generated graph data and the shortest path between each landmark node and each common node in the second-layer generated graph data, and further determine the target paths of the initial node and the target node in the first-layer generated graph according to the shortest path between each landmark node and each common node in the second-layer generated graph data.
Then, the server may iterate the steps above, and continue to determine the shortest paths respectively corresponding to the start node and the target node in the data of each layer of the generated graph, as the target paths in each layer of the generated graph.
And finally, the server can return the determined target paths respectively contained in the generated graph data of each layer to the user as query results.
Further, after determining the shortest paths corresponding to the common nodes, the server can continuously determine the shortest path corresponding to the k+1 layer generation diagram. That is, the number of layers k=k+1 of the generated map is updated, and the above steps are repeated until the calculation of the shortest path tags in all the layer generated maps in the generated map data is completed.
Based on the same thought, the present disclosure also provides a device for querying the shortest path in the hierarchical pre-computed graph data, as shown in fig. 4. Wherein:
the receiving module 200 is configured to receive a query request of target graph data, and determine an origin node and a destination node corresponding to the query request.
The determining module 202 is configured to determine a generated graph data corresponding to the target graph data, where the generated graph data includes multiple layers of generated graphs, and for each layer of generated graph, the generated graph includes landmark nodes and common nodes, and a next layer of generated graph is constructed according to the common nodes in the generated graph of the layer.
And the query module 204 is configured to determine, for each layer of the generated graph data, a shortest path in the generated graph of the layer of the initial node and the target node according to a shortest path between each common node and each landmark node in the generated graph of the layer, the position of the initial node, and the position of the target node, as a target path in the generated graph of the layer.
And a return module 206, configured to return each target path according to the query request.
Optionally, the query module 204 is configured to determine a specified number of specific paths according to a shortest path between each normal node and each landmark node in the layer generation graph, a position of the start node, and a position of the target node, where the specific paths are paths in the layer generation graph with the start node as a start point and the target node as an end point, determine path lengths corresponding to the specific paths respectively, and determine, according to the path lengths, a specific path with a shortest path length from the specific paths as a target path in the layer generation graph, where the device is applied to a server, and for each layer generation graph, the server stores the shortest path corresponding to each normal node in the layer generation graph and each landmark node in the layer generation graph.
Optionally, the query module 204 is configured to take a target path in the layer generation graph as a candidate path, determine a candidate length corresponding to the candidate path, and determine whether a specified path with the start node as a start point, the target node as an end point, and a path length smaller than the candidate length exists according to the candidate length, if yes, determine the specified path as a target path, and if no, determine the candidate path as a target path.
Optionally, the determining module 202 is configured to determine, before determining the target path in the generated graph of each layer, the number of layers of generated graphs included in the generated graph data to be generated, determine the number of landmark nodes corresponding to each layer of generated graph, use each node included in the target graph data as a total node included in the initial generated graph, construct the initial generated graph, determine each landmark node from the total nodes included in the initial generated graph according to the number of landmark nodes corresponding to the initial generated graph, use nodes except each landmark node in the total node as each common node, use each common node in the initial generated graph as a total node of the intermediate generated graph, construct the intermediate generated graph, and continue to determine landmark nodes and common nodes included in the intermediate generated graph, and use each intermediate generated graph as an initial generated graph again, and continue to construct the intermediate generated graph according to the determined common nodes of the initial generated graph again until the number of intermediate generated graphs reaches a preset number threshold, and determine the order of generated graphs according to the determined initial generated graph and each layer of generated graph.
Optionally, the determining module 202 is configured to determine, for each node in the initial generation graph, a number of neighbor nodes corresponding to the node, order each node in the initial generation graph according to the number of neighbor nodes respectively corresponding to each node in the initial generation graph, and determine each landmark node according to the order and the number of landmark nodes corresponding to the initial generation graph.
Optionally, the determining module 202 is configured to delete each landmark node in the initial generated graph in the target graph data, delete a path corresponding to each landmark node, and use the deletion result as an intermediate generated graph.
Optionally, the number of landmark nodes included in each layer of generated graph in the generated graph data is not identical.
The present specification also provides a computer readable storage medium storing a computer program operable to perform the above-described method of querying a shortest path in hierarchically pre-computed graph data provided in fig. 1.
The present specification also provides a schematic structural diagram of the electronic device shown in fig. 5. At the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile storage, as illustrated in fig. 5, although other hardware required by other services may be included. The processor reads the corresponding computer program from the nonvolatile memory into the memory and then runs the same to implement the shortest path query method in the hierarchical pre-computed graph data described in fig. 1. Of course, other implementations, such as logic devices or combinations of hardware and software, are not excluded from the present description, that is, the execution subject of the following process flows is not limited to each logic unit application container, but may be hardware or logic devices.
In the 90 s of the 20 th century, improvements to one technology could clearly be distinguished as improvements in hardware (e.g., improvements to circuit structures such as diodes, transistors, switches, etc.) or software (improvements to the process flow). However, with the development of technology, many improvements of the current method flows can be regarded as direct improvements of hardware circuit structures. Designers almost always obtain corresponding hardware circuit structures by programming improved method flows into hardware circuits. Therefore, an improvement of a method flow cannot be said to be realized by a hardware entity module. For example, a programmable logic device (Programmable Logic Device, PLD) (e.g., field programmable gate array (Field Programmable Gate Array, FPGA)) is an integrated circuit whose logic function is determined by the programming of the device by a user. A designer programs to "integrate" a digital system onto a PLD without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Moreover, nowadays, instead of manually manufacturing integrated circuit chips, such programming is mostly implemented by using "logic compiler" software, which is similar to the software compiler used in program development and writing, and the original code before the compiling is also written in a specific programming language, which is called hardware description language (Hardware Description Language, HDL), but not just one of the hdds, but a plurality of kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), lava, lola, myHDL, PALASM, RHDL (Ruby Hardware Description Language), etc., VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog are currently most commonly used. It will also be apparent to those skilled in the art that a hardware circuit implementing the logic method flow can be readily obtained by merely slightly programming the method flow into an integrated circuit using several of the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer readable medium storing computer readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable logic controllers, and embedded microcontrollers, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, atmel AT91SAM, microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic of the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller in a pure computer readable program code, it is well possible to implement the same functionality by logically programming the method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers, etc. Such a controller may thus be regarded as a kind of hardware component, and means for performing various functions included therein may also be regarded as structures within the hardware component. Or even means for achieving the various functions may be regarded as either software modules implementing the methods or structures within hardware components.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. One typical implementation is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being functionally divided into various units, respectively. Of course, the functions of each element may be implemented in one or more software and/or hardware elements when implemented in the present specification.
It will be appreciated by those skilled in the art that embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, the present specification may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present description can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
The present description is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the specification. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
It will be appreciated by those skilled in the art that embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, the present specification may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present description can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
The description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.
The foregoing is merely exemplary of the present disclosure and is not intended to limit the disclosure. Various modifications and alterations to this specification will become apparent to those skilled in the art. Any modifications, equivalent substitutions, improvements, or the like, which are within the spirit and principles of the present description, are intended to be included within the scope of the claims of the present description.

Claims (10)

1. A method for querying a shortest path in hierarchically pre-computed graph data, the method comprising:
receiving a query request of target graph data, and determining a starting node and a target node corresponding to the query request;
determining generation diagram data corresponding to the target diagram data, wherein the generation diagram data comprises a plurality of layers of generation diagrams, each layer of generation diagram comprises landmark nodes and common nodes, and the next layer of generation diagram is constructed according to the common nodes in the generation diagram of the layer;
determining the shortest paths of the initial node and the target node in the layer generation diagram according to the shortest paths between each common node and each landmark node, the position of the initial node and the position of the target node in the layer generation diagram, and taking the shortest paths as target paths in the layer generation diagram;
and returning each target path according to the query request.
2. The method of claim 1, wherein the method is applied to a server, and for each layer of generated graph, the server stores shortest paths corresponding to each common node in the layer of generated graph and each landmark node in the layer of generated graph;
Determining the shortest path of the initial node and the target node in the layer generation diagram according to the shortest path between each common node and each landmark node, the position of the initial node and the position of the target node in the layer generation diagram, and taking the shortest path as the target path in the layer generation diagram, wherein the method specifically comprises the following steps:
determining a specified number of specific paths according to the shortest paths between each common node and each landmark node, the position of the starting node and the position of the target node in the layer generating graph, wherein the specific paths are paths taking the starting node as a starting point and the target node as an end point in the layer generating graph;
and determining the path length corresponding to each specific path, and determining the specific path with the shortest path length from the specific paths according to the path lengths as the target path in the layer generation graph.
3. The method of claim 2, wherein the method further comprises:
taking a target path in the layer generation diagram as a candidate path, and determining a candidate length corresponding to the candidate path;
judging whether a designated path which takes the starting node as a starting point, takes the target node as an ending point and has a path length smaller than the candidate length exists or not according to the candidate length;
If yes, determining the designated path as a target path;
if not, determining the candidate path as a target path.
4. The method of claim 1, wherein prior to determining the target path in the layer-generated graph, the method further comprises:
determining the layer number of the generated graph contained in the generated graph data to be generated, and determining the number of landmark nodes corresponding to each layer of the generated graph respectively;
constructing an initial generation diagram by taking all nodes contained in the target diagram data as full nodes contained in the initial generation diagram, determining all landmark nodes from the full nodes contained in the initial generation diagram according to the number of landmark nodes corresponding to the initial generation diagram, and taking nodes except all landmark nodes in the full nodes as common nodes;
constructing the intermediate generation diagram by taking all the ordinary nodes in the initial generation diagram as full nodes of the intermediate generation diagram, continuously determining landmark nodes and ordinary nodes contained in the intermediate generation diagram, taking the intermediate generation diagram as the initial generation diagram again, and continuously constructing the intermediate generation diagram according to the ordinary nodes of the initial generation diagram which are determined again until the number of the intermediate generation diagrams obtained by construction reaches a preset number threshold;
And determining the generation diagram of each layer and the order of the generation diagram of each layer as generation diagram data according to the determined initial generation diagrams and the construction order of the initial generation diagrams.
5. The method of claim 4, wherein determining each landmark node from the total number of nodes included in the initial generation map according to the number of corresponding landmark nodes in the initial generation map, specifically comprises:
determining the number of neighbor nodes corresponding to each node in the initial generation graph;
and sequencing all the nodes in the initial generation diagram according to the number of neighbor nodes corresponding to all the nodes in the initial generation diagram, and determining all the landmark nodes according to the sequencing and the number of landmark nodes corresponding to the initial generation diagram.
6. The method of claim 4, wherein constructing the intermediate generated graph using each common node in the initial generated graph as a full-scale node of the intermediate generated graph specifically comprises:
deleting each landmark node in the initial generation diagram in the target diagram data, deleting paths respectively corresponding to the landmark nodes, and taking a deleting result as an intermediate generation diagram.
7. The method of claim 1, wherein the generated graph data includes a non-identical number of landmark nodes for each layer of generated graph.
8. A shortest path query device in hierarchically pre-computed graph data, the device comprising:
the receiving module is used for receiving a query request of target graph data and determining a starting node and a target node corresponding to the query request;
the determining module is used for determining the generated graph data corresponding to the target graph data, wherein the generated graph data comprises a plurality of layers of generated graphs, each layer of generated graph comprises landmark nodes and common nodes, and the next layer of generated graph is constructed according to the common nodes in the layer of generated graph;
the query module is used for generating a graph for each layer in the generated graph data, and determining the shortest paths of the initial node and the target node in the layer generated graph as target paths in the layer generated graph according to the shortest paths between each common node and each landmark node in the layer generated graph, the position of the initial node and the position of the target node;
and the return module is used for returning each target path according to the query request.
9. A computer readable storage medium storing a computer program, wherein the computer program when executed by a processor implements the method of any of the preceding claims 1-7.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of any of the preceding claims 1-7 when executing the program.
CN202311457494.1A 2023-11-03 2023-11-03 Query method and device for shortest path in graph data based on hierarchical pre-calculation Active CN117171401B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311457494.1A CN117171401B (en) 2023-11-03 2023-11-03 Query method and device for shortest path in graph data based on hierarchical pre-calculation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311457494.1A CN117171401B (en) 2023-11-03 2023-11-03 Query method and device for shortest path in graph data based on hierarchical pre-calculation

Publications (2)

Publication Number Publication Date
CN117171401A true CN117171401A (en) 2023-12-05
CN117171401B CN117171401B (en) 2024-01-26

Family

ID=88943614

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311457494.1A Active CN117171401B (en) 2023-11-03 2023-11-03 Query method and device for shortest path in graph data based on hierarchical pre-calculation

Country Status (1)

Country Link
CN (1) CN117171401B (en)

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130103671A1 (en) * 2011-10-24 2013-04-25 Konstantin Tretjakov Processing Search Queries In A Network Of Interconnected Nodes
US20130103678A1 (en) * 2011-10-24 2013-04-25 Konstantin Tretjakov Processing Search Queries Using A Data Structure
CN104518965A (en) * 2013-09-30 2015-04-15 华为技术有限公司 Method and device for querying shortest paths
US20150142796A1 (en) * 2013-11-15 2015-05-21 Microsoft Corporation Processing search queries using a data structure
CN105051725A (en) * 2013-12-30 2015-11-11 华为技术有限公司 Graph data query method and device
US20160078148A1 (en) * 2014-09-16 2016-03-17 Microsoft Corporation Estimating similarity of nodes using all-distances sketches
CN106462620A (en) * 2014-06-02 2017-02-22 微软技术许可有限责任公司 Distance queries on massive networks
CN113515545A (en) * 2021-06-30 2021-10-19 北京百度网讯科技有限公司 Data query method, device, system, electronic equipment and storage medium
CN114880504A (en) * 2022-07-08 2022-08-09 支付宝(杭州)信息技术有限公司 Graph data query method, device and equipment
CN115905373A (en) * 2023-03-09 2023-04-04 北京永洪商智科技有限公司 Data query and analysis method, device, equipment and storage medium
CN115982416A (en) * 2023-01-29 2023-04-18 支付宝(杭州)信息技术有限公司 Data processing method and device, readable storage medium and electronic equipment
CN116150437A (en) * 2023-04-12 2023-05-23 阿里巴巴(中国)有限公司 Graph query method
CN116167092A (en) * 2023-04-21 2023-05-26 支付宝(杭州)信息技术有限公司 Secret state data query method and device, storage medium and electronic equipment
CN116521956A (en) * 2023-05-09 2023-08-01 上海识装信息科技有限公司 Graph database query method and device, electronic equipment and storage medium

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130103671A1 (en) * 2011-10-24 2013-04-25 Konstantin Tretjakov Processing Search Queries In A Network Of Interconnected Nodes
US20130103678A1 (en) * 2011-10-24 2013-04-25 Konstantin Tretjakov Processing Search Queries Using A Data Structure
CN104518965A (en) * 2013-09-30 2015-04-15 华为技术有限公司 Method and device for querying shortest paths
US20150142796A1 (en) * 2013-11-15 2015-05-21 Microsoft Corporation Processing search queries using a data structure
CN105051725A (en) * 2013-12-30 2015-11-11 华为技术有限公司 Graph data query method and device
CN106462620A (en) * 2014-06-02 2017-02-22 微软技术许可有限责任公司 Distance queries on massive networks
US20160078148A1 (en) * 2014-09-16 2016-03-17 Microsoft Corporation Estimating similarity of nodes using all-distances sketches
CN113515545A (en) * 2021-06-30 2021-10-19 北京百度网讯科技有限公司 Data query method, device, system, electronic equipment and storage medium
CN114880504A (en) * 2022-07-08 2022-08-09 支付宝(杭州)信息技术有限公司 Graph data query method, device and equipment
CN115982416A (en) * 2023-01-29 2023-04-18 支付宝(杭州)信息技术有限公司 Data processing method and device, readable storage medium and electronic equipment
CN115905373A (en) * 2023-03-09 2023-04-04 北京永洪商智科技有限公司 Data query and analysis method, device, equipment and storage medium
CN116150437A (en) * 2023-04-12 2023-05-23 阿里巴巴(中国)有限公司 Graph query method
CN116167092A (en) * 2023-04-21 2023-05-26 支付宝(杭州)信息技术有限公司 Secret state data query method and device, storage medium and electronic equipment
CN116521956A (en) * 2023-05-09 2023-08-01 上海识装信息科技有限公司 Graph database query method and device, electronic equipment and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
宋宝燕;张永普;单晓欢;: "Spark-GraphX框架下的大规模加权图最短路径查询", 辽宁大学学报(自然科学版), no. 04, pages 7 - 11 *
宋宝燕;张瑞浩;单晓欢;段琼琼;: "一种基于Hadoop的大规模图最短路径查询方法", 辽宁大学学报(自然科学版), no. 02, pages 19 - 23 *
黄书力;胡大裟;蒋玉明;: "经过指定的中间节点集的最短路径算法", 计算机工程与应用, no. 11, pages 45 - 50 *

Also Published As

Publication number Publication date
CN117171401B (en) 2024-01-26

Similar Documents

Publication Publication Date Title
RU2728820C1 (en) Method and device for processing data based on blockchain
CN114880504B (en) Graph data query method, device and equipment
CN110245279B (en) Dependency tree generation method, device, equipment and storage medium
CN116167461B (en) Model training method and device, storage medium and electronic equipment
CN116225669B (en) Task execution method and device, storage medium and electronic equipment
CN115756449B (en) Page multiplexing method and device, storage medium and electronic equipment
CN115374117A (en) Data processing method and device, readable storage medium and electronic equipment
CN116663618A (en) Operator optimization method and device, storage medium and electronic equipment
CN116306856A (en) Deep learning model deployment method and device based on search
CN116049761A (en) Data processing method, device and equipment
CN116185532A (en) Task execution system, method, storage medium and electronic equipment
CN116757278B (en) Training method and device of prediction model, storage medium and electronic equipment
CN117171401B (en) Query method and device for shortest path in graph data based on hierarchical pre-calculation
CN117093862A (en) Model training method and device, electronic equipment and storage medium
CN116432185B (en) Abnormality detection method and device, readable storage medium and electronic equipment
CN116304212A (en) Data processing system, method, equipment and storage medium
CN117555697B (en) Distributed training-oriented cache loading system, method, device and equipment
CN117041980B (en) Network element management method and device, storage medium and electronic equipment
CN114520770B (en) Topology diagram generation method, device, equipment and medium of network equipment
CN116107636B (en) Hardware acceleration method and device, storage medium and electronic equipment
CN117170669B (en) Page display method based on front-end high-low code fusion
CN117033467A (en) Data mining method and device based on pre-calculation and storage medium
CN116151620A (en) Sub-graph matching method and device, storage medium and electronic equipment
CN116957587A (en) Risk identification method, risk identification device, storage medium and electronic equipment
CN117931400A (en) Task execution method and device, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant