A kind of path searching method therefor merging individual character preference heterogeneity
Technical field
The present invention relates to a kind of path searching method therefor merging individual character preference heterogeneity, belong to the crossing domain of navigation, electronic chart, intelligent transportation system and data mining.
Background technology
Along with the develop rapidly of science and technology, the necessary article in the middle of the life that navigating instrument has entered ordinary people completely and when becoming nowadays people's go off daily.But, the path planning made due to current navigating instrument is all partial to theory mostly, such as shortest time without at a high speed, length the shortest without at a high speed, shortest time has at a high speed and length is the shortest has at a high speed etc., the path that pure theory therefore can be caused to derive and user's actual need are separated, the path planning that even navigating instrument is made has no any actual directive significance to user, to such an extent as to loses the real purposes of navigating instrument guiding.(as Fig. 2, although the path planning that navigating instrument is made has one section of frequent traffic congestion of road apart from shorter, although the road distance that user often walks is longer more unobstructed).The undesirable practical guide effect not only having had a strong impact on navigating instrument of path planning that navigating instrument is made, and have a strong impact on other senior application and calculating that the path planning made based on navigating instrument does, such as: may cause at electric motor car power system calculation and orthodox car oil consumption result of calculation serious distortion, thus user can be caused cannot to supplement electricity or oil mass in time because result of calculation is incorrect, bring unnecessary trouble to user.For the immobilized vehicle of pass, such as: regular bus, school bus, public transport etc., although navigating instrument can be arranged via ground, due to more via ground, road is frequent, to such an extent as to all will reset navigating instrument before each driving, causes the experience of user poor.
Based on above problem, in order to meet users ' individualized requirement, there is provided more precisely, navigation Service more targetedly, be a kind of practical method to the collection of user's traffic route and the routing of making science, therefore the track search of merging individual character preference and road cost is of practical significance and is worth very much.
Related terms is explained:
1. Floating Car
With various sensor, the automobile of actual travel on road that can gather relevant information.
2.O point
The starting point that Floating Car is set out.
3.D point
The destination that Floating Car arrives.
4.TRIP
One section of track of Floating Car process on real road, can be similar to and be interpreted as that user drives one section of road of process continuously.
5. node (NODE)
For representing path connected network, virtual node object out.The crossing being interpreted as real road that can be similar to.
6.LINK
For representing the shaped form object of path between NODE and NODE, be made up of two NODE and some shape points.What can be similar to is interpreted as that real road connects one section of road at two crossings.
7. forerunner's node
Be connected to same LINK, and than the NODE that current NODE first explores, as Fig. 3.
8. forerunner LINK
Be connected to same NODE, and than the LINK that current LINK first explores, as Fig. 4.
9. the path of minimum road cost
Calculate with conventional shortest path heuristic algorithm, the path of the total least cost of road.
10. road cost
The consumption that floating vehicle travelling stretch journey produces, such as: the time, distance, oil consumption, power consumption etc.
11. equidirectional number of passing throughs
The number of times in the upper correct current direction of LINK.Explore from O point to D point direction, select number of times current on exit axis to be equidirectional number of passing through, as Fig. 5, equidirectional number of passing through is 2; Explore from D point to O point direction, select number of times current on approach axis to be equidirectional number of passing through, as Fig. 5, equidirectional number of passing through is 2.
12. equidirectional TRIP
The TRIP in the upper correct current direction of LINK.Explore from O point to D point direction, select the TRIP on exit axis to be equidirectional TRIP, as Fig. 5, equidirectional TRIP is TRIP_A and TRIP_C; Explore from D point to O point direction, select the TRIP on approach axis to be equidirectional TRIP, as Fig. 5, equidirectional TRIP is TRIP_A and TRIP_C.
Summary of the invention
Object of the present invention provides a kind of path searching method therefor merging individual character preference, use the method can by user history TRIP information, explore the path that designated user is accustomed to most, thus improve the intelligent of navigation, other senior application that the path planning estimating for electric power afterwards and make based on navigating instrument further does and calculating are laid a good foundation.
Technical scheme of the present invention is:
Merge a path searching method therefor for individual character preference heterogeneity, represent path connected network, virtual node object is out defined as node NODE, the approximate crossing being interpreted as real road; Represent that the Road object of path between NODE and NODE is defined as LINK, be similar to and be interpreted as that real road connects one section of road at two crossings; Represent that Floating Car one section of track definition of process on real road is TRIP, be similar to and be interpreted as that user drives one section of road of process continuously; Using the TRIP information of floating vehicle travelling, TRIP and scheme on the spot LINK matching result and practically diagram data carry out judging and processing as object, it is characterized in that comprising the following steps:
Step one, reference path calculate: the path of exploring the minimum road cost from O point to D point with conventional shortest path heuristic approach;
Step 2, O point and D point custom LINK coupling: mutually explore respectively from O point and D point, within limits, explore from O point and D point road least cost, and equidirectional number of passing through is not less than the LINK of current threshold value, and obtains the qualified NODE of this LINK;
Step 3, number of passing through calculate: calculate the number of passing through being explored and LINK probing direction satisfies condition;
Step 4, LINK weight computing: the relation merging the equidirectional number of passing through of LINK and road cost calculates the weights of LINK;
The track search of step 5, fusion individual character preference heterogeneity: using the cost of LINK weights as track search, explore final path with conventional shortest path heuristic approach;
Step 6, routing: use reference path to analyze the path of exploring, select the path of the individual character preference heterogeneity of more realistic road conditions.
Described step one specifically comprises the following steps:
1.1) explore the path of the minimum road cost from O point to D point with conventional shortest path heuristic approach, the path that minimum road spends is denoted as: SHORT_PATH;
1.2) value that the road calculating path SHORT_PATH always spends, is denoted as its value: SHORT_WEIGHT.
Described step 2 specifically comprises the following steps:
2.1) seek scope is calculated: the seek scope always spending SHORT_WEIGHT to calculate to search custom LINK according to the road of range threshold and path SHORT_PATH, is denoted as seek scope: FIND_RANGE;
2.2) O point custom LINK is searched: by the node satisfied condition explored from O point, be denoted as: O_NODE;
If the LINK exit axis at O point place exists the situation that number of passing through is not less than current threshold value, then in two nodes of LINK connection, exit axis number of passing through is selected to be not less than the node of current threshold value as the node O_NODE satisfied condition;
If number of passing through is all less than current threshold value on the LINK exit axis at O point place, then from O point, spend exploratory method with minimum road, within seek scope FIND_RANGE, explore from O point road least cost, and equidirectional number of passing through is not less than the LINK of current threshold value, the node that LINK number of passing through being not less than current threshold value is connected with forerunner LINK is as the node O_NODE satisfied condition;
2.3) D point custom LINK is searched: by the node satisfied condition explored from D point, be denoted as: D_NODE;
If the LINK approach axis at D point place exists the situation that number of passing through is not less than current threshold value, then in two nodes of LINK connection, approach axis number of passing through is selected to be not less than the node of current threshold value as the node D_NODE satisfied condition;
If number of passing through is all less than current threshold value on the LINK approach axis at D point place, then from D point, spend exploratory method with minimum road, within seek scope FIND_RANGE, explore from D point road least cost, and equidirectional number of passing through is not less than the LINK of current threshold value, the node that LINK number of passing through being not less than current threshold value is connected with forerunner LINK is as the node D_NODE satisfied condition.
Described step 3 specifically comprises the following steps:
3.1) record common TRIP: search all LINK be connected with node O_NODE, be recorded in set O_LINK_SET, the TRIP on all LINK in set O_LINK_SET is recorded in set O_TRIP_SET; Search all LINK be connected with node D_NODE, be recorded in set D_LINK_SET, the TRIP on all LINK in set D_LINK_SET is recorded in set D_TRIP_SET; Set O_TRIP_SET is compared mutually with set D_TRIP_SET, total TRIP is recorded in S set AME_TRIP_SET.
3.2) obtain the equidirectional number of passing through of current exploration to LINK, the equidirectional number of passing through of current exploration to LINK is denoted as: FREQUENCY, if S set AME_TRIP_SET is empty, do not do any operation; If S set AME_TRIP_SET is not empty, then by current exploration to LINK on equidirectional TRIP compared with the TRIP on forerunner LINK, find out common TRIP, by current exploration to the equidirectional number of passing through FREQUENCY of LINK be updated to the number of common TRIP, and reject noncomitant TRIP in current exploration to LINK.
Described step 4 specifically comprises the following steps:
4.1) obtain current exploration to the equidirectional number of passing through FREQUENCY of LINK and the current exploration cost of LINK of arriving, be denoted as: WEIGHT;
4.2) calculate the weights of current LINK, be denoted as by the weights of current LINK: LINK_PRIORITY, then fusion formula is:
LINK_PRIORITY=α * WEIGHT/ln (β * FREQUENCY+ γ * l) (α, beta, gamma is coefficient)
Described step 5 specifically comprises the following steps:
5.1) by the weights of node corresponding for current LINK, be denoted as: NEW_PRIORITY; By the weights of forerunner's node, be denoted as: OLD_PRIORITY; By node weights assignment corresponding for current LINK be: the weights of weights+forerunner's node of current LINK, namely
NEW_PRIORITY=OLD_PRIORITY+LINK_PRIORITY,
5.2) using the cost of the weights of node corresponding for current LINK as track search, use conventional shortest path heuristic approach, explore the path of merging individual character preference heterogeneity, be denoted as: HABIT_PATH
Described step 6 specifically comprises the following steps:
6.1) if S set AME_TRIP_SET is not empty, then using path HABIT_PATH as the path of merging individual character preference and road cost;
6.2) if S set AME_TRIP_SET is empty, then the road calculating the non-Usual route in the HABIT_PATH of path always spends; If the road calculated always spends the product being greater than and selecting threshold value and path SHORT_PATH road always to spend SHORT_WEIGHT, the path SHORT_PATH then spent with minimum road as final path, otherwise then with HABIT_PATH as the path of merging individual character preference heterogeneity.
Advantage of the present invention is: can utilize conventional shortest path algorithm principle, merges real road cost and designated user history traffic information, explores the driving habits path that designated user may adapt to most.For electric power presumption afterwards and other senior application lay the first stone.
Accompanying drawing explanation
Fig. 1 is processing flow chart of the present invention;
Fig. 2 is the schematic diagram of O point to D point simulating actual conditions;
Fig. 3 is the schematic diagram of forerunner's node;
Fig. 4 is the schematic diagram of forerunner LINK;
Fig. 5 is the schematic diagram in current direction on LINK;
Fig. 6 is the schematic diagram of embodiment.
Embodiment
Understand for the ease of those of ordinary skill in the art and implement the present invention, below in conjunction with Fig. 1 and Fig. 6 and for distance the shortest preferential, the present invention is described in further detail to use two-way Dijkstra heuristic algorithm.The path planning of 2 on the navigating instrument simplified: Usual route, bee-line as shown in Figure 2.Explore in opposite directions respectively by O point and D point and obtain each node (NODE point), probing direction from forerunner NODE to current NODE, as shown in Figure 3.Explore respectively by O point and D point the LINK found between each node in opposite directions, probing direction from forerunner LINK to current LINK, as shown in Figure 4.By the different TRIP of same LINK, comprise different directions, respectively according to the number of passing through of direction record LINK, as shown in Figure 5.By to the track search between 2 o'clock according to each NODE node, the LINK that analysis node is corresponding, and the number of passing through of every bar LINK of correspondence, explore the path of merging individual character preference heterogeneity.As shown in Figure 6.
Implementation of the present invention presses Fig. 1 treatment scheme, comprises the following steps after start-up:
1) reference path calculates
The object that reference path calculates is that use Bi-directional Dijkstra Algorithm explores the distance shortest path from O point to D point, for the selection in the path of merging individual character preference heterogeneity afterwards lays the first stone.Concrete steps are as follows:
1.1) obtain reference path, namely explore the distance shortest path from O point to D point with Bi-directional Dijkstra Algorithm, as the path SHORT_PATH in Fig. 6, be the distance shortest path of O point to D point.
1.2) the value SHORT_WEIGHT of distance shortest path SHORT_PATH road total length is obtained, if O point in Fig. 6 is to the bee-line SHORT_WEIGHT=100m of D point.
2) O point and D point custom LINK coupling
The object of O point and D point custom LINK coupling is to explore from O point and D point respectively, within limits, explore from O point and D point distance the shortest, and equidirectional number of passing through is not less than the LINK of current threshold value, and obtaining this LINK qualified node O_NODE and node D_NODE, the value for number of passing through FREQUENCY afterwards calculates and lays the first stone.Concrete steps are as follows:
2.1) calculate seek scope, range threshold is denoted as: THRESHOLD_RANGE (if THRESHOLD_RANGE value is too small, then possibly cannot find the LINK with equidirectional number of passing through; If THRESHOLD_RANGE value is excessive, then may cause user in order to the cost walking Usual route and pay is much larger than the cost walked shortest path and pay), the THRESHOLD_RANGE=0.6 in the present embodiment; By seek scope FIND_RANGE assignment be: range threshold * shortest path road total length, the shortest path road total length=100m in the present embodiment, namely
FIND_RANGE=THRESHOLD_RANGE*SHORT_WEIGHT;
Then: seek scope FIND_RANGE=0.6*100m=60m;
2.2) O point custom LINK is searched
Current threshold value is less than for the equidirectional upper number of passing through of LINK at O point place.Current threshold value is denoted as: PASS (if PASS value is too small, although find the LINK probability satisfied condition comparatively large, finds the LINK custom degree satisfied condition lower; If PASS value is excessive, although find the custom degree of the LINK satisfied condition higher, find the LINK probability satisfied condition less.) PASS=2 in the present embodiment
As Fig. 6 explores by Dijkstra shortest path exploratory method from O point, when exploring node NODE1, because the LINK be connected with NODE1 exists the LINK that equidirectional number of passing through is not less than current threshold value PASS, LINK1=3, LINK2=2; And be 30m from O point to the distance of node NODE1, be less than the value 60m of seek scope FIND_RANGE, therefore LINK1 and LINK2 be qualified custom LINK, NODE1 is recorded in set O_NODE_SET.In like manner LINK5 is also qualified custom LINK, is recorded in by NODE3 in set O_NODE_SET.When exploring node N5, because O point is 61m to the distance of node N5, be greater than the value 60m of seek scope FIND_RANGE, therefore explore and terminate.In set O_NODE_SET, from the exploration of O point to this node apart from minimum as the node O_NODE satisfied condition.NODE1 is namely as O_NODE as shown in Figure 6;
2.3) D point custom LINK is searched
Current threshold value is less than for the equidirectional upper number of passing through of LINK at D point place.As Fig. 6 explores by Dijkstra shortest path exploratory method from D point, when exploring node NODE2, because the LINK be connected with NODE2 exists the LINK that equidirectional number of passing through is not less than current threshold value PASS, LINK7=4, LINK8=3, and from D point to the distance of NODE2 node be 35m, be less than the value 60m of seek scope FIND_RANGE, therefore LINK7 and LINK8 is qualified custom LINK, NODE2 is recorded in set D_NODE_SET.In like manner LINK11 is also qualified custom LINK, is recorded in by NODE4 in set D_NODE_SET.In set D_NODE_SET, from the exploration of D point to this node apart from minimum as the node D_NODE satisfied condition.NODE2 is namely as D_NODE as shown in Figure 6;
3) number of passing through calculates
The object that number of passing through calculates is to calculate the number of passing through being explored and LINK probing direction satisfies condition, for LINK weight computing lays the first stone afterwards.Concrete steps are as follows:
3.1) record common TRIP, on LINK1, equidirectional TRIP is as shown in Figure 6: TRIP1, TRIP2, TRIP3; The upper equidirectional TRIP of LINK2 is: TRIP4, TRIP5; The upper equidirectional TRIP of LINK7 is: TRIP1, TRIP2, TRIP3, TRIP6; The upper equidirectional TRIP of LINK8 is: TRIP7, TRIP8, TRIP9.
Being recorded in by all LINK (LINK0, LINK1, LINK2, LINK3) be connected with node O_NODE gathers in O_LINK_SET, be recorded in by TRIP on all LINK in set O_LINK_SET in set O_TRIP_SET, then the TRIP gathered in O_TRIP_SET is TRIP1, TRIP2, TRIP3, TRIP4 and TRIP5.
Being recorded in by all LINK (LINK6, LINK7, LINK8) be connected with node D_NODE gathers in D_LINK_SET, be recorded in by TRIP on all LINK in set D_LINK_SET in set D_TRIP_SET, then the TRIP gathered in D_TRIP_SET is TRIP1, TRIP2, TRIP3, TRIP6, TRIP7, TRIP8 and TRIP9.
By set O_TRIP_SET compared with set D_TRIP_SET, find out common TRIP, and common TRIP is recorded in S set AME_TRIP_SET, then have recorded TRIP1, TRIP2 and TRIP3 in S set AME_TRIP_SET.
By the TRIP that gathers in O_TRIP_SET (LINK0, LINK1, LINK2, LINK3) on every bar LINK compared with the TRIP in S set AME_TRIP_SET, retain common TRIP.On LINK1 after process, TRIP is: TRIP1, TRIP2 and TRIP3; The upper TRIP of LINK2 is NULL.
By the TRIP that gathers in D_TRIP_SET (LINK6, LINK7, LINK8) on every bar LINK compared with the TRIP in S set AME_TRIP_SET, retain common TRIP.On LINK7 after process, TRIP is: TRIP1, TRIP2 and TRIP3; The upper TRIP of LINK8 is NULL.
3.2) value of current exploration to the equidirectional number of passing through FREQUENCY of LINK is obtained.
For LINK9 and LINK10, other LINK in like manner.
On LINK9, TRIP is as shown in Figure 6: TRIP1, TRIP10; The upper TRIP of LINK10 is: TRIP2, TRIP3 and TRIP11; On forerunner LINK4, TRIP is: TRIP1, TRIP2 and TRIP3; Be TRIP1 because LINK9 and forerunner LINK4 exists a common TRIP, therefore the value of equidirectional for LINK9 number of passing through FREQUENCY be updated to 1.Be TRIP2 and TRIP3 because LINK10 and forerunner LINK4 exists two common TRIP, therefore the value of equidirectional for LINK10 number of passing through FREQUENCY be updated to 2.Retain common TRIP, on the LINK9 after process, TRIP is: TRIP1; The upper TRIP of LINK10 is: TRIP2 and TRIP3.
4) LINK weight computing
The object of LINK weight computing is that the relation of the value and road cost merging the equidirectional number of passing through FREQUENCY of LINK calculates the weights of LINK, for the track search of merging individual character preference and road cost afterwards lays the first stone.Concrete steps are as follows:
For LINK10, other LINK in like manner.
4.1) value of link length WEIGHT and the value of the equidirectional number of passing through FREQUENCY of LINK10 of LINK10 is obtained.FREQUENCY=2, WEIGHT=8m as shown in Figure 6;
4.2) calculate the value of the weights LINK_PRIORITY of LINK10, fusion formula is as follows:
LINK_PRIORITY=α * WEIGHT/ln (β * FREQUENCY+ γ * l) (α, beta, gamma is coefficient,
Note: α > 0, β >=0, γ >=1, such as α=1, β=1, γ=1)
Then LINK_PRIORITY=8/ln (2+e) ≈ 5.16.
5) track search of individual character preference heterogeneity is merged
Using the cost of LINK weights as track search, two-way Dijkstra heuristic algorithm is used to explore the path of merging individual character preference and road cost.
5.1) node (node N1, the node N2) weights of LINK (LINK1, LINK2) correspondence that current exploration is arrived are calculated.
As shown in Figure 6, the node that LINK1 and LINK2 is corresponding is N1 and N2, and node NODE1 is their forerunner's node, and the weights OLD_PRIORITY of node NODE1 is the distance 30 of O point to NODE1 node.According to 4.2) fusion formula calculate weights LINK_PRIORITY=5/ln (3+e) ≈ 2.8676 of LINK1; Weights LINK_PRIORITY=7/ln (2+e) ≈ 4.5121 of LINK2.The value of the weights NEW_PRIORITY of calculating crunode N1 and node N2, formula is as follows:
NEW_PRIORITY=OLD_PRIORITY+LINK_PRIORITY
The then weights NEW_PRIORITY=30+2.8676=32.8676 of node N1; The weights NEW_PRIORITY=30+4.5121=34.5121 of node N2;
5.2) track search of individual character preference heterogeneity is merged
The weights of the node that the LINK arrived using current exploration is corresponding, as the cost of track search, use two-way Dijkstra heuristic algorithm to explore the fusion individual character preference of O point to D point and the path HABIT_PATH of road cost.
6) routing
The object of routing is to use reference path to analyze the path of exploring, and selects the individual character favored pathway of more realistic road conditions.Concrete steps are as follows:
6.1) if TRIP1, TRIP2 and TRIP3 exist, namely S set AME_TRIP_SET be empty, then using the path of path HABIT_PATH as fusion individual character preference and road cost;
6.2) if TRIP1, TRIP2 and TRIP3 do not exist, namely S set AME_TRIP_SET is empty, then calculate the value of the road total length UNHABIT_WEIGHT of the non-Usual route in the HABIT_PATH of path.Namely UNHABIT_WEIGHT is the value of equidirectional number of passing through FREQUENCY is the cumulative of the LINK length WEIGHT of 0.
Threshold value THRESHOLD_CHOSE is selected (if THRESHOLD_CHOSE value is too small, then to be increased by the probability causing selecting paths SHORT_PATH as final path if the value of the road total length UNHABIT_WEIGHT of non-Usual route is greater than; If THRESHOLD_CHOSE value is excessive, then the probability causing path HABIT_PATH as Usual route is increased.Such as THRESHOLD_CHOSE=1) with the product of shortest path SHORT_PATH road total length SHORT_WEIGHT, namely
UNHABIT_WEIGHT>THRESHOLD_CHOSE*SHORT_WEIGHT;
Then use path SHORT_PATH as final path, otherwise then with the path of path HABIT_PATH as fusion individual character preference heterogeneity.
The above, only that specific embodiment of the invention case is described, and be not used to limit of the present invention can practical range, such as all equivalences that those skilled in the art complete under the spirit do not departed from indicated by the present invention and principle change or modify, and must be covered by the scope of the claims in the present invention.