Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiment.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
Refer to Fig. 1, it is the schematic flow sheet of a kind of geographic location notification method of the embodiment of the present invention, the described method of the embodiment of the present invention can be applicable in the system of more existing location-based services, particularly be applied in the various public platforms based on instant messaging application, described method can be by realizing for the server that obtains user terminal location, concrete, described method comprises:
S101: server detects that user terminal opens behind the session interface with target account, judges whether described target account can provide the information service based on geographical position.
If the information service based on geographical position can be provided, carry out following S102, otherwise, finish.
In the public platform based on instant messaging application, corresponding instant communication client application is installed in user terminal, when user need to be that target account is while communicating by letter with some public's accounts, first user can open in instant communication client application the session interface with this target account, can be with reference to shown in figure 2 with the session interface of target account, public's account and the corresponding session interface of " music " by name described in Fig. 2.When user opens behind the session interface with target account, user terminal can be opened reporting events to server by this session, learns that user terminal opened and the session interface of target account so that described server can detect.
The open event of server based on this user terminal determined after target account, can judge whether this target account can provide the information service based on geographical position according to the log-on message of this target account.A kind of simple implementation is: in the time that server determines that according to the log-on message of target account this target account is the account of the types such as individual account or news category, determine that user corresponding to this target account carries out location-based extension service for not needing, judge that this target account is as the information service that cannot provide based on geographical position.And if described target account is while being the account of the types such as food and drink class, GT grand touring, show that user corresponding to this target account wishes to know user's position so that while sending food and drink, tourism message to these users, determine that this target account is for providing the information service based on geographical position.
Or, server is that the account function mapping table based on preset judges whether described target account can provide the information service based on geographical position, described account function mapping table is that server is preset, each account is in the time of the application stage, whether can fill in need to be based on geographical position data processing, if yes time, server records this account and this target account is recorded as to the information service that can provide based on geographical position in described account function mapping table, as is recorded as " 1 ".Described account function mapping table can operate in real time or periodically update according to the renewal of target account, for example the user of target account by self be revised as not need to be based on geographical position data processing time, on described account function mapping table, can delete this target account, or be the mark that does not need to carry out the information service based on geographical position by information recording corresponding this target account, as be recorded as " 0 ".
S102: if the information service based on geographical position can be provided, obtain the positional information for identifying this user terminal geographical position from described user terminal.Concrete, can from described user terminal, obtain any or multiple conduct in IP address information, base station location information, latitude and longitude information for identifying the positional information in geographical position of this user terminal.
S103: according to the geographical position of determining described user terminal for identifying the positional information in this user terminal geographical position obtaining, and push the geographical position of described user terminal to described target account.
Can provide the information service based on geographical position if judge described target account in S101, to the positional information of obtaining the geographical position for identifying this user terminal in described user terminal.
Described S102 can obtain the IP address of this user terminal, using IP address as the positional information for identifying this user terminal geographical position; In described S103, determine the regional location under described user terminal according to the regional location under IP address.For example, according to existing IP address location system, can determine that IP address is positioned at so-and-so street or Mou building, city, now described S103 can be using street corresponding IP address or building as the geographical position of described user terminal, and push the geographical position of described user terminal to described target account.
Or: described S102 can trigger this user terminal is carried out to architecture, obtains latitude and longitude coordinates, using latitude and longitude coordinates as the positional information for identifying this user terminal geographical position; Or trigger this user terminal and open GPS function to obtain latitude and longitude coordinates (being geographical coordinate), using latitude and longitude coordinates as the positional information for identifying this user terminal geographical position.In S103, can directly latitude and longitude coordinates be sent to described target account.Can certainly, in conjunction with electronic chart, latitude and longitude coordinates be corresponded to the positions such as electronic chart Zhong street or building, then street or building are pushed to described target account.
The geographical position of user terminal is being pushed to after the user of target account, the user of target account just can, according to the position of this user terminal, send some by server to this user terminal and promote message.Public's accounting number users of such as GT grand touring can send near tourist attractions information this geographical position, admission ticket information, quotation for a travel information etc. to the user in a certain geographical position.
The embodiment of the present invention can be opened behind the session interface that has entered respective objects account user, can identify judgement to this target account, so that obtain selectively the positional information of this user terminal and send to user corresponding to target account from user terminal, can effectively reduce and even avoid obtaining of useless positional information, some unnecessary processing resource overheads are avoided, the processing resource of having saved server.
Refer to again Fig. 3, it is the schematic flow sheet of the another kind of geographic location notification method of the embodiment of the present invention, the described method of the embodiment of the present invention can be applicable in the system of more existing location-based services, particularly be applied in the various public platforms based on instant messaging application, described method can be by realizing for the server that obtains user terminal location, concrete, described method comprises:
S201: server detects that user terminal opens behind the session interface with target account, judges whether described target account can provide the information service based on geographical position;
In the time that described S201 is judged as YES, carry out following S202, in the time that described S201 judges described target account the information service based on geographical position cannot be provided, finish, this target account and user terminal are not made to any data acquisition about geographical position and process with pushing.
And the specific implementation that described S201 completes judgement is identical with the S101 in above-described embodiment, is not repeated herein.
S202: if the information service based on geographical position can be provided, judge whether described user terminal is set to by the authorization flag that sends the positional information in the geographical position for identifying this user terminal to described target account the transmission state of authorizing.
That is to say in embodiments of the present invention, if when target account can provide the information service based on geographical position, also need the user who judges described user terminal whether to allow to send its geographical location information to this target account.
The authorization flag that user terminal is applied by instant communication client has recorded the licensing status of user to this target account.If user is set to authorize transmission state to the authorization flag of this target account, carry out following S203, otherwise, carry out following S204.
Further concrete, user can unifiedly in instant communication client application authorize setting to the authorization flag of all public's accounts, also can authorize setting to the authorization flag of some public's accounts separately.
S203: authorize transmission state if described authorization flag is set to, obtain the positional information for identifying this user terminal geographical position from described user terminal.
Authorize if transmission state, show that user sends the positional information at its place with this target account of purpose, server can get positional information and send to user corresponding to target account from this user terminal.
S204: if authorization flag is not to be set to the transmission state of authorizing, send authorization requests information to described user terminal, so that ask described user terminal to send positional information to described target account mandate.
S205: in the time receiving described user terminal and respond the license confirmation information of described authorization requests delivering, obtain the positional information for identifying this user terminal geographical position from described user terminal.
If authorization flag is not to be set to authorize transmission state, for example, while being illegal state, send authorization requests information to user terminal, whether inquiry user revises corresponding authorization flag to send positional information to described target account mandate.User terminal can send prompting to user according to authorization requests information, specifically can whether send positional information to described target account mandate in user terminal displays, selected " permission " button if user clicks, user terminal can send license confirmation information to server.User terminal can also be revised authorization flag simultaneously automatically, and authorization flag is set to authorize transmission state.
Receive after license confirmation information, show that user sends the positional information at its place with this target account of purpose, server can get positional information and send to user corresponding to target account from this user terminal.
Concrete, the positional information of obtaining from described user terminal for identifying this user terminal geographical position in above-mentioned S203 and S204 can comprise: server receive that described user terminal uploaded in the time having opened with the session interface of target account for identifying the positional information in geographical position of this user terminal; Or, receive that described user terminal periodically uploaded according to default Ct value in the time having opened with the session interface of target account for identifying the positional information in geographical position of this user terminal.And the positional information for the geographical position that identifies this user terminal of obtaining comprises the information such as IP address information, base station location information or the GPS latitude and longitude coordinates of this user terminal.Can open while entering session interface the user of each user terminal, upload the positional information in the geographical position for identifying this user terminal to server, or open after entering session interface and close before session interface the user of user terminal, upload at set intervals the positional information in the geographical position for identifying this user terminal to server.
S206: according to the geographical position of determining described user terminal for identifying the positional information in this user terminal geographical position obtaining, and push the geographical position of described user terminal to described target account.
Concrete, wherein a kind of concrete message format in the geographical position pushing to described target account can adopt the form shown in following table 1.In the concrete message format in other geographical position, can also comprise concrete Mou Dong building or street information.
Table 1:
Parameter |
Describe |
ToUserName |
Target account |
FromUserName |
Transmit leg account number (OpenID) |
CreateTime |
The message establishing time (integer) |
MsgType |
location |
Location_X |
Geographical position latitude |
Location_Y |
Geographical position longitude |
Label |
Geographical location information |
The geographical position of user terminal is being pushed to after the user of target account, the user of target account just can, according to the position of this user terminal, send some by server to this user terminal and promote message.Public's accounting number users of such as GT grand touring can send near tourist attractions information this geographical position, admission ticket information, quotation for a travel information etc. to the user in a certain geographical position.
Concrete, refer to again Fig. 4, it is the wherein a kind of idiographic flow schematic diagram of positional information for identifying this user terminal geographical position that obtains of the embodiment of the present invention, the described method of the embodiment of the present invention can be corresponding to the S102 in the corresponding embodiment of above-mentioned Fig. 1, or corresponding to S203 and S204 in the corresponding embodiment of above-mentioned Fig. 3, concrete, the described method of the embodiment of the present invention comprises:
S301: server judges whether described user terminal carries out network service based on IP address.
S302: if carry out network service based on IP address, obtain the IP address information of described user terminal as the positional information in the geographical position for identifying this user terminal.
If user terminal is IP address-based network service by equipment connections such as router or wifi focuses during to the Internet, can obtain the positional information of IP address information as the geographical position for identifying this user terminal.
S303: if not carry out network service based on IP address, the base station location information of obtaining described user terminal is as the positional information in the geographical position for identifying this user terminal or trigger the GPS positioning function of opening described user terminal to obtain the latitude and longitude information of described user terminal as the positional information in the geographical position for identifying this user terminal.
In embodiments of the present invention, for the latitude and longitude information of IP address information, base station location information and GPS, because IP address information can directly be obtained, and can get quickly and easily street that this user terminal is corresponding or the geographical position in building according to IP address information, therefore preferentially select the positional information of IP address information as the geographical position for identifying this user terminal, select and then to expend the extra base station location information of user terminal electric energy or the latitude and longitude information of GPS.
The embodiment of the present invention can be opened behind the session interface that has entered respective objects account user, can identify judgement to this target account, so that obtain selectively the positional information of this user terminal and send to user corresponding to target account from user terminal, can effectively reduce and even avoid obtaining of useless positional information, some unnecessary processing resource overheads are avoided, the processing resource of having saved server.And, the positional information that server obtains user terminal by after opening session user, send or open after session, close session before periodically mode obtain, be not all to obtain whenever and wherever possible as prior art, and the embodiment of the present invention is in the situation that user's with no authorized sends positional information to target account, before need to obtaining positional information to user, can initiate inquiry to user, also facilitated user that positional information can be provided selectively, so not only protect user's privacy, and reduce further obtaining of useless positional information, save further processing resource.
Refer to again Fig. 5, it is the schematic flow sheet of another geographic location notification method of the embodiment of the present invention, the described method of the embodiment of the present invention can be applicable in the system of more existing location-based services, particularly be applied in the various public platforms based on instant messaging application, described method can be realized by the user terminal of logining for user, concrete, described method comprises:
S401: user terminal detects when user opens with the session interface of target account, judges whether to authorize the positional information that sends the geographical position for identifying this user terminal to described target account.
In the time that each user opens with the session interface of target account, user terminal is all carried out described S401.In described S401, specifically can judge whether the authorization flag about described target account in instant communication client application is set to the transmission state of authorizing, if, authorize the positional information that sends the geographical position for identifying this user terminal to described target account, carry out following S402, if not, carry out following S403.
S402: if judged result is to authorize the positional information that sends the geographical position for identifying this user terminal to described target account, obtain the positional information in the geographical position for identifying this user terminal and send to server, so that described server is pushed to described target account according to what obtain for identifying the geographical position of described user terminal that the positional information in geographical position of this user terminal determines.
Send when positional information for authorizing to target account in judged result, any one or more information of directly obtaining in the latitude and longitude coordinates of IP address information, base station location information and GPS sends to server, sends to user corresponding to target account by server.In embodiments of the present invention, if user terminal is behind the session interface entering with target account, the positional information that sends the geographical position for identifying this user terminal to described target account has been authorized in judgement, so, server side at user terminal before this open session interface time just judged that target account is for the account of the information service based on geographical position can be provided, can send positional information to this target account.
S403: if with no authorized sends the positional information in the geographical position for identifying this user terminal to described target account, send notice of non-authorization to server.
If judged result is with no authorized, need request server to judge accordingly, send notice of non-authorization to notify described this user terminal of server with no authorized to send local terminal positional information to described target account to server.
S404: the authorization request message that reception server response notice of non-authorization sends, and whether send to described target account the positional information that is used for the geographical position that identifies this user terminal to user's prompting.
In described S404, server receives after notice of non-authorization, can think that user terminal is to enter first this target account, carry out and judge whether this target account can provide the account of the information service based on geographical position alternatively, in the time being judged as YES, response notice of non-authorization sends authorization request message to described user terminal, if the information service that cannot provide based on geographical position is provided, do not respond described notice of non-authorization, abandon this notice of non-authorization.
Whether user terminal, receiving after authorization request message, sends prompting to user, can be specifically to show to allow to send positional information to described target account.
S405: in the time of the license confirmation operation that receives user, authorization flag is set to the transmission state of authorizing.
S406: obtain the positional information in the geographical position for identifying this user terminal and send to server, so that described server is pushed to described target account according to what obtain for identifying the geographical position of described user terminal that the positional information in geographical position of this user terminal determines.
If user has clicked " permission " button, in described S405, mandate mark is set to the transmission state of authorizing, and any one or more information in the latitude and longitude coordinates of IP address information, base station location information and GPS of directly obtaining sends to server, send to user corresponding to target account by server in S406.
Or user terminal obtains the positional information in the geographical position for identifying this user terminal and sends to server, comprising: user terminal judges whether this terminal carries out network service based on IP address; If so, the IP address information of this terminal is sent to server as the positional information in the geographical position for identifying this user terminal; If not, the GPS positioning function that sends to server using the base station location information of this terminal as the positional information in the geographical position for identifying this user terminal or open this terminal sends to server using the latitude and longitude information of obtaining this terminal as the positional information in the geographical position for identifying this user terminal.
In embodiments of the present invention, for the latitude and longitude information of IP address information, base station location information and GPS, because IP address information can directly be obtained, and can get quickly and easily street that this user terminal is corresponding or the geographical position in building according to IP address information, therefore preferentially select the positional information of IP address information as the geographical position for identifying this user terminal, select and then to expend the extra base station location information of user terminal electric energy or the latitude and longitude information of GPS.
Further concrete, the positional information that described user terminal sends the geographical position for identifying this user terminal to server can comprise:
User terminal, in the time having opened with the session interface of target account, sends the positional information in the geographical position for identifying this user terminal to server; Or user terminal, in the time having opened with the session interface of target account, periodically sends the positional information in the geographical position for identifying this user terminal to server according to default Ct value.
The embodiment of the present invention can be opened behind the session interface that has entered respective objects account user, can obtain selectively the positional information of user terminal and send to server, can effectively reduce and even avoid obtaining and sending of useless positional information, some unnecessary processing resource overheads of user terminal and server are avoided, the processing resource of having saved user terminal and server.And, the positional information of user terminal by after opening session user, send or open after session, close session before periodically mode obtain and send, be not all to obtain and sending whenever and wherever possible as prior art, and the embodiment of the present invention is in the situation that user's with no authorized sends positional information to target account, before need to obtaining positional information to user, can initiate inquiry to user, also facilitated user that positional information can be provided selectively, so not only protect user's privacy, and reduce further obtaining of useless positional information, save further the processing resource of user terminal and server.
Refer to again Fig. 6, it is the schematic flow sheet of another geographic location notification method of the embodiment of the present invention, the described method of the embodiment of the present invention can be applicable in the system of more existing location-based services, particularly be applied in the various public platforms based on instant messaging application, described method can be realized by the server for obtaining user terminal location, the user terminal of user's login and user's registration terminal of target account, concrete, described method comprises:
S501: user terminal detects when user opens with the session interface of target account, judges whether to authorize according to authorization flag the positional information that sends the geographical position for identifying this user terminal to described target account;
S502: if with no authorized sends the positional information in the geographical position for identifying this user terminal to described target account, user terminal sends notice of non-authorization to server;
S503: server, in the time judging described target account the information service based on geographical position can be provided, responds described notice of non-authorization and sends authorization requests information to described user terminal;
S504: whether user terminal sends to described target account the positional information that is used for the geographical position that identifies this user terminal to user's prompting, and in the time of the license confirmation operation that receives user, authorization flag is set to and authorizes transmission state, and obtain the positional information in the geographical position for identifying this user terminal and send to server;
S505: server is determined the geographical position of described user terminal according to the positional information for the geographical position that identifies this user terminal of obtaining, and pushes the geographical position of described user terminal to described target account.
Concrete, the latitude and longitude coordinates that user terminal obtains the positional information in the geographical position for identifying this user terminal and sends to server specifically can obtain IP address information, base station location information and GPS sends to server.
Or user terminal obtains the positional information in the geographical position for identifying this user terminal and sends to server to comprise: user terminal judges whether this terminal carries out network service based on IP address; If so, the IP address information of this terminal is sent to server as the positional information in the geographical position for identifying this user terminal; If not, the GPS positioning function that sends to server using the base station location information of this terminal as the positional information in the geographical position for identifying this user terminal or open this terminal sends to server using the latitude and longitude information of obtaining this terminal as the positional information in the geographical position for identifying this user terminal.
In embodiments of the present invention, for the latitude and longitude information of IP address information, base station location information and GPS, because IP address information can directly be obtained, and can get quickly and easily street that this user terminal is corresponding or the geographical position in building according to IP address information, therefore preferentially select the positional information of IP address information as the geographical position for identifying this user terminal, select and then to expend the extra base station location information of user terminal electric energy or the latitude and longitude information of GPS.
Further concrete, the positional information that user terminal sends the geographical position for identifying this user terminal to server can comprise:
User terminal, in the time having opened with the session interface of target account, sends the positional information in the geographical position for identifying this user terminal to server; Or user terminal, in the time having opened with the session interface of target account, periodically sends the positional information in the geographical position for identifying this user terminal to server according to default Ct value.
The embodiment of the present invention can be opened behind the session interface that has entered respective objects account user, server can be identified judgement to this target account, so that obtain selectively the positional information of this user terminal and send to user corresponding to target account from user terminal, can effectively reduce and even avoid obtaining of useless positional information in user terminal and server, some unnecessary processing resource overheads are avoided, the processing resource of having saved user terminal and server.
Below the server of realizing geographic location notification, user terminal and the system of the embodiment of the present invention are described in detail.
Refer to Fig. 7, it is the structural representation of a kind of server of realizing geographic location notification of the embodiment of the present invention, described server in the embodiment of the present invention can be the server that obtains customer location in the system of more existing location-based services, particularly corresponding server in the various public platforms based on instant messaging application, described server specifically can comprise:
The first judge module 11, behind the session interface of opening to user terminal with target account, judges whether described target account can provide the information service based on geographical position;
In the judged result of described the first judge module 11, when the information service based on geographical position cannot be provided, the described server of the embodiment of the present invention can not carried out obtaining and transmit operation about the positional information of described target account and user terminal.
Acquisition module 12 if for the information service based on geographical position can be provided, obtains the positional information for identifying this user terminal geographical position from described user terminal;
Pushing module 13, for according to the geographical position of determining described user terminal for identifying the positional information in this user terminal geographical position that obtains, and pushes the geographical position of described user terminal to described target account.
In the public platform based on instant messaging application, corresponding instant communication client application is installed in user terminal, when user need to be that target account is while communicating by letter with some public's accounts, first user can open in instant communication client application the session interface with this target account, with the session interface of target account can be with reference to shown in figure 2.When user opens behind the session interface with target account, user terminal can be opened reporting events to book server by this session, book server can be detected learn user terminal to open and the session interface of target account.
The open event of server based on this user terminal determine after target account, and described the first judge module 11 can judge whether this target account can provide the information service based on geographical position according to the log-on message of this target account.The simple implementation of one of described the first judge module 11 is: in the time that server determines that according to the log-on message of target account this target account is the account of the types such as individual account or news category, determine that user corresponding to this target account carries out location-based extension service for not needing, judge that this target account is as the information service that cannot provide based on geographical position.Otherwise, if when described target account is the account of the types such as food and drink class, GT grand touring, show that user corresponding to this target account wishes to know user's position so that while sending food and drink, tourism message to these users, determine that this target account is for providing the information service based on geographical position.
Or, described the first judge module 11 is that the account function mapping table based on preset judges whether described target account can provide the information service based on geographical position, described account function mapping table is that server is preset, each account is in the time of the application stage, whether can fill in need to be based on geographical position data processing, if yes time, server records this account and this target account is recorded as to the mark that the information service based on geographical position can be provided in described account function mapping table, as is recorded as " 1 ".Described account function mapping table can operate in real time or periodically update according to the renewal of target account, for example the user of target account by self be revised as not need to be based on geographical position data processing time, on described account function mapping table, can delete this target account, or be the mark that does not need to carry out the information service based on geographical position by information recording corresponding this target account, as be recorded as " 0 ".
Can provide the information service based on geographical position if described the first judge module 11 is judged described target account, 12 of described acquisition modules are to the positional information of obtaining the geographical position for identifying this user terminal in described user terminal.
Described acquisition module 12 can obtain the IP address of this user terminal, using IP address as the positional information for identifying this user terminal geographical position; 13 of described pushing modules are determined the regional location under described user terminal according to the regional location under IP address.For example, according to existing IP address location system, can determine that IP address is positioned at so-and-so street or Mou building, city, now described pushing module 13 can be using street corresponding IP address or building as the geographical position of described user terminal, and push the geographical position of described user terminal to described target account.
Or: described acquisition module 12 can trigger this user terminal is carried out to architecture, obtains latitude and longitude coordinates, using latitude and longitude coordinates as the positional information for identifying this user terminal geographical position; Or trigger this user terminal and open GPS function to obtain latitude and longitude coordinates (being geographical coordinate), using latitude and longitude coordinates as the positional information for identifying this user terminal geographical position.Described pushing module 13 can directly send to latitude and longitude coordinates described target account.Can certainly, in conjunction with electronic chart, latitude and longitude coordinates be corresponded to the positions such as electronic chart Zhong street or building, then street or building are pushed to described target account.
The geographical position of user terminal is being pushed to after the user of target account, the user of target account just can, according to the position of this user terminal, send some by server to this user terminal and promote message.Public's accounting number users of such as GT grand touring can send near tourist attractions information this geographical position, admission ticket information, quotation for a travel information etc. to the user in a certain geographical position.
The embodiment of the present invention can be opened behind the session interface that has entered respective objects account user, server can be identified judgement to this target account, so that obtain selectively the positional information of this user terminal and send to user corresponding to target account from user terminal, can effectively reduce and even avoid obtaining of useless positional information in server, some unnecessary processing resource overheads are avoided, the processing resource of having saved server.
Further concrete, refer to Fig. 8, it is the structural representation that the another kind of the embodiment of the present invention is realized the server of geographic location notification, the described server of the embodiment of the present invention comprises the first judge module 11, acquisition module 12 and the pushing module 13 in an embodiment, in embodiments of the present invention, described server can also comprise:
The second judge module 14, for providing after the information service based on geographical position, judge whether described user terminal is set to by the authorization flag that sends the positional information in the geographical position for identifying this user terminal to described target account the transmission state of authorizing for the judged result at the first judge module 11;
Notification module 15, while authorizing transmission state, notifies described acquisition module 12 to carry out and from described user terminal, obtains the positional information for identifying this user terminal geographical position for being set in described authorization flag.
That is to say, in embodiments of the present invention, if when target account can provide the information service based on geographical position, also need to judge by described the second judge module 14 whether the user of described user terminal allows to send its geographical location information to this target account.
The authorization flag that user terminal is applied by instant communication client has recorded the licensing status of user to this target account.If user is set to authorize transmission state to the authorization flag of this target account, described second judges that 14 judged result allows to send its geographical location information to this target account for user, described notification module 15 notifies described acquisition module 12 from described user terminal, to obtain the positional information for identifying this user terminal geographical position, so that described pushing module 13 pushes the positional information of this user terminal to target account.
And if the judged result of the second judge module 14 sends its geographical location information for user's with no authorized to this target account, authorization flag is set to illegal state.Described server can also comprise:
Sending module 16, for not being, while being set to mandate transmission state, to send authorization requests information to described user terminal in described authorization flag, so that ask described user terminal to send positional information to described target account mandate;
Described notification module 15, also, in the time receiving described user terminal and respond the license confirmation information of described authorization requests delivering, notify described acquisition module 11 to carry out and from described user terminal, obtain the positional information for identifying this user terminal geographical position.
If authorization flag is not to be set to authorize transmission state, for example, while being illegal state, described sending module 16 sends authorization requests information to user terminal, and whether inquiry user revises corresponding authorization flag to send positional information to described target account mandate.User terminal can send prompting to user according to authorization requests information, specifically can whether send positional information to described target account mandate in user terminal displays, selected " permission " button if user clicks, user terminal can send license confirmation information to server.User terminal can also be revised authorization flag simultaneously automatically, and authorization flag is set to authorize transmission state.
Receive after license confirmation information, show that user sends the positional information at its place with this target account of purpose, notify acquisition module 12 to get positional information from this user terminal by described notification module 15 again, so that described pushing module 13 pushes the positional information of this user terminal to target account.
The positional information that described acquisition module 12 obtains can in the latitude and longitude coordinates of IP address information, base station location information and the GPS of described user terminal any or multiple.
Further alternatively, then referring to Fig. 9, is wherein a kind of concrete structure schematic diagram of the acquisition module in Fig. 8, and described acquisition module 12 can comprise:
Communication type judging unit 121, in the judged result of described the first judge module 11 when the information service based on geographical position can be provided, judge whether described user terminal is to carry out network service based on IP address;
The first acquiring unit 122, for being while carrying out network service based on IP address, obtains the IP address information of described user terminal as the positional information in the geographical position for identifying this user terminal;
Second acquisition unit 123, for not being while carrying out network service based on IP address, the base station location information of obtaining described user terminal is as the positional information in the geographical position for identifying this user terminal or trigger the GPS positioning function of opening described user terminal to obtain the latitude and longitude information of described user terminal as the positional information in the geographical position for identifying this user terminal.
For the latitude and longitude information of IP address information, base station location information and GPS, because IP address information can directly be obtained, and can get quickly and easily street that this user terminal is corresponding or the geographical position in building according to IP address information, therefore preferentially select the positional information of IP address information as the geographical position for identifying this user terminal, select and then to expend the extra base station location information of user terminal electric energy or the latitude and longitude information of GPS.
Further alternatively, described acquisition module 12 specifically for receive that described user terminal uploaded in the time having opened with the session interface of target account for identifying the positional information in geographical position of this user terminal; Or receive that described user terminal periodically uploaded according to default Ct value in the time having opened with the session interface of target account for identifying the positional information in geographical position of this user terminal.
The embodiment of the present invention can be opened behind the session interface that has entered respective objects account user, can identify judgement to this target account, so that obtain selectively the positional information of this user terminal and send to user corresponding to target account from user terminal, can effectively reduce and even avoid obtaining of useless positional information, some unnecessary processing resource overheads are avoided, the processing resource of having saved server.And, the positional information that server obtains user terminal by after opening session user, send or open after session, close session before periodically mode obtain, be not all to obtain whenever and wherever possible as prior art, and the embodiment of the present invention is in the situation that user's with no authorized sends positional information to target account, before need to obtaining positional information to user, can initiate inquiry to user, also facilitated user that positional information can be provided selectively, so not only protect user's privacy, and reduce further obtaining of useless positional information, save further processing resource.
Refer to again Figure 10, it is the structural representation of a kind of user terminal of realizing geographic location notification of the embodiment of the present invention, mobile terminal that the described user terminal of the embodiment of the present invention can use for the user in the system of more existing location-based services etc., particularly be applied in the terminal that in the various public platforms based on instant messaging application, domestic consumer is used, concrete, described user terminal comprises:
Judge module 21, in the time detecting that user opens with the session interface of target account, judges whether to authorize the positional information that sends the geographical position for identifying this user terminal to described target account;
Processing module 22, for in judged result being mandate sends positional information from the geographical position for identifying this user terminal to described target account, obtain the positional information in the geographical position for identifying this user terminal, and the positional information getting is sent to server, so that described server is pushed to described target account according to what obtain for identifying the geographical position of described user terminal that the positional information in geographical position of this user terminal determines.
User terminal, in the time that each user opens with the session interface of target account, all can judge whether to authorize the positional information that sends the geographical position for identifying this user terminal to described target account by described judge module 21.Described judge module 21 specifically can judge whether the authorization flag about described target account in instant communication client application is set to the transmission state of authorizing, if so, authorize the positional information that sends the geographical position for identifying this user terminal to described target account.
In the time that judged result sends positional information for authorizing to target account, any one or more information that described processing module 22 is directly obtained in the latitude and longitude coordinates of IP address information, base station location information and GPS sends to server, sends to user corresponding to target account by server.In embodiments of the present invention, if user terminal is behind the session interface entering with target account, described judge module 21 judges authorizes the positional information that sends the geographical position for identifying this user terminal to described target account, so, server side at user terminal before this open session interface time just judged that target account is for the account of the information service based on geographical position can be provided, can send positional information to this target account.
Further concrete, described user terminal can also comprise:
Sending module 23, in the time that with no authorized is used for identifying the positional information in geographical position of this user terminal to described target account transmission, sends notice of non-authorization to server;
Receiver module 24, the authorization request message sending for reception server response notice of non-authorization;
Whether reminding module 25, for sending to described target account the positional information that is used for the geographical position that identifies this user terminal to user's prompting;
Module 26 is set, after the license confirmation operation receiving user, authorization flag is set to the transmission state of authorizing;
Described processing module 22, also for after the license confirmation operation receiving user, obtain the positional information in the geographical position for identifying this user terminal and send to server, so that described server is pushed to described target account according to what obtain for identifying the geographical position of described user terminal that the positional information in geographical position of this user terminal determines.
If the judged result of described judge module 21 is with no authorized, need to judge accordingly by described sending module 23 request servers, send notice of non-authorization to notify described this user terminal of server with no authorized to send local terminal positional information to described target account to server.
Receive after notice of non-authorization at server, can think that user terminal is to enter first this target account, carry out and judge whether this target account can provide the account of the information service based on geographical position alternatively, in the time being judged as YES, response notice of non-authorization sends authorization request message to described user terminal, if the information service that cannot provide based on geographical position is provided, do not respond described notice of non-authorization, abandon this notice of non-authorization.
Whether described receiver module 24, receiving after authorization request message, sends prompting to user, can be specifically to show to allow to send positional information to described target account.If user has clicked " permission " button, module 26 is set can authorizes mark be set to the transmission state of authorizing of user terminal, and any one or more information in the latitude and longitude coordinates of IP address information, base station location information and GPS of directly obtaining by described processing module 22 sends to server, send to user corresponding to target account by server.
Further concrete, refer to Figure 11, be wherein a kind of concrete structure schematic diagram of the processing module in Figure 10, described processing module 22 comprises:
Judging unit 221, for judging whether this terminal carries out network service based on IP address;
The first processing unit 222, in the judged result of judging unit when being, the IP address information of this terminal is sent to server as the positional information in the geographical position for identifying this user terminal;
The second processing unit 223, for in the judged result of judging unit while being no, the GPS positioning function that sends to server using the base station location information of this terminal as the positional information in the geographical position for identifying this user terminal or open this terminal sends to server using the latitude and longitude information of obtaining this terminal as the positional information in the geographical position for identifying this user terminal.
In embodiments of the present invention, for the latitude and longitude information of IP address information, base station location information and GPS, because IP address information can directly be obtained, and can get quickly and easily street that this user terminal is corresponding or the geographical position in building according to IP address information, therefore preferentially select the positional information of IP address information as the geographical position for identifying this user terminal, select and then to expend the extra base station location information of user terminal electric energy or the latitude and longitude information of GPS.
Described processing module 22 sends when identifying the positional information in geographical position of this user terminal to server, specifically in the time having opened with the session interface of target account, sends the positional information in the geographical position for identifying this user terminal to server; Or in the time having opened with the session interface of target account, periodically send the positional information in the geographical position for identifying this user terminal to server according to default Ct value.
The embodiment of the present invention can be opened behind the session interface that has entered respective objects account user, can obtain selectively the positional information of user terminal and send to server, can effectively reduce and even avoid obtaining and sending of useless positional information, some unnecessary processing resource overheads of user terminal and server are avoided, the processing resource of having saved user terminal and server.And, the positional information of user terminal by after opening session user, send or open after session, close session before periodically mode obtain and send, be not all to obtain and sending whenever and wherever possible as prior art, and the embodiment of the present invention is in the situation that user's with no authorized sends positional information to target account, before need to obtaining positional information to user, can initiate inquiry to user, also facilitated user that positional information can be provided selectively, so not only protect user's privacy, and reduce further obtaining of useless positional information, save further the processing resource of user terminal and server.
Refer to again Figure 12, it is the structural representation of a kind of geographic location notification system of the embodiment of the present invention, the described system of the embodiment of the present invention can be applied in the system of more existing location-based services, particularly be applied in the various public platforms based on instant messaging application, concrete, described system comprises: at least one user terminal, and the embodiment of the present invention describes as an example of user terminal 2 example, server 1 and target accounting number users terminal 3, wherein
Described user terminal 2, when open with the session interface of target account to user, judges whether to authorize according to authorization flag the positional information that sends the geographical position for identifying this user terminal 2 to described target account; If with no authorized sends the positional information in the geographical position for identifying this user terminal 2 to described target account, send notice of non-authorization to server 1;
Described server 1, in the time judging described target account the information service based on geographical position can be provided, sends authorization requests information to described user terminal 2;
Described user terminal 2, also for whether sending to described target account the positional information that is used for the geographical position that identifies this user terminal 2 to user's prompting, and in the time of the license confirmation operation that receives user, authorization flag is set to and authorizes transmission state, and obtain the positional information in the geographical position for identifying this user terminal 2 and send to server 1;
Described server 1, also for determining the geographical position of described user terminal 2 according to the positional information for the geographical position that identifies this user terminal 2 of obtaining, and is pushed to described target accounting number users terminal 3 by the geographical position of described user terminal 2.
Described target accounting number users terminal 3 is receiving behind the geographical position about described user terminal 2 of server transmission, and the user of target account just can, according to the position of this user terminal, send some by server to this user terminal and promote message.Public's accounting number users of such as GT grand touring can send near tourist attractions information this geographical position, admission ticket information, quotation for a travel information etc. to the user in a certain geographical position.
The embodiment of the present invention can be opened behind the session interface that has entered respective objects account user, server can be identified judgement to this target account, so that obtain selectively the positional information of this user terminal and send to user corresponding to target account from user terminal, can effectively reduce and even avoid obtaining of useless positional information in user terminal and server, some unnecessary processing resource overheads are avoided, the processing resource of having saved user terminal and server.
One of ordinary skill in the art will appreciate that all or part of flow process realizing in above-described embodiment method, can carry out the hardware that instruction is relevant by computer program to complete, described program can be stored in a computer read/write memory medium, this program, in the time carrying out, can comprise as the flow process of the embodiment of above-mentioned each side method.Wherein, described storage medium can be magnetic disc, CD, read-only store-memory body (Read-Only Memory, ROM) or random store-memory body (Random Access Memory, RAM) etc.
Above disclosed is only preferred embodiment of the present invention, certainly can not limit with this interest field of the present invention, and the equivalent variations of therefore doing according to the claims in the present invention, still belongs to the scope that the present invention is contained.