CN105447595A - Scenic spot route recommending method based on spectral clustering algorithm - Google Patents
Scenic spot route recommending method based on spectral clustering algorithm Download PDFInfo
- Publication number
- CN105447595A CN105447595A CN201510797287.XA CN201510797287A CN105447595A CN 105447595 A CN105447595 A CN 105447595A CN 201510797287 A CN201510797287 A CN 201510797287A CN 105447595 A CN105447595 A CN 105447595A
- Authority
- CN
- China
- Prior art keywords
- little
- spot
- scenic
- sight
- scenic spot
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000004422 calculation algorithm Methods 0.000 title claims abstract description 38
- 238000000034 method Methods 0.000 title claims abstract description 36
- 230000003595 spectral effect Effects 0.000 title claims abstract description 17
- 238000002922 simulated annealing Methods 0.000 claims abstract description 16
- 239000011159 matrix material Substances 0.000 claims description 55
- 238000004088 simulation Methods 0.000 claims description 5
- 230000007850 degeneration Effects 0.000 claims description 4
- 238000000137 annealing Methods 0.000 claims description 3
- 238000010606 normalization Methods 0.000 claims description 3
- 230000003252 repetitive effect Effects 0.000 claims description 3
- 238000001228 spectrum Methods 0.000 claims description 3
- 238000005457 optimization Methods 0.000 description 5
- 238000004364 calculation method Methods 0.000 description 2
- 230000007812 deficiency Effects 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 241001269238 Data Species 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000005283 ground state Effects 0.000 description 1
- 239000004615 ingredient Substances 0.000 description 1
- 238000003780 insertion Methods 0.000 description 1
- 230000037431 insertion Effects 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 239000002245 particle Substances 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q10/00—Administration; Management
- G06Q10/04—Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
- G06Q10/047—Optimisation of routes or paths, e.g. travelling salesman problem
Landscapes
- Business, Economics & Management (AREA)
- Human Resources & Organizations (AREA)
- Engineering & Computer Science (AREA)
- Strategic Management (AREA)
- Economics (AREA)
- Marketing (AREA)
- Game Theory and Decision Science (AREA)
- Entrepreneurship & Innovation (AREA)
- Development Economics (AREA)
- Operations Research (AREA)
- Quality & Reliability (AREA)
- Tourism & Hospitality (AREA)
- Physics & Mathematics (AREA)
- General Business, Economics & Management (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Navigation (AREA)
Abstract
The invention discloses a scenic spot route recommending method based on a spectral clustering algorithm. The method comprises the following steps of step1, determining scenic spots which a tourist wants to visit, collecting data information of the scenic spots and abstracting into an undirected graph; step2, using a Floyd algorithm to calculate a shortest distance of any two scenic spots in the graph and deleting useless paths in a scenic spot path graph; step3, applying the spectral clustering algorithm in the scenic spot path graph to cut a large scenic region into a plurality of small scenic regions; step4, using a simulated annealing algorithm to calculate a route program plan among the small scenic regions; step5, selecting the scenic spot in the small scenic region which is closest to the tourist as a starting point of the tourist, calculating a scenic spot visiting route in the small scenic region, and then visiting the next small scenic region according to the route program plan among the small scenic regions, calculating the scenic spot visiting route in each small scenic region respectively and finally acquiring visiting routes of all the scenic spots.
Description
Technical field
The present invention relates to travel information service field, particularly a kind of sight spot route recommendation method based on spectral clustering.
Background technology
Tourism route optimization problem is the social focus that people pay close attention to always, and particularly in recent years along with the development in city, the raising of people's living material level, festive occasion out on tours, oneself is through becoming requisite part festivals or holidays.Therefore, how to tourism route carry out reasonably optimizing more and more pay attention to by people.
Tourism route planning is typical traveling salesman problem (TSP), traveling salesman problem refers to that travelling salesman accesses each city in sequence, make each city can be accessed and only can be once accessed, finally get back to starting point, and the Least-cost of cost.Traveling salesman problem is the uncertain problems (np complete problem) of typical polynomial expression complexity in combinatorial optimization problem, is the abstract form of complex engineering optimization problem in many fields.Fully effective algorithm about traveling salesman problem (TSP) problem not yet finds at present, and this impels people constantly explore for a long time and have accumulated a large amount of algorithms.Be summed up, current main algorithm can be divided into traditional optimized algorithm and modern optimization algorithm.Optimum solution algorithm and approximation method can be divided into again in traditional optimized algorithm.Tradition optimized algorithm comprises branch and bound method, improvement loop method, greedy algorithm, insertion etc.Although optimum solution algorithm can obtain exact solution, computing time cannot stand, and therefore just creates various approximation method, although these approximate datas can try to achieve the feasible solution close to optimum solution quickly, its degree close to optimum solution can not be satisfactory.
Deterministic Methods and random device is divided in modern optimization algorithm.Deterministic method optimal speed is fast, but is easily absorbed in local minimum, namely cannot ensure global optimum, and add algorithm complex, cause and solve overlong time, be unfavorable for practical application; On the contrary, random device farthest can avoid the deficiency of Deterministic Methods, although can not ensure to obtain optimum solution in the step determined, by introducing new acceptance criterion, draw a kind of method finding optimum solution in global scope---simulated annealing.This algorithm is good at searching for degree of difficulty and high " dead angle " of complicacy, therefrom finds out the region that expectation value is high, but also there is weak point.If the time that solves that the complexity of problem constantly increases so its result also exponentially level can become large gradually, once the scale of problem is too huge, the time that solves also can extend greatly, thus does not reach expected results.And feasibility has been no longer the unique objects that people pursue, be only far from being enough to the satisfied of this primary demand, to the requirement of problem solving efficiency and the quality people direction of pursuing especially.
Said method all can not meet the tourist demand in actual conditions well, namely recommends a tourism route the shortest to visitor within a short period of time.
Summary of the invention
Goal of the invention: technical matters to be solved by this invention is for the deficiencies in the prior art, provides a kind of sight spot route recommendation method based on spectral clustering.
In order to solve the problems of the technologies described above, the invention discloses a kind of sight spot route recommendation method based on spectral clustering, comprising the following steps:
Step 1, visitor determines the sight spot that will go sight-seeing, and collects the data message at these sight spots and be abstracted into a non-directed graph by computing machine, intelligent terminal or other interactive devices with data processing function;
Step 2, Freud Floyd-Warshall algorithm (https: //en.wikipedia.org/wiki/Floyd – Warshall_algorithm) is used to calculate the bee-line at any two sight spots in non-directed graph, obtain sight spot path profile, delete the useless path in the path profile of sight spot;
Step 3, the large scenic spot on the sight spot path profile that step 2 obtains by spectrum of use clustering algorithm cuts into the little scenic spot of two or more;
Step 4, employing simulated annealing calculates the route planning scheme between little scenic spot;
Step 5, select sight spot from the nearest little scenic spot of visitor as the starting point of visitor, obtain the sight spot access route in this little scenic spot, again according to the next little scenic spot of route planning scheme access between little scenic spot, obtain the sight spot access route of inside, each little scenic spot respectively, finally obtain the overall tour at all sight spots.
In the present invention, it is a non-directed graph G=(V, E, C) that the visitor of collection goes sight-seeing sight spot abstract.The set at sight spot is V={v
1, v
2..., v
l..., v
n, wherein v
irepresent i-th sight spot, 1≤i≤n, n represents the number at sight spot.The set of road (limit) is E={ (r, s): r, s ∈ V}, and wherein r, s are sight spot.Distance between sight spot is C={C
rs: r, s ∈ V}.
In step 2, adopt and delete useless limit between sight spot based on freudian algorithm, be divided into two steps,
Step 2-1, calculates bee-line dist [i] [j] between any two sight spot i and j by Freud's algorithm;
Step 2-2, if path c [i] [j] that be directly connected between two sight spot i and j is greater than the bee-line between these two sight spots, i.e. c [i] [j] >dist [i] [j], so judge this path not on the shortest path at these two sight spots, delete this path, wherein c [i] [j] represents the path that sight spot i is directly connected with sight spot j, and dist [i] [j] represents the bee-line of sight spot i and sight spot j.Finally obtain the sight spot path profile deleting useless path.
Step 3 comprises the following steps:
Step 3-1, adopts gaussian kernel function to construct similar matrix W and the degree matrix D at all sight spots:
Wherein, w
ijrepresent the similarity between sight spot i and sight spot j, 1≤i, j≤n, n represents the sum at all sight spots in scenic spot, all w
ijform similar matrix W, c
ijrepresent the length in the path be directly connected between sight spot i and sight spot j, the path be if there is no directly connected, then c
ijbe set to ∞, by all c
ijsort from small to large, maximal value is designated as ultimate range d
max, minimum value is designated as bee-line d
min, σ represents ultimate range d
maxwith bee-line d
min10%, σ=(d of difference
max-d
min) * 10%, d
irepresent the degree of sight spot i, all d
iformation degree matrix D;
Step 3-2, constructs symmetrical Laplacian Matrix L by similar matrix W and degree matrix D
sym, formula is as follows:
L
sym=D
-1/2LD
-1/2=I-D
-1/2WD
-1/2,
Wherein, L represents Laplacian Matrix, L=D-W, I representation unit matrix, and unit matrix is see (https: //zh.wikipedia.org/zh-cn/).
Step 3-3, calculates matrix L
symfront ω eigenwert and characteristic of correspondence vector v
a, 1≤a≤ω, v
arepresent a minimal eigenvalue characteristic of correspondence vector, all proper vector composition matrix V;
Step 3-4, be normalized by eigenvectors matrix V, obtain matrix T, formula is as follows:
Wherein, T
bfrepresent the value of the capable f row of normalization matrix b, v
bfthe value of the capable f row of representation feature vector matrix b, 1≤b≤n, 1≤f≤ω; v
bgthe value of the capable g row of representation feature vector matrix b, 1≤g≤ω,
the value sum of all row that representation feature vector matrix b is capable;
Step 3-5, if the b row vector of matrix T is y
b, 1≤b≤n, adopts k-average (k-means) method to carry out cluster to this n vector, produces k cluster, vectorial y
baffiliated classification is the classification belonging to the b of sight spot, and the sight spot in each cluster forms a little scenic spot, then total k little scenic spot.
Step 4 comprises the steps:
Step 4-1, sets the distance between little scenic spot, if there is the sight spot be directly connected in two little scenic spots, then the distance between two little scenic spots is the mean value of the sight spot distance be directly connected; If do not have direct sight spot between little scenic spot, the distance so between two little scenic spots is set to infinity;
Step 4-2, calculates the bee-line between any two little scenic spots by Freud (Floyd-Warshall) algorithm;
Step 4-3, for above-mentioned k little scenic spot (p
1, p
2..., p
k), employing simulated annealing calculates the route planning scheme between little scenic spot, and the solution space of this route planning scheme is the permutation and combination of little scenic spot access order, after determining starting point 1 and terminal k, then solution space S be expressed as 2 ... the set of all arrangements of k-1}, each arrangement S in solution space S
erepresent a kind of route planning of going sight-seeing this k little scenic spot, then adopt simulation degeneration algorithm to obtain optimal route programme.
The simulated annealing (SimulatedAnnealing) that the present invention adopts is the temperature-fall period of classical particle system in simulation thermodynamics, is used for solving the extreme value of planning problem.When the temperature of isolated particIe system declines with enough slow speed, system approximation is in thermodynamic equilibrium state, and final system will reach the minimum energy state of itself, i.e. ground state, this is equivalent to the global minimum point of energy function.Adopt simulation degeneration algorithm to obtain optimal route programme described in step 4-3 to comprise the steps:
Step 4-3-1, setting solution space S initial solution be stochastic generation 2,3 ..., the random alignment S of k-1}
0, and setting initial temperature t
0it is 100 degree;
Step 4-3-2, according to arrangement (p
1, p
2..., p
k) the little scenic spot of sequential access, Total course length formula is as follows:
Wherein, Cost (p
1, p
2..., p
k) represent the Total course length of accessing all little scenic spots, d (p
x, p
x+1) represent little scenic spot p
xwith little scenic spot p
x+1between bee-line;
Step 4-3-3, selects sequence number to be p arbitrarily
u1, p
u2little scenic spot, 2≤p
u1<p
u2≤ k, exchanges p
u1and p
u2access order, form new route plan, if exchange before be arranged as s
e=(p
1, p
2..., p
u1..., p
u2..., p
k), then the variation route scheme after exchanging is s '
e=(p
1, p
2..., p
u2..., p
u1..., p
k);
Step 4-3-4, calculates the difference of the Cost function before exchanging and after exchanging:
ΔCost=Cost(s′
e)-Cost(s
e),
Wherein, Δ Cost represents the general line difference before and after exchanging, Cost (s '
e) represent scheme s '
etotal course length, Cost (s
e) represent scheme s
etotal course length;
Step 4-3-5, if Δ Cost≤0, then accepts this new departure as the initial plant of simulating next time; If Δ Cost>0, then calculating probability
wherein t is Current Temperatures, and equally distributed several r on stochastic generation one [0,1] interval, if prob>=r, is then set to variation route the initial plant of next time simulating, otherwise still using former route as the initial plant of simulating next time;
Step 4-3-6, reduce temperature with the Annealing Scheme of Δ t=1, repetitive process step 4-3-3 ~ step 4-3-5 is until Current Temperatures reduces to 0, and the circuit finally obtained is the optimal route programme S between little scenic spot at every turn
among.
In step 5, select the starting point q as visit scenic spot from the nearest little scenic spot of visitor
0.Then adopt different computing method according to the scale at sight spot, if sight spot number is less than or equal to 6 in little scenic spot, then adopt the mode of all solutions of traversal to obtain
minimum route as minimal path, wherein
represent q
hsight spot number in individual little scenic spot; If sight spot number is greater than 6, then simulated annealing is adopted to calculate the internal route programme at this little scenic spot.Then according to the path planning scheme S between little scenic spot
amongaccess next little scenic spot q
h, and obtain little scenic spot q
hinterior sight spot access route.Travel through the sight spot in all little scenic spots successively, finally obtain overall tour.
Compared with prior art, the beneficial effect that the present invention has is:
(1) adopt the method for spectral clustering that large scenic spot is cut into little scenic spot, reduce the complexity of whole algorithm, accelerate arithmetic speed.
(2) adopt simulated annealing to plan the access route at scenic spot, find out the optimum solution of traveling salesman problem in the short period of time.
Accompanying drawing explanation
To do the present invention below in conjunction with the drawings and specific embodiments and further illustrate, above-mentioned and/or otherwise advantage of the present invention will become apparent.
Fig. 1 is the process flow diagram of the inventive method.
Embodiment
Below in conjunction with accompanying drawing, the present invention is illustrated.It is noted that described embodiment is only for illustrative purposes, instead of limitation of the scope of the invention.
The invention discloses a kind of sight spot route recommendation method based on spectral clustering, the method process flow diagram as shown in Figure 1, comprises the following steps:
Step 1: visitor determines the sight spot that will go sight-seeing, route recommendation system is collected the data message at these sight spots and is abstracted into a non-directed graph;
In the present invention, take out a non-directed graph G=(V, E, C).The set at sight spot is V={v
1, v
2..., v
l..., v
n, wherein v
irepresent i-th sight spot, 1≤i≤n, n represents the number at sight spot.The set of road (limit) is E={ (r, s): r, s ∈ V}, and wherein r, s are sight spot.Distance between sight spot is C={C
rs: r, s ∈ V}.
Step 2: the bee-line using any two sight spots in Freud's algorithm calculating chart, and delete the useless path in the path profile of sight spot;
First the present invention calculates bee-line dist [i] [j] between any two sight spots by Freud's algorithm; If the path be directly connected between two sight spots is greater than this bee-line of 2, i.e. c [i] [j] >dist [i] [j], so this path is scarcely on this shortest path of 2, delete this path, wherein c [i] [j] represents the path that sight spot i is directly connected with sight spot j, and dist [i] [j] represents the bee-line of sight spot i and sight spot j.Finally obtain the sight spot path profile deleting useless path.
Step 3: large scenic spot is cut into multiple little scenic spot by spectrum of use clustering algorithm on the path profile of sight spot;
First construct similar matrix W and the degree matrix D at all sight spots with gaussian kernel function in the present invention:
Wherein, w
ijrepresent the similarity between sight spot i and sight spot j, 1≤i, j≤n, n represents the sum at all sight spots in scenic spot, all w
ijform similar matrix W, c
ijrepresent the length in the path be directly connected between sight spot i and sight spot j, the path be if there is no directly connected, then c
ijbe set to ∞, by all c
ijsort from small to large, maximal value is designated as d
max, minimum value is designated as d
min, σ represents ultimate range d
maxwith bee-line d
min10%, σ=(d of difference
max-d
min) * 10%, d
irepresent the degree of sight spot i, all d
iformation degree matrix D;
Then symmetrical Laplacian Matrix L is constructed by similar matrix W and degree matrix D
sym, formula is as follows:
L
sym=D
-1/2LD
-1/2=I-D
-1/2WD
-1/2(3)
Wherein, L represents Laplacian Matrix L=D-W, I representation unit matrix.
Then matrix L is calculated
symfront ω eigenwert and characteristic of correspondence vector v
a, 1≤a≤ω, v
arepresent a minimal eigenvalue characteristic of correspondence vector, all proper vector composition matrix V.
Subsequently be normalized by eigenvectors matrix V and obtain matrix T, formula is as follows:
Wherein, T
bfrepresent the value of the capable f row of normalization matrix b, v
bfthe value of the capable f row of representation feature vector matrix b, 1≤b≤n, 1≤f≤ω; v
bgthe value of the capable g row of representation feature vector matrix b, 1≤g≤ω,
the value sum of all row that representation feature vector matrix b is capable.
Finally set the b row vector of matrix T as y
b, 1≤b≤n, adopts k-average (k-means) method to carry out cluster to this n vector, produces k cluster, vectorial y
baffiliated classification is the classification belonging to the b of sight spot, and the sight spot in each cluster forms a little scenic spot, then total k little scenic spot.
Step 4: calculate the bee-line between little scenic spot by Floyd-Warshall algorithm, employing simulated annealing calculates the route planning scheme between little scenic spot;
The step of simulated annealing is as follows:
(1) suppose to determine starting point 1 and terminal k, then initial solution be stochastic generation 2,3 ..., the random alignment S of k-1}
0.Setting initial temperature t
0it is 100 degree.
(2) according to arrangement (p
1, p
2..., p
k) the little scenic spot of sequential access, Total course length formula is as follows:
Wherein, Cost (p
1, p
2..., p
k) represent the Total course length of accessing all little scenic spots, d (p
x, p
x+1) represent little scenic spot p
xwith little scenic spot p
x+1between bee-line.
(3) step 4-3-3, selects sequence number to be p arbitrarily
u1, p
u2little scenic spot, 2≤p
u1<p
u2≤ k, exchanges p
u1and p
u2access order, form new route plan, if exchange before be arranged as s
e=(p
1, p
2..., p
u1..., p
u2..., p
k), then the variation route scheme after exchanging is s '
e=(p
1, p
2..., p
u2..., p
u1..., p
k);
(4) difference of the Cost function after exchanging front and exchange is calculated:
ΔCost=Cost(s′
e)-Cost(s
e)(6)
Wherein, Δ Cost represents the general line difference before and after exchanging, Cost (s '
e) represent scheme s '
etotal course length, Cost (s
e) represent scheme s
etotal course length.
(5) if Δ Cost≤0, then this new scheme is accepted as the initial plant of simulating next time; If Δ Cost>0, then calculating probability
wherein t is Current Temperatures, and equally distributed several r on stochastic generation one [0,1] interval, if prob>=r, then accepts variation route, otherwise still using former route as the initial plant of simulating next time.
(6) reduce temperature with the Annealing Scheme of Δ t=1, repetitive process (3), (4), (5), until Current Temperatures reduces to 0, the circuit finally obtained is the optimal route scheme S between little scenic spot at every turn
among.
Step 5: select sight spot from a nearest little scenic spot of visitor as the starting point of visitor, obtain the shortest access route at this little scenic spot, again according to the next little scenic spot of route planning scheme access between little scenic spot, obtain the sight spot access route of inside, each little scenic spot respectively, finally obtain the tour at all sight spots.
Adopt different computing method according to the scale at sight spot in the present invention, if sight spot number is less than or equal to 6 in little scenic spot, then adopt the mode of all solutions of traversal to obtain
minimum route as minimal path, wherein
represent q
hsight spot number in individual little scenic spot; If sight spot number is greater than 6, then adopt the internal route programme calculating this little scenic spot with the simulated annealing that step 4 is identical.Then according to the path planning scheme S between little scenic spot
amongaccess next little scenic spot q
h, and obtain little scenic spot q
hinterior sight spot access route.Travel through the sight spot in all little scenic spots successively, finally obtain overall tour.
Embodiment
The present embodiment employs so-and-so lake scenic area and scenic spot data of A city and tests.
For the raw data taken, first filter out invalid data, namely only retain routing information between sight spot positional information and sight spot; And data are processed, calculates the distance (unit (m)) between directly connected sight spot.
Secondly, obtain the sight spot that user selects to play, the departure place of user and leave the end place at scenic spot.Starting point is set to S point, and terminal is set to E point.Generate a undirected weighted graph according to the data message at selected sight spot, the weight between two sight spots is the distance between sight spot, if two sight spots are not directly connected, then weights are set to infinite.
Again, in order to better divide little scenic spot, first deleting remote path, using useless edge contract algorithm here, obtain new sight spot weight map.For new sight spot figure, use Spectral Clustering sight spot to be divided into 7 little scenic spots, be expressed as p
1, p
2..., p
7.
Next, calculate the link cost between these 7 little scenic spots, the weight between any two scenic spots is the bee-line sum at the sight spot be directly connected between scenic spot.Be initial little scenic spot with the little scenic spot at S point place, the point at E point place is the little scenic spot of terminal, adopts simulated annealing to solve the minimal path scheme at these 7 little scenic spots of visit, is designated as T={p '
1, p '
2..., p '
7.
Finally, for little scenic spot p
1, p
2..., p
7, go sight-seeing each little scenic spot respectively according to existing path T, the route in each little scenic spot adopts simulated annealing to obtain minimal path R
i=y '
1, y '
2..., y '
m, R
irepresent the sight spot optimal route of inside, i-th little scenic spot.Finally obtain the general route programme of visitor.
The invention provides a kind of sight spot route recommendation method based on spectral clustering; the method and access of this technical scheme of specific implementation is a lot; the above is only the preferred embodiment of the present invention; should be understood that; for those skilled in the art; under the premise without departing from the principles of the invention, can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.The all available prior art of each ingredient not clear and definite in the present embodiment is realized.
Claims (6)
1., based on a sight spot route recommendation method for spectral clustering, it is characterized in that: comprise the following steps:
Step 1, determines the sight spot that visitor will go sight-seeing, and collects the data message at these sight spots and is abstracted into a non-directed graph;
Step 2, uses Freud's algorithm to calculate the bee-line at any two sight spots in non-directed graph, obtains sight spot path profile, delete the useless path in the path profile of sight spot, obtain the sight spot path profile deleting useless path;
Step 3, the large scenic spot on the sight spot path profile that step 2 obtains by spectrum of use clustering algorithm cuts into the little scenic spot of two or more;
Step 4, employing simulated annealing calculates the route planning scheme between little scenic spot;
Step 5, select sight spot from the nearest little scenic spot of visitor as the starting point of visitor, obtain the sight spot access route in this little scenic spot, again according to the next little scenic spot of route planning scheme access between little scenic spot, obtain the sight spot access route of inside, each little scenic spot respectively, finally obtain the overall tour at all sight spots.
2. a kind of sight spot route recommendation method based on spectral clustering according to claim 1, it is characterized in that, step 2 comprises the following steps:
Step 2-1, calculates bee-line dist [i] [j] between any two sight spot i and j by Freud's algorithm;
Step 2-2, if path c [i] [j] that be directly connected between two sight spot i and j is greater than the bee-line between these two sight spots, i.e. c [i] [j] >dist [i] [j], so judge this path not on the shortest path at these two sight spots, delete this path, obtain the sight spot path profile deleting useless path.
3. a kind of sight spot route recommendation method based on spectral clustering according to claim 2, it is characterized in that, step 3 comprises the following steps:
Step 3-1, adopts gaussian kernel function to construct similar matrix W and the degree matrix D at all sight spots:
Wherein, w
ijrepresent the similarity between sight spot i and sight spot j, 1≤i, j≤n, n represents the sum at all sight spots in scenic spot, all w
ijform similar matrix W, c
ijrepresent the length in the path be directly connected between sight spot i and sight spot j, the path be if there is no directly connected, then c
ijbe set to ∞, by all c
ijsort from small to large, maximal value is designated as ultimate range d
max, minimum value is designated as bee-line d
min, σ represents ultimate range d
maxwith bee-line d
min10%, σ=(d of difference
max-d
min) * 10%, d
irepresent the degree of sight spot i, all d
iformation degree matrix D;
Step 3-2, constructs symmetrical Laplacian Matrix L by similar matrix W and degree matrix D
sym, formula is as follows:
L
sym=D
-1/2LD
-1/2=I-D
-1/2WD
-1/2,
Wherein, L represents Laplacian Matrix, L=D-W, I representation unit matrix;
Step 3-3, calculates matrix L
symfront ω eigenwert and characteristic of correspondence vector v
a, 1≤a≤ω, v
arepresent a minimal eigenvalue characteristic of correspondence vector, all proper vector composition matrix V;
Step 3-4, be normalized by eigenvectors matrix V, obtain matrix T, formula is as follows:
Wherein, T
bfrepresent the value of the capable f row of normalization matrix b, v
bfthe value of the capable f row of representation feature vector matrix b, 1≤b≤n, 1≤f≤ω; v
bgthe value of the capable g row of representation feature vector matrix b, 1≤g≤ω,
the value sum of all row that representation feature vector matrix b is capable;
Step 3-5, if the b row vector of matrix T is y
b, 1≤b≤n, adopts k-Mean Method to carry out cluster to this n vector, produces k cluster, vectorial y
baffiliated classification is the classification belonging to the b of sight spot, and the sight spot in each cluster forms a little scenic spot, then total k little scenic spot.
4. a kind of sight spot route recommendation method based on spectral clustering according to claim 3, it is characterized in that, step 4 comprises the steps:
Step 4-1, sets the distance between little scenic spot, if there is the sight spot be directly connected in two little scenic spots, then the distance between two little scenic spots is the mean value of the sight spot distance be directly connected; If do not have direct sight spot between little scenic spot, the distance so between two little scenic spots is set to infinity;
Step 4-2, calculates the bee-line between any two little scenic spots by Freud's algorithm;
Step 4-3, for above-mentioned k little scenic spot (p
1, p
2..., p
k), employing simulated annealing calculates the route planning scheme between little scenic spot, and the solution space of this route planning scheme is the permutation and combination of little scenic spot access order, after determining starting point 1 and terminal k, then solution space S be expressed as 2 ... the set of all arrangements of k-1}, each arrangement S in solution space S
erepresent a kind of route planning of going sight-seeing this k little scenic spot, then adopt simulation degeneration algorithm to obtain optimal route programme.
5. a kind of sight spot route recommendation method based on spectral clustering according to claim 4, is characterized in that, adopts simulation degeneration algorithm to obtain optimal route programme and comprise the steps: described in step 4-3
Step 4-3-1, setting solution space S initial solution be stochastic generation 2,3 ..., the random alignment S of k-1}
0, and setting initial temperature t
0it is 100 degree;
Step 4-3-2, according to arrangement (p
1, p
2..., p
k) the little scenic spot of sequential access, Total course length formula is as follows:
Wherein, Cost (p
1, p
2..., p
k) represent the Total course length of accessing all little scenic spots, d (p
x, p
x+1) represent little scenic spot p
xwith little scenic spot p
x+1between bee-line;
Step 4-3-3, selects sequence number to be p arbitrarily
u1, p
u2little scenic spot, 2≤p
u1<p
u2≤ k, exchanges p
u1and p
u2access order, form new route plan, if exchange before be arranged as s
e=(p
1, p
2..., p
u1..., p
u2..., p
k), then the variation route scheme after exchanging is s '
e=(p
1, p
2..., p
u2..., p
u1..., p
k);
Step 4-3-4, calculates the difference of the Cost function before exchanging and after exchanging:
ΔCost=Cost(s′
e)-Cost(s
e),
Wherein, Δ Cost represents the general line difference before and after exchanging, Cost (s '
e) represent scheme s '
etotal course length, Cost (s
e) represent scheme s
etotal course length;
Step 4-3-5, if Δ Cost≤0, then accepts this new departure as the initial plant of simulating next time; If Δ Cost>0, then calculating probability
wherein t is Current Temperatures, and equally distributed several r on stochastic generation one [0,1] interval, if prob>=r, is then set to variation route the initial plant of next time simulating, otherwise still using former route as the initial plant of simulating next time;
Step 4-3-6, reduce temperature with the Annealing Scheme of Δ t=1, repetitive process step 4-3-3 ~ step 4-3-5 is until Current Temperatures reduces to 0, and the circuit finally obtained is the optimal route programme S between little scenic spot at every turn
among.
6. a kind of sight spot route recommendation method based on spectral clustering according to claim 5, is characterized in that, in step 5, first selects the starting point q as visit scenic spot from the nearest little scenic spot of visitor
0, then adopt simulated annealing to calculate the route planning scheme of this inside, little scenic spot, then according to the optimal route programme S between little scenic spot
amongaccess next little scenic spot q
h, and obtain little scenic spot q
hinterior sight spot access route, 1≤h≤k, k is little scenic spot number, travels through the sight spot in all little scenic spots successively, finally obtains overall tour.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510797287.XA CN105447595A (en) | 2015-11-18 | 2015-11-18 | Scenic spot route recommending method based on spectral clustering algorithm |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510797287.XA CN105447595A (en) | 2015-11-18 | 2015-11-18 | Scenic spot route recommending method based on spectral clustering algorithm |
Publications (1)
Publication Number | Publication Date |
---|---|
CN105447595A true CN105447595A (en) | 2016-03-30 |
Family
ID=55557747
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510797287.XA Pending CN105447595A (en) | 2015-11-18 | 2015-11-18 | Scenic spot route recommending method based on spectral clustering algorithm |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105447595A (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107543556A (en) * | 2016-06-28 | 2018-01-05 | 高德信息技术有限公司 | Closed loop route planning method and device |
CN107832872A (en) * | 2017-10-19 | 2018-03-23 | 金华航大北斗应用技术有限公司 | Dynamic programming method for scenic spot route |
CN108416611A (en) * | 2018-01-31 | 2018-08-17 | 佛山市顺德区中山大学研究院 | A kind of supermarket path commending system and its method |
CN108647724A (en) * | 2018-05-11 | 2018-10-12 | 国网电子商务有限公司 | A kind of user's recommendation method and device based on simulated annealing |
CN110750737A (en) * | 2019-09-27 | 2020-02-04 | 恒大智慧科技有限公司 | Scenic spot recommendation method and device and storage medium |
CN110942735A (en) * | 2019-12-18 | 2020-03-31 | 精彩旅图(北京)科技发展有限公司 | Tourism voice explanation system and method |
CN117553802A (en) * | 2024-01-08 | 2024-02-13 | 民航成都电子技术有限责任公司 | Method, device, equipment and storage medium for planning tour inspection path of terminal building |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104089620A (en) * | 2014-04-04 | 2014-10-08 | 北京乐投信息技术有限公司 | Data analysis-based automatic route programming method and system thereof |
CN105205194A (en) * | 2014-06-24 | 2015-12-30 | 上海汇联皆景信息科技有限公司 | System and method for generating scenic area map |
-
2015
- 2015-11-18 CN CN201510797287.XA patent/CN105447595A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104089620A (en) * | 2014-04-04 | 2014-10-08 | 北京乐投信息技术有限公司 | Data analysis-based automatic route programming method and system thereof |
CN105205194A (en) * | 2014-06-24 | 2015-12-30 | 上海汇联皆景信息科技有限公司 | System and method for generating scenic area map |
Non-Patent Citations (2)
Title |
---|
孙玉侠: "数据挖掘中的谱聚类算法研究", 《中国优秀硕士学位论文全文数据库(电子期刊)信息科技辑》 * |
石为人等: "基于Floyd算法的移动机器人最短路径规划研究", 《仪器仪表学报》 * |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107543556A (en) * | 2016-06-28 | 2018-01-05 | 高德信息技术有限公司 | Closed loop route planning method and device |
CN107832872A (en) * | 2017-10-19 | 2018-03-23 | 金华航大北斗应用技术有限公司 | Dynamic programming method for scenic spot route |
CN108416611A (en) * | 2018-01-31 | 2018-08-17 | 佛山市顺德区中山大学研究院 | A kind of supermarket path commending system and its method |
CN108416611B (en) * | 2018-01-31 | 2020-12-04 | 佛山市顺德区中山大学研究院 | Supermarket path recommendation system and method thereof |
CN108647724A (en) * | 2018-05-11 | 2018-10-12 | 国网电子商务有限公司 | A kind of user's recommendation method and device based on simulated annealing |
CN110750737A (en) * | 2019-09-27 | 2020-02-04 | 恒大智慧科技有限公司 | Scenic spot recommendation method and device and storage medium |
CN110942735A (en) * | 2019-12-18 | 2020-03-31 | 精彩旅图(北京)科技发展有限公司 | Tourism voice explanation system and method |
CN117553802A (en) * | 2024-01-08 | 2024-02-13 | 民航成都电子技术有限责任公司 | Method, device, equipment and storage medium for planning tour inspection path of terminal building |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105447595A (en) | Scenic spot route recommending method based on spectral clustering algorithm | |
CN109141430A (en) | Electric inspection process robot path planning method based on simulated annealing ant group algorithm | |
CN104462190B (en) | A kind of online position predicting method excavated based on magnanimity space tracking | |
CN103971184B (en) | Transmission line of electricity path generating method based on GIS Spatial GISs | |
CN103365886B (en) | The querying method of the spatial event in car networking and Optimizing Queries device | |
CN107742169A (en) | A kind of Urban Transit Network system constituting method and performance estimating method based on complex network | |
CN104951834A (en) | LSSVM (least squares support vector machine) wind speed forecasting method based on integration of GA (genetic algorithm) and PSO (particle swarm optimization) | |
CN105335524B (en) | A kind of graph search method applied to extensive irregular eutectic data | |
CN103838820B (en) | Evolutionary multi-objective optimization community detection method based on affinity propagation | |
CN107766406A (en) | A kind of track similarity join querying method searched for using time priority | |
CN110222959A (en) | A kind of urban employment accessibility measuring method and system based on big data | |
CN104217579A (en) | Method for searching critical road sections of traffic networks on basis of redundancy of road section sub-networks | |
CN102819611B (en) | Local community digging method of complicated network | |
CN112461240A (en) | Unmanned aerial vehicle obstacle avoidance path planning method and system | |
CN106658570A (en) | Mobile sink information collection path constructing method based on secondary grid partitioning | |
CN111797331B (en) | Multi-target multi-constraint route recommendation method based on crowd sensing | |
CN111008730B (en) | Crowd concentration prediction model construction method and device based on urban space structure | |
CN108108407A (en) | Group movement mobile cluster pattern sort method based on space-time track | |
Zhao et al. | Learning region similarities via graph-based deep metric learning | |
Yu et al. | Mining coterie patterns from Instagram photo trajectories for recommending popular travel routes | |
CN113361716B (en) | Threat reasoning rule construction method and device | |
CN115063175A (en) | Shop service range defining method, system, computer device and storage medium | |
Gupta et al. | Comparison of some approximate algorithms proposed for traveling salesmen and graph partitioning problems | |
CN107018074B (en) | A kind of network-in-dialing path method for fast searching based on flattening | |
Samann et al. | Examining the Use of Scott's Formula and Link Expiration Time Metric for Vehicular Clustering. |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20160330 |