A timing path processing method and device, and a storage medium
Patent Information
- Application Number
- CN202111235743.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-22
- Publication Date
- 2026-11-03
- Estimated Expiration
- 2041-10-22
AI Technical Summary
The application scope of timing diagrams in existing technologies is limited, as they only consider the time factor, which leads to their application limitations.
By acquiring time and loss information from the time series information, time series edges and time series paths are constructed, and the cost of the time series paths is calculated based on the preset cost formula. Pruning is then performed in combination with time and loss information to construct pruned time series paths and time series graphs, and biconnected components and cut vertices are partitioned.
It expands the application scope of time series diagrams, enabling a more comprehensive display of information and improving the computational and query efficiency of time series paths.
Smart Images

Figure CN116012485B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of graph algorithm technology, and in particular to a time-series path processing method, apparatus, and storage medium. Background Technology
[0002] A sequence diagram, also known as a sequence diagram or sequence graph, is a type of UML interaction diagram. It shows the dynamic collaboration between multiple objects by describing the temporal order in which messages are sent between them. It can represent the sequence of actions in a use case; when a use case action is executed, each message corresponds to a triggering event in a class operation or state machine that causes a transition. Many real-world scenarios can be modeled as sequence diagrams, such as communication between one vertex and another at a specific point in time or over a period of time.
[0003] However, in existing technologies, research on different types of paths in time sequence diagrams usually only considers the time factor, which limits the application scope of time sequence diagrams. Summary of the Invention
[0004] To address the aforementioned technical problems, this invention aims to provide a timing path processing method, apparatus, and storage medium that can calculate the cost of a timing path based on two factors: departure time and loss. This expands the application scope of timing graphs and achieves the goal of timing graph cost path calculation.
[0005] The technical solution of this invention is implemented as follows:
[0006] This invention provides a timing path processing method, including:
[0007] Acquire timing information; the timing information includes the time information and loss information corresponding to the node;
[0008] Based on the time information and loss information corresponding to the nodes, time-series edges and time-series paths are constructed; wherein, the time-series path represents the path between at least two nodes, and the at least two nodes represent the starting point or origin of the time-series path; the time-series edge connects every two adjacent nodes among the at least two nodes;
[0009] Based on the time information and loss information corresponding to the two nodes at both ends of the time path, and the preset cost formula, the cost corresponding to the time path is obtained.
[0010] In the above scheme, the time information includes: arrival time information and departure time information.
[0011] In the above scheme, the step of processing the time information and loss information corresponding to the two nodes at both ends of the time-series path, and obtaining the cost corresponding to the time-series path based on the preset cost formula, includes:
[0012] Based on the departure time information and loss information corresponding to the two nodes at both ends of the time-series path, as well as the preset cost formula, the cost corresponding to the time-series path is obtained.
[0013] The method in the above scheme further includes:
[0014] Based on the time information, the temporal edges are pruned to obtain pruned temporal edges;
[0015] Based on the pruning timing edges, construct the timing path to be pruned;
[0016] Based on the stated cost, the time sequence path to be pruned is pruned to obtain the pruned time sequence path.
[0017] In the above scheme, the step of pruning the temporal edges based on the temporal information to obtain pruned temporal edges includes:
[0018] Based on the departure time, the temporal edges are sorted to obtain the sorted temporal edges;
[0019] Based on the departure time, the sorted temporal edges are pruned to obtain the pruned temporal edges.
[0020] In the above scheme, the step of pruning the sorted temporal edges according to the departure time to obtain the pruned temporal edges includes:
[0021] The sorted time-series edges connected to the same node are traversed. When a first time-series edge in the sorted time-series edges does not meet the preset time requirement, the first time-series edge and all sorted time-series edges after the first time-series edge are pruned.
[0022] The pruned temporal edges are obtained after all sorted temporal edges have been traversed; wherein, the first temporal edge is any one of the sorted temporal edges.
[0023] In the above scheme, the step of pruning the time-series path to be pruned according to the cost to obtain the pruned time-series path includes:
[0024] The time-series paths to be pruned that pass through the same node are traversed. When a first time-series path in the first time-series graph does not meet the preset cost requirement, the first time-series path is pruned.
[0025] The pruning timing path is obtained after all the timing paths have been traversed; wherein, the first timing path is any one of the timing paths to be pruned.
[0026] In the above scheme, after pruning the time-series path to be pruned according to the cost to obtain the pruned time-series path, the method further includes:
[0027] Construct a timing graph based on the pruning timing path;
[0028] The timing graph is divided to obtain biconnected components and cut points; wherein, the path between any two nodes in the pruned timing path is a sub-timing path, the biconnected component is composed of the sub-timing path and the any two nodes; the cut point is the node connected to the biconnected component;
[0029] Based on the departure time information and loss information corresponding to the two nodes at both ends of the sub-temporal path, as well as the preset cost formula, the sub-cost corresponding to the sub-temporal path in the biconnected component is obtained and stored in the cut point.
[0030] In the above scheme, the step of partitioning the time sequence graph to obtain biconnected components and cut points includes:
[0031] According to a preset transformation method, the time sequence graph is transformed into an undirected graph;
[0032] Based on the undirected graph and the preset algorithm, the biconnected components and the cut vertices are obtained.
[0033] In the above scheme, after processing the sub-cost corresponding to the sub-temporal path in the biconnected component based on the departure time information and loss information corresponding to the two nodes at both ends of the sub-temporal path, and the preset cost formula, and storing it in the cut point, the method further includes:
[0034] Get two nodes to be queried;
[0035] Based on the two nodes to be queried, determine the corresponding pruning timing path;
[0036] Based on the pruning timing path, determine the corresponding sub-timing path;
[0037] The sub-costs corresponding to the sub-temporal paths are summed to obtain the cost corresponding to the pruned temporal paths;
[0038] Based on the cost corresponding to the pruning time sequence path, the minimum combined cost path is obtained; wherein, the minimum combined cost path represents the pruning time sequence path with the minimum cost.
[0039] This invention provides a timing path processing apparatus, comprising an acquisition unit, a construction unit, and a calculation unit; wherein:
[0040] The acquisition unit is used to acquire timing information;
[0041] The construction unit is used to construct temporal edges and temporal paths based on the temporal information;
[0042] The processing unit is used to process and obtain the cost corresponding to the time sequence path based on the time information and loss information corresponding to the two nodes at both ends of the time sequence path, as well as the preset cost formula.
[0043] In the above scheme, the processing unit is further configured to process and obtain the cost corresponding to the time sequence path based on the departure time information and loss information corresponding to the two nodes at both ends of the time sequence path, as well as the preset cost formula.
[0044] In the above scheme, the device further includes a obtaining unit; wherein,
[0045] The obtaining unit is used to perform pruning processing on the temporal edge based on the time information to obtain pruned temporal edge; and to perform pruning processing on the temporal path to be pruned according to the cost to obtain pruned temporal path.
[0046] The construction unit is also used to construct the timing path to be pruned based on the pruning timing edge;
[0047] In the above scheme, the obtaining unit is further configured to sort the temporal edges according to the departure time to obtain sorted temporal edges; and to prune the sorted temporal edges according to the departure time to obtain pruned temporal edges.
[0048] In the above scheme, the obtaining unit is further used to traverse the sorted time-series edges connected to the same node. When there is a first time-series edge among the sorted time-series edges that does not meet the preset time requirement, the first time-series edge and all sorted time-series edges after the first time-series edge are pruned. This continues until all sorted time-series edges have been traversed, and the pruned time-series edges are obtained. The first time-series edge is any one of the sorted time-series edges.
[0049] In the above scheme, the obtaining unit is further used to traverse the time-series paths to be pruned that pass through the same node. When there is a first time-series path in the time-series paths to be pruned that does not meet the preset cost requirement, the first time-series path is pruned. This continues until all time-series paths have been traversed, and the pruned time-series path is obtained. The first time-series path is any one of the time-series paths to be pruned.
[0050] In the above scheme, the construction unit is further configured to construct a timing graph based on the pruning timing path;
[0051] The obtained unit is also used to divide the timing graph to obtain biconnected components and cut points;
[0052] The processing unit is further configured to process the sub-cost corresponding to the sub-temporal path in the biconnected component based on the departure time information and loss information corresponding to the two nodes at both ends of the sub-temporal path, as well as the preset cost formula, and save it in the cut point.
[0053] In the above scheme, the obtaining unit is further used to convert the time sequence graph into an undirected graph according to a preset transformation method; and to obtain the biconnected component and the cut vertex according to the undirected graph and a preset algorithm.
[0054] In the above scheme, the device further includes a determining unit; wherein,
[0055] The determining unit is configured to determine the corresponding pruning time sequence path based on the two nodes to be queried; and to determine the corresponding sub-time sequence path based on the pruning time sequence path.
[0056] The acquisition unit is also used to acquire two nodes to be queried;
[0057] The obtaining unit is further configured to accumulate the sub-costs corresponding to the sub-temporal paths to obtain the costs corresponding to the pruned temporal paths; and to obtain the minimum combined cost path based on the costs corresponding to the pruned temporal paths.
[0058] This invention provides a timing path processing apparatus, comprising:
[0059] Memory, used to store executable data instructions;
[0060] The processor, when executing executable instructions stored in the memory, implements the timing path processing method described in this embodiment of the invention.
[0061] This invention provides a computer-readable storage medium storing executable instructions for inducing a processor to execute a timing path processing method as described in this invention.
[0062] This invention provides a time-series path processing method, apparatus, and storage medium. The method includes first acquiring time-series information, which includes time information and loss information corresponding to nodes. Based on the time-series information, time-series edges and time-series paths are constructed. According to the time information and loss information, and a preset cost formula, the time information and loss information are substituted into the preset cost formula to obtain the cost corresponding to the time-series path.
[0063] The embodiments of the present invention can process time information and loss information based on the time path, and obtain the cost corresponding to the time path, thereby expanding the range of information that the time path can display, expanding the application scope of the time sequence diagram, and achieving the goal of obtaining the cost of the time path. Attached Figure Description
[0064] Figure 1 A flowchart illustrating a timing path processing method provided in an embodiment of the present invention. Figure 1 ;
[0065] Figure 2a A timing diagram provided for an embodiment of the present invention;
[0066] Figure 2b Another timing diagram provided for an embodiment of the present invention;
[0067] Figure 2c Another timing diagram provided in the embodiments of the present invention;
[0068] Figure 2d Another timing diagram provided for embodiments of the present invention;
[0069] Figure 3 A schematic diagram of a timing path processing method provided in an embodiment of the present invention (II);
[0070] Figure 4 A flowchart illustrating a timing path processing method provided in an embodiment of the present invention. Figure 3 ;
[0071] Figure 5 An undirected graph provided in an embodiment of the present invention;
[0072] Figure 6 A flowchart illustrating a timing path processing method provided in an embodiment of the present invention. Figure 4 ;
[0073] Figure 7A flowchart illustrating a timing path processing method provided in an embodiment of the present invention. Figure 5 ;
[0074] Figure 8 A schematic diagram of a timing path processing device provided in an embodiment of the present invention. Figure 1 ;
[0075] Figure 9 The second schematic diagram shows the structure of a timing path processing device provided in an embodiment of the present invention. Detailed Implementation
[0076] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
[0077] This invention provides a timing path processing method. Figure 1 This is a flowchart illustrating a timing path processing method provided in an embodiment of the present invention. Figure 1 ,like Figure 1 As shown, the above method includes:
[0078] S101. Obtain timing information. Timing information includes the time information and loss information corresponding to the node.
[0079] In this embodiment of the invention, it is applicable to scenarios involving the acquisition of timing information.
[0080] In this embodiment of the invention, the time information and loss information corresponding to the node are obtained; wherein, the time information and loss information corresponding to the node are time-series information.
[0081] In this embodiment of the invention, a node can represent a connection point, a redistribution point, or a communication endpoint (some terminal devices), and time information is used to represent the moment when information interacts with a node. For example, in the following scenarios: in a telephone network, A calls B at time t; in an information service or email network, A sends a message to B at time t; in a citation network, A cites B at time t; in a collaboration network, A works with B at time t. Both A and B are nodes, and time t represents the time information.
[0082] In this embodiment of the invention, loss information is used to represent another type of information besides time information; this other type of information can be defined according to requirements. For example, since different courier services have different delivery times and costs, loss information can be used to represent the cost. Similarly, since the travel time and ticket cost vary depending on whether one is traveling by train, high-speed rail, or bullet train from one place to another, loss information can represent the ticket cost.
[0083] It is understandable that time-series information includes not only the time information corresponding to the nodes, but also loss information, making the time-series information more comprehensive. By constructing the required scenarios through the above time-series information, the scope of application is expanded and the comprehensiveness of the constructed scenarios is improved.
[0084] In some embodiments of the present invention, the time information includes arrival time information and departure time information.
[0085] In some embodiments of the present invention, the departure time information represents the time when the action begins from the node, and the arrival time information represents the time when the action arrives at the node; for example, when traveling from one location A (node A) to another location B (node B), the departure time information is used to represent the time when the action begins from location A, and the arrival time information is used to represent the time when the action arrives at location B.
[0086] Understandably, arrival and departure time information makes it easier to construct the required scenarios using time-series information.
[0087] S102. Construct temporal edges and temporal paths based on the time and loss information corresponding to the nodes. A temporal path represents a path between at least two nodes, and at least two nodes represent the starting point or origin of the temporal path; a temporal edge connects every two adjacent nodes among the at least two nodes.
[0088] In this embodiment of the invention, it is applicable to scenarios where, after obtaining time-series messages, time-series edges and time-series paths are constructed based on the time-series messages.
[0089] In this embodiment of the invention, after obtaining the timing message, since the timing path represents the path between at least two nodes, and the timing edge connects each two adjacent nodes among the at least two nodes, the timing edge is first constructed based on the timing information and loss information corresponding to the node, and then the timing path is constructed based on the timing edge. Here, at least two nodes represent the starting point or origin of the timing path.
[0090] In this embodiment of the invention, there is more than one time-series edge between every two adjacent nodes. The time-series edge is used to represent the time-series information between the two adjacent nodes and can be represented by <source node information, target node information, departure time information, arrival time information, loss information>; that is, the time-series edge corresponds one-to-one with the time-series message.
[0091] In this embodiment of the invention, the timing path refers to the logical path traversed during message propagation, that is, the path from one node to another; and there can be more than one timing path between two nodes.
[0092] In this embodiment of the invention, if all nodes in at least two nodes are used to represent locations, then, for example, the connection between two directly reachable locations (nodes) can be modeled as a temporal path, and the connection between two directly reachable adjacent locations (nodes) can be modeled as a temporal edge; wherein, the temporal path represents all locations that need to be traversed from one location to another, and the temporal edge represents the time information segment (departure time information and arrival time information) and the required cost (loss information) from one location to another adjacent location. For example, let p = <v1,v2,v3,…,v k ,v k+1 > represents a timing path, where v k Let p1 represent the nodes in the time sequence path, k∈{1,2,3,...,n}, where n represents the number of nodes; <v,u4,t start(4) ,t arrive(4) w4>t1≥t start(2) ≥t start(3) ≥t start(4) Let v be a time-series edge, where v i and v j t represents two adjacent nodes. start(i) Indicates from node v i to node v j Departure time information, t arrive(i) Indicates from node v i to node v j Arrival time information, w i Represents node v i to node v j The loss information. In practical use, the time information needs to meet t arrive(i) ≤t start(i+1) That is, the departure time information of a node must be greater than or equal to the arrival time information of the aforementioned nodes.
[0093] It is understandable that using temporal edges and temporal paths to represent temporal information and the relationships between nodes is more intuitive.
[0094] S103. Based on the time information and loss information corresponding to the two nodes at both ends of the time path, and the preset cost formula, the cost corresponding to the time path is obtained.
[0095] In this embodiment of the invention, it is applicable to scenarios where the cost corresponding to a time-series path is obtained.
[0096] In this embodiment of the invention, the cost corresponding to the time path is obtained by processing the time information and loss information corresponding to the two nodes at both ends of the time path obtained in S101, as well as the preset cost formula.
[0097] In this embodiment of the invention, when traveling from one node to another, the value obtained by comprehensively considering both time information and loss information is used as the cost. In actual use, according to the requirements, the difference between arrival time information and departure time information, as well as the loss information, are weighted according to different weights to obtain the weighted time information difference and the weighted loss information. The cost is the sum of the weighted time information difference and the weighted loss information.
[0098] In this embodiment of the invention, the preset cost calculation formula is Equation 1-1, as follows:
[0099] cost(p) = α * w(p) + (1 - α) * (t) α -t s (1-1)
[0100] Where p is the timing path p = <v,v1,v2,...,v n >, w(p) is the sum of loss information for all temporal edges on the temporal path, t s The departure time information is t. a For arrival time information, α is a preset weight and α∈[0,1].
[0101] In this embodiment of the invention, the value of α represents a trade-off between time information and cost information. When α = 0, it means that cost information is not considered when obtaining the cost of the current time-series path, which is equivalent to obtaining the fastest arrival path. When α = 1, it means that time information is not considered when obtaining the cost of the current time-series path, which is equivalent to obtaining the minimum cost information. For example, when purchasing a train ticket, each location is modeled as a node, and a time-series edge is modeled between two directly accessible locations. The departure time information and arrival time information on the time-series edge represent the departure time information and arrival time information from one location to another, respectively, and the cost information on the time-series edge represents the ticket price from one location to another. By adjusting α, the proportion of time information and cost information can be adjusted.
[0102] It is understandable that when obtaining the cost corresponding to a timing path, the influence of both time information and loss information is considered. Compared with the prior art, which only considers time information or loss information when obtaining the cost corresponding to a timing path, the embodiments of the present invention expand the application scope of obtaining the cost corresponding to a timing path.
[0103] In some embodiments of the present invention, the cost corresponding to the time sequence path is obtained by processing the departure time information and loss information corresponding to the two nodes at both ends of the time sequence path, as well as the preset cost formula.
[0104] In some embodiments of the present invention, it is applicable to scenarios in which the cost corresponding to a time-series path is obtained by processing departure time information and loss information.
[0105] In some embodiments of the present invention, the departure time information and loss information corresponding to the two nodes at both ends of the time-series path are substituted into a preset cost formula, and the cost corresponding to the time-series path can be obtained through the preset cost formula.
[0106] It is understood that in some embodiments of the present invention, a suitable timing path can be selected based on departure time information and loss information.
[0107] Figure 3 This is a schematic diagram of a timing path processing method provided in an embodiment of the present invention, as shown in Figure 2. Figure 3 As shown, the timing path processing method also includes:
[0108] S104. Based on time information, prune the temporal edges to obtain pruned temporal edges.
[0109] In this embodiment of the invention, it is applicable to scenarios where non-compliant timing edges in the timing graph are removed.
[0110] In this embodiment of the invention, based on temporal information, the temporal edges constructed in S102 are pruned to obtain pruned temporal edges.
[0111] In this embodiment of the invention, pruning is an algorithm optimization method, which avoids some unnecessary traversal processes through certain judgments.
[0112] In this embodiment of the invention, when pruning temporal edges based on time information, the pruning process can be performed according to the departure time information corresponding to the temporal edge. Here, the departure time information refers to the departure time information corresponding to the source node among the nodes at both ends of the temporal edge.
[0113] In the real-time example of this invention, pruning refers to sequentially traversing the sorted temporal edges. When a temporal edge is encountered that does not meet a preset time information requirement, the traversal stops, and it is assumed that subsequent temporal edges will also not meet the preset time information requirement. Pruning is then performed on the aforementioned temporal edge and its subsequent edges, i.e., removing the aforementioned temporal edge and its subsequent edges, thus completing the first pruning process. The preset time information requirement can be that the departure time of the temporal edge is greater than the arrival time of a specified temporal path. For example, assuming it is necessary to traverse from node a to node v, then a is called the source node; assuming one of the temporal paths from node a to node v is p1 = ...<a,…,v> The arrival time information of the temporal path p1 to node v is t1. Assume that the temporal edges with node v as the source node have... <v,u1,t start(1),t arrive(1) ,w1>、 <v,u2,t start(2) ,t arrive(2) ,w2>、 <v,u3,t start(3) ,t arrive(3) ,w3> and <v,u4,t start(4) ,t arrive(4) ,w4>,and t start(1) ≥t start(2) ≥t start(3) ≥t start(4) That is, all the time-series edges mentioned above have been sorted in descending order of their start time. When traversing the time-series edges starting from node v, when traversing to... <v,u2,t start(2) ,t arrive(2) When w2>, if t1≥t start(2) If the traversal is complete, then stop the traversal; that is, no further traversal is needed. <v,u3,t start(3) ,t arrive(3) ,w3> and <v,u4,t start(4) ,t arrive(4) ,w4>, and for <v,u2,t start(2) ,t arrive(2) ,w2>、 <v,u3,t start(3) ,t arrive(3) ,w3> and <v,u4,t start(4) ,t arrive(4) Pruning is performed on w4. Because, when t1≥t start(2) When, it means that the arrival time of the time path p1 to node v is greater than or equal to the arrival time of the time edge. <v,u2,t start(2) ,t arrive(2) The departure time information of w2> means that when traversing from node a to node v, the time sequence edge will not be traversed. <v,u2,t start(2) ,t arrive(2) Therefore, <v,u3,t start(3) ,t arrive(3) ,w3> and <v,u4,t start(4) ,t arrive(4) w4> definitely does not satisfy the requirement of the temporal path p1, that is, when traversing from node a to node v, the temporal edge will definitely not be traversed. <v,u3,t start(3) ,t arrive(3) ,w3> and <v,u4,t start(4) ,t arrive(4) ,w4>.
[0114] In this embodiment of the invention, when performing a second pruning process on the time series graph after the first pruning based on cost, the time series paths in the time series graph after the first pruning are traversed according to the cost corresponding to each time series path in the time series graph after the first pruning. When a time series path is encountered that does not meet a preset cost requirement, the traversal stops, and the aforementioned time series path is pruned, thereby completing the second pruning process. The preset cost requirement can be that the cost corresponding to the time series path is less than or equal to the cost corresponding to other time series paths passing through the same node, and the arrival time information of the aforementioned time series path is less than or equal to the arrival time information of other time series paths passing through the same node. For example, suppose one of the time series paths from node a to node v is p1 = ...<a,…,v> Wherein, the arrival time information of the time-series path p1 to node v is t1, the cost of the time-series path p1 is cost(p1) = c1, and the other time-series path from node a to node v is p2 =<a,…,v> The arrival time information of the time path p2 to node v is t2, and the cost of the time path p2 is cost(p2) = c2. If c1 ≥ c2 and t1 ≥ t2, it means that the time path p1 does not meet the preset cost requirement, that is, the time path p1 can be pruned.
[0115] It is understandable that pruning can remove unsuitable time-series edges, thus narrowing the range of time-series edges and making subsequent queries easier, thereby reducing the workload of subsequent queries.
[0116] In some embodiments of the present invention, S104 may include S1041-S1042, as follows:
[0117] S1041. Sort the time-series edges according to the departure time information to obtain the sorted time-series edges.
[0118] In some embodiments of the present invention, it is applicable to scenarios where preparation is performed before pruning a time series diagram.
[0119] In some embodiments of the present invention, the temporal edges are sorted according to the departure time information to obtain sorted temporal edges; wherein the sorting method can be set according to actual needs, and the embodiments of the present invention are not limited thereto.
[0120] In some embodiments of the present invention, the time-series edges associated with each node are sorted according to preset requirements. For example, the preset requirements may be sorted according to the departure time information corresponding to the time-series edges from largest to smallest, or according to the arrival time information. The embodiments of the present invention do not limit this.
[0121] It is understandable that the temporal edges are sorted before pruning. This ensures that if one temporal edge does not meet the preset time information requirements, then subsequent temporal edges will also not meet the preset time information requirements. This reduces the number of traversals and improves the efficiency of pruning.
[0122] S1042. Based on the departure time information, prune the sorted temporal edges to obtain pruned temporal edges.
[0123] In some embodiments of the present invention, it is applicable to scenarios where temporal edges are pruned.
[0124] In some embodiments of the present invention, the sorted temporal edges obtained in S1041 are pruned according to the departure time information to obtain pruned temporal edges.
[0125] In some embodiments of the present invention, S1042 includes: traversing the sorted temporal edges connected to the same node; when a first temporal edge among the sorted temporal edges does not meet the preset time information requirements, pruning the first temporal edge and all sorted temporal edges after the first temporal edge. This continues until all sorted temporal edges have been traversed, resulting in pruned temporal edges. The first temporal edge is any one of the sorted temporal edges.
[0126] In some embodiments of the present invention, the sorted time-series edges connected to the same node are traversed. A source node can be defined, and the traversal of the sorted time-series edges connected to the same node begins from this source node. When a first time-series edge among the sorted time-series edges does not meet the preset time information requirements, the first time-series edge and all sorted time-series edges after it are pruned, and the traversal continues until all sorted time-series edges have been traversed. The first time-series edge is any one of the sorted time-series edges. After all sorted time-series edges have been traversed, the remaining sorted time-series edges are the pruned time-series edges.
[0127] In some embodiments of the present invention, the preset time information requirement may be that the departure time of the time-series edge is not less than a preset threshold, or that the departure time of the time-series edge is greater than the arrival time of the specified time-series path. The embodiments of the present invention are not limited to this.
[0128] It is understood that, in this embodiment of the invention, timing edges that do not meet the preset time information requirements can be removed to reduce the number of timing edges.
[0129] S105. Construct the timing path to be pruned based on the pruning timing edge.
[0130] In this embodiment of the invention, it is applicable to the scenario of constructing the corresponding time-series path to be pruned after obtaining the pruned time-series edges.
[0131] In this embodiment of the invention, after obtaining the pruning timing edge through S104, the timing path to be pruned is constructed according to S102.
[0132] In this embodiment of the invention, the timing path to be pruned should represent a timing path that conforms to preset time information, and the number of timing paths to be pruned should be less than or equal to the number of timing paths constructed in S102.
[0133] It is understandable that constructing pruned temporal edges into pruned temporal paths makes it easier to further prune the temporal paths to be pruned based on their costs, thereby further narrowing down the range of temporal paths to be pruned and improving query efficiency.
[0134] S106. Based on the cost, perform pruning on the timing path to be pruned to obtain the pruned timing path.
[0135] In this embodiment of the invention, it is applicable to scenarios where pruning is performed on the timing path to be pruned.
[0136] In this embodiment of the invention, the time-series paths to be pruned constructed in S105 are pruned according to the cost corresponding to each time-series path to be pruned, so as to obtain the pruned time-series paths.
[0137] Understandably, this can yield pruned time-series paths that meet the preset cost requirements, which will reduce query time and improve query efficiency when querying time-series paths in the future.
[0138] In some embodiments of the present invention, the time-series paths to be pruned that pass through the same node are traversed. When there is a first time-series path in the time-series paths to be pruned that does not meet the preset cost requirement, the first time-series path is pruned. This process continues until all time-series paths have been traversed, and the pruned time-series paths are obtained. The first time-series path is any one of the time-series paths to be pruned.
[0139] In some embodiments of the present invention, the time-series paths that pass through the same node in the time-series paths to be pruned are traversed; when there is a first time-series path in the time-series paths to be pruned that does not meet the preset cost requirement, the first time-series path is pruned, and the traversal continues until all time-series paths have been traversed, so that all pruned time-series paths are obtained, and all pruned time-series paths meet the preset cost requirement; wherein, the first time-series path is any one of the time-series paths to be pruned.
[0140] It is understood that the embodiments of the present invention can remove time-series paths that do not meet the preset cost requirements, thereby reducing the number of time-series paths that need to be traversed during the query process when querying the required time-series path, thus improving query efficiency.
[0141] Figure 4 A flowchart illustrating a timing path processing method provided in an embodiment of the present invention. Figure 3 ,like Figure 4 As shown, after S106, the timing path processing method provided in this embodiment of the invention further includes S107-S109, as follows:
[0142] S107. Construct a timing diagram based on the pruning timing path.
[0143] In this embodiment of the invention, it is applicable to scenarios involving the construction of timing diagrams.
[0144] In this embodiment of the invention, the pruning timing path is obtained according to S106, and a timing diagram is constructed.
[0145] In this embodiment of the invention, the sequence diagram is a UML interaction diagram; where UML (Unified Modeling Language) is a standard language for describing, visualizing, and documenting object-oriented systems, independent of any specific programming language. The sequence diagram can represent many scenarios in real life.
[0146] In this embodiment of the invention, Figure 2a This is a timing diagram provided in an embodiment of the present invention, such as... Figure 2a As shown, for example, a time sequence diagram can be used to characterize the communication between one node and another node at a specific time point or time segment, that is, through... Figure 2a The timing graph shows that node 0 sends messages to node 1 through timing edge 1 and timing edge 2, etc.
[0147] In this embodiment of the invention, Figure 2b This is another timing diagram provided by an embodiment of the present invention, such as... Figure 2b As shown, a timing diagram can express more detailed information. For example, it can characterize when information is sent and received between two nodes; that is, through... Figure 2b As shown in the sequence diagram, node 0 sends a message to node 1 at time 0, and node 1 receives the message at time 1.
[0148] In this embodiment of the invention, Figure 2c This is another timing diagram provided by an embodiment of the present invention, such as... Figure 2cAs shown, a timing diagram can express not only time information but also loss information. For example, it can characterize when a node sends and receives information, along with other information, during communication between two nodes. This other information could include bandwidth usage, power consumption, etc. Figure 2c As shown in the timing diagram, node 0 sends a message to node 1 at time 1, node 1 receives the message at time 3, and the communication between node 0 and node 1 occupies 2 bandwidths.
[0149] In this embodiment of the invention, a sequence diagram displays the dynamic collaboration between multiple objects by describing the time information of messages sent between them. For example, Figure 2d This is another timing diagram provided by an embodiment of the present invention, such as... Figure 2d As shown, the temporal edges are defined to include departure time information, arrival time information, and loss information. Each temporal edge is a quintuple representing the departure node, arrival node, departure time information, arrival time information, and loss information, respectively. There are several temporal edges between two adjacent nodes. Specifically, 0, 1, 2, 3, 4, and 5 are nodes. <0, 1, 1, 1, 8> and <0, 1, 2, 5, 6> represent temporal edges between node 0 and node 1, meaning there are two temporal edges between node 0 and node 1: <0, 1, 1, 1, 8> and <0, 1, 2, 5, 6>.
[0150] In this embodiment of the invention, based on Figure 2d Table 1 is a connection table provided in an embodiment of the present invention, such as... Figure 1 As shown in Table 1, the relationships between nodes and time-series edges, as well as between nodes and time-series edges originating from that node, can be stored using the adjoining table method.
[0151] Node 0 <0,1,1,1,8> <0,1,1,1,8> Node 1 <1,3,6,13,3> <1,3,8,11,1> <1,3,4,10,3> Node 2 <2,0,2,5,6> <2,0,12,18,1> <2,3,8,10,6> <2,3,2,11,1> … … … … …
[0152] Table 1
[0153] In this embodiment of the invention, the adjacency list is a storage structure that combines sequential allocation and linked allocation, used to describe each point on the graph. For example, if the vertex corresponding to the head node has adjacent vertices, then the adjacent vertices are stored sequentially in the singly linked list pointed to by the head node.
[0154] Understandably, sequence diagrams can clearly show the order in which events occur, making it easier to explain the process of event flow.
[0155] S108. Divide the timing graph to obtain biconnected components and cut vertices. The path between any two nodes in the pruned timing path is a sub-timing path; a biconnected component consists of a sub-timing path and any two nodes; a cut vertex is a node connected to a biconnected component.
[0156] In this embodiment of the invention, it is applicable to scenarios where a timing graph is divided into biconnected components and cut points.
[0157] In this embodiment of the invention, the timing graph is divided into biconnected components and cut vertices. The path between any two nodes in a pruned timing path is a sub-timing path; a biconnected component consists of a sub-timing path and any two nodes; and a cut vertex is a node connected to a biconnected component.
[0158] In this embodiment of the invention, at least one pruned temporal edge between every two adjacent nodes in the pruned temporal path is converted into one undirected edge, thereby obtaining a sub-temporal path. Each pruned temporal edge can be considered a pruned temporal path. Based on equation (1-1), at least one cost corresponding to at least one pruned temporal edge between every two adjacent nodes is obtained. When converting at least one pruned temporal edge between every two adjacent nodes into one pruned temporal edge, the pruned temporal edge corresponding to the minimum cost among at least one cost can be selected as the sub-temporal path.
[0159] In this embodiment of the invention, if removing any node (or edge) from an undirected graph does not change its connectivity (i.e., there are no cut vertices (bridges), it is called a biconnected graph. Each biconnected subgraph of a maximal vertex (edge) in an undirected graph is called a biconnected component of that undirected graph; that is, if a graph has no cut vertices, it is called a biconnected component. Here, an edge refers to the connection between any two adjacent nodes in an undirected graph. In an undirected graph, if there exists a node whose deletion, along with its associated edges, increases the number of connected components, then this node is called a cut vertex; that is, in an undirected graph, if removing a node and its associated edges makes the graph disconnected, then this node is called a cut vertex. Here, an undirected graph means that every edge in the graph is undirected.
[0160] In this embodiment of the invention, the time sequence graph is first transformed into an undirected graph. Then, the Tarjan algorithm is used to partition the undirected graph, yielding biconnected components. The nodes between these biconnected components are called cut vertices. The Tarjan algorithm, based on depth-first search, is used to find the biconnected components and cut vertices of an undirected graph within linear time. Dividing the time sequence graph into biconnected components is equivalent to dividing it into sub-time sequence graphs, which are connected by cut vertices.
[0161] In this embodiment of the invention, based on Figure 2d , Figure 5 This is an undirected graph provided in an embodiment of the present invention, such as... Figure 5 As shown, Figure 2d After converting to an undirected graph, the converted graph will be... Figure 2d After dividing into biconnected components, we will get Figure 5In this context, each dashed box contains a biconnected component, and node 3 is a cut vertex. A cut vertex can belong to multiple biconnected components.
[0162] It is understood that, in this embodiment of the invention, the pruned time sequence graph is divided into biconnected components. By considering all the connected components obtained from this division, the existence of a temporal path between any two nodes in the pruned time sequence graph can be determined based on whether an edge exists between any two nodes in the biconnected components. This reduces the interference from the number and direction of temporal edges and improves the speed at which the existence of a temporal path between any two nodes is determined.
[0163] In some embodiments of the present invention, S108 includes S1081 and S1082, as follows:
[0164] S1081. According to the preset transformation method, convert the time sequence diagram into an undirected graph.
[0165] In some embodiments of the present invention, it is applicable to scenarios where preparation is carried out before dividing the pruning timeline diagram.
[0166] In some embodiments of the present invention, the pruned time sequence graph is converted into an undirected graph according to a preset conversion method. The preset conversion method involves converting all time sequence edges between any two adjacent nodes in the time sequence graph into an undirected edge, i.e., an edge without direction.
[0167] Understandably, this simplifies the sequence diagram and makes it easier to see if there is a timing path between any two nodes in the sequence diagram.
[0168] S1082. Based on the undirected graph and the preset algorithm, obtain the biconnected components and cut vertices.
[0169] In some embodiments of the present invention, it is applicable to scenarios where an undirected graph is divided into biconnected components and cut vertices.
[0170] In some embodiments of the present invention, the undirected graph is partitioned to obtain biconnected components and cut vertices.
[0171] Understandably, when it's necessary to query whether a temporal path exists between any two nodes in a sequence graph, we can determine this by checking if an edge exists between any two nodes in a biconnected component. In a biconnected component, there is only one edge between every two adjacent nodes, and it has no direction. This reduces the interference from the number and direction of temporal edges, thus improving the speed at which we can determine whether a temporal path exists between any two nodes.
[0172] S109. Based on the departure time information and loss information corresponding to the two nodes at both ends of the sub-temporal path, as well as the preset cost formula, process to obtain the sub-cost corresponding to the sub-temporal path in the biconnected component, and save it in the cut point.
[0173] In this embodiment of the invention, it is applicable to scenarios in which sub-costs corresponding to sub-temporal paths in biconnected components are obtained.
[0174] In this embodiment of the invention, the departure time information and loss information corresponding to the two nodes at both ends of the sub-temporal path are substituted into the preset cost formula shown in equation (1-1) to obtain the sub-cost corresponding to the sub-temporal path in the biconnected component, and the sub-cost is stored in the cut point; wherein, due to the sub-temporal path.
[0175] In this embodiment of the invention, each cut point can run independently, meaning it can independently process and obtain the sub-cost corresponding to each sub-temporal path in the biconnected component, and store the obtained sub-cost corresponding to each sub-temporal path in the biconnected component. This allows for parallel computation by processing the obtained sub-costs simultaneously through cut points. Parallel computation is an algorithm that can execute multiple instructions at once.
[0176] Understandably, parallel computation is used to obtain the sub-costs corresponding to each sub-temporal path in the biconnected component, thereby increasing the rate at which the sub-costs corresponding to the sub-temporal paths are obtained.
[0177] Figure 6 This is a flowchart illustrating a timing path processing method provided in an embodiment of the present invention. Figure 4 ,like Figure 6 As shown, after S109, the timing path processing method provided in this embodiment of the invention further includes:
[0178] S201. Obtain two nodes to be queried.
[0179] In this embodiment of the invention, it is applicable to scenarios where the minimum combined cost path between two nodes to be queried is required.
[0180] In this embodiment of the invention, two nodes to be queried are obtained. One of the nodes to be queried is the source node, and the other is the final target node.
[0181] In this embodiment of the invention, both nodes to be queried belong to the time sequence graph constructed in S107. Since the biconnected components are obtained through transformation and partitioning of the aforementioned time sequence graph, the two nodes to be queried will also belong to the biconnected components. Because the time sequence graph is constructed using pruned time sequence paths, the path between the two nodes to be queried will be a pruned time sequence path.
[0182] Understandably, when querying a time-series path or the cost corresponding to a time-series path, obtaining two nodes to be queried first makes the query more targeted and can speed up the query process.
[0183] S202. Determine the corresponding pruning sequence path based on the two nodes to be queried.
[0184] In this embodiment of the invention, it is applicable to the scenario of determining the pruning time sequence path corresponding to two nodes to be queried.
[0185] In this embodiment of the invention, based on two nodes to be queried, the pruning timing path corresponding to the nodes at both ends of the pruning timing path and the two nodes to be queried is determined.
[0186] In this embodiment of the invention, the determined pruning timing path can be multiple pruning timing paths, and the nodes traversed by the multiple pruning timing paths are different.
[0187] In this embodiment of the invention, for example, a time sequence graph is used to represent a scenario of traveling by train from one city to another. Both query nodes represent cities, specifically Xi'an and Guangzhou, with Xi'an being the departure point and Guangzhou the destination. Based on the two query nodes, at least two pruned time sequence paths can be determined. These at least two pruned time sequence paths can be <Xi'an, Zhengzhou, Guangzhou>, <Xi'an, Changsha, Guangzhou>, or <Xi'an, Wuhan, Guangzhou>.
[0188] It is understood that, based on the two nodes to be queried, the embodiments of the present invention determine the pruning time sequence path in the biconnected component, which makes it easier to obtain the cost of the pruning time sequence path corresponding to the two nodes to be queried.
[0189] S203. Determine the corresponding sub-timeline path based on the pruning timeline path.
[0190] In this embodiment of the invention, it is applicable to scenarios in which sub-timeline paths are determined by pruning the timeline path.
[0191] In this embodiment of the invention, based on the pruning timing path determined in S202, the corresponding sub-timing path is determined in the biconnected component.
[0192] In this embodiment of the invention, the pruning timing path is composed of sub-timing paths. Since there can be multiple pruning timing paths, the determined sub-timing paths are multiple sub-timing paths, and these multiple sub-timing paths are divided into multiple groups of sub-timing paths according to their respective corresponding pruning timing paths. Within each group of sub-timing paths, all sub-timing paths are connected by the nodes at both ends to form the corresponding pruning timing path.
[0193] It is understandable that splitting the pruned temporal path into sub-temporal paths corresponds to biconnected components. When obtaining the cost of the pruned temporal path, the sub-costs corresponding to the sub-temporal paths can be processed simultaneously through cut points, and the resulting sub-costs can be added together to obtain the cost of the pruned temporal path; this improves the efficiency of obtaining the cost.
[0194] S204. Accumulate the sub-costs corresponding to the sub-time paths to obtain the costs corresponding to the pruned time paths.
[0195] In this embodiment of the invention, the scenario applicable to the cost corresponding to the pruning time sequence path is described.
[0196] In this embodiment of the invention, based on the sub-time path obtained in S203, the sub-costs corresponding to the sub-time path are accumulated to obtain the cost corresponding to the pruning time path.
[0197] In this embodiment of the invention, the cost corresponding to the pruning timing path obtained through S204 is multiple costs, and each cost corresponds to a pruning timing path.
[0198] In this embodiment of the invention, the cost corresponding to the pruned temporal path can also be obtained in the following way: After obtaining the pruned temporal path through S202, based on the source node of the pruned temporal path, the sub-temporal path and biconnected component where the source node is located are found. The sub-costs corresponding to the sub-temporal paths from the source node to other cut points or nodes in the biconnected component are obtained by processing in the biconnected component. The sub-costs corresponding to the sub-temporal paths between cut points are obtained by processing in the other biconnected components. The above sub-costs are stored at each cut point. The sub-costs corresponding to each cut point are accumulated according to the pruned temporal path to obtain the cost corresponding to the pruned temporal path.
[0199] In this embodiment of the invention, the sub-cost is accumulated at the master node, and the master node can be any one of the two nodes at both ends of the pruning time sequence path.
[0200] It is understandable that each cut point can independently calculate the sub-cost corresponding to the sub-temporal path in each biconnected component. In this way, when it is necessary to obtain the cost corresponding to each pruned temporal path, the sub-costs in the cut point can be accumulated, which improves the efficiency of obtaining the cost.
[0201] S205. Based on the costs corresponding to the pruning time sequence paths, obtain the minimum combined cost path. The minimum combined cost path represents the pruning time sequence path with the lowest cost.
[0202] In this embodiment of the invention, the scenario of obtaining the path with the minimum combined cost is applicable.
[0203] In this embodiment of the invention, the costs corresponding to the pruning time sequence paths are compared, and the minimum cost is determined based on the comparison results. The pruning time sequence path corresponding to the minimum cost is the minimum combined cost path.
[0204] In this embodiment of the invention, the costs corresponding to every two pruning time-series paths are compared to obtain a first comparison result. Based on the first comparison result, at least one first cost is obtained, wherein the first cost is the minimum cost among the costs corresponding to every two pruning time-series paths. If at least one first cost is a single first cost, then the single first cost is the minimum cost, and the pruning time-series path corresponding to the single first cost is the minimum combined cost path. If at least one first cost is multiple first costs, then every two first costs among the multiple first costs are compared until the minimum cost is obtained.
[0205] It is understood that the embodiments of the present invention combine pruning processing and parallel algorithms to achieve the query of the minimum combined cost path. When obtaining the cost and querying the time sequence path, both time information and loss information are considered simultaneously, and the proportion of time information and loss information in the cost processing is adjusted by weighting. Compared with the prior art, which only considers time information or loss information, the embodiments of the present invention expand the scope of application.
[0206] In some embodiments of the present invention Figure 7 This is a flowchart illustrating a timing path processing method provided in an embodiment of the present invention. Figure 5 ,like Figure 7 As shown, the timing path processing method of this invention includes:
[0207] S601. Obtain a preset timing diagram and store the nodes, timing edges, and timing information corresponding to the timing edges in the preset timing diagram. The timing information includes departure time information, arrival time information, and loss information.
[0208] In some embodiments of the present invention, the preset timing diagram is as follows: Figure 2d As shown.
[0209] In some embodiments of the present invention, the timing information further includes two nodes, namely the starting node of the timing edge and the target node of the timing edge; for example, during the transmission of information, the departure time information will start from the starting node and the arrival time information will arrive at the target node, and the loss information represents other information during the transmission of information, such as resource loss information or the amount of money required.
[0210] S602. Sort the time-series edges associated with each node in descending order of their departure time information.
[0211] In some embodiments of the present invention, each node can be associated with multiple time-series edges. Sorting these time-series edges facilitates subsequent processing. Alternatively, the edges can be sorted according to their arrival time information, allowing the sorting requirements to be adjusted based on actual needs.
[0212] Understandably, this makes the order of the temporal edges clear and easier to traverse and prune later.
[0213] S603. Traverse the sorted temporal edges in S602 in sequence. When a temporal edge of a node does not meet the time information requirements, stop traversing and assume that subsequent temporal edges will not meet the time information requirements. Prune the aforementioned temporal edge and subsequent temporal edges. Continue until all temporal edges have been traversed to obtain the pruned temporal graph.
[0214] In some embodiments of the present invention, since the temporal edges have been sorted in S602, when a temporal edge that has been traversed to a node does not meet the time information requirements, the subsequent temporal edges of the aforementioned temporal edge will definitely not meet the time information requirements. At this time, there is no need to traverse the subsequent temporal edges, and they can be pruned directly.
[0215] In some embodiments of the present invention, the time information requirements can be formulated according to actual needs. The departure time information can be greater than or equal to the preset time information, or the arrival time information can be less than or equal to the preset time information.
[0216] Understandably, this reduces the workload of traversal and improves the efficiency of pruning.
[0217] S604. Compare all timing paths in the pruned timing graph of S603. If a timing path is found to have a higher cost than other timing paths passing through the same node and also has a higher arrival time than other timing paths passing through the same node, then prune that timing path. Continue until all timing paths have been pruned to obtain the final timing graph.
[0218] In some embodiments of the present invention, S604 is used to filter out the time-series path with the minimum cost associated with each node in the time-series graph. The cost corresponding to the time-series path can be obtained using equation (1-1).
[0219] It is understandable that all timing paths in the final timing diagram are the timing paths with the lowest cost among the timing paths associated with the same node. This way, when querying timing paths based on nodes later, the timing path with the lowest cost can be found quickly, and the above timing path can be selected for communication or other actions, thus saving information loss.
[0220] S605. Convert the final timing diagram obtained through S604 into an undirected graph.
[0221] In some embodiments of the present invention, if there are multiple edges between two nodes in the timing graph, they are converted into one edge, and directed edges are converted into undirected edges.
[0222] S606. Divide the undirected graph into multiple biconnected components using the Tarjan algorithm, and connect the multiple biconnected components through cut vertices.
[0223] In some embodiments of the present invention, in S606, the undirected graph is divided into multiple biconnected components, that is, the time sequence graph is divided into multiple sub-time sequence graphs.
[0224] Understandably, biconnected components have no direction, making it easier to determine whether a path exists between nodes.
[0225] S607. Given a source node, find the biconnected component where the source node is located, and process it to obtain the sub-costs corresponding to the sub-temporal paths from the source node to other cut points in the above biconnected component. Process it to obtain the sub-costs corresponding to the sub-temporal paths between cut points in other biconnected components, and store the above sub-costs into the corresponding cut points.
[0226] In some embodiments of the present invention, each cut point obtains the sub-cost corresponding to the sub-temporal path of other cut points in the biconnected component and the sub-temporal path corresponding to the cut points in the other biconnected component through equation (1-1), and stores the obtained sub-cost in the corresponding cut point to achieve the acquisition of sub-cost through parallel computation.
[0227] Understandably, this allows for the acquisition of multiple sub-costs simultaneously, thus improving acquisition efficiency.
[0228] S608. Based on the sub-temporal paths corresponding to the temporal path, accumulate the corresponding sub-costs in the cut points to obtain the cost of the temporal path.
[0229] In some embodiments of the present invention, since a temporal path is composed of sub-temporal paths, when querying the cost of a temporal path, the sub-costs corresponding to the aforementioned temporal path in each biconnected component are added together.
[0230] Understandably, this approach to time-series path processing is not only simple and fast, but also allows for the calculation of time-series paths based on both departure time and loss information, thus expanding the application scope of time-series graphs and achieving the goal of obtaining time-series path costs.
[0231] This invention provides a timing path processing apparatus, applicable to a timing path processing method. Figure 8 This is a schematic diagram of a timing path processing device provided in an embodiment of the present invention. Figure 1 ,like Figure 8 As shown, the timing path processing device 8 includes an acquisition unit 81, a construction unit 82, and a processing unit 83; wherein:
[0232] The acquisition unit 81 is used to acquire timing information.
[0233] The construction unit 82 is used to construct timing edges and timing paths based on the timing information.
[0234] The processing unit 83 is used to process and obtain the cost corresponding to the time sequence path based on the time information and loss information corresponding to the two nodes at both ends of the time sequence path, as well as the preset cost formula.
[0235] In some embodiments of the present invention, the processing unit 83 is further configured to process and obtain the cost corresponding to the time sequence path based on the departure time information and loss information corresponding to the two nodes at both ends of the time sequence path, as well as the preset cost formula.
[0236] In some embodiments of the present invention, the apparatus further includes a obtaining unit 84; wherein,
[0237] The obtaining unit 84 is used to perform pruning processing on the temporal edge based on the time information to obtain pruned temporal edge; and to perform pruning processing on the temporal path to be pruned according to the cost to obtain pruned temporal path.
[0238] The construction unit 82 is also used to construct the timing path to be pruned based on the pruning timing edge.
[0239] In some embodiments of the present invention, the obtaining unit 84 is further configured to sort the temporal edges according to the departure time to obtain sorted temporal edges; and to prune the sorted temporal edges according to the departure time to obtain pruned temporal edges.
[0240] In some embodiments of the present invention, the obtaining unit 84 is further configured to traverse the sorted time-series edges connected to the same node, and when a first time-series edge among the sorted time-series edges does not meet a preset time requirement, prune the first time-series edge and all sorted time-series edges after the first time-series edge; until all sorted time-series edges have been traversed, the pruned time-series edges are obtained; wherein, the first time-series edge is any one of the sorted time-series edges.
[0241] In some embodiments of the present invention, the obtaining unit 84 is further configured to traverse the time-series paths to be pruned that pass through the same node, and when a first time-series path in the time-series paths to be pruned does not meet a preset cost requirement, the first time-series path is pruned; until all time-series paths have been traversed, the pruned time-series path is obtained; wherein, the first time-series path is any one of the time-series paths to be pruned.
[0242] In some embodiments of the present invention, the construction unit 82 is further configured to construct a timing diagram based on the pruning timing path.
[0243] The obtaining unit 84 is also used to divide the timing graph to obtain biconnected components and cut points.
[0244] The processing unit 83 is further configured to process the sub-cost corresponding to the sub-temporal path in the biconnected component based on the departure time information and loss information corresponding to the two nodes at both ends of the sub-temporal path, as well as the preset cost formula, and save it in the cut point.
[0245] In some embodiments of the present invention, the obtaining unit 84 is further configured to convert the time sequence graph into an undirected graph according to a preset transformation method; and to obtain the biconnected component and the cut vertex according to the undirected graph and a preset algorithm.
[0246] In some embodiments of the present invention, the apparatus further includes a determining unit 85; wherein,
[0247] The determining unit 85 is used to determine the corresponding pruning time sequence path based on the two nodes to be queried; and to determine the corresponding sub-time sequence path based on the pruning time sequence path.
[0248] The acquisition unit 81 is also used to acquire two nodes to be queried.
[0249] The obtaining unit 84 is further used to accumulate the sub-costs corresponding to the sub-temporal paths to obtain the costs corresponding to the pruned temporal paths; and to obtain the minimum combined cost path based on the costs corresponding to the pruned temporal paths.
[0250] Figure 9 This is a second schematic diagram of the structure of a timing path processing device provided in an embodiment of the present invention, as shown below. Figure 9 As shown, the timing path processing device 9 includes a processor 91, a memory 92, and a communication bus 94. The memory 92 communicates with the processor 91 through the communication bus 94. The memory 92 stores one or more programs executable by the processor 91. When the one or more programs are executed, the processor 91 executes the timing path processing method as described in the embodiments of the present invention. Specifically, the timing path processing device 9 also includes a communication component 93 for data transmission, wherein the processor 91 has at least one such component.
[0251] In this embodiment of the invention, the various components in the timing path processing device 9 are coupled together via a bus 94. It is understood that the bus 94 is used to achieve communication between these components. In addition to a data bus, the bus 94 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in... Figure 9 The general labeled all buses as "via bus 94".
[0252] This invention provides a storage medium storing executable instructions, which, when executed by a processor, implement the timing path processing method described in this invention.
[0253] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.
[0254] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can 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, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0255] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0256] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0257] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention.
Claims
1. A time-series path processing method, characterized in that, include: Obtain timing information; The timing information includes time information and loss information corresponding to the communication endpoint, where the communication endpoint is a terminal device. The time information includes: arrival time information and departure time information, which represent the time when the communication endpoints send and receive messages; the loss information represents the bandwidth or power consumed by the communication between the communication endpoints. Based on the time information and loss information corresponding to the communication endpoints, a timing edge and a timing path are constructed; wherein, the timing path represents the path between at least two communication endpoints; and the timing edge connects each two adjacent communication endpoints among the at least two communication endpoints. Based on the time information and loss information corresponding to the two communication endpoints at both ends of the time path, and the preset cost formula, the cost corresponding to the time path is obtained. The method further includes: Based on the time information, the temporal edges are pruned to obtain pruned temporal edges; Based on the pruning timing edges, construct the timing path to be pruned; Based on the cost, the time sequence path to be pruned is pruned to obtain the pruned time sequence path; Construct a timing graph based on the pruning timing path; The timing graph is divided to obtain biconnected components and cut points; wherein, the path between any two communication endpoints in the pruned timing path is a sub-timing path, the biconnected component is composed of the sub-timing path and the any two communication endpoints; the cut point is the communication endpoint connected to the biconnected component; Based on the departure time information and loss information corresponding to the two communication endpoints at both ends of the sub-temporal path, and the preset cost formula, the sub-cost corresponding to the sub-temporal path in the biconnected component is obtained and stored in the cut point; Based on the sub-temporal paths corresponding to the temporal path, the corresponding sub-costs in the cut points are accumulated to obtain the cost corresponding to the temporal path.
2. The method according to claim 1, characterized in that, The cost corresponding to the time sequence path is obtained by processing the time information and loss information corresponding to the two communication endpoints at both ends of the time sequence path, as well as the preset cost formula, including: The cost corresponding to the time sequence path is obtained by processing the departure time information and loss information corresponding to the two communication endpoints at both ends of the time sequence path, as well as the preset cost formula.
3. The method according to claim 1, characterized in that, The step of pruning the temporal edges based on the time information to obtain pruned temporal edges includes: Based on the departure time information, the temporal edges are sorted to obtain the sorted temporal edges; Based on the departure time information, the sorted temporal edges are pruned to obtain the pruned temporal edges.
4. The method according to claim 3, characterized in that, The step of pruning the sorted temporal edges based on the departure time information to obtain the pruned temporal edges includes: The sorted time-series edges connected to the same communication endpoint are traversed. When a first time-series edge in the sorted time-series edges does not meet the preset time requirement, the first time-series edge and all sorted time-series edges after the first time-series edge are pruned. The pruned temporal edges are obtained after all sorted temporal edges have been traversed; wherein, the first temporal edge is any one of the sorted temporal edges.
5. The method according to claim 1, characterized in that, The step of pruning the temporal path to be pruned according to the cost to obtain the pruned temporal path includes: The timing paths to be pruned that pass through the same communication endpoint are traversed. When there is a first timing path in the timing paths to be pruned that does not meet the preset cost requirement, the first timing path is pruned. The pruning timing path is obtained after all the timing paths have been traversed; wherein, the first timing path is any one of the timing paths to be pruned.
6. The method according to claim 1, characterized in that, The step of partitioning the time sequence graph to obtain biconnected components and cut vertices includes: According to a preset transformation method, the time sequence graph is transformed into an undirected graph; Based on the undirected graph and the preset algorithm, the biconnected components and the cut vertices are obtained.
7. The method according to claim 1, characterized in that, The method further includes processing the departure time information and loss information corresponding to the two communication endpoints at both ends of the sub-temporal path, and the preset cost formula to obtain the sub-cost corresponding to the sub-temporal path in the biconnected component, and storing it in the cut point. Retrieve two communication endpoints to be queried; Based on the two communication endpoints to be queried, determine the corresponding pruning timing path; Based on the pruning timing path, determine the corresponding sub-timing path; The sub-costs corresponding to the sub-temporal paths are summed to obtain the cost corresponding to the pruned temporal paths; Based on the cost corresponding to the pruning time sequence path, the minimum combined cost path is obtained; wherein, the minimum combined cost path represents the pruning time sequence path with the minimum cost.
8. A timing path processing device, characterized in that, It includes an acquisition unit, a construction unit, a processing unit, and a result unit; wherein: The acquisition unit is used to acquire timing information; the timing information includes time information and loss information corresponding to the communication endpoints, and the communication endpoints are terminal devices; the time information includes arrival time information and departure time information, and the arrival time information and departure time information represent the time when the communication endpoints send and receive messages; the loss information represents the bandwidth occupied or the power consumed by the communication between the communication endpoints. The construction unit is used to construct timing edges and timing paths based on the time information and loss information corresponding to the communication endpoints; The processing unit is used to process and obtain the cost corresponding to the time sequence path based on the time information and loss information corresponding to the two communication endpoints at both ends of the time sequence path, as well as the preset cost formula. The obtaining unit is used to perform pruning processing on the temporal edge based on the time information to obtain pruned temporal edges; The construction unit is also used to construct the timing path to be pruned based on the pruning timing edge; The obtaining unit is further configured to perform pruning processing on the time sequence path to be pruned according to the cost, so as to obtain the pruned time sequence path; The construction unit is also used to construct a timing graph based on the pruning timing path; The obtaining unit is further configured to divide the timing graph to obtain biconnected components and cut points; wherein, the path between any two communication endpoints in the pruned timing path is a sub-timing path, the biconnected component is composed of the sub-timing path and the any two communication endpoints; the cut point is the communication endpoint connected to the biconnected component; The processing unit is further configured to process the sub-cost corresponding to the sub-temporal path in the biconnected component based on the departure time information and loss information corresponding to the two communication endpoints at both ends of the sub-temporal path, as well as the preset cost formula, and save it in the cut point; The obtaining unit is further configured to accumulate the corresponding sub-cost in the cut point according to the sub-temporal path corresponding to the temporal path, and obtain the cost corresponding to the temporal path.
9. A timing path processing device, characterized in that, include: Memory, used to store executable data instructions; A processor, when executing executable instructions stored in the memory, implements the method according to any one of claims 1 to 7.
10. A storage medium, characterized in that, The device stores executable instructions for causing a processor to execute the method according to any one of claims 1 to 7.
