[go: up one dir, main page]

CN102186143B - Method, mobile terminal and system for acquiring positioning information - Google Patents

Method, mobile terminal and system for acquiring positioning information Download PDF

Info

Publication number
CN102186143B
CN102186143B CN201110141379.4A CN201110141379A CN102186143B CN 102186143 B CN102186143 B CN 102186143B CN 201110141379 A CN201110141379 A CN 201110141379A CN 102186143 B CN102186143 B CN 102186143B
Authority
CN
China
Prior art keywords
locating information
information
mobile terminal
webserver
positioning information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201110141379.4A
Other languages
Chinese (zh)
Other versions
CN102186143A (en
Inventor
张传明
佘党恩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201110141379.4A priority Critical patent/CN102186143B/en
Publication of CN102186143A publication Critical patent/CN102186143A/en
Application granted granted Critical
Publication of CN102186143B publication Critical patent/CN102186143B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

本发明提供一种采集定位信息的方法,用于可访问网络的移动终端,包括以下步骤:S1、响应用户请求访问网络服务器,并扫描与当前位置相关的定位信息;S2、将所述定位信息存储;S3、所述移动终端在存储所述定位信息后的任意一次访问网络服务器时,将所述定位信息加入至向所述网络服务器发起的原始查询请求中,并发送至所述网络服务器。与现有技术相比,本发明的有益效果是:能够避免WIFI、基站、GPS扫描程序常驻后台,因此节约了大量的系统资源,同时能够做到每次发起请求时都可以瞬间获取定位信息并且上传。

The present invention provides a method for collecting positioning information, which is used for a mobile terminal that can access the network, comprising the following steps: S1, responding to a user request to access a network server, and scanning the positioning information related to the current position; S2, storing the positioning information Storing; S3. When the mobile terminal accesses the network server any time after storing the location information, it adds the location information to the original query request initiated to the network server, and sends it to the network server. Compared with the prior art, the beneficial effect of the present invention is that it can avoid WIFI, base stations, and GPS scanning programs from standing in the background, thus saving a lot of system resources, and at the same time, it can instantly obtain positioning information every time a request is initiated And upload.

Description

采集定位信息的方法、移动终端及系统Method, mobile terminal and system for collecting positioning information

技术领域 technical field

本发明涉及信息技术领域,尤其是涉及一种采集定位信息的方法及移动终端及系统。The present invention relates to the field of information technology, in particular to a method for collecting positioning information, a mobile terminal and a system.

背景技术 Background technique

地理位置服务(Location based service,LBS),又称定位服务,其可判断移动终端所在的位置,确定移动终端用户的地理坐标(经纬度坐标),从而提供用户所需要的与位置相关的服务信息。定位的过程可能只需要几秒钟,所费的流量可能只有几十个字节。由于消费者对生活服务的需求具有地域性和便捷性等特点,地理位置服务越来越受欢迎。Location based service (LBS), also known as positioning service, can determine the location of the mobile terminal and determine the geographic coordinates (latitude and longitude coordinates) of the mobile terminal user, thereby providing the location-related service information required by the user. The positioning process may only take a few seconds, and the traffic consumed may only be tens of bytes. Due to the regional and convenient characteristics of consumers' demand for life services, location-based services are becoming more and more popular.

众所周知的,可通过GPS、WIFI、基站进行定位,其中,GPS定位的精度最高,且有方向、速度等数据,可以进行导航,然而,GPS启动时间长,且在室内是无效的,另外,GPS在天气不好的时候、楼群太密集的地方均表现欠佳,而这些因素都被Wi-Fi和/或基站定位克服了:移动终端可以通过检测附近的基站和/或WIFI信号,并将该基站和/或WIFI信号发送至服务器,由服务器根据基站和/或WIFI信号,查询存储于该服务器中的定位数据库中的相应地理坐标,并将查询结果发送至定位端,实现定位。然而,这一切均需要基于服务器中拥有一个较为完整的定位数据库,定位数据库的全面度决定了用户定位质量:越全面的定位数据库,定位质量越好。As we all know, positioning can be carried out through GPS, WIFI, and base stations. Among them, GPS positioning has the highest accuracy and has data such as direction and speed, which can be used for navigation. However, GPS takes a long time to start and is invalid indoors. In addition, GPS It performs poorly in bad weather and places with too dense buildings, and these factors are overcome by Wi-Fi and/or base station positioning: mobile terminals can detect nearby base stations and/or WIFI signals, and The base station and/or WIFI signal is sent to the server, and the server queries the corresponding geographical coordinates in the positioning database stored in the server according to the base station and/or WIFI signal, and sends the query result to the positioning terminal to realize positioning. However, all of these require a relatively complete positioning database in the server, and the comprehensiveness of the positioning database determines the quality of user positioning: the more comprehensive the positioning database, the better the positioning quality.

目前,为建立较为全面的定位数据库,利用覆盖很广的移动终端来采集定位信息以丰富数据库是一种常用的方法,其一般地做法是:当移动终端安装了位置服务软件后,位置服务软件会在移动终端中嵌入一个后台程序,该后台程序会一直扫描移动终端当前位置周围的定位信息,并不断上传至服务器。然而,这样的做法会导致移动终端的资源浪费,如网络流量、电池电力等。At present, in order to establish a relatively comprehensive positioning database, it is a common method to use mobile terminals with a wide coverage to collect positioning information to enrich the database. A background program will be embedded in the mobile terminal, and the background program will always scan the positioning information around the current location of the mobile terminal and upload it to the server continuously. However, such an approach will result in waste of mobile terminal resources, such as network traffic, battery power, and the like.

发明内容 Contents of the invention

本发明的目的在于提供一种经过改进的采集定位信息的方法。The purpose of the present invention is to provide an improved method for collecting positioning information.

本发明的另一目的在于提供一种经过改进的移动终端,所述的移动终端可应用所述的经过改进的采集定位信息的方法。Another object of the present invention is to provide an improved mobile terminal, which can apply the improved method for collecting positioning information.

本发明的又一目的在于提供一种经过改进的系统,所述的系统可应用所述的经过改进的采集定位信息的方法。Another object of the present invention is to provide an improved system, which can apply the improved method for collecting positioning information.

相应地,本发明的一种实施方式的采集定位信息的方法,包括:Correspondingly, a method for collecting positioning information according to an embodiment of the present invention includes:

S1、响应用户请求访问网络服务器,并扫描与当前位置相关的定位信息;S1. Access the network server in response to the user's request, and scan the location information related to the current location;

S2、将所述定位信息存储;S2. Store the positioning information;

S3、所述移动终端在存储所述定位信息后的任意一次访问网络服务器时,将所述定位信息加入至向所述网络服务器发起的原始查询请求中,并发送至所述网络服务器。S3. When the mobile terminal accesses the network server any time after the location information is stored, the location information is added to the original query request initiated to the network server, and sent to the network server.

作为本发明的进一步改进,所述移动终端通过HTTP-POST方式发送至所述网络服务器。As a further improvement of the present invention, the mobile terminal sends to the network server through HTTP-POST.

作为本发明的进一步改进,所述定位信息包括了地理坐标、WIFI信息、基站信息的至少其中之一。As a further improvement of the present invention, the positioning information includes at least one of geographic coordinates, WIFI information, and base station information.

作为本发明的进一步改进,所述定位信息包括了地理坐标、WIFI信息和/或基站信息。As a further improvement of the present invention, the positioning information includes geographical coordinates, WIFI information and/or base station information.

作为本发明的进一步改进,所述S3步骤具体为:所述移动终端在存储所述定位信息后的任意一次响应用户请求访问网络服务器时,将所述定位信息加入至向所述网络服务器发起的原始查询请求中,并发送至所述网络服务器。As a further improvement of the present invention, the step S3 is specifically: when the mobile terminal responds to a user's request to access a network server any time after storing the location information, add the location information to the request initiated to the network server in the original query request and sent to the web server.

作为本发明的进一步改进,所述S3步骤具体为:所述移动终端在存储所述定位信息后的第一次响应用户请求访问网络服务器时,将所述定位信息加入至向所述网络服务器发起的原始查询请求中,并发送至所述网络服务器。As a further improvement of the present invention, the step S3 specifically includes: when the mobile terminal responds to a user's request to access a network server for the first time after storing the location information, add the location information to the in the original query request and sent to the web server.

作为本发明的进一步改进,在所述S3步骤后,还包括:As a further improvement of the present invention, after the step S3, it also includes:

还原所述原始查询请求和所述定位信息;restore the original query request and the positioning information;

将所述定位信息发送至定位数据库。Send the positioning information to a positioning database.

作为本发明的进一步改进,所述S2步骤具体包括:As a further improvement of the present invention, the S2 step specifically includes:

将所述定位信息组合为字符串;combining the positioning information into a character string;

将所述字符串存储于所述移动终端。storing the character string in the mobile terminal.

作为本发明的进一步改进,在所述“将所述字符串存储于所述移动终端”步骤前,还包括:As a further improvement of the present invention, before the step of "storing the character string in the mobile terminal", it also includes:

将所述字符串通过代码加密方式进行加密。The character string is encrypted by means of code encryption.

作为本发明的进一步改进,所述“将所述定位信息发送至定位数据库”具体包括:As a further improvement of the present invention, the "sending the positioning information to the positioning database" specifically includes:

解密所述定位信息;decrypt the positioning information;

将所述定位信息发送至定位数据库。Send the positioning information to a positioning database.

作为本发明的进一步改进,在“还原所述原始查询请求和所述定位信息”步骤后,还包括:As a further improvement of the present invention, after the step of "restoring the original query request and the positioning information", it also includes:

执行所述原始查询请求;Execute the original query request;

将查询结果返回所述移动终端。return the query result to the mobile terminal.

作为本发明的进一步改进,所述S3步骤还包括:As a further improvement of the present invention, the S3 step also includes:

扫描与当前位置相关的定位信息。Scan for positioning information related to the current location.

作为本发明的进一步改进,所述原始查询请求为URL请求。As a further improvement of the present invention, the original query request is a URL request.

作为本发明的进一步改进,所述S3步骤具体包括:As a further improvement of the present invention, the S3 step specifically includes:

移动终端访问网络服务器;The mobile terminal accesses the network server;

判断所述定位信息是否与最近上传的定位信息一致或所述定位信息是否为最近上传的定位信息的子集;Judging whether the positioning information is consistent with the most recently uploaded positioning information or whether the positioning information is a subset of the most recently uploaded positioning information;

若是,则不将所述定位信息加入至原始查询请求中;If so, the positioning information is not added to the original query request;

若否,则将所述定位信息加入至原始查询请求中,上传至所述网络服务器。If not, adding the positioning information to the original query request and uploading to the network server.

作为本发明的进一步改进,所述网络服务器为非位置服务的网络服务器。As a further improvement of the present invention, the network server is a non-location service network server.

相应地,本发明的一种实施方式的移动终端,包括:Correspondingly, a mobile terminal according to an embodiment of the present invention includes:

扫描模块,用于响应用户请求访问网络服务器,并扫描与当前位置相关的定位信息;The scanning module is used to respond to the user's request to access the network server and scan the positioning information related to the current location;

存储模块,用于将所述定位信息存储;a storage module, configured to store the positioning information;

网络模块,用于所述移动终端在存储所述定位信息后的任意一次访问网络服务器时,将所述定位信息加入至向所述网络服务器发起的原始查询请求中,并发送至所述网络服务器。A network module, configured to add the location information to the original query request initiated to the network server when the mobile terminal accesses the network server any time after storing the location information, and send the location information to the network server .

作为本发明的进一步改进,所述移动终端通过HTTP-POST方式发送至所述网络服务器。As a further improvement of the present invention, the mobile terminal sends to the network server through HTTP-POST.

作为本发明的进一步改进,所述定位信息包括了地理坐标、WIFI信息、基站信息的至少其中之一。As a further improvement of the present invention, the positioning information includes at least one of geographic coordinates, WIFI information, and base station information.

作为本发明的进一步改进,所述定位信息包括了地理坐标、WIFI信息和/或基站信息。As a further improvement of the present invention, the positioning information includes geographical coordinates, WIFI information and/or base station information.

作为本发明的进一步改进,所述网络模块用于所述移动终端在存储所述定位信息后的任意一次响应用户请求访问网络服务器时,将所述定位信息加入至向所述网络服务器发起的原始查询请求中,并发送至所述网络服务器。As a further improvement of the present invention, the network module is used for the mobile terminal to add the location information to the original message sent to the network server any time after the mobile terminal stores the location information in response to a user request to access the network server. In the query request, and sent to the web server.

作为本发明的进一步改进,所述网络模块用于所述移动终端在存储所述定位信息后的第一次响应用户请求访问网络服务器时,将所述定位信息加入至向所述网络服务器发起的原始查询请求中,并发送至所述网络服务器。As a further improvement of the present invention, the network module is used to add the positioning information to the network server initiated by the mobile terminal when the mobile terminal responds to the user's request to access the network server for the first time after storing the positioning information in the original query request and sent to the web server.

作为本发明的进一步改进,所述移动终端还包括:As a further improvement of the present invention, the mobile terminal also includes:

用于将所述定位信息组合为字符串的模块。A module for assembling the location information into a string.

作为本发明的进一步改进,所述移动终端还包括:As a further improvement of the present invention, the mobile terminal also includes:

用于将所述字符串通过代码加密方式进行加密的模块。A module for encrypting the character string through code encryption.

作为本发明的进一步改进,所述原始查询请求为URL请求。As a further improvement of the present invention, the original query request is a URL request.

作为本发明的进一步改进,所述网络模块还用于:As a further improvement of the present invention, the network module is also used for:

判断所述定位信息是否与最近上传的定位信息一致或所述定位信息是否为最近上传的定位信息的子集;Judging whether the positioning information is consistent with the most recently uploaded positioning information or whether the positioning information is a subset of the most recently uploaded positioning information;

若是,则不将所述定位信息加入至原始查询请求中;If so, the positioning information is not added to the original query request;

若否,则将所述定位信息加入至原始查询请求中,上传至所述网络服务器。If not, adding the positioning information to the original query request and uploading to the network server.

作为本发明的进一步改进,所述网络服务器为非位置服务的网络服务器。As a further improvement of the present invention, the network server is a non-location service network server.

相应地,本发明的一种实施方式的系统,包括:Correspondingly, the system of an embodiment of the present invention includes:

如权利要求16至26中任意一项所述的移动终端;以及与所述移动终端通信的网络服务器。A mobile terminal according to any one of claims 16 to 26; and a web server communicating with said mobile terminal.

作为本发明的进一步改进,所述网络服务器包括:As a further improvement of the present invention, the network server includes:

用于还原所述原始查询请求和所述定位信息的模块;A module for restoring the original query request and the positioning information;

用于将所述定位信息发送至定位数据库的模块。A module for sending the positioning information to a positioning database.

作为本发明的进一步改进,所述网络服务器还包括:As a further improvement of the present invention, the network server also includes:

用于执行所述原始查询请求的模块。A module for executing said raw query request.

与现有技术相比,本发明的有益效果是:能够避免WIFI、基站、GPS扫描程序常驻后台,因此节约了大量的系统资源,同时能够做到每次发起请求时都可以瞬间获取定位信息并且上传。Compared with the prior art, the beneficial effect of the present invention is that it can avoid WIFI, base stations, and GPS scanning programs from standing in the background, thus saving a lot of system resources, and at the same time, it can instantly obtain positioning information every time a request is initiated And upload.

附图说明 Description of drawings

图1是本发明一实施方式采集定位信息方法的流程图;Fig. 1 is a flowchart of a method for collecting positioning information according to an embodiment of the present invention;

图2是本发明一实施方式通过采集定位信息方法建立定位数据库的流程图;Fig. 2 is a flow chart of establishing a positioning database through a method of collecting positioning information according to an embodiment of the present invention;

图3是本发明另一实施方式通过采集定位信息方法建立定位数据库的流程图;FIG. 3 is a flow chart of establishing a positioning database through a method of collecting positioning information in another embodiment of the present invention;

图4为本发明一实施方式采集定位信息方法S3步骤的具体流程图;FIG. 4 is a specific flowchart of step S3 of the method for collecting positioning information according to an embodiment of the present invention;

图5为本发明一实施方式的系统架构图。FIG. 5 is a system architecture diagram of an embodiment of the present invention.

具体实施方式 Detailed ways

以下将结合附图所示的各实施方式对本发明进行详细描述。但这些实施方式并不限制本发明,本领域的普通技术人员根据这些实施方式所做出的结构、方法、或功能上的变换均包含在本发明的保护范围内。The present invention will be described in detail below in conjunction with various embodiments shown in the drawings. However, these embodiments do not limit the present invention, and any structural, method, or functional changes made by those skilled in the art according to these embodiments are included in the protection scope of the present invention.

如图1所示,在本发明一实施方式中,所述采集定位信息方法,用于可访问网络的移动终端,所述移动终端可包括手机、笔记本、平板电脑等,其可通过移动网络(GPRS、EDGE、3G等)和/或无线网络(WIFI等)对网络进行访问,所述采集定位信息方法包括:As shown in Figure 1, in one embodiment of the present invention, the method for collecting positioning information is used for mobile terminals that can access the network, and the mobile terminals can include mobile phones, notebooks, tablet computers, etc., which can be accessed through the mobile network ( GPRS, EDGE, 3G, etc.) and/or wireless network (WIFI, etc.) to access the network, the method for collecting positioning information includes:

S1、响应用户请求访问网络服务器,并扫描与当前位置相关的定位信息;优选地,所述网络服务器可是提供位置服务的网络服务器,也可是非位置服务的网络服务器,例如,用户通过移动终端的程序,如地图程序、浏览器等,访问提供位置服务的网络服务器或非位置服务的网络服务器,进而通过网络服务器得到需要的信息。值得一提的是:在本步骤中,当移动终端访问所述网络服务器时/后,所述移动终端还可扫描与用户当前位置相关的定位信息,所述定位信息在本发明一实施方式中可包括地理坐标、WIFI信息、基站信息的至少其中之一,这些定位信息可是通过移动终端自带或外接的GPS模块、WIFI模块、基站模块来进行扫描,当然,在本实施方式中,这些模块也未必全部需要,只要所述移动终端自带或外接至少其中之一即可。在本发明的另外一种实施方式中,所述定位信息包括了地理坐标、WIFI信息和/或基站信息,这些定位信息可是通过移动终端自带或外接的GPS模块、WIFI模块和/或基站模块来进行扫描,在本实施方式中,所述移动终端必须自带或外接GPS模块,以及WIFI模块和基站模块的其中之一。S1. Access the web server in response to the user's request, and scan the positioning information related to the current location; preferably, the web server can be a web server that provides location services, or a web server that does not provide location services. Programs, such as map programs, browsers, etc., access the web server that provides location services or non-location service web servers, and then obtain the required information through the web server. It is worth mentioning that: in this step, when/after the mobile terminal accesses the network server, the mobile terminal can also scan the positioning information related to the current location of the user, and the positioning information is defined in an embodiment of the present invention It can include at least one of geographical coordinates, WIFI information, and base station information. These positioning information can be scanned by the GPS module, WIFI module, and base station module that are attached or external to the mobile terminal. Of course, in this embodiment, these modules Not all of them are necessarily required, as long as the mobile terminal comes with or is connected to at least one of them. In another embodiment of the present invention, the positioning information includes geographic coordinates, WIFI information and/or base station information, and these positioning information can be obtained through the GPS module, WIFI module and/or base station module that comes with or is connected to the mobile terminal. In this embodiment, the mobile terminal must have its own or an external GPS module, and one of the WIFI module and the base station module.

S2、将所述定位信息存储;优选地,在本实施方式中,可将上述采集到的定位信息存储于移动终端内,例如移动终端的存储模块内,优选地,可将所述定位信息存储于所述移动终端的RAM中。S2. Store the positioning information; preferably, in this embodiment, the above-mentioned collected positioning information can be stored in the mobile terminal, for example, in the storage module of the mobile terminal, preferably, the positioning information can be stored in the RAM of the mobile terminal.

S3、所述移动终端在存储所述定位信息后的任意一次访问网络服务器时,将所述定位信息加入至向所述网络服务器发起的原始查询请求中,生成新的查询请求,并发送至所述网络服务器。在本发明的一实施方式中,所述移动终端可通过多次执行S1、S2步骤,在存储多条定位信息后,再通过访问网络服务器,将所述定位信息加入至想所述网络服务器发起的原始查询请求中,发送至所述网络服务器,其中,存储多少条定位信息后再将所述定位信息发送至网络服务器,可通过实际情况进行设定,例如所述移动终端的硬件环境、网络环境等。优选地,在发明的另一实施方式中,所述S3步骤可加入触发条件,即是将所述S3步骤调整为:所述移动终端在存储所述定位信息后的任意一次响应用户请求访问网络服务器时,将所述定位信息加入至向所述网络服务器发起的原始查询请求中,并发送至所述网络服务器。通过本实施方式,可使得上传的次数与用户请求访问网络服务器的次数一致,确保了较好的用户体验,更好的节约了移动终端的系统资源。优选地,在本发明的最佳实施方式中,所述S3步骤为:所述移动终端在存储所述定位信息后的第一次响应用户请求访问网络服务器时,将所述定位信息加入至向所述网络服务器发起的原始查询请求中,并发送至所述网络服务器。通过本实施方式,可有效的保证所述定位信息发送至所述网络服务器,不会造成移动终端开启其他程序时,将所述存储的定位信息强行挤出存储模块导致的定位信息未能来得及发送至网络服务器;同时,本实施方式还可避免批量上传所述定位信息时带来的不便。S3. When the mobile terminal accesses the network server any time after storing the location information, it adds the location information to the original query request initiated to the network server, generates a new query request, and sends it to the the web server described above. In an embodiment of the present invention, the mobile terminal may perform steps S1 and S2 multiple times, store multiple pieces of location information, and then access the network server to add the location information to the network server to initiate In the original query request, it is sent to the network server, and how many pieces of positioning information are stored before sending the positioning information to the network server can be set according to the actual situation, such as the hardware environment of the mobile terminal, network environment etc. Preferably, in another embodiment of the invention, the S3 step can add a trigger condition, that is, the S3 step is adjusted to: the mobile terminal responds to the user's request to access the network any time after storing the location information server, adding the positioning information to the original query request initiated to the network server, and sending it to the network server. Through this embodiment, the number of uploads can be made consistent with the number of times users request to access the network server, ensuring better user experience and better saving system resources of the mobile terminal. Preferably, in the best implementation mode of the present invention, the step S3 is: when the mobile terminal responds to the user's request to access the network server for the first time after storing the location information, add the location information to the In the original query request initiated by the network server, and sent to the network server. Through this embodiment, it can effectively ensure that the positioning information is sent to the network server, and will not cause the stored positioning information to be forced out of the storage module when the mobile terminal starts other programs, resulting in the failure to send the positioning information in time. to the network server; at the same time, this embodiment can also avoid the inconvenience caused by uploading the positioning information in batches.

通过上述的采集位置信息方法,因采集到的位置信息已经存储于移动终端中,故能够做到每次发起请求时都可以瞬间获取定位信息并且上传。Through the above method for collecting location information, since the collected location information has been stored in the mobile terminal, it is possible to instantly obtain location information and upload it every time a request is initiated.

优选地,将所述定位信息加入至向所述网络服务器发起的原始查询请求中,发送至所述网络服务器时,是通过HTTP-POST方式发送至所述网络服务器。以及,优选地,所述原始查询请求为URL请求,例如:http://www.baidu.com。优选地,可通过下述格式加入所述定位信息:将所述加密后的字符串叠加到原始查询请求的最后,并且中间再以一个&loc=连接,即新的查询请求为原始查询请求&loc=字符串。Preferably, the positioning information is added to the original query request initiated to the web server, and when sent to the web server, it is sent to the web server through HTTP-POST. And, preferably, the original query request is a URL request, for example: http://www.baidu.com . Preferably, the positioning information can be added in the following format: the encrypted character string is superimposed on the end of the original query request, and a &loc= is connected in the middle, that is, the new query request is the original query request &loc= string.

值得一提的是:所述S1步骤的网络服务器和所述S3步骤的网络服务器可为同一台网络服务器,也可为不同的网络服务器,所述S3步骤的网络服务器可是提供位置服务的网络服务器,也可是非位置服务的网络服务器。在所述S3步骤为提供位置服务的网络服务器时,可通过下述结合图2具体说明其建立定位数据库的方式;在所述S3步骤为非位置服务的网络服务器时,可通过下述结合图3具体说明其建立定位数据库的方式。It is worth mentioning that: the web server in the S1 step and the web server in the S3 step can be the same web server or different web servers, and the web server in the S3 step can be a web server that provides location services , or a non-location-based web server. When the S3 step is a network server providing location services, the method of establishing a positioning database can be specifically described in conjunction with FIG. 2 below; 3. Explain in detail how it establishes the positioning database.

如图2所示,本发明一实施方式通过采集定位信息方法建立定位数据库的流程图。其中,为建立所述定位数据库,其包括了移动终端10的采集定位信息步骤和网络服务器20b的分析存储步骤,在本实施例中,所述网络服务器为可提供位置服务的网络服务器20b。As shown in FIG. 2 , a flow chart of establishing a positioning database by collecting positioning information in an embodiment of the present invention. Wherein, in order to establish the positioning database, it includes the step of collecting positioning information of the mobile terminal 10 and the step of analyzing and storing the network server 20b. In this embodiment, the network server is the network server 20b that can provide location services.

其中,在所述移动终端10执行的采集定位步骤如上述结合图1所述,包括了S1、S2、S3步骤,其中,S2步骤具体包括:Wherein, the collection and positioning steps performed by the mobile terminal 10 are as described above in conjunction with FIG. 1, including steps S1, S2, and S3, wherein the step S2 specifically includes:

将所述定位信息组合为字符串;优选地,若所述定位信息包括了地理坐标、WIFI信息、基站信息时,在本实施方式中,可将所述信息组合为“&cl=CCCC|C|CCCC|CCCCC&wf=WWWWWW;WWW;|WWWW;WW;&ll=x|y”这样形式的字符串并存储,其中,所述“cl=CCCC|C|CCCC|CCCCC”分别对应基站的四个要素;所述“wf=WWWWWW;WWW;|WWWW;WW”可为一个或多个WIFI的MAC地址和信号强度,“|”用于分割多个不同的WIFI;所述“ll=x|y”为地理坐标的经度|纬度。若所述定位信号只包括了地理坐标、WIFI信息、基站信息的其中之一,或其中之二,也可按照上述形式将其组合为字符串。Combine the positioning information into a character string; preferably, if the positioning information includes geographical coordinates, WIFI information, and base station information, in this embodiment, the information can be combined into "&cl=CCCC|C| CCCC|CCCCC&wf=WWWWWW;WWW;|WWWW;WW;&ll=x|y" and store a character string in the form, wherein, the "cl=CCCC|C|CCCC|CCCCC" respectively correspond to the four elements of the base station; The "wf=WWWWWW; WWW;|WWWW; WW" can be the MAC address and signal strength of one or more WIFIs, and "|" is used to split multiple different WIFIs; the "ll=x|y" is Longitude|latitude of geographic coordinates. If the positioning signal only includes one or two of geographic coordinates, WIFI information, and base station information, it can also be combined into a character string according to the above-mentioned form.

将所述字符串通过代码加密方式进行加密,以免传输过程有不安全因素;优选地,所述代码加密方式为base64+md5加密方式。The character string is encrypted by a code encryption method to avoid unsafe factors in the transmission process; preferably, the code encryption method is a base64+md5 encryption method.

将所述字符串存储于所述移动终端。优选地,在本实施方式中,可将上述加密后的定位信息字符串存储于移动终端内,例如移动终端的存储模块内,优选地,可将所述定位信息存储于所述移动终端的RAM中。storing the character string in the mobile terminal. Preferably, in this embodiment, the above-mentioned encrypted location information character string can be stored in the mobile terminal, for example, in the storage module of the mobile terminal, preferably, the location information can be stored in the RAM of the mobile terminal middle.

此时,可通过S3步骤,将所述定位信息加入至向所述网络服务器20b发起的原始查询请求中,生成新的查询请求,并发送至所述网络服务器20b。在所述网络服务器20b接收到所述移动终端发起的新的查询请求后,可在所述网络服务器20b中执行以下步骤:At this time, the positioning information may be added to the original query request initiated to the network server 20b through step S3 to generate a new query request and send it to the network server 20b. After the network server 20b receives the new query request initiated by the mobile terminal, the following steps can be performed in the network server 20b:

还原所述原始查询请求和所述定位信息;优选地,即是将新的查询请求从后往前解析,例如新的查询请求为:原始查询请求&loc=字符串,按照遇到的第一个&loc分成两组,第一组的内容即为原始查询请求,第二组的内容即为采集到的定位信息。Restore the original query request and the positioning information; preferably, parse the new query request from back to front, for example, the new query request is: original query request &loc=string, according to the first encountered &loc is divided into two groups, the content of the first group is the original query request, and the content of the second group is the collected location information.

执行所述原始查询请求;所述网络服务器将还原后的所述原始查询请求进行查询,并将查询结果返回所述移动终端;Executing the original query request; the network server queries the restored original query request, and returns the query result to the mobile terminal;

以及,解密所述定位信息;所述网络服务器还将所述加密后的定位信息字符串进行解密,并将所述解密后的定位信息发送至定位数据库中存储。当然,若所述字符串在移动终端并未进行加密,则可省略所述解密所述定位信息步骤。And, decrypt the location information; the network server also decrypts the encrypted location information character string, and sends the decrypted location information to a location database for storage. Of course, if the character string is not encrypted at the mobile terminal, the step of decrypting the positioning information can be omitted.

值得一提的是:所述执行原始查询请求、将所述查询结果返回所述移动终端的步骤和所述解密定位信息、将所述定位信息发送至定位数据库中存储的步骤并未逻辑层次上的先后顺序,其可同时执行,也可将任意一个优先执行。It is worth mentioning that: the steps of executing the original query request, returning the query result to the mobile terminal, and the steps of decrypting the positioning information and sending the positioning information to the positioning database are not logically arranged. They can be executed at the same time, or any one can be executed first.

其中,在得到所述定位信息后,若所述定位信息中包括了地理坐标(GPS信息),则可将所述定位信息转换至所述定位数据库中特定的定位信息格式后存储;若所述定位信息中未包括地理坐标(GPS信息),而只有WIFI信息和/或基站信息,则可通过已有的定位数据库中的定位信息,推算出所述WIFI信息和/或所述基站信息的地理坐标,并结合所述推算结果,将所述WIFI信息和/或所述基站信息转换至所述定位数据库中特定的定位信息格式后,存储于所述定位数据库。Wherein, after obtaining the positioning information, if the positioning information includes geographic coordinates (GPS information), the positioning information can be converted into a specific positioning information format in the positioning database and then stored; if the Geographical coordinates (GPS information) are not included in the positioning information, but only WIFI information and/or base station information, then the geographic location of the WIFI information and/or the base station information can be deduced through the positioning information in the existing positioning database Coordinates, combined with the deduction results, after converting the WIFI information and/or the base station information into a specific positioning information format in the positioning database, store it in the positioning database.

如图3所示,本发明另一实施方式通过采集定位信息方法建立定位数据库的流程图。其中,为建立所述定位数据库,其包括了移动终端10的采集定位信息步骤和网络服务器20a的分析查询步骤,以及网络服务器20b的存储步骤,在本实施例中,所述网络服务器20a为非位置服务的网络服务器20a。As shown in FIG. 3 , another embodiment of the present invention is a flow chart of establishing a positioning database through a method of collecting positioning information. Wherein, in order to establish the positioning database, it includes the steps of collecting and positioning information of the mobile terminal 10, the analysis and query step of the network server 20a, and the storage step of the network server 20b. In this embodiment, the network server 20a is a non- Web server 20a for location services.

其中,在所述移动终端10执行的采集定位步骤如上述结合图1所述,包括了S1、S2、S3步骤,其中,S2步骤具体包括:Wherein, the collection and positioning steps performed by the mobile terminal 10 are as described above in conjunction with FIG. 1, including steps S1, S2, and S3, wherein the step S2 specifically includes:

将所述定位信息组合为字符串;优选地,若所述定位信息包括了地理坐标、WIFI信息、基站信息时,在本实施方式中,可将所述信息组合为“&cl=CCCC|C|CCCC|CCCCC&wf=WWWWWW;WWW;|WWWW;WW;&ll=x|y”这样形式的字符串并存储,其中,所述“cl=CCCC|C|CCCC|CCCCC”分别对应基站的四个要素;所述“wf=WWWWWW;WWW;|WWWW;WW”可为一个或多个WIFI的MAC地址和信号强度,“|”用于分割多个不同的WIFI;所述“ll=x|y”为地理坐标的经度|纬度。若所述定位信号只包括了地理坐标、WIFI信息、基站信息的其中之一,或其中之二,也可按照上述形式将其组合为字符串。Combine the positioning information into a character string; preferably, if the positioning information includes geographical coordinates, WIFI information, and base station information, in this embodiment, the information can be combined into "&cl=CCCC|C| CCCC|CCCCC&wf=WWWWWW;WWW;|WWWW;WW;&ll=x|y" and store a character string in the form, wherein, the "cl=CCCC|C|CCCC|CCCCC" respectively correspond to the four elements of the base station; The "wf=WWWWWW; WWW;|WWWW; WW" can be the MAC address and signal strength of one or more WIFIs, and "|" is used to split multiple different WIFIs; the "ll=x|y" is Longitude|latitude of geographic coordinates. If the positioning signal only includes one or two of geographic coordinates, WIFI information, and base station information, it can also be combined into a character string according to the above-mentioned form.

将所述字符串通过代码加密方式进行加密,以免传输过程有不安全因素;优选地,所述代码加密方式为base64+md5加密方式。The character string is encrypted by a code encryption method to avoid unsafe factors in the transmission process; preferably, the code encryption method is a base64+md5 encryption method.

将所述字符串存储于所述移动终端。优选地,在本实施方式中,可将上述加密后的定位信息字符串存储于移动终端内,例如移动终端的存储模块内,优选地,可将所述定位信息存储于所述移动终端的RAM中。storing the character string in the mobile terminal. Preferably, in this embodiment, the above-mentioned encrypted location information character string can be stored in the mobile terminal, for example, in the storage module of the mobile terminal, preferably, the location information can be stored in the RAM of the mobile terminal middle.

此时,可通过S3步骤,将所述定位信息加入至向所述网络服务器20a发起的原始查询请求中,生成新的查询请求,并发送至所述网络服务器20a。在所述网络服务器20a接收到所述移动终端发起的新的查询请求后,可在所述网络服务器20a中执行以下步骤:At this time, the positioning information may be added to the original query request initiated to the network server 20a through step S3 to generate a new query request and send it to the network server 20a. After the network server 20a receives the new query request initiated by the mobile terminal, the following steps can be performed in the network server 20a:

还原所述原始查询请求和所述定位信息;优选地,即是将新的查询请求从后往前解析,例如新的查询请求为:原始查询请求&loc=字符串,按照遇到的第一个&loc分成两组,第一组的内容即为原始查询请求,第二组的内容即为采集到的定位信息。Restore the original query request and the positioning information; preferably, parse the new query request from back to front, for example, the new query request is: original query request &loc=string, according to the first encountered &loc is divided into two groups, the content of the first group is the original query request, and the content of the second group is the collected location information.

执行所述原始查询请求;所述网络服务器将还原后的所述原始查询请求进行查询,并将查询结果返回所述移动终端;Executing the original query request; the network server queries the restored original query request, and returns the query result to the mobile terminal;

以及,将所述定位信息发送至提供位置服务的网络服务器20b中,所述网络服务器20b在接收到所述定位信息后,可执行以下步骤:And, the positioning information is sent to the network server 20b that provides location services, and the network server 20b may perform the following steps after receiving the positioning information:

解密所述定位信息;将所述加密后的定位信息字符串进行解密,并将所述解密后的定位信息发送至定位数据库中存储。当然,若所述字符串在移动终端并未进行加密,则可省略所述解密所述定位信息步骤。Decrypt the location information; decrypt the encrypted location information character string, and send the decrypted location information to a location database for storage. Of course, if the character string is not encrypted at the mobile terminal, the step of decrypting the positioning information can be omitted.

值得一提的是:所述执行原始查询请求、将所述查询结果返回所述移动终端的步骤和将所述定位信息发送至网络服务器20b、在所述网络服务器20b中解密定位信息、将所述定位信息发送至定位数据库中存储的步骤并未逻辑层次上的先后顺序,其可同时执行,也可将任意一个优先执行。It is worth mentioning that: the steps of executing the original query request, returning the query result to the mobile terminal, sending the location information to the network server 20b, decrypting the location information in the network server 20b, and storing the location information The steps of sending the positioning information to the storage in the positioning database are not in a logical order, they can be executed at the same time, and any one can be executed first.

其中,在得到所述定位信息后,若所述定位信息中包括了地理坐标(GPS信息),则可将所述定位信息转换至所述定位数据库中特定的定位信息格式后存储;若所述定位信息中未包括地理坐标(GPS信息),而只有WIFI信息和/或基站信息,则可通过已有的定位数据库中的定位信息,推算出所述WIFI信息和/或所述基站信息的地理坐标,并结合所述推算结果,将所述WIFI信息和/或所述基站信息转换至所述定位数据库中特定的定位信息格式后,存储于所述定位数据库。Wherein, after obtaining the positioning information, if the positioning information includes geographic coordinates (GPS information), the positioning information can be converted into a specific positioning information format in the positioning database and then stored; if the Geographical coordinates (GPS information) are not included in the positioning information, but only WIFI information and/or base station information, then the geographic location of the WIFI information and/or the base station information can be deduced through the positioning information in the existing positioning database Coordinates, combined with the deduction results, after converting the WIFI information and/or the base station information into a specific positioning information format in the positioning database, store it in the positioning database.

如图4所示,在本发明一实施方式中,所述S3步骤具体包括:As shown in Figure 4, in one embodiment of the present invention, the S3 step specifically includes:

S30、移动终端访问网络服务器;所述网络服务器可为图2所述的可提供位置服务的网络服务器20b,也可为图3所述的非位置服务的网络服务器20a。S30. The mobile terminal accesses a network server; the network server may be the network server 20b that can provide location services as shown in FIG. 2, or the network server 20a that does not provide location services as shown in FIG.

S31、判断所述定位信息是否与最近上传的定位信息一致或所述定位信息是否为最近上传的定位信息的子集;因采集定位信息是一个持续性的工作,故每一台移动终端均可在不同的地点采集到不同的位置信息,然而,若将相同的位置信息上传,则不仅浪费了移动终端的网络资源,同时也暂用了网络服务器的带宽,浪费了网络资源,故需要判断当前定位信息是否与最近上传的定位信息一致或所述定位信息是否为最近上传的定位信息的子集。其中,所述最近上传是指与采集到当前定位信息的时间上最接近的一次上传记录。所述与定位信息一致是指采集到的当前定位信息中的各个参数,如地理坐标、WIFI信号、基站信号,与最近上传网络服务器的各个参数,如地理坐标、WIFI信号、基站信号完全一致,即是代表用户是在同一地点采集了两次。所述定位信息的子集是指,采集到的当前定位信息中的WIFI信号和/或基站信号,属于最近上传网络服务器的WIFI信号和/或基站信号的子集,如,采集到的当前定位信息中的WIFI信号包括B、C、D,而最近上传的WIFI信号为A、B、C、D,则认为当前定位信息为最近上传的定位信息的子集。S31. Determine whether the positioning information is consistent with the latest uploaded positioning information or whether the positioning information is a subset of the latest uploaded positioning information; because collecting positioning information is a continuous job, each mobile terminal can Different location information is collected at different locations. However, if the same location information is uploaded, not only the network resources of the mobile terminal are wasted, but also the bandwidth of the network server is temporarily used, which wastes network resources. Therefore, it is necessary to judge the current Whether the location information is consistent with the latest uploaded location information or whether the location information is a subset of the most recently uploaded location information. Wherein, the latest upload refers to an upload record closest to the time when the current positioning information is collected. Consistent with the positioning information means that each parameter in the current positioning information collected, such as geographic coordinates, WIFI signal, and base station signal, is completely consistent with each parameter uploaded to the network server recently, such as geographic coordinates, WIFI signal, and base station signal, It means that the user collected data twice at the same location. The subset of positioning information refers to the WIFI signal and/or base station signal in the collected current positioning information, which belongs to the subset of the WIFI signal and/or base station signal uploaded to the network server recently, for example, the collected current positioning information If the WIFI signals in the information include B, C, and D, and the most recently uploaded WIFI signals are A, B, C, and D, then the current positioning information is considered to be a subset of the most recently uploaded positioning information.

S32、若是,则不将所述定位信息加入至原始查询请求中;一般地,若所述定位信息是否与最近上传的定位信息一致或所述定位信息为最近上传的定位信息的子集,则可推断出用户两次采集信息的地理位置相同或相近,则不将所述定位信息加入原始查询请求中,以节约所述移动终端和所述网络服务器的资源。S32. If yes, do not add the positioning information to the original query request; generally, if the positioning information is consistent with the latest uploaded positioning information or the positioning information is a subset of the latest uploaded positioning information, then It can be inferred that the geographic locations where the user collects information twice are the same or close, and the positioning information is not added to the original query request, so as to save resources of the mobile terminal and the network server.

S33、若否,则将所述定位信息加入至原始查询请求中,发送至所述网络服务器。一般地,若所述定位信息是否与最近上传的定位信息不一致或所述定位信息不为最近上传的定位信息的子集,则可推断出用户两次采集信息的地理位置不相同,则将所述定位信息加入原始查询请求中,上传服务器,以丰富所述定位数据库。S33. If not, add the positioning information to the original query request and send it to the network server. Generally, if the positioning information is inconsistent with the latest uploaded positioning information or the positioning information is not a subset of the latest uploaded positioning information, it can be inferred that the geographic locations where the user collected information twice are not the same, and the The positioning information is added to the original query request and uploaded to the server to enrich the positioning database.

优选地,所述S3步骤还包括扫描与当前位置相关的定位信息步骤(图中未示出),通过此步骤,即可达到了S1步骤的效果,这样,在接下来的步骤中,循环执行S2和S3步骤即可不断的采集到定位信息,并上传至网络服务器。Preferably, the step S3 also includes the step of scanning the positioning information related to the current position (not shown in the figure), through this step, the effect of the step S1 can be achieved, so that in the next step, the loop execution Steps S2 and S3 can continuously collect positioning information and upload it to the network server.

如图5所示,为本发明一实施方式的系统架构图。优选地,本发明的采集定位信息系统包括了移动终端10和与所述移动终端通信的网络服务器20a。As shown in FIG. 5 , it is a system architecture diagram of an embodiment of the present invention. Preferably, the system for collecting and positioning information of the present invention includes a mobile terminal 10 and a network server 20a communicating with the mobile terminal.

其中,所述移动终端10包括:Wherein, the mobile terminal 10 includes:

扫描模块101,用于响应用户请求访问网络服务器,并扫描与当前位置相关的定位信息;优选地,所述网络服务器20可是提供位置服务的网络服务器,也可是非位置服务的网络服务器,例如,用户通过移动终端的程序,如地图程序、浏览器等,访问提供位置服务的网络服务器或非位置服务的网络服务器,进而通过网络服务器得到需要的信息。值得一提的是:在本步骤中,当移动终端10访问所述网络服务器20时/后,所述移动终端10还可扫描与用户当前位置相关的定位信息,所述定位信息在本发明一实施方式中可包括地理坐标、WIFI信息、基站信息的至少其中之一,这些定位信息可是通过移动终端自带或外接的GPS模块、WIFI模块、基站模块来进行扫描,当然,在本实施方式中,这些模块也未必全部需要,只要所述移动终端自带或外接至少其中之一即可。在本发明的另外一种实施方式中,所述定位信息包括了地理坐标、WIFI信息和/或基站信息,这些定位信息可是通过移动终端自带或外接的GPS模块、WIFI模块和/或基站模块来进行扫描,在本实施方式中,所述移动终端必须自带或外接GPS模块,以及WIFI模块和基站模块的其中之一。The scanning module 101 is used to respond to the user's request to access the network server and scan the positioning information related to the current location; preferably, the network server 20 can be a network server that provides location services, or a network server that does not provide location services, for example, The user accesses the network server that provides location service or the network server that does not provide location service through the program of the mobile terminal, such as map program, browser, etc., and then obtains the required information through the network server. It is worth mentioning that: in this step, when/after the mobile terminal 10 accesses the network server 20, the mobile terminal 10 can also scan the positioning information related to the current location of the user, and the positioning information is included in the present invention. The embodiment may include at least one of geographic coordinates, WIFI information, and base station information. These positioning information can be scanned by the GPS module, WIFI module, and base station module that the mobile terminal comes with or externally connected to. Of course, in this embodiment , these modules may not all be required, as long as the mobile terminal comes with or is externally connected to at least one of them. In another embodiment of the present invention, the positioning information includes geographic coordinates, WIFI information and/or base station information, and these positioning information can be obtained through the GPS module, WIFI module and/or base station module that comes with or is connected to the mobile terminal. In this embodiment, the mobile terminal must have its own or an external GPS module, and one of the WIFI module and the base station module.

存储模块102,用于将所述定位信息存储;优选地,在本实施方式中,可将上述采集到的定位信息存储于移动终端10内,例如移动终端的存储模块102内,优选地,所述存储模块102为所述移动终端10的RAM。The storage module 102 is used to store the positioning information; preferably, in this embodiment, the above-mentioned collected positioning information can be stored in the mobile terminal 10, such as in the storage module 102 of the mobile terminal. Preferably, the The storage module 102 is the RAM of the mobile terminal 10 .

网络模块103,用于所述移动终端在存储所述定位信息后的任意一次访问网络服务器时,将所述定位信息加入至向所述网络服务器发起的原始查询请求中,并发送至所述网络服务器。在本发明的一实施方式中,所述移动终端可通过多次执行扫描模块101和存储模块102,在存储多条定位信息后,再通过访问网络服务器,将所述定位信息加入至想所述网络服务器发起的原始查询请求中,发送至所述网络服务器,其中,存储多少条定位信息后再将所述定位信息发送至网络服务器,可通过实际情况进行设定,例如所述移动终端的硬件环境、网络环境等。优选地,在发明的另一实施方式中,所述网络模块103还可用于:所述移动终端在存储所述定位信息后的任意一次响应用户请求访问网络服务器时,将所述定位信息加入至向所述网络服务器发起的原始查询请求中,并发送至所述网络服务器。通过本实施方式,可使得上传的次数与用户请求访问网络服务器的次数一致,确保了较好的用户体验,更好的节约了移动终端的系统资源。优选地,在本发明的最佳实施方式中,所述网络模块103还可用于:所述移动终端在存储所述定位信息后的第一次响应用户请求访问网络服务器时,将所述定位信息加入至向所述网络服务器发起的原始查询请求中,并发送至所述网络服务器。通过本实施方式,可有效的保证所述定位信息发送至所述网络服务器,不会造成移动终端开启其他程序时,将所述存储的定位信息强行挤出存储模块导致的定位信息未能来得及发送至网络服务器;同时,本实施方式还可避免批量上传所述定位信息时带来的不便。The network module 103 is configured to add the positioning information to the original query request initiated to the network server when the mobile terminal accesses the network server any time after storing the positioning information, and send it to the network server. In one embodiment of the present invention, the mobile terminal may execute the scanning module 101 and the storage module 102 multiple times, and after storing multiple pieces of positioning information, then access the network server to add the positioning information to the In the original query request initiated by the network server, it is sent to the network server, wherein, how many pieces of positioning information are stored before sending the positioning information to the network server can be set according to the actual situation, such as the hardware of the mobile terminal environment, network environment, etc. Preferably, in another embodiment of the invention, the network module 103 can also be used to add the positioning information to In the original query request initiated to the web server, and sent to the web server. Through this embodiment, the number of uploads can be made consistent with the number of times users request to access the network server, ensuring better user experience and better saving system resources of the mobile terminal. Preferably, in the best implementation mode of the present invention, the network module 103 can also be used for: when the mobile terminal responds to the user's request to access the network server for the first time after storing the location information, send the location information to added to the original query request initiated to the web server, and sent to the web server. Through this embodiment, it can effectively ensure that the positioning information is sent to the network server, and will not cause the stored positioning information to be forced out of the storage module when the mobile terminal starts other programs, resulting in the failure to send the positioning information in time. to the network server; at the same time, this embodiment can also avoid the inconvenience caused by uploading the positioning information in batches.

优选地,将所述定位信息加入至向所述网络服务器发起的原始查询请求中,发送至所述网络服务器时,是通过HTTP-POST方式发送至所述网络服务器。以及,优选地,所述原始查询请求为URL请求,例如:http://www.baidu.com。优选地,可通过下述格式加入所述定位信息:将所述加密后的字符串叠加到原始查询请求的最后,并且中间再以一个&loc=连接,即新的查询请求为原始查询请求&loc=字符串。Preferably, the positioning information is added to the original query request initiated to the web server, and when sent to the web server, it is sent to the web server through HTTP-POST. And, preferably, the original query request is a URL request, for example: http://www.baidu.com. Preferably, the positioning information can be added in the following format: the encrypted character string is superimposed on the end of the original query request, and a &loc= is connected in the middle, that is, the new query request is the original query request &loc= string.

值得一提的是:在所述扫描模块中响应用户请求访问的网络服务器和所述网络模块中访问的网络服务器可为同一台网络服务器,也可为不同的网络服务器,所述网络模块中访问的网络服务器可是提供位置服务的网络服务器,也可是非位置服务的网络服务器。在所述网络模块中访问的服务器为提供位置服务的网络服务器时,可通过上述结合图2具体说明其建立定位数据库的方式;在所述网络模块中访问的服务器为非位置服务的网络服务器时,可通过上述结合图3具体说明其建立定位数据库的方式。It is worth mentioning that: the network server accessed in response to the user request in the scanning module and the network server accessed in the network module can be the same network server or different network servers. The web server of may be a web server providing location service, or a non-location service web server. When the server accessed in the network module is a network server that provides location services, the method for establishing a location database can be specifically described in conjunction with FIG. 2; when the server accessed in the network module is a network server that is not a location service , the manner in which the positioning database is established can be specifically described by referring to FIG. 3 above.

在本发明一实施方式中,所述移动终端还包括:组合模块104,用于将所述定位信息组合为字符串;优选地,若所述定位信息包括了地理坐标、WIFI信息、基站信息时,在本实施方式中,可将所述信息组合为“&cl=CCCC|C|CCCC|CCCCC&wf=WWWWWW;WWW;|WWWW;WW;&ll=x|y”这样形式的字符串并存储,其中,所述“cl=CCCC|C|CCCC|CCCCC”分别对应基站的四个要素;所述“wf=WWWWWW;WWW;|WWWW;WW”可为一个或多个WIFI的MAC地址和信号强度,“|”用于分割多个不同的WIFI;所述“ll=x|y”为地理坐标的经度|纬度。若所述定位信号只包括了地理坐标、WIFI信息、基站信息的其中之一,或其中之二,也可按照上述形式将其组合为字符串。In an embodiment of the present invention, the mobile terminal further includes: a combining module 104, configured to combine the positioning information into a character string; preferably, if the positioning information includes geographic coordinates, WIFI information, and base station information , in this embodiment, the information can be combined into a character string in the form of "&cl=CCCC|C|CCCC|CCCCC&wf=WWWWWW;WWW;|WWWW;WW;&ll=x|y", wherein, The "cl=CCCC|C|CCCC|CCCC" respectively correspond to the four elements of the base station; the "wf=WWWWWW; WWW; | WWWW; WW" can be one or more WIFI MAC addresses and signal strengths, " |" is used to split multiple different WIFIs; the "ll=x|y" is the longitude|latitude of geographic coordinates. If the positioning signal only includes one or two of geographic coordinates, WIFI information, and base station information, it can also be combined into a character string according to the above-mentioned form.

加密模块105,用于将所述字符串通过代码加密方式进行加密,以免传输过程有不安全因素;优选地,所述代码加密方式为base64+md5加密方式。The encryption module 105 is configured to encrypt the character string by means of code encryption, so as to avoid unsafe factors in the transmission process; preferably, the code encryption method is base64+md5 encryption method.

值得一提的是:所述网络模块103还用于:It is worth mentioning that: the network module 103 is also used for:

判断所述定位信息是否与最近上传的定位信息一致或所述定位信息是否为最近上传的定位信息的子集;因采集定位信息是一个持续性的工作,故每一台移动终端均可在不同的地点采集到不同的位置信息,然而,若将相同的位置信息上传,则不仅浪费了移动终端的网络资源,同时也暂用了网络服务器的带宽,浪费了网络资源,故需要判断当前定位信息是否与最近上传的定位信息一致或所述定位信息是否为最近上传的定位信息的子集。其中,所述最近上传是指与采集到当前定位信息的时间上最接近的一次上传记录。所述与定位信息一致是指采集到的当前定位信息中的各个参数,如地理坐标、WIFI信号、基站信号,与最近上传网络服务器的各个参数,如地理坐标、WIFI信号、基站信号完全一致,即是代表用户是在同一地点采集了两次。所述定位信息的子集是指,采集到的当前定位信息中的WIFI信号和/或基站信号,属于最近上传网络服务器的WIFI信号和/或基站信号的子集,如,采集到的当前定位信息中的WIFI信号包括B、C、D,而最近上传的WIFI信号为A、B、C、D,则认为当前定位信息为最近上传的定位信息的子集,若是,则不将所述定位信息加入至原始查询请求中;一般地,若所述定位信息是否与最近上传的定位信息一致或所述定位信息为最近上传的定位信息的子集,则可推断出用户两次采集信息的地理位置相同或相近,则不将所述定位信息加入原始查询请求中,以节约所述移动终端和所述网络服务器的资源。若否,则将所述定位信息加入至原始查询请求中,发送至所述网络服务器。一般地,若所述定位信息是否与最近上传的定位信息不一致或所述定位信息不为最近上传的定位信息的子集,则可推断出用户两次采集信息的地理位置不相同,则将所述定位信息加入原始查询请求中,上传服务器,以丰富所述定位数据库。Judging whether the positioning information is consistent with the latest uploaded positioning information or whether the positioning information is a subset of the latest uploaded positioning information; because collecting positioning information is a continuous job, each mobile terminal can be in different However, if the same location information is uploaded, it will not only waste the network resources of the mobile terminal, but also temporarily use the bandwidth of the network server, wasting network resources, so it is necessary to judge the current location information Whether it is consistent with the latest uploaded location information or whether the location information is a subset of the latest uploaded location information. Wherein, the latest upload refers to an upload record closest to the time when the current positioning information is collected. Consistent with the positioning information means that each parameter in the current positioning information collected, such as geographic coordinates, WIFI signal, and base station signal, is completely consistent with each parameter uploaded to the network server recently, such as geographic coordinates, WIFI signal, and base station signal, It means that the user collected data twice at the same location. The subset of positioning information refers to the WIFI signal and/or base station signal in the collected current positioning information, which belongs to the subset of the WIFI signal and/or base station signal uploaded to the network server recently, for example, the collected current positioning information The WIFI signals in the information include B, C, and D, and the latest uploaded WIFI signals are A, B, C, and D, then the current positioning information is considered to be a subset of the latest uploaded positioning information, and if so, the positioning information will not be uploaded The information is added to the original query request; generally, if the location information is consistent with the latest uploaded location information or the location information is a subset of the most recently uploaded location information, the geographical location where the user collected the information twice can be deduced If the locations are the same or close, the positioning information is not added to the original query request, so as to save the resources of the mobile terminal and the network server. If not, add the positioning information to the original query request and send it to the network server. Generally, if the positioning information is inconsistent with the latest uploaded positioning information or the positioning information is not a subset of the latest uploaded positioning information, it can be inferred that the geographic locations where the user collected information twice are not the same, and the The positioning information is added to the original query request and uploaded to the server to enrich the positioning database.

所述网络服务器包括:The web server includes:

分析模块202,用于还原所述原始查询请求和所述定位信息的模块;优选地,即是将新的查询请求从后往前解析,例如新的查询请求为:原始查询请求&loc=字符串,按照遇到的第一个&loc分成两组,第一组的内容即为原始查询请求,第二组的内容即为采集到的定位信息。所述分析模块202还用于将所述加密后的定位信息字符串进行解密。The analysis module 202 is used to restore the original query request and the positioning information module; preferably, it parses the new query request from back to front, for example, the new query request is: original query request &loc=string , divided into two groups according to the first &loc encountered, the content of the first group is the original query request, and the content of the second group is the collected location information. The analysis module 202 is also configured to decrypt the encrypted location information string.

网络模块201,用于将所述定位信息发送至定位数据库的模块。其中,所述网络服务器为非位置服务的网络服务器,则所述网络模块201则将所述定位信息发送至可提供位置服务的网络服务器,并通过所述可提供位置服务的网络服务器将所述定位信息存储至定位数据库中。另外,所述网络模块201还用于连接所述移动终端10。The network module 201 is a module configured to send the location information to a location database. Wherein, the network server is a non-location service network server, the network module 201 sends the positioning information to a network server that can provide location services, and sends the location information to the network server that can provide location services. The positioning information is stored in a positioning database. In addition, the network module 201 is also used to connect the mobile terminal 10 .

搜索引擎203,用于执行所述原始查询请求的模块。所述搜索引擎203还将所述查询结果通过所述网络模块201返回至所述移动终端10。The search engine 203 is a module for executing the original query request. The search engine 203 also returns the query result to the mobile terminal 10 through the network module 201 .

为了描述的方便,描述以上装置时以功能分为各种单元分别描述。当然,在实施本申请时可以把各单元的功能在同一个或多个软件和/或硬件中实现。For the convenience of description, when describing the above devices, functions are divided into various units and described separately. Of course, when implementing the present application, the functions of each unit can be realized in one or more pieces of software and/or hardware.

通过以上的实施方式的描述可知,本领域的技术人员可以清楚地了解到本申请可借助软件加必需的通用硬件平台的方式来实现。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施方式或者实施方式的某些部分所述的方法。It can be known from the above description of the implementation manners that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general-purpose hardware platform. Based on this understanding, the essence of the technical solution of this application or the part that contributes to the prior art can be embodied in the form of software products, and the computer software products can be stored in storage media, such as ROM/RAM, disk , CD, etc., including several instructions to make a computer device (which may be a personal computer, server, or network device, etc.) execute the methods described in various embodiments or some parts of the embodiments of this application.

以上所描述的装置实施方式仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施方式方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。The device implementations described above are only illustrative, and the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in One place, or it can be distributed to multiple network elements. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. It can be understood and implemented by those skilled in the art without creative effort.

本申请可用于众多通用或专用的计算系统环境或配置中。例如:个人计算机、服务器计算机、手持设备或便携式设备、平板型设备、多处理器系统、基于微处理器的系统、置顶盒、可编程的消费电子设备、网络PC、小型计算机、大型计算机、包括以上任何系统或设备的分布式计算环境等等。The application can be used in numerous general purpose or special purpose computing system environments or configurations. Examples: personal computers, server computers, handheld or portable devices, tablet-type devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, including A distributed computing environment for any of the above systems or devices, etc.

本申请可以在由计算机执行的计算机可执行指令的一般上下文中描述,例如程序模块。一般地,程序模块包括执行特定任务或实现特定抽象数据类型的例程、程序、对象、组件、数据结构等等。也可以在分布式计算环境中实践本申请,在这些分布式计算环境中,由通过通信网络而被连接的远程处理设备来执行任务。在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存储介质中。This application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including storage devices.

应当理解,虽然本说明书按照实施方式加以描述,但并非每个实施方式仅包含一个独立的技术方案,说明书的这种叙述方式仅仅是为清楚起见,本领域技术人员应当将说明书作为一个整体,各实施方式中的技术方案也可以经适当组合,形成本领域技术人员可以理解的其他实施方式。It should be understood that although this description is described according to implementation modes, not each implementation mode only contains an independent technical solution, and this description in the description is only for clarity, and those skilled in the art should take the description as a whole, and each The technical solutions in the embodiments can also be properly combined to form other embodiments that can be understood by those skilled in the art.

上文所列出的一系列的详细说明仅仅是针对本发明的可行性实施方式的具体说明,它们并非用以限制本发明的保护范围,凡未脱离本发明技艺精神所作的等效实施方式或变更均应包含在本发明的保护范围之内。The series of detailed descriptions listed above are only specific descriptions for feasible implementations of the present invention, and they are not intended to limit the protection scope of the present invention. Any equivalent implementation or implementation that does not depart from the technical spirit of the present invention All changes should be included within the protection scope of the present invention.

Claims (27)

1. gather a method for locating information, for the mobile terminal of addressable network, it is characterized in that, the method for described collection locating information comprises the following steps:
S1, the response user request access webserver, and the locating information that scanning is relevant to current location;
S2, described locating information to be stored;
Described locating information, when storing any secondary response user request access webserver after described locating information, is added in the original query initiated to the described webserver, and is sent to the described webserver by S3, described mobile terminal.
2. method according to claim 1, is characterized in that, described mobile terminal is sent to the described webserver by HTTP-POST mode.
3. method according to claim 1, is characterized in that, described locating information include geographical coordinate, WIFI information, base station information at least one of them.
4. method according to claim 1, is characterized in that, described locating information includes geographical coordinate, WIFI information and/or base station information.
5. method according to claim 1, it is characterized in that, described S3 step is specially: when the first time of described mobile terminal after storing described locating information responds user's request access webserver, described locating information is added in the original query initiated to the described webserver, and is sent to the described webserver.
6. method according to claim 1, is characterized in that, after described S3 step, also comprises:
Reduce described original query and described locating information;
Described locating information is sent to location database.
7. method according to claim 6, is characterized in that, described S2 step specifically comprises:
Described locating information is combined as character string;
Described character string is stored in described mobile terminal.
8. method according to claim 7, is characterized in that, before described " described character string is stored in described mobile terminal " step, also comprises:
Described character string is encrypted by code encryption mode.
9. method according to claim 8, is characterized in that, described " described locating information is sent to location database " specifically comprises:
Decipher described locating information;
Described locating information is sent to location database.
10. method according to claim 6, is characterized in that, after " reduce described original query and described locating information " step, also comprises:
Perform described original query;
Query Result is returned described mobile terminal.
11. methods according to claim 1, is characterized in that, described S3 step also comprises:
Scan the locating information relevant to current location.
12. methods according to claim 1, is characterized in that, described original query is URL request.
13. methods according to claim 12, is characterized in that, described S3 step specifically comprises:
Mobile terminal network visiting server;
Judge that whether whether consistent with the locating information uploaded recently or the described locating information of described locating information is the subset of the locating information uploaded recently;
If so, then described locating information is not added in original query;
If not, then described locating information is added in original query, is sent to the described webserver.
14. methods according to claim 1, is characterized in that, the described webserver is the webserver of non-location service.
15. 1 kinds of mobile terminals gathering locating information, described mobile terminal addressable network, is characterized in that, described mobile terminal comprises:
Scan module, for responding user's request access webserver, and the locating information that scanning is relevant to current location;
Memory module, for storing described locating information;
Mixed-media network modules mixed-media, for described mobile terminal when storing any secondary response user request access webserver after described locating information, described locating information is added in the original query initiated to the described webserver, and is sent to the described webserver.
16. mobile terminals according to claim 15, is characterized in that, described mobile terminal is sent to the described webserver by HTTP-POST mode.
17. mobile terminals according to claim 15, is characterized in that, described locating information include geographical coordinate, WIFI information, base station information at least one of them.
18. mobile terminals according to claim 15, is characterized in that, described locating information includes geographical coordinate, WIFI information and/or base station information.
19. mobile terminals according to claim 15, it is characterized in that, when described mixed-media network modules mixed-media responds user's request access webserver for the first time of described mobile terminal after storing described locating information, described locating information is added in the original query initiated to the described webserver, and is sent to the described webserver.
20. mobile terminals according to claim 15, is characterized in that, described mobile terminal also comprises:
For described locating information being combined as the module of character string.
21. mobile terminals according to claim 20, is characterized in that, described mobile terminal also comprises:
For the module that described character string is encrypted by code encryption mode.
22. mobile terminals according to claim 15, is characterized in that, described original query is URL request.
23. mobile terminals according to claim 22, is characterized in that, described mixed-media network modules mixed-media also for:
Judge that whether whether consistent with the locating information uploaded recently or the described locating information of described locating information is the subset of the locating information uploaded recently;
If so, then described locating information is not added in original query;
If not, then described locating information is added in original query, is sent to the described webserver.
24. mobile terminals according to claim 15, is characterized in that, the described webserver is the webserver of non-location service.
25. 1 kinds of systems gathering locating information, it is characterized in that, described system comprises: as the mobile terminal in claim 15 to 24 as described in any one; And with the webserver of described communication of mobile terminal.
26. systems according to claim 25, is characterized in that, the described webserver comprises:
For reducing the module of described original query and described locating information;
For described locating information being sent to the module of location database.
27. systems according to claim 26, is characterized in that, the described webserver also comprises:
For performing the module of described original query.
CN201110141379.4A 2011-05-27 2011-05-27 Method, mobile terminal and system for acquiring positioning information Active CN102186143B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110141379.4A CN102186143B (en) 2011-05-27 2011-05-27 Method, mobile terminal and system for acquiring positioning information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110141379.4A CN102186143B (en) 2011-05-27 2011-05-27 Method, mobile terminal and system for acquiring positioning information

Publications (2)

Publication Number Publication Date
CN102186143A CN102186143A (en) 2011-09-14
CN102186143B true CN102186143B (en) 2015-01-07

Family

ID=44572201

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110141379.4A Active CN102186143B (en) 2011-05-27 2011-05-27 Method, mobile terminal and system for acquiring positioning information

Country Status (1)

Country Link
CN (1) CN102186143B (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103377205A (en) * 2012-04-18 2013-10-30 腾讯科技(深圳)有限公司 Method and device for executing scheduled tasks
CN103841599B (en) * 2012-11-27 2017-03-15 北京百度网讯科技有限公司 The appraisal procedure and system of wireless location ability
CN103885955B (en) * 2012-12-19 2017-11-21 中国电信股份有限公司 WiFi positioning datums collecting method, system and collection client
CN104426937A (en) * 2013-08-26 2015-03-18 何愈 Method for locating content recorded by other equipment through mobile phone and cloud computation
CN104359495A (en) * 2014-11-20 2015-02-18 百度在线网络技术(北京)有限公司 Application testing method and device
CN106332272B (en) 2015-07-01 2020-02-18 Oppo广东移动通信有限公司 Method and device for positioning
CN106535318B (en) * 2015-09-10 2020-01-17 展讯通信(上海)有限公司 Mobile terminal and positioning method thereof
CN106535317B (en) * 2015-09-10 2019-12-17 展讯通信(上海)有限公司 Mobile terminal and positioning method thereof
CN106535321B (en) * 2015-09-10 2019-11-12 展讯通信(上海)有限公司 Mobile terminal and its localization method
CN106535320B (en) * 2015-09-10 2019-12-17 展讯通信(上海)有限公司 Mobile terminal and positioning method thereof
CN106535111B (en) * 2015-09-10 2019-12-17 展讯通信(上海)有限公司 mobile terminal and positioning method thereof
CN110209673B (en) * 2019-05-31 2022-01-28 四川长虹电器股份有限公司 Method for storing, converting and inquiring positioning data
CN115379384B (en) * 2022-10-27 2023-02-28 武汉格蓝若智能技术股份有限公司 A high-precision network positioning method, system, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1402443A (en) * 2001-08-06 2003-03-12 株式会社电装 Radio communication terminal unit and method for sending locating information
CN101666872A (en) * 2009-09-16 2010-03-10 深圳市融创天下科技发展有限公司 Video locating method and system of vehicles
CN101835258A (en) * 2010-04-21 2010-09-15 张磊 Mobile terminal positioning method and system independent of base station positioning information

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101025440A (en) * 2006-02-24 2007-08-29 仇伟军 GPS and mobile communication network combined positioning method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1402443A (en) * 2001-08-06 2003-03-12 株式会社电装 Radio communication terminal unit and method for sending locating information
CN101666872A (en) * 2009-09-16 2010-03-10 深圳市融创天下科技发展有限公司 Video locating method and system of vehicles
CN101835258A (en) * 2010-04-21 2010-09-15 张磊 Mobile terminal positioning method and system independent of base station positioning information

Also Published As

Publication number Publication date
CN102186143A (en) 2011-09-14

Similar Documents

Publication Publication Date Title
CN102186143B (en) Method, mobile terminal and system for acquiring positioning information
US10558623B2 (en) Search engine optimization for resource directory
US10805875B2 (en) Method and apparatus for automatically selecting network according to tariff, server, and terminal
EP2853102B1 (en) Location-based group generation method, apparatus and system
US20160112487A1 (en) Data annotation as a service for iot systems
CN104639498B (en) Method, device and system for fingerprint matching
CN102802116A (en) Information pushing method and server as well as system
CN102843642B (en) Method for realizing end-to-end information push by using geographic signal feature cluster
CN107534940A (en) Power management by automatically turning off non-essential radios
US20140221009A1 (en) Method, system and apparatus for collecting location information
CN111263338A (en) Network distribution method of Bluetooth Mesh network and related network distribution equipment and system
CN107454126B (en) Message pushing method, server and terminal
CN102916854A (en) Traffic statistical method and device and proxy server
CN106534240A (en) CDN resource scheduling method, server and client
EP3520371A1 (en) Storing and retrieving the network context of a device
CN105162888B (en) The long-range method for tracing of intelligent wearable device, terminal and server
CN105069669A (en) Flow transaction method and system based on WiFi
CN104598503A (en) Geographic information data inquiry method, device and system
CN102802258A (en) Method, server and system for extending locating database
US9877295B2 (en) Method and apparatus for recording information from a plurality of mobile devices in an area
US20160150425A1 (en) System and method of providing a synthetic transaction platform for analyzing communication between a mobile device and a wireless network
CN105357654B (en) Beidou-based emergency communication service system and working method thereof
US12155541B2 (en) Data sample template (DST) management for enabling fog-based data processing
US12256303B2 (en) Systems and methods for emergency broadcast using delegated discovery
WO2012129887A1 (en) Method, system, and terminal for data downloading

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant