Embodiment
Below in conjunction with drawings and Examples, the present invention is described in further detail.
The prior art platform that the present invention uses comprises: GIS module, GPS acquisition module, voice synthetic module.
The existing method that the present invention adopts comprises: open method one: the Thiessen polygon generating algorithm (Zhang Hong, warm Yongning, Liu Aili. Geographic Information System algorithm basis [M]. Science Press, 2006:176 page); Open method two: point whether in polygon evaluation algorithm (Zhang Hong, warm Yongning, Liu Aili. Geographic Information System algorithm basis [M]. Science Press, 2006:26 page); Open method three: the Straight Insertion Sort method (Yan Weimin, Wu Weimin. data structure (C language version) [M]. publishing house of Tsing-Hua University: 265 pages); Open method four: polygon and polygon concern evaluation algorithm (Zhang Hong, warm Yongning, Liu Aili. Geographic Information System algorithm basic [M]. Science Press, 2006:32 page); Open method five: point whether in circle evaluation algorithm (Zhang Hong, warm Yongning, Liu Aili. Geographic Information System algorithm basis [M]. Science Press, 2006:33 page); Open method six: circle whether in circle evaluation algorithm (Zhang Hong, warm Yongning, Liu Aili. Geographic Information System algorithm basic [M]. Science Press, 2006:33 page).Also having used simultaneously publication number is that CN102142215A, denomination of invention are some step in the patented claim of " a kind of geography information adaptive voice explanation method of taking Position And Velocity into account ".
Native system is processed the specific works flow process (see figure 2) of reporting the module of conflicting between sight spot and sight spot:
Utilize existing GIS module that longitude and latitude are converted into coordinate in specific map projection, be recorded as (X, Y), wherein X is the coordinate of latitude in specific map projection, Y is the coordinate (hereinafter X be latitude coordinate in specific map projection, Y be longitude coordinate in specific map projection) of longitude in specific map projection.The user plans that circuit refers to be made of a series of coordinate points from the user movement starting point to the path the user movement terminal point.
(1) setting the sight spot location sets is P={p
i=(X
i, Y
i) | i=1 ... n, n are sight spot quantity }; The user plans that circuit is R={r
i=(X
i, Y
i) | i=1 ... m, m plans coordinate points quantity in circuit for the user }; Sight spot Thiessen polygon set is VoroA; The candidate says that effectively solution path is CSR; It is CSRA that the candidate effectively explains set of paths; It is TCSRA that interim candidate effectively explains set of paths; Say that effectively solution path is VSR; Effectively the explanation path is S; It is D that distance is controlled threshold value, refers to take the sight spot to be the radius of the circular buffer zone in the center of circle, is used for controlling whether triggering the audio guide explanation; Effectively the explanation time is T; Phonetic synthesis speed is VT, refers to the word quantity that voice synthetic module can synthesize in the unit interval; Effectively the explanation word length is C; Explanation section choice set is combined into SELECT; Current explanation sight spot is CSP; User's current location is UP; The current movement velocity of user is V; The position deviation threshold value is L, refers to that user's current location plans the distance of the coordinate points ri on circuit with respect to the user; Export explanation section sequence number M initial value and be made as 1;
(2) adopt open method one " Thiessen polygon generating algorithm ", generate sight spot Thiessen polygon set VoroA={voro according to sight spot location sets P
i=(id
i, point
i) | i=1 ... n, n are sight spot quantity }, id
iBe the numbering of Thiessen polygon, its value is identical with subscript i (with the numbering of the subscript in P), point
iCoordinate points message structure for comprising in Thiessen polygon specifically is expressed as point
i={ pon
j=(X
j, Y
j) | j=1 ... k, k are the quantity on this Thiessen polygon summit };
(3) plan circuit R and sight spot Thiessen polygon set VoroA according to the user, carry out the candidate and effectively explain the set of paths judgement, obtain the candidate and effectively explain set of paths CSRA(as shown in Figure 3);
(4) carry out current explanation sight spot judgement, obtain current explanation sight spot CSP;
(5) effectively explain the candidate according to current explanation sight spot CSP and choose the candidate identical with the id of CSP in set of paths CSRA and effectively say solution path, form interim candidate and effectively explain set of paths TCSRA={tcsr
i=(id
i, point
i) | i=1 ... n, n are that interim candidate effectively explains number of paths }, id
iEffectively say the numbering (with the Thiessen polygon numbering at this sight spot) at sight spot under solution path for this candidate, point
iFor effectively saying, this candidate coordinate points message structure in solution path specifically is expressed as point
i={ pon
j=(X
j, Y
j) | j=1 ... l, l are that the candidate effectively says the coordinate points quantity in solution path };
(6) effectively explain set of paths TCSRA and user's current location UP according to interim candidate, carry out the candidate and effectively say the solution path judgement, obtain the candidate and effectively say solution path CSR;
(7) effectively say solution path CSR, distance control threshold value D and current explanation sight spot CSP according to the candidate, carry out and effectively say the solution path judgement, obtain effectively saying solution path VSR;
(8) according to effectively saying solution path VSR and user's current location UP, carry out effectively explanation path judgement, obtain effectively explaining path S; If whether identical S=0 carries out after the judgement of current explanation sight spot more current explanation sight spot, if not identically forward step (5) to, otherwise repeating step (8);
(9) the current movement velocity V of the user who utilizes GPS to obtain and effective explanation path S, carry out following audio guide explanation process (drawing the step in existing publication application CN102142215A):
(a) if time T=S ÷ V is effectively explained in V ≠ 0, turn step (b); If V=0 effectively explains time T and uses a special value to represent, turn step (c);
(b) calculate effectively explanation word length C, C=VT * T;
(c) according to the explanation text of current explanation sight spot CSP, effectively explain word length C and exported an explanation section sequence number M, carry out geographical information matches, get the explanation section and select a set SELECT;
(d) select set SELECT for the explanation section, carry out speech conversion and output;
Regularly carry out current explanation sight spot judgement, if the numbering at current explanation sight spot changes, stop step (9) flow process, exported explanation section sequence number M and be made as 1, forwarded step (5) to, do not changed if work as the numbering of foreground point, carry out effectively explanation path judgement, obtain after new effective explanation path comparing with current effective explanation path, if unequal, re-execute step (9); If the user selects to withdraw from the audio guide explanation, forward step (10) to;
(10) finish.
The candidate effectively explains set of paths judgement flow process (see figure 3):
(1) the traversal user plans the coordinate points in circuit R, adopt open method two " point whether in polygon evaluation algorithm ", calculate the sight spot Thiessen polygon under each coordinate points in R in sight spot Thiessen polygon set VoroA, and form set DSCRA={dscr
i=(X
i, Y
i, id
i) | i=1 ... n, n is the coordinate points quantity in planning circuit R }, id
iNumbering for the Thiessen polygon at affiliated sight spot;
(2) comparison starting position mark=i is set, traversal DSCRA, relatively dscr
iAnd dscr
i+1The id value whether identical, if the identical i=i+1 that makes continues relatively; Work as dscr
iAnd dscr
i+1The id value make i=i+1 forward step (3) to when not identical; If after having traveled through DSCRA, all dscr
iThe id value all identical, forward step (4) to after execution of step (3), otherwise directly forward step (4) to;
(3) with dscr
MarkTo dscr
i-1Between (comprise dscr
MarkAnd dscr
i-1) element add the candidate to and effectively explain set of paths CSRA={csr
j=(id
j, point
j) | j=1 ... t, t effectively explains number of paths for the candidate } in, id
jEffectively say the Thiessen polygon numbering at sight spot under solution path for this candidate, pointj says effectively that for this candidate the coordinate points message structure in solution path (is dscr
MarkTo dscr
i-1Between (comprise dscr
MarkAnd dscr
i-1) all coordinate points), specifically be expressed as point
j={ pon
k=(X
k, Y
k) | k=1 ... m, m are dscr
MarkTo dscr
i-1(comprise dscr
MarkAnd dscr
i-1) between coordinate points quantity; Add and forward step (2) to after complete;
(4) finish;
Current explanation sight spot judgement flow process:
(1) utilize GPS to obtain user's current location UP=(X, Y);
(2) according to user's current location UP and sight spot Thiessen polygon set VoroA, adopt open method two " point whether in polygon evaluation algorithm ", obtain current explanation sight spot CSP={csp=(id, X, Y) }, id is the numbering at current explanation sight spot;
(3) finish;
The candidate effectively says solution path judgement flow process:
(1) if Len (TCSRA)=1 adds the unique coordinate points message structure in TCSRA in CSR to, i.e. CSR={cs
i=(X
i, Y
i) | i=1 ... l, l are coordinate points quantity }; If Len (TCSRA)〉1, turn step (2); Len (TCSRA) refers to the number of elements in TCSRA;
(2) traversal TCSRA, calculate point successively
iIn first coordinate points and the distance of user's current location UP
Add all dis to set TPA={tp
j=(dis
j, id
j) | j=1 ... n, n are Len (TCSRA) } in, id
jBe point
iThe value of lower label i;
(3) adopt open method three " Straight Insertion Sort method ", the element in pair set TPA is with dis
jThe value ascending sort, complete rear the searching in TCSRA and tp of sorting
1The identical element of id value, and coordinate points message structure is wherein added in CSR, i.e. CSR={cs
i=(X
i, Y
i) | i=1 ... l, l are coordinate points quantity };
(4) finish;
Effectively say solution path judgement flow process:
(1) the traversal candidate effectively says solution path CSR, calculate successively wherein coordinate points and the distance of current explanation sight spot CSP
If Dis≤D adds this coordinate points to and effectively says in solution path VSR;
(2) finish;
Effectively the explanation path judges flow process:
(1) traversal is effectively said solution path VSR, calculates successively coordinate points in VSR and the distance of user's current location UP=(X, Y)
Navigate to the point (X of dis minimum
i, Y
i), if this dis〉L, effectively explain path S=0, turn step (3), otherwise turn step (2);
(2) calculate from (X
i, Y
i) begin to (X
Len (VSR), Y
Len (VSR))Length, namely effectively explain path
Wherein, Len (VSR) refers to the coordinate points quantity that VSR comprises;
(3) finish;
Native system is processed the specific works flow process (see figure 5) of reporting the module of conflicting between sight spot and crossing:
According to crossing and sight spot, the zone is divided into the crossing and reports regional R
ciWith the regional R of sight spot explanation
pi, with Current GPS position P
gpsDo not report crossing C to the next one
iBetween related R
piAnd R
ciBe called one and mix report unit U
i, with trigger point to the crossing C of explanation zone, sight spot in planning circuit working direction
iBetween line length be designated L
pc, will plan that circuit is at R
piInterior line length is called effective report length L at sight spot
pi, will plan that circuit is at R
ciInterior line length is called C
iEffective report length L
ci, judgement P when the user advances along the planning circuit
gpsThe affiliated zone of reporting: if P
gpsBelong to the crossing and report regional R
ci, first start crossing C
iDirection information report, judge whether again at the regional R of sight spot explanation after finishing wait reporting
piIn, thereby determine whether to start sight spot explanation work; If current location belongs to the regional R of sight spot explanation
pi, first judge the regional R of crossing report
ciWith the regional R of sight spot explanation
piSpatial relationship, and in conjunction with two L that report between area triggering points
pc, L
piAnd L
ciBetween distance relation (as shown in Figure 6), in advance or postpone intersection information and report in good time.
(1) initialization P
gps, obtain active user's positional information and determine U
i
(2) at U
iThe open method of interior employing is obtained POI zone R
piEffective report length L
pi, the crossing reports regional R
ciEffective report length L
ciAnd L
pcValue;
(3) judge current P
gpsIf the affiliated zone of reporting is P
gpsDo not belong to simultaneously R
ciAnd R
pi, return to step (1), otherwise carry out next step;
(4) if P
gpsBelong to the crossing and report regional R
ci, at first report intersection information C
i, otherwise carry out next step;
(5) set in advance or postpone the crossing when reporting information two to report interregional be L apart from threshold values
0If, P
gpsBelong to POI zone R
pi, according to the regional R of POI explanation
piReport regional R with the crossing
ciSpatial relation judgement report mode:
(a) if both on the planning circuit from, namely do not exist to comprise or overlapping relation, open POI zone explanation, judge again after explanation finishes whether user's current location belongs to the crossing and report the zone, open the crossing report if belong to;
(b) if R
piWith R
ciIntersect but do not comprise on the planning circuit, opening the POI explanation; Judgement U
iInterior 0≤L
pc– (L
pi+ L
ci)≤L
0Whether set up, start crossing C if set up to suspend
iReport, until restart after POI explanation end, no matter whether user's current location is reported in the zone at the crossing; Otherwise forward (c) to;
(c) judge current P
gpsWhether report regional R at the crossing
ciIn, insert crossing C if set up
iReport information, otherwise continue POI zone explanation, forward (7) to;
(6) two report the zone comprises or the phase inscribe on the planning circuit mutually, judgement U
iInterior 0≤L
pc– L
pi≤ L
0Whether set up, start POI zone explanation if set up to suspend, report in advance crossing C
iTurning information, open POI zone explanation after finishing; Directly open POI zone explanation if be false, forward afterwards (c) to;
(7) finish one and mix report unit U
i, return to (1);
Process and to report the module embodiment (as shown in Figure 4) that conflicts between sight spot and sight spot:
GPS position acquisition module is provided by the GPS chip that mobile device carries, Geographic Information System (GIS) module realizes based on the secondary development of the ArcGISMobile10 software of ESRI company, directly drive the GPS chipset by relevant interface, obtain with information such as current longitude and latitude positions, in the voice output module, speech synthesis engine ejTTS6.0 and the Interface realization thereof of Jie Tonghua sound company used in the output of synthetic speech, completes with the Interop.WMPLib.dll file that is specifically designed to mobile device that Microsoft provides based on the voice output that audio frequency is reported.
Fig. 4 is the sight spot distribution plan in case study on implementation, and in case study on implementation, the scenic spot is comprised of 7 sight spots, and in figure, thick line is planned circuit for the user, and in figure, the dashed circle of sight spot periphery is circular buffer zone, and its radius is distance and controls threshold value D.In figure, coordinate is the coordinate under Universal Transverse Mercator Projection, the sight spot location sets
P={ (57, 131), (49, 89), (108, 143), (91, 107), (103, 63), (144, 104), (158, 150) }, the user plans circuit R={ (37, 152), (43, 135), (53, 134), (63, 131), (73, 126), (77, 117), (89, 115), (99, 120), (103, 128), (113, 130), (121, 129), (125, 137), (131, 142), (141, 142), (146, 138), (149, 134), (144, 124), (147, 116), (139, 100), (124, 102), (113, 96), (107, 97), (101, 95), (100, 89), (109, 80), (118, 76), (113, 76), (142, 82), (150, 80), (159, 57) }, distance is controlled threshold value D=20 rice, position deviation threshold value L=5 rice.
At first generate the sight spot Thiessen polygon, namely the polygon around the sight spot in Fig. 4, can see all only comprising a sight spot in each Thiessen polygon.Its concrete data are sight spot Thiessen polygon set
VoroA={ (1, point1), (2, point2), (3, point3), (4, point4), (5, point5), (6, point6), (7, point7) }, wherein
point1={(36,140),(60,150),(88,130),(68,114),(34,114)};
point2={(16,78),(68,54),(76,80),(68,114),(34,114)};
point3={(60,150),(88,130),(116,118),(142,131),(124,163),(84,162)};
point4={(88,130),(68,114),(76,80),(116,90),(116,118)};
point5={(80,38),(124,40),(136,68),(116,90),(76,80),(68,54)};
point6={(168,86),(172,116),(142,131),(116,118),(116,90),(136,68)};
point7={(182,149),(152,180),(124,163),(142,131),(172,116)};
Plan circuit R and sight spot Thiessen polygon set VoroA according to the user, carry out the candidate and effectively explain the set of paths judgement, obtain the candidate and effectively explain set of paths CSRA.
CSRA={ (1, point1), (2, point2), (3, point3), (4, point4), (5, point5), (6, point6), (7, point7), (5, point8) }, wherein
point1={(43,135),(53,134),(63,131),(73,126)};
point2={(77,117),(89,115),(99,120)};
point3={(103,128),(113,130),(121,129),(125,137),(131,142)};
point4={(141,142),(146,138),(149,134)};
point5={(144,124),(147,116),(139,100),(124,102)};
point6={(113,96),(107,97),(101,95),(100,89)};
point7={(109,80),(118,76)};point8={(113,76),(142,82),(150,80)}。
Coordinate according to the GPS module is obtained calculates the Thiessen polygon at the current place of user.User's current location UP=(42,137) obtains current explanation sight spot CSP={ (1,57,131) after calculating }.
Effectively explain the candidate according to current explanation sight spot CSP and choose the candidate identical with the id of CSP in set of paths CSRA and effectively say solution path, form interim candidate and effectively explain set of paths TCSRA.The id=1 of current explanation sight spot CSP only has a candidate to say that effectively the id of solution path equates with the id of CSP in CSRA, so CSRA={ (1, point
1), point wherein
1={ (43,135), (53,134), (63,131), (73,126) }.
Effectively explain set of paths TCSRA and user's current location UP according to interim candidate, carry out the candidate and effectively say the solution path judgement, obtain the candidate and effectively say solution path CSR.Because CSRA only has a candidate effectively to say solution path, so CSR={ (1, point
1), point wherein
1={ (43,135), (53,134), (63,131), (73,126) }.
Effectively say solution path CSR, distance control threshold value D and current explanation sight spot CSP according to the candidate, carry out and effectively say the solution path judgement, obtain effectively saying solution path VSR.The traversal candidate effectively says solution path CSR, calculates successively wherein coordinate points and the distance of current explanation sight spot CSP, and result is DisA={14, and 5,6,16}(rounds up), all less than distance control threshold value D=20, so effectively say solution path
VSR={(43,135),(53,134),(63,131),(73,126)}。
According to effectively saying solution path VSR, carry out effectively explanation path judgement, obtain effectively explaining path S.Traversal is effectively said solution path VSR, calculates successively coordinate points and user's current location in VSR
UP=(42,137) distance, obtain gathering DisA={2,11,22,33}(rounds up), can judge user's current location and effectively say (43 in solution path VSR by distance relation, 135) the most approaching, and less than position deviation threshold value L, so the method according to the present invention is tried to achieve effective explanation path S=31 rice (rounding up).
The current movement velocity V=0.2 meter per second of the user who utilizes GPS to obtain and effective explanation path S=31 rice carry out the audio guide explanation.Setting according to the guide interpreting word at the current explanation sight spot of the explanation text rule storage that proposes in existing publication application CN102142215A is: "/SI
1TY
1AM
37Here pool, the lowest point deep water is green, and pass ancient times Long Ju, and two peak face-offs are just like Buddhism, and the ancient hole remnants in bank is faint deep, therefore named Longmendong./ SI
2TY
1AM
63Here waterfall natural flow in the past, the woods deep valley is deep and remote, and along with the expansion of mankind's activity scope, the manor of natural kingdom day by day dwindles, and the figure of original ecology is retreated to the remote mountains, so gantry waterfall grand become historical record./ SI
3TY
1AM
29Guests, now the Mount Emei united state list mankind's natural and cultural heritage in and protected./ SI
4TY
1AM
64For we can witness gantry fairy-like beauty in the past again, also for being presented, the Nature intactly gives our descendants to our this Lutao of Mount Emei, and let us consciously adds environmentalist's ranks." wherein, SI represents sid
i, TY represents type
i, AM represents amount
i, the subscript of SI, TY, AM represents the value of this parameter.After carrying out the audio guide explanation process in existing publication application CN102142215A, what obtain treats that explanation guide content is for " pool, the lowest point deep water is green, and pass ancient times Long Ju, and two peak face-offs are just like Buddhism; the ancient hole remnants in bank is faint deep, therefore named Longmendong here.Here waterfall natural flow in the past, the woods deep valley is deep and remote, and along with the expansion of mankind's activity scope, the manor of natural kingdom day by day dwindles, and the figure of original ecology is retreated to the remote mountains, so gantry waterfall grand become historical record.Guests, now the Mount Emei united state list mankind's natural and cultural heritage in and protected." utilize speech synthesis engine to export this explanation content to carry out audio guide explanation.
Process and to report the module embodiment that conflicts between sight spot and crossing:
Accompanying drawing 8 is the workflow exemplary plot in case study on implementation, and POI explains regional R
piComprised the regional R of crossing explanation
ci, wherein the explanation content in POI zone is: " front is stroked water mountain villa, the private villas of bright fresh breeze lattice exactly.Take up an area more than 60 mu, 3048 square metres of floor area of building.Build near water in whole mountain villa, white washed wall black pigment used by women in ancient times to paint their eyebrows watt, and small bridge over the flowing stream, winding corridor is winding, Courtyards So Deep.Recovered Chaoyang pavilion, coupling and ploughed the buildings such as hall, Hua Xinlou, Shan Lou, Ming Fatang, plum garden Xi Tang, autumn waters--limid eyes pavilions, made and stroke water mountain villa eight scapes and reappeared.", the content that the zone is reported at the crossing is: " please turn right in the place ahead "; P
gpsBe the current position coordinates of user; Set in advance or postpone the crossing when reporting information two to report interregional be L apart from threshold values
0=10 meters, system implements as follows:
(1) according to open method two judgement P
gpsThe current present position of coordinate does not belong to the crossing and reports regional R
ci, but belong to the regional R of POI explanation
pi
(2) spatial relation of judgement Rpi and Rci, there is relation of inclusion in both;
(3) judgement 0≤L
pc– L
pi≤ L
0(threshold values: L
0=10 meters) set up, suspend start POI zone explanation (although this moment P
gpsBelong to the regional R of POI explanation
pi), report in advance crossing C
iTurning information, open again POI zone explanation after end, the report content of this moment should be " " please turn right in the place ahead " (turning information in crossing report in advance and finish after); The front is stroked water mountain villa, the private villas of bright fresh breeze lattice exactly.Take up an area more than 60 mu, 3048 square metres of floor area of building.Build near water in whole mountain villa, white washed wall black pigment used by women in ancient times to paint their eyebrows watt, and small bridge over the flowing stream, winding corridor is winding, Courtyards So Deep.Recovered Chaoyang pavilion, coupling and ploughed the buildings such as hall, Hua Xinlou, Shan Lou, Ming Fatang, plum garden Xi Tang, autumn waters--limid eyes pavilions, made and stroke water mountain villa eight scapes and reappeared.”。
(4) this U
iInternal information is reported and is finished;
(5) the rest may be inferred completes the report that whole piece is planned circuit;
Work as R
piWith R
ciSpatial relation as shown in accompanying drawing 6 (a) time, if judge 0≤L
pc– (L
pi+ L
ci)≤L
0Condition set up, the report content of this moment is: " front is stroked water mountain villa, the private villas of bright fresh breeze lattice exactly.Take up an area more than 60 mu, 3048 square metres of floor area of building.Build near water in whole mountain villa, white washed wall black pigment used by women in ancient times to paint their eyebrows watt, and small bridge over the flowing stream, winding corridor is winding, Courtyards So Deep.Recovered Chaoyang pavilion, coupling and ploughed the buildings such as hall, Hua Xinlou, Shan Lou, Ming Fatang, plum garden Xi Tang, autumn waters--limid eyes pavilions, made and stroke water mountain villa eight scapes and is reappeared (end of POI explaining information afterwards); " please turn right in the place ahead " ".
At a U
iThe regional R of interior POI explanation
piReport regional R with the crossing
ciComprise mutually as accompanying drawing 7 (c) (d), and during satisfied conflict treatment conditions, only need suspend in the process in explanation POI zone, insert immediately crossing direction information report and get final product, the report content of this moment is: " front is stroked water mountain villa, the private villas of bright fresh breeze lattice exactly.Take up an area more than 60 mu, 3048 square metres of floor area of building.(the POI explaining information does not finish, and inserts the crossing and reports) " please turn right in the place ahead "; Build near water in whole mountain villa, white washed wall black pigment used by women in ancient times to paint their eyebrows watt, and small bridge over the flowing stream, winding corridor is winding, Courtyards So Deep.Recovered Chaoyang pavilion, coupling and ploughed the buildings such as hall, Hua Xinlou, Shan Lou, Ming Fatang, plum garden Xi Tang, autumn waters--limid eyes pavilions, made and stroke water mountain villa eight scapes and reappeared ".