Embodiment
Below in conjunction with the accompanying drawings, embodiments of the invention are described.
The determination method and device of the positional information for the user that the embodiment of the present application is provided is applied to electronically
The scene positioned on figure to the position of user, the position being particularly suitable for use on the electronic map to user
Pinpoint scene is carried out, electronic map herein can include but is not limited to high moral map, Baidu
Figure, Tengxun's map and Google (Google) map etc..In addition, the electronic map of the application is to install
On mobile terminals, the mobile terminal include but is not limited to mobile phone, removable computer, tablet personal computer,
Personal digital assistant (Personal Digital Assistant, PDA), media player, intelligence electricity
Depending on, intelligent watch, intelligent glasses, Intelligent bracelet etc..
It should also be noted that, the mobile terminal of the application has motion sensor, and e.g., three-axis gyroscope,
Mobile terminal can determine the angle of mobile terminal and preset direction by the motion sensor.Specifically,
Under a kind of mode, motion sensor can monitor the angle of mobile terminal and preset direction in real time;Another
Under a kind of mode or when receiving the direction Location Request of electronic map transmission, it is determined that mobile
The angle of terminal and preset direction, rear send above-mentioned angle to electronic map.In addition, the shifting of the application
Dynamic terminal also has global positioning system (Global Positioning System, GPS), passes through GPS
The positional information of the mobile terminal, e.g., gps coordinate can be obtained.Specifically, GPS is getting movement
After the positional information of terminal, the positional information can be sent to electronic map, so as to electronic map root
According to the positional information, mobile terminal present position on the electronic map is determined;Work as finally according to above-mentioned
Preceding position, it is possible to determine the affiliated road of present position.
Illustrate herein, the position of the mobile terminal of the application is the position of user.
The determination method flow diagram of the positional information for the user that Fig. 1 provides for a kind of embodiment of the application.Institute
The executive agent for stating method can be electronic map, as shown in figure 1, methods described can specifically include:
Step 110, after user's present position is determined on the electronic map, user is read current
Retouch in the description information of the affiliated road in position, direction of the description information including the road of the road
State information.
The description information of road herein includes but is not limited to the length, original position, final position of road
And direction description information etc., wherein, direction description information includes:Direction eastwards, northeastward, to
The north is to, direction northwest, westwards direction, southwestward, direction to the south, southeastern direction etc..
Specifically, when electronic map is activated, the GPS that electronic map can receive mobile terminal is sent
Positional information (e.g., gps coordinate);Afterwards according to the positional information, it is possible to determine user in electricity
Present position on sub- map;Finally according to user's present position on the electronic map, it is possible to
Determine the affiliated road of present position.
After determining the affiliated road of user's present position on the electronic map, it is possible to read the road
The description information on road.In one example, it is above-mentioned directly to determine belonging to user's present position
The title of road, afterwards according to the title of road, reads the description letter of the road from default database
Breath.Default database herein can be set before the embodiment of the present application is performed, and it have recorded
Corresponding relation between the title of road and the description information of road.
The application preferably proposes following the step of setting up default database:
Preset direction (e.g., direction eastwards) can be set on the electronic map, and electronics is successively read afterwards
Every road in map, e.g., reads the title of every road in electronic map, when electronic map is taken up an official post
The angle of one road and preset direction (0 °, 20 °] or (340 °, 360 °] it is interior when, then should
The description information of road is set to direction eastwards;And when electronic map is taken up an official post the folder of a road and preset direction
Angle (20 °, 70 °] it is interior when, then the description information of the road is set to northeastward;And ought be electronically
Figure take up an official post a road and preset direction angle (70 °, 110 °] it is interior when, then the description of the road is believed
Breath is set to direction northwards, the like, direction northwest, westwards direction, southwestward, direction to the south
Corresponding with southeastern direction pre-set interval respectively can for (110 °, 160 °], (160 °, 200 °],
(200 °, 250 °], (250 °, 290 °] and (290 °, 340 °].
Certainly, above-mentioned simply a kind of mode for setting pre-set interval, in actual applications, can also will be upper
State pre-set interval and be set to other interval values, e.g., be respectively set to (0 °, 30 °] (or (330 °,
360 °]), (30 °, 60 °], (60 °, 120 °], (120 °, 150 °], (150 °, 210 °],
(210 °, 240 °], (240 °, 300 °] and (300 °, 330 °], the application is not construed as limiting to this.
For by taking the direction description information that the description information of road only includes road as an example, default database
Can be as shown in table 1.
Table 1
The title of road |
The direction description information of road |
Zhong Guan-cun South Road |
Direction eastwards |
Zhichun Road |
Direction eastwards |
Shuangyushu North Road |
Direction eastwards |
Zhong Guan-cun East Road |
Direction to the south |
As an example it is assumed that user's present position is as shown in Fig. 2 can then determine that user is current
The affiliated road in position is " Shuangyushu North Road ";, can be from table 1 afterwards according to the title of road
The direction description information of the road read is " direction eastwards ".
Step 120, the first direction Location Request of user's input is received, please according to first direction positioning
Ask, obtain the placement direction of the mobile terminal of the user, wherein, the placement direction of the mobile terminal
With the enforcement direction of vehicle on the road into default angle.
It should be noted that after user's present position is determined in the electronic map shown in Fig. 2,
Arrow as shown in Figure 3, the direction of the arrow and the placement direction phase of the mobile terminal of user can be shown
Unanimously.Further, the first prompting frame can also be shown in electronic map as shown in Figure 3, this
The display content of one prompting frame can be used for the placement direction for pointing out user to adjust mobile terminal, so that mobile
The direction of wagon flow is into default angle on the placement direction and road of terminal.Herein, default angle can be with
Including but not limited to 0 degree, 90 degree and 180 degree.It is understood that when the placement side of mobile terminal
To be 0 degree with the travel direction of vehicle on road when, vehicle on the placement direction and road of mobile terminal
Travel direction is consistent;And when the travel direction of vehicle on the placement direction and road of mobile terminal is 180
When spending, the placement direction of mobile terminal is opposite with the travel direction of vehicle on road.
Certainly, in actual applications, the first prompting frame in Fig. 3 can also be shown in its of electronic map
Its position, e.g., top, the left side or the right etc., the application is not construed as limiting to this.
Can also include in the first prompting frame shown in above-mentioned Fig. 3 " it is determined that " button.Specifically, it is above-mentioned
First direction Location Request can be clicked on by user " it is determined that " button triggering.
According to the first direction Location Request in step 120, the mobile terminal for obtaining the user is put
Direction is put, is specifically as follows:
According to the first direction Location Request, second party is sent to the motion sensor of the mobile terminal
To Location Request, the angle of the mobile terminal and preset direction is obtained for the motion sensor;
The mobile terminal of the motion sensor transmission and the angle of preset direction are received, according to described
Angle, obtains the placement direction of the mobile terminal of the user.
Herein, motion sensor obtains mobile terminal and the angle of preset direction belongs to prior art, herein
Do not repeat again.Electronic map is in the mobile terminal for receiving motion sensor transmission and the angle of preset direction
Afterwards, this angle can be matched with pre-set interval, if the match is successful with any pre-set interval,
The placement direction that mobile terminal can then be determined is pre- to this by the opposite direction of the pre-set interval correspondence direction
If interval correspondence direction.
It should be noted that matching refers to that the angle belongs to some pre-set interval.As an example it is assumed that moving
The angle of dynamic terminal and preset direction is 10 °, then the angle and pre-set interval (0 °, 20 °] matching.
Specifically, using preset direction as direction eastwards, pre-set interval is that the pre-set interval in step 110 is
Example for, when above-mentioned angle respectively with pre-set interval:(0 °, 20 °] (or (340 °, 360 °])
(20 °, 70 °], (70 °, 110 °], (110 °, 160 °], (160 °, 200 °], (200 °,
250 °], (250 °, 290 °] and (290 °, 340 °] matching when, it is determined that mobile terminal put
Putting direction is respectively:From west to east, by southwest northeastward, from south to north, by the southeast northwestwards, by east
Westwards, by northeast southwester, by north orientation south and by northwest southeastward.
Certainly, above-mentioned pre-set interval is it can also be provided that other values, the application is not construed as limiting to this.
Step 130, according to the direction description information of the road and the placement direction of the mobile terminal,
Determine particular location of the user on the road.
It is 0 degree in default angle such as previous example, namely in the placement direction and road of mobile terminal
When the direction of upper wagon flow is consistent, step 130 determination process is specifically as follows:
If the direction description information of road is direction eastwards, and the placement direction of mobile terminal is from east to west,
Then particular location of the user on road is the north of road;If the direction description information of road is east
To, and the placement direction of mobile terminal is from west to east, then particular location of the user on road is road
South;Or,
If the direction description information of road is northeastward, and the placement direction of mobile terminal is by North-East Bound
Southwest, then particular location of the user on road is the northwest side of road;If the direction description information of road
For northeastward, and mobile terminal placement direction be by southwest northeastward, then tool of the user on road
Position is set to the southeast side of road;Or,
If the direction description information of road is northwards direction, and mobile terminal placement direction be by north orientation south,
Then particular location of the user on road is the west of the road;If the direction description information of road be to
The north to, and mobile terminal placement direction for from south to north, then particular location of the user on road is
The east of road;Or,
If the direction description information of road is direction northwest, and the placement direction of mobile terminal is by north-westward
The southeast, then particular location of the user on road is the southwestern side of road;If the direction description information of road
For direction northwest, and mobile terminal placement direction be by the southeast northwestwards, then tool of the user on road
Position is set to the northeast side of road;Or,
If the direction description information of road is westwards direction, and the placement direction of mobile terminal is from west to east,
Then particular location of the user on the road is the south of road;If the direction description information of road be to
West to, and mobile terminal placement direction for from east to west, then particular location of the user on road is
The north of road;Or,
If the direction description information of road be southwestward, and mobile terminal placement direction be from southwest to
Northeast, then particular location of the user on road is the southeast side of road;If the direction description information of road
For southwestward, and mobile terminal placement direction be by northeast southwester, then tool of the user on road
Position is set to the northwest side of road;Or,
If the direction description information of road is direction to the south, and mobile terminal placement direction for from south to north,
Then particular location of the user on road is the east of road;If the direction description information of road is south
To, and the placement direction of mobile terminal is that then particular location of the user on road is road by north orientation south
West, or,
If the direction description information of road be southeastern direction, and mobile terminal placement direction be from the southeast to
Northwest, then particular location of the user on road is the northeast side of road;If the direction description information of road
For southeastern direction, and mobile terminal placement direction be by northwest southeastward, then tool of the user on road
Position is set to the southwestern side of road.
Certainly, above-mentioned is specific position of the user on road in the case where default angle is 0 degree
The determination method put.In the case that default angle is 180 degree, 90 degree or other angles, ability
Field technique personnel may be referred to above-mentioned determination method and particular location of the user on road be determined, this
Application is not construed as limiting to this.
It should be noted that the determination method of the positional information of the user of the application is based on the car on road
Traffic rules kept to the right, in the case of other traffic rules, such as some western countries' vehicles are
Keep to the left, then can be by way of adjusting default angle, e.g., can be by 0 in said process
The determination method of the positional information for the user for being adjusted to 180 degree to apply the application is spent, it has no effect on this
The reached effect of application.
Step 140, particular location of the user on the road is exported.
As can by Fig. 4 shown in particular location of the second prompting frame output user on the road.
Such as, the display content of second prompting frame is specifically as follows " you are on the north of ×× road ", and can be with
Present position of the user in electronic map is updated accordingly, e.g., can be by user in electricity
Present position in sub- map updates the north to ×× road.In addition, second shown in Fig. 4 carries
Show that frame can also include " change " button.Specifically, it can be adjust the movement before user has found
During the placement direction mistake of terminal, it can be somebody's turn to do " change " button to redefine user in road by click
Particular location on road.When receiving the clicking operation to " change " button, then equivalent to electronics
Map have received the modification request of user's input;Asked afterwards according to the modification, reacquire described use
The placement direction of the mobile terminal at family;According to the direction description information of the road and the institute of reacquisition
The placement direction of the mobile terminal of user is stated, particular location of the user on the road is redefined
And export.
Herein, reacquire the placement direction of the mobile terminal of user and redefine user on road
The step of particular location, can be found in step 120- steps 130, not repeat again herein.
To sum up, the determination method of the positional information for the user that the application is provided, according to user in electronic map
The placement direction of the direction description information of the upper affiliated road of present position and the mobile terminal of user,
To determine particular location of the user in the road, wherein, vehicle on the placement direction and road of mobile terminal
Enforcement direction into default angle.Namely in the application, user is being navigated to certain on electronic map
After one road, its particular location in the road can also be further determined that, so as to improve electronically
The positioning precision of figure, and then improve the experience of user.
Following embodiments are that the application uses taxi-hailing software applied to user (e.g., excellent step, drop drop are called a taxi)
Example under the scene called a taxi, wherein, user uses mobile terminal, and electronics is provided with the mobile terminal
Map;Carrying taxi is provided with car-mounted terminal, the car-mounted terminal and is also provided with electronic map.Such as Fig. 5
Shown, the embodiment specifically may include steps of:
Step 510, when the first position and the taxi of confirmation carrying for determining user on the electronic map
After the second place, the description information of the affiliated road in first position of user, the description of the road are read
Information includes the direction description information of the road.
Specifically, when the electronic map of mobile terminal is activated, electronic map can receive mobile terminal
GPS send positional information (e.g., gps coordinate);Afterwards according to the positional information, it is possible to it is determined that
Go out the first position of user on the electronic map;Finally according to the first position of user on the electronic map,
It is assured that out the affiliated road in first position.And when carrying taxi order, electronic map can also
Receive the positional information that the car-mounted terminal of carrying taxi is sent, it is possible to determine according to the positional information
The second place of carrying taxi on the electronic map.
In one example, above-mentioned first position and the second place can be as shown in Figure 6.
It is understood that above-mentioned electronic map is the electronic map on the mobile terminal of user;To carrying
Electronic map on taxi, when its is initial, can only show the second place of carrying taxi;And
After order, then the electronic map on carrying taxi can show first position and the second place simultaneously.
After the affiliated road in first position for determining user on the electronic map, it is possible to read the road
Description information.
Step 520, if the distance of the first position and the second place is less than predetermined threshold value, export
Prompt message, wherein, the prompt message is used for the placement side for indicating the mobile terminal of the adjustment user
To so that the enforcement direction of the placement direction of the mobile terminal of the user and vehicle on the road is into pre-
If angle.
Herein, predetermined threshold value can be set based on experience value, such as can be 20m.Specifically, in Fig. 6 institutes
When the first position shown and the distance of the second place are less than 20m, it can show first position in figure 6
Arrow as shown in Figure 3, the direction of the arrow is consistent with the placement direction of the mobile terminal of user.On
Stating prompt message can be shown by the first prompting frame shown in Fig. 3.
Step 530- steps 550 are identical with step 120- steps 140, do not repeat again herein.
It should be noted that after particular location of the user on road is determined, can be carried to confirmation
Car-mounted terminal on the taxi of visitor sends particular location of the user on the road, for updating institute
The first position of the user on the electronic map of car-mounted terminal is stated, is entered so as to the position to user
Row is accurately positioned.
In Fig. 6, during carrying taxi and/or user's movement, the second place of carrying taxi
And/or the first position of user can change, when the first position of user is located at carrying taxi
During the opposite direction of the inceptive direction of the second place, the direction of arrow in Fig. 6 can disappear, to point out user
It is being moved in the opposite direction.
It can be solved in the prior art by the embodiment, when the taxi for confirming carrying meets passenger, by
It can not be accurately known on which side of road in the bad user of sense of direction, and can not be quickly found out user
The problem of.
It should be noted that the electronic map of the application refers to electronic map system, it can include visitor
Family end and service end, client is used for and user interacts, and service end is used to terminate according to from client
The request of receipts or message are handled accordingly, and result is returned into client.Due to this Shen
It please be the improvement made jointly to client and service end, therefore it is not separately illustrated, that is, unify
Illustrate what has done for electronic map.In actual applications, can be according to client and the function pair of service end
Its operation performed is divided.
With the determination method of the positional information of above-mentioned user accordingly, one kind that the embodiment of the present application is also provided
The determining device of the positional information of user, as shown in fig. 7, the device includes:Reading unit 701, acquisition
Unit 702, determining unit 703 and output unit 704.
Reading unit 701, for after user's present position is determined on the electronic map, reading
The description information of the affiliated road of user's present position, the description information of the road includes the road
Direction description information.
Acquiring unit 702, the first direction Location Request for receiving user's input, according to the first party
To Location Request, the placement direction of the mobile terminal of the user is obtained, wherein, the mobile terminal
The enforcement direction of vehicle is into default angle on placement direction and the road.
Wherein, the default angle is included with any of lower angle:0 degree, 90 degree and 180
Degree.
Acquiring unit 702 specifically for:
According to the first direction Location Request, second party is sent to the motion sensor of the mobile terminal
To Location Request, the second direction Location Request is used to indicate that the motion sensor obtains the movement
The angle of terminal and preset direction;
The mobile terminal of the motion sensor transmission and the angle of preset direction are received, according to described
Angle, obtains the placement direction of the mobile terminal of the user.
Determining unit 703, for the road read according to reading unit 701 direction description information with
And the placement direction of the mobile terminal of the acquisition of acquiring unit 702, determine the user in the road
On particular location.
Output unit 704, for exporting tool of the user of the determination of determining unit 703 on the road
Body position.
Alternatively, acquiring unit 702, are additionally operable to receive the modification request of user's input, according to the modification
Request, reacquires the placement direction of the mobile terminal of the user.
Determining unit 703, is additionally operable to according to the direction description information of the road and reacquisition
The placement direction of the mobile terminal of user, redefines particular location of the user on the road simultaneously
Output.
The function of each functional module of the embodiment of the present application device, can pass through each of above method embodiment
Step realizes that therefore, the specific work process for the device that the application is provided herein is not repeated again.
The determining device of the positional information for the user that the embodiment of the present application is provided, reading unit 701 is when in electricity
Determined on sub- map after user's present position, read the affiliated road of user's present position
Description information, the description information of the road includes the direction description information of the road;Acquiring unit 702,
The first direction Location Request of user's input is received, according to the first direction Location Request, obtains described
The placement direction of the mobile terminal of user, wherein, on the placement direction of the mobile terminal and the road
The enforcement direction of vehicle is into default angle;Determining unit 703 is according to the direction description information of the road
And the placement direction of the mobile terminal, determine particular location of the user on the road;It is defeated
Go out unit 704 and export particular location of the user on the road.Thus, it is possible to improve electronically
The positioning precision of figure, and then the experience of user can be lifted.
With the determination method of the positional information of above-mentioned user accordingly, one kind that the embodiment of the present application is also provided
The determining device of the positional information of user, as shown in figure 8, the device includes:Reading unit 801, output
Unit 802, acquiring unit 803 and determining unit 804.
Reading unit 801, for that ought determine the first position of user on the electronic map and confirm carrying
After the second place of taxi, the description information of the affiliated road in first position of user, the road are read
The description information on road includes the direction description information of the road.
Output unit 802, if the distance for the first position and the second place is less than default threshold
Value, then export prompt message, wherein, the prompt message is used for the mobile end for indicating the adjustment user
The placement direction at end, so that the row of the placement direction of the mobile terminal of the user and vehicle on the road
Make direction into default angle.
Acquiring unit 803, the first direction Location Request for receiving user's input, according to the first party
To Location Request, the placement direction of the mobile terminal of the user is obtained.
Determining unit 804, for the road read according to reading unit 801 direction description information with
And the placement direction of the mobile terminal of the acquisition of acquiring unit 803, determine the user in the road
On particular location.
Output unit 805, is additionally operable to export the user of the determination of determining unit 804 on the road
Particular location.
The function of each functional module of the embodiment of the present application device, can pass through each of above method embodiment
Step realizes that therefore, the specific work process for the device that the application is provided herein is not repeated again.
Professional should further appreciate that, be described with reference to the embodiments described herein
The object and algorithm steps of each example, can be come with electronic hardware, computer software or the combination of the two
Realize, in order to clearly demonstrate the interchangeability of hardware and software, in the above description according to function
Generally describe the composition and step of each example.These functions are come with hardware or software mode actually
Perform, depending on the application-specific and design constraint of technical scheme.Professional and technical personnel can be to every
Described function is realized in individual specific application using distinct methods, but it is this realize it is not considered that
Beyond scope of the present application.
The step of method or algorithm for being described with reference to the embodiments described herein, can use hardware, processing
The software module that device is performed, or the two combination are implemented.Software module can be placed in random access memory
(RAM), internal memory, read-only storage (ROM), electrically programmable ROM, electrically erasable ROM,
Any other form well known in register, hard disk, moveable magnetic disc, CD-ROM or technical field
Storage medium in.
Above-described embodiment, purpose, technical scheme and beneficial effect to the application are carried out
Be further described, should be understood that the embodiment that the foregoing is only the application and
, it is not used to limit the protection domain of the application, it is all within spirit herein and principle, done
Any modification, equivalent substitution and improvements etc., should be included within the protection domain of the application.