CN103491502B - A kind of sending method of location information, device and mobile terminal - Google Patents
A kind of sending method of location information, device and mobile terminal Download PDFInfo
- Publication number
- CN103491502B CN103491502B CN201310444426.1A CN201310444426A CN103491502B CN 103491502 B CN103491502 B CN 103491502B CN 201310444426 A CN201310444426 A CN 201310444426A CN 103491502 B CN103491502 B CN 103491502B
- Authority
- CN
- China
- Prior art keywords
- location information
- mobile terminal
- current state
- terminal
- presence message
- 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.)
- Expired - Fee Related
Links
Abstract
The present invention is suitable for field of communication technology, provides a kind of sending method of location information, device and mobile terminal, the method includes:The location information that first movement terminal is sent according to the second mobile terminal subscribes to request and establishes state subscription mechanism with second mobile terminal;The first movement terminal intercepts the Presence message that the second terminal is sent;When it is to reach the standard grade data packet to detect the Presence message, then the first movement terminal obtains the location information of oneself, and the location information is inserted into the Presence status messages of transmission of the first movement terminal, generates new Presence message;The first movement terminal sends the new Presence message to the second terminal.The present invention realizes sharing for location information between mobile terminal.
Description
Technical field
The invention belongs to a kind of field of communication technology more particularly to sending method of location information, device and mobile terminals.
Background technology
Currently, various mobile terminals all have been provided with global positioning system substantially(Global Positioning
System, GPS), GIS-Geographic Information System(Geographic Information System,GIS), the work(of drawing electronic map
Can, however these functions can only obtain the geographical location information of mobile terminal user itself, it can not be well by the geography of oneself
Position information share gives other people.
Existing technology, it is most to send in a manner of short message etc., send the geographical location information of mobile terminal itself to other
Mobile terminal user, to realize the shared of geographical location information.However, such method has certain limitation, need to send
After square mobile terminal user actively sends short message inquiry counterpart mobile terminal user, counterpart mobile terminal user hair can be just received
That send includes the short message of geographical location information, and inconvenient to use, user experience is very poor.
Invention content
An embodiment of the present invention provides a kind of sending method of geographical location information, device and mobile terminals, it is intended to solve
The prior art realize geographical location information between mobile terminal it is shared when, the problem of poor user experience.
On the one hand, a kind of sending method of location information is provided, the method includes:
First movement terminal subscribes to request and second mobile terminal according to the location information that the second mobile terminal is sent
Establish state subscription mechanism;
The first movement terminal intercepts the Presence message that the second terminal is sent;
When it is to reach the standard grade data packet to detect the Presence message, then the first movement terminal obtains the position of oneself
Confidence ceases, and the location information is inserted into the Presence status messages of transmission of the first movement terminal, generates new
Presence message;
The first movement terminal sends the new Presence message to the second terminal.
Further, before the first movement terminal sends the new Presence message to the second terminal
Or later, further include:
The first movement terminal sends canceling location information and subscribes to request to the second mobile terminal, cancels described second and moves
The Presence states of dynamic terminal-pair oneself are checked.
Further, the first movement terminal send the new Presence message to the second terminal it
Afterwards, further include:
The first movement terminal monitors the current location information of oneself by GPS in real time, occurs in current location information
When change, Presence message new described in the updating location information after the change immediately, and will be updated described new
Presence message be sent to the second mobile terminal.
Further, the value of the type fields in the Presence message that the first movement terminal extraction is intercepted, such as
The value of fruit type is available, then it represents that the Presence message intercepted is data packet of reaching the standard grade.
On the other hand, a kind of sending device of location information is provided, described device includes:
Subscribing mechanism establishes unit, and the location information for being sent according to the second mobile terminal subscribes to request and described second
Mobile terminal establishes state subscription mechanism;
Message block unit, the Presence message sent for intercepting the second terminal;
New information generation unit, for when it is to reach the standard grade data packet to detect the Presence message, then obtaining oneself
Location information, and by the location information be inserted into oneself transmission Presence status messages in, generate new Presence
Message;
First new information transmission unit, for sending the new Presence message to the second terminal.
Further, described device further includes:
It subscribes to and cancels unit, subscribe to request to the second mobile terminal for sending canceling location information, cancel described second
Mobile terminal is checked to the Presence states of oneself.
Further, described device further includes:
Second new information transmission unit, for monitoring the current location information of oneself in real time by GPS, in present bit confidence
Breath is when changing, immediately Presence message new described in the updating location information after the change, and will be updated
The new Presence message is sent to the second mobile terminal.
Further, described device further includes:
Type of message judging unit, the value for extracting the type fields in the Presence message intercepted, if
The value of type is available, then it represents that the Presence message intercepted is data packet of reaching the standard grade.
In another aspect, providing a kind of mobile terminal, the mobile terminal includes the transmission dress of location information as described above
It sets.
After establishing state subscription mechanism between the embodiment of the present invention, first movement terminal and the second mobile terminal, when
The Presence of two mobile terminals is that first movement terminal is i.e. transmittable to be added to itself current location information when reaching the standard grade
Presence message is to the second mobile terminal so that the second mobile terminal user can see the position residing for first movement terminal
It sets, realizes sharing for first movement terminal positional information, in addition, can be provided using Presence message transmissions location information
Best safety.
Description of the drawings
Fig. 1 is the implementation flow chart of the sending method for the location information that the embodiment of the present invention one provides;
Fig. 2 is the implementation flow chart of the sending method of location information provided by Embodiment 2 of the present invention;
Fig. 3 is the structure diagram of the sending device for the location information that the embodiment of the present invention three provides;
Fig. 4 is the structure diagram of the sending device for the location information that the embodiment of the present invention four provides.
Specific implementation mode
In order to make the purpose , technical scheme and advantage of the present invention be clearer, with reference to the accompanying drawings and embodiments, right
The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and
It is not used in the restriction present invention.
In embodiments of the present invention, after state subscription mechanism being established between first movement terminal and the second mobile terminal, when
The Presence of second mobile terminal(Current state)When to reach the standard grade, first movement terminal is i.e. transmittable to be added to itself present bit
The Presence message of confidence breath is to the second mobile terminal so that the second mobile terminal user can see first movement terminal institute
The position at place.
The realization of the present invention is described in detail below in conjunction with specific embodiment:
Embodiment one
Scalable message with there are agreement (Extensible Messageing and Presence Protocol,
XMPP):It is a kind of agreement based on XML, it inherits flexible expansionary in XML environment.XMPP after extension
The demand of user can be handled by sending the information of extension.The embodiment of the present invention utilizes XMPP technologies, makes based on XMPP visitors
The Presence message including self geographical position information can be sent between the end of family mutually to other side, realizes and is based on XMPP client
Geographical location information between end is shared.
Fig. 1 shows the implementation process of the sending method for the location information that the embodiment of the present invention one provides, and details are as follows:
In step S101, location information that first movement terminal is sent according to the second mobile terminal subscribe to request with it is described
Second mobile terminal establishes state subscription mechanism.
In the embodiment of the present invention, the APP based on XMPP protocol is installed(Application program)The second mobile terminal to installation
There is the APP based on XMPP protocol(Application program)First movement terminal send location information subscribe to request, it is desirable that check first
The Presence states of mobile terminal, subscription request can be a Presence message.First movement terminal receives this
After location information subscribes to request, if agreeing to that the second mobile terminal checks that the variation of its Presence state, response second move
Its Presence status modifier is to agree to subscribe to scribled by the subscription request of dynamic terminal(Agree to that the second mobile terminal is subscribed to
The Presence states of oneself), while it sending and subscribing to successful response Presence message to the second mobile terminal, at this moment first
Any variation of the Presence states of mobile terminal can be received by the second mobile terminal, include the position of first movement terminal
Confidence ceases.
It, can be with after second mobile terminal receives the successful response Presence message of subscription of first movement terminal transmission
Also agree to that first movement terminal checks the variation of its Presence state(First movement terminal is added to good friend).Second movement
After first movement terminal can be added to the good friend of oneself by terminal, while being available by its Presence status modifier(On
Line)Available data packets of reaching the standard grade then can be transmitted to first movement terminal in state.
It is worth noting that first terminal and second terminal established here is two-way connection, i.e. first terminal is to the
After two terminals send agreement subscription scribled message, it can give tacit consent to and establish two-way connection, i.e. first terminal and second terminal
Mutually share respective positions;Unidirectional connection can certainly be established, the agreement subscription scribled is only unidirectional effective,
Share to requesting party the position of only answer party.
In step s 102, the first movement terminal intercepts the Presence message that the second terminal is sent, and works as inspection
It is when reaching the standard grade available data packets to measure the Presence message, then the first movement terminal obtains the position of oneself
Information, and the location information is inserted into the Presence status messages that the first movement terminal is sent, it generates new
Presence message.
In the embodiment of the present invention, first movement terminal intercepts Presence message, when detecting the Presence intercepted
Message is to obtain the location information oneself being presently in, and the location information is inserted from when reaching the standard grade available data packets
In oneself Presence states, new Presence message is generated.
Specifically, the value of the type fields in the Presence message that the extraction of first movement terminal is intercepted, if type
Value be available, then it represents that the Presence message intercepted is available data packets of reaching the standard grade.
Specifically, location information is inserted into Presence message by way of being inserted into XML node, the knowledge of location information
Its uniqueness is not determined by XML element title and NameSpace, one or more personal information can be extended by this way.
Extended mode is exemplified below:<presence from=clientA@openfire.com to=client@
openfire.com type=“available”>Indicate that the Presence status sections of Presence message, tsp nodes are
The expansion of Presence states, tsp child nodes are extension information, and each information that extends is a child node, as follows,
Longitude and latitude is respectively two child nodes of tsp nodes, indicates longitude and latitude information respectively.
In step s 103, the first movement terminal sends the new Presence message to the second terminal.
In the embodiment of the present invention, the new Presence message of generation is sent to the second movement end by first movement terminal
End, the second mobile terminal receive new Presence message, that is, are added to the location information of first movement terminal
After Presence message, the accurate location information of first movement terminal can be checked using the user of the second mobile terminal.
The present embodiment, after state subscription mechanism is established between first movement terminal and the second mobile terminal, when the second movement
The Presence of terminal is when reaching the standard grade, and first movement terminal is that the transmittable Presence for being added to itself current location information disappears
Breath is to the second mobile terminal so that the second mobile terminal user can see the location of first movement terminal, realize the
One location information of mobile terminal is shared, in addition, can provide best safety using Presence message transmissions location information
Property.
One of ordinary skill in the art will appreciate that all or part of step in realization the various embodiments described above method is can
It is completed with instructing relevant hardware by program, corresponding program can be stored in a computer read/write memory medium
In, the storage medium, such as ROM/RAM, disk or CD.
Embodiment two
Fig. 2 shows the implementation processes of the sending method of location information provided by Embodiment 2 of the present invention, and details are as follows:
In step s 201, the location information that first movement terminal is sent according to the second mobile terminal subscribe to request with it is described
Second mobile terminal establishes state subscription mechanism.
In step S202, the first movement terminal intercepts the Presence message that the second terminal is sent, and works as inspection
It is when reaching the standard grade available data packets to measure the Presence message, then the first movement terminal obtains described first and moves
The location information of dynamic terminal, and the location information is inserted into the Presence status messages that the first movement terminal is sent
In, generate new Presence message.
In step S203, the first movement terminal sends the new Presence message to the second terminal.
As a preferred embodiment of the present invention, in the new Presence message that forwarding step S202 is generated to second
After mobile terminal, first movement terminal can also monitor the current location information of oneself in real time by GPS, in current location information
When changing, new Presence message with the updating location information after the change immediately, and this is new by updated
Presence message is sent to the second mobile terminal, can ensure the real-time of the location information for being shared with the second mobile terminal in this way
Property and accuracy.
In step S204, the first movement terminal sends canceling location information subscription and asks to the second mobile terminal,
Cancel second mobile terminal checking to the Presence states of oneself.
In embodiments of the present invention, know the Presence of oneself when first movement terminal is no longer desire to the second mobile terminal
When state, canceling location information can be sent and subscribe to request to the second mobile terminal, which, which subscribes to request, is
Presence states are to unsubscribe the Presence message of unscrible, can cancel the second mobile terminal to oneself
The subscription of Presence states, after unsubscribing, the second mobile terminal can not then receive the location information of first movement terminal.
It should be noted that step S204 can be executed before step S203, can also be executed after step S203.
The present embodiment, the management quit the subscription of by Presence message subscribings are effective to ensure that individual privacy information safety
Property.The change that location message is monitored by GPS, the position when location information changes in real-time update Presence message
Set carefulness, it is ensured that be shared with the real-time and accuracy of the location information of the second mobile terminal, improve user experience.
Embodiment three
Fig. 3 shows the concrete structure block diagram of the sending device for the location information that the embodiment of the present invention three provides, in order to just
In explanation, illustrate only and the relevant part of the embodiment of the present invention.The device 3 can be the software list being built in mobile terminal
The unit of member, hardware cell or software and hardware combining, the device 3 include:Subscribing mechanism establishes unit 31, message block unit
32, new information generation unit 33 and the first new information transmission unit 34.
Subscribing mechanism establishes unit 31, and the location information for being sent according to the second mobile terminal subscribes to request and described the
Two mobile terminals establish state subscription mechanism;
Message block unit 32, the Presence message sent for intercepting the second terminal;
New information generation unit 33, for when it is to reach the standard grade data packet to detect the Presence message, being then obtained from
Oneself location information, and the location information is inserted into the Presence status messages of oneself transmission, it generates new
Presence message;
First new information transmission unit 34, for sending the new Presence message to the second terminal.
Further, described device 3 further includes:
Type of message judging unit, the value for extracting the type fields in the Presence message intercepted, if
The value of type is available, then it represents that the Presence message intercepted is data packet of reaching the standard grade.
The sending device of location information provided in an embodiment of the present invention can be applied in aforementioned corresponding embodiment of the method one
In, details are referring to the description of above-described embodiment one, and details are not described herein.
Example IV
Fig. 4 shows the concrete structure block diagram of the sending device for the location information that the embodiment of the present invention four provides, in order to just
In explanation, illustrate only and the relevant part of the embodiment of the present invention.The device 4 can be the software list being built in mobile terminal
The unit of member, hardware cell or software and hardware combining, the device 4 including the subscribing mechanism in embodiment three in addition to establishing unit
31, message block unit 32, new information generation unit 33 and the first new information transmission unit 34 further include subscribing to cancel unit
41。
Wherein, it subscribes to and cancels unit 41, subscribe to request to the second mobile terminal for sending canceling location information, cancel institute
State the second mobile terminal checking to the Presence states of oneself.
In addition, as a preferred embodiment of the present invention, described device 4 further includes:
Second new information transmission unit, for monitoring the current location information of oneself in real time by GPS, in present bit confidence
Breath is when changing, immediately Presence message new described in the updating location information after the change, and will be updated
The new Presence message is sent to the second mobile terminal.
The sending device of location information provided in an embodiment of the present invention can be applied in aforementioned corresponding embodiment of the method two
In, details are referring to the description of above-described embodiment two, and details are not described herein.
It is worth noting that, in above system embodiment, included each unit is only drawn according to function logic
Point, but it is not limited to above-mentioned division, as long as corresponding function can be realized;In addition, each functional unit is specific
Title is also only to facilitate mutually distinguish, the protection domain being not intended to restrict the invention.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all essences in the present invention
All any modification, equivalent and improvement etc., should all be included in the protection scope of the present invention made by within refreshing and principle.
Claims (9)
1. a kind of sending method of location information, which is characterized in that the method includes:
First movement terminal is subscribed to request according to the location information that the second mobile terminal is sent and is established with second mobile terminal
State subscription mechanism;
The first movement terminal intercepts the current state Presence message that second mobile terminal is sent;
When it is to reach the standard grade data packet to detect the current state Presence message, then the first movement terminal obtains oneself
Location information, and the current state Presence states that the location information is inserted into the transmission of the first movement terminal disappear
In breath, new current state Presence message is generated;
The first movement terminal sends the new current state Presence message to second mobile terminal.
2. the method as described in claim 1, which is characterized in that send the new current state in the first movement terminal
Before or after Presence message to second mobile terminal, further include:
The first movement terminal sends canceling location information and subscribes to request to the second mobile terminal, cancels second movement eventually
Hold checking to the current state Presence states of oneself.
3. the method as described in claim 1, which is characterized in that send the new current state in the first movement terminal
After Presence message to second mobile terminal, further include:
The first movement terminal monitors the current location information of oneself by GPS in real time, is changed in current location information
When, current state Presence message new described in the updating location information after the change immediately, and by updated institute
It states new current state Presence message and is sent to the second mobile terminal.
4. the method as described in claim 1, which is characterized in that the first movement terminal extracts the current state intercepted
The value of type fields in Presence message, if the value of type is available, then it represents that the current state intercepted
Presence message is data packet of reaching the standard grade.
5. a kind of sending device of location information, which is characterized in that described device includes:
Subscribing mechanism establishes unit, and the location information for being sent according to the second mobile terminal is subscribed to request and moved with described second
Terminal establishes state subscription mechanism;
Message block unit, the current state Presence message sent for intercepting second mobile terminal;
New information generation unit, for when it is to reach the standard grade data packet to detect the current state Presence message, then obtaining
The location information of oneself, and the location information is inserted into the current state Presence status messages of oneself transmission, it generates
New current state Presence message;
First new information transmission unit, it is whole to second movement for sending the new current state Presence message
End.
6. device as claimed in claim 5, which is characterized in that described device further includes:
It subscribes to and cancels unit, subscribe to request to the second mobile terminal for sending canceling location information, cancel second movement
The current state Presence states of terminal-pair oneself are checked.
7. device as claimed in claim 5, which is characterized in that described device further includes:
Second new information transmission unit is sent out for monitoring the current location information of oneself in real time by GPS in current location information
When changing more, current state Presence message new described in the updating location information after the change immediately, and will update
The new current state Presence message afterwards is sent to the second mobile terminal.
8. device as claimed in claim 5, which is characterized in that described device further includes:
Type of message judging unit, the value for extracting the type fields in the current state Presence message intercepted, such as
The value of fruit type is available, then it represents that the current state Presence message intercepted is data packet of reaching the standard grade.
9. a kind of mobile terminal, which is characterized in that the mobile terminal includes such as claim 5 to 8 any one of them position
The sending device of information.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310444426.1A CN103491502B (en) | 2013-09-23 | 2013-09-23 | A kind of sending method of location information, device and mobile terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310444426.1A CN103491502B (en) | 2013-09-23 | 2013-09-23 | A kind of sending method of location information, device and mobile terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103491502A CN103491502A (en) | 2014-01-01 |
CN103491502B true CN103491502B (en) | 2018-09-28 |
Family
ID=49831397
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310444426.1A Expired - Fee Related CN103491502B (en) | 2013-09-23 | 2013-09-23 | A kind of sending method of location information, device and mobile terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103491502B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11589188B1 (en) | 2021-05-27 | 2023-02-21 | T-Mobile Usa, Inc. | Device-based timely emergency call routing |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101051922A (en) * | 2007-04-06 | 2007-10-10 | 中国科学院计算技术研究所 | Subscribing, publishing and updating method for existing information |
CN102404685A (en) * | 2011-11-08 | 2012-04-04 | 惠州Tcl移动通信有限公司 | Sending method and sharing method of location information and mobile communication terminal |
CN102439872A (en) * | 2011-06-30 | 2012-05-02 | 华为终端有限公司 | Position information sharing method, positioning apparatus and system |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8126903B2 (en) * | 2009-12-21 | 2012-02-28 | Sap Ag | Computer implemented method for allocating drivers and passengers sharing a trip |
-
2013
- 2013-09-23 CN CN201310444426.1A patent/CN103491502B/en not_active Expired - Fee Related
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101051922A (en) * | 2007-04-06 | 2007-10-10 | 中国科学院计算技术研究所 | Subscribing, publishing and updating method for existing information |
CN102439872A (en) * | 2011-06-30 | 2012-05-02 | 华为终端有限公司 | Position information sharing method, positioning apparatus and system |
CN102404685A (en) * | 2011-11-08 | 2012-04-04 | 惠州Tcl移动通信有限公司 | Sending method and sharing method of location information and mobile communication terminal |
Non-Patent Citations (1)
Title |
---|
Extensible Messaging and Presence Protocol (XMPP):Instant Messaging and Presence;Internet Engineering Task Force;《Extensible Messaging and Presence Protocol (XPMM):Instant Messaging and Presence》;20110331;第30-69页 * |
Also Published As
Publication number | Publication date |
---|---|
CN103491502A (en) | 2014-01-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10412053B2 (en) | Service layer device location management and privacy control | |
TWI459841B (en) | Mobile station positioning assistance with local mapping data | |
US8655960B2 (en) | Location-aware instant messaging | |
US20150350140A1 (en) | Live Location Sharing | |
JP6412122B2 (en) | Service scope management system and method | |
JP2016157440A (en) | Mobile ad hoc networking | |
US20180058859A1 (en) | Generating maps of private spaces using mobile computing device sensors | |
JP2017516213A (en) | Search engine optimization for resource directories | |
JP6944950B2 (en) | Coordination service for groups of Internet of Things (IoT) devices | |
CN105659565B (en) | Enhanced M2M content management based on interests | |
JP2018528507A (en) | Method and system for installing an application version via near field communication | |
JP2021081434A (en) | Progressive global positioning system and progressive global positioning method | |
Li et al. | A measurement study on device-to-device communication technologies for IIoT | |
CN103491502B (en) | A kind of sending method of location information, device and mobile terminal | |
US10111082B1 (en) | Relating time-to-live information with location data | |
Vahidnia et al. | Cellular Internet of Things for practitioners | |
Gu et al. | Location aware mobile cooperation-design and system | |
Onishi et al. | Efficient data collection for participatory sensing using smartphones | |
Brambilla et al. | An open Web application framework for peer‐to‐peer location‐based services | |
Daradkeh et al. | Network proximity and physical web | |
Garcia | Ramble: opportunistic content dissemination for infrastructure-deprived environments | |
Nikam et al. | Resource management new system architecture | |
Fisher et al. | MQTTg: An Android Implementation | |
RU2676881C2 (en) | Peer-to-peer device movement communications | |
Dungen et al. | Hyperlocal Context to Facilitate an Internet of Things Understanding of the World |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20180928 |