A time-dependent label constraint efficient query method based on partition tree decomposition
By using partitioned tree decomposition and parameter separation index design, optimizing vertex selection and path verification, the problems of dynamic graph updates and complex label constraints are solved, enabling efficient time-dependent label constraint queries, which are suitable for scenarios such as intelligent transportation and logistics.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NORTHEASTERN UNIV CHINA
- Filing Date
- 2026-01-26
- Publication Date
- 2026-06-23
Smart Images

Figure CN121561014B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of data processing technology, and in particular relates to an efficient query method based on time-dependent label constraints of partition tree decomposition. Background Technology
[0002] In the field of complex graph data querying, Label-Constrained Shortest Path (LCSP) querying is a key problem, aiming to find the shortest path in a graph that satisfies specific label sequence constraints. This problem has wide applications in real-world scenarios such as intelligent transportation systems, drug discovery pipelines, and supply chain logistics networks. For example, in transportation networks, route planning may need to avoid specific types of roads (such as toll roads), while in biological networks, paths must conform to label sequence patterns of molecular structures. As the scale of graph data increases and the constraints become more complex (such as introducing time dependencies or multi-label patterns), traditional shortest path algorithms (such as Dijkstra's algorithm) are difficult to apply directly because they cannot effectively handle label constraints or dynamic weight changes. Therefore, how to efficiently and scalably support Label-Constrained Shortest Path queries has become a research hotspot in the field of graph data management.
[0003] In existing technologies, label-constrained shortest path queries are mainly developed based on tree decomposition frameworks. The LSD method, proposed by Wei et al. in 2014, primarily uses tree decomposition to extract the minimum vertex partition set in the graph and employs a recursive algorithm to calculate the distance between the lowest common ancestor nodes, thus handling the label constraint problem. The PCSP method uses a pre-computation strategy, storing pre-calculated distance information in a hash table. This method supports label constraints in regular language form and has advantages in handling complex label patterns (such as wildcards or repeating sequences). For time-dependent graphs, the TDCH method, based on a shrinking hierarchical structure design, captures the changes in edge weights over time through pre-computed spatiotemporal profiles, providing a solution to the time dependency problem. Furthermore, hierarchical tree decomposition methods attempt to manage complex graph data through hierarchical structures, combining the needs of label constraints and time dependencies to some extent. These methods have all made progress in their respective application scenarios; for example, LSD is highly efficient in static graphs, PCSP performs well under flexible label constraints, and TDCH is suitable for dynamic traffic networks.
[0004] However, existing technologies still have many problems. First, tree decomposition frameworks typically rely on static graph structures, making it difficult to effectively handle dynamic graph updates (such as real-time changes in edge weights or labels), leading to decreased query efficiency. Second, while pre-computation strategies (such as PCSP and TDCH) accelerate queries, they require significant storage space to store distance information or spatiotemporal profiles, potentially causing scalability issues for large-scale graph data. Furthermore, existing methods lack flexibility in handling complex label constraints (such as context-dependent or nested constraints). Although PCSP supports regular expressions, the pre-computation overhead increases exponentially with constraint complexity. Simultaneously, these methods often focus on a single dimension (such as label constraints only or time dependencies only), lacking unified support for multi-dimensional constraints (such as combining labels, time, and quality of service), limiting their application in heterogeneous networks. Finally, while hierarchical tree decomposition methods attempt to integrate multiple types of constraints, the design of hierarchical structures is often based on heuristic rules, which may introduce errors in complex graph topologies, affecting path optimality. These problems limit the effectiveness of label-constrained shortest path queries in real-time, large-scale scenarios. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides an efficient query method based on time-dependent label constraints using partition tree decomposition, comprising the following steps:
[0006] Acquire road network information and generate road data maps;
[0007] The road data map is reduced and a tree structure is generated based on the label partitioning tree decomposition algorithm;
[0008] Construct a parameter-separated indexing mechanism to transform the tree structure into a parameter-separated index;
[0009] Obtain the starting point and destination point, and in the road data graph, designate the starting point and destination point as the source vertex and target vertex, respectively; based on the parameter separation index, calculate the shortest path from the given source vertex to the target vertex.
[0010] Furthermore, the road data map Including vertex set Edge set Tag collection and time-dependent function set Vertex set It includes several vertices, used to represent intersections and preset key locations in the road network; and an edge set. Includes several directed edges, used to represent the connecting paths between vertices; label set Includes a type label for each directed edge, used to represent the type attribute of the directed edge; and a set of time-dependent functions. It includes several time-dependent functions used to represent The time cost required to travel from one vertex to another via a directed edge.
[0011] Furthermore, the road data map is iteratively reduced and a tree structure is generated based on the label partitioning tree decomposition algorithm, including:
[0012] Based on a three-stage vertex selection strategy, vertices to be eliminated are removed from the road data graph processed in the current iteration, and the connection relationships between the neighboring vertices of the vertices to be eliminated are reconstructed to obtain a reduced road data graph. The reduced road data graph is then used as the road data graph for the next iteration. The process of selecting vertices to be eliminated, removing vertices to be eliminated, and reconstructing the connection relationships between the neighboring vertices of the vertices to be eliminated is repeated until all vertices in the road data graph are eliminated.
[0013] Create a package for each vertex to be eliminated and add it to a package set. The package includes the vertex to be eliminated, the neighboring vertices of the vertex to be eliminated, and a local label set. The local label set includes the type labels of all directed edges connected to the vertex to be eliminated.
[0014] Determine the parent-child relationship of all packages in the package set, and generate a tree structure based on the determined parent-child relationship, including several tree nodes, each tree node corresponding to a package and a set of tags;
[0015] The three-stage vertex selection strategy includes:
[0016] Phase 1: Select several vertices with the smallest vertex degree from the road data map to generate the first vertex set;
[0017] Second stage: Select the vertex with the highest label similarity from the first vertex set to generate the second vertex set;
[0018] The third stage involves converting the time dependency function of all directed edges connecting vertices in the second vertex set into a sequence of inflection points, including several time inflection points. ,in, For the departure time, To reduce time costs, the vertex with the fewest total time inflection points in the inflection point sequence is selected as the vertex to be eliminated, and added to the vertex elimination sequence.
[0019] The connection relationships between the neighboring vertices of the vertex to be eliminated are reconstructed, specifically as follows:
[0020] For any two distinct neighboring vertices of the vertex to be eliminated and , , Vertices to be eliminated Given a set of neighboring vertices, check the set of neighboring vertices. Starting point, passing through vertices to be eliminated Then reach the neighboring vertex Path and from neighboring vertices Starting point, passing through vertices to be eliminated Then reach the neighboring vertex Does the path satisfy the label sequence rule defined by the automaton? If it does, then it is based on the two neighboring vertices. and To the vertex to be eliminated Calculate the composite time dependency function;
[0021] If neighboring vertices and neighboring vertices If there is no directed edge between them, then at the neighboring vertex and neighboring vertices Create directed edges between neighboring vertices, using the composite temporal dependency function as the path from the neighboring vertex. To the neighboring vertex Time-dependent functions; if neighboring vertices and neighboring vertices If there is a directed edge between them, then compare from the neighboring vertices. and neighboring vertices The time cost of time-dependent functions and the time cost of composite time-dependent functions are considered, and time-dependent functions with smaller time costs are retained.
[0022] The label sequence rule defined by the automaton is that on a path with multiple vertices, the label type of the directed edge connecting two adjacent vertices must follow the rule.
[0023] Furthermore, the parent-child relationships of all packages in the package set are determined using the following method:
[0024] For the vertices to be eliminated bag Based on a three-stage vertex selection strategy, from the vertices to be eliminated Select a new vertex to be eliminated from its neighboring vertices. It will be based on the new vertices to be eliminated. Created package As a bag The parent package;
[0025] The specific method for establishing the label set for each tree node is as follows:
[0026] Process each tree node in the tree structure according to the post-order traversal order. Tree nodes are merged using set union operation. The local label set of all subtree nodes is propagated upwards to obtain the tree node. The set of subtree labels;
[0027] Tree nodes Local label sets and tree nodes Perform a union operation on the subtree label sets to generate tree nodes. A collection of tags.
[0028] Furthermore, a parameter-separated indexing mechanism is constructed to transform the tree structure into a parameter-separated index. The specific method is as follows:
[0029] Initialization parameters, including the global parameter pool Output and input label dictionaries; global parameter pool Used to store time inflection points The out label dictionary is used to store the paths starting from each vertex, and the in label dictionary is used to store the paths reaching each vertex.
[0030] Process all tree nodes in the tree structure according to the post-order level-order traversal order, for the current tree node From the current tree node Select any vertex from the corresponding package and compare it with the current tree node. Form vertex pairs and obtain the type labels on the paths between vertex pairs;
[0031] The effective states of the path are calculated using automaton transition rules, the time dependency function of the path is extracted, and it is converted into a sequence of inflection points; the automaton transition rules include:
[0032] For the current tree node Given any two distinct neighboring vertices in the packet, obtain the type labels of all directed edges in the path, merge consecutive and repeated type labels to obtain simplified label sequences for the two paths;
[0033] Traverse the simplified label sequence. For each type label, verify whether the current type label already exists in the history set. If it exists, the label transfer is considered to have failed and the path is invalid. If it does not exist, add the current type label to the history set and continue to verify the next type label. When all type labels in the path pass the verification, the path is valid. The history set is used to store type labels that have appeared in the simplified label sequence before the current type label.
[0034] Extract the time dependency function of the path and convert it into a sequence of inflection points. Use a hash set to assign each inflection point in the sequence to a hash value. Perform hash value calculation, and check whether each time inflection point already exists in the global parameter pool through hash lookup and exact matching. If the time inflection point in the inflection point sequence already exists in the global parameter pool, obtain the index of the time inflection point in the global parameter pool; if the time inflection point in the inflection point sequence does not exist in the global parameter pool, add the time inflection point to the global parameter pool and obtain the index of the time inflection point in the global parameter pool. Each time inflection point in the global parameter pool is a unique inflection point.
[0035] Based on the position of each time inflection point in the global parameter pool, a label dictionary and index entries in the in-label dictionary are created, including next-hop pointer information and previous-hop pointer information. The next-hop pointer information is the current tree node in the tree structure. The traversal proceeds to the next tree node, with the previous pointer information indicating the current tree node in the tree structure. Iterate through the previous tree node.
[0036] Furthermore, the shortest path from the given source vertex to the target vertex is calculated using the following method:
[0037] In the tree structure, locate the lowest common ancestor node of the source vertex and the target vertex. Based on the label sequence rules defined by the automaton, select a set of candidate hub vertices from the bag corresponding to the lowest common ancestor node. The lowest common ancestor node is the root node of the least common subtree of the source vertex and the target vertex.
[0038] A set of label pairs is generated for each candidate hub vertex in the candidate hub vertex set; the label pair set is verified to obtain triples that are state-continuous and time-compatible, and these triples are added to the candidate set.
[0039] Select the optimal hub vertex from the candidate set;
[0040] Construct the shortest path from the source vertex to the target vertex based on the optimal hub vertex.
[0041] Furthermore, based on the label sequence rules defined by the automaton, a set of candidate hub vertices is selected from the bag corresponding to the lowest common ancestor node. The specific method is as follows:
[0042] Traverse the bag corresponding to the lowest common ancestor node. For each candidate vertex encountered during the traversal, verify whether the path from the source vertex through the candidate vertex to the target vertex satisfies the label sequence rule defined by the automaton. Add the candidate vertex that passes the verification as a candidate hub vertex to the candidate hub vertex set.
[0043] Furthermore, the specific method for generating a set of label pairs based on each candidate hub vertex in the candidate hub vertex set is as follows:
[0044] For the candidate hub vertex set Each candidate hub vertex , source vertex The list of candidate hub vertices in the label dictionary. Use the type label on the path to the target vertex as the output label. and target vertex All candidate hub vertices in the input label dictionary The type label on the path to the source vertex is used as the input label. Generate a set of tag pairs, including several pairs of outgoing and incoming tags;
[0045] The tag pair set is validated to obtain a valid combination that is state-continuous and time-compatible, including: validating the state continuity of the tag pair set, and validating the time compatibility of the outgoing and incoming tags that pass the state continuity validation.
[0046] The specific method for verifying the state continuity of a set of labels is as follows:
[0047] Verify the current output tag respectively and current entry tag To determine whether the label sequence rules defined by the automaton are satisfied, obtain the current output label. status and current entry tag status If the current tag is displayed status and label status Consistent, determine the current label output. and current entry tag Verification through state continuity;
[0048] If the current label is displayed status and current entry tag status If there is a discrepancy, determine the current output label. and current entry tag The current output label was skipped because the state continuity verification failed. and current entry tag Verify the next pair of outgoing and incoming labels;
[0049] For outgoing and incoming tags that have passed the state continuity verification, time compatibility verification is performed. The specific method is as follows:
[0050] For the current outgoing label that has passed the state continuity verification and current entry tag Based on the source vertex To candidate hub apex Time-dependent function calculation to reach candidate hub vertex The moment ;
[0051] If the candidate hub vertex is reached The moment If it falls within the domain of the ingress label time dependency function, then it is determined to be from the candidate hub vertex. To the target vertex The path is time-compatible, generating triples and adding them to the candidate set. ;
[0052] If the candidate hub vertex is reached The moment If it does not belong to the domain of the tag time dependency function, then it is determined to be from the candidate hub vertex. To the target vertex The path is not time-compatible, skipping the current tag. and current entry tag .
[0053] Furthermore, the specific method for selecting the optimal hub vertex from the candidate set is as follows:
[0054] For the candidate set Each triple in the set will indicate the departure time. Input the label time dependency function and calculate the time cost from the source vertex to the candidate hub vertex;
[0055] The time when the candidate hub peak will be reached. Input the label time dependency function and calculate the time cost from the candidate hub vertex to the target vertex;
[0056] The time cost from the source vertex to the candidate hub vertex and the time cost from the candidate hub vertex to the target vertex are added together to obtain the total time cost of the triple. The candidate hub vertex in the triple with the minimum total time cost in the candidate set is selected as the optimal hub vertex.
[0057] Furthermore, the specific method for constructing the shortest path from the source vertex to the target vertex based on the optimal hub vertex is as follows:
[0058] Initialization includes source vertices The source path segment list, which includes the source vertices The vertex pointed to by the next-hop pointer information recorded in the outgoing label dictionary is taken as the first outgoing vertex and added to the source vertex path segment list; the vertex pointed to by the next-hop pointer information recorded in the outgoing label dictionary of the first outgoing vertex is taken as the second outgoing vertex and added to the source vertex path segment list, and so on, gradually constructing the path segment list from the source vertex. To the optimal hub vertex Path segment;
[0059] Initialization includes target vertex The target point path segment list, including the target vertex The vertex pointed to by the previous hop pointer information recorded in the ingress label dictionary is taken as the first ingress vertex and added to the target point path segment list; the vertex pointed to by the previous hop pointer information recorded in the ingress label dictionary of the first ingress vertex is taken as the second ingress vertex and added to the target point path segment list, and so on, gradually constructing the path from the optimal hub vertex. To the target vertex Path segment;
[0060] From the source vertex To the optimal hub vertex Path segments and from the optimal hub vertex To the target vertex Connect the path segments to form a complete optimal path. .
[0061] The beneficial effects of adopting the above technical solution are as follows: The present invention provides an efficient query method for time-dependent label constraints based on partition tree decomposition. This method significantly reduces the index storage redundancy of the time-dependent label constraint graph through label partition tree decomposition and parameter separation index design, achieving millisecond-level query latency and efficiency. It can efficiently accommodate ordered label constraints and time-dependent weights to adapt to actual scenarios such as intelligent transportation and logistics, and can also scale linearly with the size of the dataset, maintaining stable performance in networks with more than 10 million vertices. Attached Figure Description
[0062] Figure 1 A schematic diagram of the tag partitioning tree decomposition algorithm provided in Embodiment 1 of the present invention;
[0063] Figure 2 A schematic diagram of parameter separation index provided in Embodiment 1 of the present invention;
[0064] Figure 3 The present invention provides a schematic diagram of the process for constructing the shortest path from a given source vertex to a target vertex. Detailed Implementation
[0065] The specific implementation methods of this application will be further described in detail below with reference to the accompanying drawings and embodiments.
[0066] Example 1:
[0067] This embodiment provides an efficient query method based on time-dependent label constraints using partitioning tree decomposition, applicable to path planning in intelligent transportation systems, comprising the following steps:
[0068] Step 1: Obtain road network information and generate road data map ;
[0069] Road data map Including vertex set Edge set Tag collection and time-dependent function set Vertex set It includes several vertices, used to represent intersections and preset key locations in the road network; and an edge set. Includes several directed edges, used to represent the connecting paths between vertices; label set This includes a type label for each directed edge, representing the type attribute of the directed edge. In this embodiment, the type labels include highway, main road, secondary road, or toll road. The type labels are used to constrain the semantic conditions of the directed edges; and a set of time dependency functions. It includes several time-dependent functions, which are piecewise linear functions used to represent... The time required to travel from one vertex to another via a directed edge is used to capture changes in traffic flow at different times.
[0070] Step 2: Reduce the road data map and generate a tree structure based on the label partitioning tree decomposition algorithm, such as... Figure 1 As shown;
[0071] Step 2.1: Initialize the package set and vertex elimination sequence ;
[0072] Step 2.2: Establish a three-stage vertex selection strategy to determine the vertices to be eliminated;
[0073] The three-phase vertex selection strategy includes:
[0074] Phase 1: Select several vertices with the smallest degree from the road data map to generate the first vertex set. ;
[0075] Phase Two: In the first vertex set Select the vertex with the highest label similarity to generate a second vertex set. ;
[0076] Label similarity measures the degree of uniformity of the type attribute of directed edges on a vertex. A higher label similarity indicates a more uniform type attribute of directed edges on that vertex. As shown in the formula below:
[0077] ;
[0078] in, As vertex The total number of tags on The number of duplicate type tags. For the first in the tag category set One tag, A collection of tag types;
[0079] For example, if vertex A is a highway interchange connected by 5 roads (5 directed edges), and the type label of all 5 directed edges is "highway", then the label similarity of vertex A is calculated by dividing the frequency of the most frequent type label (5) by the total number of type attributes of all directed edges on the vertex (1). ;
[0080] For example, vertex B is a comprehensive transportation hub, connected by 6 roads, i.e., 6 directed edges. The type labels of these 6 directed edges include highway, main road, auxiliary road, and bicycle lane. That is, the total number of type labels for all directed edges on vertex B is 4. If the most frequent type label is highway, appearing 2 times, then the label similarity of vertex B is 1 / 2. ;
[0081] Third stage: Set the second vertex set The temporal dependency function of all directed edges connected to the middle vertex is converted into a sequence of inflection points, including several temporal inflection points. ,in, For the departure time, For time cost;
[0082] For example, a sequence of turning points of a directed edge is: , Indicates in The time cost for departure at any given time is 10 minutes. Indicates in The time cost for departure at any given time is 60 minutes. Indicates in The time cost for departure at any given time is 10 minutes.
[0083] The vertex with the fewest total time inflection points in the inflection point sequence is selected as the first vertex to be eliminated. The first vertex to be eliminated Add Vertex Elimination Sequence middle;
[0084] Step 2.3: Use a graph reduction algorithm to process the road data map. Perform reduction and remove vertex elimination sequence The first vertex to be eliminated And reconstruct the first vertex to be eliminated. By analyzing the connectivity of neighboring vertices, we obtain the reduced road data graph. ;
[0085] Reconstruct the first vertex to be eliminated The specific method for establishing the connection relationship between neighboring vertices is as follows:
[0086] For the first vertex to be eliminated Any two distinct neighboring vertices and , , The first vertex to be eliminated Given a set of neighboring vertices, check the set of neighboring vertices. Starting from the first vertex to be eliminated Then reach the neighboring vertex Path and from neighboring vertices Starting from the first vertex to be eliminated Then reach the neighboring vertex Does the path satisfy the label sequence rule defined by the automaton? If it does, then it is based on the two neighboring vertices. and To the first vertex to be eliminated The time dependency function is used to calculate the composite time dependency function, as shown in the following formula:
[0087] ;
[0088] in, for From the neighboring apex To the neighboring vertex Composite time-dependent functions, for From the neighboring apex To the first vertex to be eliminated Time-dependent functions, for From the first vertex to be eliminated To the neighboring vertex Time-dependent functions;
[0089] If neighboring vertices and neighboring vertices If there is no directed edge between them, then at the neighboring vertex and neighboring vertices Create directed edges between them to connect composite time-dependent functions. As From the neighboring apex To the neighboring vertex Time-dependent functions; if neighboring vertices and neighboring vertices If there are directed edges between them, then compare From the neighboring apex and neighboring vertices Time-dependent functions Time cost and composite time dependency function Prioritize time-dependent functions with lower time costs;
[0090] The label sequence rule defined by the automaton stipulates that the label type of the directed edge connecting two adjacent vertices on a path with multiple vertices must follow the rule;
[0091] For example, an automaton defines a label sequence rule as ab*c, which means that a path must start with a directed edge of label type a, pass through any directed edges of label type b, and end with a directed edge of label type c. For example, in a transportation network, a specific label sequence rule of "highway-main road-branch road" is specified, so as to ensure that only semantically valid paths are retained during the reduction process.
[0092] Step 2.4: Eliminate the first vertex to be eliminated in the vertex elimination sequence π Create package And add to the package collection middle;
[0093] Based on the first vertex to be eliminated Create package Including the first vertex to be eliminated The first vertex to be eliminated In road data map All neighboring vertices and local label set ;
[0094] Local tag set Including the first vertex to be eliminated Type labels for all directed edges connected above;
[0095] Created package Add to package collection middle;
[0096] Step 2.5: Iteratively select vertices to be eliminated based on a three-stage vertex selection strategy until the road data graph is complete. All vertices in the tree are eliminated, resulting in a spanning tree structure. ;
[0097] Remove the first vertex to be eliminated After that, regarding the package The remaining vertices are used to select the second vertex to be eliminated based on a three-stage vertex selection strategy. Based on the second vertex to be eliminated Created package As a bag The parent package; iteratively select vertices to be eliminated until the road data map is reached. All vertices in the set are eliminated, forming a bag set. Each package in the process generates a parent package, and a tree structure is created. It includes several tree nodes, each tree node corresponding to a package and a set of tags;
[0098] Create tree nodes tag collection The specific method is as follows:
[0099] Process the tree structure in post-order traversal order. Each tree node Based on tree nodes Extract the local tag set from the corresponding package. Type tags, local tag collection Indicates passing through tree nodes The path must satisfy the label sequence rules defined by the automaton;
[0100] In this embodiment, the label sequence rule defined by the automaton prohibits non-continuous backtracking repetition: that is, after a sequence segment including at least two label types, a label type that is already present in the sequence segment and is not currently being repeated consecutively is not allowed to appear again. For example, after a sequence segment "ab" including two label types "a" and "b", the label type "a" is not allowed to appear again, thereby avoiding non-continuous backtracking repetition such as "a…b…a".
[0101] Tree nodes are obtained through set union operation. The set of local labels for all subtree nodes Propagate upwards to obtain tree nodes The set of subtree labels; the upward propagation process ensures that the parent node can know the label sequence rules defined by all automata within its subtree range, realizing the complete inheritance of labels.
[0102] Tree nodes Local label sets and tree nodes Perform a union operation on the subtree label sets to generate tree nodes. tag collection The union operation automatically removes duplicate labels, ensuring the uniqueness and integrity of the state set. The final label set includes both the direct constraints of the current tree node and all possible label combinations for the entire subtree.
[0103] Step 3: Construct a parameter-separated index mechanism, PS-Index, to transform the tree structure into a parameter-separated index;
[0104] Initialization parameters, including the global parameter pool Output tag dictionary and the dictionary of tags Global parameter pool Used to store all unique turning points, out-of-label dictionary Used to store paths originating from each vertex, added to the label dictionary. Used to store the paths to each vertex;
[0105] Process the tree structure according to the post-order level-order traversal order. In this process, all tree nodes are processed first, ensuring that the deepest child nodes are processed first, thus achieving hierarchical propagation of state information. This traversal order guarantees that when processing a parent node, the information of all child nodes has been fully calculated.
[0106] From the current tree node Arbitrarily select a vertex from the corresponding package and form a vertex pair with the current tree node. Obtain the type label on the path between the vertex pairs. Calculate the valid state of the path using automaton transition rules. The automaton transition rules aim to prohibit any non-contiguous label backtracking repetition, including:
[0107] For the current tree node The path between any two distinct vertices in the bag, from the label set Obtain the type labels of all directed edges in the path, merge consecutive and repeated type labels to obtain a simplified label sequence;
[0108] The simplified label sequence is traversed. For each type label, it is verified whether the current type label already exists in the history set. If it exists, the label transfer fails and the path is invalid. If it does not exist, the current type label is added to the history set, and the next type label is verified. The path is valid when all type labels in the path pass verification. The history set stores type labels that have appeared in the simplified label sequence before the current type label. This design ensures that constraints such as type label 'a' must never appear again after type labels 'a' and 'b' are strictly enforced, thus effectively preventing illegal patterns of type labels "a…b…a" from appearing in the simplified label sequence, while fully allowing consecutive repeating sequences of type labels 'aaa'.
[0109] The time dependency function of the path is extracted and converted into a turnpoint sequence. A hash set is used to calculate the hash value of each turnpoint in the sequence. Hash lookup and exact match are used to check if each turnpoint already exists in the global parameter pool. If a turnpoint exists, its index is retrieved. If not, it is added to the pool, and its index is retrieved to ensure unique storage; each turnpoint is unique. Based on the position of each turnpoint in the global parameter pool, a tag dictionary and index entries are created in the tag dictionary, such as... Figure 2 As shown, it includes next-hop pointer information and previous-hop pointer information, with the next-hop pointer information being a tree structure. Current tree node The traversal of the next tree node uses the previous pointer information to represent the tree structure. Current tree node Traverse the previous tree node;
[0110] Step 4: Obtain the starting point and destination point. In the road data graph, designate the starting point and destination point as the source vertex and target vertex, respectively. Based on the parameter separation index, construct the shortest path from the given source vertex to the target vertex, such as... Figure 3 As shown;
[0111] Step 4.1: Locate the lowest common ancestor (LCA) node of the source vertex and the target vertex in the tree structure, and select a set of candidate hub vertices from the bag corresponding to the LCA node based on the label sequence rules defined by the automaton.
[0112] In tree structure In the middle, the source vertex and target vertex Lowest common ancestor node Source vertex and target vertex The root node of the least common subtree;
[0113] Traverse the lowest common ancestor node The corresponding package verifies each candidate vertex encountered during the traversal from the source vertex. Reach the target vertex via candidate vertices If the path satisfies the label sequence rules defined by the automaton, the candidate vertices that pass the verification will be designated as candidate hub vertices. Add to candidate hub vertex set ;
[0114] In step 2.2 of this embodiment, a three-stage vertex elimination strategy is adopted. By considering the concept of label similarity, the tree structure is optimized so that more nodes with single labels or fewer labels are closer to the leaf nodes. Each leaf node represents a highly concentrated label partition. When querying the shortest path, the tree structure is traversed from bottom to top to find the lowest common ancestor node of the source vertex and the target vertex. When a leaf node is reached in the early stage of traversal, the type label stored in the leaf node can be immediately matched with the label sequence rules defined by the automaton. If the two are completely incompatible, for example, the leaf node only contains the highway type label, while the query path explicitly requires avoiding highways, then all paths represented by the subtrees rooted at that leaf node will be directly determined as invalid and pruned as a whole, thus eliminating the need for any redundant calculations on the upper-level nodes containing more vertices and more complex type label combinations.
[0115] Step 4.2: Generate a set of label pairs for each candidate hub vertex in the candidate hub vertex set; verify the set of label pairs to obtain a valid combination that is state-continuous and time-compatible;
[0116] For the candidate hub vertex set Each candidate hub vertex , source vertex The list of candidate hub vertices in the label dictionary. Use the type label on the path to the target vertex as the output label. and target vertex All candidate hub vertices in the input label dictionary The type label on the path to the source vertex is used as the input label. Generate a set of tag pairs, including several pairs of outgoing and incoming tags;
[0117] The specific method for verifying the state continuity of a set of labels is as follows:
[0118] Verify the current output tag respectively and current entry tag To determine whether the label sequence rules defined by the automaton are satisfied, obtain the current output label. status and current entry tag status If the current tag is displayed status and label status Consistency means that the origin is consistent with the source vertex. To candidate hub apex The path can smoothly transition from the candidate hub vertex. To the target point The path from the source vertex Departure through candidate hub vertices Reach the target vertex The path has semantic coherence, determining the current tag. and current entry tag Verification through state continuity;
[0119] If the current label is displayed status and current entry tag status Inconsistency indicates a difference from the source vertex. Departure through candidate hub vertices Reach the target vertex If there is a state transition conflict in the path, then the current output tag is determined to be... and current entry tag The current output label was skipped because the state continuity verification failed. and current entry tag Verify the next pair of outgoing and incoming labels;
[0120] For outgoing and incoming tags that have passed the state continuity verification, time compatibility verification is performed. The specific method is as follows:
[0121] For the current outgoing label that has passed the state continuity verification and current entry tag Based on the source vertex To candidate hub apex Time-dependent function calculation to reach candidate hub vertex The moment As shown in the formula below:
[0122] ;
[0123] in, For the departure time, From the source vertex To candidate hub apex Tag-dependent function;
[0124] If the candidate hub vertex is reached The moment Belongs to the time-dependent function of the input label Within the domain of definition, i.e. If a valid value exists, then the candidate hub vertex is selected. To the target vertex The path is time-compatible and generates triples. And add to the candidate set Triples It encapsulates the time dependency characteristics and state continuity of path segmentation, providing structured input for subsequent cost calculation;
[0125] If the candidate hub vertex is reached The moment Not a tag-dependent function Within its domain, it represents from the pivot vertex To the target point If the path is not feasible in the time dimension, then it is determined to start from the candidate hub vertex. To the target vertex The path is not time-compatible, skipping the current tag. and current entry tag ;
[0126] Step 4.3: Select the optimal hub vertex from the candidate set;
[0127] For the candidate set Each triplet in Departure time Input label time-dependent function Calculate the time cost from the source vertex to the candidate hub vertex;
[0128] The time when the candidate hub peak will be reached. Input / output label time-dependent function Calculate the time cost from the candidate hub vertex to the target vertex;
[0129] The total time cost of the triple is obtained by adding the time cost from the source vertex to the candidate pivot vertex and the time cost from the candidate pivot vertex to the target vertex. The candidate pivot vertex with the minimum total time cost in the candidate set is selected as the optimal pivot vertex. ;
[0130] Step 4.4: Construct the shortest path from the source vertex to the target vertex based on the optimal hub vertex;
[0131] Initialization includes source vertices The source path segment list, which includes the source vertices The vertex pointed to by the next-hop pointer information recorded in the outgoing label dictionary is taken as the first outgoing vertex and added to the source vertex path segment list; the vertex pointed to by the next-hop pointer information recorded in the outgoing label dictionary of the first outgoing vertex is taken as the second outgoing vertex and added to the source vertex path segment list, and so on, gradually constructing the path segment list from the source vertex. To the optimal hub vertex Path segment;
[0132] Initialization includes target vertex The target point path segment list, including the target vertex The vertex pointed to by the previous hop pointer information recorded in the ingress label dictionary is taken as the first ingress vertex and added to the target point path segment list; the vertex pointed to by the previous hop pointer information recorded in the ingress label dictionary of the first ingress vertex is taken as the second ingress vertex and added to the target point path segment list, and so on, gradually constructing the path from the optimal hub vertex. To the target vertex Path segment;
[0133] From the source vertex To the optimal hub vertex Path segments and from the optimal hub vertex To the target vertex Connect the path segments to form a complete optimal path. During the connection process, duplicate candidate hub vertices are automatically avoided, ensuring the continuity and correctness of the path.
[0134] This embodiment achieves an optimal balance between graph structure simplification and constraint preservation by using a three-stage hierarchical vertex selection mechanism based on minimum degree priority, maximum label similarity, and minimum time complexity. Compared with traditional tree decomposition methods that use a single degree standard for vertex elimination and cannot take into account label distribution and time complexity, this embodiment optimizes label partitioning effect and time function combination complexity by using a multi-stage strategy to ensure that the tree width is minimized.
[0135] This embodiment establishes a partition label state mapping within the tree decomposition nodes, organically combining automaton transition rules with the tree structure to achieve a structured representation of label constraints. By establishing a local label constraint set in each decomposition package and establishing an inheritance relationship with the subtree state, pre-pruning of complex label constraints becomes possible, significantly reducing state space search during the query process.
[0136] This embodiment designs a 2-hop index structure based on hub nodes, which significantly reduces query time by pre-compiling path segments. By maintaining a set of specific entry and exit labels for vertices and establishing a mapping relationship with hub nodes, candidate path segments can be located in O(1) time, avoiding the graph traversal overhead of traditional methods.
[0137] This embodiment establishes a unified framework for automaton transition rules and path verification, enabling efficient verification of label constraints. By pre-compiling automaton transition rules during the index building phase and performing early state verification during the query phase, paths that do not meet label constraints can be quickly filtered, significantly improving query efficiency.
[0138] This embodiment proposes a compatibility checking algorithm based on time function breakpoints, achieving accurate verification of time constraints. By analyzing the breakpoint characteristics of time-dependent functions, it quickly determines the time compatibility between path segments, avoiding complex function calculations and improving verification efficiency.
[0139] This embodiment utilizes the hierarchical structure of LP-Tree to design a hub candidate set pruning strategy based on the lowest common ancestor. By limiting the search scope of hub nodes to the lowest common ancestor path between the source and target points, the number of candidate hubs is significantly reduced, thereby improving query performance.
[0140] This embodiment designs a multi-path connection algorithm for output and input labels, which realizes efficient path combination under complex constraints. By considering both state continuity and time compatibility, it can complete the verification of multi-dimensional constraints in a single scan, avoiding the computational overhead of multiple filtering.
[0141] This embodiment implements an efficient path reconstruction mechanism by using next-hop pointer information and previous-hop pointer information. By embedding jump pointer information in the tag tuple, the complete path is quickly reconstructed, avoiding the recursive search of traditional methods and significantly improving the efficiency of path assembly.
[0142] This embodiment achieves stable performance that scales linearly with the size of the dataset through its designed index structure and query algorithm. Experiments on five real-world datasets show that this invention achieves performance improvement compared to existing methods and maintains consistent performance advantages under different constraint complexities, proving the practicality and efficiency of the technical solution. The specific analysis is as follows:
[0143] In terms of practical application value, this embodiment is applicable to various real-world scenarios, including dynamic path planning in intelligent transportation systems, time-window constrained path optimization in logistics and distribution, multi-modal traffic path recommendation in urban navigation, and optimal path calculation under constraints in emergency response. This embodiment possesses good engineering practicality, strong algorithm stability, consistent performance under different constraint scenarios, moderate implementation complexity, ease of engineering deployment, support for incremental updates, adaptability to dynamic network environments, and a user-friendly interface design, making it easy to integrate into existing systems. Regarding the comprehensive benefits brought by technological innovation, this embodiment achieves several theoretical breakthroughs. It proposes for the first time the concept of label partitioning tree decomposition, providing a new theoretical framework for multi-constraint path problems; innovative parameter separation technology opens up new optimization directions for time-dependent graph algorithms; and a unified theoretical model of automaton transition rules and tree structures is established. The method provided by this embodiment demonstrates significant value in practical applications, offering an efficient solution for real-time querying of large-scale transportation networks, significantly reducing system deployment and maintenance costs, improving user experience and system response speed, and providing key technical support for smart city construction. In summary, this embodiment, through innovative technical architecture and algorithm design, achieves significant improvements in multiple dimensions such as storage efficiency, query performance, and system resource utilization. It provides an efficient and practical solution to the time-dependent label-constrained shortest path problem, and has important theoretical significance and wide application value.
[0144] Example 2:
[0145] This embodiment proposes an electronic device, including: one or more processors, and a memory, wherein the memory is used to store instructions, and when the instructions are executed by the one or more processors, the one or more processors execute the time-dependent label constraint efficient query method based on partition tree decomposition.
[0146] The electronic device may be a mobile phone, computer, or tablet computer, etc., and includes a memory and a processor. The memory stores a computer program, which, when executed by the processor, implements the time-dependent label constraint-based efficient query method based on partition tree decomposition as described in the embodiments. It is understood that the electronic device may also include input / output (I / O) interfaces and communication components.
[0147] The processor is used to execute all or part of the steps in the time-dependent label constraint-based efficient query method based on partition tree decomposition as described in the above embodiments. The memory is used to store various types of data, which may include, for example, instructions for any application or method in the electronic device, as well as application-related data.
[0148] The processor can be implemented as an Application Specific Integrated Circuit (ASIC), Digital Signal Processor (DSP), Programmable Logic Device (PLD), Field Programmable Gate Array (FPGA), controller, microcontroller, microprocessor, or other electronic components, and is used to execute the time-dependent label constraint efficient query method based on partition tree decomposition described in the above embodiments.
[0149] Example 3:
[0150] This embodiment proposes a computer-readable storage medium that stores executable instructions. When these instructions are executed, if they are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium.
[0151] The computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the time-dependent label constraint efficient query method based on partition tree decomposition described in the various embodiments of this application.
[0152] The aforementioned storage media include: flash memory, hard disks, multimedia cards, card-type memory (e.g., SD (Secure Digital Memory Card) or DX (Memory Data Register, MDR) memory), random access memory (RAM), static random-access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic storage, disks, optical discs, servers, APP (Application) app stores, and other media capable of storing program verification codes. These media store computer programs, which, when executed by a processor, can implement the various steps of the time-dependent label constraint efficient query method based on partition tree decomposition described above.
[0153] Example 4:
[0154] This embodiment proposes a computer program product, including a computer program or instructions, which, when executed by a processor, implements the efficient query method based on time-dependent label constraints and partition tree decomposition.
[0155] Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a computer program product.
[0156] The various embodiments in this application are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.
[0157] The scope of protection of this application is not limited to the embodiments described above. Obviously, those skilled in the art can make various modifications and variations to this disclosure without departing from the scope and spirit of this disclosure. If such modifications and variations fall within the scope of this disclosure and its equivalents, then the intent of this disclosure also includes these modifications and variations.
Claims
1. An efficient query method based on time-dependent label constraints using partitioning tree decomposition, characterized in that, Includes the following steps: Acquire road network information and generate road data maps; The road data map is reduced and a tree structure is generated based on the label partitioning tree decomposition algorithm; Construct a parameter-separated indexing mechanism to transform the tree structure into a parameter-separated index; Obtain the starting point and destination point, and in the road data graph, use the starting point and destination point as the source vertex and target vertex, respectively; Based on parameter separation index, calculate the shortest path from a given source vertex to a target vertex; The road data map is iteratively reduced and a tree structure is generated based on the label partitioning tree decomposition algorithm, including: Based on a three-stage vertex selection strategy, vertices to be eliminated are removed from the road data graph processed in the current iteration, and the connection relationships between the neighboring vertices of the vertices to be eliminated are reconstructed to obtain a reduced road data graph. The reduced road data graph is then used as the road data graph for the next iteration. The process of selecting vertices to be eliminated, removing vertices to be eliminated, and reconstructing the connection relationships between the neighboring vertices of the vertices to be eliminated is repeated until all vertices in the road data graph are eliminated. Create a package for each vertex to be eliminated and add it to a package set. The package includes the vertex to be eliminated, the neighboring vertices of the vertex to be eliminated, and a local label set. The local label set includes the type labels of all directed edges connected to the vertex to be eliminated. Determine the parent-child relationship of all packages in the package set, and generate a tree structure based on the determined parent-child relationship, including several tree nodes, each tree node corresponding to a package and a set of tags; The three-stage vertex selection strategy includes: Phase 1: Select several vertices with the smallest vertex degree from the road data map to generate the first vertex set; Second stage: Select the vertex with the highest label similarity from the first vertex set to generate the second vertex set; The third stage involves converting the time dependency function of all directed edges connecting vertices in the second vertex set into a sequence of inflection points, including several time inflection points. ,in, For the departure time, To reduce time costs, the vertex with the fewest total time inflection points in the inflection point sequence is selected as the vertex to be eliminated, and added to the vertex elimination sequence. A parameter-separated indexing mechanism is constructed to transform the tree structure into a parameter-separated index. The specific method is as follows: Initialization parameters, including the global parameter pool Output and input label dictionaries; global parameter pool Used to store time inflection points The out label dictionary is used to store the paths starting from each vertex, and the in label dictionary is used to store the paths reaching each vertex. Process all tree nodes in the tree structure according to the post-order level-order traversal order, for the current tree node From the current tree node Select any vertex from the corresponding package and compare it with the current tree node. Form vertex pairs and obtain the type labels on the paths between vertex pairs; The effective states of the path are calculated using automaton transition rules, the time dependency function of the path is extracted, and it is converted into a sequence of inflection points; the automaton transition rules include: For the current tree node Given any two distinct neighboring vertices in the packet, obtain the type labels of all directed edges in the path, merge consecutive and repeated type labels to obtain simplified label sequences for the two paths; Traverse the simplified label sequence. For each type label, verify whether the current type label already exists in the history set. If it exists, the label transfer is considered to have failed and the path is invalid. If it does not exist, add the current type label to the history set and continue to verify the next type label. When all type labels in the path pass the verification, the path is valid. The history set is used to store type labels that have appeared in the simplified label sequence before the current type label. Extract the time dependency function of the path and convert it into a sequence of inflection points. Use a hash set to assign each inflection point in the sequence to a hash value. Perform hash value calculation, and check whether each time inflection point already exists in the global parameter pool through hash lookup and exact matching. If the time inflection point in the inflection point sequence already exists in the global parameter pool, obtain the index of the time inflection point in the global parameter pool; if the time inflection point in the inflection point sequence does not exist in the global parameter pool, add the time inflection point to the global parameter pool and obtain the index of the time inflection point in the global parameter pool. Each time inflection point in the global parameter pool is a unique inflection point. Based on the position of each time inflection point in the global parameter pool, a label dictionary and index entries in the in-label dictionary are created, including next-hop pointer information and previous-hop pointer information. The next-hop pointer information is the current tree node in the tree structure. The traversal proceeds to the next tree node, with the previous pointer information indicating the current tree node in the tree structure. Iterate through the previous tree node.
2. The efficient query method based on time-dependent label constraints using partition tree decomposition according to claim 1, characterized in that, The road data map Including vertex set Edge set Tag collection and time-dependent function set Vertex set It includes several vertices, used to represent intersections and preset key locations in the road network; and an edge set. Includes several directed edges, used to represent the connecting paths between vertices; label set Includes a type label for each directed edge, used to represent the type attribute of the directed edge; and a set of time-dependent functions. It includes several time-dependent functions used to represent The time cost required to travel from one vertex to another via a directed edge.
3. The efficient query method based on time-dependent label constraints using partitioning tree decomposition according to claim 1, characterized in that, The connection relationships between the neighboring vertices of the vertex to be eliminated are reconstructed, specifically as follows: For any two distinct neighboring vertices of the vertex to be eliminated and , , Vertices to be eliminated Given a set of neighboring vertices, check the set of neighboring vertices. Starting point, passing through vertices to be eliminated Then reach the neighboring vertex Path and from neighboring vertices Starting point, passing through vertices to be eliminated Then reach the neighboring vertex Does the path satisfy the label sequence rule defined by the automaton? If it does, then it is based on the two neighboring vertices. and To the vertex to be eliminated Calculate the composite time dependency function; If neighboring vertices and neighboring vertices If there is no directed edge between them, then at the neighboring vertex and neighboring vertices Create directed edges between neighboring vertices, using the composite temporal dependency function as the path from the neighboring vertex. To the neighboring vertex Time-dependent functions; if neighboring vertices and neighboring vertices If there is a directed edge between them, then compare from the neighboring vertices. and neighboring vertices The time cost of time-dependent functions and the time cost of composite time-dependent functions are considered, and time-dependent functions with smaller time costs are retained. The label sequence rule defined by the automaton is that on a path with multiple vertices, the label type of the directed edge connecting two adjacent vertices must follow the rule.
4. The efficient query method based on time-dependent label constraints using partition tree decomposition according to claim 3, characterized in that, To determine the parent-child relationships of all packages in a package set, the specific method is as follows: For the vertices to be eliminated bag Based on a three-stage vertex selection strategy, from the vertices to be eliminated Select a new vertex to be eliminated from its neighboring vertices. It will be based on the new vertices to be eliminated. Created package As a bag The parent package; The specific method for establishing the label set for each tree node is as follows: Process each tree node in the tree structure according to the post-order traversal order. Tree nodes are merged using set union operation. The local label set of all subtree nodes is propagated upwards to obtain the tree node. The set of subtree labels; Tree nodes Local label sets and tree nodes Perform a union operation on the subtree label sets to generate tree nodes. A collection of tags.
5. The efficient query method based on time-dependent label constraints using partition tree decomposition according to claim 1, characterized in that, The method for calculating the shortest path from a given source vertex to a target vertex is as follows: In the tree structure, locate the lowest common ancestor node of the source vertex and the target vertex. Based on the label sequence rules defined by the automaton, select a set of candidate hub vertices from the bag corresponding to the lowest common ancestor node. The lowest common ancestor node is the root node of the least common subtree of the source vertex and the target vertex. A set of label pairs is generated for each candidate hub vertex in the candidate hub vertex set; the label pair set is verified to obtain triples that are state-continuous and time-compatible, and these triples are added to the candidate set. Select the optimal hub vertex from the candidate set; Construct the shortest path from the source vertex to the target vertex based on the optimal hub vertex.
6. The efficient query method based on time-dependent label constraints using partition tree decomposition according to claim 5, characterized in that, Based on the label sequence rules defined by the automaton, a set of candidate hub vertices is selected from the bag corresponding to the lowest common ancestor node. The specific method is as follows: Traverse the bag corresponding to the lowest common ancestor node. For each candidate vertex encountered during the traversal, verify whether the path from the source vertex through the candidate vertex to the target vertex satisfies the label sequence rule defined by the automaton. Add the candidate vertex that passes the verification as a candidate hub vertex to the candidate hub vertex set.
7. The efficient query method based on time-dependent label constraints using partition tree decomposition according to claim 6, characterized in that, The specific method for generating a set of label pairs based on each candidate hub vertex in the candidate hub vertex set is as follows: For the candidate hub vertex set Each candidate hub vertex , source vertex The list of candidate hub vertices in the label dictionary Use the type label on the path to the target vertex as the output label. and target vertex All candidate hub vertices in the input label dictionary The type label on the path to the source vertex is used as the input label. Generate a set of tag pairs, including several pairs of outgoing and incoming tags; The tag pair set is validated to obtain a valid combination that is state-continuous and time-compatible, including: validating the state continuity of the tag pair set, and validating the time compatibility of the outgoing and incoming tags that pass the state continuity validation. The specific method for verifying the state continuity of a set of labels is as follows: Verify the current output tag respectively and current entry tag To determine whether the label sequence rules defined by the automaton are satisfied, obtain the current output label. status and current entry tag status If the current tag is displayed status and label status Consistent, determine the current label output. and current entry tag Verification through state continuity; If the current label is displayed status and current entry tag status If there is a discrepancy, determine the current output label. and current entry tag The current output label was skipped because the state continuity verification failed. and current entry tag Verify the next pair of outgoing and incoming labels; For outgoing and incoming tags that have passed the state continuity verification, time compatibility verification is performed. The specific method is as follows: For the current outgoing label that has passed the state continuity verification and current entry tag Based on the source vertex To candidate hub apex Time-dependent function calculation to reach candidate hub vertex The moment ; If the candidate hub vertex is reached The moment If it falls within the domain of the in-label time dependency function, then it is determined to be from the candidate hub vertex. To the target vertex The path is time-compatible, generating triples and adding them to the candidate set. ; If the candidate hub vertex is reached The moment If it does not belong to the domain of the in-label time dependency function, then it is determined to be from the candidate hub vertex. To the target vertex The path is not time-compatible, skipping the current output tag. and current entry tag .
8. The efficient query method based on time-dependent label constraints according to claim 7, characterized in that, The specific method for selecting the optimal hub vertex from the candidate set is as follows: For the candidate set Each triple in the set will indicate the departure time. Input the label time dependency function and calculate the time cost from the source vertex to the candidate hub vertex; The time when the candidate hub peak will be reached. Input the label time dependency function and calculate the time cost from the candidate hub vertex to the target vertex; Add the time cost from the source vertex to the candidate pivot vertex and the time cost from the candidate pivot vertex to the target vertex to get the total time cost of the triple; The candidate hub vertex with the minimum total time cost in the candidate set is selected as the optimal hub vertex.
9. The efficient query method based on time-dependent label constraints according to claim 8, characterized in that, The specific method for constructing the shortest path from the source vertex to the target vertex based on the optimal pivot vertex is as follows: Initialization includes source vertices The list of source path segments, including the source vertices The vertex pointed to by the next-hop pointer information recorded in the exit label dictionary is taken as the first exit vertex and added to the source vertex path segment list; The vertex pointed to by the next-hop pointer information recorded in the exit label dictionary of the first exit vertex is taken as the second exit vertex and added to the source vertex path segment list, gradually constructing the path segment from the source vertex. To the optimal hub vertex Path segment; Initialization includes target vertex The target point path segment list, including the target vertex The vertex pointed to by the previous hop pointer information recorded in the ingress label dictionary is taken as the first ingress vertex and added to the target point path segment list; the vertex pointed to by the previous hop pointer information recorded in the ingress label dictionary of the first ingress vertex is taken as the second ingress vertex and added to the target point path segment list, and so on, gradually constructing the path from the optimal hub vertex. To the target vertex Path segment; From the source vertex To the optimal hub vertex Path segments and from the optimal hub vertex To the target vertex Connect the path segments to form a complete optimal path. .