This application is based upon and claims the benefit of priority of the prior Japanese Patent Application No. 2015-216883, filed on Nov. 4, 2015, the entire contents of which are incorporated herein by reference.
The embodiment discussed herein is related to apparatus and method for online generation of an optimum route-graph.
In analysis of trajectory data of a moving body collected by a sensor such as a global positioning system (GPS), there has been disclosed a technique for generating a route graph from trajectory data.
For example, there has been proposed a method of dividing trajectory data acquired by the GPS into sections in each of which the trajectory data indicate similar movement directions of a moving body, and representing the sections as vectors. In this method, the vectors are clustered based on densities by using similarities and the vectors representing the respective clusters are connected, whereby a graph structure is extracted.
To minimize cost taking dissimilarity between a graph and a trajectory and complexity of the graph into account, there has been proposed a method of associating pieces of trajectory data with the graph based on a Frechet distance or the like and adding unassociated portions to the graph. To generate a route graph, this method starts from an empty graph, and involves performing the above processing once on each piece of the trajectory data.
Japanese Laid-open Patent Publication No. 2015-76069 is an example of the related art.
An example of the related art is described in Jae-Gil Lee, Jiawei Han, Kyu-Young Whang, “Trajectory Clustering: A Partition-and-Group Framework”, SIGMOD '7, Jun. 2007.
According to an aspect of the invention, an apparatus stores plural pieces of trajectory information each indicating a trajectory and including plural pieces of position information indicating a position, and graph information on one or more planar graphs each including a plurality of nodes and a plurality of edges, where the graph information includes information on positions of the plurality of nodes and information on the plurality of edges connecting a pair of nodes among the plurality of nodes. The apparatus acquires a first piece of trajectory information from among the plural pieces of trajectory information, acquires a first planar graph from among the one or more planar graphs, and generates a second planar graph, based on the acquired first planar graph and the plural pieces of position information included in the acquired first piece of trajectory information. The apparatus extracts, from among the plural pieces of trajectory information, second pieces of trajectory information indicating trajectories passing a difference portion between the first planar graph and the second planar graph. For each of a group of candidate graphs that are each obtained by excluding a reduction set of edges included in the second planar graph from the second planar graph, the apparatus calculates optimality of the each candidate graph with which an addition set of trajectories indicated by the first piece of trajectory information and the second pieces of trajectory information are associated, and outputs one of the group of candidate graphs that is determined based on the calculated optimality.
The object and advantages of the invention will be realized and attained by means of the elements and combinations particularly pointed out in the claims.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory and are not restrictive of the invention, as claimed.
A method of extracting the graph structure through the clustering of the vectors obtained by dividing the trajectory data is batch processing. Therefore, the method may be unable to be applied to on-line processing for instantaneously reflecting flows of people, automobiles, and the like.
In the method of adding the pieces of the trajectory data to the route graph one by one, a piece of trajectory data to be added next is selected to optimize cost (optimality). Therefore, to sufficiently optimize cost, the method requests to take into account the order of pieces of trajectory data to be added. Therefore, the method may be unable to be applied to on-line processing that may be unable to take into account the order of the addition.
It is preferable to generate, through online processing, a route graph in which optimality is optimized.
An example of an embodiment is explained in detail below with reference to the drawings.
As illustrated in
The trajectory data 21 is a series of observation data indicating positions of a moving body observed by a sensor such as a GPS (Global Positioning System) at predetermined time intervals and is data representing a trajectory of movement of the moving body.
The observation data includes a sensor ID for identifying the sensor, position data (an x coordinate and a y coordinate) indicated by latitude and longitude of each of the observed positions, and observation time. The trajectory data 21 is obtained by extracting a plurality of observation data for each of sensor IDs and arranging, based on observation times, in time series, observation points included in the observation data. Note that, even if the sensor ID is the same, when the observation times at the observation points are different a predetermined time or more, the trajectory data is divided at the observation points. In this case, for example, by adding serial numbers to the sensor IDs, trajectory IDs capable of uniquely identifying the trajectory data are added to each of the trajectory data. In the following explanation, the trajectory data 21, the trajectory ID of which is αi, is referred to as “trajectory data ai” as well and a trajectory represented by the trajectory data αi is referred to as “trajectory αi” as well.
For example, it is assumed that observation points included in the trajectory data αi are Pi1, Pi2, . . . , Pij, . . . , and Pij (J is the number of observation points included in the trajectory data αi). In this case, the trajectory data a, may be represented as αi={Pi1, Pi2, . . . , Pij, . . . , and Pij}. Observation data indicating observation points includes a trajectory ID of the trajectory data 21 including the observation points, observation point IDs, which is identification information of the observation points, position data (x coordinates and y coordinates), and observation times. For example, observation data of the observation point Pij included in the trajectory data a, may be represented as Pij={αi, Pij, (xij, yij), sij}, where (xij, yij) is position data of the observation point Pij and sij is observation time of the observation point Pij. In
The route graph G is represented by a plurality of nodes, each representing position information, and edges that connect the nodes. The route graph DB 22 includes, for example, as illustrated in
An object of this embodiment is to generate, through online processing, a route graph G in which cost is optimized. Therefore, first, cost costT(G) of Expression (1) below is defined as cost of the route graph G generated by adding a trajectory data set T. The route graph G is generated to minimize the cost costT(G) of Expression (1).
costT(G)=Σα∈Tδα(G)+λ|G| (1)
In the expression, λ represents a constant (λ>0), |G| represents complexity of the route graph G, and δα(G) represents dissimilarity between the route graph G and the trajectory α. The complexity of the route graph G may be set as, for example, the number of nodes, the number of edges, or a sum of edge lengths included in the route graph G. The dissimilarity δα(G) may be set as, for example, a Frechet distance.
As explained above, in the method of adding trajectory data to a route graph one by one, when the order of the trajectory data to be added is not taken into account, cost may be unable to be sufficiently optimized. Therefore, it is also conceivable to, every time trajectory data is added, generate a route graph to optimize cost through batch processing using all trajectory data including trajectory data used in generating a route graph already generated. However, for example, when a data size is large, a large number of graphs are present as candidates of an optimum solution. Therefore, computational complexity for generation of a route group increases.
To suppress such an increase in the computational complexity, a steepest descent method, which is a method for calculating a local optimum solution, is applied to optimization of cost of the route graph G. In the steepest descent method, Expression (2) below is repeated until a solution x(i) converges. In the explanation, η represents a constant.))
x
(i+1)
=x
(i)
−η∇f(x(i)) (2)
When Expression (2) is applied to the optimization of the cost of the route graph G, x=G=(V, E). V is a set of nodes v included in the route graph G. E is a set of edges e included in the route graph G. When Expression (2) is applied to the optimization of the cost of route graph G, f(x)=costT(G). However, since the route graph G is a high-dimensional discrete value vector, ∇costT(G), which is differential, may be unable to be defined.
Therefore, in this embodiment, instead of the differential, ΔG is selected based on a difference ΔcostT,G(ΔG) defined by Expression (3) below and ΔG is updated like G←G−ΔG to obtain a local optimum solution.
ΔcostT,G(ΔG)={(Σα∈Tδα(G−ΔG)+λ|G−ΔG|)−(Σα∈Tδα(G)+λ|G|)}=Σα∈T[δα(G−ΔG)−δα(G)]−λ[|G||G−ΔG|] (3)
A method of applying the steepest descent method to the optimization of the cost of the route graph G is specifically explained. First, a route graph G(0) serving as an initial solution is set. For example, a route graph G(0)=(V(0), E(0)) for minimizing dissimilarity Σα∈Tδα(G) between the route graph G and a trajectory may be set as the initial solution.
Trajectory data α∈Te passing an edge e included G(i)=(V(i), E(i)), which is a subgraph of the route graph G(0), is map-matched with a route graph G(i)\{e} that is set to prohibit passage of the edge e. In the following explanation, map-matching trajectory data passing the edge e with a route graph set to prohibit passage of the edge e is referred to as “reroute” as well. As a result of the reroute, a route graph obtained by leaving only edges that one or more trajectories pass is represented as G−ΔG.
For example, as illustrated in
In this way, ΔG is determined for every e∈E(i). Hereafter, ΔG will be also referred to as “a reduction set of edges”. A set of trajectory data representing trajectories passing the edge e is represented as Te. Among such candidates for ΔG, ΔG, whose cost satisfies predetermined conditions, is selected. As the predetermined conditions, for example, conditions described below may be determined.
“ΔcostT,G(ΔG)<0” of the conditions indicates that dissimilarity between trajectory data and a graph (G−ΔG) is small compared with |ΔG|.
Note that map matching is required for calculation of ΔG and δα(G−ΔG) with respect to the edge e∈E(i) set to passage prohibition. Computational complexity of the map matching is generally large. In this embodiment, since δα(G−ΔG)=δα(G) with respect to α∈T−Te, Expression (4) below is obtained.
ΔcostT,G(ΔG)=Σα∈T[δα(G−ΔG)−δα(G)]−λ[|G|−|G−ΔG|]=Σα∈Te[δα(G−ΔG)−δα(G)]+Σα∈T−Te[δα(G−ΔG)−δα(G)]−λ[|G|−|G−ΔG|]=Σα∈Te[δα(G−ΔG)−δα(G)]−λ[|G|−|G−ΔG|] (4)
Therefore, it is possible to calculate ΔcostT,G(ΔG) only with the map matching of the trajectory data α∈Te passing the edge set to passage prohibition without map-matching all the trajectory data α∈T. A set Te of trajectory data is very small compared with the set T. Therefore, it is possible to substantially reduce the number of times of the map matching.
The optimization of cost of the route graph applied with the steepest descent method explained above is expanded to online processing.
When trajectory data is added to the generated route graph, the route graph G(0) serving as the initial solution is changed. Therefore, it might be considered desirable to apply the procedure explained above to all the trajectory data again. However, by applying the procedure only to a difference between the generated graph and a graph added with the trajectory data, it is possible to generate a route graph for optimizing cost through online processing.
For example, it is assumed that a route graph is generated from a Delaunay graph that includes observation points of trajectory data as Delaunay points. A Delaunay graph before addition of observation points is represented as D(i)=(U(i), F(i)) and a Delaunay graph after the addition of the observation points is represented as D(i+1)=(U(i+1), F(i+1)). Note that U represents a set of nodes (Delaunay points) included in the Delaunay graph and F represents a set of edges (Delaunay sides) included in the Delaunay graph. Since |F(i)∩F(i+1)|/|F(i)| is not small, by focusing on a difference between D(i) and D(i+1), it is possible to generate the route graph G through the online processing without increasing computational complexity as in the batch processing.
Specifically, when F(−)=F(i)−F(i+1), it suffices to reroute trajectories passing E(−)=E(i)∩F(−) and trajectories represented by trajectory data to be added among trajectories represented by trajectory data used for generation of the route graph G(i), to a Delaunay graph D(i+1). F(−) is a subset of edges, in a Voronoi diagram forming a dual graph of a Delaunay graph D(i), which each include as an end point a generation point of a Voronoi region including an observation point of trajectory data to be added. Therefore, the Delaunay graph D(i+1) may be calculated with computational complexity proportional to the number of generation points of the Voronoi regions including the observation points of the trajectory data to be added. The number of generation points does not exceed the number of observation points to be added. Therefore, it is possible to calculate D(i+1) with computational complexity proportional to the number of observation points to be added.
Consequently, it is possible to generate a route graph for optimizing cost with the computational complexity proportional to observation points to be added. Therefore, it is possible to generate a route graph in the online processing.
In this embodiment, as explained above, the route graph G is generated by the method of formulating the steepest descent method and expanding the steepest descent method to the online processing. Functional units of the route-graph generating apparatus 10 according to this embodiment are explained in detail below.
The route-graph generating apparatus 10 includes, as illustrated in
In the route graph DB 22, information on the route graph G explained above (e.g.,
The acquiring unit 11 acquires the trajectory data 21 one by one, for example, from the trajectory-data generating apparatus 30 that generates trajectory data from observation data of a GPS or the like acquired from a moving body. The acquiring unit 11 may acquire the trajectory data 21 not only from the trajectory-data generating apparatus 30 but also from other information processing apparatuses, an external storage device, an internal storage device, and the like. When an information processing apparatus, such as a car navigation system or a smartphone, mounted or held in the moving body has a function of generating trajectory data from observation data, the acquiring unit 11 may directly acquire the trajectory data from the information processing apparatus mounted or held in the moving body. The acquiring unit 11 passes the acquired trajectory data 21 to the planar graph generating unit 12.
The planar graph generating unit 12 reads, from the Delaunay graph DB 23, a Delaunay graph D(t−1) which was previously generated, adds observation points included in the trajectory data 21 passed from the acquiring unit 11 to the Delaunay graph D(t−1), and generates a Delaunay graph D(t). The planar graph generating unit 12 stores the generated Delaunay graph D(t) in the Delaunay graph DB 23 and passes the trajectory data 21 passed from the acquiring unit 11 to the extracting unit 13.
The extracting unit 13 generates a route graph G(t−1/2) by reflecting a difference between the Delaunay graph D(t−1) stored in the Delaunay graph DB 23 and the Delaunay graph D(t) on a route graph G(t−1). In this case, the extracting unit 13 specifies the edge set F(−) erased from the Delaunay graph D(t) in an edge set F(t−1) included in the Delaunay graph D(t−1). The extracting unit 13 extracts, from the trajectory data stored in the management DB 24, trajectory data passing any one of edges of the edge set F(1). The extracting unit 13 passes the extracted trajectory data, the trajectory data 21 passed from the acquiring unit 11, and the generated route graph G(t−1/2) to the calculating unit 14.
The calculating unit 14 reroutes each of trajectories represented by the respective trajectory data passed from the extracting unit 13, to a route graph G(t−1/2)\{e}in which edge e, which is passed by the each trajectory map-matched with the route graph G(t−1/2), is set to passage prohibition. The calculating unit 14 determines ΔG to be a portion where no trajectory passes as a result of the rerouting, and calculates, according to Expression (4), cost for a route graph (G(t−1/2)−ΔG) which is a candidate for the route graph G(t).
The route-graph generating unit 15 specifies ΔG in which the cost calculated by the calculating unit 14 satisfies predetermined conditions and excludes edges included in ΔG from the route graph G(t−1/2) to generate the route graph G(t).
The route-graph generating apparatus 10 may be realized by, for example, a computer 40 illustrated in
The storing unit 43 may be realized by a HDD (Hard Disk Drive), an SSD (solid state drive), a flash memory, or the like. In the storing unit 43 functioning as a storage medium, a route-graph generating program 50 for causing the computer 40 to function as the route-graph generating apparatus 10 is stored. The route-graph generating program 50 includes an acquiring process 51, a planar graph generating process 52, an extracting process 53, a calculating process 54, and a route-graph generating process 55. The storing unit 43 includes a data storage region 60 that stores information configuring the route graph DB 22, information configuring the Delaunay graph DB 23, information configuring the management DB 24, and the like.
The CPU 41 reads out the route-graph generating program 50 from the storing unit 43, develops the route-graph generating program 50 in the memory 42, and sequentially executes the processes included in the route-graph generating program 50. The CPU 41 reads out the information stored in the data storage region 60 and develops the route graph DB 22, the Delaunay graph DB 23, and the management DB 24 in the memory 42.
The CPU 41 executes the acquiring process 51 to operate as the acquiring unit 11 illustrated in
The CPU 41 executes the route-graph generating process 55 to operate as the route-graph generating unit 15 illustrated in
Note that the functions realized by the route-graph generating program 50 may also be realized by, for example, a semiconductor integrated circuit, more specifically, an ASIC (Application Specific Integrated Circuit).
Next, action of the route-graph generating apparatus 10 according to this embodiment is explained. When the trajectory data 21 is inputted to the route-graph generating apparatus 10, route-graph generation processing illustrated in
In step S10 of the route-graph generation processing illustrated in
Subsequently, in step S15, the acquiring unit 11 reads, from a predetermined storage region, trajectory data α(t) inputted to the route-graph generating apparatus 10. The acquiring unit 11 passes the read trajectory data 21 to the planar graph generating unit 12.
Subsequently, in step S20, the planar graph generating unit 12 generates the Delaunay graph D(t) by reading, from the Delaunay graph DB 23, the Delaunay graph D(t−1) that was previously generated, and adding observation points included in the trajectory data α(t) passed from the acquiring unit 11 to the Delaunay graph D(t−1). Specifically, the planar graph generating unit 12 erases edges that each includes as an end point a generation point of Voronoi regions to which observation points of the trajectory data α(t) are added, where a node set U(t−1) of the Delaunay graph D(t−1) is composed of generation points of the Voronoi regions. A set of the edges to be erased is represented as F(−). That is, F(−)=F(t−1)−F(t).
The planar graph generating unit 12 generates, based on observation points vi (i=1, 2, . . . , I; I is a total number of observation points included in the trajectory data α(t)) of the added trajectory data α(t), new node set U(+). Note that U(+)=U(t)−U(t−1). The planar graph generating unit 12 generates, based on the new node set U(+) and the erased edge set F(−), a new edge set F(+). Note that F(+)=F(t)−F(t−1). Consequently, the Delaunay graph D(t)=(U(t), F(t)) is generated.
Subsequently, in step S25, the planar graph generating unit 12 stores the generated Delaunay graph D(t) in the Delaunay graph DB 23 and passes the trajectory data 21 passed from the acquiring unit 11 to the extracting unit 13. The extracting unit 13 generates the route graph G(t−1/2) by reflecting a difference between the Delaunay graph D(t−1) stored in the Delaunay graph DB 23 and the Delaunay graph D(t) on the route graph G(t−1). Specifically, the extracting unit 13 generates the route graph G(t−1/2)=(Vt−1/2), E(t−1/2)) in which the edge set E(t−1/2) is obtained as a sum of sets of an edge set obtained by excluding the edge set F(−) from the edge set E(t−1) and the edge set F(+).
Subsequently, in step S30, the extracting unit 13 extracts trajectory data passing any one of the edges e of the edge set F(−) from the trajectory data stored in the management DB 24, that is, the trajectory data used for the generation of the route graph G(t−1). A set of the extracted trajectory data is represented as Te.
Subsequently, in step S35, the extracting unit 13 passes the trajectory data set T obtained by adding the trajectory data α(t) to the trajectory data set Te and the generated route graph G(t−1/2) to the calculating unit 14. In step S40, route-graph update processing is executed.
The route-graph update processing is explained with reference to
In step S41, the calculating unit 14 sets the route graph G(t−1/2) as the route graph G. For a trajectory α represented by each piece of the rack data α included in the trajectory data set T, the calculating unit 14 acquires a route π=<e(1), . . . , and e(N)> obtained by map-matching the trajectory α with the route graph G. e(1) represents a top edge and e(N) represents an end edge at the time when the trajectory α is map-matched. The calculating unit 14 calculates dissimilarity δα(G) between the trajectory α and the route graph G.
Subsequently, in step S42, the calculating unit 14 registers a result obtained by map-matching the trajectory a in a trajectory management table 24A and an edge-trajectory table 24B of the management DB 24. Examples of the trajectory management table 24A and the edge-trajectory table 24B are illustrated in
Subsequently, in step S43, the calculating unit 14 determines whether an entry for which the following processing is not performed yet is present in the edge-trajectory table 24B. When an unprocessed entry is present, the processing shifts to step 544.
In step S44, the calculating unit 14 extracts an entry (e, A) in which a size of a trajectory data set is the smallest among the unprocessed entries in the edge-trajectory table 24B. The size of the trajectory data set is the smallest when the number of pieces of trajectory data included in the trajectory data set A or a sum of lengths of the pieces of trajectory data included in the trajectory data set A is the smallest. Note that the processing in this step is intended to meet the predetermined cost condition “(3) ΔcostT,G(ΔG)<0 and |Te| is minimum (or maximum)” to be satisfied when ΔG is selected.
Subsequently, in step S45, the calculating unit 14 sets, as an initial value of ΔG, a partial graph including only edges that are passed by trajectories respectively represented by trajectory data included in the trajectory data set A for trajectories passing the edge e of the extracted entry.
Subsequently in step S46, the calculating unit 14 sets respective work variables Δerr and Δgraph at initial values. Δerr is a work variable for calculating a first term (Σα∈T[δα(G−ΔG)−δα(G)]) of Expression (4). Δgraph a work variable for calculating a second term (λ[|G|−|G−ΔG|]) of Expression (4). The calculating unit 14 sets Δerr=0 and Δgraph=|ΔG| where |ΔG| is a sum of lengths of edges included in ΔG.
Subsequently, in step S47, the calculating unit 14 determines whether trajectory data for which the following processing is not performed yet is present in the trajectory data set A of the entry extracted in step S44. When unprocessed trajectory data is present, the processing shifts to step S48.
In step S48, the calculating unit 14 selects one piece of unprocessed trajectory data from the trajectory data set A, and sets the unprocessed piece of trajectory data as trajectory data αA.
Subsequently, in step S49, the calculating unit 14 obtains a route παA=<e(1), . . . , and e(M)> by rerouting the trajectory αA represented by the trajectory data αA to the route graph G\{e} in which edge e is prohibited from being passed. The calculating unit 14 calculates dissimilarity δαA(G\{e}) between the trajectory αA and the route graph G\{e} in which edge e is prohibited from being passed.
Subsequently, in step S50, the calculating unit 14 adds a difference between the dissimilarity δαA(G\{e}) and the dissimilarity δαA(G) to Δerr. The calculating unit 14 acquires the dissimilarity δαA(G) from the trajectory management table 24A. The calculating unit 14 subtracts, from Δgraph, a sum of lengths of edges that are common in both the edges included in ΔG and the edges included in the route παA obtained by rerouting the trajectory αA. Further, the calculating unit 14 excludes the edges included in the route παA from ΔG.
Subsequently, in step S51, the calculating unit 14 determines whether Δerr is smaller than Δgraph. In the case of Δerr<Δgraph, the processing returns to step S47. In the case of Δerr≧Δgraph, the processing returns to step S43.
In the case of using map matching in which δα(G−ΔG)−δα(G) is constantly non-negative, when trajectories represented by trajectory data included in the trajectory data set A are sequentially rerouted, Δerr monotonously increases. Note that, in appropriate map matching such as a method of minimizing a Frechet distance, δα(G−ΔG)−δα(G) is constantly non-negative. |G|−|G−ΔG| is a sum of lengths of edges that the trajectories do not pass because of the rerouting. An upper limit value of |G|−|G−ΔG| is |ΔG|. When the trajectories are sequentially rerouted, since trajectories that pass ΔG set earlier could be present, Δgraph monotonously decreases. That is, when rerouting of the trajectory αA represented by k-th piece of trajectory data αA included in the trajectory data set A is completed, if Δerr<Δgraph does not hold, Δerr<Δgraph does not hold even if k+1-th and subsequent trajectories αA are rerouted.
Therefore, by determining, according to the determination in step S51, whether the rerouting of the trajectory αA represented by the remaining trajectory data αA included in the trajectory data set A is continued, it is possible to reduce the number of times of processing of the rerouting (the map mapping) with large computational complexity. When negative determination is made in step S51, the candidate graph (G−ΔG) corresponding to the edge e of an entry being processed is excluded from candidates.
When it is determined in step S47 that trajectory data for which the following processing is not performed yet is absent in the trajectory data set A, the processing shifts to step S52. In step S52, the route-graph generating unit 15 excludes ΔG from the route graph G, updates the route graph G, and updates the trajectory management table 24A and the edge-trajectory table 24B. The processing returns to step S43.
When it is determined in step S43 that the unprocessed entry is absent in the edge-trajectory table 24B, the processing shifts to step S53. In step S53, the route-graph generating unit 15 set the present route graph G as the route graph G(t). The processing returns to the route-graph generation processing (
Subsequently, in step S60 of the route-graph generation processing illustrated in
The route-graph generation processing is explained using a specific example.
First, in a loop 1 (t=1), the acquiring unit 11 reads trajectory data α(1) (S15). The planar graph generating unit 12 generates a Delaunay graph D(1) (S20). The extracting unit 13 generates a route graph G(0.5). An example of the route graph G(0.5) is illustrated in
Since D(0)=Φ (empty), the edge set F(−) erased from the previous Delaunay graph D(0) is absent. Therefore, the trajectory data set Te passing any one of the edges F(−) is Te=Φ (S30). Therefore, T={α(1)} is passed to the calculating unit 14 as the trajectory data set T; the route graph G(0.5) is set as the route graph G; and the route-graph update processing is executed (S40).
It is assumed that the trajectory data α(1) is map-matched with the route graph G, the route π=<e1, e9, e11, e13, e14, e15, e8> is obtained, and the dissimilarity δα(G)=4 is obtained (S41). In this case, the trajectory management table 24A and the edge-trajectory table 24B are updated as illustrated in
It is assumed that an entry (e15, {α(1)}) is extracted from the edge-trajectory table 24B (S44). In this case, an initial value of ΔG is set at ΔG={e1, e9, e11, e13, e14, e15, e8} (S45). The work variables are set so that Δerr=0 and Δgraph=|ΔG|=7 (S46). Note that, in the following explanation, edge lengths are each regarded as “1” and it is assumed that a sum of the edge lengths=the number of edges.
Subsequently, the calculating unit 14 sets α(1) to the trajectory data αA, based on the trajectory data set A={α(1)} (S48), and obtains a route παA by rerouting the trajectory α(1) to a route graph G\{e15} in which the edge G\{e15} is set to passage prohibition (S49). In this case, since the route graph G\{e15} is not a connected graph, trajectories represented by the trajectory data αA are unable to be rerouted to the route graph G\{e15}. As a result, in this case, Dissimilarity δαA(G\{e15}) becomes ∞, and {e(m)|m=1, . . . , M} becomes empty
Subsequently, the calculating unit 14 updates Δerr with Δerr+(δαA(G\{e15})−δαA(G))=0+(∞−4)=∞, and updates Δgraph with Δgraph− |ΔG∩{e(m)|m=1, . . . , M}|=7−0=7 (S50). Further, the calculating unit 14 updates ΔG{e1, e9, e11, e13, e14, e15, e8} with ΔG{e1, e9, e11, e13, e14, e15, e8} (not changed) by excluding {e(m)|m=1, . . . , M} (empty) from ΔG{e1, e9, e11, e13, e14, e15, e8}.
As explained above, since δαA(G\(e15)) is an extremely large value, Δerr>Δgraph. Negative determination is made in step S51, and the processing returns to step S43. As for the other entries included in the edge-trajectory table 24B, it is assumed that Δerr>Δgraph as in the case of the entry (e15, {α(1)}). In this case, no edge is excluded from the route graph G(0.5) set as the route graph G, and G(0.5) as-is becomes the route graph G(1) (S53). That is, the solid line edge group illustrated in
Subsequently, in a loop 2 (t=2), the acquiring unit 11 reads trajectory data α(2) (S15). The planar graph generating unit 12 generates a Delaunay graph D(2) (520). The extracting unit 13 generates a route graph G(1.5) (S20). An example of the route graph G(1.5) is illustrated in
Since F(−)=Φ, Te=Φ (S30). T={α(2)} is passed to the calculating unit 14 as the trajectory data set T, the route graph G(1.5) is set as the route graph G, and the route-graph update processing is executed (S40).
It is assumed that the trajectory data α(2) is map-matched with the route graph G, the route π=<e1, e2, e10, e11, e13, e14, e15, e8> is obtained, and the dissimilarity δα(G)=3 is obtained (S41). In this case, the trajectory management table 24A and the edge-trajectory table 24B are updated as illustrated in
It is assumed that an entry (e9, {α(1)}) is extracted from the edge-trajectory table 24B (S44). In this case, an initial value of ΔG is set at ΔG={e9} (S45). The work variables are set so that Δerr=0 and Δgraph=|ΔG|=1 (S46).
Subsequently, the calculating unit 14 sets α(1) from the trajectory data set A={α(1)}, to the trajectory data αA (S48), and obtains the route παA by rerouting the trajectory α(1) to a route graph G\{e9} in which the edge e9 is set to passage prohibition (S49). For example, it is assumed that παA=<e1, e2, e10, e11, e13, e14, e15, e8> is obtained, and dissimilarity δαA(G\{e9})=5.5 is obtained.
Subsequently, the calculating unit 14 updates Δerr with Δerr+(δαA(G\{e9})=δαA(G))=0+(5.5−4)=1.5, and updates Δgraph with Δgraph− |ΔG∩{e(m)|m=1, . . . , M}|=1−0=1 (S50). Further, the calculating unit 14 updates ΔG={e9} as ΔG={e9} by excluding {e(m)|m=1, M}={e1, e2, e10, e11, e13, e14, e15, e8} from ΔG={e9}.
Since Δerr=1.5>Δgraph=1, negative determination is made in step S51, and the processing returns to step S43. As for the other entries included in the edge-trajectory table 24B, it is assumed that Δerr>Δgraph. In this case, no edge is excluded from the route graph G(1.5). G(1.5) as-is becomes the route graph G(2) (S53). That is, the solid line edge group illustrated in
Subsequently, in a loop 3 (t=3), the acquiring unit 11 reads trajectory data α(3) (S15). The planar graph generating unit 12 generates a Delaunay graph D(3) (S20). The extracting unit 13 generates a route graph G(2.5) (S20). An example of the route graph G(2.5) is illustrated in
Since F(−)=Φ, Te=Φ (S30). T={α(3)} is passed to the calculating unit 14 as the trajectory data set T, the route graph G(2.5) is set as the route graph G, and the route-graph update processing is executed (S40).
It is assumed that the trajectory data α(3) is map-matched with the route graph G, the route π=<e1, e2, e3, e12, e13, e14, e15, e8> is obtained, and the dissimilarity δα(G)=3 is obtained (S41). In this case, the trajectory management table 24A and the edge-trajectory table 24B are updated as illustrated in
It is assumed that an entry (e9, {α(1)}) is extracted from the edge- trajectory table 24B (S44). In this case, an initial value of ΔG is set at ΔG={e9} (S45). The work variables are set so that Δerr=0 and Δgraph=|ΔG|=1 (S46).
Subsequently, the calculating unit 14 sets α(1) from the trajectory data set A={α(1)}, to the trajectory data αA (S48), and obtains a route παA by rerouting the trajectory α(1) to a route graph G\{e9} in which the edge e9 is set to passage prohibition (S49). For example, it is assumed that παA=<e1, e2, e3, e12, e13, e14, e15, e8> is obtained, and dissimilarity δαA(G\{e9})=5.8 is obtained.
Subsequently, the calculating unit 14 updates Δerr with Δerr+(δαA(G\{e9})=δαA(G))=0+(5.8−4)=1.8, and updates Δgraph with Δgraph− |ΔG∩{e(m)|m=1, . . . , M}|=1−0=1 (S50). Further, the calculating unit 14 updates ΔG={e9} as ΔG={e9} by excluding {e(m)|m=1, . . . , M}={e1, e2, e3, e12, e13, e14, e15, e8} from ΔG={e9}.
Since Δerr=1.8>Δgraph=1, negative determination is made in step S51, and the processing returns to step S43. As for the other entries included in the edge-trajectory table 24B, it is assumed that Δerr>Δgraph as in the case of the entry (e9, {α(1)}). In this case, no edge is excluded from the route graph G(2.5). G(2.5) as-is becomes the route graph G(3) (S53). That is, the solid line edge group illustrated in
Subsequently, in a loop 4 (t=4), the acquiring unit 11 reads trajectory data α(4) (S15). The planar graph generating unit 12 generates a Delaunay graph D(4) (S20). The extracting unit 13 generates a route graph G(3.5) (S20). An example of the route graph G(3.5) is illustrated in
T={α(4)} is passed to the calculating unit 14 as the trajectory data set T, the route graph G(3.5) is set as the route graph G, and the route-graph update processing is executed (S40).
It is assumed that the trajectory data α(4) is map-matched with the route graph G, the route π=<e1, e2, e3, e4, e5, e6, e7, e8> is obtained, and the dissimilarity δα(G)=5 is obtained (S41). In this case, the trajectory management table 24A and the edge-trajectory table 24B are updated as illustrated in
It is assumed that an entry (e15, {α(1), α(2), α(3)}) is extracted from the edge-trajectory table 24B (S44). In this case, an initial value of ΔG is set at ΔG={e9, e10, e11, e12, e13, e14, e15} (S45). The work variables are set so that Δerr=0 and Δgraph=|ΔG|=7 (S46).
Subsequently, the calculating unit 14 sets α(1) from the trajectory data set A={α(1), α(2), α(3)}, to the trajectory data αA (S48), and obtains the route παA by rerouting the trajectory α(1) to the route graph G\{e15} in which the edge e15 is set to passage prohibition (S49). For example, it is assumed that παA=<e1, e2, e3, e4, e5, e6, e7, e8> is obtained, and the dissimilarity δαA(G\{e15})=5 is obtained.
Subsequently, the calculating unit 14 updates Δerr with Δerr+(δαA(G\{e15})=δαA(G))=0+(5−4)=1, and updates Δgraph with Δgraph− |ΔG∩{e(m)|m=1, . . . M}|=7−0=7 (S50). Further, the calculating unit 14 updates ΔG={e9, e10, e11, e12, e13, e14, e15} as ΔG={e9, e10, e11, e12, e13, e14, e15} by excluding {e(m)|m=1, . . . M}={e1, e2, e3, e4, e5, e6, e7, e8} from ΔG={e9, e10, e11, e12, e13, e14, e15}.
Since Δerr=1<Δgraph=7, affirmative determination is made in step S51. The processing returns to step S47.
Subsequently, the calculating unit 14 sets α(2) from the trajectory data set A={α(1), α(2), α(3)}, to the trajectory data ΔA (S48), and obtains the route παA by rerouting the trajectory α(2) to the route graph G\{e15} in which the edge e15 is set to passage prohibition (S49). For example, it is assumed that παA=<e1, e2, e3, e4, e5, e6, e7, e8> is obtained, and the dissimilarity δαA(G\{e15})=5 is obtained.
Subsequently, the calculating unit 14 updates Δerr with Δerr+(δαA(G\{e15})−δαA(G))=1+(5−3)=3, and updates Δgraph with Δgraph− |ΔG∩{e(m)|m=1, . . . , M}|=7−0=7 (S50). Further, the calculating unit 14 updates ΔG={e9, e10, e11, e12, e13, e14, e15} as ΔG={e9, e10, e11, e12, e13, e14, e15} by excluding {e(m)|m=1, . . . , M}={e1, e2, e3, e4, e5, e6, e7, e8} from ΔG={e9, e10, e11, e12, e13, e14, e15}.
Since Δerr=3<Δgraph=7, affirmative determination is made in step S51. The processing returns to step S47.
Subsequently, the calculating unit 14 sets α(3) from the trajectory data set A={α(1), α(2), α(3)}, to the trajectory data αA (S48), and obtains the route παA by rerouting the trajectory α(3) to the route graph G\{e15} in which the edge e15 is set to passage prohibition (S49). For example, it is assumed that παA=<e1, e2, e3, e4, e5, e6, e7, e8> is obtained, and the dissimilarity δαA(G\{e15})=5 is obtained.
Subsequently, the calculating unit 14 updates Δerr with Δerr+(δαA(G\{e15})−δαA(G))=3+(5−3)=5, and updates Δgraph with Δgraph− |ΔG∩{e(m)|m−1, . . . , M}|=7−0=7 (S50). Further, the calculating unit 14 updates ΔG={e9, e10, e11, e12, e13, e14, e15} as ΔG={e9, e10, e11, e12, e13, e14, e15} by excluding {e(m)|m=1, . . . , M}={e1, e2, e3, e4, e5, e6, e7, e8} from ΔG={e9, e10, e11, e12, e13, e14, e15}.
Since Δerr=5<Δgraph=7, affirmative determination is made in step S51. The processing returns to step S47. Since unprocessed trajectory data is absent in the trajectory data set A, the processing shifts to step S52. The route-graph generating unit 15 updates the route graph G by excluding ΔG={e9, e10, e12, e13, e14, e15} from the route graph G. The route-graph generating unit 15 updates the trajectory management table 24 and the edge-trajectory table 24B. Specifically, first, concerning the trajectory data set A={α(1), α(2), α(3)}, the route-graph generating unit 15 updates the route it and the dissimilarity δα(G) of the trajectory management table 24A to παA and δαA(G), respectively. Subsequently, after excluding entries of ΔG={e9, e10, e11, e12, e13, e14, e15} from the edge-trajectory table 24B, concerning the trajectory data set A={α(1), α(2), α(3)}, the route-graph generating unit 15 updates an entry of the route παA=<e(1), e(2), . . . , e(m)>.
As explained above, with the route-graph generating apparatus according to this embodiment, only trajectory data passing a difference between a generated route graph and a planar graph obtained by adding trajectory data to the route graph is map-matched to generate a route graph in which cost is optimized. Consequently, compared with a case where a route graph is generated from all trajectory data by batch processing in order to optimize cost, it is possible to reduce the number of map matching with large computational complexity. Therefore, it is possible to generate, through online processing, a route graph G in which cost is optimized. Since the number of times of the map matching may be reduced, it is possible to deal with the case of processing a large amount of trajectory data.
In this embodiment, with respect to a route graph defined as a source of a space of a high-dimensional discrete value, a difference of cost is defined taking into account dissimilarity between the route graph and trajectory data and complexity of the route graph, and the steepest descent method, which is an algorithm of an online type, is applied. Consequently, it is possible to obtain a local optimum solution of a route graph in which cost is optimized. Therefore, it is possible to more efficiently realize the online processing.
In this embodiment, it is possible to generate a route graph with only trajectory data. That is, if only a condition that the trajectory data is series data of observation points is satisfied, without depending on inherent characteristics such as speed and an observation interval of observation data of a moving body mounted with a sensor such as a GPS, it is possible to generate, through the online processing, a route graph in which cost is optimized.
Since the route graph in which cost is optimized may be generated by the online processing, it is possible to carry out analysis of trajectory data on a real time basis. For example, it is possible to predict traffic jams, instantaneously detect occurrence of accidents and troubles, and analyze changes in flows of people and cars involved in the traffic jams, the accidents, and the troubles on a real time basis.
Note that, in the embodiment, the map matching of trajectory data is performed for each of the trajectory data. However, the embodiment is not limited to this. Since results of map matching of different trajectory data do not depend on each other, the map matching may be executed in parallel using threads or sub-processes that share a graph G-ΔG. Consequently, it is possible to further reduce a processing time for generation of a route graph.
In the embodiment, a Delaunay graph is updated using all of noses of a generated Delaunay graph and observation points of trajectory data to be added. However, the embodiment is not limited to this. The Delaunay graph may be updated using, for example, nodes and observation points extracted from all of the nodes and the observation points by sampling using a random number. Consequently, it is possible to reduce computational complexity of the map matching and the number of times of repetition of the steepest descent method.
In the embodiment, a graph serving as an initial solution is empty. However, a route graph already generated from a plurality of trajectory data, digital road network data, a triangular lattice graph, a square lattice graph, a Delaunay graph including any points as Delaunay points, and the like may be used. In particular, when the digital road network data, the triangular lattice graph, and the square lattice graph are used, it is possible to omit the planar graph generating unit. In this case, D(t) is typically D(t−1) and F(−) is typically Φ. In step S30, Te=Φ. In this case, as the edge set F(+), edges at the time when α(t) is map-matched with D(t) are set.
A graph generated by the planar graph generating unit is not limited to a Delaunay graph and only has to be a planar graph.
In the above explanation, the form is explained in which the route-graph generating program 50 is stored (installed) in the storing unit 43 in advance. However, the embodiment is not limited to this. The program related to the disclosed technique may also be provided in a form in which the program is recorded in a recording medium such as a CD-ROM, a DVD-ROM, or a USB memory.
All examples and conditional language recited herein are intended for pedagogical purposes to aid the reader in understanding the invention and the concepts contributed by the inventor to furthering the art, and are to be construed as being without limitation to such specifically recited examples and conditions, nor does the organization of such examples in the specification relate to a showing of the superiority and inferiority of the invention. Although the embodiment of the present invention has been described in detail, it should be understood that the various changes, substitutions, and alterations could be made hereto without departing from the spirit and scope of the invention.
Number | Date | Country | Kind |
---|---|---|---|
2015-216883 | Nov 2015 | JP | national |