[go: up one dir, main page]

CN108882084B - Wearable equipment electric quantity balancing method and related product - Google Patents

Wearable equipment electric quantity balancing method and related product Download PDF

Info

Publication number
CN108882084B
CN108882084B CN201810549822.3A CN201810549822A CN108882084B CN 108882084 B CN108882084 B CN 108882084B CN 201810549822 A CN201810549822 A CN 201810549822A CN 108882084 B CN108882084 B CN 108882084B
Authority
CN
China
Prior art keywords
earplug
power
slave
master
earplugs
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.)
Expired - Fee Related
Application number
CN201810549822.3A
Other languages
Chinese (zh)
Other versions
CN108882084A (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 CN201810549822.3A priority Critical patent/CN108882084B/en
Publication of CN108882084A publication Critical patent/CN108882084A/en
Application granted granted Critical
Publication of CN108882084B publication Critical patent/CN108882084B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/10Earpieces; Attachments therefor ; Earphones; Monophonic headphones
    • H04R1/1041Mechanical or electronic switches, or control elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72409User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories
    • H04M1/72412User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories using two-way short-range wireless interfaces
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R2201/00Details of transducers, loudspeakers or microphones covered by H04R1/00 but not provided for in any of its subgroups
    • H04R2201/10Details of earpieces, attachments therefor, earphones or monophonic headphones covered by H04R1/10 but not provided for in any of its subgroups
    • 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)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Physics & Mathematics (AREA)
  • Acoustics & Sound (AREA)
  • Telephone Function (AREA)

Abstract

本申请实施例公开了一种可穿戴设备电量均衡方法及相关产品,所述方法应用在电子设备,所述方法包括如下步骤:接收第一耳塞的第一配对请求,接收第二耳塞的第二配对请求;据所述第一配对请求与所述第一耳塞配对连接,依据所述第二配对请求对所述第二耳塞配对连接;接收所述第一耳塞发送的第一电量,接收所述第二耳塞发送的第二电量;计算所述第一电量与所述第二电量的差值,依据所述差值从所述第一耳塞和所述第二耳塞中选择主耳塞和从耳塞,控制所述无线收发器保持与所述主耳塞连接,释放与所述从耳塞的连接。本申请提供的技术方案具有用户体验度高的优点。

Figure 201810549822

The embodiment of the present application discloses a wearable device power balancing method and related products, the method is applied to an electronic device, and the method includes the following steps: receiving a first pairing request of a first earplug, receiving a second pairing request of a second earplug pairing request; pairing and connecting with the first earplug according to the first pairing request, pairing and connecting the second earplug according to the second pairing request; receiving the first power sent by the first earplug, receiving the The second electric quantity sent by the second earplug; calculating the difference between the first electric quantity and the second electric quantity, and selecting a master earplug and a slave earplug from the first earplug and the second earplug according to the difference, The wireless transceiver is controlled to remain connected to the master earbud and to release the connection to the slave earbud. The technical solution provided by the present application has the advantage of high user experience.

Figure 201810549822

Description

一种可穿戴设备电量均衡方法及相关产品A kind of wearable device power balance method and related products

技术领域technical field

本申请涉及移动终端配件技术领域,具体涉及一种可穿戴设备电量均衡方法及相关产品。The present application relates to the technical field of mobile terminal accessories, and in particular, to a power balancing method for a wearable device and related products.

背景技术Background technique

随着智能手机的普及和应用,用户越来越多的依赖智能手机,可穿戴式设备,例如,无线耳机、智能手表、智能手环等等设备也随着智能手机的兴起得到了广泛的应用。对于可穿戴式设备,这里以无线耳机为例,无线耳机具有与智能手机连接便利的优点,对于无线耳机,由于其无线的限制,其一定具有电池,无线蓝牙耳机个体比较小,内置电池容量也比较小,现有的无线耳机在使用时由于使用频率不同,可能导致每个耳机的电量不同,但是现有的无线耳机对电量不同并未做均衡处理,这样导致不同耳机电量的差异可能较大,影响用户使用,进而影响了用户的体验度。With the popularization and application of smart phones, more and more users rely on smart phones, and wearable devices, such as wireless earphones, smart watches, smart bracelets, etc., have also been widely used with the rise of smart phones. . For wearable devices, take wireless earphones as an example. Wireless earphones have the advantage of being convenient to connect with smartphones. For wireless earphones, due to their wireless limitations, they must have batteries. Wireless Bluetooth earphones are relatively small, and the built-in battery capacity is also It is relatively small. The existing wireless earphones may have different power levels due to different frequencies of use. However, the existing wireless earphones do not equalize the different power levels, which may lead to large differences in the power levels of different earphones. , which affects the user's use, which in turn affects the user's experience.

发明内容SUMMARY OF THE INVENTION

本申请实施例提供了一种可穿戴设备电量均衡方法及可穿戴式设备,以期提高可穿戴式设备的电量进行均衡处理,提高用户体验度。Embodiments of the present application provide a wearable device power balancing method and a wearable device, so as to improve the power balance processing of the wearable device and improve user experience.

第一方面,本申请实施例提供一种电子设备,所述电子设备包括:处理器和无线收发器,In a first aspect, an embodiment of the present application provides an electronic device, the electronic device includes: a processor and a wireless transceiver,

无线收发器,用于接收第一耳塞的第一配对请求,接收第二耳塞的第二配对请求;a wireless transceiver, configured to receive a first pairing request from the first earplug and a second pairing request from the second earplug;

处理器,用于依据所述第一配对请求与所述第一耳塞配对连接,依据所述第二配对请求对所述第二耳塞配对连接;a processor, configured to pair and connect with the first earplug according to the first pairing request, and pair and connect the second earplug according to the second pairing request;

无线收发器,还用于接收所述第一耳塞发送的第一电量,接收所述第二耳塞发送的第二电量;a wireless transceiver, further configured to receive the first power amount sent by the first earplug, and receive the second power amount sent by the second earplug;

处理器,还用于计算所述第一电量与所述第二电量的差值,依据所述差值从所述第一耳塞和所述第二耳塞中选择主耳塞和从耳塞,控制所述无线收发器保持与所述主耳塞连接,释放与所述从耳塞的连接。The processor is further configured to calculate the difference between the first power and the second power, select a master earplug and a slave earplug from the first earplug and the second earplug according to the difference, and control the The wireless transceiver remains connected to the master earbud and releases the connection to the slave earbud.

第二方面,提供一种可穿戴式设备,所述可穿戴式设备包括:分离的主耳塞和从耳塞;其中,In a second aspect, a wearable device is provided, the wearable device comprising: a separate master earplug and a slave earplug; wherein,

所述从耳塞,用于周期性的向主耳机发送第一电量;The slave earplug is used to periodically send the first power to the master earphone;

所述主耳塞,用于计算所述第一电量与第二电量之间的差值,如所述差值大于设定阈值,向电子设备发送切换从耳塞请求,所述切换从耳塞请求用于将主耳塞切换成从耳塞,将从耳塞切换成主耳塞。The master earplug is used to calculate the difference between the first power and the second power, and if the difference is greater than a set threshold, send a request for switching the slave earplug to the electronic device, and the switching slave earplug request is used for Switch the master earbud to the slave earbud, and switch the slave earbud to the master earbud.

第三方面,提供一种可穿戴设备电量均衡方法,所述方法应用在电子设备,所述方法包括如下步骤:In a third aspect, a method for power balancing of a wearable device is provided, the method is applied to an electronic device, and the method includes the following steps:

接收第一耳塞的第一配对请求,接收第二耳塞的第二配对请求;Receive the first pairing request of the first earplug, and receive the second pairing request of the second earplug;

据所述第一配对请求与所述第一耳塞配对连接,依据所述第二配对请求对所述第二耳塞配对连接;The first pairing request is paired with the first earplug, and the second earplug is paired and connected according to the second pairing request;

接收所述第一耳塞发送的第一电量,接收所述第二耳塞发送的第二电量;receiving the first power amount sent by the first earplug, and receiving the second power amount sent by the second earplug;

计算所述第一电量与所述第二电量的差值,依据所述差值从所述第一耳塞和所述第二耳塞中选择主耳塞和从耳塞,控制所述无线收发器保持与所述主耳塞连接,释放与所述从耳塞的连接。Calculate the difference between the first power and the second power, select a master earplug and a slave earplug from the first earplug and the second earplug according to the difference, and control the wireless transceiver to maintain and The master earbud is connected, and the connection with the slave earbud is released.

第四方面,提供一种切换方法,所述方法应用于可穿戴式设备,所述可穿戴式设备包括:分离的主耳塞和从耳塞,所述方法包括如下步骤:In a fourth aspect, a switching method is provided, the method is applied to a wearable device, the wearable device includes: a separate master earplug and a slave earplug, the method includes the following steps:

可穿戴式设备的从耳塞周期性的向主耳机发送第一电量;The slave earplug of the wearable device periodically sends the first power to the master earphone;

可穿戴式设备的主耳塞计算所述第一电量与第二电量之间的差值,如所述差值大于设定阈值,向电子设备发送切换从耳塞请求,所述切换从耳塞请求用于将主耳塞切换成从耳塞,将从耳塞切换成主耳塞。The main earplug of the wearable device calculates the difference between the first power and the second power, and if the difference is greater than the set threshold, sends a request to switch the slave earplug to the electronic device, and the switch slave earplug request is used for Switch the master earbud to the slave earbud, and switch the slave earbud to the master earbud.

第五方面,提供一种计算机可读存储介质,其存储用于电子数据交换的计算机程序,其中,所述计算机程序使得计算机执行第三方面或第四方面提供的方法。In a fifth aspect, a computer-readable storage medium is provided, which stores a computer program for electronic data exchange, wherein the computer program causes a computer to perform the method provided by the third aspect or the fourth aspect.

第六方面,提供一种计算机程序产品,所述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,所述计算机程序可操作来使计算机执行第三方面或第四方面提供的方法In a sixth aspect, a computer program product is provided, the computer program product comprising a non-transitory computer-readable storage medium storing a computer program, the computer program being operable to cause a computer to execute the third aspect or the fourth aspect. method

可以看出,本申请提供的电子设备分别与第一耳塞和第二耳塞配对连接,然后接收二个耳塞分别上报的两个电量,计算两个电量的差值,依据该差值确定二个耳塞中的主耳塞和从耳塞,断开从耳塞的连接,这样能够减少从耳塞之间的连接,减少了从耳塞的耗电,实现了将电量较高的耳机确定为主耳塞,实现了主耳塞与从耳塞之间的电量调整,提高了两个耳塞的电量的均衡,提高了用户体验度。It can be seen that the electronic device provided by this application is paired and connected to the first earplug and the second earplug respectively, and then receives the two electric quantities reported by the two earplugs respectively, calculates the difference between the two electric quantities, and determines the two earplugs according to the difference. The master earplug and the slave earplug in the middle earplug, disconnect the connection of the slave earplug, which can reduce the connection between the slave earplugs, reduce the power consumption of the slave earplugs, realize the determination of the earphone with higher power as the master earplug, and realize the master earplug. The power adjustment between the slave earbuds improves the balance of the power of the two earbuds and improves the user experience.

附图说明Description of drawings

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

图1是一种可穿戴式设备与无线通信设备的网络构架示意图。FIG. 1 is a schematic diagram of a network architecture of a wearable device and a wireless communication device.

图1a是本申请提供的一种无线耳机的结构示意图。FIG. 1a is a schematic structural diagram of a wireless headset provided by the present application.

图1b是本申请提供的一种无线耳机的另一种结构示意图。FIG. 1b is another schematic structural diagram of a wireless earphone provided by the present application.

图2是本申请提供的一种电子设备的结构示意图。FIG. 2 is a schematic structural diagram of an electronic device provided by the present application.

图3是本申请的可穿戴式设备的结构示意图。FIG. 3 is a schematic structural diagram of the wearable device of the present application.

图4为本申请的可穿戴设备电量均衡方法的流程示意图。FIG. 4 is a schematic flowchart of a method for power balancing of a wearable device according to the present application.

图5为本申请的一种切换方法的流程示意图。FIG. 5 is a schematic flowchart of a switching method according to the present application.

图6为本申请的一种手机的结构示意图。FIG. 6 is a schematic structural diagram of a mobile phone according to the present application.

具体实施方式Detailed ways

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有付出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the protection scope of the present application.

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

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

在第一方面提供的电子设备,所述处理器,具体用于如所述差值大于第一电压阈值,确定所述第一耳塞为主耳塞,所述第二耳塞为从耳塞,如所述差值小于第二电压阈值,确定所述第一耳塞为从耳塞,所述第二耳塞为从耳塞,其中,所述第一电压阈值为正电压值,所述第二电压阈值为负电压值。In the electronic device provided in the first aspect, the processor is specifically configured to, if the difference is greater than a first voltage threshold, determine that the first earplug is a master earplug and the second earplug is a slave earplug, as described The difference is smaller than a second voltage threshold, and it is determined that the first earplug is a slave earplug and the second earplug is a slave earplug, wherein the first voltage threshold is a positive voltage value, and the second voltage threshold is a negative voltage value .

在第一方面提供的电子设备,所述处理器,具体用于获取运行应用程序的类型和运行时间,依据所述类型确定需运行的耳塞数量,依据所述耳塞数量以及运行时间计算所述主耳塞的第一剩余电量和所述从耳塞的第二剩余电量,依据所述第一剩余电量和所述第二剩余电量确定是否需要执行主耳塞与从耳塞之间的互换。In the electronic device provided in the first aspect, the processor is specifically configured to obtain the type and running time of the running application, determine the number of earplugs to be run according to the type, and calculate the main The first remaining power of the earplug and the second remaining power of the slave earplug are used to determine whether the exchange between the master earplug and the slave earplug needs to be performed according to the first remaining power and the second remaining power.

在第一方面提供的电子设备,如确定所述耳塞数量为2个;For the electronic device provided in the first aspect, if it is determined that the number of earplugs is 2;

所述处理器,具体用于计算第一剩余电量和第二剩余电量,具体包括:The processor is specifically used to calculate the first remaining power and the second remaining power, and specifically includes:

第一剩余电量=第一电量—Kt*(X1+X2)*t/Q;The first remaining power = the first power - K t *(X1+X2)*t/Q;

第二剩余电量=第二电量—Kt*X1*t/Q;The second remaining power = the second power - K t *X1*t/Q;

其中,Q为耳塞的总电量,Kt为温度调整系数,X1为播放所需功率,X2为无线发射功率,t为运行时间。Among them, Q is the total power of the earplugs, K t is the temperature adjustment coefficient, X1 is the power required for playback, X2 is the wireless transmission power, and t is the running time.

在第三方面提供的方法,所述依据所述差值从所述第一耳塞和所述第二耳塞中选择主耳塞和从耳塞具体包括:In the method provided in the third aspect, the selecting a master earplug and a slave earplug from the first earplug and the second earplug according to the difference value specifically includes:

如所述差值大于第一电压阈值,确定所述第一耳塞为主耳塞,所述第二耳塞为从耳塞,如所述差值小于第二电压阈值,确定所述第一耳塞为从耳塞,所述第二耳塞为从耳塞,其中,所述第一电压阈值为正电压值,所述第二电压阈值为负电压值。If the difference is greater than the first voltage threshold, it is determined that the first earplug is the master earplug and the second earplug is the slave earplug, and if the difference is less than the second voltage threshold, the first earplug is determined to be the slave earplug , the second earplug is a slave earplug, wherein the first voltage threshold is a positive voltage value, and the second voltage threshold is a negative voltage value.

在第三方面提供的方法,所述方法还包括:The method provided in the third aspect, the method further comprises:

获取运行应用程序的类型和运行时间,依据所述类型确定需运行的耳塞数量,依据所述耳塞数量以及运行时间计算所述主耳塞的第一剩余电量和所述从耳塞的第二剩余电量,依据所述第一剩余电量和所述第二剩余电量确定是否需要执行主耳塞与从耳塞之间的互换。Obtain the type and running time of the running application, determine the number of earplugs to be run according to the type, and calculate the first remaining power of the master earplug and the second remaining power of the slave earplug according to the number of earplugs and the running time, Whether it is necessary to perform the exchange between the master earplug and the slave earplug is determined according to the first remaining power and the second remaining power.

在第三方面提供的方法,如确定所述耳塞数量为2个;所述依据所述耳塞数量以及运行时间计算所述主耳塞的第一剩余电量和所述从耳塞的第二剩余电量具体包括:In the method provided in the third aspect, for example, determining that the number of earplugs is 2; the calculating the first remaining power of the master earplug and the second remaining power of the slave earplug according to the number of the earplugs and the running time specifically includes: :

第一剩余电量=第一电量—Kt*(X1+X2)*t/Q;The first remaining power = the first power - K t *(X1+X2)*t/Q;

第二剩余电量=第二电量—Kt*X1*t/Q;The second remaining power = the second power - K t *X1*t/Q;

其中,Q为耳塞的总电量,Kt为温度调整系数,X1为播放所需功率,X2为无线发射功率,t为运行时间。Among them, Q is the total power of the earplugs, K t is the temperature adjustment coefficient, X1 is the power required for playback, X2 is the wireless transmission power, and t is the running time.

本申请实施例所涉及到的无线通信设备可以包括各种具有无线通信功能的手持设备、车载设备、可穿戴设备、计算设备或连接到无线调制解调器的其他处理设备,以及各种形式的用户设备(User Equipment,UE),移动台(Mobile Station,MS),终端设备(terminal device)等等。当然在其他应用中,上述无线通信设备还可以为网络侧设备,例如基站、接入点等网络侧设备。为方便描述,上面提到的设备统称为无线通信设备。The wireless communication devices involved in the embodiments of the present application may include various handheld devices with wireless communication functions, vehicle-mounted devices, wearable devices, computing devices, or other processing devices connected to wireless modems, as well as various forms of user equipment ( User Equipment (UE), mobile station (Mobile Station, MS), terminal device (terminal device) and so on. Of course, in other applications, the above-mentioned wireless communication device may also be a network-side device, such as a base station, an access point and other network-side devices. For convenience of description, the devices mentioned above are collectively referred to as wireless communication devices.

请参阅图1,图1是本申请实施例公开的一种网络构架示意图,该网络架构可以包括电子设备和无线耳机,其中,无线耳机可以通过无线网络(例如,蓝牙、红外线或WiFi)与电子设备通信连接。需要说明的是,无线耳机可包含一个或者多个耳塞,本申请实施例不作限定。具体实施中,无线耳机可向电子设备法发送配对请求,电子设备可接收由可穿戴设备发送的配对请求,可穿戴设备包括至少一个独立部件,响应配对请求,检测可穿戴设备包含的部件数量,依据部件数量显示可穿戴设备的信息,例如电量、配对数量等等。Please refer to FIG. 1. FIG. 1 is a schematic diagram of a network architecture disclosed in an embodiment of the present application. The network architecture may include an electronic device and a wireless headset, wherein the wireless headset can communicate with electronic devices through a wireless network (eg, Bluetooth, infrared, or WiFi). Device communication connection. It should be noted that the wireless earphone may include one or more earplugs, which is not limited in the embodiment of the present application. In a specific implementation, the wireless headset can send a pairing request to the electronic device, and the electronic device can receive the pairing request sent by the wearable device. The wearable device includes at least one independent component. In response to the pairing request, the number of components included in the wearable device is detected, Display wearable device information based on the number of parts, such as battery level, number of pairs, etc.

如图1a所示,图1a是本申请实施例提供的一种无线耳机的结构图,如图1a所示的,两个耳塞可以完全分离设置。如图1a所示,该无线耳机包括:二个耳塞,每个耳塞包括:耳塞外壳121、设置在耳塞外壳121表面的扬声器,该耳塞还可以包括:无线收发器122、处理芯片(图中未画出)和电池(图中未画出),该处理芯片与触控板、无线收发器以及扬声器之间电连接,具体的,该电连接的方式可以通过总线方式来连接,当然在实际应用中,上述电连接也可以是通过其他连接方式来连接。As shown in FIG. 1a, FIG. 1a is a structural diagram of a wireless earphone provided by an embodiment of the present application. As shown in FIG. 1a, the two earplugs can be completely separated. As shown in FIG. 1a, the wireless earphone includes: two earplugs, each earplug includes: an earplug shell 121, a speaker arranged on the surface of the earplug shell 121, the earplug may also include: a wireless transceiver 122, a processing chip (not shown in the figure) drawn) and a battery (not shown in the figure), the processing chip is electrically connected with the touch panel, the wireless transceiver and the speaker. Specifically, the electrical connection can be connected by a bus, of course, in practical applications Among them, the above-mentioned electrical connection may also be connected by other connection methods.

请参阅图1b,图1b是本申请实施例公开的一种电子设备100的结构示意图,电子设备100包括存储和处理电路110,以及与所述存储和处理电路110连接的通信电路120和音频组件140,其中,在一些特定的电子设备100内,还可以设置显示组件130或触控组件。Please refer to FIG. 1b. FIG. 1b is a schematic structural diagram of an electronic device 100 disclosed in an embodiment of the present application. The electronic device 100 includes a storage and processing circuit 110, a communication circuit 120 and an audio component connected to the storage and processing circuit 110. 140, wherein, in some specific electronic devices 100, a display component 130 or a touch control component may also be provided.

电子设备100可以包括控制电路,该控制电路可以包括存储和处理电路110。该存储和处理电路110可以存储器,例如硬盘驱动存储器,非易失性存储器(例如闪存或用于形成固态驱动器的其它电子可编程只读存储器等),易失性存储器(例如静态或动态随机存取存储器等)等,本申请实施例不作限制。存储和处理电路110中的处理电路可以用于控制电子设备100的运转。该处理电路可以基于一个或多个微处理器,微控制器,数字信号处理器,基带处理器,功率管理单元,音频编解码器芯片,专用集成电路,显示驱动器集成电路等来实现。Electronic device 100 may include control circuitry, which may include storage and processing circuitry 110 . The storage and processing circuit 110 may be memory, such as hard drive memory, non-volatile memory (such as flash memory or other electronically programmable read only memory used to form solid state drives, etc.), volatile memory (such as static or dynamic random access memory, etc.) memory, etc.), etc., which are not limited in the embodiments of the present application. Processing circuitry in storage and processing circuitry 110 may be used to control the operation of electronic device 100 . The processing circuit may be implemented based on one or more microprocessors, microcontrollers, digital signal processors, baseband processors, power management units, audio codec chips, application specific integrated circuits, display driver integrated circuits, and the like.

存储和处理电路110可用于运行电子设备100中的软件,例如互联网协议语音(Voice over Internet Protocol,VOIP)电话呼叫应用程序,同声翻译功能,媒体播放应用程序,操作系统功能等。这些软件可以用于执行一些控制操作,例如,基于照相机的图像采集,基于环境光传感器的环境光测量,基于接近传感器的接近传感器测量,基于诸如发光二极管的状态指示灯等状态指示器实现的信息显示功能,基于触摸传感器的触摸事件检测,与执行无线通信功能相关联的操作,与收集和产生音频信号相关联的操作,与收集和处理按钮按压事件数据相关联的控制操作,以及电子设备100中的其它功能等,本申请实施例不作限制。The storage and processing circuit 110 may be used to run software in the electronic device 100, such as Voice over Internet Protocol (VOIP) phone calling applications, simultaneous translation functions, media playback applications, operating system functions, and the like. These software can be used to perform some control operations, for example, camera-based image acquisition, ambient light measurement based on ambient light sensor, proximity sensor measurement based on proximity sensor, information based on status indicator implementation such as status indicators of light emitting diodes Display functions, touch sensor based touch event detection, operations associated with performing wireless communication functions, operations associated with collecting and generating audio signals, control operations associated with collecting and processing button press event data, and electronic device 100 Other functions and the like in this application are not limited in the embodiments of the present application.

电子设备100还可以包括输入-输出电路150。输入-输出电路150可用于使电子设备100实现数据的输入和输出,即允许电子设备100从外部设备接收数据和也允许电子设备100将数据从电子设备100输出至外部设备。输入-输出电路150可以进一步包括传感器170。传感器170可以包括环境光传感器,基于光和电容的接近传感器,触摸传感器(例如,基于光触摸传感器和/或电容式触摸传感器,其中,触摸传感器可以是触控显示屏的一部分,也可以作为一个触摸传感器结构独立使用),加速度传感器,和其它传感器等。Electronic device 100 may also include input-output circuitry 150 . The input-output circuit 150 may be used to enable the electronic device 100 to input and output data, ie, allowing the electronic device 100 to receive data from an external device and also allow the electronic device 100 to output data from the electronic device 100 to an external device. The input-output circuit 150 may further include a sensor 170 . Sensors 170 may include ambient light sensors, light and capacitance-based proximity sensors, touch sensors (eg, light-based touch sensors and/or capacitive touch sensors, where the touch sensor may be part of a touch display, or may be used as a The touch sensor structure is used independently), acceleration sensor, and other sensors.

输入-输出电路150还可以包括触摸传感器阵列(即,显示器130可以是触控显示屏)。触摸传感器可以是由透明的触摸传感器电极(例如氧化铟锡(ITO)电极)阵列形成的电容式触摸传感器,或者可以是使用其它触摸技术形成的触摸传感器,例如音波触控,压敏触摸,电阻触摸,光学触摸等,本申请实施例不作限制。Input-output circuitry 150 may also include an array of touch sensors (ie, display 130 may be a touch-sensitive display). The touch sensor can be a capacitive touch sensor formed from an array of transparent touch sensor electrodes, such as indium tin oxide (ITO) electrodes, or can be a touch sensor formed using other touch technologies, such as sonic touch, pressure sensitive touch, resistive touch Touch, optical touch, etc., are not limited in the embodiments of the present application.

电子设备100还可以包括音频组件140。音频组件140可以用于为电子设备100提供音频输入和输出功能。电子设备100中的音频组件140可以包括扬声器,麦克风,蜂鸣器,音调发生器以及其它用于产生和检测声音的组件。The electronic device 100 may also include an audio component 140 . Audio component 140 may be used to provide audio input and output functionality for electronic device 100 . Audio components 140 in electronic device 100 may include speakers, microphones, buzzers, tone generators, and other components for generating and detecting sounds.

通信电路120可以用于为电子设备100提供与外部设备通信的能力。通信电路120可以包括模拟和数字输入-输出接口电路,和基于射频信号和/或光信号的无线通信电路。通信电路120中的无线通信电路可以包括射频收发器电路、功率放大器电路、低噪声放大器、开关、滤波器和天线。举例来说,通信电路120中的无线通信电路可以包括用于通过发射和接收近场耦合电磁信号来支持近场通信(Near Field Communication,NFC)的电路。例如,通信电路120可以包括近场通信天线和近场通信收发器。通信电路120还可以包括蜂窝电话收发器和天线,无线局域网收发器电路和天线等。Communication circuitry 120 may be used to provide electronic device 100 with the ability to communicate with external devices. Communication circuitry 120 may include analog and digital input-output interface circuitry, and wireless communication circuitry based on radio frequency signals and/or optical signals. Wireless communication circuitry in communication circuitry 120 may include radio frequency transceiver circuitry, power amplifier circuitry, low noise amplifiers, switches, filters, and antennas. For example, the wireless communication circuitry in the communication circuitry 120 may include circuitry for supporting Near Field Communication (NFC) by transmitting and receiving near-field coupled electromagnetic signals. For example, the communication circuit 120 may include a near field communication antenna and a near field communication transceiver. Communication circuitry 120 may also include cellular telephone transceivers and antennas, wireless local area network transceiver circuits and antennas, and the like.

电子设备100还可以进一步包括电池,电力管理电路和其它输入-输出单元160。输入-输出单元160可以包括按钮,操纵杆,点击轮,滚动轮,触摸板,小键盘,键盘,照相机,发光二极管或其它状态指示器等。The electronic device 100 may further include batteries, power management circuits and other input-output units 160 . Input-output unit 160 may include buttons, joysticks, click wheels, scroll wheels, touch pads, keypads, keyboards, cameras, light emitting diodes or other status indicators, and the like.

用户可以通过输入-输出电路150输入命令来控制电子设备100的操作,并且可以使用输入-输出电路150的输出数据以实现接收来自电子设备100的状态信息和其它输出。A user may input commands through the input-output circuit 150 to control the operation of the electronic device 100 , and the output data of the input-output circuit 150 may be used to effect receiving status information and other outputs from the electronic device 100 .

参阅图2,图2提供了一种电子设备,如图2所示,该电子设备包括:处理器201和无线收发器202,其中处理器201与无线收发器202之间连接,其连接方式包括但不限于如图2所示的总线203方式,当然还可以采用其他连接方式,本申请并不限制上述具体连接方式。Referring to FIG. 2, FIG. 2 provides an electronic device. As shown in FIG. 2, the electronic device includes: a processor 201 and a wireless transceiver 202, wherein the processor 201 and the wireless transceiver 202 are connected, and the connection method includes: However, it is not limited to the bus 203 manner shown in FIG. 2 , and of course other connection manners may also be used, and the present application does not limit the above-mentioned specific connection manners.

无线收发器202,用于接收第一耳塞的第一配对请求,接收第二耳塞的第二配对请求;A wireless transceiver 202, configured to receive a first pairing request of the first earplug, and receive a second pairing request of the second earplug;

上述步骤S202中的配对请求可以基于第一耳塞与电子设备之间的无线连接协议确定,例如,在本申请一个可选的实施方案中,如果电子设备与第一耳塞之间支持蓝牙4.0协议,那么第一耳塞基于蓝牙4.0协议发送第一配对请求,当然在实际应用中还可以采用其他的协议,本申请并不限制具体的连接协议以及具体的配对请求。The pairing request in the above step S202 can be determined based on the wireless connection protocol between the first earplug and the electronic device. For example, in an optional embodiment of the present application, if the electronic device and the first earplug support the Bluetooth 4.0 protocol, Then, the first earplug sends the first pairing request based on the Bluetooth 4.0 protocol. Of course, other protocols may also be used in practical applications, and the present application does not limit the specific connection protocol and the specific pairing request.

处理器201,用于依据第一配对请求与第一耳塞配对连接,依据第二配对请求对第二耳塞配对连接;The processor 201 is configured to pair and connect with the first earplug according to the first pairing request, and pair and connect the second earplug according to the second pairing request;

上述的第一耳塞的配对连接为独立的连接,上述第二耳塞的配对连接也为独立连接,上述第一耳塞与终端的连接是否成功并不影响第二耳塞与终端的连接。The pairing connection of the first earplug is an independent connection, and the pairing connection of the second earplug is also an independent connection. Whether the connection between the first earplug and the terminal is successful does not affect the connection between the second earplug and the terminal.

对于此连接的说明,本申请人认为对于蓝牙耳机来说,尤其是分离式蓝牙耳机,两个耳塞在机械结构上是完全独立的,但是分离式蓝牙耳机在通信上并非是完全独立的,例如,在一种可选的技术方案中,分离式蓝牙耳机的两个耳塞可以区分为主耳塞和从耳塞,对于主耳塞,其与电子设备连接,同时其也与从耳塞连接,对于从耳塞,其只与电子设备连接,此种情况下,如果主耳塞与电子设备之间连接失败,那么从耳塞当然也无法接收到电子设备的任何信息。而本申请的上述技术方案提供的是完全独立的两个无线连接,两个无线连接互不影响。For the description of this connection, the applicant believes that for Bluetooth headsets, especially separate Bluetooth headsets, the two earplugs are completely independent in mechanical structure, but separate Bluetooth headsets are not completely independent in communication, for example , In an optional technical solution, the two earplugs of the detachable Bluetooth headset can be distinguished as the master earplug and the slave earplug. For the master earplug, it is connected with the electronic device, and it is also connected with the slave earplug. It is only connected to the electronic device. In this case, if the connection between the main earplug and the electronic device fails, of course, the slave earplug cannot receive any information from the electronic device. However, the above technical solution of the present application provides two completely independent wireless connections, and the two wireless connections do not affect each other.

无线收发器202,还用于接收第一耳塞发送的第一电量,接收第二耳塞发送的第二电量;The wireless transceiver 202 is further configured to receive the first electric quantity sent by the first earplug, and receive the second electric quantity sent by the second earplug;

上述第一电量或第二电量可以通过一个新建的电量通知消息携带,当然在实际应用中,也可以通过在一个现有消息中加载该第一电量或第二电量,本申请具体实施方式并不限制上述第一电量或第二电量的具体携带方式或通知方式。The above-mentioned first electric quantity or second electric quantity can be carried by a newly created electric quantity notification message. Of course, in practical application, the first electric quantity or the second electric quantity can also be loaded in an existing message. The specific carrying method or notification method of the above-mentioned first power or second power is limited.

处理器201,还用于计算第一电量与第二电量的差值,依据该差值从第一耳塞和第二耳塞中选择主耳塞和从耳塞,控制无线收发器保持与主耳塞连接,释放与从耳塞的连接。The processor 201 is further configured to calculate the difference between the first power and the second power, select the master earplug and the slave earplug from the first earplug and the second earplug according to the difference, control the wireless transceiver to keep connected with the master earplug, release the Connection with slave earbuds.

本申请提供的电子设备分别与第一耳塞和第二耳塞配对连接,然后接收二个耳塞分别上报的两个电量,计算两个电量的差值,依据该差值确定二个耳塞中的主耳塞和从耳塞,断开从耳塞的连接,这样能够减少从耳塞之间的连接,减少了从耳塞的耗电,实现了主耳塞与从耳塞之间的电量调整,提高了两个耳塞的电量的均衡,提高了用户体验度。The electronic device provided by this application is paired and connected to the first earplug and the second earplug respectively, and then receives the two power quantities reported by the two earplugs respectively, calculates the difference between the two power quantities, and determines the main earplug among the two earplugs according to the difference. And the slave earplugs, disconnect the connection of the slave earplugs, which can reduce the connection between the slave earplugs, reduce the power consumption of the slave earplugs, realize the power adjustment between the master earplugs and the slave earplugs, and improve the power consumption of the two earplugs. Balanced and improved user experience.

可选的,处理器201,具体用于如该差值大于第一电压阈值,确定第一耳塞为主耳塞,第二耳塞为从耳塞,如该差值小于第二电压阈值,确定第一耳塞为从耳塞,第二耳塞为从耳塞,其中,该第一电压阈值为正电压值,该第二电压阈值为负电压值。Optionally, the processor 201 is specifically configured to, if the difference is greater than the first voltage threshold, determine that the first earplug is the master earplug and the second earplug is the slave earplug, and if the difference is less than the second voltage threshold, determine the first earplug The second earplug is a slave earplug, wherein the first voltage threshold is a positive voltage value, and the second voltage threshold is a negative voltage value.

对于此差值的确定方式,如果差值为正且比第一电压阈值大,证明第一耳塞的第一电量大于第二电量,此时确定电量较多的第一耳塞为主耳塞,电量较少的第二耳塞为从耳塞,如果差值为负且比第二电压阈值小,证明第一耳塞的第一电量小于第二电量,此时确定电量较多的第二耳塞为主耳塞,电量较少的第一耳塞为从耳塞,总之,始终确定电量较多的耳塞为主耳塞,电量较少的耳塞为从耳塞。As for the way of determining the difference, if the difference is positive and larger than the first voltage threshold, it proves that the first power of the first earplug is greater than the second power. If the difference is negative and smaller than the second voltage threshold, it proves that the first power of the first earplug is less than the second power. At this time, it is determined that the second earplug with more power is the master earplug. The less first earplugs are the slave earplugs. In short, it is always determined that the earplugs with more power are the master earplugs, and the earplugs with less power are the slave earplugs.

可选的,处理器201,还用于获取运行的应用程序的类型和运行时间,依据该类型确定需运行的耳塞数量,依据该耳塞数量以及运行时间计算主耳塞的第一剩余电量和从耳塞的第二剩余电量,依据第一剩余电量和第二剩余电量确定是否需要执行主耳塞与从耳塞之间的互换。Optionally, the processor 201 is further configured to acquire the type and running time of the running application, determine the number of earplugs to be run according to the type, and calculate the first remaining power of the master earplug and the slave earplugs according to the number of earplugs and the running time. The second remaining power is determined according to the first remaining power and the second remaining power, whether it is necessary to perform the exchange between the master earplug and the slave earplug.

本技术方案通过运行的应用程序的类型来确定需运行的耳塞数量,然后依据该耳塞数量以及运行时间计算主耳塞的第一剩余电量和从耳塞的第二剩余电量,进而确定是否启动主、从耳塞之间的互换,此技术方案避免了主耳塞长期不切换导致的主耳塞的剩余电量与从耳塞的剩余电量差距过大,加剧主、从耳塞之间的电量差异。The technical solution determines the number of earplugs to be run by the type of the running application, and then calculates the first remaining power of the master earplug and the second remaining power of the slave earplugs according to the number of earplugs and the running time, and then determines whether to activate the master and the slave. Swap between earplugs, this technical solution avoids the large gap between the remaining power of the master earplug and the remaining power of the slave earplugs caused by the long-term non-switching of the master earplugs, which aggravates the power difference between the master and slave earplugs.

上述依据该应用程序的类型确定需运行的耳塞数量具体可以为,确定该应用程序是否包含音频信息,如包含音频信息,确定该应用程序是否为语音通话,如该应用程序为语音通话,确定耳塞数量为1个,如包含音频信息但应用程序不为语音通话,确定耳塞数量为2个。The above-mentioned determining the number of earplugs to be run according to the type of the application may specifically be: determining whether the application contains audio information, if it contains audio information, determining whether the application is a voice call, if the application is a voice call, determine whether the earplugs The number is 1. If audio information is included but the application is not a voice call, the number of earbuds is determined to be 2.

此技术方案主要是针对应用程序的类型来确定耳塞的数量,对于耳塞来说,其只有包含音频信息时才可能会被用到,而对于语音通话信息,习惯为单耳式,即主耳塞工作,那对于其他的一些包含音频信息的应用,例如影视类应用、音乐类应用、游戏类应用,通常均用两个耳塞来听音频信息,所以依据该应用程序的类型即能够确定需执行的耳塞的具体数量。This technical solution is mainly to determine the number of earplugs according to the type of application. For earplugs, they may only be used when they contain audio information. For voice call information, it is customary to use a single ear type, that is, the main earplug works. , then for some other applications that contain audio information, such as film and television applications, music applications, and game applications, two earplugs are usually used to listen to audio information, so according to the type of the application, the earplugs to be executed can be determined. specific quantity.

处理器201,具体用于如确定该耳塞数量为2个,The processor 201 is specifically used for determining that the number of earplugs is 2,

第一剩余电量=第一电量—Kt*(X1+X2)*t/Q;The first remaining power = the first power - K t *(X1+X2)*t/Q;

第二剩余电量=第二电量—Kt*X1*t/Q;The second remaining power = the second power - K t *X1*t/Q;

其中,Q为耳塞的总电量(一般为固定值,例如100mkwh),上述Kt为温度调整系数,其可以依据环境温度的值从温度与调整系数列表中查表获得,该X1为播放所需功率,此功率值可以依据耳机的音量查表获得,X2为无线发射功率,一般为定值,t为运行时间。Among them, Q is the total power of the earplugs (usually a fixed value, such as 100mkwh), the above K t is the temperature adjustment coefficient, which can be obtained from the temperature and adjustment coefficient list according to the value of the ambient temperature by looking up the table, the X1 is required for playback Power, this power value can be obtained by looking up the table according to the volume of the headset, X2 is the wireless transmission power, which is generally a fixed value, and t is the running time.

本申请提供的技术方案充分考虑了温度对电量的影响,对于电池的电量来说,环境温度的差异比较大,例如10℃的环境温度的差异可以引起大约10%的电量的差异,所以这里特意增加了温度调整系数。The technical solution provided in this application fully considers the influence of temperature on the power. For the power of the battery, the difference in ambient temperature is relatively large. For example, the difference in the ambient temperature of 10°C can cause a difference of about 10% in the power. Added temperature adjustment factor.

对于主耳塞来说,其负责有两个功能,第一是播放功能,第二是发射功能,所以其具有两个功能的功耗,而对于从耳机来说,其只需要播放和接收,无需发射,所以其考虑只有一个功能的功耗,即X1。所以本申请提供的技术方案具有剩余电量计算准确的优点。For the main earphone, it is responsible for two functions, the first is the playback function, and the second is the transmission function, so it has the power consumption of two functions, while for the slave earphone, it only needs to play and receive, no need launch, so it considers the power consumption of only one function, namely X1. Therefore, the technical solution provided by the present application has the advantage of accurate calculation of the remaining power.

参阅图3,图3提供了一种可穿戴式设备,该可穿戴式设备包括分离的主耳塞和从耳塞,其中,Referring to FIG. 3, FIG. 3 provides a wearable device comprising separate master earplugs and slave earplugs, wherein,

从耳塞301,用于周期性的向主耳机发送第一电量(从耳塞电量);The slave earplug 301 is used to periodically send the first power (the power of the slave earplug) to the master headset;

主耳塞302,用于计算第一电量与第二电量(主耳塞电量)之间的差值,如差值大于设定阈值,向电子设备发送切换从耳塞请求,该切换从耳塞请求用于将主耳塞切换成从耳塞,将从耳塞切换成主耳塞。The main earplug 302 is used to calculate the difference between the first electric quantity and the second electric quantity (the main earplug electric quantity), if the difference is greater than the set threshold, send a request for switching the secondary earplug to the electronic device, and the switching secondary earplug request is used to switch the earplug. The master earbud switches to the slave earbud, and the slave earbud switches to the master earbud.

本申请提供的可穿戴式设备通过主耳塞监控从耳塞的电量,在两个电量差值低于设定阈值时,发送切换从耳塞请求,避免了主耳塞与从耳塞之间的电量差值过大。The wearable device provided by this application monitors the power of the slave earplugs through the master earplug, and sends a request to switch the slave earplugs when the difference between the two power levels is lower than a set threshold, so as to avoid excessive power difference between the master earplug and the slave earplugs. big.

参阅图4,图4提供一种可穿戴设备电量均衡方法,所述方法应用在电子设备,所述方法包括如下步骤:Referring to FIG. 4, FIG. 4 provides a method for power balancing of a wearable device. The method is applied to an electronic device, and the method includes the following steps:

步骤S401、接收第一耳塞的第一配对请求,接收第二耳塞的第二配对请求;Step S401, receiving a first pairing request of a first earplug, and receiving a second pairing request of a second earplug;

步骤S402、据所述第一配对请求与所述第一耳塞配对连接,依据所述第二配对请求对所述第二耳塞配对连接;Step S402, pairing and connecting with the first earplug according to the first pairing request, and pairing and connecting the second earplug according to the second pairing request;

步骤S403、接收所述第一耳塞发送的第一电量,接收所述第二耳塞发送的第二电量;Step S403, receiving the first power amount sent by the first earplug, and receiving the second power amount sent by the second earplug;

步骤S404、计算所述第一电量与所述第二电量的差值,依据所述差值从所述第一耳塞和所述第二耳塞中选择主耳塞和从耳塞,控制所述无线收发器保持与所述主耳塞连接,释放与所述从耳塞的连接。Step S404: Calculate the difference between the first power and the second power, select a master earplug and a slave earplug from the first earplug and the second earplug according to the difference, and control the wireless transceiver Stay connected to the master earbud, release the connection to the slave earbud.

本申请提供的方法分别与第一耳塞和第二耳塞配对连接,然后接收二个耳塞分别上报的两个电量,计算两个电量的差值,依据该差值确定二个耳塞中的主耳塞和从耳塞,断开从耳塞的连接,这样能够减少从耳塞之间的连接,减少了从耳塞的耗电,实现了主耳塞与从耳塞之间的电量调整,提高了两个耳塞的电量的均衡,提高了用户体验度。The method provided in the present application is paired and connected to the first earplug and the second earplug respectively, and then receives the two electric quantities reported by the two earplugs respectively, calculates the difference between the two electric quantities, and determines the main earplug and the main earplug of the two earplugs according to the difference. Disconnect the slave earbuds from the earbuds, which can reduce the connection between the slave earbuds, reduce the power consumption of the slave earbuds, realize the power adjustment between the master earbuds and the slave earbuds, and improve the balance of the power of the two earbuds. , which improves the user experience.

参阅图5,图5提供一种切换方法,所述方法应用于可穿戴式设备,所述可穿戴式设备包括:分离的主耳塞和从耳塞,所述方法包括如下步骤:Referring to FIG. 5, FIG. 5 provides a switching method, the method is applied to a wearable device, and the wearable device includes: a separate master earplug and a slave earplug, and the method includes the following steps:

步骤S501、可穿戴式设备的从耳塞周期性的向主耳机发送第一电量(从耳塞的电量);Step S501, the slave earplug of the wearable device periodically sends the first power (the power of the slave earplug) to the master earphone;

步骤S502、可穿戴式设备的主耳塞计算所述第一电量与第二电量(主耳塞的电量)之间的差值,如所述差值大于设定阈值,向电子设备发送切换从耳塞请求,所述切换从耳塞请求用于将主耳塞切换成从耳塞,将从耳塞切换成主耳塞。Step S502, the main earplug of the wearable device calculates the difference between the first electric quantity and the second electric quantity (the electric quantity of the main earplug), and if the difference is greater than the set threshold, sends a request to switch from the earplug to the electronic device , the switching slave earplug request is used to switch the master earplug to the slave earplug, and to switch the slave earplug to the master earplug.

图6示出的是与本申请实施例提供的移动终端相关的手机的部分结构的框图。参考图6,手机包括:射频(Radio Frequency,RF)电路910、存储器920、输入单元930、传感器950、音频采集器960、无线保真(Wireless Fidelity,WiFi)模块970、应用处理器AP980、电源990以及传感器等部件。本领域技术人员可以理解,图6中示出的手机结构并不构成对手机的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,例如该射频电路910可以连接多根天线。FIG. 6 is a block diagram showing a partial structure of a mobile phone related to a mobile terminal provided by an embodiment of the present application. 6 , the mobile phone includes: a radio frequency (RF) circuit 910, a memory 920, an input unit 930, a sensor 950, an audio collector 960, a wireless fidelity (WiFi) module 970, an application processor AP980, a power supply 990 and components such as sensors. Those skilled in the art can understand that the structure of the mobile phone shown in FIG. 6 does not constitute a limitation on the mobile phone, and may include more or less components than those shown in the figure, or combine some components, or arrange different components, such as this The radio frequency circuit 910 can be connected to multiple antennas.

下面结合图6对手机的各个构成部件进行具体的介绍:Below in conjunction with Figure 6, the various components of the mobile phone are introduced in detail:

输入单元930可用于接收输入的数字或字符信息,以及产生与手机的用户设置以及功能控制有关的键信号输入。具体地,输入单元930可包括触控显示屏933、指纹识别装置931、人脸识别装置936、虹膜识别装置937以及其他输入设备932。输入单元930还可以包括其他输入设备932。具体地,其他输入设备932可以包括但不限于物理按键、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。其中,The input unit 930 may be used to receive inputted numerical or character information, and generate key signal input related to user setting and function control of the mobile phone. Specifically, the input unit 930 may include a touch display screen 933 , a fingerprint recognition device 931 , a face recognition device 936 , an iris recognition device 937 and other input devices 932 . The input unit 930 may also include other input devices 932 . Specifically, other input devices 932 may include, but are not limited to, one or more of physical keys, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, joysticks, and the like. in,

射频电路910,用于接收第一耳塞的第一配对请求,接收第二耳塞的第二配对请求;The radio frequency circuit 910 is configured to receive a first pairing request from the first earplug and receive a second pairing request from the second earplug;

AP980,用于依据所述第一配对请求与所述第一耳塞配对连接,依据所述第二配对请求对所述第二耳塞配对连接;AP980, configured to pair and connect with the first earplug according to the first pairing request, and pair and connect the second earplug according to the second pairing request;

射频电路910,还用于接收所述第一耳塞发送的第一电量,接收所述第二耳塞发送的第二电量;The radio frequency circuit 910 is further configured to receive the first power sent by the first earplug, and receive the second power sent by the second earplug;

AP980,用于计算所述第一电量与所述第二电量的差值,依据所述差值从所述第一耳塞和所述第二耳塞中选择主耳塞和从耳塞,控制所述无线收发器保持与所述主耳塞连接,释放与所述从耳塞的连接;AP980, configured to calculate the difference between the first power and the second power, select a master earplug and a slave earplug from the first earplug and the second earplug according to the difference, and control the wireless transceiver The device remains connected to the master earplug and releases the connection to the slave earplug;

AP980,具体用于如所述差值大于第一电压阈值,确定所述第一耳塞为主耳塞,所述第二耳塞为从耳塞,如所述差值小于第二电压阈值,确定所述第一耳塞为从耳塞,所述第二耳塞为从耳塞,其中,所述第一电压阈值为正电压值,所述第二电压阈值为负电压值。The AP980 is specifically configured to determine that the first earplug is a master earplug and the second earplug is a slave earplug if the difference is greater than a first voltage threshold, and determine the first earplug if the difference is less than a second voltage threshold One earplug is a slave earplug, the second earplug is a slave earplug, wherein the first voltage threshold is a positive voltage value, and the second voltage threshold is a negative voltage value.

可选的,AP980,具体用于获取运行应用程序的类型和运行时间,依据所述类型确定需运行的耳塞数量,依据所述耳塞数量以及运行时间计算所述主耳塞的第一剩余电量和所述从耳塞的第二剩余电量,依据所述第一剩余电量和所述第二剩余电量确定是否需要执行主耳塞与从耳塞之间的互换。Optionally, the AP980 is specifically used to obtain the type and running time of the running application, determine the number of earplugs to be run according to the type, and calculate the first remaining power and all the remaining power of the main earplug according to the number of earplugs and the running time. The second remaining power of the slave earplugs is determined, according to the first remaining power and the second remaining power, whether the exchange between the master earplugs and the slave earplugs needs to be performed is determined.

AP980,具体用于计算第一剩余电量和第二剩余电量,具体包括:The AP980 is specifically used to calculate the first remaining power and the second remaining power, including:

第一剩余电量=第一电量—Kt*(X1+X2)*t/Q;The first remaining power = the first power - K t *(X1+X2)*t/Q;

第二剩余电量=第二电量—Kt*X1*t/Q;The second remaining power = the second power - K t *X1*t/Q;

其中,Q为耳塞的总电量,Kt为温度调整系数,X1为播放所需功率,X2为无线发射功率,t为运行时间。Among them, Q is the total power of the earplugs, K t is the temperature adjustment coefficient, X1 is the power required for playback, X2 is the wireless transmission power, and t is the running time.

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

此外,存储器920可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。Additionally, memory 920 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.

RF电路910可用于信息的接收和发送。通常,RF电路910包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器(Low Noise Amplifier,LNA)、双工器等。此外,RF电路910还可以通过无线通信与网络和其他设备通信。上述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统、通用分组无线服务、码分多址、宽带码分多址、长期演进、新空口、电子邮件、短消息服务等。RF circuitry 910 may be used for the reception and transmission of information. Typically, the RF circuit 910 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, RF circuitry 910 may communicate with networks and other devices via wireless communications. The above wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile Communications, General Packet Radio Service, Code Division Multiple Access, Wideband Code Division Multiple Access, Long Term Evolution, New Air Interface, Email, Short Message Service, etc. .

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

音频采集器960、扬声器961,传声器962可提供用户与手机之间的音频接口。音频采集器960可将接收到的音频数据转换后的电信号,传输到扬声器961,由扬声器961转换为声音信号播放;另一方面,传声器962将收集的声音信号转换为电信号,由音频采集器960接收后转换为音频数据,再将音频数据播放AP980处理后,经RF电路910以发送给比如另一手机,或者将音频数据播放至存储器920以便进一步处理。The audio collector 960, the speaker 961, and the microphone 962 can provide an audio interface between the user and the mobile phone. The audio collector 960 can transmit the electrical signal converted from the received audio data to the speaker 961, and the speaker 961 converts it into a sound signal for playback; on the other hand, the microphone 962 converts the collected sound signal into an electrical signal, which is collected by the audio. The audio data is converted into audio data by the receiver 960 after being received, and then the audio data is processed by the AP 980 and sent to, for example, another mobile phone through the RF circuit 910, or the audio data is played to the memory 920 for further processing.

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

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

尽管未示出,手机还可以包括摄像头、蓝牙模块、补光装置、光线传感器等,在此不再赘述。Although not shown, the mobile phone may further include a camera, a Bluetooth module, a light-filling device, a light sensor, etc., which will not be repeated here.

可以看出,本申请提供的技术方案通过获取位置坐标以及时间来确定是否处于睡眠状态,如处于睡眠状态下,通过采集的图片判断是否包含婴儿,在包含婴儿时,控制无线收发器的通信功能,这样降低无线收发器的辐射对婴儿的影响,提高用户的体验度。It can be seen that the technical solution provided by this application determines whether it is in a sleep state by acquiring position coordinates and time. If it is in a sleep state, it is determined whether a baby is included through the collected pictures, and when a baby is included, the communication function of the wireless transceiver is controlled. , in this way, the influence of the radiation of the wireless transceiver on the baby is reduced, and the user's experience is improved.

本申请实施例还提供一种计算机存储介质,其中,该计算机存储介质存储用于电子数据交换的计算机程序,该计算机程序使得计算机执行如上述方法实施例中记载的任何一种可穿戴设备电量均衡方法的部分或全部步骤。Embodiments of the present application further provide a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program enables the computer to execute any wearable device power balance as described in the foregoing method embodiments some or all of the steps of the method.

本申请实施例还提供一种计算机程序产品,所述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,所述计算机程序可操作来使计算机执行如上述方法实施例中记载的任何一种可穿戴设备电量均衡方法的部分或全部步骤。Embodiments of the present application further provide a computer program product, the computer program product comprising a non-transitory computer-readable storage medium storing a computer program, the computer program being operable to cause a computer to execute the methods described in the foregoing method embodiments Some or all of the steps of any wearable device cell balancing method.

在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the above-mentioned embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.

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

所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.

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

以上是本申请实施例的实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请实施例原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也视为本申请的保护范围。The above is the implementation of the embodiments of the present application. It should be pointed out that for those of ordinary skill in the art, without departing from the principles of the embodiments of the present application, several improvements and modifications can also be made. These improvements and modifications are also It is regarded as the protection scope of this application.

Claims (7)

1.一种电子设备,所述电子设备包括:处理器和无线收发器,其特征在于,1. An electronic device comprising: a processor and a wireless transceiver, characterized in that, 无线收发器,用于接收第一耳塞的第一配对请求,接收第二耳塞的第二配对请求;a wireless transceiver, configured to receive a first pairing request from the first earplug and a second pairing request from the second earplug; 处理器,用于依据所述第一配对请求与所述第一耳塞配对连接,依据所述第二配对请求对所述第二耳塞配对连接;a processor, configured to pair and connect with the first earplug according to the first pairing request, and pair and connect the second earplug according to the second pairing request; 无线收发器,还用于接收所述第一耳塞发送的第一电量,接收所述第二耳塞发送的第二电量;a wireless transceiver, further configured to receive the first power amount sent by the first earplug, and receive the second power amount sent by the second earplug; 处理器,还用于计算所述第一电量与所述第二电量的差值,依据所述差值从所述第一耳塞和所述第二耳塞中选择主耳塞和从耳塞,控制所述无线收发器保持与所述主耳塞连接,释放与所述从耳塞的连接;The processor is further configured to calculate the difference between the first power and the second power, select a master earplug and a slave earplug from the first earplug and the second earplug according to the difference, and control the the wireless transceiver remains connected to the master earbud and releases the connection to the slave earbud; 其中,所述处理器,具体用于获取运行应用程序的类型和运行时间,依据所述类型确定需运行的耳塞数量,依据所述耳塞数量以及运行时间计算所述主耳塞的第一剩余电量和所述从耳塞的第二剩余电量,依据所述第一剩余电量和所述第二剩余电量确定是否需要执行主耳塞与从耳塞之间的互换;The processor is specifically configured to obtain the type and running time of the running application, determine the number of earplugs to be run according to the type, and calculate the first remaining power and the second remaining power of the slave earplugs, according to the first remaining power and the second remaining power, to determine whether the exchange between the master earplugs and the slave earplugs needs to be performed; 其中,如确定所述耳塞数量为2个;Wherein, if it is determined that the number of earplugs is 2; 所述处理器,具体用于计算第一剩余电量和第二剩余电量,具体包括:The processor is specifically used to calculate the first remaining power and the second remaining power, and specifically includes: 第一剩余电量=第一电量—Kt*(X1+X2)*t/Q;The first remaining power = the first power - K t *(X1+X2)*t/Q; 第二剩余电量=第二电量—Kt*X1*t/Q;The second remaining power = the second power - K t *X1*t/Q; 其中,Q为耳塞的总电量,Kt为温度调整系数,X1为播放所需功率,X2为无线发射功率,t为运行时间。Among them, Q is the total power of the earplugs, K t is the temperature adjustment coefficient, X1 is the power required for playback, X2 is the wireless transmission power, and t is the running time. 2.根据权利要求1所述的电子设备,其特征在于,2. The electronic device according to claim 1, characterized in that, 所述处理器,具体用于如所述差值大于第一电压阈值,确定所述第一耳塞为主耳塞,所述第二耳塞为从耳塞,如所述差值小于第二电压阈值,确定所述第一耳塞为从耳塞,所述第二耳塞为从耳塞,其中,所述第一电压阈值为正电压值,所述第二电压阈值为负电压值。The processor is specifically configured to, if the difference is greater than a first voltage threshold, determine that the first earplug is a master earplug and the second earplug is a slave earplug, and if the difference is less than the second voltage threshold, determine The first earplug is a slave earplug, and the second earplug is a slave earplug, wherein the first voltage threshold is a positive voltage value, and the second voltage threshold is a negative voltage value. 3.一种可穿戴式设备,其特征在于,所述可穿戴式设备包括:分离的主耳塞和从耳塞;其中,所述可穿戴式设备受控于如权利要求1至2任意一项所述的电子设备,其中,3. A wearable device, characterized in that the wearable device comprises: separate master earplugs and slave earplugs; wherein the wearable device is controlled according to any one of claims 1 to 2 The electronic device described, wherein, 所述从耳塞,用于周期性的向主耳塞发送第一电量;The slave earplug is used to periodically send the first power to the master earplug; 所述主耳塞,用于计算所述第一电量与第二电量之间的差值,如所述差值大于设定阈值,向电子设备发送切换从耳塞请求,所述切换从耳塞请求用于将主耳塞切换成从耳塞,将从耳塞切换成主耳塞。The master earplug is used to calculate the difference between the first power and the second power, and if the difference is greater than a set threshold, send a request for switching the slave earplug to the electronic device, and the switching slave earplug request is used for Switch the master earbud to the slave earbud, and switch the slave earbud to the master earbud. 4.一种可穿戴设备电量均衡方法,其特征在于,所述方法应用在电子设备,所述方法包括如下步骤:4. A method for power balancing of a wearable device, wherein the method is applied to an electronic device, and the method comprises the following steps: 接收第一耳塞的第一配对请求,接收第二耳塞的第二配对请求;Receive the first pairing request of the first earplug, and receive the second pairing request of the second earplug; 据所述第一配对请求与所述第一耳塞配对连接,依据所述第二配对请求对所述第二耳塞配对连接;The first pairing request is paired with the first earplug, and the second earplug is paired and connected according to the second pairing request; 接收所述第一耳塞发送的第一电量,接收所述第二耳塞发送的第二电量;receiving the first power amount sent by the first earplug, and receiving the second power amount sent by the second earplug; 计算所述第一电量与所述第二电量的差值,依据所述差值从所述第一耳塞和所述第二耳塞中选择主耳塞和从耳塞,控制无线收发器保持与所述主耳塞连接,释放与所述从耳塞的连接;Calculate the difference between the first electric quantity and the second electric quantity, select a master earplug and a slave earplug from the first earplug and the second earplug according to the difference, and control the wireless transceiver to maintain communication with the master earplug. earplug connection, release the connection with the slave earplug; 其中,获取运行应用程序的类型和运行时间,依据所述类型确定需运行的耳塞数量,依据所述耳塞数量以及运行时间计算所述主耳塞的第一剩余电量和所述从耳塞的第二剩余电量,依据所述第一剩余电量和所述第二剩余电量确定是否需要执行主耳塞与从耳塞之间的互换;Among them, the type and running time of the running application are obtained, the number of earplugs to be run is determined according to the type, and the first remaining power of the master earplug and the second remaining power of the slave earplug are calculated according to the number of earplugs and the running time. electric quantity, according to the first remaining electric quantity and the second remaining electric quantity to determine whether it is necessary to perform the exchange between the master earplug and the slave earplug; 其中,如确定所述耳塞数量为2个;所述依据所述耳塞数量以及运行时间计算所述主耳塞的第一剩余电量和所述从耳塞的第二剩余电量具体包括:Wherein, if it is determined that the number of earplugs is 2; the calculation of the first remaining power of the master earplug and the second remaining power of the slave earplugs according to the number of earplugs and the running time specifically includes: 第一剩余电量=第一电量—Kt*(X1+X2)*t/Q;The first remaining power = the first power - K t *(X1+X2)*t/Q; 第二剩余电量=第二电量—Kt*X1*t/Q;The second remaining power = the second power - K t *X1*t/Q; 其中,Q为耳塞的总电量,Kt为温度调整系数,X1为播放所需功率,X2为无线发射功率,t为运行时间。Among them, Q is the total power of the earplugs, K t is the temperature adjustment coefficient, X1 is the power required for playback, X2 is the wireless transmission power, and t is the running time. 5.根据权利要求4所述的方法,其特征在于,所述依据所述差值从所述第一耳塞和所述第二耳塞中选择主耳塞和从耳塞具体包括:5. The method according to claim 4, wherein the selecting a master earplug and a slave earplug from the first earplug and the second earplug according to the difference value specifically comprises: 如所述差值大于第一电压阈值,确定所述第一耳塞为主耳塞,所述第二耳塞为从耳塞,如所述差值小于第二电压阈值,确定所述第一耳塞为从耳塞,所述第二耳塞为从耳塞,其中,所述第一电压阈值为正电压值,所述第二电压阈值为负电压值。If the difference is greater than the first voltage threshold, it is determined that the first earplug is the master earplug and the second earplug is the slave earplug, and if the difference is less than the second voltage threshold, the first earplug is determined to be the slave earplug , the second earplug is a slave earplug, wherein the first voltage threshold is a positive voltage value, and the second voltage threshold is a negative voltage value. 6.一种切换方法,其特征在于,所述方法应用于可穿戴式设备,所述可穿戴式设备包括:分离的主耳塞和从耳塞,其中,所述可穿戴式设备受控于如权利要求1至2任意一项所述的电子设备,所述方法包括如下步骤:6. A switching method, characterized in that the method is applied to a wearable device, the wearable device comprising: separate master earplugs and slave earplugs, wherein the wearable device is controlled according to the claim The electronic device according to any one of claims 1 to 2, the method comprising the steps of: 可穿戴式设备的从耳塞周期性的向主耳塞发送第一电量;The slave earplug of the wearable device periodically sends the first power to the master earplug; 可穿戴式设备的主耳塞计算所述第一电量与第二电量之间的差值,如所述差值大于设定阈值,向电子设备发送切换从耳塞请求,所述切换从耳塞请求用于将主耳塞切换成从耳塞,将从耳塞切换成主耳塞。The main earplug of the wearable device calculates the difference between the first power and the second power, and if the difference is greater than the set threshold, sends a request to switch the slave earplug to the electronic device, and the switch slave earplug request is used for Switch the master earbud to the slave earbud, and switch the slave earbud to the master earbud. 7.一种计算机可读存储介质,其特征在于,其存储用于电子数据交换的计算机程序,其中,所述计算机程序使得计算机执行如权利要求4-6任一项所述的方法。7. A computer-readable storage medium, characterized in that it stores a computer program for electronic data exchange, wherein the computer program causes a computer to perform the method according to any one of claims 4-6.
CN201810549822.3A 2018-05-31 2018-05-31 Wearable equipment electric quantity balancing method and related product Expired - Fee Related CN108882084B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810549822.3A CN108882084B (en) 2018-05-31 2018-05-31 Wearable equipment electric quantity balancing method and related product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810549822.3A CN108882084B (en) 2018-05-31 2018-05-31 Wearable equipment electric quantity balancing method and related product

Publications (2)

Publication Number Publication Date
CN108882084A CN108882084A (en) 2018-11-23
CN108882084B true CN108882084B (en) 2020-02-11

Family

ID=64336885

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810549822.3A Expired - Fee Related CN108882084B (en) 2018-05-31 2018-05-31 Wearable equipment electric quantity balancing method and related product

Country Status (1)

Country Link
CN (1) CN108882084B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110267145A (en) * 2019-07-09 2019-09-20 维沃移动通信有限公司 A state display method and terminal equipment
CN113329378B (en) * 2020-02-28 2023-05-05 Oppo广东移动通信有限公司 Earphone control method and related product
CN114286218B (en) * 2020-09-28 2024-10-01 南宁富联富桂精密工业有限公司 Wireless earphone and method for improving endurance of wireless earphone
CN113115155B (en) * 2021-04-07 2023-01-10 维沃移动通信有限公司 Wireless earphone control method, wireless earphone control device and electronic equipment

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103507644A (en) * 2012-06-29 2014-01-15 凹凸电子(武汉)有限公司 Mileage device and method and controller for electric vehicle
CN106937197B (en) * 2017-01-25 2019-06-25 北京国承万通信息科技有限公司 Double-ear wireless earphone and communication control method thereof
CN107071618A (en) * 2017-04-26 2017-08-18 歌尔科技有限公司 A kind of method and apparatus for connecting ears bluetooth earphone
CN107820155A (en) * 2017-11-08 2018-03-20 深圳市沃特沃德股份有限公司 Control method, device and the wireless headset of wireless headset
CN107708014B (en) * 2017-11-08 2020-07-28 深圳市沃特沃德股份有限公司 Method and device for automatically switching master-slave relation of wireless earphone and wireless earphone

Also Published As

Publication number Publication date
CN108882084A (en) 2018-11-23

Similar Documents

Publication Publication Date Title
US11102697B2 (en) Method for controlling earphone switching and earphone
CN109150221B (en) A wearable device master-slave switching method and related products
CN108966067B (en) Play control method and related product
WO2022033176A1 (en) Audio play control method and apparatus, and electronic device and storage medium
CN108900231B (en) Dynamic antenna adjustment method and related products
CN108882084B (en) Wearable equipment electric quantity balancing method and related product
CN108897516B (en) A kind of wearable device volume adjustment method and related products
CN108834013B (en) Wearable equipment electric quantity balancing method and related product
CN108541080B (en) Method and related products for back-connection between first electronic device and second electronic device
CN108833683B (en) Dynamic antenna adjustment implementation method and related product
CN106331359A (en) A voice signal collection method, device and terminal
CN108769387A (en) Application control method and related equipment
WO2020007174A1 (en) Communication connection establishment method and related device
WO2024021736A1 (en) Transmission method, apparatus, and system for bluetooth multimedia packet, and device
CN108600887B (en) Touch control method based on wireless earphone and related product
CN109121034B (en) Master-slave switching method based on volume and related product
CN110058837B (en) Audio output method and terminal
CN108810261B (en) Antenna switching method in call and related product
CN106126170A (en) A terminal sound effect setting method and terminal
WO2020221043A1 (en) Charge control circuit, terminal device and data line
CN108882085B (en) Wearable equipment electric quantity balancing method and related product
CN111510075B (en) A voltage adjustment method, device and electronic equipment for a power amplifier
CN108923809B (en) A kind of ear canal debris reminder method and related products
CN113411702B (en) Sound channel configuration method and electronic equipment
CN109218922A (en) Control method, terminal and the audio signal output device of output audio signal

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
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: 20200211