A kind of position sharing methodTechnical field
The present invention relates to network technique field more particularly to a kind of position sharing methods.
Background technology
With the rapid development of development of Mobile Internet technology, position, which is shared, has been widely used in mobile terminal, utilizes positionThe location information that user terminal can be currently located by sharing is shared with target terminal user so that target terminal user obtains in timeKnow the position that the user terminal is currently located.
Existing position sharing method is mainly:Function menu offer of the first terminal at session interface is shared position and is selected, when the first user wants the position of oneself being shared with second user, then the session interface with second user is recalled, and swashIt is living to share location options, and then first terminal obtains the position of first terminal present position when detecting activation operationCurrent location information is sent to second terminal by information.
In implementing the present invention, it may, inventor has found that existing position sharing method has the following problems:
Since existing position sharing method is substantially according to resistance in other indoor positionings such as GPS positioning system or bluetooth.With GPSFor positioning, when first terminal or second terminal are located at the weaker environment of GPS signal, location information can not be obtained in time, is madeObtaining existing position sharing method, there are more serious delay problems;Also, when same time utilization GPS positioning system carries outWhen the number of users that location information is shared is more, location information amount to obtain is big in the background server of GPS positioning system, can reduceIts processing speed can also make position share generation delay, and then also result in location information and share inaccurate, position and share essenceSpend low, the communication efficiency between reduction user.
Invention content
In view of the above-mentioned problems, a kind of position sharing method of the present invention, can effectively avoid GPS signal weak or existing interiorLocation technology renewal frequency problem and the problem of cause position to share delay, and the precision shared position can be improved, improvedCommunication efficiency between terminal user.
In order to solve the above technical problems, a kind of position sharing method of the present invention, includes the following steps:
Server shares the position sharing information of each user in group according to the first acquisition frequency acquisition position;The position pointIt includes at least two users to enjoy group, and the position sharing information includes user identifier and location information, and the user identifier is used forIndicate that the identity of user, the location information are used to indicate the corresponding terminal location of user;
The server shares each user in group to the position and sends all position sharing informations obtained so thatCatalogue is shared in display on the corresponding mobile terminal of each user;It is described share catalogue be used to indicate it is described share in group respectively usePosition of the corresponding terminal in family on preset electronic map;
When the first user in group is shared in the position to establish position with second user and share link, the server is realWhen obtain first position information and second position information;The first position information is used to indicate the position of first terminal, describedFirst terminal is corresponding with first user;The second position information is used to indicate the position of second terminal, and described second eventuallyEnd is corresponding with the second user;
The server generates the first navigation map and the according to the first position information and the second position informationTwo navigation maps so that the first navigation map described in the first terminal real-time display, described in the second terminal real-time displaySecond navigation map realizes that position is shared;Wherein, first navigation map is used to indicate the first terminal to described secondThe real scene navigation path of terminal, the outdoor scene that second navigation map is used to indicate the second terminal to the first terminal are ledBit path.
As the improvement of said program, share the position of each user in group according to the first acquisition frequency acquisition position in serverFurther include following steps before setting sharing information:
The server obtains frequency according to second and sends poll instruction to preset hybrid location system so that described mixedIt closes multiple positioning systems in positioning system and login authorization message is inquired with preset polling time interval;The login authorizes letterBreath includes user login information and user's initial position message, and described second, which obtains frequency, is less than the first acquisition frequency;
The server is completed user when receiving the login authorization message, according to corresponding user login information and is logged inAnd Primary Location is carried out to user according to corresponding user's initial position message.
As the improvement of said program, the server completes user's login and root according to corresponding user login informationFurther include following steps after carrying out Primary Location to user according to corresponding user's initial position message:
The server is when receiving group's foundation instruction that the corresponding terminal of any login user is sent, according to the groupThe group identification established in instruction establishes the position and shares group;
The server is when receiving group's addition instruction that the corresponding terminal of other login users is sent, described in judgementWhen the group identification that the group identification that group is added in instruction is established with the group in instruction matches, corresponding other login users are increasedIt adds to the position and shares group.
As the improvement of said program, the hybrid location system includes GPS positioning system, WIFI positioning systems, bluetoothPositioning system and inertial navigation positioning system;
Multiple positioning systems in the hybrid location system are inquired with preset polling time interval logs in authorization message,Include the following steps:
Multiple positioning systems are according to GPS positioning system, WIFI positioning systems, bluetooth positioning system in the hybrid location systemThe priority orders united to inertial navigation positioning system inquire login authorization message successively;
When any one in the multiple positioning system inquires the login authorization message, sent out to the serverSend the login authorization message.
As the improvement of said program, first user establishes position with the second user and shares as followsLink:
The first terminal sends position to the server and shares foundation instruction;Share foundation instruction in the positionFirst user identifier and second user mark;
The server is shared the second user established in instruction according to the position and is identified to second terminal forwardingShare foundation instruction in the position so that the second terminal confirmation is established position and shared;
The server is marked when instruction is shared in the confirmation position for receiving the second terminal according to first userKnowledge obtains the first User ID from preset customer data base, and is identified from the preset user according to the second userSecond user ID is obtained in database;
The server establishes first user and described the according to first User ID and the second user IDShare link in position between two users.
As the improvement of said program, the server is given birth to according to the first position information and the second position informationAt the first navigation map, include the following steps:
The server according to the first position information and the second position information, determine it is described it is preset electronicallyGuidance path on figure;
The server obtains the first real scene navigation figure according to the first position information from preset live-action data libraryPiece;The first real scene navigation picture is used to indicate the outdoor scene towards the first terminal;
The server according on preset electronic map described in the first position information real-time update guidance path andThe first real scene navigation picture, and then generate the first navigation map.
As the improvement of said program, the first position information includes the first compass information, first compass informationIt is used to indicate the electronic compass orientation of first terminal;The preset electronic map includes map bearing information;Described first is realScape Navigation Picture includes the first outdoor scene azimuth information;
The server according on preset electronic map described in the first position information real-time update guidance path andFirst real scene navigation picture includes the following steps:
The server believes the first outdoor scene azimuth information and the map orientation according to first compass informationBreath calibrated so that the orientation of the preset electronic map and the first real scene navigation picture with the first terminalElectronic compass azimuth synchro;
The server refreshes the navigation in real time according to the first position information on the preset electronic mapPath and the first real scene navigation picture.
As the improvement of said program, the server is given birth to according to the first position information and the second position informationAt the second navigation map, include the following steps:
The server obtains the second real scene navigation figure according to the second position information from preset live-action data libraryPiece;The second real scene navigation picture is used to indicate the outdoor scene towards the second terminal;
The server according on preset electronic map described in the second position information real-time update guidance path andThe second real scene navigation picture, and then generate the second navigation map.
As the improvement of said program, the second position information includes the second compass information, second compass informationIt is used to indicate the electronic compass orientation of second terminal;The second real scene navigation picture includes the second outdoor scene azimuth information;
The server according on preset electronic map described in the second position information real-time update guidance path andThe second real scene navigation picture, includes the following steps:
The server believes the second outdoor scene azimuth information and the map orientation according to second compass informationBreath calibrated so that the orientation of the preset electronic map and the second real scene navigation picture with the second terminalElectronic compass azimuth synchro;
The server refreshes the navigation in real time according to the second position information on the preset electronic mapPath and the second real scene navigation picture.
Compared with prior art, position sharing method of the invention has the advantages that:
(1) server is not set up in any user during group is shared in position before position shares link, passes through presetOne obtains frequency to obtain the position sharing information that each user in group is shared in position;Server is arbitrary two in group is shared in positionA user establishes the location information for the when of sharing link just obtaining described two users in real time so that the acquisition frequency of location information canIt is adjusted according to different position sharing functions, and then avoids the amount to obtain of location information in the same time big and reduce serviceDevice processing speed can effectively reduce location information and obtain the time delay generated;Meanwhile position sharing method of the invention can also be appliedShare to indoor location, can effectively solve to cause to share position inaccuracy due to Indoor Location Information obtains and frequently generates time delayProblem;
(2) login authorization message is inquired using hybrid location system, information inquiry efficiency and reliable can be effectively improvedProperty, it avoids single positioning system from generating delay problem because signal strength is weak, further increases accuracy and essence that position is sharedDegree;
(3) server generates the first navigation for having real scene navigation path according to first position information and second position informationMap and the second navigation map, the user that can effectively help sense of direction poor complete position navigation, effectively improve terminal userCommunication efficiency,;Also, existing position is shared, main to provide navigation by the way of two dimensional surface map, but this forThe reading graph ability and orientation understandability of user there are certain requirements, and a kind of more vivid specific outdoor scene of present invention offer is ledBoat improves user experience to realize the transformation navigated by navigation by triangulation to reference substance;
(4) refresh guidance path and real scene navigation picture in real time during position is shared, avoid that path offset occurs, carryShare efficiency in high position.
Description of the drawings
Fig. 1 is a kind of flow diagram of position sharing method of the embodiment of the present invention 1.
Fig. 2 is a kind of flow diagram of position sharing method of the embodiment of the present invention 2.
Specific implementation mode
Many details are elaborated in the following description in order to fully understand the present invention.But the present invention can be withMuch implement different from the other modes of this description, those skilled in the art can be without violating the connotation of the present inventionSimilar popularization is done, therefore the present invention is not limited by following public specific embodiment.
Clear, complete description is carried out to technical scheme of the present invention with reference to specific embodiments and the drawings.
Embodiment 1
As shown in Figure 1, being a kind of position sharing method of the embodiment of the present invention 1, include the following steps:
S1, server obtain the position sharing information that each user in group is shared in frequency acquisition position according to preset first;It includes at least two users that group is shared in position, and position sharing information includes user identifier and location information, and user identifier is for referring toShow that the identity of user, location information are used to indicate the corresponding terminal location of user;
S2, server share each user in group to position and send the position sharing information obtained so that each userCatalogue is shared in display on corresponding mobile terminal;Share catalogue and be used to indicate and shares the corresponding terminal of each user in group in default electricityPosition on sub- map;
S3, when position shares the first user in group and establishes position with second user and share link, server obtains in real timeTake first position information and second position information;Wherein, first position information is used to indicate the position of first terminal, first terminalIt is corresponding with the first user;Second position information is used to indicate the position of second terminal, and second terminal is corresponding with second user;
S4, server generate the first navigation map and the second navigation ground according to first position information and second position informationFigure so that the first navigation map of first terminal real-time display, the second navigation map of second terminal real-time display realize position pointIt enjoys;Wherein, the first navigation map is used to indicate first terminal to the real scene navigation path of second terminal, and the second navigation map is used forIndicate second terminal to the real scene navigation path of first terminal.In this embodiment, user of the server in group is shared in positionIt establishes before position shares link, each user terminal only needs display location to share the user identifier of whole users and position in groupConfidence ceases, and carries out position and shares primarily determining for user location in group, thus server can be according to time interval longer firstFrequency is obtained to obtain position sharing information, and then reduces the position sharing information amount that same time server need to obtain, is carriedThe treatment effeciency of high server reduces delay.Server is established in the user during group is shared in position after position shares link, andIt needs to carry out real-time position between one user and second user to share, server then obtains first position information and second in real timeConfidence ceases, and improves the acquisition frequency for location information corresponding to first terminal and second terminal so that position between the twoShare to carry out in real time, while the position shares the other users in group and still obtains position letter using the first acquisition frequencyBreath, can effectively improve the service efficiency of server, improve the acquisition efficiency of location information, further decrease delay.In addition, serviceDevice generates the first navigation map for having real scene navigation path and the second navigation according to first position information and second position informationMap, the user that can effectively help sense of direction poor complete position navigation, effectively improve the communication efficiency of terminal user, improveUser experience.
Further, in step S4, server generates the first navigation ground according to first position information and second position informationFigure, includes the following steps:
S41, server determine the navigation road on preset electronic map according to first position information and second position informationDiameter;
S42, server obtain the first real scene navigation picture according to first position information from preset live-action data library;TheOne real scene navigation picture is used to indicate the outdoor scene towards first terminal, and the first real scene navigation picture is corresponding with first position information;
S43, server are according to the guidance path and the first outdoor scene on the information real-time update preset electronic map of first positionNavigation Picture, and then generate the first navigation map.
Wherein, first position information includes the first compass information, and the first compass information is used to indicate the electronics of first terminalCompass azimuth;Preset electronic map includes map bearing information;First real scene navigation picture includes the first outdoor scene azimuth information;
In step S43, server is according to the guidance path and on the information real-time update preset electronic map of first positionOne real scene navigation picture includes the following steps:
S431, server calibrate the first outdoor scene azimuth information and map bearing information according to the first compass information,So that the orientation of preset electronic map and the first real scene navigation picture with the electronic compass azimuth synchro of first terminal;
S432, server refresh guidance path and first in fact in real time according to first position information on preset electronic mapScape Navigation Picture.
In this embodiment, by carrying out the first outdoor scene azimuth information and map bearing information and the first compass informationReal time calibration so that the side between preset electronic map, the first real scene navigation picture and the electronic compass three of first terminalBit synchronization, so that electronic map and the first real scene navigation picture that first terminal is shown are consistent with the orientation of first terminal,Improve the usage experience of terminal user, improves position and share efficiency, improve the communication efficiency between terminal user.
Further, in step S4, server generates the second navigation ground according to first position information and second position informationFigure, includes the following steps:
S44, server obtain the second real scene navigation picture according to second position information from preset live-action data library;TheTwo real scene navigation pictures are used to indicate the outdoor scene towards second terminal;
S45, server are according to the guidance path and the second outdoor scene on the information real-time update preset electronic map of the second positionNavigation Picture, and then generate the second navigation map.
Wherein, second position information includes the second compass information, and the second compass information is used to indicate the electronics of second terminalCompass azimuth;Second real scene navigation picture includes the second outdoor scene azimuth information;
Specifically, in step S45 server according to leading on the second position information real-time update preset electronic mapBit path and the second real scene navigation picture, include the following steps:
S451, server calibrate the second outdoor scene azimuth information and map bearing information according to the second compass information,So that the orientation of preset electronic map and the second real scene navigation picture with the electronic compass azimuth synchro of second terminal;
S452, server refresh guidance path and second in fact in real time according to second position information on preset electronic mapScape Navigation Picture.
Similarly, in this embodiment, by by the second outdoor scene azimuth information and map bearing information and the second compassInformation carry out real time calibration so that preset electronic map, the second real scene navigation picture and second terminal electronic compass threeBetween azimuth synchro so that the side of electronic map and the second real scene navigation picture and second terminal that second terminal is shownPosition is consistent, improves the usage experience of terminal user, improves position and shares efficiency, improves the communication efficiency between terminal user.
Preferably, in the above-described embodiment, the first real scene navigation figure and the second real scene navigation picture can be VR outdoor scenesNavigation Picture, the present invention is changed into existing by the way of object of reference navigation by the way of navigation by triangulation, for example, existingNavigation by triangulation would generally indicate that " head north ", " being walked toward east " etc., the application then indicate by VR real scene navigation pictures " past in technologyPalm walks ", " toward some referring in particular to being walked at object ", can effectively avoid as a result, because to read Map Ability weaker or square by terminal userIt is poor and can not accurately reach target location to feeling so that position sharing method is simpler and convenient, improves the use of userExperience.
Embodiment 2
As shown in Fig. 2, being a kind of position sharing method of the embodiment of the present invention 2, this method is in addition to including in embodiment 1Except Overall Steps, server according to the first acquisition frequency acquisition position share each user in group position sharing information itBefore, further include following steps:
S10, server obtain frequency according to second and send poll instruction to preset hybrid location system so that mixing is fixedMultiple positioning systems in the system of position are inquired with preset polling time interval logs in authorization message;It includes using to log in authorization messageFamily log-on message and user's initial position message, second, which obtains frequency, is less than the first acquisition frequency;
Wherein, hybrid location system includes GPS positioning system, WIFI positioning systems, bluetooth positioning system and inertial navigationPositioning system;Hybrid location system is communicatively coupled with server;
In step S10, multiple positioning systems in hybrid location system are logged in the inquiry of preset polling time interval awardsInformation is weighed, specially:
In S101, hybrid location system multiple positioning systems with preset polling time interval according to GPS positioning system,WIFI positioning systems, the priority orders of bluetooth positioning system to inertial navigation positioning system are inquired successively logs in authorization message;
S102, any one in multiple positioning systems inquire when logging in authorization message, send and log in serverAuthorization message.
S11, server receive log in authorization message when, according to corresponding user login information complete user log in andPrimary Location is carried out to user according to corresponding user's initial position message;
S12, server are established when receiving group's foundation instruction that the corresponding terminal of any login user is sent according to groupGroup identification in instruction establishes position and shares group;
Wherein, in step S12, the first user establishes position with second user and shares link as follows:
S121, first terminal send position to the server and share foundation instruction;It includes that foundation instruction is shared in positionOne user identifier and second user mark;
S122, server are shared the second user established in instruction according to the position and are identified to second terminal forwarding positionShare foundation instruction so that second terminal confirmation is established position and shared;
S123, server are when instruction is shared in the confirmation position for receiving second terminal, according to the first user identifier from pre-If customer data base in obtain the first User ID, and the is obtained from preset customer data base according to second user markTwo User ID;
S124, server establish the position between the first user and second user according to the first User ID and second user IDIt sets and shares link.
S13, server add when receiving group's addition instruction that the corresponding terminal of other login users is sent in judgement groupWhen entering the group identification that group identification and group in instruction establish in instruction and matching, corresponding other login users are increased into positionShare group.
In this embodiment, server obtains frequency to mixing before login user is not logged in server with secondPositioning system, which obtains, logs in authorization message, since second obtains frequency less than the first acquisition frequency, can further decrease listThe obtained information quantity of position time server, promotes the process performance of server;Furthermore it is adopted in position sharing method of the inventionLogin authorization message is inquired with hybrid location system so that is stepped on when any one positioning system in hybrid location system inquiresWhen recording authorization message, the Relocation Authorization information can be all sent to server, single positioning system is avoided to be produced because signal strength is weakRaw delay problem.
In conclusion compared with prior art, position sharing method of the invention has the advantages that:
(1) server is not set up in any user during group is shared in position before position shares link, passes through presetOne obtains frequency to obtain the position sharing information that each user in group is shared in position;Server is arbitrary two in group is shared in positionA user establishes the location information for the when of sharing link just obtaining described two users in real time so that the acquisition frequency of location information canIt is adjusted according to different position sharing functions, and then avoids the amount to obtain of location information in the same time big and reduce serviceDevice processing speed can effectively reduce location information and obtain the time delay generated;Meanwhile position sharing method of the invention can also be appliedShare to indoor location, moreover it is possible to effectively solve to cause to share position inaccuracy due to Indoor Location Information obtains and frequently generates time delayThe problem of;
(2) login authorization message is inquired using hybrid location system, information inquiry efficiency and reliable can be effectively improvedProperty, it avoids single positioning system from generating delay problem because signal strength is weak, further increases accuracy and essence that position is sharedDegree;
(3) server generates the first navigation for having real scene navigation path according to first position information and second position informationMap and the second navigation map, the user that can effectively help sense of direction poor complete position navigation, effectively improve terminal userCommunication efficiency, improve user experience;Also, existing position is shared, and is mainly carried by the way of two dimensional surface mapFor navigation, but this there are certain requirements the reading graph ability and orientation understandability of user, and the present invention provides one kind moreThe specific real scene navigation of image improves user experience to realize the transformation navigated by navigation by triangulation to reference substance;
(4) refresh guidance path and real scene navigation picture in real time during position is shared, avoid that path offset occurs, carryShare efficiency in high position.
The above described is only a preferred embodiment of the present invention, limitation in any form not is done to the present invention, thereforeAll contents without departing from technical solution of the present invention, it is made to the above embodiment according to the technical essence of the invention any simply to repairChange, equivalent variations and modification, in the range of still falling within technical solution of the present invention.