[go: up one dir, main page]

CN106507482A - A network positioning method and terminal equipment - Google Patents

A network positioning method and terminal equipment Download PDF

Info

Publication number
CN106507482A
CN106507482A CN201611117792.6A CN201611117792A CN106507482A CN 106507482 A CN106507482 A CN 106507482A CN 201611117792 A CN201611117792 A CN 201611117792A CN 106507482 A CN106507482 A CN 106507482A
Authority
CN
China
Prior art keywords
wifi
terminal device
information
location server
positioning
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.)
Granted
Application number
CN201611117792.6A
Other languages
Chinese (zh)
Other versions
CN106507482B (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201611117792.6A priority Critical patent/CN106507482B/en
Publication of CN106507482A publication Critical patent/CN106507482A/en
Priority to PCT/CN2017/105149 priority patent/WO2018103443A1/en
Application granted granted Critical
Publication of CN106507482B publication Critical patent/CN106507482B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W64/00Locating users or terminals or network equipment for network management purposes, e.g. mobility management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/02Hierarchically pre-organised networks, e.g. paging networks, cellular networks, WLAN [Wireless Local Area Network] or WLL [Wireless Local Loop]
    • H04W84/10Small scale networks; Flat hierarchical networks
    • H04W84/12WLAN [Wireless Local Area Networks]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The invention discloses a kind of network locating method, including:When detecting position-sensing switch and being opened, the N number of Wifi around end of scan equipment, to obtain the information of N number of Wifi, the N is the integer more than 1;During N number of Wifi is scanned, start positioning function;When terminating to scan N number of Wifi, positioning instruction is sent to location server, the positioning instruction carries the information of N number of Wifi, and the positioning instruction is used for indicating that the location server determines the current geographic position of the terminal device according to the information of N number of Wifi;The current geographic position of the terminal device that the location server is returned is received for the positioning instruction.The embodiment of the present invention additionally provides a kind of terminal device.Time required for positioning can be shortened using the embodiment of the present invention.

Description

一种网络定位方法及终端设备A network positioning method and terminal equipment

技术领域technical field

本发明涉及电子技术领域,尤其涉及一种网络定位方法及终端设备。The present invention relates to the field of electronic technology, in particular to a network positioning method and terminal equipment.

背景技术Background technique

大部分移动终端平台(比如ISO平台或者Android平台等),均配备Wifi芯片,支持连接路由器上网。现在拍照或者发朋友圈已经成为多数人的生活习惯,在上传照片或者发朋友圈的时候会需要获取当时的网络位置。Most mobile terminal platforms (such as ISO platform or Android platform, etc.) are equipped with Wifi chips, which support connecting routers to the Internet. Now taking pictures or posting to Moments has become a living habit of most people. When uploading photos or posting to Moments, you will need to obtain the current network location.

通常在定位开关关闭的情况下,用户需要先打开定位开关,然后开启定位服务,再然后启动Wifi模块对Wifi进行扫描,以获取到Wifi的信息,然后再将这些Wifi的信息给服务器,服务器再基于这些Wifi信息确定位置,可见,整个定位过程需要一定的时间,因此如何加快定位所需要的时间是本领域亟待解决的技术问题。Usually when the location switch is turned off, the user needs to turn on the location switch first, then start the location service, and then start the Wifi module to scan the Wifi to obtain the Wifi information, and then send the Wifi information to the server, and the server then The location is determined based on the Wifi information. It can be seen that the entire positioning process takes a certain amount of time, so how to speed up the time required for positioning is a technical problem to be solved urgently in this field.

发明内容Contents of the invention

本发明实施例提供一种网络定位方法及终端设备,以期缩短定位所需要的时间。Embodiments of the present invention provide a network positioning method and terminal equipment, in order to shorten the time required for positioning.

第一方面,本发明实施例提供一种网络定位方法,其特征在于,包括:In the first aspect, an embodiment of the present invention provides a network positioning method, which is characterized in that it includes:

在检测到定位开关被打开时,扫描终端设备周围的N个Wifi,以获取所述N个Wifi的信息,所述N为大于1的整数;When it is detected that the positioning switch is turned on, scan N Wifis around the terminal device to obtain the information of the N Wifis, where N is an integer greater than 1;

在扫描所述N个Wifi的过程中,启动定位功能;In the process of scanning the N Wifis, start the positioning function;

在结束扫描所述N个Wifi时,向位置服务器发送定位指令,所述定位指令携带所述N个Wifi的信息,所述定位指令用于指示所述位置服务器根据所述N个Wifi的信息确定所述终端设备的当前地理位置;When the scanning of the N Wifis ends, a positioning instruction is sent to the location server, the positioning instruction carries the information of the N Wifis, and the positioning instruction is used to instruct the location server to determine according to the information of the N Wifis the current geographic location of the terminal device;

接收所述位置服务器针对所述定位指令而返回的所述终端设备的当前地理位置。receiving the current geographic location of the terminal device returned by the location server for the positioning instruction.

第二方面,本发明实施例提供一种终端设备,包括:In a second aspect, an embodiment of the present invention provides a terminal device, including:

扫描模块,用于在检测到定位开关被打开时,扫描终端设备周围的N个Wifi,以获取所述N个Wifi的信息,所述N为大于1的整数;A scanning module, configured to scan N Wifis around the terminal device when it is detected that the positioning switch is turned on, to obtain information about the N Wifis, where N is an integer greater than 1;

启动模块,用于在扫描所述N个Wifi的过程中,启动定位功能;A startup module, configured to start a positioning function during the process of scanning the N Wifis;

发送模块,用于在结束扫描所述N个Wifi时,向位置服务器发送定位指令,所述定位指令携带所述N个Wifi的信息,所述定位指令用于指示所述位置服务器根据所述N个Wifi的信息确定所述终端设备的当前地理位置;A sending module, configured to send a positioning instruction to a location server when the scanning of the N Wifis ends, the positioning instruction carries information of the N Wifis, and the positioning instruction is used to instruct the location server according to the N The information of a Wifi determines the current geographic location of the terminal device;

接收模块,用于接收所述位置服务器针对所述定位指令而返回的所述终端设备的当前地理位置。A receiving module, configured to receive the current geographic location of the terminal device returned by the location server for the positioning instruction.

第三方面,本发明实施例提供了一种终端设备,包括:In a third aspect, an embodiment of the present invention provides a terminal device, including:

存储有可执行程序代码的存储器;a memory storing executable program code;

与所述存储器耦合的处理器;a processor coupled to the memory;

所述处理器调用所述存储器中存储的所述可执行程序代码,执行如本发明实施例第一方面中所描述的部分或全部步骤。The processor invokes the executable program code stored in the memory to execute part or all of the steps described in the first aspect of the embodiments of the present invention.

第四方面,本发明提供一种计算机存储介质,用于储存为本发明实施例第三方面提供的终端设备所用的计算机软件指令,其包含用于执行上述方面所设计的程序。In a fourth aspect, the present invention provides a computer storage medium for storing computer software instructions used by the terminal device provided in the third aspect of the embodiment of the present invention, which includes a program designed to execute the above aspect.

可见,相较于现有技术,本发明提供的方案无需在启动定位功能后,再对Wifi进行扫描,而是在检测到定位开关被打开时,直接对Wifi进行扫描,然后在Wifi扫描的过程中,启动定位功能,最后在结束Wifi扫描后,将获取到的Wifi的信息给位置服务器,位置服务器基于这些信息确定地理位置,然后将这个地理位置返回给终端设备,进而缩短了定位所需时间。It can be seen that compared with the prior art, the solution provided by the present invention does not need to scan the Wifi after the positioning function is activated, but directly scans the Wifi when the positioning switch is detected to be turned on, and then scans the Wifi during the Wifi scanning process. , start the positioning function, and finally, after the Wifi scanning is completed, the acquired Wifi information is sent to the location server, and the location server determines the geographic location based on the information, and then returns the geographic location to the terminal device, thus shortening the time required for positioning .

本发明的这些方面或其他方面在以下实施例的描述中会更加简明易懂。These or other aspects of the present invention will be more clearly understood in the description of the following embodiments.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. Those skilled in the art can also obtain other drawings based on these drawings without creative work.

图1为本发明实施例提供的一种通信系统示意图;FIG. 1 is a schematic diagram of a communication system provided by an embodiment of the present invention;

图2为本发明一实施例提供的一种网络定位方法的流程示意图;FIG. 2 is a schematic flowchart of a network positioning method provided by an embodiment of the present invention;

图3为本发明一实施例提供的一种网络定位方法的流程示意图;FIG. 3 is a schematic flowchart of a network positioning method provided by an embodiment of the present invention;

图4为本发明一实施例提供的一种终端设备的结构示意图;FIG. 4 is a schematic structural diagram of a terminal device provided by an embodiment of the present invention;

图5为本发明一实施例提供的一种终端设备的结构示意图;FIG. 5 is a schematic structural diagram of a terminal device provided by an embodiment of the present invention;

图6为本发明一实施例提供的一种终端设备的结构示意图。FIG. 6 is a schematic structural diagram of a terminal device provided by an embodiment of the present invention.

具体实施方式detailed description

为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分的实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。In order to enable those skilled in the art to better understand the solutions of the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only It is an embodiment of a part of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts shall fall within the protection scope of the present invention.

以下分别进行详细说明。Each will be described in detail below.

本发明的说明书和权利要求书及所述附图中的术语“第一”、“第二”、“第三”和“第四”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first", "second", "third" and "fourth" in the description and claims of the present invention and the drawings are used to distinguish different objects, rather than to describe a specific order . Furthermore, the terms "include" and "have", as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but optionally also includes unlisted steps or units, or optionally further includes For other steps or units inherent in these processes, methods, products or apparatuses.

在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本发明的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。Reference herein to an "embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present invention. The occurrences of this phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is understood explicitly and implicitly by those skilled in the art that the embodiments described herein can be combined with other embodiments.

以下,对本申请中的部分用语进行解释说明,以便于本领域技术人员理解。Hereinafter, some terms used in this application are explained to facilitate the understanding of those skilled in the art.

1)、终端设备,又称之为用户设备(User Equipment,UE),是一种向用户提供语音和/或数据连通性的设备,例如,具有无线连接功能的手持式设备、车载设备等。常见的终端例如包括:手机、平板电脑、笔记本电脑、掌上电脑、移动互联网设备(mobile internetdevice,MID)、可穿戴设备,例如智能手表、智能手环、计步器等。1) Terminal equipment, also called User Equipment (UE), is a device that provides voice and/or data connectivity to users, for example, a handheld device with a wireless connection function, a vehicle-mounted device, and the like. Common terminals include, for example, mobile phones, tablet computers, notebook computers, palmtop computers, mobile internet devices (mobile internet devices, MIDs), wearable devices, such as smart watches, smart bracelets, and pedometers.

2)并行执行是在两条线程上分别执行动作A与动作B,比如,在第一线程上执行动作A,在第二线程上执行动作B,二者可以是同时进行的,也可以是在执行一个动作的过程中执行另一动作。2) Parallel execution is to execute action A and action B on two threads respectively. For example, execute action A on the first thread and execute action B on the second thread. The two can be performed simultaneously or in parallel Executing an action while performing another action.

3)、“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。3), "Multiple" refers to two or more than two. "And/or" describes the association relationship of associated objects, indicating that there may be three types of relationships, for example, A and/or B may indicate: A exists alone, A and B exist simultaneously, and B exists independently. The character "/" generally indicates that the contextual objects are an "or" relationship.

下面结合附图对本申请的实施例进行描述。Embodiments of the present application are described below in conjunction with the accompanying drawings.

请参阅图1,图1是本发明实施例公开的一种通信系统的示意图。图1所示的通信系统包括终端设备110和位置服务器120,其中,当终端设备110检测到定位开关被打开时,终端设备110扫描终端设备110周围的N个Wifi,以获取这N个Wifi的信息(这些信息包括Wifi的MAC地址,终端设备110接收到Wifi的信号强度等),N为大于1的整数,在终端设备110扫描Wifi的过程中,终端设备110启动定位功能,在结束Wifi扫描时,终端设备110向位置服务器120发送定位指令,该定位指令携带这N个Wifi的信息,该定位指令用于指示位置服务器120根据这N个Wifi的信息确定终端设备110的当前地理位置,位置服务器120根据这N个Wifi的信息确定终端设备110的当前地理位置,以及将确定到的终端设备110的当前地理位置返回给终端设备110。Please refer to FIG. 1 . FIG. 1 is a schematic diagram of a communication system disclosed by an embodiment of the present invention. The communication system shown in FIG. 1 includes a terminal device 110 and a location server 120, wherein, when the terminal device 110 detects that the location switch is turned on, the terminal device 110 scans the N Wifis around the terminal device 110 to obtain the location information of the N Wifis. Information (the information includes the MAC address of Wifi, the signal strength of Wifi received by terminal device 110, etc.), N is an integer greater than 1, and in the process of terminal device 110 scanning Wifi, terminal device 110 starts the positioning function, and ends Wifi scanning , the terminal device 110 sends a positioning command to the location server 120, the positioning command carries the information of the N Wifis, and the positioning command is used to instruct the location server 120 to determine the current geographic location of the terminal device 110 according to the information of the N Wifis. The server 120 determines the current geographic location of the terminal device 110 according to the information of the N Wifis, and returns the determined current geographic location of the terminal device 110 to the terminal device 110 .

可见,相较于现有技术的网络定位方法:先打开定位开关,然后开启定位服务,再然后启动Wifi模块对Wifi进行扫描,以获取到Wifi的信息,然后位置服务器基于这些Wifi的信息进行定位,本发明提供的方案无需在启动定位功能后,再对Wifi进行扫描,而是在检测到定位开关被打开时,直接对Wifi进行扫描,然后在Wifi扫描的过程中,启动定位功能,最后在结束Wifi扫描后,将获取到的Wifi的信息给位置服务器,以确定终端设备的位置,进而缩短了定位所需时间。It can be seen that compared with the network positioning method of the prior art: first turn on the positioning switch, then open the positioning service, and then start the Wifi module to scan the Wifi to obtain Wifi information, and then the location server performs positioning based on these Wifi information , the solution provided by the present invention does not need to scan Wifi after starting the positioning function, but directly scans Wifi when the positioning switch is detected to be turned on, and then starts the positioning function during the Wifi scanning process. After the Wifi scanning is finished, the obtained Wifi information is sent to the location server to determine the location of the terminal device, thereby shortening the time required for positioning.

请参见图2,图2为本发明实施例提供的一种网络定位方法的流程示意图,包括以下步骤:Please refer to FIG. 2. FIG. 2 is a schematic flowchart of a network positioning method provided by an embodiment of the present invention, including the following steps:

S201、在检测到定位开关被打开时,所述终端设备扫描终端设备周围的N个Wifi,以获取所述N个Wifi的信息,所述N为大于1的整数。S201. When detecting that the location switch is turned on, the terminal device scans N Wifis around the terminal device to obtain information about the N Wifis, where N is an integer greater than 1.

S202、在扫描所述N个Wifi的过程中,所述终端设备启动定位功能。S202. During the process of scanning the N Wifis, the terminal device starts a positioning function.

S203、在结束扫描所述N个Wifi时,所述终端设备向位置服务器发送定位指令,所述定位指令携带所述N个Wifi的信息,所述定位指令用于指示所述位置服务器根据所述N个Wifi的信息确定所述终端设备的当前地理位置。S203. When the scanning of the N Wifis ends, the terminal device sends a positioning instruction to the location server, the positioning instruction carries the information of the N Wifis, and the positioning instruction is used to instruct the location server according to the The information of the N Wifis determines the current geographic location of the terminal device.

S204、所述位置服务器接收所述定位指令,以及根据所述定位指令携带的所述N个Wifi的信息确定所述终端设备的当前地理位置。S204. The location server receives the positioning instruction, and determines the current geographic location of the terminal device according to the information of the N Wifis carried in the positioning instruction.

S205、所述位置服务器针对所述定位指令而向所述终端设备返回的所述终端设备的当前地理位置,所述终端设备接收所述位置服务器针对所述定位指令而返回的所述终端设备的当前地理位置。S205. The current geographic location of the terminal device returned by the location server to the terminal device in response to the positioning instruction, and the terminal device receives the location of the terminal device returned by the location server in response to the positioning instruction current geographic location.

其中,Wifi的信息例如可以包括Wifi的MAC地址,Wifi的服务集标识(Service SetIdentifier,SSID),终端设备接收到Wifi的信号强度等等。Wherein, the Wifi information may include, for example, the MAC address of the Wifi, the service set identifier (Service SetIdentifier, SSID) of the Wifi, the signal strength of the Wifi received by the terminal device, and the like.

本发明实施例中,由于以上步骤S201所述终端设备扫描终端设备周围的N个Wifi和以上步骤S202所述终端设备启动定位功能是并行执行的,这样的话就有可能在开启定位功能的时候,终端设备已完成Wifi的扫描,相较于现有技术,本方案节省了Wifi的扫描所需时间,进而缩短了定位所需要的时间。In the embodiment of the present invention, since the terminal device in the above step S201 scans the N Wifis around the terminal device and the terminal device in the above step S202 starts the positioning function in parallel, so it is possible that when the positioning function is enabled, The terminal device has completed Wifi scanning. Compared with the prior art, this solution saves the time required for Wifi scanning, thereby shortening the time required for positioning.

可选地,所述终端设备扫描终端设备周围的N个Wifi的具体实施方式为:所述终端设备发送约定广播;在所述终端设备的Wifi模块接收到所述约定广播时,所述终端设备通过所述终端设备的Wifi模块扫描终端设备周围的N个Wifi。Optionally, the specific implementation manner of the terminal device scanning the N Wifis around the terminal device is: the terminal device sends an appointment broadcast; when the Wifi module of the terminal device receives the appointment broadcast, the terminal device Scanning N Wifis around the terminal device through the Wifi module of the terminal device.

可选地,3、根据权利要求1或2所述的方法,其特征在于,所述终端设备中关联记录有目标地理位置和M个Wifi的信息,其中,所述目标地理位置和所述M个Wifi的信息是当在预设时长内所述位置服务器返回给所述终端设备的地理位置为目标地理位置的次数超过预设阈值时,所述终端设备关联记录的。Optionally, 3. The method according to claim 1 or 2, characterized in that the terminal device is associated with recorded target geographic location and M Wifi information, wherein the target geographic location and the M The Wifi information is associated and recorded by the terminal device when the number of times the location server returns to the terminal device as the target geographic location within a preset period of time exceeds a preset threshold.

其中,预设时长例如可以是1天、2天、4天、5天、8天或是其他值。Wherein, the preset duration can be, for example, 1 day, 2 days, 4 days, 5 days, 8 days or other values.

其中,预设阈值例如可以是10次、12次、13次、16次、18次或是其他值。Wherein, the preset threshold may be, for example, 10 times, 12 times, 13 times, 16 times, 18 times or other values.

可选地,所述向位置服务器发送定位指令之前,所述方法还包括:Optionally, before sending the positioning instruction to the location server, the method further includes:

将所述N个Wifi的信息与所述M个Wifi的信息进行对比;Comparing the information of the N Wifis with the information of the M Wifis;

若所述N个Wifi的中不存在W个Wifi的信息与所述M个Wifi中的W个Wifi的信息相匹配,则向位置服务器发送定位指令,所述W大于或等于所述M/2。If there is no W Wifi information in the N Wifis that matches the W Wifi information in the M Wifis, a positioning instruction is sent to the location server, and the W is greater than or equal to the M/2 .

可选地,所述方法还包括:Optionally, the method also includes:

若所述N个Wifi中存在W个Wifi的信息与所述M个Wifi中的W个Wifi的信息相匹配,则将所述目标地理位置作为所述终端设备的当前地理位置。If the information of W Wifis in the N Wifis matches the information of W Wifis in the M Wifis, the target geographic location is used as the current geographic location of the terminal device.

举例来说,假设预设时长为2天,预设阈值为13次,目标地理位置为A,M=5,假如在2天内位置服务器返回给终端设备的地理位置为A的次数超过13次时,那代表用户经常在位置A,此时,终端设备可将位置A和用于确定位置A和这5个Wifi的信息进行关联记录,以便于后续使用。For example, assuming that the preset duration is 2 days, the preset threshold is 13 times, the target geographic location is A, and M=5, if the location server returns to the terminal device that the geographic location is A for more than 13 times within 2 days , which means that the user is often at location A. At this time, the terminal device can associate and record location A and the information used to determine location A and the 5 Wifis for subsequent use.

比如,假设N=6,W=4,假如当前终端设备扫描到的6个Wifi中存在4个Wifi的信息与终端设备记录的5个Wifi中的4个Wifi的信息相匹配,那代表用户当前所在的位置是位置A,此时,终端设备直接将位置A作为终端设备当前地理位置即可,无需再将这6个Wifi的信息发送给位置服务器进行位置确定,进一步缩短了定位所需要的时间。假如当前终端设备扫描到的6个Wifi中不存在4个Wifi的信息与终端设备记录的5个Wifi中的4个Wifi的信息相匹配,那代表用户当前所在的位置可能不是位置A,此时,终端设备将这6个Wifi的信息发送给位置服务器进行位置确定即可。For example, assuming N=6, W=4, if the information of 4 of the 6 Wifis scanned by the current terminal device matches the information of 4 of the 5 Wifis recorded by the terminal device, it means that the user is currently The location is location A. At this time, the terminal device can directly use location A as the current geographic location of the terminal device. There is no need to send the information of these 6 Wifis to the location server for location determination, which further shortens the time required for positioning. . If the information of 4 of the 6 Wifis scanned by the current terminal device does not match the information of 4 of the 5 Wifis recorded by the terminal device, it means that the current location of the user may not be location A. , the terminal device sends the information of these 6 Wifis to the location server to determine the location.

可见,相较于现有技术,本发明提供的方案无需在启动定位功能后,再对Wifi进行扫描,而是在检测到定位开关被打开时,直接对Wifi进行扫描,然后在Wifi扫描的过程中,启动定位功能,最后在结束Wifi扫描后,将获取到的Wifi的信息给位置服务器,位置服务器基于这些信息确定地理位置,然后将这个地理位置返回给终端设备,进而缩短了定位所需时间。It can be seen that compared with the prior art, the solution provided by the present invention does not need to scan the Wifi after the positioning function is activated, but directly scans the Wifi when the positioning switch is detected to be turned on, and then scans the Wifi during the Wifi scanning process. , start the positioning function, and finally, after the Wifi scanning is completed, the acquired Wifi information is sent to the location server, and the location server determines the geographic location based on the information, and then returns the geographic location to the terminal device, thus shortening the time required for positioning .

本发明实施例还提供了另一更为详细的方法流程,如图3所示,包括:The embodiment of the present invention also provides another more detailed method flow, as shown in Figure 3, including:

S301、在检测到定位开关被打开时,所述终端设备发送约定广播。S301. When detecting that the positioning switch is turned on, the terminal device sends an appointment broadcast.

S302、在所述终端设备的Wifi模块接收到所述约定广播时,所述终端设备通过所述终端设备的Wifi模块扫描终端设备周围的N个Wifi。S302. When the Wifi module of the terminal device receives the appointment broadcast, the terminal device scans N Wifi around the terminal device through the Wifi module of the terminal device.

S303、在扫描所述N个Wifi的过程中,所述终端设备启动定位功能。S303. During the process of scanning the N Wifis, the terminal device starts a positioning function.

S304、在结束扫描所述N个Wifi时,所述终端将所述N个Wifi的信息与M个Wifi的信息进行对比,所述终端设备中关联记录有目标地理位置和M个Wifi的信息,其中,所述目标地理位置和所述M个Wifi的信息是当在预设时长内所述位置服务器返回给所述终端设备的地理位置为目标地理位置的次数超过预设阈值时,所述终端设备关联记录的。S304. When the scanning of the N Wifis is completed, the terminal compares the information of the N Wifis with the information of the M Wifis, and the information of the target geographic location and the M Wifis are associated and recorded in the terminal device, Wherein, the target geographic location and the information of the M Wifis are when the location server returns to the terminal device within a preset period of time when the geographic location is the target geographic location and the number of times exceeds a preset threshold, the terminal device association records.

若所述N个Wifi中存在W个Wifi的信息与所述M个Wifi中的W个Wifi的信息相匹配,则执行步骤S305。If the information of W Wifis among the N Wifis matches the information of W Wifis among the M Wifis, step S305 is executed.

若所述N个Wifi中不存在W个Wifi的信息与所述M个Wifi中的W个Wifi的信息相匹配,则执行步骤S306~步骤S309。If the information of W Wifis among the N Wifis does not match the information of W Wifis among the M Wifis, step S306 to step S309 are executed.

S305、所述终端设备将所述目标地理位置作为所述终端设备的当前地理位置。S305. The terminal device uses the target geographic location as the current geographic location of the terminal device.

S306、所述终端设备向位置服务器发送定位指令,所述定位指令携带所述N个Wifi的信息,所述定位指令用于指示所述位置服务器根据所述N个Wifi的信息确定所述终端设备的当前地理位置。S306. The terminal device sends a positioning instruction to the location server, the positioning instruction carries the information of the N Wifis, and the positioning instruction is used to instruct the location server to determine the terminal device according to the information of the N Wifis The current geographic location of .

S307、所述位置服务器接收所述定位指令,以及根据所述定位指令携带的所述N个Wifi的信息确定所述终端设备的当前地理位置。S307. The location server receives the positioning instruction, and determines the current geographic location of the terminal device according to the information of the N Wifis carried in the positioning instruction.

S308、所述位置服务器针对所述定位指令而向所述终端设备返回的所述终端设备的当前地理位置,所述终端设备接收所述位置服务器针对所述定位指令而返回的所述终端设备的当前地理位置。S308. The current geographic location of the terminal device returned by the location server to the terminal device in response to the positioning instruction, and the terminal device receives the location of the terminal device returned by the location server in response to the positioning instruction current geographic location.

需要说明的是,图3所示的方法的各个步骤的具体实现过程可参见上述方法所述的具体实现过程,在此不再叙述。It should be noted that, for the specific implementation process of each step of the method shown in FIG. 3 , reference may be made to the specific implementation process described in the above method, and will not be described here again.

本发明实施例还提供了一种终端设备400,如图4所示,包括:The embodiment of the present invention also provides a terminal device 400, as shown in FIG. 4 , including:

扫描模块401,用于在检测到定位开关被打开时,扫描终端设备周围的N个Wifi,以获取所述N个Wifi的信息,所述N为大于1的整数;The scanning module 401 is configured to scan N Wifis around the terminal device to obtain the information of the N Wifis when it is detected that the positioning switch is turned on, and the N is an integer greater than 1;

启动模块402,用于在扫描所述N个Wifi的过程中,启动定位功能;The starting module 402 is used to start the positioning function during the process of scanning the N Wifis;

发送模块403,用于在结束扫描所述N个Wifi时,向位置服务器发送定位指令,所述定位指令携带所述N个Wifi的信息,所述定位指令用于指示所述位置服务器根据所述N个Wifi的信息确定所述终端设备的当前地理位置;The sending module 403 is configured to send a positioning instruction to a location server when the scanning of the N Wifis ends, the positioning instruction carries information about the N Wifis, and the positioning instruction is used to instruct the location server to The information of N Wifis determines the current geographic location of the terminal device;

接收模块404,用于接收所述位置服务器针对所述定位指令而返回的所述终端设备的当前地理位置。The receiving module 404 is configured to receive the current geographic location of the terminal device returned by the location server for the positioning instruction.

可选地,所述扫描模块401具体用于:Optionally, the scanning module 401 is specifically configured to:

发送约定广播;Send an appointment broadcast;

在所述终端设备的Wifi模块接收到所述约定广播时,通过所述终端设备的Wifi模块扫描终端设备周围的N个Wifi。When the Wifi module of the terminal device receives the appointment broadcast, the Wifi module of the terminal device scans N Wifi around the terminal device.

可选地,所述终端设备中关联记录有目标地理位置和M个Wifi的信息,其中,所述目标地理位置和所述M个Wifi的信息是当在预设时长内所述位置服务器返回给所述终端设备的地理位置为目标地理位置的次数超过预设阈值时,所述终端设备关联记录的。Optionally, information about the target geographic location and M Wifis are associated and recorded in the terminal device, wherein the information about the target geographic location and the M Wifis is returned to by the location server within a preset time period. The geographic location of the terminal device is associated and recorded by the terminal device when the number of times of the target geographic location exceeds a preset threshold.

可选地,所述终端设备还包括:Optionally, the terminal device also includes:

对比模块405,用于将所述N个Wifi的信息与所述M个Wifi的信息进行对比;A comparison module 405, configured to compare the information of the N Wifis with the information of the M Wifis;

所述发送模块403具体用于:若所述N个Wifi中不存在W个Wifi的信息与所述M个Wifi中的W个Wifi的信息相匹配,则向位置服务器发送定位指令,所述W大于或等于所述M/2。The sending module 403 is specifically configured to: if the information of W Wifis in the N Wifis does not match the information of W Wifis in the M Wifis, send a positioning instruction to the location server, and the W greater than or equal to the M/2.

可选地,所述终端设备还包括:Optionally, the terminal device further includes:

定位模块406,用于若所述N个Wifi中存在W个Wifi的信息与所述M个Wifi中的W个Wifi的信息相匹配,则将所述目标地理位置作为所述终端设备的当前地理位置。The positioning module 406 is configured to use the target geographic location as the current geographic location of the terminal device if the information of W Wifis among the N Wifis matches the information of W Wifis among the M Wifis Location.

需要说明的是,上述各模块(扫描模块401、启动模块402、发送模块403、接收模块404、对比模块405和定位模块406)用于执行上述方法的相关步骤。It should be noted that the above-mentioned modules (scanning module 401 , starting module 402 , sending module 403 , receiving module 404 , comparing module 405 and positioning module 406 ) are used to execute relevant steps of the above-mentioned method.

在本实施例中,终端设备300是以模块的形式来呈现。这里的“模块”可以指特定应用集成电路(application-specific integrated circuit,ASIC),执行一个或多个软件或固件程序的处理器和存储器,集成逻辑电路,和/或其他可以提供上述功能的器件。此外,以上扫描模块401、启动模块402、发送模块403、接收模块404、对比模块405和定位模块406可通过图5所示的终端设备的处理器401来实现。In this embodiment, the terminal device 300 is presented in the form of modules. The "module" here may refer to an application-specific integrated circuit (ASIC), a processor and memory executing one or more software or firmware programs, an integrated logic circuit, and/or other devices that can provide the above functions . In addition, the above scanning module 401 , starting module 402 , sending module 403 , receiving module 404 , comparing module 405 and positioning module 406 may be implemented by the processor 401 of the terminal device shown in FIG. 5 .

如图5所示,终端设备500可以以图5中的结构来实现,该终端设备500包括至少一个处理器501,至少一个存储器502以及至少一个通信接口503。所述处理器501、所述存储器502和所述通信接口503通过所述通信总线连接并完成相互间的通信。As shown in FIG. 5 , the terminal device 500 may be implemented with the structure in FIG. 5 , and the terminal device 500 includes at least one processor 501 , at least one memory 502 and at least one communication interface 503 . The processor 501 , the memory 502 and the communication interface 503 are connected through the communication bus and complete mutual communication.

处理器501可以是通用中央处理器(CPU),微处理器,特定应用集成电路(application-specific integrated circuit,ASIC),或一个或多个用于控制以上方案程序执行的集成电路。The processor 501 may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the programs in the above solutions.

通信接口503,用于与其他设备或通信网络通信,如以太网,无线接入网(RAN),无线局域网(Wireless Local Area Networks,WLAN)等。The communication interface 503 is used to communicate with other devices or communication networks, such as Ethernet, Radio Access Network (RAN), Wireless Local Area Networks (Wireless Local Area Networks, WLAN) and so on.

存储器502可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器(ElectricallyErasable Programmable Read-Only Memory,EEPROM)、只读光盘(Compact Disc Read-Only Memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器可以是独立存在,通过总线与处理器相连接。存储器也可以和处理器集成在一起。The memory 502 may be a read-only memory (read-only memory, ROM) or other types of static storage devices that can store static information and instructions, a random access memory (random access memory, RAM) or other types that can store information and instructions It can also be an electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), a CD-ROM (Compact Disc Read-Only Memory, CD-ROM) or other optical disk storage, optical disk storage ( including compact discs, laser discs, optical discs, digital versatile discs, blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or can be used to carry or store desired program code in the form of instructions or data structures and can be stored by a computer Any other medium, but not limited to. The memory can exist independently and be connected to the processor through the bus. Memory can also be integrated with the processor.

其中,所述存储器502用于存储执行以上方案的应用程序代码,并由处理器501来控制执行。所述处理器501用于执行所述存储器502中存储的应用程序代码。Wherein, the memory 502 is used to store application program codes for executing the above solutions, and the execution is controlled by the processor 501 . The processor 501 is configured to execute application program codes stored in the memory 502 .

存储器502存储的代码可执行以上提供的终端设备执行的上述网络定位方法,比如在检测到定位开关被打开时,扫描终端设备周围的N个Wifi,以获取所述N个Wifi的信息,所述N为大于1的整数;在扫描所述N个Wifi的过程中,启动定位功能;在结束扫描所述N个Wifi时,向位置服务器发送定位指令,所述定位指令携带所述N个Wifi的信息,所述定位指令用于指示所述位置服务器根据所述N个Wifi的信息确定所述终端设备的当前地理位置;接收所述位置服务器针对所述定位指令而返回的所述终端设备的当前地理位置。The code stored in the memory 502 can execute the above-mentioned network positioning method performed by the terminal device provided above, for example, when it is detected that the positioning switch is turned on, scan the N Wifis around the terminal device to obtain the information of the N Wifis, the N is an integer greater than 1; during the process of scanning the N Wifis, the positioning function is started; when the scanning of the N Wifis is completed, a positioning instruction is sent to the location server, and the positioning instruction carries the location of the N Wifis information, the positioning instruction is used to instruct the location server to determine the current geographic location of the terminal device according to the information of the N Wifis; receive the current geographic location of the terminal device returned by the location server for the positioning instruction geographic location.

在一个实施例中,终端设备为手机,下面结合图6对手机的各个构成部件进行具体的介绍:In one embodiment, the terminal device is a mobile phone, and each component of the mobile phone will be specifically introduced below in conjunction with FIG. 6:

RF电路610可用于收发信息或通话过程中,信号的接收和发送,特别地,将基站的下行信息接收后,给处理器680处理;另外,将设计上行的数据发送给基站。通常,RF电路610包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器(Low NoiseAmplifier,LNA)、双工器等。此外,RF电路610还可以通过无线通信与网络和其他设备通信。上述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(GlobalSystem of Mobile communication,GSM)、通用分组无线服务(General Packet RadioService,GPRS)、码分多址(Code Division Multiple Access,CDMA)、宽带码分多址(Wideband Code Division Multiple Access,WCDMA)、长期演进(Long Term Evolution,LTE)、电子邮件、短消息服务(Short Messaging Service,SMS)等。The RF circuit 610 can be used for sending and receiving information or receiving and sending signals during a call. In particular, after receiving the downlink information from the base station, it is processed by the processor 680; in addition, the designed uplink data is sent to the base station. Generally, the RF circuit 610 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (Low Noise Amplifier, LNA), a duplexer, and the like. In addition, RF circuitry 610 may also communicate with networks and other devices via wireless communications. The above wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile communication (Global System of Mobile communication, GSM), General Packet Radio Service (General Packet Radio Service, GPRS), Code Division Multiple Access (Code Division Multiple Access) , CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (Long Term Evolution, LTE), email, Short Messaging Service (Short Messaging Service, SMS), etc.

存储器620可用于存储软件程序以及模块,处理器680通过运行存储在存储器620的软件程序以及模块,从而执行手机的各种功能应用以及数据处理。存储器620可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如Wifi扫描功能、定位功能、信息发送功能)等;存储数据区可存储根据手机的使用所创建的数据(比如位置服务器返回的地理位置、Wifi扫描得到的N个Wifi的信息)等。此外,存储器620可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 620 can be used to store software programs and modules, and the processor 680 executes various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory 620 . The memory 620 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application program required by a function (such as Wifi scanning function, positioning function, information sending function), etc.; the storage data area can store Store the data created according to the use of the mobile phone (such as the geographic location returned by the location server, the information of N Wifis obtained by Wifi scanning), etc. In addition, the memory 620 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage devices.

输入单元630可用于接收输入的数字或字符信息,以及产生与手机的用户设置以及功能控制有关的键信号输入。具体地,输入单元630可包括触控面板631、其他输入设备632。触控面板631,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板631上或在触控面板631附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触控面板631可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器680,并能接收处理器680发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板631。除以了触控面板631,输入单元630还可以包括其他输入设备632。具体地,其他输入设备632可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的至少一种。The input unit 630 can be used to receive input numbers or character information, and generate key signal input related to user settings and function control of the mobile phone. Specifically, the input unit 630 may include a touch panel 631 and other input devices 632 . The touch panel 631, also referred to as a touch screen, can collect the user's touch operations on or near it (for example, the user uses any suitable object or accessory such as a finger or a stylus on the touch panel 631 or near the touch panel 631). operation), and drive the corresponding connection device according to the preset program. Optionally, the touch panel 631 may include two parts, a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and sends it to the to the processor 680, and can receive and execute commands sent by the processor 680. In addition, the touch panel 631 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 631 , the input unit 630 may also include other input devices 632 . Specifically, other input devices 632 may include but not limited to at least one of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), trackball, mouse, joystick, and the like.

显示单元640可用于显示由用户输入的信息或提供给用户的信息以及手机的各种菜单。显示单元640可包括显示面板641,可选的,可以采用液晶显示器(Liquid CrystalDisplay,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板641。进一步的,触控面板631可覆盖显示面板641,当触控面板631检测到在其上或附近的触摸操作后,传送给处理器580以确定触摸事件的类型,随后处理器680根据触摸事件的类型在显示面板641上提供相应的视觉输出。虽然在图6中,触控面板631与显示面板641是作为两个独立的部件来实现手机的输入和输入功能,但是在某些实施例中,可以将触控面板631与显示面板641集成而实现手机的输入和输出功能。The display unit 640 may be used to display information input by or provided to the user and various menus of the mobile phone. The display unit 640 may include a display panel 641. Optionally, the display panel 641 may be configured in the form of a liquid crystal display (Liquid Crystal Display, LCD), an organic light-emitting diode (Organic Light-Emitting Diode, OLED), or the like. Further, the touch panel 631 may cover the display panel 641, and when the touch panel 631 detects a touch operation on or near it, it sends it to the processor 580 to determine the type of the touch event, and then the processor 680 determines the type of the touch event according to the touch event. The type provides a corresponding visual output on the display panel 641 . Although in FIG. 6, the touch panel 631 and the display panel 641 are used as two independent components to realize the input and input functions of the mobile phone, in some embodiments, the touch panel 631 and the display panel 641 can be integrated to form a mobile phone. Realize the input and output functions of the mobile phone.

手机还可包括至少一种传感器650,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板641的亮度,接近传感器可在手机移动到耳边时,关闭显示面板641和/或背光。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于手机还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。The handset may also include at least one sensor 650, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor can include an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 641 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 641 and/or when the mobile phone is moved to the ear. or backlight. As a kind of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes), and can detect the magnitude and direction of gravity when it is stationary, and can be used to identify the application of mobile phone posture (such as horizontal and vertical screen switching, related Games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tap), etc.; as for other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor, etc. repeat.

音频电路660、扬声器661,传声器662可提供用户与手机之间的音频接口。音频电路660可将接收到的音频数据转换后的电信号,传输到扬声器661,由扬声器661转换为声音信号输出;另一方面,传声器662将收集的声音信号转换为电信号,由音频电路660接收后转换为音频数据,再将音频数据输出处理器680处理后,经RF电路610以发送给比如另一手机,或者将音频数据输出至存储器620以便进一步处理。The audio circuit 660, the speaker 661 and the microphone 662 can provide an audio interface between the user and the mobile phone. The audio circuit 660 can transmit the electrical signal converted from the received audio data to the loudspeaker 661, and the loudspeaker 661 converts it into an audio signal output; After being received, it is converted into audio data, and then the audio data is processed by the output processor 680, and then sent to another mobile phone through the RF circuit 610, or the audio data is output to the memory 620 for further processing.

WiFi属于短距离无线传输技术,手机通过WiFi模块670可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图6示出了WiFi模块670,但是可以理解的是,其并不属于手机的必须构成,完全可以根据需要在不改变发明的本质的范围内而省略。WiFi is a short-distance wireless transmission technology. The mobile phone can help users send and receive emails, browse web pages, and access streaming media through the WiFi module 670, which provides users with wireless broadband Internet access. Although FIG. 6 shows a WiFi module 670, it can be understood that it is not an essential component of the mobile phone, and can be completely omitted as required without changing the essence of the invention.

处理器680是手机的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器620内的软件程序和/或模块,以及调用存储在存储器620内的数据,执行手机的各种功能和处理数据,从而对手机进行整体监控。可选的,处理器680可包括一个或多个处理单元;优选的,处理器680可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器680中。The processor 680 is the control center of the mobile phone. It uses various interfaces and lines to connect various parts of the entire mobile phone. By running or executing software programs and/or modules stored in the memory 620, and calling data stored in the memory 620, execution Various functions and processing data of the mobile phone, so as to monitor the mobile phone as a whole. Optionally, the processor 680 may include one or more processing units; preferably, the processor 680 may integrate an application processor and a modem processor, wherein the application processor mainly processes operating systems, user interfaces, and application programs, etc. , the modem processor mainly handles wireless communications. It can be understood that the foregoing modem processor may not be integrated into the processor 680 .

手机还包括给各个部件供电的电源690(比如电池),优选的,电源可以通过电源管理系统与处理器680逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The mobile phone also includes a power supply 690 (such as a battery) for supplying power to various components. Preferably, the power supply can be logically connected to the processor 680 through the power management system, so as to realize functions such as managing charging, discharging, and power consumption management through the power management system.

尽管未示出,手机还可以包括摄像头、蓝牙模块等,在此不再赘述。Although not shown, the mobile phone may also include a camera, a Bluetooth module, etc., which will not be repeated here.

前述实施例中,各步骤方法流程可以基于图6所示的终端设备的结构实现。In the foregoing embodiments, the method flow of each step may be implemented based on the structure of the terminal device shown in FIG. 6 .

本发明实施例还提供一种计算机存储介质,其中,该计算机存储介质可存储有程序,该程序执行时包括上述方法实施例中记载的任何一种网络定位方法的部分或全部步骤。An embodiment of the present invention also provides a computer storage medium, wherein the computer storage medium can store a program, and the program includes some or all steps of any one of the network positioning methods described in the above method embodiments when executed.

需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明并不受所描述的动作顺序的限制,因为依据本发明,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本发明所必须的。It should be noted that for the foregoing method embodiments, for the sake of simple description, they are expressed as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence. Because of the present invention, certain steps may be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification belong to preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.

在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the foregoing embodiments, the descriptions of each embodiment have their own emphases, and for parts not described in detail in a certain embodiment, reference may be made to relevant descriptions of other embodiments.

在本申请所提供的几个实施例中,应该理解到,所揭露的装置,可通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or can be Integrate into another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical or other forms.

所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。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 may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.

所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储器中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储器中,包括若干指令用以使得一台计算机设备(可为个人计算机、服务器或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储器包括:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the essence of the technical solution of the present invention or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory. Several instructions are included to make a computer device (which may be a personal computer, server or network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.

本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储器中,存储器可以包括:闪存盘、只读存储器(英文:Read-Only Memory,简称:ROM)、随机存取器(英文:Random Access Memory,简称:RAM)、磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above-mentioned embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable memory, and the memory can include: a flash disk , Read-only memory (English: Read-Only Memory, abbreviated: ROM), random access device (English: Random Access Memory, abbreviated: RAM), magnetic disk or optical disk, etc.

以上对本发明实施例进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上上述,本说明书内容不应理解为对本发明的限制。The embodiments of the present invention have been described in detail above, and specific examples have been used in this paper to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only used to help understand the method and core idea of the present invention; at the same time, for Those skilled in the art will have changes in the specific implementation and scope of application based on the idea of the present invention. In summary, the contents of this specification should not be construed as limiting the present invention.

Claims (11)

1. a kind of network locating method, it is characterised in that include:
When detecting position-sensing switch and being opened, the N number of Wifi around end of scan equipment, to obtain the letter of N number of Wifi Breath, the N is the integer more than 1;
During N number of Wifi is scanned, start positioning function;
When terminating to scan N number of Wifi, positioning instruction is sent to location server, the positioning instruction carries described N number of The information of Wifi, the positioning instruction are used for indicating that the location server determines the end according to the information of N number of Wifi The current geographic position of end equipment;
The current geographic position of the terminal device that the location server is returned is received for the positioning instruction.
2. method according to claim 1, it is characterised in that the N number of Wifi around the end of scan equipment, including:
Send agreement broadcast;
When the Wifi modules of the terminal device receive the agreement broadcast, swept by the Wifi modules of the terminal device Retouch the N number of Wifi around terminal device.
3. method according to claim 1 and 2, it is characterised in that associated record is targetedly managed in the terminal device Position and the information of M Wifi, wherein, the information of the target geographic position and the M Wifi is when in preset duration When the location server returns to the geographical position of the terminal device and exceedes predetermined threshold value for the number of times of target geographic position, The terminal device associated record.
4. method according to claim 3, it is characterised in that described send positioning instruction to location server before, institute Stating method also includes:
The information of N number of Wifi and the information of the M Wifi are contrasted;
If the information match of W Wifi in there is no the information of W Wifi and the M Wifi in N number of Wifi, Positioning instruction is sent to location server, the W is more than or equal to the M/2.
5. method according to claim 4, it is characterised in that methods described also includes:
If the information match of W Wifi in there is the information of W Wifi and the M Wifi in N number of Wifi, will Current geographic position of the target geographic position as the terminal device.
6. a kind of terminal device, it is characterised in that include:
Scan module, for when detecting position-sensing switch and being opened, the N number of Wifi around end of scan equipment, to obtain The information of N number of Wifi is stated, the N is the integer more than 1;
Starting module, for, during N number of Wifi is scanned, starting positioning function;
Sending module, for when terminating to scan N number of Wifi, sending positioning instruction to location server, the positioning refers to Order carries the information of N number of Wifi, and the positioning instruction is used for indicating letter of the location server according to N number of Wifi Breath determines the current geographic position of the terminal device;
Receiver module, for receiving the current of location server terminal device for returning for the positioning instruction Geographical position.
7. method according to claim 6, it is characterised in that the scan module specifically for:
Send agreement broadcast;
When the Wifi modules of the terminal device receive the agreement broadcast, swept by the Wifi modules of the terminal device Retouch the N number of Wifi around terminal device.
8. the terminal device according to claim 6 or 7, it is characterised in that associated record has target in the terminal device Geographical position and the information of M Wifi, wherein, the information of the target geographic position and the M Wifi is when when default The geographical position that the location server returns to the terminal device in long is that the number of times of target geographic position exceedes default threshold During value, the terminal device associated record.
9. terminal device according to claim 8, it is characterised in that the terminal device also includes:
Contrast module, for being contrasted the information of N number of Wifi and the information of the M Wifi;
The sending module specifically for:If the W in there is no the information of W Wifi and the M Wifi in N number of Wifi The information match of individual Wifi, then send positioning instruction to location server, and the W is more than or equal to the M/2.
10. terminal device according to claim 9, it is characterised in that the terminal device also includes:
Locating module, if the letter for W Wifi in the information that there is W Wifi in N number of Wifi and the M Wifi Manner of breathing mate, then using the target geographic position as the terminal device current geographic position.
11. a kind of terminal devices, it is characterised in that include:
Be stored with the memory of executable program code;
The processor coupled with the memory;
The processor calls the executable program code stored in the memory, executes such as 1~right of claim Require the network locating method described in 5 any one.
CN201611117792.6A 2016-12-07 2016-12-07 A kind of network positioning method and terminal device Expired - Fee Related CN106507482B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201611117792.6A CN106507482B (en) 2016-12-07 2016-12-07 A kind of network positioning method and terminal device
PCT/CN2017/105149 WO2018103443A1 (en) 2016-12-07 2017-09-30 Network positioning method and terminal device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611117792.6A CN106507482B (en) 2016-12-07 2016-12-07 A kind of network positioning method and terminal device

Publications (2)

Publication Number Publication Date
CN106507482A true CN106507482A (en) 2017-03-15
CN106507482B CN106507482B (en) 2019-07-26

Family

ID=58330231

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611117792.6A Expired - Fee Related CN106507482B (en) 2016-12-07 2016-12-07 A kind of network positioning method and terminal device

Country Status (2)

Country Link
CN (1) CN106507482B (en)
WO (1) WO2018103443A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108040323A (en) * 2017-12-05 2018-05-15 北京睿智荟聚科技发展有限公司 A kind of localization method and device
WO2018103443A1 (en) * 2016-12-07 2018-06-14 广东欧珀移动通信有限公司 Network positioning method and terminal device
CN108668221A (en) * 2018-04-28 2018-10-16 北京万兔思睿科技有限公司 A kind of intelligent positioning system and method
CN111481114A (en) * 2019-01-29 2020-08-04 北京奇虎科技有限公司 Method and device for detecting working environment of sweeper and sweeper
CN112565248A (en) * 2020-12-02 2021-03-26 北京知道创宇信息技术股份有限公司 Network scanning scheduling method, device and control equipment

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110868345B (en) * 2019-11-06 2022-01-04 Oppo广东移动通信有限公司 Information sharing method and related product
CN113518304B (en) * 2021-03-18 2024-11-05 深圳云里物里科技股份有限公司 Indoor positioning method and device
CN116321268B (en) * 2023-03-06 2023-11-03 乾位智通(深圳)技术有限公司 Detection data recording system, method and device and UWB module detection device

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103533649A (en) * 2013-10-25 2014-01-22 北京航空航天大学 Indoor and outdoor seamless positioning system
CN103796308A (en) * 2014-03-03 2014-05-14 成都西加云杉科技有限公司 Method, device and system for positioning user terminal
CN103813448A (en) * 2014-02-26 2014-05-21 江苏亿通高科技股份有限公司 Indoor positioning method based on RSSI
US20140317102A1 (en) * 2011-07-27 2014-10-23 Unwired Planet, Llc System and method for providing location information for communications through an access network
CN104349456A (en) * 2013-08-07 2015-02-11 中国电信股份有限公司 WiFi (Wireless Fidelity) positioning method and WiFi positioning platform
CN104661305A (en) * 2015-02-16 2015-05-27 百度在线网络技术(北京)有限公司 Method and device for locating user terminal as well as server
CN105486302A (en) * 2015-11-20 2016-04-13 魅族科技(中国)有限公司 Map displaying method and terminal
US20160249177A1 (en) * 2013-01-29 2016-08-25 Apple Inc. Sharing Location Information Among Devices
CN106131767A (en) * 2016-06-28 2016-11-16 河南航飞光电科技有限公司 A kind of combination WiFi and the mobile phone positioning method of bluetooth

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103747520B (en) * 2013-12-20 2017-06-30 百度在线网络技术(北京)有限公司 A kind of localization method and device of mobile terminal
CN105100292B (en) * 2014-05-12 2018-12-18 阿里巴巴集团控股有限公司 Determine the method and device of the position of terminal
KR102239090B1 (en) * 2014-06-05 2021-04-13 삼성전자 주식회사 Method and apparatus for providing location information
CN104837215A (en) * 2015-04-14 2015-08-12 广东欧珀移动通信有限公司 A wireless hotspot connection method and terminal
CN106507482B (en) * 2016-12-07 2019-07-26 Oppo广东移动通信有限公司 A kind of network positioning method and terminal device

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140317102A1 (en) * 2011-07-27 2014-10-23 Unwired Planet, Llc System and method for providing location information for communications through an access network
US20160249177A1 (en) * 2013-01-29 2016-08-25 Apple Inc. Sharing Location Information Among Devices
CN104349456A (en) * 2013-08-07 2015-02-11 中国电信股份有限公司 WiFi (Wireless Fidelity) positioning method and WiFi positioning platform
CN103533649A (en) * 2013-10-25 2014-01-22 北京航空航天大学 Indoor and outdoor seamless positioning system
CN103813448A (en) * 2014-02-26 2014-05-21 江苏亿通高科技股份有限公司 Indoor positioning method based on RSSI
CN103796308A (en) * 2014-03-03 2014-05-14 成都西加云杉科技有限公司 Method, device and system for positioning user terminal
CN104661305A (en) * 2015-02-16 2015-05-27 百度在线网络技术(北京)有限公司 Method and device for locating user terminal as well as server
CN105486302A (en) * 2015-11-20 2016-04-13 魅族科技(中国)有限公司 Map displaying method and terminal
CN106131767A (en) * 2016-06-28 2016-11-16 河南航飞光电科技有限公司 A kind of combination WiFi and the mobile phone positioning method of bluetooth

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018103443A1 (en) * 2016-12-07 2018-06-14 广东欧珀移动通信有限公司 Network positioning method and terminal device
CN108040323A (en) * 2017-12-05 2018-05-15 北京睿智荟聚科技发展有限公司 A kind of localization method and device
CN108040323B (en) * 2017-12-05 2020-04-17 北京睿智荟聚科技发展有限公司 Positioning method and device
CN108668221A (en) * 2018-04-28 2018-10-16 北京万兔思睿科技有限公司 A kind of intelligent positioning system and method
CN111481114A (en) * 2019-01-29 2020-08-04 北京奇虎科技有限公司 Method and device for detecting working environment of sweeper and sweeper
CN112565248A (en) * 2020-12-02 2021-03-26 北京知道创宇信息技术股份有限公司 Network scanning scheduling method, device and control equipment
CN112565248B (en) * 2020-12-02 2023-06-02 北京知道创宇信息技术股份有限公司 Network scanning scheduling method, device and control equipment

Also Published As

Publication number Publication date
WO2018103443A1 (en) 2018-06-14
CN106507482B (en) 2019-07-26

Similar Documents

Publication Publication Date Title
CN106507482B (en) A kind of network positioning method and terminal device
CN106714103B (en) A kind of network positioning method and terminal device
US20170315777A1 (en) Method, terminal, and storage medium for starting voice input function of terminal
CN106055364A (en) Application starting method and terminal equipment
CN104967896A (en) Method for displaying bulletscreen comment information, and apparatus thereof
CN106484326B (en) Data transmission processing method and mobile terminal
CN106534324A (en) Data sharing method and cloud server
CN106790981A (en) A terminal device setting method and terminal device
CN106714333A (en) Data migration method and terminal
CN106658353A (en) A data migration method and terminal equipment
CN106507447A (en) A Wi-Fi hotspot connection method and mobile terminal
CN106445739A (en) A data migration method and terminal equipment
CN110825474B (en) Interface display method and device and electronic equipment
CN106484563B (en) Data migration method and terminal equipment
CN106658705B (en) Network positioning method and terminal equipment
CN106231382A (en) A method for playing advertising pictures and terminal equipment
CN107291453A (en) Component display method and related product
CN106293407A (en) A kind of image display method and terminal unit
CN106250175A (en) An application upgrading method and terminal equipment
CN110891262A (en) Bluetooth pairing method, system and terminal equipment
CN106302718B (en) Data downloading method and device
CN106294528B (en) Method and device for realizing information transmission
CN106775856A (en) A kind of working mode of mobile terminal changing method and mobile terminal
CN106202046A (en) A kind of word correcting method and terminal unit
CN106792631A (en) A data processing method and terminal equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20190726

CF01 Termination of patent right due to non-payment of annual fee