Embodiment
For the ease of the understanding of those skilled in the art, the invention will be further described.
According to a kind of embodiment of the present invention, provide a kind of method of carrying out information processing between server and client side, the method comprises the following steps:
The device id of MAC Address and mobile terminal to the MAC Address of periphery WIFI signal emission source, and is uploaded onto the server by mobile terminal timing acquisition.
Wherein this mobile terminal can be mobile phone, PAD or other panel computers.First the WIFI module on this mobile terminal is set to opening, is connected with the WIFI signal of surrounding, then timing acquisition is to the MAC Address of WIFI signal emission source, and is uploaded onto the server by the device id of this MAC Address and mobile terminal.
Wherein, server stores has the MAC Address of WIFI signal emission source, the mapping relations of MAC Address and GeoHash, the mapping relations of GeoHash and fence, the mapping relations of device id and online message push passage;
Described GeoHash is the unique string coding of identified geographic grid, and described geographic grid comprises geographic longitude and latitude scope, and GeoHash can weave into the longitude and latitude of two dimension the character string of one dimension; Described fence is the virtual geographic range comprising one or more adjacent or non-conterminous GeoHash; Described device id is generate unique device identification according to device hardware information, or generates unique by server and be saved in the terminal iidentification of mobile terminal;
Server receive mobile terminal send MAC Address and device id after, in database, the MAC Address of described WIFI signal emission source is mated.
This database can pre-set, and also can be to upload according to the MAC Address of mobile terminal timing acquisition and device id and carry out preserving to be formed.Server has prestored the geography information of MAC Address of all detectable WIFI signal emission sources in a database.
If the match is successful for MAC Address, then according to the mapping relations of the described MAC Address stored in server and GeoHash, calculate corresponding GeoHash information fast by high-speed cache.
According to the mapping relations of the GeoHash information stored in server and fence, obtain fence information.
Then judge the location status of described mobile terminal in fence, and according to the location status of described mobile terminal at fence, to described mobile terminal PUSH message.
Specifically comprise the following steps to described mobile terminal PUSH message:
According to the geographic range preset, buffer memory is carried out to the location status of described mobile terminal in fence.
Described location status comprises: get the hang of, hold mode and leave state.In the geographic range preset, after this mobile scanning terminal to WIFI wireless signal, whether connect according to user, confirm whether this mobile terminal enters this wireless network, still remain on this preset geographic range in still have left this ground scope enclose, carry out buffer memory.
According to the location status of described mobile terminal in fence, in the geographic range preset, trigger corresponding virtual events, described virtual events comprises: enter event, maintenance event and leave event.
According to described virtual events, trigger corresponding message, and search the current online message push passage of described mobile terminal according to device id, and pass through long interface channel by message push to mobile terminal.
Further, before judging the location status of described mobile terminal in fence, described server needs the fence information of pre-set fixed range.
Described fence comprises the physical geographic location set of certain limit.
Described fence is the set of the virtual geographic range comprising one or more adjacent or non-conterminous GeoHash.
Further, the MAC Address of the WIFI signal emission source that described server is uploaded according to described mobile terminal timing, upgrades the location status of described mobile terminal in fence; Event of leaving is needed to consider, under abnormal conditions appear in mobile terminal device (such as cannot information upload when), whether to have occurred leaving event by timeout mechanism judgment device.
Further, according to the type quick indexing of described virtual events and/or filter corresponding message.
Further, the step that mobile terminal receives PUSH message is also comprised:
Described mobile terminal, according to the PUSH message content received, is shown notice or starts application program.
The mobile terminal of the current overwhelming majority is provided with WIFI module and/or bluetooth module, therefore utilizes wireless signal that WIFI module and/or bluetooth module send to identify mobile terminal, is a kind ofly to facilitate feasible scheme.
According to another embodiment of the present invention, a kind of server for real-time detection mobile terminal geographical position is provided, comprises:
Information receiving module: for MAC Address and the device id of the WIFI signal emission source of mobile terminal receive transmission.
Matching addresses module: for mating the MAC Address of WIFI signal emission source in database, and whether the match is successful to judge MAC Address.
Data obtaining module: for the mapping relations according to the described MAC Address stored in server and GeoHash, obtains GeoHash information; And according to the mapping relations of the GeoHash stored in server and fence, obtain fence information.
Position judging module: for judging the location status of described mobile terminal in fence, described location status comprises: to get the hang of, hold mode and leave state.
Information cache module: for according to the geographic range preset, buffer memory is carried out to the location status of described mobile terminal in fence.
Event trigger module: for according to the location status of described mobile terminal in fence, in the geographic range preset, trigger corresponding virtual events, described virtual events comprises: enter event, maintenance event and leave event.
Info push module: for according to described virtual events, trigger corresponding message, and search the current online message push passage of described mobile terminal according to device id, and pass through long interface channel by message push to mobile terminal.
According to another embodiment of the present invention, a kind of system of real-time detection mobile terminal geographical position is provided, comprise: described server and mobile terminal, the device id of MAC Address and mobile terminal to the MAC Address of periphery WIFI signal emission source, and is uploaded onto the server by described mobile terminal timing acquisition.
The foregoing describe a lot of detail so that fully understand the present invention.But above description is only preferred embodiment of the present invention, the present invention can be much different from alternate manner described here to implement, and therefore the present invention is not by the disclosed concrete restriction implemented above.Any those skilled in the art are not departing under technical solution of the present invention ambit simultaneously, and the Method and Technology content that foregoing description all can be utilized to disclose makes many possible variations and or amendment to technical solution of the present invention.Therefore, all contents not departing from technical solution of the present invention, according to technical spirit of the present invention to any simple modification made for any of the above embodiments, equivalent variations and modification, all still belong to the scope of technical solution of the present invention protection.