[go: up one dir, main page]

CN108064023A - Control method, device, storage medium and mobile terminal based on locating module - Google Patents

Control method, device, storage medium and mobile terminal based on locating module Download PDF

Info

Publication number
CN108064023A
CN108064023A CN201711325844.3A CN201711325844A CN108064023A CN 108064023 A CN108064023 A CN 108064023A CN 201711325844 A CN201711325844 A CN 201711325844A CN 108064023 A CN108064023 A CN 108064023A
Authority
CN
China
Prior art keywords
wifi hotspot
mobile terminal
preset
wifi
hotspot
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
CN201711325844.3A
Other languages
Chinese (zh)
Other versions
CN108064023B (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 CN201711325844.3A priority Critical patent/CN108064023B/en
Publication of CN108064023A publication Critical patent/CN108064023A/en
Application granted granted Critical
Publication of CN108064023B publication Critical patent/CN108064023B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. Transmission Power Control [TPC] or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0261Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level
    • H04W52/0264Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level by selectively disabling software applications
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S19/00Satellite radio beacon positioning systems; Determining position, velocity or attitude using signals transmitted by such systems
    • G01S19/01Satellite radio beacon positioning systems transmitting time-stamped messages, e.g. GPS [Global Positioning System], GLONASS [Global Orbiting Navigation Satellite System] or GALILEO
    • G01S19/13Receivers
    • G01S19/34Power consumption
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Signal Processing (AREA)
  • Telephone Function (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本申请实施例公开了基于定位模块的控制方法、装置、存储介质及移动终端。该方法包括:接收到LBS应用对移动终端中的GNSS模块的调用请求时,获取移动终端搜索到的当前WiFi热点信息列表;判断当前WiFi热点信息列表中是否包含预设WiFi热点,其中,预设WiFi热点包括处于室内环境中的WiFi热点;若包含,则确定所述移动终端处于室内环境,不同意所述调用请求。本申请实施例通过采用上述技术方案,可减少因GNSS模块在室内环境中因做无用功所带来的功耗。

The embodiment of the present application discloses a positioning module-based control method, device, storage medium and mobile terminal. The method includes: when receiving a call request from an LBS application to a GNSS module in a mobile terminal, obtaining a current WiFi hotspot information list searched by the mobile terminal; judging whether the current WiFi hotspot information list contains preset WiFi hotspots, wherein the preset The WiFi hotspot includes a WiFi hotspot in an indoor environment; if it is included, it is determined that the mobile terminal is in an indoor environment, and the calling request is not agreed. In the embodiment of the present application, by adopting the above technical solution, the power consumption caused by the useless work of the GNSS module in the indoor environment can be reduced.

Description

基于定位模块的控制方法、装置、存储介质及移动终端Control method, device, storage medium and mobile terminal based on positioning module

技术领域technical field

本申请实施例涉及定位技术领域,尤其涉及基于定位模块的控制方法、装置、存储介质及移动终端。The embodiments of the present application relate to the technical field of positioning, and in particular, to a control method, device, storage medium, and mobile terminal based on a positioning module.

背景技术Background technique

目前,多数移动终端均具备定位功能,能够向用户提供很多基于位置的服务,为用户带来了便利。At present, most mobile terminals have a positioning function and can provide users with many location-based services, bringing convenience to users.

移动终端的定位方式主要包括全球导航卫星系统(Global NavigationSatellite System,GNSS)定位、网络定位以及基站定位等。其中,GNSS定位方式具有定位精度高以及不需要使用移动数据网络等优点,但定位过程功耗很大,影响移动终端的续航时间。此外,GNSS定位方式需要搜索卫星信号,当移动终端处于比较封闭的环境或者周围存在遮挡物等情况时,可能导致卫星信号不稳定或信号强度差等,无法实现定位。The positioning methods of the mobile terminal mainly include Global Navigation Satellite System (Global Navigation Satellite System, GNSS) positioning, network positioning, and base station positioning. Among them, the GNSS positioning method has the advantages of high positioning accuracy and does not need to use a mobile data network, but the positioning process consumes a lot of power, which affects the battery life of the mobile terminal. In addition, the GNSS positioning method needs to search for satellite signals. When the mobile terminal is in a relatively closed environment or there are obstacles around it, the satellite signal may be unstable or the signal strength is poor, making positioning impossible.

发明内容Contents of the invention

本申请实施例提供一种基于定位模块的控制方法、装置、存储介质及移动终端,可以优化移动终端中基于定位模块的控制方案。Embodiments of the present application provide a positioning module-based control method, device, storage medium, and mobile terminal, which can optimize the positioning module-based control scheme in the mobile terminal.

第一方面,本申请实施例提供了一种基于定位模块的控制方法,包括:In the first aspect, the embodiment of the present application provides a positioning module-based control method, including:

接收到基于位置服务LBS应用对移动终端中的全球卫星导航系统GNSS模块的调用请求时,获取所述移动终端搜索到的当前无线保真WiFi热点信息列表;When receiving the call request of the global satellite navigation system GNSS module in the mobile terminal based on the location service LBS application, obtain the current wireless fidelity WiFi hotspot information list searched by the mobile terminal;

判断当前WiFi热点信息列表中是否包含预设WiFi热点,其中,所述预设WiFi热点包括处于室内环境中的WiFi热点;Judging whether the current WiFi hotspot information list contains preset WiFi hotspots, wherein the preset WiFi hotspots include WiFi hotspots in an indoor environment;

若包含,则确定所述移动终端处于室内环境,不同意所述调用请求。If yes, it is determined that the mobile terminal is in an indoor environment, and the call request is not agreed.

第二方面,本申请实施例提供了一种基于定位模块的控制装置,包括:In the second aspect, the embodiment of the present application provides a control device based on a positioning module, including:

热点信息列表获取模块,用于在接收到基于位置服务LBS应用对移动终端中的全球卫星导航系统GNSS模块的调用请求时,获取所述移动终端搜索到的当前无线保真WiFi热点信息列表;The hotspot information list acquisition module is used to obtain the current wireless fidelity WiFi hotspot information list searched by the mobile terminal when receiving the call request of the global satellite navigation system GNSS module in the mobile terminal based on the location service LBS application;

预设热点判断模块,用于判断当前WiFi热点信息列表中是否包含预设WiFi热点,其中,所述预设WiFi热点包括处于室内环境中的WiFi热点;A preset hotspot judging module, configured to judge whether the current WiFi hotspot information list contains preset WiFi hotspots, wherein the preset WiFi hotspots include WiFi hotspots in an indoor environment;

调用请求处理模块,用于在判断出当前WiFi热点信息列表中包含预设WiFi热点时,确定所述移动终端处于室内环境,不同意所述调用请求。The call request processing module is used to determine that the mobile terminal is in an indoor environment when it is determined that the current WiFi hotspot information list contains preset WiFi hotspots, and does not agree to the call request.

第三方面,本申请实施例提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如本申请实施例所述的基于定位模块的控制方法。In a third aspect, the embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the control method based on the positioning module as described in the embodiment of the present application is implemented.

第四方面,本申请实施例提供了一种移动终端,包括存储器,GNSS模块,处理器及存储在存储器上并可在处理器运行的计算机程序,所述处理器执行所述计算机程序时实现如本申请实施例所述的基于定位模块的控制方法。In a fourth aspect, an embodiment of the present application provides a mobile terminal, including a memory, a GNSS module, a processor, and a computer program stored on the memory and runnable by the processor. When the processor executes the computer program, the following functions are implemented: The control method based on the positioning module described in the embodiment of this application.

本申请实施例中提供的基于定位模块的控制方案,接收到LBS应用对移动终端中的GNSS模块的调用请求时,获取移动终端搜索到的当前WiFi热点信息列表,若判断出当前WiFi热点信息列表中包含预设WiFi热点,则确定移动终端处于室内环境,不同意调用请求。通过采用上述技术方案,当LBS应用需要调用GNSS模块来获取位置信息时,先判断移动终端能否搜索到预设的WiFi热点,从而判断出移动终端是否处于室内,若处于室内,则不适合GNSS模块工作,不同意调用,减少因GNSS模块做无用功所带来的功耗。The control scheme based on the positioning module provided in the embodiment of the present application, when receiving the calling request of the GNSS module in the mobile terminal from the LBS application, obtains the current WiFi hotspot information list searched by the mobile terminal, if the current WiFi hotspot information list is determined If the preset WiFi hotspot is included in the mobile terminal, it is determined that the mobile terminal is in an indoor environment, and the calling request is not agreed. By adopting the above technical solution, when the LBS application needs to call the GNSS module to obtain location information, first judge whether the mobile terminal can search for the preset WiFi hotspot, so as to judge whether the mobile terminal is indoors, if it is indoors, it is not suitable for GNSS The module is working, do not agree to call, reduce the power consumption caused by the useless work of the GNSS module.

附图说明Description of drawings

图1为本申请实施例提供的一种基于定位模块的控制方法的流程示意图;FIG. 1 is a schematic flowchart of a control method based on a positioning module provided in an embodiment of the present application;

图2为本申请实施例提供的一种WiFi热点信息列表界面示意图;FIG. 2 is a schematic diagram of a WiFi hotspot information list interface provided by an embodiment of the present application;

图3为本申请实施例提供的一种WiFi热点详情界面示意图;FIG. 3 is a schematic diagram of a WiFi hotspot details interface provided by an embodiment of the present application;

图4为本申请实施例提供的另一种基于定位模块的控制方法的流程示意图;FIG. 4 is a schematic flowchart of another control method based on a positioning module provided in an embodiment of the present application;

图5为本申请实施例提供的另一种基于定位模块的控制方法的流程示意图;FIG. 5 is a schematic flowchart of another control method based on a positioning module provided in an embodiment of the present application;

图6为本申请实施例提供的另一种基于定位模块的控制方法的流程示意图;FIG. 6 is a schematic flowchart of another control method based on a positioning module provided in an embodiment of the present application;

图7为本申请实施例提供的一种基于定位模块的控制装置的结构框图;FIG. 7 is a structural block diagram of a control device based on a positioning module provided in an embodiment of the present application;

图8为本申请实施例提供的一种移动终端的结构示意图;FIG. 8 is a schematic structural diagram of a mobile terminal provided by an embodiment of the present application;

图9为本申请实施例提供的又一种移动终端的结构示意图。FIG. 9 is a schematic structural diagram of another mobile terminal provided by an embodiment of the present application.

具体实施方式Detailed ways

下面结合附图并通过具体实施方式来进一步说明本申请的技术方案。可以理解的是,此处所描述的具体实施例仅仅用于解释本申请,而非对本申请的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本申请相关的部分而非全部结构。The technical solution of the present application will be further described below in conjunction with the accompanying drawings and through specific implementation methods. It should be understood that the specific embodiments described here are only used to explain the present application, but not to limit the present application. In addition, it should be noted that, for the convenience of description, only some structures related to the present application are shown in the drawings but not all structures.

在更加详细地讨论示例性实施例之前应当提到的是,一些示例性实施例被描述成作为流程图描绘的处理或方法。虽然流程图将各步骤描述成顺序的处理,但是其中的许多步骤可以被并行地、并发地或者同时实施。此外,各步骤的顺序可以被重新安排。当其操作完成时所述处理可以被终止,但是还可以具有未包括在附图中的附加步骤。所述处理可以对应于方法、函数、规程、子例程、子程序等等。Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe the steps as sequential processing, many of the steps may be performed in parallel, concurrently, or simultaneously. Additionally, the order of steps may be rearranged. The process may be terminated when its operations are complete, but may also have additional steps not included in the figure. The processing may correspond to a method, function, procedure, subroutine, subroutine, or the like.

图1为本申请实施例提供的一种基于定位模块的控制方法的流程示意图,该方法可以由基于定位模块的控制装置执行,其中该装置可由软件和/或硬件实现,一般可集成在移动终端中。如图1所示,该方法包括:Figure 1 is a schematic flowchart of a control method based on a positioning module provided by an embodiment of the present application. The method can be executed by a control device based on a positioning module, wherein the device can be implemented by software and/or hardware, and can generally be integrated in a mobile terminal middle. As shown in Figure 1, the method includes:

步骤101、接收到LBS应用对移动终端中的GNSS模块的调用请求时,获取所述移动终端搜索到的当前WiFi热点信息列表。Step 101 , when receiving a call request from an LBS application to a GNSS module in a mobile terminal, obtain a list of current WiFi hotspot information searched by the mobile terminal.

示例性的,本申请实施例中的移动终端可包括手机以及平板电脑等设置有GNSS定位模块(简称GNSS模块)的移动设备。本申请实施例对GNSS模块的具体类型不作限定,可以包括全球定位系统(Global Positioning System,GPS)、北斗卫星导航系统以及伽利略卫星导航系统(GALILEO)等。Exemplarily, the mobile terminal in the embodiment of the present application may include a mobile device such as a mobile phone and a tablet computer provided with a GNSS positioning module (referred to as a GNSS module). The embodiment of the present application does not limit the specific type of the GNSS module, which may include a global positioning system (Global Positioning System, GPS), a Beidou satellite navigation system, and a Galileo satellite navigation system (GALILEO).

本申请实施例中,对基于位置服务(Location Based Service,LBS)应用的具体类型不做限定,可包括电子地图类应用(如百度地图等)、外卖类应用(如美团外卖等)、社交类应用(如微信等)、信息服务类应用(如大众点评等)以及旅游类应用(如携程等)等等。一般的,LBS应用需要使用定位服务时,会发送对GNSS模块的调用请求(也即LBS应用发起GNSS定位方式的定位请求),若同意该调用请求(即若同意该定位请求),那么GNSS模块就会处于正常的工作模式,搜索卫星信号以及获取其他用于定位的相关数据,进而计算出移动终端的位置信息(又称定位信息),提供给LBS应用,LBS应用再根据位置信息向用户提供更加丰富的服务。In the embodiment of the present application, the specific types of location-based service (Location Based Service, LBS) applications are not limited, and may include electronic map applications (such as Baidu Maps, etc.), food delivery applications (such as Meituan Waimai, etc.), social networking applications, etc. applications (such as WeChat, etc.), information service applications (such as Dianping, etc.), and travel applications (such as Ctrip, etc.) and so on. Generally, when the LBS application needs to use the positioning service, it will send a call request to the GNSS module (that is, the LBS application initiates a positioning request in the GNSS positioning mode). It will be in the normal working mode, search for satellite signals and obtain other relevant data for positioning, and then calculate the location information (also known as positioning information) of the mobile terminal, and provide it to the LBS application, and the LBS application will provide the user with the location information based on the location information. Richer services.

本申请实施例中,在接收到LBS应用对GNSS模块的调用请求时,先进行关于是否处于室内环境的判定,再决定是否同意该调用请求。在不确定GNSS模块是否适合工作之前,先获取移动终端搜索到的当前无线保真(Wireless Fidelity,WiFi)热点信息列表。In the embodiment of the present application, when receiving the call request from the LBS application to the GNSS module, it first determines whether it is in an indoor environment, and then decides whether to agree to the call request. Before determining whether the GNSS module is suitable for working, first obtain the current Wireless Fidelity (Wireless Fidelity, WiFi) hotspot information list searched by the mobile terminal.

目前,移动终端大多具备无线上网功能,最常见的一种是通过WiFi方式。当移动终端中的无线局域网开关(又称WiFi开关或无线网络连接开关等)处于开启状态时,移动终端会搜索周围的WiFi热点,并将能够搜索到的WiFi热点添加到自身的WiFi热点信息列表中,在该列表中,一般会包含各个WiFi热点的名称,该名称例如可以是服务集标识(ServiceSet Identifier,SSID),还可能包含各个WiFi热点对应的信号强度,用户可根据名称和信号强度对应的图标选择想要连接的WiFi热点,并输入相应的密码(对于未加密的热点则无需输入密码),即可连接到该WiFi热点并成功加入相应的无线局域网,实现无线上网功能。图2为本申请实施例提供的一种WiFi热点信息列表界面示意图,如图2所示,无线局域网功能开关201处于开启状态,用户选择连接WiFiE,输入密码后,与WiFiE成功建立连接。At present, most mobile terminals have a wireless Internet access function, and the most common one is through WiFi. When the wireless local area network switch (also known as WiFi switch or wireless network connection switch, etc.) in the mobile terminal is turned on, the mobile terminal will search for surrounding WiFi hotspots, and add the WiFi hotspots that can be searched to its own WiFi hotspot information list In this list, the name of each WiFi hotspot is generally included. The name may be, for example, a Service Set Identifier (SSID), and may also include the signal strength corresponding to each WiFi hotspot. Users can correspond to each WiFi hotspot according to the name and signal strength icon to select the WiFi hotspot you want to connect to, and enter the corresponding password (for unencrypted hotspots, you don’t need to enter the password), you can connect to the WiFi hotspot and successfully join the corresponding wireless LAN to realize wireless Internet access. FIG. 2 is a schematic diagram of a WiFi hotspot information list interface provided by the embodiment of the present application. As shown in FIG. 2 , the wireless LAN function switch 201 is turned on, and the user chooses to connect to WiFiE, and after entering the password, a connection is successfully established with WiFiE.

在日常生活中,人们越来越离不开网络,通过访问互联网可实现移动支付、聊天、听音乐、看视频以及浏览网页等等,通过WiFi方式访问互联网速度快且费用低,甚至有些是免费的,所以,为了满足人们的上网需求,存在各种各样的WiFi热点供移动终端用户使用。例如,用户在家中一般会设置无线路由器,无线路由器可作为一个WiFi热点供用户连接;在办公室,员工的电脑通常可以通过宽带等方式访问互联网,当电脑中集成有或外置有无线网卡时,也可作为WiFi热点供移动设备连接使用;在许多公共场所,如商场、餐厅以及医院等,也为人们提供了WiFi热点供用户连接;在户外,如街道或旅游景点等,用户的移动终端也可搜索到一些城市服务WiFi,如iTianjin等等;此外,移动终端还可基于蜂窝移动网络建立WiFi热点,又称个人WiFi热点或随身WiFi热点等,供亲朋好友的移动终端连接使用。由此可见,不同的WiFi热点可能对应着不同的使用环境。In daily life, people are increasingly inseparable from the Internet. By accessing the Internet, mobile payment, chatting, listening to music, watching videos, browsing the web, etc. can be realized. Accessing the Internet through WiFi is fast and low-cost, and some are even free. Therefore, in order to meet people's Internet needs, there are various WiFi hotspots for mobile terminal users to use. For example, users generally set up a wireless router at home, and the wireless router can be used as a WiFi hotspot for users to connect to; in the office, employees' computers can usually access the Internet through broadband and other means. It can also be used as a WiFi hotspot for mobile devices to connect to; in many public places, such as shopping malls, restaurants, and hospitals, WiFi hotspots are also provided for users to connect; outdoors, such as streets or tourist attractions, etc., users' mobile terminals also You can search for some city service WiFi, such as iTianjin, etc.; in addition, the mobile terminal can also establish a WiFi hotspot based on the cellular mobile network, also known as a personal WiFi hotspot or a portable WiFi hotspot, etc., for mobile terminals of relatives and friends to connect. It can be seen that different WiFi hotspots may correspond to different usage environments.

本申请实施例中,可在接收到LBS应用对GNSS模块的调用请求时,获取移动终端此时搜索到的当前WiFi热点信息列表,对该列表中的WiFi热点进行后续的判定,以确定移动终端是否处于室内环境。In the embodiment of the present application, when receiving the calling request of the GNSS module from the LBS application, the current WiFi hotspot information list searched by the mobile terminal at this time can be obtained, and subsequent judgments can be made on the WiFi hotspots in the list to determine the mobile terminal Whether it is in an indoor environment.

步骤102、判断当前WiFi热点信息列表中是否包含预设WiFi热点。Step 102, judging whether the current WiFi hotspot information list contains preset WiFi hotspots.

本申请实施例中,预设WiFi热点可以包括处于室内环境中的WiFi热点。预设WiFi热点可以由用户事先自行设置,并存储在移动终端中;也可以由移动终端从服务器等其他来源进行获取;还可以由移动终端对用户使用WiFi功能的历史习惯数据进行统计或学习,进而确定预设WiFi热点。In this embodiment of the present application, the preset WiFi hotspot may include a WiFi hotspot in an indoor environment. The preset WiFi hotspot can be set by the user in advance and stored in the mobile terminal; it can also be obtained by the mobile terminal from other sources such as a server; the mobile terminal can also perform statistics or study on the historical habit data of the user using the WiFi function, Then, a preset WiFi hotspot is determined.

示例性的,用户在使用移动终端的无线网络连接功能时,可为当前连接的WiFi热点或处于WiFi热点信息列表中的WiFi热点添加标签,用来表示WiFi热点是否是处于室内环境中的WiFi热点。例如,如图2所示,每个WiFi热点最右侧都设置有详情图标202,用户可点击该详情图标进入详情界面。图3为本申请实施例提供的一种WiFi热点详情界面示意图,如图3所示,在详情界面中增加室内WiFi设置区域301,在该区域内包含复选框302,当复选框302被勾选时,可说明当前WiFi热点为室内WiFi热点。用户可根据实际情况选择对复选框302进行勾选或取消勾选。例如,WiFiE是用户家中的WiFi热点,用户可勾选复选框,将WiFiE标识为室内WiFi热点。被标识为室内WiFi热点的WiFi热点成为预设WiFi热点。本步骤中,可判断当前WiFi热点信息列表中是否存在被标识为室内WiFi的WiFi热点,若存在,则包含预设WiFi热点。Exemplarily, when using the wireless network connection function of the mobile terminal, the user can add a label to the currently connected WiFi hotspot or the WiFi hotspot in the WiFi hotspot information list to indicate whether the WiFi hotspot is a WiFi hotspot in an indoor environment . For example, as shown in FIG. 2 , a detail icon 202 is set on the far right side of each WiFi hotspot, and the user can click the detail icon to enter the detail interface. Figure 3 is a schematic diagram of a WiFi hotspot details interface provided by the embodiment of the present application. As shown in Figure 3, an indoor WiFi setting area 301 is added to the details interface, and a check box 302 is included in this area. When the check box 302 is selected When checked, it can indicate that the current WiFi hotspot is an indoor WiFi hotspot. The user can choose to check or uncheck the check box 302 according to the actual situation. For example, the WiFiE is a WiFi hotspot in the user's home, and the user can tick a check box to identify the WiFiE as an indoor WiFi hotspot. A WiFi hotspot identified as an indoor WiFi hotspot becomes a default WiFi hotspot. In this step, it may be determined whether there is a WiFi hotspot identified as indoor WiFi in the current WiFi hotspot information list, and if it exists, the preset WiFi hotspot is included.

示例性的,还可通过指定服务器收集不同WiFi热点的室内/室外属性信息,将属性为室内的WiFi热点的相关信息进行汇总,得到预设WiFi热点集合。本步骤中,可将当前WiFi热点信息列表中各个WiFi热点的信息,如名称,发送至指定服务器进行查询,若查询到存在WiFi热点处于预设WiFi热点集合中,则可确定当前WiFi热点信息列表中包含预设WiFi热点。Exemplarily, the designated server can also be used to collect indoor/outdoor attribute information of different WiFi hotspots, and collect related information of the indoor WiFi hotspots to obtain a preset set of WiFi hotspots. In this step, the information of each WiFi hotspot in the current WiFi hotspot information list, such as the name, can be sent to the designated server for query. If the query finds that there are WiFi hotspots in the preset WiFi hotspot collection, the current WiFi hotspot information list can be determined Contains preset WiFi hotspots.

步骤103、若包含,则确定所述移动终端处于室内环境,不同意所述调用请求。Step 103, if yes, determine that the mobile terminal is in an indoor environment, and do not agree to the calling request.

室内环境不适合GNSS模块工作,当接收到LBS应用对GNSS模块的调用请求时,若接受该调用请求,GNSS模块就会开始工作,但又因为处于不适合工作的环境内,所以无法实现定位,导致GNSS模块做无用功,产生很多不必要的功耗,影响移动终端的待机时长。本申请实施例中,在确定移动终端处于室内环境时,不同意LBS应用对GNSS模块的调用请求,减少因GNSS模块做无用功所带来的功耗。不同意的方式可以是暂时不响应该调用请求,也可以是直接拒绝该调用请求,本申请实施例不做限定。The indoor environment is not suitable for the GNSS module to work. When receiving the calling request of the GNSS module from the LBS application, if the calling request is accepted, the GNSS module will start to work, but because it is in an environment that is not suitable for work, the positioning cannot be realized. As a result, the GNSS module does useless work, generates a lot of unnecessary power consumption, and affects the standby time of the mobile terminal. In the embodiment of the present application, when it is determined that the mobile terminal is in an indoor environment, the call request of the LBS application to the GNSS module is not approved, so as to reduce the power consumption caused by the useless work of the GNSS module. The method of disapproval may be temporarily not responding to the calling request, or directly rejecting the calling request, which is not limited in this embodiment of the present application.

可选的,若未处于室内环境,可同意所述调用请求,控制GNSS模块为LBS应用提供位置信息。Optionally, if not in an indoor environment, the call request may be agreed to control the GNSS module to provide location information for the LBS application.

本申请实施例中提供的基于定位模块的控制方法,接收到LBS应用对移动终端中的GNSS模块的调用请求时,获取移动终端搜索到的当前WiFi热点信息列表,若判断出当前WiFi热点信息列表中包含预设WiFi热点,则确定移动终端处于室内环境,不同意调用请求。通过采用上述技术方案,当LBS应用需要调用GNSS模块来获取位置信息时,先判断移动终端能否搜索到预设的WiFi热点,从而判断出移动终端是否处于室内,若处于室内,则不适合GNSS模块工作,不同意调用,减少因GNSS模块做无用功所带来的功耗。The control method based on the positioning module provided in the embodiment of the present application, when receiving the calling request of the GNSS module in the mobile terminal from the LBS application, obtains the current WiFi hotspot information list searched by the mobile terminal, if the current WiFi hotspot information list is determined If the preset WiFi hotspot is included in the mobile terminal, it is determined that the mobile terminal is in an indoor environment, and the calling request is not agreed. By adopting the above technical solution, when the LBS application needs to call the GNSS module to obtain location information, first judge whether the mobile terminal can search for the preset WiFi hotspot, so as to judge whether the mobile terminal is indoors, if it is indoors, it is not suitable for GNSS The module is working, do not agree to call, reduce the power consumption caused by the useless work of the GNSS module.

在一些实施例中,在接收到LBS应用对移动终端中的GNSS模块的调用请求之前,还包括:获取所述移动终端中的WiFi热点连接历史;根据所述WiFi热点连接历史确定预设WiFi热点。这样设置的好处在于,可根据用户关于WiFi热点的使用习惯自动确定预设WiFi热点,无需用户手动设置且符合用户的日常行为习惯,准确度高。可以理解的是,随着用户使用移动终端的时间不断变长,WiFi热点连接历史也不断更新,所以预设WiFi热点也可以动态的增加或变更。In some embodiments, before receiving the calling request of the GNSS module in the mobile terminal by the LBS application, it also includes: obtaining the WiFi hotspot connection history in the mobile terminal; determining the preset WiFi hotspot according to the WiFi hotspot connection history . The advantage of this setting is that the preset WiFi hotspot can be automatically determined according to the user's usage habits of the WiFi hotspot, without manual setting by the user and in line with the user's daily behavior habits, with high accuracy. It can be understood that, as the user uses the mobile terminal for a longer time, the Wi-Fi hotspot connection history is also constantly updated, so the preset Wi-Fi hotspots can also be dynamically added or changed.

进一步的,所述WiFi热点连接历史包括:与WiFi热点建立连接的时间,与WiFi热点处于连接状态的时长,与WiFi热点建立连接的次数,在与WiFi热点建立连接时的验证方式,以及与WiFi热点处于连接状态时移动终端执行的操作中的至少一个。Further, the WiFi hotspot connection history includes: the time to establish a connection with the WiFi hotspot, the duration of being connected to the WiFi hotspot, the number of times to establish a connection with the WiFi hotspot, the verification method when establishing a connection with the WiFi hotspot, and the connection with the WiFi hotspot. At least one of the operations performed by the mobile terminal when the hotspot is in a connected state.

相应的,所述根据所述WiFi热点连接历史确定预设WiFi热点,包括以下至少一项:Correspondingly, said determining a preset WiFi hotspot according to said WiFi hotspot connection history includes at least one of the following:

1、当根据所述WiFi热点连接历史确定所述移动终端在多个第一预设统计周期的预设时段内与第一WiFi热点建立连接时,将所述第一WiFi热点确定为预设WiFi热点。其中,所述多个可以指大于预设数量阈值,预设数量阈值可自由设置,例如10个。示例性的,第一预设统计周期可以是一天或一周等。以一天为例,预设时间段可以包括晚上6点至10点之间,用户一般会在这段时间内下班回家,当统计出用户的移动终端很多天都在预设时间段内与第一WiFi热点建立连接,那么可以说明第一WiFi热点为用户家中的WiFi热点,是处于室内环境中的WiFi热点,可自动设置为预设WiFi热点。1. When it is determined according to the WiFi hotspot connection history that the mobile terminal establishes a connection with the first WiFi hotspot within a preset period of a plurality of first preset statistical periods, determine the first WiFi hotspot as the preset WiFi hotspot. Wherein, the plurality may refer to greater than a preset number threshold, and the preset number threshold can be set freely, for example, 10. Exemplarily, the first preset statistical period may be one day or one week. Taking one day as an example, the preset time period can include between 6:00 p.m. If a WiFi hotspot establishes a connection, then it can be explained that the first WiFi hotspot is a WiFi hotspot in the user's home, is a WiFi hotspot in an indoor environment, and can be automatically set as a preset WiFi hotspot.

2、当根据所述WiFi热点连接历史确定所述移动终端在第二预设统计周期内与第二WiFi热点处于连接状态的时长达到预设时长阈值时,将所述第二WiFi热点确定为预设WiFi热点。示例性的,第二预设统计周期可以是一天或一周等,预设时长阈值可根据第二预设统计周期的时间长度来确定。假设第二预设统计周期的时间长度为T,预设时长阈值为t,可以有t=kT,k为小于1的正数,如0.5或0.3等。以一天为例,预设时长阈值可以是6小时,一天中,用户在办公地点或者家中停留的时间会比较长,且多数用户在睡觉时不会关闭移动终端,所以移动终端一般仍与WiFi热点处于连接状态,当在一天中用户的移动终端与第二WiFi热点处于连接状态的时长达到6小时后,可说明移动终端可能在办公室或家中,而第二WiFi热点也应该处于用户的办公室或家中,是处于室内环境中的WiFi热点,可自动设置为预设WiFi热点。2. When it is determined according to the WiFi hotspot connection history that the mobile terminal is connected to the second WiFi hotspot within the second preset statistical period and reaches the preset duration threshold, determine the second WiFi hotspot as the preset Set up WiFi hotspots. Exemplarily, the second preset statistical period may be one day or one week, and the preset duration threshold may be determined according to the length of the second preset statistical period. Suppose the time length of the second preset statistical period is T, and the preset time length threshold is t, which may be t=kT, where k is a positive number less than 1, such as 0.5 or 0.3. Taking one day as an example, the preset duration threshold can be 6 hours. During a day, users stay in the office or at home for a long time, and most users will not turn off the mobile terminal when sleeping, so the mobile terminal is generally still connected to the WiFi hotspot. In the connected state, when the user's mobile terminal is connected to the second WiFi hotspot for 6 hours in a day, it can indicate that the mobile terminal may be in the office or home, and the second WiFi hotspot should also be in the user's office or home , is a WiFi hotspot in an indoor environment, which can be automatically set as a preset WiFi hotspot.

3、当根据所述WiFi热点连接历史确定所述移动终端在第三预设统计周期内与第三WiFi热点建立连接的次数达到预设次数阈值时,将所述第三WiFi热点确定为预设WiFi热点。示例性的,第一预设统计周期可以是一周或一个月等,预设次数阈值可自由设置,例如可以是5次。以一周为例,由于室外的WiFi热点多处于街道或旅游景点等公共区域,用户一般不会在一周内去过多次,因此只会偶尔连接对应的WiFi热点;而用户在一周内多次连接的WiFi热点应该是用户经常去的地方,例如办公室、家以及餐厅。此外,多次连接的WiFi热点一般是用户比较信任的WiFi热点,因为移动终端当前涉及到的个人隐私及财产信息越来越多,用户在使用移动终端访问互联网时一般都比较谨慎,室外的很多WiFi热点来历不明,用户不会选择多次连接。综上,当用户的移动终端在第三预设统计周期内与同一个WiFi热点建立连接的次数达到一定阈值时,可认为该WiFi热点是处于室内环境中的WiFi热点,可自动设置为预设WiFi热点。3. When it is determined according to the WiFi hotspot connection history that the number of times the mobile terminal establishes a connection with the third WiFi hotspot within the third preset statistical period reaches the preset number threshold, determine the third WiFi hotspot as a preset WiFi hotspot. Exemplarily, the first preset statistical period may be one week or one month, etc., and the preset number of times threshold may be set freely, for example, it may be 5 times. Taking a week as an example, since outdoor WiFi hotspots are mostly located in public areas such as streets or tourist attractions, users generally do not go there many times in a week, so they only occasionally connect to the corresponding WiFi hotspots; A good WiFi hotspot should be a place where users often go, such as offices, homes, and restaurants. In addition, WiFi hotspots that have been connected multiple times are generally trusted by users. Because mobile terminals currently involve more and more personal privacy and property information, users are generally more cautious when using mobile terminals to access the Internet. The origin of the WiFi hotspot is unknown, and the user will not choose to connect multiple times. In summary, when the number of times the user's mobile terminal establishes connections with the same WiFi hotspot within the third preset statistical period reaches a certain threshold, it can be considered that the WiFi hotspot is a WiFi hotspot in an indoor environment, and can be automatically set as the preset WiFi hotspot.

4、当根据所述WiFi热点连接历史确定所述移动终端在最近一次与第四WiFi热点建立连接时的验证方式为自动连接时,将所述第四WiFi热点确定为预设WiFi热点。如前文所述,室外的WiFi热点多处于街道或旅游景点等公共区域,出于安全性的考虑,一般会设置有身份验证过程,如通过手机号码进行验证,以确保用户为实名登录,且断开连接后再次连接时,仍然需要进行身份验证。而一般室内的WiFi热点是用户比较信任的WiFi热点,在输入密码后,下次再连接时一般无需再次输入密码,而是直接自动连接。因此,当移动终端在最近一次与第四WiFi热点建立连接时的验证方式为自动连接时,说明该WiFi热点是用户曾经验证过的非公众类的WiFi热点,可认为是处于室内环境中的WiFi热点,可自动设置为预设WiFi热点。4. When it is determined according to the connection history of the WiFi hotspot that the verification mode of the mobile terminal when establishing a connection with the fourth WiFi hotspot last time is automatic connection, determine the fourth WiFi hotspot as a preset WiFi hotspot. As mentioned above, outdoor WiFi hotspots are mostly located in public areas such as streets or tourist attractions. For security reasons, an identity verification process is generally set up, such as verification by mobile phone number, to ensure that the user is logged in with a real name and disconnected. When connecting again after opening the connection, authentication is still required. Generally, indoor WiFi hotspots are WiFi hotspots trusted by users. After entering the password, there is generally no need to enter the password again when connecting next time, but will directly and automatically connect. Therefore, when the verification method of the mobile terminal when establishing a connection with the fourth WiFi hotspot last time is automatic connection, it indicates that the WiFi hotspot is a non-public WiFi hotspot that has been verified by the user, and can be regarded as a WiFi in an indoor environment. Hotspot, can be automatically set as a preset WiFi hotspot.

5、当根据所述WiFi热点连接历史确定所述移动终端在与第五WiFi热点处于连接状态时执行安全等级高于预设操作安全等级的操作时,将所述第五WiFi热点确定为预设WiFi热点。示例性的,可预先将用户在连接WiFi热点的状态下进行的操作依据对安全性要求的高低进行等级划分,例如,支付操作的操作安全等级高,聊天操作的操作安全等级中,网页浏览的操作安全等级低。如前文所述,因为移动终端当前涉及到的个人隐私及财产信息越来越多,用户在使用移动终端访问互联网时一般都比较谨慎,室外的很多WiFi热点来历不明,用户一般不会在连接室外WiFi热点的情况下进行支付等对安全性要求比较高的操作。因此,当移动终端在与一个WiFi热点处于连接状态时执行安全等级较高的操作时,可认为用户信任该WiFi热点,一般为室内WiFi热点,可自动设置为预设WiFi热点。5. When it is determined according to the WiFi hotspot connection history that the mobile terminal performs an operation with a security level higher than the preset operation security level when it is connected to the fifth WiFi hotspot, determine the fifth WiFi hotspot as the preset WiFi hotspot. Exemplarily, the operations performed by the user in the state of connecting to the WiFi hotspot can be graded in advance according to the level of security requirements, for example, the operation security level of the payment operation is high, the operation security level of the chat operation is high, and the operation security level of the web browsing Operational security level is low. As mentioned above, because mobile terminals currently involve more and more personal privacy and property information, users are generally more cautious when using mobile terminals to access the Internet. Many outdoor WiFi hotspots have unknown origins, and users generally do not connect to outdoor In the case of WiFi hotspots, payment and other operations with relatively high security requirements are performed. Therefore, when the mobile terminal is connected to a WiFi hotspot and performs operations with a higher security level, it can be considered that the user trusts the WiFi hotspot, which is generally an indoor WiFi hotspot, and can be automatically set as a preset WiFi hotspot.

可以理解的是,上述5项都是由移动终端自动设置预设WiFi热点,在任意一项或多项的基础上,还可由用户对移动终端自动设置的结果进行修改。例如,在移动终端中增设预设WiFi热点列表,由移动终端自动设置其中包含的预设WiFi热点,该预设WiFi热点列表可以在屏幕上显示,供用户查阅和编辑,用户可在该预设WiFi热点列表进行预设WiFi热点的增加、删除以及修改等操作。这样设置的好处在于,使得预设WiFi热点能够更加准确地用于识别移动终端是否处于室内环境。It can be understood that the above five items are all preset WiFi hotspots automatically set by the mobile terminal, and based on any one or more items, the user can also modify the results automatically set by the mobile terminal. For example, a preset WiFi hotspot list is added in the mobile terminal, and the preset WiFi hotspots contained therein are automatically set by the mobile terminal, and the preset WiFi hotspot list can be displayed on the screen for users to consult and edit. The WiFi hotspot list performs operations such as adding, deleting and modifying preset WiFi hotspots. The advantage of such setting is that the preset WiFi hotspot can be more accurately used to identify whether the mobile terminal is in an indoor environment.

在一些实施例中,所述预设WiFi热点不包括基于蜂窝移动网络建立的WiFi热点。由于蜂窝移动网络一般由网络运营商提供,如中国移动等,需要支付流量费用,所以在能够选择WiFi方式上网时,用户一般不会选择通过蜂窝移动网络上网。而在很多室外环境中,有很多地方不具备WiFi上网的条件,这时,有的用户可能会开启个人热点功能,基于蜂窝移动网络建立WiFi热点,这样用户的其他移动设备或者朋友的移动设备就可以通过搜索并连接该WiFi热点实现上网。可见,这里将基于蜂窝移动网络建立的WiFi热点排除在外的好处在于,防止将这类WiFi热点误识别为室内WiFi热点。示例性的,可根据WiFi热点的名称中是否包含预设关键字来识别是否为基于蜂窝移动网络建立的WiFi热点,一般的,这种热点的名称中会包含“phone”、“手机”、“pad”或“XX的热点”等字样,当一个WiFi热点中包含这些字样时,可认为是基于蜂窝移动网络建立的WiFi热点。In some embodiments, the preset WiFi hotspots do not include WiFi hotspots established based on cellular mobile networks. Since the cellular mobile network is generally provided by network operators, such as China Mobile, etc., traffic charges need to be paid, so users generally do not choose to access the Internet through the cellular mobile network when they can choose WiFi to access the Internet. In many outdoor environments, there are many places that do not have the conditions for WiFi Internet access. At this time, some users may turn on the personal hotspot function and establish a WiFi hotspot based on the cellular mobile network, so that other mobile devices of the user or mobile devices of friends You can surf the Internet by searching and connecting to the WiFi hotspot. It can be seen that the advantage of excluding the WiFi hotspots established based on the cellular mobile network here is to prevent such WiFi hotspots from being misidentified as indoor WiFi hotspots. Exemplarily, whether it is a WiFi hotspot established based on a cellular mobile network can be identified according to whether the name of the WiFi hotspot contains a preset keyword. Generally, the name of such a hotspot will include "phone", "mobile phone", " pad" or "XX's hotspot", when a WiFi hotspot contains these words, it can be considered as a WiFi hotspot established based on a cellular mobile network.

在一些实施例中,判断当前WiFi热点信息列表中是否包含预设WiFi热点,包括:获取当前WiFi热点信息列表中各WiFi热点的属性信息,所述属性信息包括WiFi名称和/或附加标识;对于当前WiFi热点信息列表中的每个WiFi热点,根据当前WiFi热点的属性信息分析所述当前WiFi热点是否属于室内环境的公共WiFi热点;若存在至少一个室内环境的公共WiFi热点,则确定当前WiFi热点信息列表中包含预设WiFi热点。这样设置的好处在于,可成功识别出处于室内环境的公共WiFi热点,更加准确地判断出移动终端是否处于室内环境。一般的,许多公共场所,如商场、餐厅、机场以及医院等,会提供WiFi热点供用户连接,为了与其他WiFi热点区分,热点名称中一般会包含个性化字样,可以是中文、英文、拼音或首字母等等,如“大悦城”、“joycity”、“肯德基”、“kfc”、“airport”以及“总医院”等等,可对WiFi名称进行分析,确认其是否为室内环境的公共WiFi热点。此外,一些公共WiFi热点可能带有附加标识,用于表示该WiFi热点的持有方,也可通过对附加标识中的信息进行分析,确认其是否为室内环境的公共WiFi热点。In some embodiments, judging whether the current WiFi hotspot information list contains preset WiFi hotspots includes: acquiring attribute information of each WiFi hotspot in the current WiFi hotspot information list, the attribute information including WiFi names and/or additional identifiers; for For each WiFi hotspot in the current WiFi hotspot information list, analyze whether the current WiFi hotspot belongs to a public WiFi hotspot in the indoor environment according to the attribute information of the current WiFi hotspot; if there is at least one public WiFi hotspot in the indoor environment, then determine the current WiFi hotspot The information list contains preset WiFi hotspots. The advantage of this setting is that it can successfully identify public WiFi hotspots in an indoor environment, and more accurately determine whether the mobile terminal is in an indoor environment. Generally, many public places, such as shopping malls, restaurants, airports, and hospitals, will provide WiFi hotspots for users to connect to. In order to distinguish them from other WiFi hotspots, the hotspot names generally contain personalized characters, which can be Chinese, English, Pinyin or Initial letters, etc., such as "Joy City", "joycity", "KFC", "kfc", "airport" and "General Hospital", etc., can analyze the WiFi name to confirm whether it is a public service in the indoor environment. WiFi hotspot. In addition, some public WiFi hotspots may have an additional logo to indicate the owner of the WiFi hotspot, and the information in the additional logo can also be analyzed to confirm whether it is a public WiFi hotspot in an indoor environment.

在一些实施例中,所述若包含,则确定所述移动终端处于室内环境,不同意所述调用请求,包括:若包含,则判断所包含的预设WiFi热点对应的信号强度是否达到预设强度阈值;若达到,则确定所述移动终端处于室内环境,不同意所述调用请求。这样设置的好处在于,避免将一些移动终端处于室外环境的情况误识别为室内。当处于室内的WiFi热点的信号强度较高时,存在一些少数情况,距离该WiFi热点较近的室外区域也可能会搜索到该WiFi热点,例如某个餐厅门外,这时,若因为当前WiFi热点信息列表中包含该室内WiFi热点而判定为室内环境,则可能发生误判。虽然在室外可能会搜索到室内WiFi热点,但由于墙壁或门的隔离作用,信号一般较弱,所以,在判断出当前WiFi热点信息列表中包含预设WiFi热点时,对该热点的信号强度进行进一步的核实,若信号强度达到预设强度阈值,可说明确实处于室内环境;相反的,若信号强度未达到预设强度阈值,可说明并未处于室内环境,而是处于室外环境。其中,预设强度阈值可根据实际情况进行设置。In some embodiments, if it is included, it is determined that the mobile terminal is in an indoor environment, and the call request is not agreed, including: if it is included, it is determined whether the signal strength corresponding to the included preset WiFi hotspot reaches the preset The strength threshold; if reached, it is determined that the mobile terminal is in an indoor environment, and the call request is not agreed. The advantage of such setting is to avoid misidentifying some mobile terminals as being indoors when they are in an outdoor environment. When the signal strength of an indoor WiFi hotspot is high, there are some rare cases where the WiFi hotspot may be found in an outdoor area that is closer to the WiFi hotspot, such as outside a restaurant. At this time, if the current WiFi If the indoor WiFi hotspot is included in the hotspot information list and it is determined to be an indoor environment, misjudgment may occur. Although indoor WiFi hotspots may be searched outdoors, the signal is generally weak due to the isolation effect of walls or doors. Therefore, when it is judged that the preset WiFi hotspots are included in the current WiFi hotspot information list, the For further verification, if the signal strength reaches the preset strength threshold, it can indicate that the user is indeed in an indoor environment; on the contrary, if the signal strength does not reach the preset strength threshold, it can indicate that the user is not in an indoor environment, but in an outdoor environment. Wherein, the preset intensity threshold can be set according to actual conditions.

在一些实施例中,在所述不同意所述调用请求之后,还包括:采用GNSS定位方式以外的定位方式向所述LBS应用提供位置信息。GNSS定位方式以外的定位方式可包括基站定位或网络定位(如WiFi定位)等定位方式,还可包括利用传感器辅助定位的方式。例如,通过运动传感器获取移动终端的运动数据,根据所述运动数据提供位置信息。其中,运动传感器可包括加速度传感器、重力传感器、陀螺仪以及地磁传感器等等。例如,在不同意调用请求的同时,利用WiFi定位方式定位当前位置,利用运动传感器采集到的运动数据可计算出移动终端的运动速度、移动距离以及旋转角度等,再与上述定位的当前位置相结合,可以得到移动终端的实时位置,从而实现继续提供位置信息。其中,当前位置可以是经纬度坐标。运动传感器所产生的功耗较低,能够在GNSS模块无法定位时保证定位功能的可用性,为用户提供位置服务,并降低移动终端的功耗。In some embodiments, after the invocation request is not agreed, the method further includes: providing location information to the LBS application by using a positioning method other than a GNSS positioning method. Positioning methods other than GNSS positioning methods may include positioning methods such as base station positioning or network positioning (such as WiFi positioning), and may also include a method of using sensors to assist positioning. For example, the motion data of the mobile terminal is acquired through a motion sensor, and location information is provided according to the motion data. Wherein, the motion sensor may include an acceleration sensor, a gravity sensor, a gyroscope, a geomagnetic sensor, and the like. For example, while not agreeing to the calling request, use the WiFi positioning method to locate the current location, and use the motion data collected by the motion sensor to calculate the mobile terminal's moving speed, moving distance, and rotation angle, etc., and then compare it with the above-mentioned current location. Combined, the real-time location of the mobile terminal can be obtained, so as to continue to provide location information. Wherein, the current location may be latitude and longitude coordinates. The power consumption generated by the motion sensor is low, which can ensure the availability of the positioning function when the GNSS module cannot be positioned, provide location services for users, and reduce the power consumption of the mobile terminal.

在一些实施例中,在所述不同意所述调用请求之后,还包括:重新获取所述移动终端搜索到的当前WiFi热点信息列表,若判断出当前WiFi热点信息列表中不包含预设WiFi热点,则在确定所述LBS应用需要使用定位服务时,控制所述GNSS模块向所述LBS应用提供位置信息。示例性的,若在不同意调用请求后,重新获取的WiFi热点信息列表中不包含预设WiFi热点,可说明移动终端很可能离开室内环境。这样设置的好处在于,当用户离开室内环境,来到室外环境时,GNSS模块能够实现正常定位,为了保证定位结果的精度和准确度,可让GNSS模块被正常调用。若LBS应用仍然需要获取位置信息或者LBS应用再次发送对GNSS模块的调用请求时,同意LBS应用调用GNSS模块,控制GNSS模块进行定位相关操作,并向LBS应用提供位置信息。In some embodiments, after the disapproval of the call request, it further includes: reacquiring the current WiFi hotspot information list searched by the mobile terminal, if it is determined that the current WiFi hotspot information list does not contain preset WiFi hotspots , when it is determined that the LBS application needs to use the positioning service, the GNSS module is controlled to provide location information to the LBS application. Exemplarily, if the re-acquired WiFi hotspot information list does not include preset WiFi hotspots after the invocation request is not agreed, it may indicate that the mobile terminal is likely to leave the indoor environment. The advantage of this setting is that when the user leaves the indoor environment and comes to the outdoor environment, the GNSS module can achieve normal positioning. In order to ensure the accuracy and accuracy of the positioning results, the GNSS module can be called normally. If the LBS application still needs to obtain location information or the LBS application sends a call request to the GNSS module again, the LBS application is allowed to call the GNSS module, control the GNSS module to perform positioning-related operations, and provide location information to the LBS application.

在一些实施例中,为了更加准确地识别出室内环境,避免发生误识别而导致GNSS模块无法正常为LBS应用提供位置信息的情况,还可与其他判定条件结合起来进行判定。示例性的,若包含,则确定所述移动终端处于室内环境,不同意所述调用请求,可包括:若包含,通过GNSS定位方式以外的定位方式定位当前位置,根据当前位置获取对应的天气信息,通过移动终端中的预设传感器采集天气相关数据,将所采集的天气相关数据与所述天气信息进行比对,根据比对结果判断所述移动终端是否处于室内环境,若处于室内环境,则不同意所述调用请求。这样设置的好处在于,可根据天气情况进一步核实移动终端是否处于室内环境,防止误判。In some embodiments, in order to identify the indoor environment more accurately and avoid the situation that the GNSS module cannot normally provide location information for the LBS application due to false identification, the determination can also be made in combination with other determination conditions. Exemplarily, if it is included, it is determined that the mobile terminal is in an indoor environment, and if the call request is not agreed, it may include: if it is included, the current location is located by a positioning method other than GNSS positioning method, and the corresponding weather information is obtained according to the current location , collecting weather-related data through a preset sensor in the mobile terminal, comparing the collected weather-related data with the weather information, judging whether the mobile terminal is in an indoor environment according to the comparison result, and if it is in an indoor environment, then Disagree with the call request. The advantage of such setting is that whether the mobile terminal is in an indoor environment can be further verified according to weather conditions, so as to prevent misjudgment.

进一步的,所述将所采集的天气相关数据与所述天气信息进行比对,包括:获取所采集的天气相关数据中的预设项目的采样值;将所述采样值与所述天气信息中对应所述预设项目的标准值进行比对;其中,所述预设项目包括气温、湿度、光照强度、紫外线强度、风力以及空气质量中的任意一个或多个。以预设项目包括气温为例,天气信息中包含的气温值为室外温度的标准值,移动终端可通过内置的温度传感器采集环境温度作为气温的采样值。可选的,温度传感器位于所述移动终端外壳内表面上,且远离所述移动终端中的易发热位置。这样设置的好处在于,在外壳内表面上测量的结果更加贴近环境温度,而远离易发热位置能够避免移动终端自身产生的热量对测量结果造成影响。易发热位置可包括处理芯片位置、充电芯片位置以及摄像头位置等。另外,在通过温度传感器采集环境温度时,可关闭后台运行的应用程序,进一步减少移动终端自身产生的热量。一般的,由于墙壁的隔离效果的存在,使得室内外温度存在差别,尤其在夏季和冬季,或者室外天气比较恶劣时(如阴雨天或风比较大等),室内外的温度差别较大,因为天气较热或较冷时,可利用空调或供暖设备等对温度进行调节,会使得室内温度不同于室外温度,若采样值与标准值相差较大,可说明移动终端处于室内环境。例如,定位的当前位置为天津市和平区,获取到天津市和平区的气温为4摄氏度,则标准值为4,而移动终端若在室内,室内环境比较温暖,采样值可能是20,可见采样值与标准值差别较大,可确定移动终端处于室内。Further, the comparing the collected weather-related data with the weather information includes: obtaining the sampled values of preset items in the collected weather-related data; comparing the sampled values with the weather information Comparing the standard values corresponding to the preset items; wherein, the preset items include any one or more of air temperature, humidity, light intensity, ultraviolet intensity, wind force and air quality. Taking the preset item including temperature as an example, the temperature value contained in the weather information is a standard value of the outdoor temperature, and the mobile terminal can collect the ambient temperature through the built-in temperature sensor as the sampling value of the temperature. Optionally, the temperature sensor is located on the inner surface of the housing of the mobile terminal, and is away from a position prone to heat in the mobile terminal. The advantage of this setting is that the measurement result on the inner surface of the casing is closer to the ambient temperature, and the distance from the location prone to heat can avoid the influence of the heat generated by the mobile terminal itself on the measurement result. Heat-prone locations may include processing chip locations, charging chip locations, and camera locations. In addition, when the ambient temperature is collected by the temperature sensor, the application programs running in the background can be closed to further reduce the heat generated by the mobile terminal itself. Generally, due to the existence of the isolation effect of the wall, there is a difference in indoor and outdoor temperature, especially in summer and winter, or when the outdoor weather is relatively bad (such as rainy days or strong winds, etc.), the indoor and outdoor temperature difference is large, because When the weather is hot or cold, you can use air conditioning or heating equipment to adjust the temperature, which will make the indoor temperature different from the outdoor temperature. If the sampled value differs greatly from the standard value, it can indicate that the mobile terminal is in an indoor environment. For example, if the current location of positioning is Heping District, Tianjin, and the temperature in Heping District of Tianjin is 4 degrees Celsius, the standard value is 4. If the mobile terminal is indoors, the indoor environment is relatively warm, and the sampling value may be 20. Visible sampling If the value is quite different from the standard value, it can be determined that the mobile terminal is indoors.

进一步的,根据比对结果判断所述移动终端是否处于室内环境,可包括:当满足预设室内判定条件的预设项目的数量达到预设数量阈值时,确定所述移动终端处于室内环境;其中,所述预设室内判定条件包括:预设项目对应的采样值和标准值之间的差距达到相应的预设阈值。这样设置的好处在于,可增强室内判定的准确度。Further, judging whether the mobile terminal is in an indoor environment according to the comparison result may include: determining that the mobile terminal is in an indoor environment when the number of preset items satisfying preset indoor judgment conditions reaches a preset number threshold; wherein The preset indoor determination condition includes: the difference between the sampling value corresponding to the preset item and the standard value reaches a corresponding preset threshold. The advantage of such setting is that the accuracy of indoor determination can be enhanced.

进一步的,所述通过所述移动终端中的预设传感器采集天气相关数据包括:根据所述天气信息中各个项目的数值确定预设项目;通过所述移动终端中的与所述预设项目对应的传感器采集天气相关数据。这样设置的好处在于,有针对性的指示移动终端获取天气相关数据,可减少移动终端获取的数据量,减少判定步骤,加快室内外环境的判定。示例性的,可预先根据天气信息中包含的各个项目的当前数值估计出有利于快速判断室内外环境的项目,作为预设项目,从而达到筛选预设项目的目的。例如,天气信息中的气温为-10摄氏度,说明室外非常寒冷,那么室内温度与室外温度差距会很大,可将气温确定为预设项目,并指示移动终端通过温度传感器获取温度,随后可根据温度差快速判断出移动终端处于室内环境。又如,天气信息中的温度为25摄氏度,说明室外温度适中,那么室内温度与室外温度差距可能很小,不利于判定,可将气温意外的项目确定为预设项目。Further, the collecting weather-related data through the preset sensor in the mobile terminal includes: determining the preset item according to the value of each item in the weather information; sensors to collect weather-related data. The advantage of this setting is that the mobile terminal is instructed to acquire weather-related data in a targeted manner, which can reduce the amount of data acquired by the mobile terminal, reduce the determination steps, and speed up the determination of indoor and outdoor environments. Exemplarily, according to the current value of each item included in the weather information, the items that are helpful for quickly judging the indoor and outdoor environments can be estimated in advance as preset items, so as to achieve the purpose of screening the preset items. For example, if the temperature in the weather information is -10 degrees Celsius, it means that it is very cold outside, and the indoor temperature will be very different from the outdoor temperature. The temperature can be determined as a preset item, and the mobile terminal can be instructed to obtain the temperature through the temperature sensor, and then the temperature can be obtained according to the The temperature difference quickly determines that the mobile terminal is in an indoor environment. For another example, the temperature in the weather information is 25 degrees Celsius, indicating that the outdoor temperature is moderate, so the difference between the indoor temperature and the outdoor temperature may be small, which is not conducive to judgment, and items with unexpected temperature can be determined as preset items.

进一步的,所述若处于室内环境,则不同意所述调用请求,包括:若处于室内环境,则判断所述移动终端是否处于汽车内部;若未处于汽车内部,则不同意所述调用请求。可选的,所述判断所述移动终端是否处于汽车内部包括:通过所述移动终端的摄像头拍摄图像;当识别出所述图像中包含路面景物或汽车内物品时,确定所述移动终端处于汽车内部。这样设置的好处在于,可避免发生误判的情况。当用户在车内时,车内环境也比较封闭,且也可通过车载空调、湿度调节装置或空气净化器等对车内环境进行调节,容易被误识别为室内环境,而由于车辆材质的原因,对GNSS模块搜索的卫星信号的影响较小,仍然可以实现定位,所以在车内时是可以同意调用请求的。Further, the disapproving of the call request if it is in an indoor environment includes: judging whether the mobile terminal is inside a car if it is in an indoor environment; or not agreeing to the call request if it is not in a car. Optionally, the judging whether the mobile terminal is inside the car includes: taking an image through the camera of the mobile terminal; internal. The advantage of this setting is that it can avoid misjudgment. When the user is in the car, the environment inside the car is relatively closed, and the environment in the car can also be adjusted through the car air conditioner, humidity control device or air purifier, etc., which is easy to be misidentified as the indoor environment. , the impact on the satellite signal searched by the GNSS module is small, and positioning can still be achieved, so the call request can be agreed when in the car.

图4为本申请实施例提供的另一种基于定位模块的控制方法的流程示意图,该方法包括如下步骤:Fig. 4 is a schematic flow chart of another positioning module-based control method provided by the embodiment of the present application, the method includes the following steps:

步骤401、获取移动终端中的WiFi热点连接历史,根据WiFi热点连接历史确定预设WiFi热点。Step 401 , acquiring the connection history of the WiFi hotspot in the mobile terminal, and determining a preset WiFi hotspot according to the connection history of the WiFi hotspot.

其中,所述WiFi热点连接历史包括:与WiFi热点建立连接的时间,与WiFi热点处于连接状态的时长,与WiFi热点建立连接的次数,在与WiFi热点建立连接时的验证方式,以及与WiFi热点处于连接状态时移动终端执行的操作。Wherein, the WiFi hotspot connection history includes: the time to establish a connection with the WiFi hotspot, the duration of being connected to the WiFi hotspot, the number of times to establish a connection with the WiFi hotspot, the verification method when establishing a connection with the WiFi hotspot, and the connection with the WiFi hotspot Actions performed by the mobile terminal while in the connected state.

根据WiFi热点连接历史确定预设WiFi热点,包括:Determine preset WiFi hotspots based on WiFi hotspot connection history, including:

当根据WiFi热点连接历史确定移动终端在多个第一预设统计周期的预设时段内与第一WiFi热点建立连接时,将第一WiFi热点确定为预设WiFi热点;当根据WiFi热点连接历史确定移动终端在第二预设统计周期内与第二WiFi热点处于连接状态的时长达到预设时长阈值时,将第二WiFi热点确定为预设WiFi热点;当根据WiFi热点连接历史确定移动终端在第三预设统计周期内与第三WiFi热点建立连接的次数达到预设次数阈值时,将第三WiFi热点确定为预设WiFi热点;当根据WiFi热点连接历史确定所述移动终端在最近一次与第四WiFi热点建立连接时的验证方式为自动连接时,将第四WiFi热点确定为预设WiFi热点;以及,当根据WiFi热点连接历史确定移动终端在与第五WiFi热点建立处于连接状态时执行安全等级高于预设操作安全等级的操作时,将第五WiFi热点确定为预设WiFi热点。When it is determined according to the WiFi hotspot connection history that the mobile terminal establishes a connection with the first WiFi hotspot within a preset period of a plurality of first preset statistical periods, the first WiFi hotspot is determined as a preset WiFi hotspot; when according to the WiFi hotspot connection history When it is determined that the mobile terminal is connected to the second WiFi hotspot within the second preset statistical cycle and reaches the preset duration threshold, the second WiFi hotspot is determined as the preset WiFi hotspot; when the mobile terminal is determined according to the WiFi hotspot connection history When the number of times of establishing connections with the third WiFi hotspot in the third preset statistical period reaches the preset number of times threshold, the third WiFi hotspot is determined to be the preset WiFi hotspot; when it is determined according to the WiFi hotspot connection history that the mobile terminal has connected with the third WiFi hotspot in the last time When the verification method when the fourth WiFi hotspot is connected is automatic connection, the fourth WiFi hotspot is determined as the preset WiFi hotspot; and, when it is determined that the mobile terminal is in a connected state with the fifth WiFi hotspot according to the WiFi hotspot connection history When the security level is higher than the operation of the preset operation security level, the fifth WiFi hotspot is determined as the preset WiFi hotspot.

步骤402、接收到LBS应用对移动终端中的GNSS模块的调用请求。Step 402, receiving a call request from the LBS application to the GNSS module in the mobile terminal.

步骤403、获取移动终端搜索到的当前WiFi热点信息列表。Step 403, acquiring the current WiFi hotspot information list searched by the mobile terminal.

步骤404、判断当前WiFi热点信息列表中是否包含预设WiFi热点,若是,则执行步骤405;否则,执行步骤410。Step 404 , judging whether the current WiFi hotspot information list contains preset WiFi hotspots, if yes, execute step 405 ; otherwise, execute step 410 .

步骤405、确定移动终端处于室内环境,拒绝所述调用请求。Step 405, determine that the mobile terminal is in an indoor environment, and reject the calling request.

步骤406、通过WiFi定位方式向所述LBS应用提供位置信息。Step 406, providing location information to the LBS application through WiFi positioning.

步骤407、重新获取移动终端搜索到的当前WiFi热点信息列表。Step 407, reacquiring the current WiFi hotspot information list searched by the mobile terminal.

步骤408、判断重新获取的当前WiFi热点信息列表中是否包含预设WiFi热点,若是,则返回执行步骤407;否则,执行步骤409。Step 408 , judging whether the reacquired current WiFi hotspot information list contains preset WiFi hotspots, if yes, return to step 407 ; otherwise, execute step 409 .

步骤409、在确定所述LBS应用需要使用定位服务时,控制GNSS模块向所述LBS应用提供位置信息。Step 409, when it is determined that the LBS application needs to use the positioning service, control the GNSS module to provide the location information to the LBS application.

步骤410、同意所述调用请求,控制GNSS模块向LBS应用提供位置信息。Step 410: Agree to the call request, and control the GNSS module to provide location information to the LBS application.

本申请实施例提供的基于定位模块的控制方法,根据用户的使用习惯确定预设WiFi热点,当接收到LBS应用对GNSS模块的调用请求时,获取移动终端搜索到的当前WiFi热点信息列表,根据当前WiFi热点信息列表中包含预设WiFi热点来确定移动终端是否处于室内环境,在处于室内环境时拒绝调用,避免GNSS模块因在室内做无用功而浪费功耗,并通过WiFi定位方式向所述LBS应用提供位置信息,保证LBS应用的正常工作。并且,在拒绝调用后,继续判断移动终端是否能够搜到预设WiFi热点,进而判断出移动终端是否离开室内环境,以便及时控制GNSS模块向LBS应用提供位置信息,保证定位精度及准确度。The control method based on the positioning module provided by the embodiment of the present application determines the preset WiFi hotspot according to the user's usage habits, and when receiving the calling request of the GNSS module from the LBS application, obtains the current WiFi hotspot information list searched by the mobile terminal, according to The current WiFi hotspot information list contains preset WiFi hotspots to determine whether the mobile terminal is in an indoor environment, and refuse to call when it is in an indoor environment, so as to avoid wasting power consumption of the GNSS module due to useless work indoors, and report to the LBS through WiFi positioning The application provides location information to ensure the normal operation of the LBS application. And, after rejecting the call, continue to judge whether the mobile terminal can find the preset WiFi hotspot, and then judge whether the mobile terminal leaves the indoor environment, so as to control the GNSS module to provide location information to the LBS application in time to ensure positioning accuracy and accuracy.

图5为本申请实施例提供的另一种基于定位模块的控制方法的流程示意图,该方法包括:Fig. 5 is a schematic flow chart of another positioning module-based control method provided in the embodiment of the present application, the method including:

步骤501、获取移动终端中的WiFi热点连接历史,根据WiFi热点连接历史确定第一类预设WiFi热点。Step 501. Obtain the WiFi hotspot connection history in the mobile terminal, and determine the first type of preset WiFi hotspot according to the WiFi hotspot connection history.

步骤502、接收到LBS应用对移动终端中的GNSS模块的调用请求时,获取移动终端搜索到的当前WiFi热点信息列表。Step 502, when receiving the call request of the LBS application to the GNSS module in the mobile terminal, obtain the current WiFi hotspot information list searched by the mobile terminal.

步骤503、判断当前WiFi热点信息列表中是否包含第一类预设WiFi热点,若是,则执行步骤506;否则,执行步骤504。Step 503 , judging whether the current WiFi hotspot information list contains the first type of preset WiFi hotspot, if yes, execute step 506 ; otherwise, execute step 504 .

步骤504、获取当前WiFi热点信息列表中各WiFi热点的名称,根据名称分析列表中是否存在室内环境的公共WiFi热点,若是,则执行步骤505;否则,执行步骤508。Step 504, obtain the name of each WiFi hotspot in the current WiFi hotspot information list, analyze whether there is a public WiFi hotspot in the indoor environment in the list according to the name, if yes, execute step 505; otherwise, execute step 508.

步骤505、确定当前WiFi热点信息列表中存在第二类预设WiFi热点。Step 505, determining that there is a second type of preset WiFi hotspot in the current WiFi hotspot information list.

其中,所述第二类预设WiFi热点为室内环境的公共WiFi热点。Wherein, the second type of preset WiFi hotspot is a public WiFi hotspot in an indoor environment.

步骤506、判断所包含的预设WiFi热点对应的信号强度是否达到预设强度阈值,若是,则执行步骤507;否则,执行步骤508。Step 506 , judging whether the signal strength corresponding to the included preset WiFi hotspot reaches the preset strength threshold, if yes, go to step 507 ; otherwise, go to step 508 .

其中,本步骤中的预设WiFi热点可包括上述的第一类预设WiFi热点和第二类预设WiFi热点。Wherein, the preset WiFi hotspots in this step may include the above-mentioned first type of preset WiFi hotspots and second type of preset WiFi hotspots.

步骤507、确定移动终端处于室内环境,拒绝所述调用请求。Step 507, determine that the mobile terminal is in an indoor environment, and reject the calling request.

步骤508、同意所述调用请求,控制GNSS模块向LBS应用提供位置信息。Step 508: Agree to the call request, and control the GNSS module to provide location information to the LBS application.

本申请实施例提供的基于定位模块的控制方法,根据用户的使用习惯确定第一类预设WiFi热点,当接收到LBS应用对GNSS模块的调用请求时,获取移动终端搜索到的当前WiFi热点信息列表,若其中包含第一类预设WiFi热点,则确定移动终端处于室内环境,若不包含,则继续判断是否存在第二类预设WiFi热点,防止漏判。另外,为了避免误判,还增加了对搜索到的预设WiFi热点的信号强度的判定。最终,在确认移动终端处于室内环境时拒绝调用,避免GNSS模块因在室内做无功而导致的功耗浪费。The control method based on the positioning module provided by the embodiment of the present application determines the first type of preset WiFi hotspot according to the user's usage habits, and obtains the current WiFi hotspot information searched by the mobile terminal when receiving the call request of the GNSS module from the LBS application If the list contains the first type of preset WiFi hotspots, then it is determined that the mobile terminal is in an indoor environment; if not, continue to judge whether there is a second type of preset WiFi hotspots to prevent missed judgments. In addition, in order to avoid misjudgment, the determination of the signal strength of the searched preset WiFi hotspots is also added. Finally, when it is confirmed that the mobile terminal is in an indoor environment, the call is rejected, so as to avoid the waste of power consumption caused by the reactive power of the GNSS module indoors.

图6为本申请实施例提供的另一种基于定位模块的控制方法的流程示意图,该方法包括:Fig. 6 is a schematic flow chart of another positioning module-based control method provided by the embodiment of the present application, the method including:

步骤601、获取移动终端中的WiFi热点连接历史,根据WiFi热点连接历史确定预设WiFi热点。Step 601. Obtain the connection history of the WiFi hotspot in the mobile terminal, and determine the preset WiFi hotspot according to the connection history of the WiFi hotspot.

步骤602、接收到LBS应用对移动终端中的GNSS模块的调用请求时,获取移动终端搜索到的当前WiFi热点信息列表。Step 602: Obtain the current WiFi hotspot information list searched by the mobile terminal when receiving the calling request of the LBS application to the GNSS module in the mobile terminal.

步骤603、判断当前WiFi热点信息列表中是否包含预设WiFi热点,若是,则执行步骤604;否则,执行步骤608。Step 603 , judging whether the current WiFi hotspot information list contains preset WiFi hotspots, if yes, execute step 604 ; otherwise, execute step 608 .

步骤604、通过WiFi定位方式定位当前位置,根据当前位置获取对应的天气信息。Step 604, locate the current location by means of WiFi positioning, and acquire corresponding weather information according to the current location.

步骤605、通过移动终端中的预设传感器采集天气相关数据。Step 605, collecting weather-related data through preset sensors in the mobile terminal.

步骤606、根据天气相关数据和天气信息的比对结果判断移动终端是否处于室内环境,若是,则执行步骤607;否则,执行步骤608。Step 606 , judge whether the mobile terminal is in an indoor environment according to the comparison result of weather-related data and weather information, and if yes, execute step 607 ; otherwise, execute step 608 .

步骤607、拒绝所述调用请求。Step 607, deny the calling request.

步骤608、同意所述调用请求,控制GNSS模块向LBS应用提供位置信息。Step 608: Agree to the call request, and control the GNSS module to provide location information to the LBS application.

本申请实施例提供的基于定位模块的控制方法,通过处于室内环境的预设WiFi热点的判定与天气情况判定相结合的方式,能够更加准确地判断出移动终端是否处于室内环境,并在确定处于室内环境时,拒绝LBS应用对GNSS模块的调用,避免GNSS模块因在室内做无用功而浪费功耗。The control method based on the positioning module provided in the embodiment of the present application can more accurately determine whether the mobile terminal is in the indoor environment by combining the determination of the preset WiFi hotspot in the indoor environment with the determination of the weather conditions, and determine whether the mobile terminal is in the indoor environment. In the indoor environment, the call of the GNSS module by the LBS application is rejected to avoid wasting power consumption of the GNSS module due to useless work indoors.

图7为本申请实施例提供的一种基于定位模块的控制装置的结构框图,该装置可由软件和/或硬件实现,一般集成在移动终端中,可通过执行基于定位模块的控制方法来对移动终端中的GNSS模块进行相关控制。如图7所示,该装置包括:Fig. 7 is a structural block diagram of a control device based on a positioning module provided by an embodiment of the present application. The device can be implemented by software and/or hardware, and is generally integrated in a mobile terminal. The GNSS module in the terminal performs relevant control. As shown in Figure 7, the device includes:

热点信息列表获取模块701,用于在接收到基于位置服务LBS应用对移动终端中的全球卫星导航系统GNSS模块的调用请求时,获取所述移动终端搜索到的当前无线保真WiFi热点信息列表;The hotspot information list acquisition module 701 is used to obtain the current wireless fidelity WiFi hotspot information list searched by the mobile terminal when receiving the call request of the global satellite navigation system GNSS module in the mobile terminal based on the location service LBS application;

预设热点判断模块702,用于判断当前WiFi热点信息列表中是否包含预设WiFi热点,其中,所述预设WiFi热点包括处于室内环境中的WiFi热点;The preset hotspot judging module 702 is used to judge whether the current WiFi hotspot information list contains preset WiFi hotspots, wherein the preset WiFi hotspots include WiFi hotspots in an indoor environment;

调用请求处理模块703,用于在判断出当前WiFi热点信息列表中包含预设WiFi热点时,确定所述移动终端处于室内环境,不同意所述调用请求。The call request processing module 703 is configured to determine that the mobile terminal is in an indoor environment when it is determined that the current WiFi hotspot information list contains preset WiFi hotspots, and not agree to the call request.

本申请实施例中提供的基于定位模块的控制装置,接收到LBS应用对移动终端中的GNSS模块的调用请求时,获取移动终端搜索到的当前WiFi热点信息列表,若判断出当前WiFi热点信息列表中包含预设WiFi热点,则确定移动终端处于室内环境,不同意调用请求。通过采用上述技术方案,当LBS应用需要调用GNSS模块来获取位置信息时,先判断移动终端能否搜索到预设的WiFi热点,从而判断出移动终端是否处于室内,若处于室内,则不适合GNSS模块工作,不同意调用,减少因GNSS模块做无用功所带来的功耗。The control device based on the positioning module provided in the embodiment of the present application, when receiving the calling request of the GNSS module in the mobile terminal from the LBS application, obtains the current WiFi hotspot information list searched by the mobile terminal, if the current WiFi hotspot information list is determined If the preset WiFi hotspot is included in the mobile terminal, it is determined that the mobile terminal is in an indoor environment, and the calling request is not agreed. By adopting the above technical solution, when the LBS application needs to call the GNSS module to obtain location information, first judge whether the mobile terminal can search for the preset WiFi hotspot, so as to judge whether the mobile terminal is indoors, if it is indoors, it is not suitable for GNSS The module is working, do not agree to call, reduce the power consumption caused by the useless work of the GNSS module.

可选的,该装置还可包括:Optionally, the device may also include:

连接历史获取模块,用于在接收到LBS应用对移动终端中的GNSS模块的调用请求之前,获取所述移动终端中的WiFi热点连接历史;The connection history acquisition module is used to obtain the WiFi hotspot connection history in the mobile terminal before receiving the calling request of the GNSS module in the mobile terminal by the LBS application;

预设WiFi热点确定模块,用于根据所述WiFi热点连接历史确定预设WiFi热点。A preset WiFi hotspot determining module, configured to determine a preset WiFi hotspot according to the WiFi hotspot connection history.

可选的,所述WiFi热点连接历史包括:与WiFi热点建立连接的时间,与WiFi热点处于连接状态的时长,与WiFi热点建立连接的次数,在与WiFi热点建立连接时的验证方式,以及与WiFi热点处于连接状态时移动终端执行的操作中的至少一个;Optionally, the connection history of the WiFi hotspot includes: the time of establishing a connection with the WiFi hotspot, the duration of being connected to the WiFi hotspot, the number of times of establishing a connection with the WiFi hotspot, the verification method when establishing a connection with the WiFi hotspot, and the connection with the WiFi hotspot. At least one of the operations performed by the mobile terminal when the WiFi hotspot is in a connected state;

所述根据所述WiFi热点连接历史确定预设WiFi热点,包括以下至少一项:The determination of the preset WiFi hotspot according to the WiFi hotspot connection history includes at least one of the following:

当根据所述WiFi热点连接历史确定所述移动终端在多个第一预设统计周期的预设时段内与第一WiFi热点建立连接时,将所述第一WiFi热点确定为预设WiFi热点;When it is determined according to the WiFi hotspot connection history that the mobile terminal establishes a connection with a first WiFi hotspot within a preset period of a plurality of first preset statistical periods, determining the first WiFi hotspot as a preset WiFi hotspot;

当根据所述WiFi热点连接历史确定所述移动终端在第二预设统计周期内与第二WiFi热点处于连接状态的时长达到预设时长阈值时,将所述第二WiFi热点确定为预设WiFi热点;When it is determined according to the WiFi hotspot connection history that the mobile terminal is connected to a second WiFi hotspot within a second preset statistical period and reaches a preset duration threshold, the second WiFi hotspot is determined as a preset WiFi hotspot hot spot;

当根据所述WiFi热点连接历史确定所述移动终端在第三预设统计周期内与第三WiFi热点建立连接的次数达到预设次数阈值时,将所述第三WiFi热点确定为预设WiFi热点;When it is determined according to the WiFi hotspot connection history that the number of times the mobile terminal establishes a connection with the third WiFi hotspot within the third preset statistical period reaches a preset number threshold, the third WiFi hotspot is determined as a preset WiFi hotspot ;

当根据所述WiFi热点连接历史确定所述移动终端在最近一次与第四WiFi热点建立连接时的验证方式为自动连接时,将所述第四WiFi热点确定为预设WiFi热点;When it is determined according to the WiFi hotspot connection history that the verification method of the mobile terminal when establishing a connection with the fourth WiFi hotspot last time is automatic connection, the fourth WiFi hotspot is determined as a preset WiFi hotspot;

当根据所述WiFi热点连接历史确定所述移动终端在与第五WiFi热点处于连接状态时执行安全等级高于预设操作安全等级的操作时,将所述第五WiFi热点确定为预设WiFi热点。When it is determined according to the WiFi hotspot connection history that the mobile terminal performs an operation with a security level higher than a preset operation security level when it is connected to the fifth WiFi hotspot, the fifth WiFi hotspot is determined as a preset WiFi hotspot .

可选的,所述预设WiFi热点不包括基于蜂窝移动网络建立的WiFi热点。Optionally, the preset WiFi hotspots do not include WiFi hotspots established based on cellular mobile networks.

可选的,判断当前WiFi热点信息列表中是否包含预设WiFi热点,包括:Optionally, determine whether the current WiFi hotspot information list contains preset WiFi hotspots, including:

获取当前WiFi热点信息列表中各WiFi热点的属性信息,所述属性信息包括WiFi名称和/或附加标识;Obtain attribute information of each WiFi hotspot in the current WiFi hotspot information list, the attribute information including WiFi name and/or additional identification;

对于当前WiFi热点信息列表中的每个WiFi热点,根据当前WiFi热点的属性信息分析所述当前WiFi热点是否属于室内环境的公共WiFi热点;For each WiFi hotspot in the current WiFi hotspot information list, analyze whether the current WiFi hotspot belongs to the public WiFi hotspot of the indoor environment according to the attribute information of the current WiFi hotspot;

若存在至少一个室内环境的公共WiFi热点,则确定当前WiFi热点信息列表中包含预设WiFi热点。If there is at least one public WiFi hotspot in the indoor environment, it is determined that the preset WiFi hotspot is included in the current WiFi hotspot information list.

可选的,所述在判断出当前WiFi热点信息列表中包含预设WiFi热点时,确定所述移动终端处于室内环境,不同意所述调用请求包括:Optionally, when determining that the current WiFi hotspot information list contains preset WiFi hotspots, determining that the mobile terminal is in an indoor environment, and not agreeing to the calling request includes:

在判断出当前WiFi热点信息列表中包含预设WiFi热点时,判断所包含的预设WiFi热点对应的信号强度是否达到预设强度阈值;When it is determined that the current WiFi hotspot information list contains preset WiFi hotspots, it is determined whether the signal strength corresponding to the included preset WiFi hotspots reaches a preset strength threshold;

若达到,则确定所述移动终端处于室内环境,不同意所述调用请求。If so, it is determined that the mobile terminal is in an indoor environment, and the call request is not agreed.

可选的,该装置还包括:位置信息提供控制模块,用于在所述不同意所述调用请求之后,重新获取所述移动终端搜索到的当前WiFi热点信息列表,若判断出当前WiFi热点信息列表中不包含预设WiFi热点,则在确定所述LBS应用需要使用定位服务时,控制所述GNSS模块向所述LBS应用提供位置信息。Optionally, the device further includes: a location information providing control module, configured to reacquire the current WiFi hotspot information list searched by the mobile terminal after the invocation request is not agreed, and if it is determined that the current WiFi hotspot information If the preset WiFi hotspot is not included in the list, when it is determined that the LBS application needs to use the positioning service, the GNSS module is controlled to provide location information to the LBS application.

本申请实施例还提供一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行基于定位模块的控制方法,该方法包括:The embodiment of the present application also provides a storage medium containing computer-executable instructions, the computer-executable instructions are used to execute a positioning module-based control method when executed by a computer processor, the method comprising:

接收到基于位置服务LBS应用对移动终端中的全球卫星导航系统GNSS模块的调用请求时,获取所述移动终端搜索到的当前无线保真WiFi热点信息列表;When receiving the call request of the global satellite navigation system GNSS module in the mobile terminal based on the location service LBS application, obtain the current wireless fidelity WiFi hotspot information list searched by the mobile terminal;

判断当前WiFi热点信息列表中是否包含预设WiFi热点,其中,所述预设WiFi热点包括处于室内环境中的WiFi热点;Judging whether the current WiFi hotspot information list contains preset WiFi hotspots, wherein the preset WiFi hotspots include WiFi hotspots in an indoor environment;

若包含,则确定所述移动终端处于室内环境,不同意所述调用请求。If yes, it is determined that the mobile terminal is in an indoor environment, and the calling request is not agreed.

存储介质——任何的各种类型的存储器设备或存储设备。术语“存储介质”旨在包括:安装介质,例如CD-ROM、软盘或磁带装置;计算机系统存储器或随机存取存储器,诸如DRAM、DDRRAM、SRAM、EDORAM,兰巴斯(Rambus)RAM等;非易失性存储器,诸如闪存、磁介质(例如硬盘或光存储);寄存器或其它相似类型的存储器元件等。存储介质可以还包括其它类型的存储器或其组合。另外,存储介质可以位于程序在其中被执行的第一计算机系统中,或者可以位于不同的第二计算机系统中,第二计算机系统通过网络(诸如因特网)连接到第一计算机系统。第二计算机系统可以提供程序指令给第一计算机用于执行。术语“存储介质”可以包括可以驻留在不同位置中(例如在通过网络连接的不同计算机系统中)的两个或更多存储介质。存储介质可以存储可由一个或多个处理器执行的程序指令(例如具体实现为计算机程序)。storage medium - any of various types of memory devices or storage devices. The term "storage medium" is intended to include: installation media, such as CD-ROMs, floppy disks, or tape drives; computer system memory or random access memory, such as DRAM, DDRRAM, SRAM, EDORAM, Rambus RAM, etc.; Volatile memory, such as flash memory, magnetic media (eg hard disk or optical storage); registers or other similar types of memory elements, etc. The storage medium may also include other types of memory or combinations thereof. Also, the storage medium may be located in a first computer system in which the program is executed, or may be located in a different second computer system connected to the first computer system through a network such as the Internet. The second computer system may provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media that may reside in different locations, such as in different computer systems connected by a network. The storage medium may store program instructions (eg embodied as computer programs) executable by one or more processors.

当然,本申请实施例所提供的一种包含计算机可执行指令的存储介质,其计算机可执行指令不限于如上所述的基于定位模块的控制操作,还可以执行本申请任意实施例所提供的基于定位模块的控制方法中的相关操作。Of course, a storage medium containing computer-executable instructions provided in the embodiments of the present application, the computer-executable instructions are not limited to the control operations based on the positioning module as described above, and can also execute the control operations based on the positioning module provided in any embodiment of the present application. Relevant operations in the control method of the positioning module.

本申请实施例提供了一种移动终端,该移动终端中可集成本申请实施例提供的基于定位模块的控制装置。图8为本申请实施例提供的一种移动终端的结构示意图。移动终端800可以包括:存储器801,处理器802,GNSS模块803及存储在存储器801上并可在处理器802运行的计算机程序,所述处理器802执行所述计算机程序时实现如本申请实施例所述的基于定位模块的控制方法。An embodiment of the present application provides a mobile terminal, in which the control device based on the positioning module provided in the embodiment of the present application can be integrated. FIG. 8 is a schematic structural diagram of a mobile terminal provided by an embodiment of the present application. The mobile terminal 800 may include: a memory 801, a processor 802, a GNSS module 803, and a computer program stored on the memory 801 and operable on the processor 802. When the processor 802 executes the computer program, the embodiment of the present application is implemented. The control method based on the positioning module.

本申请实施例提供的移动终端,当LBS应用需要调用GNSS模块来获取位置信息时,先判断移动终端能否搜索到预设的WiFi热点,从而判断出移动终端是否处于室内,若处于室内,则不适合GNSS模块工作,不同意调用,减少因GNSS模块做无用功所带来的功耗。The mobile terminal provided by the embodiment of the present application, when the LBS application needs to call the GNSS module to obtain the location information, first judge whether the mobile terminal can search for the preset WiFi hotspot, so as to determine whether the mobile terminal is indoors, and if it is indoors, then Not suitable for GNSS module work, do not agree to call, reduce power consumption caused by GNSS module doing useless work.

图9为本申请实施例提供的另一种移动终端的结构示意图,该移动终端可以包括:壳体(图中未示出)、存储器901、GPS芯片(图中未示出)、中央处理器(central processingunit,CPU)902(又称处理器,以下简称CPU)、电路板(图中未示出)和电源电路(图中未示出)。所述电路板安置在所述壳体围成的空间内部;所述CPU902和所述存储器901设置在所述电路板上;所述电源电路,用于为所述移动终端的各个电路或器件供电;所述存储器901,用于存储可执行程序代码;所述CPU902通过读取所述存储器901中存储的可执行程序代码来运行与所述可执行程序代码对应的计算机程序,以实现以下步骤:FIG. 9 is a schematic structural diagram of another mobile terminal provided by an embodiment of the present application. The mobile terminal may include: a housing (not shown in the figure), a memory 901, a GPS chip (not shown in the figure), a central processing unit (central processing unit, CPU) 902 (also known as processor, hereinafter referred to as CPU), a circuit board (not shown in the figure) and a power circuit (not shown in the figure). The circuit board is placed inside the space surrounded by the housing; the CPU902 and the memory 901 are arranged on the circuit board; the power supply circuit is used to supply power to each circuit or device of the mobile terminal The memory 901 is used to store executable program codes; the CPU902 executes a computer program corresponding to the executable program codes by reading the executable program codes stored in the memory 901, to achieve the following steps:

接收到基于位置服务LBS应用对移动终端中的全球卫星导航系统GNSS模块的调用请求时,获取所述移动终端搜索到的当前无线保真WiFi热点信息列表;When receiving the call request of the global satellite navigation system GNSS module in the mobile terminal based on the location service LBS application, obtain the current wireless fidelity WiFi hotspot information list searched by the mobile terminal;

判断当前WiFi热点信息列表中是否包含预设WiFi热点,其中,所述预设WiFi热点包括处于室内环境中的WiFi热点;Judging whether the current WiFi hotspot information list contains preset WiFi hotspots, wherein the preset WiFi hotspots include WiFi hotspots in an indoor environment;

若包含,则确定所述移动终端处于室内环境,不同意所述调用请求。If yes, it is determined that the mobile terminal is in an indoor environment, and the calling request is not agreed.

所述移动终端还包括:外设接口903、RF(Radio Frequency,射频)电路905、音频电路906、扬声器911、电源管理芯片908、输入/输出(I/O)子系统909、其他输入/控制设备910、触摸屏912、其他输入/控制设备910以及外部端口904,这些部件通过一个或多个通信总线或信号线907来通信。The mobile terminal also includes: peripheral interface 903, RF (Radio Frequency, radio frequency) circuit 905, audio circuit 906, speaker 911, power management chip 908, input/output (I/O) subsystem 909, other input/control device 910 , touch screen 912 , other input/control devices 910 , and external ports 904 , these components communicate via one or more communication buses or signal lines 907 .

应该理解的是,图示移动终端900仅仅是移动终端的一个范例,并且移动终端900可以具有比图中所示出的更多的或者更少的部件,可以组合两个或更多的部件,或者可以具有不同的部件配置。图中所示出的各种部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。It should be understood that the illustrated mobile terminal 900 is only an example of a mobile terminal, and the mobile terminal 900 may have more or fewer components than those shown in the figure, and two or more components may be combined, Or can have a different component configuration. The various components shown in the figures may be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and/or application specific integrated circuits.

下面就本实施例提供的用于对GNSS模块进行相关控制的移动终端进行详细的描述,该移动终端以手机为例。The following describes in detail the mobile terminal provided in this embodiment for controlling the GNSS module. The mobile terminal takes a mobile phone as an example.

存储器901,所述存储器901可以被CPU902、外设接口903等访问,所述存储器901可以包括高速随机存取存储器,还可以包括非易失性存储器,例如一个或多个磁盘存储器件、闪存器件、或其他易失性固态存储器件。Memory 901, the memory 901 can be accessed by the CPU 902, the peripheral interface 903, etc., the memory 901 can include a high-speed random access memory, and can also include a non-volatile memory, such as one or more disk storage devices, flash memory devices , or other volatile solid-state storage devices.

外设接口903,所述外设接口903可以将设备的输入和输出外设连接到CPU902和存储器901。Peripheral interface 903 , which can connect the input and output peripherals of the device to CPU 902 and memory 901 .

I/O子系统909,所述I/O子系统909可以将设备上的输入输出外设,例如触摸屏912和其他输入/控制设备910,连接到外设接口903。I/O子系统909可以包括显示控制器9091和用于控制其他输入/控制设备910的一个或多个输入控制器9092。其中,一个或多个输入控制器9092从其他输入/控制设备910接收电信号或者向其他输入/控制设备910发送电信号,其他输入/控制设备910可以包括物理按钮(按压按钮、摇臂按钮等)、拨号盘、滑动开关、操纵杆、点击滚轮。值得说明的是,输入控制器9092可以与以下任一个连接:键盘、红外端口、USB接口以及诸如鼠标的指示设备。The I/O subsystem 909 , the I/O subsystem 909 can connect input and output peripherals on the device, such as a touch screen 912 and other input/control devices 910 , to the peripheral interface 903 . The I/O subsystem 909 may include a display controller 9091 and one or more input controllers 9092 for controlling other input/control devices 910 . Among them, one or more input controllers 9092 receive electrical signals from or send electrical signals to other input/control devices 910, which may include physical buttons (push buttons, rocker buttons, etc. ), dials, slide switches, joysticks, click wheels. It is worth noting that the input controller 9092 can be connected to any of the following: a keyboard, an infrared port, a USB interface, and a pointing device such as a mouse.

触摸屏912,所述触摸屏912是用户移动终端与用户之间的输入接口和输出接口,将可视输出显示给用户,可视输出可以包括图形、文本、图标、视频等。A touch screen 912, the touch screen 912 is an input interface and an output interface between the user's mobile terminal and the user, and displays visual output to the user, and the visual output may include graphics, text, icons, videos, and the like.

I/O子系统909中的显示控制器9091从触摸屏912接收电信号或者向触摸屏912发送电信号。触摸屏912检测触摸屏上的接触,显示控制器9091将检测到的接触转换为与显示在触摸屏912上的用户界面对象的交互,即实现人机交互,显示在触摸屏912上的用户界面对象可以是运行游戏的图标、联网到相应网络的图标等。值得说明的是,设备还可以包括光鼠,光鼠是不显示可视输出的触摸敏感表面,或者是由触摸屏形成的触摸敏感表面的延伸。The display controller 9091 in the I/O subsystem 909 receives electrical signals from the touch screen 912 or sends electrical signals to the touch screen 912 . The touch screen 912 detects the contact on the touch screen, and the display controller 9091 converts the detected contact into an interaction with the user interface object displayed on the touch screen 912, that is, realizes human-computer interaction, and the user interface object displayed on the touch screen 912 can be a running Icons for games, icons for networking to appropriate networks, etc. It is worth noting that the device may also include an optical mouse, which is a touch-sensitive surface that does not display visual output, or that is an extension of a touch-sensitive surface formed by a touch screen.

RF电路905,主要用于建立手机与无线网络(即网络侧)的通信,实现手机与无线网络的数据接收和发送。例如收发短信息、电子邮件等。具体地,RF电路905接收并发送RF信号,RF信号也称为电磁信号,RF电路905将电信号转换为电磁信号或将电磁信号转换为电信号,并且通过该电磁信号与通信网络以及其他设备进行通信。RF电路905可以包括用于执行这些功能的已知电路,其包括但不限于天线系统、RF收发机、一个或多个放大器、调谐器、一个或多个振荡器、数字信号处理器、CODEC(COder-DECoder,编译码器)芯片组、用户标识模块(Subscriber Identity Module,SIM)等等。The RF circuit 905 is mainly used to establish communication between the mobile phone and the wireless network (that is, the network side), and realize data reception and transmission between the mobile phone and the wireless network. Such as sending and receiving short messages, e-mails, etc. Specifically, the RF circuit 905 receives and sends RF signals, which are also called electromagnetic signals, and the RF circuit 905 converts electrical signals into electromagnetic signals or converts electromagnetic signals into electrical signals, and communicates with communication networks and other devices through the electromagnetic signals to communicate. RF circuitry 905 may include known circuitry for performing these functions including, but not limited to, an antenna system, an RF transceiver, one or more amplifiers, a tuner, one or more oscillators, a digital signal processor, a CODEC ( COder-DECoder, Codec) Chipset, Subscriber Identity Module (Subscriber Identity Module, SIM) and so on.

音频电路906,主要用于从外设接口903接收音频数据,将该音频数据转换为电信号,并且将该电信号发送给扬声器911。The audio circuit 906 is mainly used to receive audio data from the peripheral interface 903 , convert the audio data into electrical signals, and send the electrical signals to the speaker 911 .

扬声器911,用于将手机通过RF电路905从无线网络接收的语音信号,还原为声音并向用户播放该声音。The speaker 911 is used to restore the voice signal received by the mobile phone from the wireless network through the RF circuit 905 into sound and play the sound to the user.

电源管理芯片908,用于为CPU902、I/O子系统及外设接口所连接的硬件进行供电及电源管理。The power management chip 908 is used for power supply and power management for the hardware connected to the CPU 902 , the I/O subsystem and the peripheral interface.

上述实施例中提供的基于定位模块的控制装置、存储介质及移动终端可执行本申请任意实施例所提供的基于定位模块的控制方法,具备执行该方法相应的功能模块和有益效果。未在上述实施例中详尽描述的技术细节,可参见本申请任意实施例所提供的基于定位模块的控制方法。The positioning module-based control device, storage medium, and mobile terminal provided in the above embodiments can execute the positioning module-based control method provided in any embodiment of the present application, and have corresponding functional modules and beneficial effects for executing the method. For technical details not exhaustively described in the foregoing embodiments, reference may be made to the positioning module-based control method provided in any embodiment of the present application.

注意,上述仅为本申请的较佳实施例及所运用技术原理。本领域技术人员会理解,本申请不限于这里所述的特定实施例,对本领域技术人员来说能够进行各种明显的变化、重新调整和替代而不会脱离本申请的保护范围。因此,虽然通过以上实施例对本申请进行了较为详细的说明,但是本申请不仅仅限于以上实施例,在不脱离本申请构思的情况下,还可以包括更多其他等效实施例,而本申请的范围由所附的权利要求范围决定。Note that the above are only preferred embodiments and technical principles used in this application. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the protection scope of the present application. Therefore, although the present application has been described in detail through the above embodiments, the present application is not limited to the above embodiments, and can also include more other equivalent embodiments without departing from the concept of the present application, and the present application The scope is determined by the scope of the appended claims.

Claims (10)

1.一种基于定位模块的控制方法,其特征在于,包括:1. A control method based on a positioning module, characterized in that, comprising: 接收到基于位置服务LBS应用对移动终端中的全球卫星导航系统GNSS模块的调用请求时,获取所述移动终端搜索到的当前无线保真WiFi热点信息列表;When receiving the call request of the global satellite navigation system GNSS module in the mobile terminal based on the location service LBS application, obtain the current wireless fidelity WiFi hotspot information list searched by the mobile terminal; 判断当前WiFi热点信息列表中是否包含预设WiFi热点,其中,所述预设WiFi热点包括处于室内环境中的WiFi热点;Judging whether the current WiFi hotspot information list contains preset WiFi hotspots, wherein the preset WiFi hotspots include WiFi hotspots in an indoor environment; 若包含,则确定所述移动终端处于室内环境,不同意所述调用请求。If yes, it is determined that the mobile terminal is in an indoor environment, and the call request is not agreed. 2.根据权利要求1所述的方法,其特征在于,在接收到LBS应用对移动终端中的GNSS模块的调用请求之前,还包括:2. The method according to claim 1, characterized in that, before receiving the call request of the LBS application to the GNSS module in the mobile terminal, further comprising: 获取所述移动终端中的WiFi热点连接历史;Obtain the WiFi hotspot connection history in the mobile terminal; 根据所述WiFi热点连接历史确定预设WiFi热点。Determine a preset WiFi hotspot according to the WiFi hotspot connection history. 3.根据权利要求2所述的方法,其特征在于,所述WiFi热点连接历史包括:与WiFi热点建立连接的时间,与WiFi热点处于连接状态的时长,与WiFi热点建立连接的次数,在与WiFi热点建立连接时的验证方式,以及与WiFi热点处于连接状态时移动终端执行的操作中的至少一个;3. The method according to claim 2, wherein the WiFi hotspot connection history includes: the time of establishing a connection with the WiFi hotspot, the duration of being in a connected state with the WiFi hotspot, the number of times of establishing a connection with the WiFi hotspot, and The verification method when the WiFi hotspot establishes a connection, and at least one of the operations performed by the mobile terminal when the WiFi hotspot is in a connected state; 所述根据所述WiFi热点连接历史确定预设WiFi热点,包括以下至少一项:The determination of the preset WiFi hotspot according to the WiFi hotspot connection history includes at least one of the following: 当根据所述WiFi热点连接历史确定所述移动终端在多个第一预设统计周期的预设时段内与第一WiFi热点建立连接时,将所述第一WiFi热点确定为预设WiFi热点;When it is determined according to the WiFi hotspot connection history that the mobile terminal establishes a connection with a first WiFi hotspot within a preset period of a plurality of first preset statistical periods, determining the first WiFi hotspot as a preset WiFi hotspot; 当根据所述WiFi热点连接历史确定所述移动终端在第二预设统计周期内与第二WiFi热点处于连接状态的时长达到预设时长阈值时,将所述第二WiFi热点确定为预设WiFi热点;When it is determined according to the WiFi hotspot connection history that the mobile terminal is connected to a second WiFi hotspot within a second preset statistical period and reaches a preset duration threshold, the second WiFi hotspot is determined as a preset WiFi hotspot hot spot; 当根据所述WiFi热点连接历史确定所述移动终端在第三预设统计周期内与第三WiFi热点建立连接的次数达到预设次数阈值时,将所述第三WiFi热点确定为预设WiFi热点;When it is determined according to the WiFi hotspot connection history that the number of times the mobile terminal establishes a connection with the third WiFi hotspot within the third preset statistical period reaches a preset number threshold, the third WiFi hotspot is determined as a preset WiFi hotspot ; 当根据所述WiFi热点连接历史确定所述移动终端在最近一次与第四WiFi热点建立连接时的验证方式为自动连接时,将所述第四WiFi热点确定为预设WiFi热点;When it is determined according to the WiFi hotspot connection history that the verification method of the mobile terminal when establishing a connection with the fourth WiFi hotspot last time is automatic connection, the fourth WiFi hotspot is determined as a preset WiFi hotspot; 当根据所述WiFi热点连接历史确定所述移动终端在与第五WiFi热点处于连接状态时执行安全等级高于预设操作安全等级的操作时,将所述第五WiFi热点确定为预设WiFi热点。When it is determined according to the WiFi hotspot connection history that the mobile terminal performs an operation with a security level higher than a preset operation security level when it is connected to the fifth WiFi hotspot, the fifth WiFi hotspot is determined as a preset WiFi hotspot . 4.根据权利要求1-3任一所述的方法,其特征在于,所述预设WiFi热点不包括基于蜂窝移动网络建立的WiFi热点。4. The method according to any one of claims 1-3, wherein the preset WiFi hotspot does not include a WiFi hotspot established based on a cellular mobile network. 5.根据权利要求1所述的方法,其特征在于,判断当前WiFi热点信息列表中是否包含预设WiFi热点,包括:5. The method according to claim 1, wherein judging whether a preset WiFi hotspot is included in the current WiFi hotspot information list comprises: 获取当前WiFi热点信息列表中各WiFi热点的属性信息,所述属性信息包括WiFi名称和/或附加标识;Obtain attribute information of each WiFi hotspot in the current WiFi hotspot information list, the attribute information including WiFi name and/or additional identification; 对于当前WiFi热点信息列表中的每个WiFi热点,根据当前WiFi热点的属性信息分析所述当前WiFi热点是否属于室内环境的公共WiFi热点;For each WiFi hotspot in the current WiFi hotspot information list, analyze whether the current WiFi hotspot belongs to the public WiFi hotspot of the indoor environment according to the attribute information of the current WiFi hotspot; 若存在至少一个室内环境的公共WiFi热点,则确定当前WiFi热点信息列表中包含预设WiFi热点。If there is at least one public WiFi hotspot in the indoor environment, it is determined that the preset WiFi hotspot is included in the current WiFi hotspot information list. 6.根据权利要求1所述的方法,其特征在于,所述若包含,则确定所述移动终端处于室内环境,不同意所述调用请求,包括:6. The method according to claim 1, characterized in that, if it is included, then determining that the mobile terminal is in an indoor environment, and not agreeing to the calling request, includes: 若包含,则判断所包含的预设WiFi热点对应的信号强度是否达到预设强度阈值;If included, it is judged whether the signal strength corresponding to the included preset WiFi hotspot reaches a preset strength threshold; 若达到,则确定所述移动终端处于室内环境,不同意所述调用请求。If so, it is determined that the mobile terminal is in an indoor environment, and the call request is not agreed. 7.根据权利要求1所述的方法,其特征在于,在所述不同意所述调用请求之后,还包括:7. The method according to claim 1, further comprising: 重新获取所述移动终端搜索到的当前WiFi热点信息列表,若判断出当前WiFi热点信息列表中不包含预设WiFi热点,则在确定所述LBS应用需要使用定位服务时,控制所述GNSS模块向所述LBS应用提供位置信息。Reacquire the current WiFi hotspot information list searched by the mobile terminal, if it is judged that the preset WiFi hotspot is not included in the current WiFi hotspot information list, then when it is determined that the LBS application needs to use the positioning service, control the GNSS module to The LBS application provides location information. 8.一种基于定位模块的控制装置,其特征在于,包括:8. A control device based on a positioning module, characterized in that it comprises: 热点信息列表获取模块,用于在接收到基于位置服务LBS应用对移动终端中的全球卫星导航系统GNSS模块的调用请求时,获取所述移动终端搜索到的当前无线保真WiFi热点信息列表;The hotspot information list acquisition module is used to obtain the current wireless fidelity WiFi hotspot information list searched by the mobile terminal when receiving the call request of the global satellite navigation system GNSS module in the mobile terminal based on the location service LBS application; 预设热点判断模块,用于判断当前WiFi热点信息列表中是否包含预设WiFi热点,其中,所述预设WiFi热点包括处于室内环境中的WiFi热点;A preset hotspot judging module, configured to judge whether the current WiFi hotspot information list contains preset WiFi hotspots, wherein the preset WiFi hotspots include WiFi hotspots in an indoor environment; 调用请求处理模块,用于在判断出当前WiFi热点信息列表中包含预设WiFi热点时,确定所述移动终端处于室内环境,不同意所述调用请求。The call request processing module is used to determine that the mobile terminal is in an indoor environment when it is determined that the current WiFi hotspot information list contains preset WiFi hotspots, and does not agree to the call request. 9.一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现如权利要求1-7中任一所述的基于定位模块的控制方法。9. A computer-readable storage medium, on which a computer program is stored, wherein when the program is executed by a processor, the positioning module-based control method according to any one of claims 1-7 is implemented. 10.一种移动终端,其特征在于,包括存储器,全球卫星导航系统GNSS模块,处理器及存储在存储器上并可在处理器运行的计算机程序,所述处理器执行所述计算机程序时实现如权利要求1-7任一所述的基于定位模块的控制方法。10. A mobile terminal, characterized in that it includes a memory, a global satellite navigation system GNSS module, a processor and a computer program that is stored on the memory and can run on the processor, and the processor implements the computer program when executing the computer program. The positioning module-based control method according to any one of claims 1-7.
CN201711325844.3A 2017-12-13 2017-12-13 Control method and device based on positioning module, storage medium and mobile terminal Expired - Fee Related CN108064023B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711325844.3A CN108064023B (en) 2017-12-13 2017-12-13 Control method and device based on positioning module, storage medium and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711325844.3A CN108064023B (en) 2017-12-13 2017-12-13 Control method and device based on positioning module, storage medium and mobile terminal

Publications (2)

Publication Number Publication Date
CN108064023A true CN108064023A (en) 2018-05-22
CN108064023B CN108064023B (en) 2020-01-14

Family

ID=62138378

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711325844.3A Expired - Fee Related CN108064023B (en) 2017-12-13 2017-12-13 Control method and device based on positioning module, storage medium and mobile terminal

Country Status (1)

Country Link
CN (1) CN108064023B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109211259A (en) * 2018-09-28 2019-01-15 Oppo广东移动通信有限公司 Display methods, device, terminal and the storage medium of path
CN109557570A (en) * 2018-09-05 2019-04-02 南京小脚印网络科技有限公司 Safe positioning method and device based on self study
CN110691324A (en) * 2018-07-06 2020-01-14 朱海威 Method for positioning terminal by using WLAN signal
CN114339957A (en) * 2022-02-28 2022-04-12 深圳市元征科技股份有限公司 Wi-Fi hotspot connection method and device and terminal equipment
CN114630263A (en) * 2020-11-27 2022-06-14 广州视源电子科技股份有限公司 Method and device for identifying position change of electronic equipment and computer equipment

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130260790A1 (en) * 2012-04-02 2013-10-03 Storewards Ltd. Method and system for providing location identification
CN103856989A (en) * 2012-11-28 2014-06-11 中国电信股份有限公司 Method and system for positioning switching between indoor and outdoor, terminal and positioning application platform
US8941485B1 (en) * 2005-05-09 2015-01-27 Ehud Mendelson System and method of obtaining and using a vehicle identifier for providing information to an end user
CN104539782A (en) * 2014-12-19 2015-04-22 广东欧珀移动通信有限公司 Event promoting method and device
CN105163373A (en) * 2015-07-13 2015-12-16 广东欧珀移动通信有限公司 Positioning method and mobile terminal
CN105407497A (en) * 2015-12-08 2016-03-16 北京百度网讯科技有限公司 Indoor and outdoor position judging method and device
CN106550446A (en) * 2015-09-18 2017-03-29 北京奇宝科技有限公司 Localization method and geographical position monitoring device
CN107172205A (en) * 2017-06-29 2017-09-15 腾讯科技(深圳)有限公司 Pushed information processing method, mobile terminal and computer-readable storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8941485B1 (en) * 2005-05-09 2015-01-27 Ehud Mendelson System and method of obtaining and using a vehicle identifier for providing information to an end user
US20130260790A1 (en) * 2012-04-02 2013-10-03 Storewards Ltd. Method and system for providing location identification
CN103856989A (en) * 2012-11-28 2014-06-11 中国电信股份有限公司 Method and system for positioning switching between indoor and outdoor, terminal and positioning application platform
CN104539782A (en) * 2014-12-19 2015-04-22 广东欧珀移动通信有限公司 Event promoting method and device
CN105163373A (en) * 2015-07-13 2015-12-16 广东欧珀移动通信有限公司 Positioning method and mobile terminal
CN106550446A (en) * 2015-09-18 2017-03-29 北京奇宝科技有限公司 Localization method and geographical position monitoring device
CN105407497A (en) * 2015-12-08 2016-03-16 北京百度网讯科技有限公司 Indoor and outdoor position judging method and device
CN107172205A (en) * 2017-06-29 2017-09-15 腾讯科技(深圳)有限公司 Pushed information processing method, mobile terminal and computer-readable storage medium

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110691324A (en) * 2018-07-06 2020-01-14 朱海威 Method for positioning terminal by using WLAN signal
CN109557570A (en) * 2018-09-05 2019-04-02 南京小脚印网络科技有限公司 Safe positioning method and device based on self study
CN109557570B (en) * 2018-09-05 2023-06-20 南京小脚印网络科技有限公司 Self-learning-based safe positioning method and device
CN109211259A (en) * 2018-09-28 2019-01-15 Oppo广东移动通信有限公司 Display methods, device, terminal and the storage medium of path
CN109211259B (en) * 2018-09-28 2021-08-10 Oppo广东移动通信有限公司 Display method, device, terminal and storage medium of track route
CN114630263A (en) * 2020-11-27 2022-06-14 广州视源电子科技股份有限公司 Method and device for identifying position change of electronic equipment and computer equipment
CN114339957A (en) * 2022-02-28 2022-04-12 深圳市元征科技股份有限公司 Wi-Fi hotspot connection method and device and terminal equipment
CN114339957B (en) * 2022-02-28 2024-05-10 深圳市元征科技股份有限公司 Wi-Fi hot spot connection method and device and terminal equipment

Also Published As

Publication number Publication date
CN108064023B (en) 2020-01-14

Similar Documents

Publication Publication Date Title
CN108064024B (en) Control method and device based on positioning module, storage medium and mobile terminal
CN108064023B (en) Control method and device based on positioning module, storage medium and mobile terminal
US11706584B2 (en) Location service management
CN108169775B (en) Control method and device based on positioning module, storage medium and mobile terminal
CN103563406B (en) Monitoring exit from geofence
CN103563405B (en) Selecting wireless access points for geofence monitoring
CN109891934B (en) Positioning method and device
CN108111971B (en) Positioning method, device, storage medium and mobile terminal
CN107508883B (en) Information pushing method and device, storage medium and mobile terminal
US9717065B2 (en) Indoor remote triggered location scanning
CN108055642B (en) Control method and device of positioning module, storage medium and mobile terminal
CN108093368B (en) Control method, device, storage medium and mobile terminal based on positioning module
CN103563415A (en) Over-the-air device configuration
CN108076429A (en) Positioning method, positioning device, storage medium and mobile terminal
CN108702602A (en) Image sharing method, electronic device and system
WO2020077485A1 (en) Geo-fence updating method, and communication device
CN112312308B (en) Indoor positioning method and terminal equipment
CN108076507A (en) Positioning method control method, device, storage medium and mobile terminal
CN108008423A (en) Control method and device based on positioning module, storage medium and mobile terminal
CN110622528B (en) Method and device for recommending information
US10111047B2 (en) Positioning method and device
CN106714277A (en) Network connection method and terminal
CN108093367A (en) Control method and device based on positioning module, storage medium and mobile terminal
CN108040320B (en) GNSS positioning control method and device, storage medium and mobile terminal
CN107291791A (en) Method, device and mobile terminal that a kind of positional information is shared

Legal Events

Date Code Title Description
PB01 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
CB02 Change of applicant information

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

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

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

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

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

Granted publication date: 20200114