Summary of the invention
Object of the present invention is intended at least solve one of above-mentioned technological deficiency.
For achieving the above object, the present invention proposes a kind of system providing location dependant services, comprise: server, described server comprises further: location-based service module, for arranging and inquire about current geographic position and the translational speed of predetermined mobile object, regional model module, for inquiring about the regional model of the current geographic position region of described mobile object, service-seeking module, for inquiring about according to predetermined condition and revising described service, map service module, URL for returning map according to predetermined condition also returns map described in display, spatial data handling module, server interface module, for providing the application interface of described location dependant services for described location-based service module, regional model module, service-seeking module and map service module, and provide access service for one or more client, wherein, described service is set according to described application interface, and described one or more client, described one or more client is communicated with described server interface module by wired or wireless mode, for obtaining described service.
According to the system providing location dependant services of the embodiment of the present invention, at least have the following advantages, the application programming that (1) is location dependant services provides convenient, can design attitude is relevant easily service according to server interface module; (2) application programming being different location dependant services by server interface module provides general development interface, the application program of varied and abundant in content location dependant services can be developed easily, realize details without the need to care positions related service; (3) can be reused by multiple application program, improve the reusability of code, reduce development cost, shorten the construction cycle, improve the reliability of application program.
In one embodiment of the invention, described spatial data handling module comprises further: data definition unit, for defining storage, the syntax and semantics rule of the geometric data in described geographical position and regional model, wherein, described geometric data stores with standard GIS data form; Indexing units, for inquiring about the geometric data in described geographical position and regional model; Computing unit, for calculate and inquire about the geometric data in described geographical position and regional model space intersection, combine, comprise and distance; Data Management Unit, for administering and maintaining the geometric data in described geographical position and regional model.The data needed for the related service of management position can be facilitated thus.
In one embodiment of the invention, described spatial data handling module also comprises: address encoding unit, and the data for the geographical position that stored by text formatting and regional model are converted to standard GIS data form.Thus can by the providing data formatting needed for location dependant services.
In one embodiment of the invention, described location-based service module is further used for: according to described mobile object and predetermined time point, inquire about the geographical position of described mobile object at described time point place; According to described mobile object and predetermined time section, inquire about the motion track of described mobile object within the described time period, wherein, described motion track comprises geographical position described in a group; Distance between the geographical position inquiring about two described mobile object places; According to described mobile object and predetermined region, inquire about the distance between the geographical position at described mobile object place and described region; And according to described mobile object and described service, inquire about the distance between the geographical position at described mobile object place and the region at described service place.
In one embodiment of the invention, described location-based service module is also for the distance of inquiring about any two geographical position; And according to predetermined address lookup the geographical position at place, address.
In one embodiment of the invention, described location-based service module also for: according to described mobile object and predetermined region, definition, amendment and cancel alarm conditions and action.
In one embodiment of the invention, described regional model module is further used for: the administrative division inquiring about the current geographic position at described mobile object place, and wherein said administrative division comprises province, city, district, postcode; According to described mobile object and predetermined time point, inquire about the administrative division of described mobile object at described time point place; According to described mobile object and predetermined geographical position, inquire about the air line distance between the geographical position at described mobile object place and described geographical position, wherein, described geographical position comprises a geographical position and regional geography position; According to described mobile object and predetermined time section, inquire about administrative division crossing with the motion track of described mobile object in the described time period; And according to described mobile object and predetermined distance, inquire about all geographical position of described mobile object within described distance range or region.
In one embodiment of the invention, described regional model module also for: inquire about the air line distance between two regions; And the position relationship in inquiry two regions, wherein, described position relationship comprises crossing, covers, from.
In one embodiment of the invention, described service-seeking interface unit is further used for: serve according to title and Query; Inquiry and revise the information of described service, wherein, described information comprises the ID of service, title, service provider and regional location; According to predetermined static filtering condition, inquiry meets the described service of described static filtering condition; According to described mobile object and predetermined distance, inquire about described mobile object centered by current geographic position, described distance is the described service in the region of radius or diameter; And according to described mobile object, Distance geometry classification, described mobile object centered by current geographic position, described distance be radius or diameter region in and meet the described service of described classification.
In one embodiment of the invention, described map service module is further used for: the map URL returning to described geographical position according to described geographical position, and described geographical position is presented at the middle position of described map; The map URL of described track is returned according to described track, and by the middle position of described track display at described map; Return the map URL of described service according to described service, and described service is presented at the middle position of described map; Return the map URL of described one group of service according to described one group of service, and described one group of service is presented at the middle position of described map; Return the map URL in described region according to described region, and described region is presented at the middle position of described map; Return the map URL in described one group of region according to described one group of region, and described one group of region is presented at the middle position of described map.
In one embodiment of the invention, described map service module, also for the map size and/or the engineer's scale that set described map, shows described map according to described map size of specifying and/or engineer's scale.
In one embodiment of the invention, described map service module also for: if do not set described map size and/or engineer's scale, then carry out Automatic Optimal according to predetermined default value and show described map.
The aspect that the present invention adds and advantage will part provide in the following description, and part will become obvious from the following description, or be recognized by practice of the present invention.
Embodiment
Be described below in detail embodiments of the invention, the example of described embodiment is shown in the drawings, and wherein same or similar label represents same or similar element or has element that is identical or similar functions from start to finish.Being exemplary below by the embodiment be described with reference to the drawings, only for explaining the present invention, and can not limitation of the present invention being interpreted as.
The schematic diagram of the system of location dependant services that what Fig. 1 was the embodiment of the present invention provide.
As shown in Figure 1, the system of location dependant services is provided according to an embodiment of the invention, comprise server 100, server interface module 200 and one or more client 300, wherein server 100 comprises location-based service module 110, regional model module 120, service-seeking module 130, map service module 140 and spatial data handling module 150 further.
Wherein, location-based service module 110 is for arranging and inquire about current geographic position and the translational speed of predetermined mobile object, and at this, mobile object can be regarded as the mobile phone users of client.Location-based service module 100 is except the current geographic position that can arrange and inquire about predetermined mobile object and translational speed, in one embodiment of the invention, also for: (1) according to mobile object and predetermined time point, inquiry mobile object is in the geographical position at time point place; (2) according to mobile object and predetermined time section, the inquiry motion track of mobile object within the time period, wherein, motion track comprises one group of geographical position; (3) inquire about two mobile object places geographical position between distance; (4) according to mobile object and predetermined region, the distance between the geographical position at inquiry mobile object place and region; (5) according to mobile object and service, the distance between the geographical position at inquiry mobile object place and the region at service place; (6) distance in any two geographical position is inquired about; (7) according to the geographical position at predetermined place, address lookup address; (8) according to mobile object and predetermined region, definition, amendment and cancellation alarm conditions and action.
Regional model module 120 is for inquiring about the regional model of the current geographic position region of mobile object.Regional model module 120 is except the regional model of current geographic position region can inquiring about mobile object, in one embodiment of the invention, also for the administrative division of current geographic position at (1) inquiry mobile object place, wherein administrative division comprises province, city, district, postcode; (2) according to mobile object and predetermined time point, the inquiry administrative division of mobile object at time point place; (3) according to mobile object and predetermined geographical position, the air line distance between the geographical position at inquiry mobile object place and geographical position, wherein, geographical position comprises a geographical position and regional geography position; (4) according to mobile object and predetermined time section, administrative division crossing with the motion track of mobile object in query time section; (5) according to mobile object and predetermined distance, all geographical position of inquiry mobile object within distance range or region; (6) air line distance between two regions is inquired about; (7) inquire about the position relationship in two regions, wherein, position relationship comprises crossing, covers, from.
Service-seeking module 130 is for serving according to predetermined condition inquiry and amendment.Service-seeking module 130 except can according to predetermined condition inquiry and amendment service except, in one embodiment of the invention, also for: (1) is according to title and Query service; (2) information of inquiry and amendment service, wherein, information comprises the ID of service, title, service provider and regional location; (3) according to predetermined static filtering condition, inquiry meets the service of static filtering condition; (4) according to mobile object and predetermined distance, inquiry mobile object is centered by current geographic position, and distance is the service in the region of radius or diameter; (5) according to mobile object, Distance geometry classification, mobile object, centered by current geographic position, meets the described service of classification in the region that distance is radius or diameter.
Map service module 140 for return according to predetermined condition map URL and display return map.Map service module 140 except can according to predetermined condition return map URL and display return except map, in one embodiment of the invention, also for: (1) returns the map URL in geographical position according to geographical position, and geographical position is presented at the middle position of map; (2) the map URL of track is returned according to track, and by the middle position of track display at map; (3) according to the map URL of service return service, and service is presented at the middle position of map; (4) return the map URL of one group of service according to one group of service, and one group of service is presented at the middle position of map; (5) according to the map URL of region return area, and region is presented at the middle position of map; (6) return the map URL in one group of region according to one group of region, and one group of region is presented at the middle position of map.
In one embodiment of the invention, can the map size of service module 140 setting map and/or engineer's scale according to the map, according to the map size of specifying and/or engineer's scale display map.Wherein, if there is no setting map size and/or engineer's scale, then carry out Automatic Optimal according to predetermined default value and show map.
In one embodiment of the invention, spatial data handling module 150 also comprises data definition unit, indexing units, computing unit and Data Management Unit (not shown).
Particularly, data definition unit is for defining storage, the syntax and semantics rule of the geometric data in geographical position and regional model, and wherein, geometric data stores with standard GIS data form.Indexing units is used for the geometric data of querying geographical position and regional model.Computing unit is for calculating with the space intersection of the geometric data of querying geographical position and regional model, combining, comprising and distance.Data Management Unit for administer and maintain geographical position and regional model geometric data.
In one embodiment of the invention, spatial data handling module also comprises: address encoding unit, and the data for the geographical position that stored by text formatting and regional model are converted to standard GIS (Geographic InformationSystem GIS-Geographic Information System) data format.Particularly, one with the address of text representation must be converted to its correspondence longitude and latitude could by with the spatial data handling module 150 of GIS data form use be " geocoding ".Can carry out after the geocoding of text formatting storing and index, and use a distance to inquire about it as radius parameter.Geocoding data have part to be stored in advance in spatial data handling module 150 usually, and the part do not stored uses the method for interpolation to estimate according to house number and the geographical position that stored.
According to the system providing location dependant services of the embodiment of the present invention, at least have the following advantages, the application programming that (1) is location dependant services provides convenient, can design attitude is relevant easily service according to server interface module; (2) application programming being different location dependant services by server interface module provides general development interface, the application program of varied and abundant in content location dependant services can be developed easily, realize details without the need to care positions related service; (3) can be reused by multiple application program, improve the reusability of code, reduce development cost, shorten the construction cycle, improve the reliability of application program.
In one embodiment of the invention, on the basis providing the system of location-based service to be based upon one group of database table, database table is used for storing the basic data of whole system.This database table is mainly divided into three major types:
(1) regional relation table, wherein regional relation table comprises region ID, geographical explanation and geological information, by a region, the area data of such as Wuxi is stored in regional relation table, the region ID stored is Z1, geographical explanation data are Wuxi, and geological information data comprise accurate GIS (Geographic Information System GIS-Geographic Information System) data and the geometry thereof of Wuxi Area, and geometry shows in the mode of similar map.
(2) service relation table, wherein, service relation table comprises service ID, title, type, provider, order, parameter, position, by an Internet service, the such as data of the Internet bus service are stored in service relation table, and the service ID of storage is S1, and name is called public transport, position for providing the particular geographic location at the server place of the Internet bus service, such as, is certain concrete place, Wuxi.Type, provider can create according to concrete service provider, and utility command and parameter can send service to mobile subscriber.
(3) User relationship table, the locator data that wherein User relationship table comprises user comprises the accurate GIS data of user position.
According to embodiments of the invention, on the basis of above-mentioned three database tables, as shown in Figure 2, by the system providing location dependant services of the embodiment of the present invention, location-based service is provided according to following steps:
Step S101, creates regional relation table and the area data that prestores, and wherein, area data comprises geographical explanation data and geological information data.
Step S102, according to Internet service, create service relation table, and Internet service data are stored into service relation table, wherein, Internet service data comprise the position data of service.
Step S103, carries out comparing calculation to the position data of Internet service and area data, determines the region of Internet service, and result of calculation be stored in service-regional relation table.
The position data of Internet service can be the position data of a point in the region at Internet service place.
Region geometry information data in the precise information of service position point and region list is carried out comparing calculation, the region at Dynamic Recognition service place, thus, position data in service relation table can be associated with the region geometry data (as commerce area, center, city, airport, shopping center, subregion, postcode, area code, administrative division etc.) in region list.This comparing calculation is undertaken by canonical algorithm, and main generalized information system all provides the built-in function of the computing function on these bases.These are from the incidence relation putting related information that standard operations of carrying out to region obtain and can be used for setting up service-region.
Wherein, service-regional relation table comprises region ID and service ID.
The incidence relation in service-region both calculated in advance having stored, also can dynamic calculation when needed.For services equipment, location point can only carry out once the contrast in region, and comparing result can be recorded in service-regional relation table in advance, thus, avoids double counting, accelerates process.For service equipment, locator data is according to GPS or carry out regularly based on the positioning service data of base station or other available resources or dynamically update.
If agent list does not have the precise information of location point, this service can be placed in one or more regions of region list, its position approximate.
Step S104, according to the related information of area data, determine the area data of one or more association, and create system realm according to the area data of one or more association, wherein, system realm data comprise geography explanation data and the geological information data in the region of each association.
According to the area data in region list, according to administrative division, system realm modeling is carried out to multiple region, the geography that the system realm built comprises the region of each association illustrates data, be convenient to user and browse whole system region by level, such as, click the system realm in " Jiangsu ", the information in each city of Jiangsu Province subordinate and the geometric figure of correspondence can be seen.
In one embodiment of the invention, system realm " according to continent-country-province-city-district-postcode " descending.
Step S105, according to Internet service, determines one or more system realm.
Such as, a travel information service, this travel information service is mainly the visitor entering Yangtze River Delta'Area and provides travel information, then some regions can be selected to define new user area, such as, select Jiangsu, Zhejiang and three, Shanghai system realm.
Step S106, according to one or more system realm, set up new user area, the geography that new user area data comprise region illustrates data and geological information data, wherein, geological information data calculate according to the geological information data of one or more system realm and obtain.
Such as, Jiangsu, Zhejiang and three, Shanghai system realm is have selected according to step S105, three system realms are combined, be defined as " Yangtze River Delta'Area ", establish new user area, the geographical descriptive information of new user area may be defined as " Yangtze River Delta'Area ", and geological information data can according to the geological information data of Jiangsu, three system realms in Zhejiang and Shanghai by calculating, and the built-in function that computational methods provide according to generalized information system particularly calculates.
Step S107, determines the locator data of Internet service user, provides Internet service to user according to user area.
Such as, according to user area Yangtze River Delta'Area, the tourist service of Yangtze River Delta'Area can be built, such as traffic, tourist attractions, hotel etc., and determine its position area information according to each tour itineraries relevant to position, such as, there is giant Buddha scenic spot, the Lingshan inside tourist attractions project, determine that the band of position at giant Buddha scenic spot, the Lingshan is at jiangsu wuxi.When user inquires about, send travel information according to the locator data specific aim of user, such as, the position at the current place of user, at jiangsu wuxi, can send the travel information at traffic, hotel and giant Buddha scenic spot, the Lingshan to this user.The travel information in relevant position region also can be sent directly to all users in region, position.
In one embodiment of the invention, the method of the Internet service providing position to be correlated with also comprises, the locator data of Internet service user is stored in database, wherein, locator data comprises last locator data and the historical location data of each user, according to last locator data and the area data comparing calculation of each user, determines the region of user, last locator data is marked in region, and is stored into add list.
Particularly, according to the selection of application program, the last locator data of each user and the result of area data comparing calculation can mark when upgrading, or carry out dynamic label placement if desired.Such as, comparing result may be " cellphone subscriber's current position of mobile phone 13801015555 is within postcode 214043 " or " the current position distance Wuxi City 50 kilometers of client A " etc.
According to embodiments of the invention, also on the basis of above-mentioned three database tables, by the system providing location dependant services of the embodiment of the present invention, location-based service can be provided according to following steps:
Step S201, creates regional relation table and the area data that prestores, and area data comprises geographical explanation data and geological information data.
Step S202, according to, Internet service, create, service relation table, and Internet service data are stored into service relation table, wherein, Internet service data comprise the position data of service.
Step S203, carries out comparing calculation to the position data of Internet service and area data, determines the region of Internet service, and result of calculation be stored in service-regional relation table.
Step S204, according to user, creates described User relationship table, and by storage of subscriber data to User relationship table, wherein, described user data comprises the locator data of user.
User relationship table comprises user ID, name, user data and position data, such as, create a user, user ID is 1, name is Zhang San, position is the current location of Zhang San, and such as, the current location specifically can locating Zhang San according to mobile phone location is a certain point specifically with accurate longitude and latitude in Wuxi.
Step S205, carries out comparing calculation to the locator data of user and area data, determines the region of user, and result of calculation is stored into user-regional relation table.
Region geometry information data in the precise information of user location point and region list is carried out comparing calculation, the region at Dynamic Recognition user place, thus, position data in User relationship table can be associated with the region geometry data (as commerce area, center, city, airport, shopping center, subregion, postcode, area code, administrative division etc.) in region list.This comparing calculation is undertaken by canonical algorithm, and main generalized information system all provides the built-in function of basic calculation.The related information that these standard operations carried out to region from point obtain can be used for setting up the incidence relation in user-region.
Wherein, user-regional relation table comprises user ID and service ID.
The incidence relation in user-region both calculated in advance having stored, also can dynamic operation when needed.For user, generally have mobile device, locator data is according to GPS or carry out regularly based on the positioning service data of base station or other available resources or dynamically update.
When not having the precise information of user location point in User relationship table, oneself can be positioned certain address or the determined position of phase Crosslinking Mechanisms by user by hand, or oneself is associated with region a certain in region list.
Step S206, contrast inquiry in user-regional relation table and service-regional relation table, determines the whole Internet services be correlated with in the position that user gets, and is stored in user-agent list.
Wherein, user-service relation table comprises user ID, service ID and position.
Step S207, according to user-agent list, user inquires about and obtains the relevant Internet service in specific position.
What illustrate the embodiment of the present invention below provides the systematic difference that position is relevant.By the description of concrete example, aspects and advantages of the present invention will become more obvious.
Such as, for the user of mobile object and mobile terminal provides the application inquiring about ambient services.The application inquiring about ambient services can be realized by service-seeking module 120.As inquired about the restaurant in distance 1 kilometer, hotel etc., Query Result is presented on map, and user can also click the point on map, understands the information of this businessman further.
If do not use embodiments of the invention, except realizing the logic of application program, interface, developer needs to do following work: (1) obtains the current location of the mobile terminals such as mobile phone by the API of the mobile terminal such as operator or mobile phone manufacturer, (2) calling data bank interface, as JDBC, sql like language is used to inquire about information database, (3) geometric operation, search the result within distance 1 kilometer, (4) API of invocation map, or call the API with map function of the Internet, calculate and obtain map, (5) calling data bank interface again, the specifying information of inquiry businessman.
Intricate operation and involve the DLL (dynamic link library) of many different styles, requires that developer is familiar with the computer technology of multinomial different field as Java, JDBC, SQL, network communication.The more important thing is, careless slightlyly when carrying out programming may bring inefficiency, the phenomenon that even cannot work.Such as when inquiring about the restaurant in distance 1 kilometer, have the method for designing that two kinds are different, one is first use 1 kilometer as radius screening, and then screens according to the classification in restaurant, and two is the information first selecting restaurant class, and then by 1 kilometer radius screening.Select which kind of method to depend on the establishment of database index and actual application program implementation method, these two kinds of methods may have the efficiency difference of up to ten thousand times, in extreme circumstances, even likely consuming time after using for a long time and at all.
Use embodiments of the invention, developer only needs with server interface module 200 mutual, just can realize the design function of whole location dependant services.For the inquiry of different bottoms, the inside of the system of location dependant services that provides of all optimization embodiments of the invention realizes, and ensures quality and the efficiency of application program.
Such as, a simple location alarm application, when geographical position distance businessman's distance formulated of a user is less than certain numerical value, sends an advertisement SMS from trend user.
Be similar to above-mentioned example, if do not use embodiments of the invention, developer needs to do to work: (1) obtains the current location of the mobile terminals such as mobile phone by the API of the mobile terminal such as operator or mobile phone manufacturer, (2) every certain time interval, re-start the operation of previous step, the distance between (3) calculating location.
Involve multiple DLL (dynamic link library) equally, and need to consider how to store customer position information, how to estimate computing time next time, compare complicated distance and calculate, need to weigh those computings and complete at mobile terminal, those complete in server back end.If the choice of these designs is improper, ineffective systems when user number may be caused many.
Use embodiments of the invention, developer only needs with server interface module 200 mutual, just can realize the design function of whole location dependant services.For the inquiry of different bottoms, the inside of the system of location dependant services that provides of all optimization embodiments of the invention realizes, and ensures quality and the efficiency of application program, simplifies the design and development of application program.
Such as, build the cellular service of a travel information providing position to be correlated with, user Zhang San is when travelling in Wuxi, use this service of mobile phone access application, the service of display comprises: the briefing at public transport, food and drink, Wuxi Linshan giant Buddha scenic spot and Tortoise Head Garden scenic spot, when Zhang San arrives Suzhou, the service of display comprises: the briefing at public transport, food and drink, scenic spot, Huqiu, Suzhou and Suzhou Amusement Park scenic spot.This public transport and food and drink are the service items irrelevant with position, and other is all location Based service.
Be illustrated in figure 3 the schematic diagram that the Internet service system of being correlated with position according to the present invention sets up the travel information cellular service providing position to be correlated with.In User relationship table, the position data of user is the longitude and latitude of user's current location, dynamically updating of location data is carried out according to GPS or based on the positioning service of base station, geometry data (geometry and latitude and longitude information) in this user's longitude and latitude and regional relation table carries out the computing of geometry, thus, identify the region at user place, and comparing result is recorded in user-regional relation table.Contrast inquiry is carried out with the position data in service relation table again in this region, obtains the service that this region can obtain, and by outcome record in service-regional relation table.Client-regional relation table and service-regional relation table are carried out contrast inquiry, obtain the retrievable service of user, be recorded in client-server table.Like this, user just can receive the respective services relevant to its region.
Although illustrate and describe embodiments of the invention, for the ordinary skill in the art, be appreciated that and can carry out multiple change, amendment, replacement and modification to these embodiments without departing from the principles and spirit of the present invention, scope of the present invention is by claims and equivalency thereof.