[go: up one dir, main page]

CN108111974A - Control method and device of positioning module, storage medium and terminal - Google Patents

Control method and device of positioning module, storage medium and terminal Download PDF

Info

Publication number
CN108111974A
CN108111974A CN201711360372.5A CN201711360372A CN108111974A CN 108111974 A CN108111974 A CN 108111974A CN 201711360372 A CN201711360372 A CN 201711360372A CN 108111974 A CN108111974 A CN 108111974A
Authority
CN
China
Prior art keywords
target device
positioning module
current device
positioning
current
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.)
Pending
Application number
CN201711360372.5A
Other languages
Chinese (zh)
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 CN201711360372.5A priority Critical patent/CN108111974A/en
Publication of CN108111974A publication Critical patent/CN108111974A/en
Pending legal-status Critical Current

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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • H04W4/023Services making use of location information using mutual or relative location information between multiple location based services [LBS] targets or of distance thresholds
    • 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
    • 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)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the application discloses a control method, a control device, a storage medium and a terminal of a positioning module, wherein the method comprises the following steps: when a positioning request triggered by a user is received, judging whether a current device establishes a position sharing connection with a target device, wherein the position sharing connection is used for sharing position information between the current device and the target device; if the current equipment and the target equipment establish position sharing connection, sharing the positioning information acquired by the positioning module of the target equipment to the current equipment; the working frequency of the positioning module of the current equipment is reduced, the working frequency of the positioning module can be reduced, and the power consumption of the positioning module is further reduced.

Description

定位模块的控制方法、装置、存储介质及终端Control method, device, storage medium and terminal of positioning module

技术领域technical field

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

背景技术Background technique

随着电子设备的不断发展,移动终端等电子设备能够为用户提供定位服务。手机厂商在移动终端中预先安装定位模块,定位模块通过全球导航卫星系统(GNSS,GlobalNavigation Satellite System)获取移动终端的定位信息。移动终端中基于位置服务(LBS,Location Based Service)的应用程序(APP,Application)通过定位模块提供的定位信息实现定位。With the continuous development of electronic devices, electronic devices such as mobile terminals can provide positioning services for users. A mobile phone manufacturer pre-installs a positioning module in a mobile terminal, and the positioning module obtains positioning information of the mobile terminal through a Global Navigation Satellite System (GNSS, Global Navigation Satellite System). An application program (APP, Application) based on a location service (LBS, Location Based Service) in a mobile terminal realizes positioning through the positioning information provided by the positioning module.

由于定位模块通常按照预先设置的频率获取定位信息,使得定位模块持续耗电,导致定位模块耗电量较高。Since the positioning module usually acquires positioning information according to a preset frequency, the positioning module consumes power continuously, resulting in high power consumption of the positioning module.

发明内容Contents of the invention

本申请实施例的目的是提供一种定位模块的控制方法、装置、存储介质及终端,可以降低定位模块的耗电量。The purpose of the embodiment of the present application is to provide a positioning module control method, device, storage medium and terminal, which can reduce the power consumption of the positioning module.

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

当接收到用户触发的定位请求时,判断当前设备是否与目标设备建立位置共享连接,所述位置共享连接用于在所述当前设备和所述目标设备之间共享位置信息;When receiving a positioning request triggered by the user, determine whether the current device establishes a location sharing connection with the target device, and the location sharing connection is used to share location information between the current device and the target device;

如果当前设备与目标设备建立位置共享连接,则将所述目标设备的定位模块获取的定位信息共享至所述当前设备;If the current device establishes a location sharing connection with the target device, share the positioning information acquired by the positioning module of the target device with the current device;

降低所述当前设备的定位模块的工作频率。Reduce the working frequency of the positioning module of the current device.

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

判断模块,用于当接收到用户触发的定位请求时,判断当前设备是否与目标设备建立位置共享连接,所述位置共享连接用于在所述当前设备和所述目标设备之间共享位置信息;A judging module, configured to judge whether the current device establishes a location sharing connection with the target device when receiving a positioning request triggered by the user, and the location sharing connection is used to share location information between the current device and the target device;

共享模块,用于如果当前设备与目标设备建立位置共享连接,则将所述目标设备的定位模块获取的定位信息共享至所述当前设备;A sharing module, configured to share the positioning information obtained by the positioning module of the target device with the current device if the current device establishes a location sharing connection with the target device;

控制模块,用于降低所述当前设备的定位模块的工作频率。The control module is used to reduce the working frequency of the positioning module of the current device.

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

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

本申请实施例中提供的定位模块的控制方案,当接收到用户触发的定位请求时,判断当前设备是否与目标设备建立位置共享连接,所述位置共享连接用于在所述当前设备和所述目标设备之间共享位置信息;如果当前设备与目标设备建立位置共享连接,则将所述目标设备的定位模块获取的定位信息共享至所述当前设备;降低所述当前设备的定位模块的工作频率,能够降低定位模块的工作频率,进而降低定位模块的耗电量。The control scheme of the positioning module provided in the embodiment of the present application, when receiving a positioning request triggered by the user, judges whether the current device establishes a location sharing connection with the target device, and the location sharing connection is used to connect the current device and the target device. Share location information between target devices; if the current device establishes a location sharing connection with the target device, share the location information acquired by the positioning module of the target device with the current device; reduce the operating frequency of the positioning module of the current device , which can reduce the operating frequency of the positioning module, thereby reducing the power consumption of the positioning module.

附图说明Description of drawings

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

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

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

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

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

图6为本申请实施例提供的另一种定位模块的控制装置的结构框图;Fig. 6 is a structural block diagram of another positioning module control device provided by the embodiment of the present application;

图7为本申请实施例提供的一种移动终端的结构示意图。FIG. 7 is a schematic structural diagram of a 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.

随着电子设备的发展,电子设备能够为用户提供定位服务。随着定位服务的产生安装在电子设备上的应用程序对提供定位信息的定位模块的使用也越来越频繁。目前,定位模块按照固定的频率进行工作。但是当用户已经明确和朋友一同行动时,用户和该朋友的位置信息在一定时间内是一致的,此时如果用户和该朋友的终端均开启定位服务,无疑将造成电量的浪费。基于此,本申请提供了一种基于建立的位置共享连接对当前设备和目标设备的定位信息进行共享,进而可以暂时降低当前设备或目标设备的定位模块的工作频率,实现降低定位模块功耗的效果。具体方案如下所示:With the development of electronic devices, electronic devices can provide positioning services for users. With the generation of location services, applications installed on electronic devices use location modules that provide location information more and more frequently. Currently, the positioning module works at a fixed frequency. However, when the user clearly acts together with a friend, the location information of the user and the friend are consistent within a certain period of time. At this time, if the terminals of the user and the friend both turn on the positioning service, it will undoubtedly cause a waste of power. Based on this, the present application provides a method of sharing the positioning information of the current device and the target device based on the established location sharing connection, thereby temporarily reducing the operating frequency of the positioning module of the current device or the target device, and reducing the power consumption of the positioning module. Effect. The specific plan is as follows:

图1为本申请实施例提供的定位模块的控制方法的流程示意图,该方法可以由提供定位服务的装置执行,其中该装置可由软件和/或硬件实现,一般可集成在移动终端中,移动终端可以为智能手机、平板电脑、可穿戴设备等,如图1所示,该方法包括:Fig. 1 is a schematic flowchart of a control method of a positioning module provided by an embodiment of the present application. The method can be executed by a device that provides positioning services, wherein the device can be implemented by software and/or hardware, and can generally be integrated in a mobile terminal. The mobile terminal It can be a smart phone, a tablet computer, a wearable device, etc., as shown in Figure 1, the method includes:

步骤110、当接收到用户触发的定位请求时,判断当前设备是否与目标设备建立位置共享连接。Step 110, when receiving a positioning request triggered by the user, determine whether the current device establishes a location sharing connection with the target device.

其中,位置共享连接用于在当前设备和目标设备之间共享位置信息。Wherein, the location sharing connection is used for sharing location information between the current device and the target device.

位置共享连接根据当前设备与目标设备建立的无线连接中。例如,蓝牙连接中可以通过对象存储规范(Object Push Profile,OPP)协议,在当前设备与目标设备之间共享位置信息。The location sharing connection is based on the wireless connection established between the current device and the target device. For example, in the Bluetooth connection, location information may be shared between the current device and the target device through an Object Push Profile (OPP) protocol.

在进行共享位置信息时,可以位置信息的发送方可以在当前设备和目标设备之间交替进行。例如当前设备的定位模块关闭预设时间,同时使用目标设备通过为止共享连接发送的位置信息。在预设时间后的下一个预设时间内,当前设备的定位模块启动,并为目标设备提供定位信息,同时目标设备关闭其定位信息。When sharing location information, the sender of the location information can alternate between the current device and the target device. For example, the positioning module of the current device is turned off for a preset time, and at the same time, the location information sent by the target device through the shared connection is used. Within the next preset time after the preset time, the positioning module of the current device is activated, and provides positioning information for the target device, and at the same time, the target device closes its positioning information.

可选的,根据当前设备和目标设备的当前电量确定位置信息的发送者。例如将剩余电量较高的设备确定为位置信息的发送者。可选的,根据充电状态确定位置信息的发送者。如果当前设备和目标设备之中一个正在充电另一个未充电,则将充电的设备确定为位置信息的发送者,另一个设备作为位置信息的接收者。位置信息的接收者降低自身的定位模块的工作频率。Optionally, the sender of the location information is determined according to the current power levels of the current device and the target device. For example, a device with a higher remaining power is determined as the sender of the location information. Optionally, the sender of the location information is determined according to the charging state. If one of the current device and the target device is charging and the other is not charging, the charged device is determined as the sender of the location information, and the other device as the receiver of the location information. The receiver of the location information reduces the working frequency of its own positioning module.

在一种实现方式中,判断当前设备是否与目标设备建立蓝牙连接。In an implementation manner, it is judged whether the current device establishes a Bluetooth connection with the target device.

通过访问蓝牙模块可获取已连接的蓝牙设备。当前设备可以通过蓝牙连接与目标设备进行数据收发,数据收发包括定位信息的收发。The connected Bluetooth devices can be obtained by accessing the Bluetooth module. The current device can send and receive data with the target device through the Bluetooth connection, and the data sending and receiving includes sending and receiving positioning information.

在另一种实现方式中,判断当前设备是否与目标设备建立近距离无线通讯连接。In another implementation manner, it is determined whether the current device establishes a short-range wireless communication connection with the target device.

近距离无线通讯(Near Field Communication,NFC)可以实现在当前设备和目标设备之间进行数据通信。如果当前设备与目标设备建立NFC连接,则可确定与目标设备建立位置共享连接。Near Field Communication (NFC) can realize data communication between a current device and a target device. If the current device establishes an NFC connection with the target device, it may be determined to establish a location sharing connection with the target device.

进一步的,如果当前设备的使用者确定了目标设备,则可以在当前设备中生成蓝牙连接或NFC连接的可识别标识,然后另一用户(或当前设备的使用者)使用目标设备扫描二维码后,目标设备与当前设备建立蓝牙连接或NFC连接。其中,可识别标识可以为二维码、三位码或条码等。Further, if the user of the current device determines the target device, an identifiable identification of the Bluetooth connection or NFC connection can be generated in the current device, and then another user (or the user of the current device) uses the target device to scan the QR code After that, the target device establishes a Bluetooth connection or an NFC connection with the current device. Wherein, the identifiable mark may be a two-dimensional code, a three-digit code, or a bar code.

进一步的,在建立位置共享连接后,当同时需要传输位置信息、图片数据、多媒体数据等其他数据时,优选传输位置信息。Further, after the location sharing connection is established, when other data such as location information, picture data, and multimedia data need to be transmitted at the same time, the location information is preferably transmitted.

进一步的,位置共享连接还可以为无线保真WIFI连接或者移动蜂窝网络(如手机使用的2G、3G、4G或5G网络等)连接。例如,当前设备与目标设备通过访问服务器,建立位置共享连接。目标设备可以通过网络将其定位信息通过WIFI或移动蜂窝网络Further, the location sharing connection may also be a wireless fidelity WIFI connection or a mobile cellular network (such as a 2G, 3G, 4G or 5G network used by a mobile phone, etc.) connection. For example, the current device and the target device establish a location sharing connection by accessing the server. The target device can send its location information through the network through WIFI or mobile cellular network

步骤120、如果当前设备与目标设备建立位置共享连接,则将目标设备的定位模块获取的定位信息共享至当前设备。Step 120, if the current device establishes a location sharing connection with the target device, share the positioning information acquired by the positioning module of the target device with the current device.

如果当前设备与目标设备建立位置共享连接,则可以按照预设时间间隔将目标设备的定位模块获取的定位信息共享至当前设备。预设时间间隔可以为1次/秒。If the current device establishes a location sharing connection with the target device, the positioning information acquired by the positioning module of the target device may be shared with the current device at preset time intervals. The preset time interval can be 1 time/second.

可选的,如果当前设备触发位置获取请求,则将目标设备的定位模块获取的定位信息共享至当前设备。位置获取请求可以在触发定位时产生,例如用户启动导航应用进行导航,或者用户触发拍照指令进行拍照时产生。拍照指令可以在用户点击相机应用图标时触发;还可以在用户通过快捷方式启动拍照应用时触发。例如,在锁屏界面,如果用户在预设方向(如从屏幕下方向屏幕上方移动)上进行滑动操作,则启动拍照应用。还可以是用户在即时聊天、购物应用、信息推荐应用中,启动拍照功能时,触发拍照指令。Optionally, if the current device triggers a location acquisition request, the positioning information obtained by the positioning module of the target device is shared with the current device. The location acquisition request may be generated when positioning is triggered, for example, when the user starts a navigation application for navigation, or when the user triggers a camera instruction to take a photo. The camera command can be triggered when the user clicks the camera application icon; it can also be triggered when the user starts the camera application through a shortcut. For example, on the lock screen interface, if the user performs a sliding operation in a preset direction (such as moving from the bottom of the screen to the top of the screen), the camera application is started. Alternatively, when the user activates the camera function in the instant chat, shopping application, or information recommendation application, the camera command is triggered.

步骤130、降低当前设备的定位模块的工作频率。Step 130, reducing the operating frequency of the positioning module of the current device.

降低定位模块的工作频率,可以为降低当前设备的定位模块的信息获取频率。还可以为,关闭当前设备的定位模块。定位模块可以为终端中用于进行定位的功能模组,该模组可以为GPS定位模块或者全球导航卫星系统GNSS定位模块等。降低定位模块获取定位信息的频率,能够降低定位模块的功耗。暂时关闭定位模块时可缓存定位信息,当其他应用访问定位模块查询位置信息时,将缓存的定位信息发送至其他应用。Reducing the working frequency of the positioning module can reduce the information acquisition frequency of the positioning module of the current device. It can also be to close the positioning module of the current device. The positioning module may be a functional module for positioning in the terminal, and the module may be a GPS positioning module or a global navigation satellite system (GNSS) positioning module. Reducing the frequency at which the positioning module acquires positioning information can reduce the power consumption of the positioning module. When the positioning module is temporarily closed, the positioning information can be cached, and when other applications access the positioning module to query the location information, the cached positioning information will be sent to other applications.

本实施例中提供的定位模块的控制方法,当接收到用户触发的定位请求时,判断当前设备是否与目标设备建立位置共享连接,位置共享连接用于在当前设备和目标设备之间共享位置信息;如果当前设备与目标设备建立位置共享连接,则将目标设备的定位模块获取的定位信息共享至当前设备;降低当前设备的定位模块的工作频率。由于通过位置共享连接获取位置信息时,不需要启动定位模块,因此在通过位置共享连接获取位置信息时能够降低定位模块的工作频率,进而降低定位模块的耗电量。The control method of the positioning module provided in this embodiment, when receiving a positioning request triggered by the user, judges whether the current device establishes a location sharing connection with the target device, and the location sharing connection is used to share location information between the current device and the target device ; If the current device establishes a location sharing connection with the target device, share the positioning information acquired by the positioning module of the target device with the current device; reduce the working frequency of the positioning module of the current device. Since the location information is obtained through the location sharing connection, the positioning module does not need to be activated, so when the location information is obtained through the location sharing connection, the working frequency of the positioning module can be reduced, thereby reducing the power consumption of the positioning module.

图2为本申请实施例提供的一种定位模块的控制方法的流程示意图,作为对上述实施例的进一步说明,包括:Fig. 2 is a schematic flowchart of a control method of a positioning module provided by an embodiment of the present application, as a further description of the above embodiment, including:

步骤210、当接收到用户触发的定位请求时,判断当前设备是否与目标设备建立位置共享连接,位置共享连接用于在当前设备和目标设备之间共享位置信息。Step 210, when receiving a positioning request triggered by the user, determine whether the current device establishes a location sharing connection with the target device, and the location sharing connection is used to share location information between the current device and the target device.

可选的,位置共享连接为当前设备与目标设备之间建立的蓝牙连接。Optionally, the location sharing connection is a Bluetooth connection established between the current device and the target device.

步骤220、如果当前设备与目标设备建立蓝牙连接,则获取当前设备与目标设备的距离。Step 220, if the current device establishes a Bluetooth connection with the target device, obtain the distance between the current device and the target device.

由于蓝牙连接具有一定的传输距离,可能出现当前设备与目标设备之间的距离超出的蓝牙信号的传输距离,此时如果仍然通过位置共享连接获取位置信息则会出现位置信息获取失败的问题。因此,在当前设备与目标设备建立蓝牙连接之后,可以按照一定的时间阈值定期检测当前设备与目标设备之间的距离,时间阈值可以为1-10分钟,可选为1分钟。Since the Bluetooth connection has a certain transmission distance, the distance between the current device and the target device may exceed the transmission distance of the Bluetooth signal. At this time, if the location information is still obtained through the location sharing connection, the problem of location information acquisition failure will occur. Therefore, after the current device establishes a Bluetooth connection with the target device, the distance between the current device and the target device can be periodically detected according to a certain time threshold. The time threshold can be 1-10 minutes, and 1 minute is optional.

步骤230、如果距离小于预设距离,则将目标设备的定位模块获取的定位信息共享至当前设备,降低当前设备的定位模块的工作频率。Step 230, if the distance is less than the preset distance, share the positioning information acquired by the positioning module of the target device with the current device, and reduce the working frequency of the positioning module of the current device.

在获取到当前设备与目标设备之间的距离后,将该距离与预设距离进行比较。如果小于预设距离,则当前设备与目标设备之间的连接可以维持位置共享连接。该预设距离小于蓝牙连接的传输距离阈值,可选的预设距离为传输距离阈值的60%-90%。After the distance between the current device and the target device is obtained, the distance is compared with a preset distance. If the distance is less than the preset distance, the connection between the current device and the target device may maintain the location sharing connection. The preset distance is less than the transmission distance threshold of the Bluetooth connection, and the optional preset distance is 60%-90% of the transmission distance threshold.

步骤240、如果距离大于等于预设距离,则输出提示信息,以便当前设备与其他设备建立蓝牙连接或者其他形式的位置共享连接。Step 240, if the distance is greater than or equal to the preset distance, then output prompt information so that the current device can establish a Bluetooth connection or other forms of location sharing connection with other devices.

本实施例提供的定位模块的控制方法,通过基于距离进行位置信息的传输,使得在当前设备和目标设备之间进行位置共享更加可靠。The control method of the positioning module provided in this embodiment makes the position sharing between the current device and the target device more reliable by transmitting the position information based on the distance.

图3为本申请实施例提供的一种定位模块的控制方法的流程示意图,作为对上述实施例的进一步说明,包括:Fig. 3 is a schematic flowchart of a control method of a positioning module provided by an embodiment of the present application, as a further description of the above embodiment, including:

步骤310、当接收到用户触发的定位请求时,判断当前设备是否与目标设备建立位置共享连接,位置共享连接用于在当前设备和目标设备之间共享位置信息。Step 310: When receiving a positioning request triggered by the user, determine whether the current device establishes a location sharing connection with the target device, and the location sharing connection is used to share location information between the current device and the target device.

步骤320、如果当前设备与目标设备建立位置共享连接,则判断目标设备的定位模块是否定位成功。Step 320 : If the current device establishes a location sharing connection with the target device, it is judged whether the positioning module of the target device locates successfully.

在进行位置共享时,可能会因为目标设备的电量或者网络连接等原因造成目标设备定位失败,此时当前设备将无法获取到共享的位置信息。因此,在建立位置共享连接后,当前设备向目标设备发送状态询问请求,目标设备反馈定位成功或失败给当前设备,进而实现对目标设备是否定位成功的监控。When performing location sharing, the location of the target device may fail due to reasons such as the power of the target device or network connection. At this time, the current device will not be able to obtain the shared location information. Therefore, after the location sharing connection is established, the current device sends a status inquiry request to the target device, and the target device feeds back the location success or failure to the current device, thereby realizing the monitoring of whether the location of the target device is successful.

步骤330、如果目标设备的定位模块定位成功,则将目标设备的定位模块获取的定位信息共享至当前设备,降低当前设备的定位模块的工作频率。Step 330: If the positioning module of the target device locates successfully, share the positioning information acquired by the positioning module of the target device with the current device, and reduce the working frequency of the positioning module of the current device.

步骤340、如果目标设备的定位模块定位失败,则输出提示信息,以便当前设备与其他设备建立蓝牙连接或者其他形式的位置共享连接。Step 340: If the positioning module of the target device fails to locate, output a prompt message so that the current device can establish a Bluetooth connection or other forms of location sharing connection with other devices.

本实施例提供的定位模块的控制方法,能够在目标设备定位成功时进行位置信息的共享,提高位置共享的可靠性。The control method of the positioning module provided in this embodiment can share the location information when the target device is positioned successfully, and improve the reliability of location sharing.

图4为本申请实施例提供的一种定位模块的控制方法的流程示意图,作为对上述实施例的进一步说明,包括:Fig. 4 is a schematic flowchart of a control method of a positioning module provided by an embodiment of the present application, as a further description of the above embodiment, including:

步骤410、当接收到用户触发的定位请求时,判断当前设备是否与目标设备建立位置共享连接,位置共享连接用于在当前设备和目标设备之间共享位置信息。Step 410, when receiving a location request triggered by the user, determine whether the current device establishes a location sharing connection with the target device, and the location sharing connection is used to share location information between the current device and the target device.

步骤420、如果当前设备与目标设备未建立位置共享连接,则通过预设无线通信协议检测是否发现可连接的目标设备。Step 420, if the current device has not established a location sharing connection with the target device, then detect whether a connectable target device is found through a preset wireless communication protocol.

预设无线通信协议可以为预先设置的,例如蓝牙通信协议、NFC通信协议等。The preset wireless communication protocol may be preset, such as a Bluetooth communication protocol, an NFC communication protocol, and the like.

预设无线通信协议也可以为用户常用的连接方式,利用用户历史常用的连接方式。The preset wireless communication protocol may also be a connection method commonly used by the user, using the connection method frequently used by the user in history.

可连接的目标设备可以为用户通过蓝牙协议发现的目标设备,也可以是历史连接成功的一个或多个目标设备。The connectable target device may be a target device discovered by the user through the Bluetooth protocol, or may be one or more target devices that have been successfully connected in history.

步骤430、如果发现可连接的目标设备,则与可连接的目标设备建立位置共享连接。Step 430, if a connectable target device is found, establish a location sharing connection with the connectable target device.

当发现可连接的目标设备时,如果为历史连接成功的目标设备,则可根据记录的cookie信息,自动建立连接。也可以将可连接的目标设备以表格形式输出给用户,由用户进行选择。When a target device that can be connected is found, if it is a target device that has been successfully connected in the history, it can automatically establish a connection according to the recorded cookie information. It is also possible to output the connectable target devices to the user in a form for selection by the user.

步骤440、如果当前设备与目标设备建立位置共享连接,则将目标设备的定位模块获取的定位信息共享至当前设备;降低当前设备的定位模块的工作频率。Step 440: If the current device establishes a location sharing connection with the target device, share the positioning information acquired by the positioning module of the target device with the current device; reduce the working frequency of the positioning module of the current device.

本实施例提供的定位模块的控制方法,能够由当前设备自动建立位置共享连接,降低定位模块的功耗。The control method of the positioning module provided in this embodiment can automatically establish a location sharing connection by the current device, and reduce the power consumption of the positioning module.

进一步的,还包括:Further, it also includes:

当当前设备与目标设备建立位置共享连接建立连接时,根据预设时间间隔获取目标设备的定位信息,并对定位信息进行缓存;当接收到用户触发的定位请求时,调用缓存的定位信息。When the current device establishes a location sharing connection with the target device, the positioning information of the target device is obtained according to a preset time interval, and the positioning information is cached; when a positioning request triggered by the user is received, the cached positioning information is invoked.

预设时间间隔为1次/秒。在接收到目标设备发送的位置信息后,将该位置信息进行缓存,在接收到下一次位置信息之前,如果当前终端本地再次出发定位请求,则使用缓存的定位信息进行响应,进而提高定位请求的反馈效率。The preset time interval is 1 time/second. After receiving the location information sent by the target device, the location information is cached. Before receiving the next location information, if the current terminal locally initiates a positioning request again, it will use the cached positioning information to respond, thereby improving the accuracy of the positioning request. Feedback efficiency.

图5为本申请实施例提供的一种定位模块的控制装置的结构示意图。如图5所示,该装置包括:判断模块510、共享模块520和控制模块530。FIG. 5 is a schematic structural diagram of a control device for a positioning module provided by an embodiment of the present application. As shown in FIG. 5 , the device includes: a judgment module 510 , a sharing module 520 and a control module 530 .

判断模块510,用于当接收到用户触发的定位请求时,判断当前设备是否与目标设备建立位置共享连接,所述位置共享连接用于在所述当前设备和所述目标设备之间共享位置信息;A judging module 510, configured to judge whether the current device establishes a location sharing connection with the target device when receiving a positioning request triggered by the user, and the location sharing connection is used to share location information between the current device and the target device ;

共享模块520,用于如果当前设备与目标设备建立位置共享连接,则将所述目标设备的定位模块获取的定位信息共享至所述当前设备;A sharing module 520, configured to share the positioning information obtained by the positioning module of the target device with the current device if the current device establishes a location sharing connection with the target device;

控制模块530,用于降低所述当前设备的定位模块的工作频率。The control module 530 is configured to reduce the working frequency of the positioning module of the current device.

进一步的,判断模块510用于:Further, the judging module 510 is used for:

判断所述当前设备是否与所述目标设备建立蓝牙连接;或者,judging whether the current device establishes a Bluetooth connection with the target device; or,

判断所述当前设备是否与所述目标设备建立近距离无线通讯连接。Judging whether the current device establishes a short-range wireless communication connection with the target device.

进一步的,共享模块520用于:Further, the shared module 520 is used for:

所述如果当前设备与目标设备建立位置共享连接,则将所述目标设备的定位模块获取的定位信息共享至所述当前设备,包括:If the current device establishes a location sharing connection with the target device, sharing the positioning information obtained by the positioning module of the target device with the current device includes:

如果当前设备与目标设备建立蓝牙连接,则获取所述当前设备与所述目标设备的距离;If the current device establishes a Bluetooth connection with the target device, then obtain the distance between the current device and the target device;

如果所述距离小于预设距离,则将所述目标设备的定位模块获取的定位信息共享至所述当前设备。If the distance is less than the preset distance, the positioning information acquired by the positioning module of the target device is shared with the current device.

进一步的,判断模块510还用于在将所述目标设备的定位模块获取的定位信息共享至所述当前设备之前,判断所述目标设备的定位模块是否定位成功;Further, the judging module 510 is further configured to judge whether the positioning module of the target device is successfully positioned before sharing the positioning information acquired by the positioning module of the target device to the current device;

共享模块520还用于,如果所述目标设备的定位模块定位成功,则将所述目标设备的定位模块获取的定位信息共享至所述当前设备。The sharing module 520 is further configured to, if the positioning module of the target device locates successfully, share the positioning information obtained by the positioning module of the target device with the current device.

进一步的,如图6所示,还包括检测模块540和存储模块550。Further, as shown in FIG. 6 , a detection module 540 and a storage module 550 are also included.

检测模块540用于,如果当前设备与目标设备未建立位置共享连接,则通过预设无线通信协议检测是否发现可连接的目标设备;如果发现可连接的目标设备,则与所述可连接的目标设备建立位置共享连接。The detection module 540 is used to detect whether a connectable target device is found through a preset wireless communication protocol if the current device has not established a location sharing connection with the target device; The device establishes a location sharing connection.

存储模块550用于当当前设备与目标设备建立位置共享连接建立连接时,根据预设时间间隔获取所述目标设备的定位信息,并对所述定位信息进行缓存;当接收到用户触发的定位请求时,调用缓存的定位信息。The storage module 550 is used to obtain the positioning information of the target device according to a preset time interval when the current device establishes a location sharing connection with the target device, and cache the positioning information; when a positioning request triggered by the user is received , call the cached location information.

进一步的,控制模块530用于:Further, the control module 530 is used for:

降低所述当前设备的定位模块的信息获取频率;或者,reducing the information acquisition frequency of the positioning module of the current device; or,

关闭所述当前设备的定位模块。Close the positioning module of the current device.

本实施例中提供的定位模块的控制装置,当接收到用户触发的定位请求时,判断模块510判断当前设备是否与目标设备建立位置共享连接,所述位置共享连接用于在所述当前设备和所述目标设备之间共享位置信息;如果当前设备与目标设备建立位置共享连接,则共享模块520将所述目标设备的定位模块获取的定位信息共享至所述当前设备;控制模块530降低所述当前设备的定位模块的工作频率。由于通过位置共享连接获取位置信息时,不需要启动定位模块,因此在通过位置共享连接获取位置信息时能够降低定位模块的工作频率,进而降低定位模块的耗电量。The control device of the positioning module provided in this embodiment, when receiving a positioning request triggered by the user, the judging module 510 judges whether the current device establishes a location sharing connection with the target device, and the location sharing connection is used to connect the current device and the target device. The location information is shared among the target devices; if the current device establishes a location sharing connection with the target device, the sharing module 520 shares the location information obtained by the positioning module of the target device with the current device; the control module 530 lowers the The working frequency of the positioning module of the current device. Since the location information is obtained through the location sharing connection, the positioning module does not need to be activated, so when the location information is obtained through the location sharing connection, the working frequency of the positioning module can be reduced, thereby reducing the power consumption of the positioning module.

上述装置可执行本申请前述所有实施例所提供的方法,具备执行上述方法相应的功能模块和有益效果。未在本实施例中详尽描述的技术细节,可参见本申请前述所有实施例所提供的方法。The above-mentioned device can execute the methods provided by all the foregoing embodiments of the present application, and has corresponding functional modules and beneficial effects for executing the above-mentioned methods. For technical details not exhaustively described in this embodiment, reference may be made to the methods provided in all the foregoing embodiments of the present application.

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

所述终端还包括:外设接口603、RF(RadioFrequency,射频)电路605、音频电路606、扬声器611、电源管理芯片608、输入/输出(I/O)子系统609、触摸屏612、其他输入/控制设备610以及外部端口604,这些部件通过一个或多个通信总线或信号线607来通信。The terminal also includes: peripheral interface 603, RF (Radio Frequency, radio frequency) circuit 605, audio circuit 606, speaker 611, power management chip 608, input/output (I/O) subsystem 609, touch screen 612, other input/output Control device 610 and external port 604 , these components communicate via one or more communication buses or signal lines 607 .

应该理解的是,图示终端设备600仅仅是终端的一个范例,并且终端设备600可以具有比图中所示出的更多的或者更少的部件,可以组合两个或更多的部件,或者可以具有不同的部件配置。图中所示出的各种部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。It should be understood that the illustrated terminal device 600 is only an example of a terminal, and that the terminal device 600 may have more or fewer components than shown in the figure, two or more components may be combined, or Different component configurations are possible. 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.

下面就本实施例提供的用于一种终端设备进行详细的描述,该终端设备以智能手机为例。The following describes a terminal device provided in this embodiment in detail, and the terminal device takes a smart phone as an example.

存储器601,所述存储器601可以被CPU602、外设接口603等访问,所述存储器601可以包括高速随机存取存储器,还可以包括非易失性存储器,例如一个或多个磁盘存储器件、闪存器件、或其他易失性固态存储器件。Memory 601, the memory 601 can be accessed by the CPU 602, the peripheral interface 603, etc., the memory 601 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.

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

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

其中,按照触摸屏的工作原理和传输信息的介质分类,触摸屏612可以为电阻式、电容感应式、红外线式或表面声波式。按照安装方式分类,触摸屏612可以为:外挂式、内置式或整体式。按照技术原理分类,触摸屏612可以为:矢量压力传感技术触摸屏、电阻技术触摸屏、电容技术触摸屏、红外线技术触摸屏或表面声波技术触摸屏。Wherein, according to the working principle of the touch screen and the classification of the medium for transmitting information, the touch screen 612 can be a resistive type, a capacitive sensing type, an infrared type or a surface acoustic wave type. Classified according to the installation method, the touch screen 612 can be: plug-in type, built-in type or integral type. Classified according to technical principles, the touch screen 612 may be: a touch screen with vector pressure sensing technology, a touch screen with resistive technology, a touch screen with capacitive technology, a touch screen with infrared technology or a touch screen with surface acoustic wave technology.

触摸屏612,所述触摸屏612是用户终端与用户之间的输入接口和输出接口,将可视输出显示给用户,可视输出可以包括图形、文本、图标、视频等。可选的,触摸屏612将用户在触屏幕上触发的电信号(如接触面的电信号),发送给处理器602。A touch screen 612, the touch screen 612 is an input interface and an output interface between the user terminal and the user, and displays visual output to the user. The visual output may include graphics, text, icons, videos, and the like. Optionally, the touch screen 612 sends an electrical signal triggered by the user on the touch screen (such as an electrical signal on the contact surface) to the processor 602 .

I/O子系统609中的显示控制器6091从触摸屏612接收电信号或者向触摸屏612发送电信号。触摸屏612检测触摸屏上的接触,显示控制器6091将检测到的接触转换为与显示在触摸屏612上的用户界面对象的交互,即实现人机交互,显示在触摸屏612上的用户界面对象可以是运行游戏的图标、联网到相应网络的图标等。值得说明的是,设备还可以包括光鼠,光鼠是不显示可视输出的触摸敏感表面,或者是由触摸屏形成的触摸敏感表面的延伸。The display controller 6091 in the I/O subsystem 609 receives electrical signals from the touch screen 612 or sends electrical signals to the touch screen 612 . The touch screen 612 detects the contact on the touch screen, and the display controller 6091 converts the detected contact into an interaction with the user interface object displayed on the touch screen 612, that is, realizes human-computer interaction, and the user interface object displayed on the touch screen 612 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 touchscreen.

RF电路605,主要用于建立智能音箱与无线网络(即网络侧)的通信,实现智能音箱与无线网络的数据接收和发送。例如收发短信息、电子邮件等。The RF circuit 605 is mainly used to establish communication between the smart speaker and the wireless network (that is, the network side), and realize data reception and transmission between the smart speaker and the wireless network. Such as sending and receiving short messages, e-mails, etc.

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

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

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

此外,处理器602还与定位模块连接,定位模块用于进行GPS定位。In addition, the processor 602 is also connected to a positioning module, which is used for GPS positioning.

在本实施例中,中央处理器602用于:In this embodiment, the central processing unit 602 is used for:

当接收到用户触发的定位请求时,判断当前设备是否与目标设备建立位置共享连接,所述位置共享连接用于在所述当前设备和所述目标设备之间共享位置信息;When receiving a positioning request triggered by the user, determine whether the current device establishes a location sharing connection with the target device, and the location sharing connection is used to share location information between the current device and the target device;

如果当前设备与目标设备建立位置共享连接,则将所述目标设备的定位模块获取的定位信息共享至所述当前设备;If the current device establishes a location sharing connection with the target device, share the positioning information acquired by the positioning module of the target device with the current device;

降低所述当前设备的定位模块的工作频率。Reduce the working frequency of the positioning module of the current device.

进一步的,所述判断所述当前设备是否与目标设备建立位置共享连接,包括:Further, the judging whether the current device establishes a location sharing connection with the target device includes:

判断所述当前设备是否与所述目标设备建立蓝牙连接;或者,judging whether the current device establishes a Bluetooth connection with the target device; or,

判断所述当前设备是否与所述目标设备建立近距离无线通讯连接。Judging whether the current device establishes a short-range wireless communication connection with the target device.

进一步的,所述如果当前设备与目标设备建立位置共享连接,则将所述目标设备的定位模块获取的定位信息共享至所述当前设备,包括:Further, if the current device establishes a location sharing connection with the target device, sharing the positioning information acquired by the positioning module of the target device with the current device includes:

如果当前设备与目标设备建立蓝牙连接,则获取所述当前设备与所述目标设备的距离;If the current device establishes a Bluetooth connection with the target device, then obtain the distance between the current device and the target device;

如果所述距离小于预设距离,则将所述目标设备的定位模块获取的定位信息共享至所述当前设备。If the distance is less than the preset distance, the positioning information acquired by the positioning module of the target device is shared with the current device.

进一步的,在将所述目标设备的定位模块获取的定位信息共享至所述当前设备之前,还包括:Further, before sharing the positioning information obtained by the positioning module of the target device to the current device, the method further includes:

判断所述目标设备的定位模块是否定位成功;Judging whether the positioning module of the target device is positioned successfully;

如果所述目标设备的定位模块定位成功,则将所述目标设备的定位模块获取的定位信息共享至所述当前设备。If the positioning module of the target device locates successfully, share the positioning information acquired by the positioning module of the target device with the current device.

进一步的,在判断当前设备是否与目标设备建立位置共享连接之后,还包括:Further, after judging whether the current device establishes a location sharing connection with the target device, it also includes:

如果当前设备与目标设备未建立位置共享连接,则通过预设无线通信协议检测是否发现可连接的目标设备;If the current device has not established a location sharing connection with the target device, then detect whether a connectable target device is found through the preset wireless communication protocol;

如果发现可连接的目标设备,则与所述可连接的目标设备建立位置共享连接。If a connectable target device is found, a location sharing connection is established with the connectable target device.

进一步的,还包括:Further, it also includes:

当当前设备与目标设备建立位置共享连接建立连接时,根据预设时间间隔获取所述目标设备的定位信息,并对所述定位信息进行缓存;When the current device establishes a location sharing connection with the target device, acquire the positioning information of the target device according to a preset time interval, and cache the positioning information;

当接收到用户触发的定位请求时,调用缓存的定位信息。When a location request triggered by a user is received, the cached location information is invoked.

进一步的,所述降低所述当前设备的定位模块的工作频率,包括:Further, the reducing the operating frequency of the positioning module of the current device includes:

降低所述当前设备的定位模块的信息获取频率;或者,reducing the information acquisition frequency of the positioning module of the current device; or,

关闭所述当前设备的定位模块。Close the positioning module of the current device.

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

当接收到用户触发的定位请求时,判断当前设备是否与目标设备建立位置共享连接,所述位置共享连接用于在所述当前设备和所述目标设备之间共享位置信息;When receiving a positioning request triggered by the user, determine whether the current device establishes a location sharing connection with the target device, and the location sharing connection is used to share location information between the current device and the target device;

如果当前设备与目标设备建立位置共享连接,则将所述目标设备的定位模块获取的定位信息共享至所述当前设备;If the current device establishes a location sharing connection with the target device, share the positioning information acquired by the positioning module of the target device with the current device;

降低所述当前设备的定位模块的工作频率。Reduce the working frequency of the positioning module of the current device.

进一步的,所述判断所述当前设备是否与目标设备建立位置共享连接,包括:Further, the judging whether the current device establishes a location sharing connection with the target device includes:

判断所述当前设备是否与所述目标设备建立蓝牙连接;或者,judging whether the current device establishes a Bluetooth connection with the target device; or,

判断所述当前设备是否与所述目标设备建立近距离无线通讯连接。Judging whether the current device establishes a short-range wireless communication connection with the target device.

进一步的,所述如果当前设备与目标设备建立位置共享连接,则将所述目标设备的定位模块获取的定位信息共享至所述当前设备,包括:Further, if the current device establishes a location sharing connection with the target device, sharing the positioning information acquired by the positioning module of the target device with the current device includes:

如果当前设备与目标设备建立蓝牙连接,则获取所述当前设备与所述目标设备的距离;If the current device establishes a Bluetooth connection with the target device, then obtain the distance between the current device and the target device;

如果所述距离小于预设距离,则将所述目标设备的定位模块获取的定位信息共享至所述当前设备。If the distance is less than the preset distance, the positioning information acquired by the positioning module of the target device is shared with the current device.

进一步的,在将所述目标设备的定位模块获取的定位信息共享至所述当前设备之前,还包括:Further, before sharing the positioning information obtained by the positioning module of the target device to the current device, the method further includes:

判断所述目标设备的定位模块是否定位成功;Judging whether the positioning module of the target device is positioned successfully;

如果所述目标设备的定位模块定位成功,则将所述目标设备的定位模块获取的定位信息共享至所述当前设备。If the positioning module of the target device locates successfully, share the positioning information acquired by the positioning module of the target device with the current device.

进一步的,在判断当前设备是否与目标设备建立位置共享连接之后,还包括:Further, after judging whether the current device establishes a location sharing connection with the target device, it also includes:

如果当前设备与目标设备未建立位置共享连接,则通过预设无线通信协议检测是否发现可连接的目标设备;If the current device has not established a location sharing connection with the target device, then detect whether a connectable target device is found through the preset wireless communication protocol;

如果发现可连接的目标设备,则与所述可连接的目标设备建立位置共享连接。If a connectable target device is found, a location sharing connection is established with the connectable target device.

进一步的,还包括:Further, it also includes:

当当前设备与目标设备建立位置共享连接建立连接时,根据预设时间间隔获取所述目标设备的定位信息,并对所述定位信息进行缓存;When the current device establishes a location sharing connection with the target device, acquire the positioning information of the target device according to a preset time interval, and cache the positioning information;

当接收到用户触发的定位请求时,调用缓存的定位信息。When a location request triggered by a user is received, the cached location information is invoked.

进一步的,所述降低所述当前设备的定位模块的工作频率,包括:Further, the reducing the operating frequency of the positioning module of the current device includes:

降低所述当前设备的定位模块的信息获取频率;或者,reducing the information acquisition frequency of the positioning module of the current device; or,

关闭所述当前设备的定位模块。Close the positioning module of the current device.

本申请实施例的计算机存储介质,可以采用一个或多个计算机可读的介质的任意组合。计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本文件中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。The computer storage medium in the embodiments of the present application may use any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (non-exhaustive list) of computer readable storage media include: electrical connections with one or more leads, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), Erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。A computer readable signal medium may include a data signal carrying computer readable program code in baseband or as part of a carrier wave. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. .

计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括——但不限于无线、电线、光缆、RF等等,或者上述的任意合适的组合。Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including - but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

可以以一种或多种程序设计语言或其组合来编写用于执行本申请操作的计算机程序代码,程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如”C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。Computer program code for performing the operations of the present application may be written in one or more programming languages or combinations thereof, including object-oriented programming languages—such as Java, Smalltalk, C++, and conventional procedural Programming language - such as "C" or a similar programming language. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In cases involving a remote computer, the remote computer can be connected to the user computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (such as through an Internet service provider). Internet connection).

当然,本申请实施例所提供的一种包含计算机可执行指令的存储介质,其计算机可执行指令不限于如上所述的应用推荐操作,还可以执行本申请任意实施例所提供的应用推荐方法中的相关操作。Of course, the storage medium containing computer-executable instructions provided in the embodiments of the present application, the computer-executable instructions are not limited to the above-mentioned application recommendation operations, and can also execute the application recommendation method provided in any embodiment of the application. related operations.

注意,上述仅为本申请的较佳实施例及所运用技术原理。本领域技术人员会理解,本申请不限于这里所述的特定实施例,对本领域技术人员来说能够进行各种明显的变化、重新调整和替代而不会脱离本申请的保护范围。因此,虽然通过以上实施例对本申请进行了较为详细的说明,但是本申请不仅仅限于以上实施例,在不脱离本申请构思的情况下,还可以包括更多其他等效实施例,而本申请的范围由所附的权利要求范围决定。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 for a positioning module, comprising: 当接收到用户触发的定位请求时,判断当前设备是否与目标设备建立位置共享连接,所述位置共享连接用于在所述当前设备和所述目标设备之间共享位置信息;When receiving a positioning request triggered by the user, determine whether the current device establishes a location sharing connection with the target device, and the location sharing connection is used to share location information between the current device and the target device; 如果当前设备与目标设备建立位置共享连接,则将所述目标设备的定位模块获取的定位信息共享至所述当前设备;If the current device establishes a location sharing connection with the target device, share the positioning information acquired by the positioning module of the target device with the current device; 降低所述当前设备的定位模块的工作频率。Reduce the working frequency of the positioning module of the current device. 2.根据权利要求1所述的定位模块的控制方法,其特征在于,所述判断所述当前设备是否与目标设备建立位置共享连接,包括:2. The control method of the positioning module according to claim 1, wherein the judging whether the current device establishes a location sharing connection with the target device comprises: 判断所述当前设备是否与所述目标设备建立蓝牙连接;或者,judging whether the current device establishes a Bluetooth connection with the target device; or, 判断所述当前设备是否与所述目标设备建立近距离无线通讯连接。Judging whether the current device establishes a short-range wireless communication connection with the target device. 3.根据权利要求2所述的定位模块的控制方法,其特征在于,所述如果当前设备与目标设备建立位置共享连接,则将所述目标设备的定位模块获取的定位信息共享至所述当前设备,包括:3. The control method of the positioning module according to claim 2, wherein if the current device establishes a location sharing connection with the target device, the positioning information obtained by the positioning module of the target device is shared with the current device. equipment, including: 如果当前设备与目标设备建立蓝牙连接,则获取所述当前设备与所述目标设备的距离;If the current device establishes a Bluetooth connection with the target device, then obtain the distance between the current device and the target device; 如果所述距离小于预设距离,则将所述目标设备的定位模块获取的定位信息共享至所述当前设备。If the distance is less than the preset distance, the positioning information acquired by the positioning module of the target device is shared with the current device. 4.根据权利要求1所述的定位模块的控制方法,其特征在于,在将所述目标设备的定位模块获取的定位信息共享至所述当前设备之前,还包括:4. The control method of the positioning module according to claim 1, further comprising: before sharing the positioning information acquired by the positioning module of the target device to the current device: 判断所述目标设备的定位模块是否定位成功;Judging whether the positioning module of the target device is positioned successfully; 如果所述目标设备的定位模块定位成功,则将所述目标设备的定位模块获取的定位信息共享至所述当前设备。If the positioning module of the target device locates successfully, share the positioning information acquired by the positioning module of the target device with the current device. 5.根据权利要求1所述的定位模块的控制方法,其特征在于,在判断当前设备是否与目标设备建立位置共享连接之后,还包括:5. The control method of the positioning module according to claim 1, further comprising: after judging whether the current device establishes a location sharing connection with the target device: 如果当前设备与目标设备未建立位置共享连接,则通过预设无线通信协议检测是否发现可连接的目标设备;If the current device has not established a location sharing connection with the target device, then detect whether a connectable target device is found through the preset wireless communication protocol; 如果发现可连接的目标设备,则与所述可连接的目标设备建立位置共享连接。If a connectable target device is found, a location sharing connection is established with the connectable target device. 6.根据权利要求1所述的定位模块的控制方法,其特征在于,还包括:6. The control method of the positioning module according to claim 1, further comprising: 当当前设备与目标设备建立位置共享连接建立连接时,根据预设时间间隔获取所述目标设备的定位信息,并对所述定位信息进行缓存;When the current device establishes a location sharing connection with the target device, acquire the positioning information of the target device according to a preset time interval, and cache the positioning information; 当接收到用户触发的定位请求时,调用缓存的定位信息。When a location request triggered by a user is received, the cached location information is invoked. 7.根据权利要求1所述的定位模块的控制方法,其特征在于,所述降低所述当前设备的定位模块的工作频率,包括:7. The control method of the positioning module according to claim 1, wherein the reducing the operating frequency of the positioning module of the current device comprises: 降低所述当前设备的定位模块的信息获取频率;或者,reducing the information acquisition frequency of the positioning module of the current device; or, 关闭所述当前设备的定位模块。Close the positioning module of the current device. 8.一种定位模块的控制装置,其特征在于,包括:8. A control device for a positioning module, comprising: 判断模块,用于当接收到用户触发的定位请求时,判断当前设备是否与目标设备建立位置共享连接,所述位置共享连接用于在所述当前设备和所述目标设备之间共享位置信息;A judging module, configured to judge whether the current device establishes a location sharing connection with the target device when receiving a positioning request triggered by the user, and the location sharing connection is used to share location information between the current device and the target device; 共享模块,用于如果当前设备与目标设备建立位置共享连接,则将所述目标设备的定位模块获取的定位信息共享至所述当前设备;A sharing module, configured to share the positioning information obtained by the positioning module of the target device with the current device if the current device establishes a location sharing connection with the target device; 控制模块,用于降低所述当前设备的定位模块的工作频率。The control module is used to reduce the working frequency of the positioning module of the current device. 9.一种终端,其特征在于,所述终端包括:9. A terminal, characterized in that the terminal comprises: 一个或多个处理器;one or more processors; 存储装置,用于存储一个或多个程序,storage means for storing one or more programs, 当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-7中任一所述的定位模块的控制方法。When the one or more programs are executed by the one or more processors, the one or more processors are made to implement the positioning module control method according to any one of claims 1-7. 10.一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现如权利要求1-7中任一所述的定位模块的控制方法。10. A computer-readable storage medium, on which a computer program is stored, wherein when the program is executed by a processor, the method for controlling the positioning module according to any one of claims 1-7 is realized.
CN201711360372.5A 2017-12-13 2017-12-13 Control method and device of positioning module, storage medium and terminal Pending CN108111974A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711360372.5A CN108111974A (en) 2017-12-13 2017-12-13 Control method and device of positioning module, storage medium and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711360372.5A CN108111974A (en) 2017-12-13 2017-12-13 Control method and device of positioning module, storage medium and terminal

Publications (1)

Publication Number Publication Date
CN108111974A true CN108111974A (en) 2018-06-01

Family

ID=62216429

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711360372.5A Pending CN108111974A (en) 2017-12-13 2017-12-13 Control method and device of positioning module, storage medium and terminal

Country Status (1)

Country Link
CN (1) CN108111974A (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108924750A (en) * 2018-08-02 2018-11-30 赵佳丽 A kind of mobile terminal energy conservation positioning system based on Internet of Things
CN108966134A (en) * 2018-07-26 2018-12-07 马书翠 A kind of mobile terminal location control method based on Internet of Things
CN109040953A (en) * 2018-07-26 2018-12-18 马书翠 A kind of mobile terminal location control system based on Internet of Things
CN109032336A (en) * 2018-06-27 2018-12-18 努比亚技术有限公司 A kind of control method, terminal and storage medium
CN109032344A (en) * 2018-07-04 2018-12-18 Oppo(重庆)智能科技有限公司 Location processing method and Related product
CN109040956A (en) * 2018-08-02 2018-12-18 赵佳丽 A kind of mobile terminal energy conservation localization method based on Internet of Things
CN109068271A (en) * 2018-08-21 2018-12-21 珠海格力电器股份有限公司 Control method, device and equipment of controller and storage medium
CN109618278A (en) * 2018-12-04 2019-04-12 维沃移动通信有限公司 A positioning method and mobile terminal
CN110545238A (en) * 2019-08-22 2019-12-06 神经元信息技术(深圳)有限公司 Gateway equipment and communication system
CN112104708A (en) * 2020-08-27 2020-12-18 深圳市元征科技股份有限公司 Communication method and device of diagnostic equipment, electronic equipment and storage medium
CN119497042A (en) * 2025-01-20 2025-02-21 深圳市卓信特通讯科技有限公司 A mobile terminal auxiliary positioning method, device and system
WO2025066372A1 (en) * 2023-09-26 2025-04-03 比亚迪股份有限公司 Terminal positioning method, terminal, and vehicle

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201223178A (en) * 2010-11-25 2012-06-01 Inst Information Industry Mobile apparatus
CN104768127A (en) * 2014-01-07 2015-07-08 中兴通讯股份有限公司 Positioning method, device and server
CN105306511A (en) * 2014-07-24 2016-02-03 陈庆利 Location sharing method based on point-to-point communication and navigation device
CN106358151A (en) * 2016-10-17 2017-01-25 青岛海信移动通信技术股份有限公司 Positioning method and positioning system
WO2017191490A1 (en) * 2016-05-03 2017-11-09 Telefonaktiebolaget Lm Ericsson (Publ) Methods and network nodes for providing ue location for vowifi calls
CN107453976A (en) * 2016-05-31 2017-12-08 宇龙计算机通信科技(深圳)有限公司 A kind of sharing method of positional information, device and terminal

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201223178A (en) * 2010-11-25 2012-06-01 Inst Information Industry Mobile apparatus
CN104768127A (en) * 2014-01-07 2015-07-08 中兴通讯股份有限公司 Positioning method, device and server
CN105306511A (en) * 2014-07-24 2016-02-03 陈庆利 Location sharing method based on point-to-point communication and navigation device
WO2017191490A1 (en) * 2016-05-03 2017-11-09 Telefonaktiebolaget Lm Ericsson (Publ) Methods and network nodes for providing ue location for vowifi calls
CN107453976A (en) * 2016-05-31 2017-12-08 宇龙计算机通信科技(深圳)有限公司 A kind of sharing method of positional information, device and terminal
CN106358151A (en) * 2016-10-17 2017-01-25 青岛海信移动通信技术股份有限公司 Positioning method and positioning system

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109032336A (en) * 2018-06-27 2018-12-18 努比亚技术有限公司 A kind of control method, terminal and storage medium
CN109032344A (en) * 2018-07-04 2018-12-18 Oppo(重庆)智能科技有限公司 Location processing method and Related product
CN108966134A (en) * 2018-07-26 2018-12-07 马书翠 A kind of mobile terminal location control method based on Internet of Things
CN109040953A (en) * 2018-07-26 2018-12-18 马书翠 A kind of mobile terminal location control system based on Internet of Things
CN108966134B (en) * 2018-07-26 2020-11-27 宁波海特技术转移有限公司 Mobile terminal positioning control method based on Internet of things
CN109040953B (en) * 2018-07-26 2020-11-27 南京博晟宇网络科技有限公司 Mobile terminal positioning control system based on Internet of things
CN108924750B (en) * 2018-08-02 2021-05-18 宁夏时迈科技集团有限公司 Mobile terminal energy-saving positioning system based on Internet of things
CN109040956A (en) * 2018-08-02 2018-12-18 赵佳丽 A kind of mobile terminal energy conservation localization method based on Internet of Things
CN108924750A (en) * 2018-08-02 2018-11-30 赵佳丽 A kind of mobile terminal energy conservation positioning system based on Internet of Things
CN109068271A (en) * 2018-08-21 2018-12-21 珠海格力电器股份有限公司 Control method, device and equipment of controller and storage medium
WO2020037903A1 (en) * 2018-08-21 2020-02-27 珠海格力电器股份有限公司 Method and apparatus for controlling controller, and device and storage medium
CN109618278A (en) * 2018-12-04 2019-04-12 维沃移动通信有限公司 A positioning method and mobile terminal
CN110545238A (en) * 2019-08-22 2019-12-06 神经元信息技术(深圳)有限公司 Gateway equipment and communication system
CN112104708A (en) * 2020-08-27 2020-12-18 深圳市元征科技股份有限公司 Communication method and device of diagnostic equipment, electronic equipment and storage medium
CN112104708B (en) * 2020-08-27 2023-08-08 深圳市元征科技股份有限公司 Communication method and device of diagnostic equipment, electronic equipment and storage medium
WO2025066372A1 (en) * 2023-09-26 2025-04-03 比亚迪股份有限公司 Terminal positioning method, terminal, and vehicle
CN119497042A (en) * 2025-01-20 2025-02-21 深圳市卓信特通讯科技有限公司 A mobile terminal auxiliary positioning method, device and system
CN119497042B (en) * 2025-01-20 2025-04-01 深圳市卓信特通讯科技有限公司 A mobile terminal auxiliary positioning method, device and system

Similar Documents

Publication Publication Date Title
CN108111974A (en) Control method and device of positioning module, storage medium and terminal
WO2019000287A1 (en) Icon display method and device
CN108055635B (en) Position information acquisition method and device, storage medium and terminal
CN108681474B (en) Application preloading method and device, storage medium and terminal
CN106851583A (en) Method and device for acquiring location information of mobile terminal and mobile terminal
CN106341809B (en) Data transmission method and equipment
US20130290495A1 (en) Method of setting optimal ping interval and electronic device therefor
CN108710515A (en) Application preloading method, device, storage medium and terminal
CN108024128A (en) Control method and device for Bluetooth music playing, terminal equipment and storage medium
CN109495573A (en) Data transmission method, device, storage medium and terminal
WO2018006841A1 (en) Qr code information transmission method, device and apparatus
CN108494970A (en) Processing method, device, storage medium and the terminal of terminal's status information
CN108072885A (en) Collocation method, device, storage medium and the terminal of locating module
WO2019218282A1 (en) Data transmission method and terminal
CN108712555B (en) A method and device for sending alarm information
CN108093362B (en) Control method and device of positioning module, storage medium and terminal
CN107809742A (en) Positioning information processing method, device, storage medium and terminal
CN105162930B (en) The way of recording and device of mobile terminal
CN108112061B (en) Positioning control method, device, storage medium and terminal device
CN108093373B (en) Positioning control method, device, storage medium and terminal device
CN107508996B (en) Safety positioning device, method, terminal device and storage medium
WO2015062234A1 (en) Mobile terminal resource processing method, device and apparatus
CN108432161A (en) Interference control method and terminal for audio service
CN106095423B (en) Method, terminal and server for providing browsing service
CN108731666A (en) Processing method, device, storage medium and the terminal of Geomagnetism Information

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20180601

RJ01 Rejection of invention patent application after publication