State control method and device of earphone device, earphone device and storage medium
By placing an earphone in the earphone case and using the case to control commands, the operation of the wireless earphone device status is simplified, solving the problem of cumbersome interactive operations and improving the user experience.
Patent Information
- Application Number
- CN202111493252.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-08
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2041-12-08
AI Technical Summary
Current wireless earphone devices require cumbersome interactive operations to enter a specified working state during communication, which affects the user experience.
By placing an earphone in the earphone case, the earphone can be controlled to enter a specified working state by sending target commands through the earphone case, including pairing state or single/co-use state, simplifying the operation process.
It simplifies the process of putting the headphone device into a designated working state, improving convenience without affecting normal user operation.
Smart Images

Figure CN116320859B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, specifically to a state control method, apparatus, headphone device, and storage medium for an earphone device. Background Technology
[0002] Currently, headphones have become an indispensable electronic device in users' daily work and life. With the development of electronic technology, headphones have become increasingly sophisticated in function to meet users' needs in different scenarios. Wireless headphones, in particular, are gaining popularity due to their flexibility, convenience, and high sound quality. However, currently, putting wireless headphones into a specific communication state requires cumbersome interactive operations, hindering normal use. Summary of the Invention
[0003] This application discloses a state control method, apparatus, earphone device, and storage medium for an earphone device, which simplifies the way to control the earphone device to enter a specified working state during communication, making operation more convenient, and without affecting the user's normal use of the earphone device.
[0004] This application discloses a state control method for an earphone device, the earphone device including a first earphone, a second earphone, and an earphone case, the method including:
[0005] When only the first earphone is placed in the earphone case, the first earphone receives the target command sent by the earphone case.
[0006] The first earpiece controls the first earpiece and / or the second earpiece to enter the working state specified by the target instruction according to the target instruction;
[0007] The working state includes a pairing state, which refers to the state in which the first earphone and / or the second earphone can be detected by other electronic devices.
[0008] This application discloses a state control method for an earphone device, the earphone device including a first earphone, a second earphone, and an earphone case, the method including:
[0009] When only the first earphone is placed in the earphone case, the first earphone receives the target command sent by the earphone case.
[0010] According to the target instruction, the first earphone controls the first earphone and the second earphone to enter a state of independent use or a state of joint use. The state of independent use refers to the state in which the first earphone and the second earphone are configured with different Bluetooth addresses, and the state of joint use refers to the state in which the first earphone and the second earphone share the same Bluetooth address.
[0011] This application discloses a status control device for an earphone device, the earphone device including a first earphone, a second earphone, and an earphone case, the device comprising:
[0012] The instruction receiving module is used to receive a target instruction sent by the earphone case by the first earphone when only the first earphone is placed in the earphone case.
[0013] A status control module is used to control the first earphone and / or the second earphone to enter the working state specified by the target instruction according to the target instruction;
[0014] The working state includes a pairing state; the pairing state refers to the state in which the first earphone and / or the second earphone can be detected by other electronic devices.
[0015] This application discloses a status control device for an earphone device, the earphone device including a first earphone, a second earphone, and an earphone case, the device comprising:
[0016] The instruction receiving module is used to receive a target instruction sent by the earphone box when the first earphone is placed in the earphone box.
[0017] The status control module is used to control the first earphone and the second earphone to enter a separate use state or a joint use state according to the target instruction. The separate use state refers to the state in which the first earphone and the second earphone are configured with different Bluetooth addresses, and the joint use state refers to the state in which the first earphone and the second earphone share the same Bluetooth address.
[0018] This application discloses an earphone device, including a memory and a processor. The memory stores a computer program, and when the computer program is executed by the processor, the processor causes the processor to implement any of the methods described above.
[0019] This application discloses a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements any of the methods described above.
[0020] This application discloses a method, apparatus, headphone device, and storage medium for controlling the state of a headphone device. The headphone device includes a first earphone, a second earphone, and a charging case. When only the first earphone is placed in the charging case, the first earphone receives a target instruction sent by the charging case. The first earphone then controls the first earphone and / or the second earphone to enter the working state specified by the target instruction. In this application embodiment, the user only needs to place one earphone in the charging case to trigger the first earphone and / or the second earphone to enter the working state specified in the communication. Compared to the traditional method where both earphones need to be placed in the charging case to trigger the headphone device to enter the working state specified in the communication, this method is more convenient, simplifies the way the headphone device is controlled to enter the working state specified in the communication, and does not affect the user's normal use of the headphone device. Attached Figure Description
[0021] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 This is an application scenario diagram of a state control method for an earphone device in one embodiment;
[0023] Figure 2 This is a flowchart of a state control method for an earphone device in one embodiment;
[0024] Figure 3A This is a timing diagram illustrating the control of the first earphone to enter the pairing state in one embodiment;
[0025] Figure 3B This is a timing diagram illustrating how the first earphone controls the second earphone to enter a pairing state in one embodiment.
[0026] Figure 3C This is a timing diagram illustrating the control of the first and second earphones to enter a pairing state together in one embodiment;
[0027] Figure 4 A flowchart illustrating a scenario where the headphone device is attempting to connect in one embodiment;
[0028] Figure 5 This is an interaction timing diagram for a headphone device attempting to connect in one embodiment;
[0029] Figure 6 This is a flowchart illustrating how an earphone device needs to establish Bluetooth connections with two electronic devices simultaneously or continuously in one embodiment.
[0030] Figure 7 This is a timing diagram illustrating the interaction between a headphone device and two electronic devices in one embodiment.
[0031] Figure 8 This is a flowchart illustrating the control of the first and second earphones to enter a shared usage state in one embodiment;
[0032] Figure 9 A flowchart of a state control method for a headphone device in another embodiment;
[0033] Figure 10 This is a block diagram of a state control device for an earphone device in one embodiment;
[0034] Figure 11 This is a block diagram of the state control device for a headphone device in another embodiment;
[0035] Figure 12 This is a structural block diagram of a headphone device in one embodiment. Detailed Implementation
[0036] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0037] It should be noted that the terms "comprising" and "having," and any variations thereof, in the embodiments and accompanying drawings of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the steps or units listed, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices.
[0038] It is understood that the terms "first," "second," etc., used in this application may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish one element from another. For example, without departing from the scope of this application, a first earphone may be referred to as a second earphone, and similarly, a second earphone may be referred to as a first earphone. Both the first and second earphones are earphones, but they are not the same earphone. The term "multiple" as used in this application refers to two or more. The term "and / or" as used in this application refers to one of the embodiments, or any combination of multiple embodiments.
[0039] Currently, users need to go through cumbersome interactive operations to put wireless headphones into a specified working state during communication. For example, when users want to put wireless headphones into pairing mode, they need to put both headphones into the headphone case first, and then press the pairing button on the headphone case to put the wireless headphones into pairing mode. The operation is cumbersome and will affect the normal use of wireless headphones, causing inconvenience to users.
[0040] This application provides a method, apparatus, device, and storage medium for controlling the state of a headphone device, which simplifies the way the headphone device is controlled to enter a specified working state during communication, making the operation more convenient and without affecting the user's normal use of the headphone device.
[0041] Figure 1 This is an application scenario diagram of a state control method for an earphone device in one embodiment. For example... Figure 1 As shown, the headphone device 10 may include earphones 110, earphones 120 and headphone case 130. The headphone device 10 may include, but is not limited to, in-ear headphones, earbuds and other wireless headphones. Furthermore, the headphone device 10 may be a true wireless stereo (TWS) Bluetooth headphone, etc.
[0042] In some embodiments, when the headphone device 10 is in use, the headphones 110 and / or 120 can establish a communication connection with other electronic devices 20 and receive and play audio output transmitted by other electronic devices. These other electronic devices 20 may include, but are not limited to, wearable devices, in-vehicle terminals, mobile phones, tablets, laptop computers (PCs), PDAs (Personal Digital Assistants), and other devices.
[0043] Headphones 110 and 120 support wireless communication. Optionally, the communication connection between headphones 110 and / or 120 and other electronic devices 20 may include, but is not limited to, a Bluetooth connection. This Bluetooth connection may include at least one of the following: a classic Bluetooth connection based on the classic Bluetooth protocol, a BLE connection based on the BLE (Bluetooth Low Energy) protocol, and a LE Audio Bluetooth connection based on the BLE Audio (Bluetooth Low Energy Audio) protocol. Here, the classic Bluetooth protocol generally refers to Bluetooth protocols below version 4.0, while the BLE protocol generally refers to Bluetooth protocols above version 4.0. BLE Audio technology solves the problem that BLE connections can only transmit small amounts of data and cannot transmit audio data. The BLE Audio protocol supports LC3 (Low Complexity Communications Codec) encoded audio data, enabling audio data transmission to better balance power consumption, real-time performance, and sound quality.
[0044] In this embodiment, when a user needs the headphone device 10 to enter a specified working state in communication, such as entering a pairing state in Bluetooth communication, or entering a single-use state or a shared-use state in Bluetooth communication, either the headphone 110 or the headphone 120 can be placed in the headphone case 130 to enable the headphone device 10 to enter the specified working state in communication.
[0045] Taking placing earphone 110 into earphone case 130 as an example, earphone 120 is outside earphone case 130, and the user can perform control operations on earphone case 130. When earphone case 130 detects a control operation, it can send a target command to earphone 110. Earphone 110 can then control earphone 110 and / or earphone 120 to enter the working state specified by the target command. Compared to the traditional method where both earphones need to be placed in earphone case 130 to trigger the control of earphone device 10 to enter the specified working state, this method is simpler, and the user can still use the earphones not placed in earphone case 130 normally, without affecting normal use.
[0046] like Figure 2 As shown, in one embodiment, a state control method for a headphone device is provided, which can be applied to the headphone device described above. The method may include the following steps:
[0047] Step 210: When only the first earphone is placed in the earphone case, the first earphone receives the target instruction sent by the earphone case.
[0048] The first earpiece can be either one of the earpieces in the headset device; for example, it could be either the left or right earpiece. When the user needs to put the headset device into a working state specified in the communication, either earpiece can be placed in the earpiece case, while the other earpiece (i.e., the second earpiece) remains outside the earpiece case.
[0049] After the first earphone is placed in the earphone case, it can transmit signals to the earphone case via ports (such as signal transmission pins) in the earphone case. The user can control the earphone case after placing the first earphone in it. The earphone device can send a target command to the first earphone based on the detected control operation. This target command can be used to instruct the first earphone to control the first earphone and / or the second earphone to enter a specified operating state.
[0050] In this embodiment, the operation method of the control operation on the earphone case is not limited. For example, the earphone case may be provided with an operation button, and the user can trigger the control operation by pressing the operation button; or the earphone case may be provided with a touchpad, and the user can trigger the control operation by performing touch operations on the touchpad (such as clicking, long pressing, sliding, etc.); the earphone case may also be provided with one or more sensors (such as pressure sensors, distance sensors, acceleration sensors, etc.) to detect touch operations (such as detecting pressing operations by pressure sensors, detecting gesture operations by distance sensors, detecting shaking operations by acceleration sensors), etc., but is not limited to these.
[0051] Step 220: The first earpiece controls the first earpiece and / or the second earpiece to enter the working state specified by the target instruction according to the target instruction.
[0052] In one implementation, after receiving a target command from the earphone case, the first earphone can control itself to enter the working state specified by the target command. In another implementation, when a communication connection (such as a classic Bluetooth connection or a BLE connection) is established between the first and second earphones, after receiving the target command from the earphone case, the first earphone can send the target command to the second earphone to control the second earphone to enter the working state specified by the target command; alternatively, the first earphone can send the target command to the second earphone while controlling itself to enter the working state specified by the target command, thereby controlling the second earphone to enter the working state specified by the target command.
[0053] In some embodiments, controlling the operating state of the first and / or second earphones may include a pairing state, which refers to the state in which the first and / or second earphones can be discovered by other electronic devices. When the first and / or second earphones are in a pairing state, they are either in a discoverable state or a discoverable and connectable state. The discoverable state refers to having the inquiry scan mode enabled, while the discoverable and connectable state refers to having both the inquiry scan mode and the page scan mode enabled simultaneously. When the first and / or second earphones are in inquiry scan mode, other electronic devices can scan and search for the earphone device; when the first and / or second earphones are in page scan mode, other electronic devices can establish a Bluetooth connection with the earphone device.
[0054] In one implementation, when a Bluetooth connection is established between the first and second earpieces, they can share the same Bluetooth address (such as a classic Bluetooth address). Therefore, relative to other electronic devices, the first and second earpieces will be considered a single Bluetooth device. When the first earpiece, the second earpiece, or both earpieces are in pairing mode, other electronic devices can activate their Bluetooth scanning function to scan for nearby Bluetooth devices and find the shared Bluetooth address. These other electronic devices can then send a Bluetooth connection request based on the scanned Bluetooth address. The first and / or second earpieces can receive this Bluetooth connection request and establish a Bluetooth connection with the other electronic device accordingly. Since other electronic devices do not store connection records corresponding to the earpiece device (e.g., they have never connected to the earpiece device before, or the connection record was deleted after a previous connection), pairing can be performed during the Bluetooth connection establishment process. Optionally, this pairing may include exchanging pairing codes and agreeing on a key between the two devices to ensure transmission security.
[0055] In some embodiments, when the first and second earpieces can share the same Bluetooth address, a master earpiece and a slave earpiece can be distinguished between them. The master earpiece refers to an earpiece capable of directly establishing a Bluetooth connection with other electronic devices, while the slave earpiece refers to an earpiece that does not directly establish a Bluetooth connection with other electronic devices. The slave earpiece can monitor the Bluetooth connection between the master earpiece and other electronic devices, or the master earpiece can forward data transmitted via Bluetooth with other electronic devices to the slave earpiece, achieving master-slave synchronization.
[0056] Optionally, when the first earphone receives a target command from the earphone case indicating that it is entering pairing mode, if the first earphone is currently the master device, it can control itself to enter pairing mode and establish a Bluetooth connection with other electronic devices. If the first earphone is currently the slave device, it can send the target command to the second earphone, causing the second earphone, which is currently the master device, to enter pairing mode and establish a Bluetooth connection with other electronic devices. Alternatively, if the first earphone is currently the slave device, it can control itself to enter pairing mode, establish a Bluetooth connection with other electronic devices, and then synchronize the connection information corresponding to the other electronic devices to the second earphone, causing the Bluetooth connection target of the other electronic devices to switch from the first earphone to the second earphone. The connection information may include, but is not limited to, frequency hopping information, channel information, and clock information. The first earphone can use different strategies to control the first earphone and / or the second earphone to enter pairing mode according to the current master-slave relationship, ensuring that other electronic devices can correctly scan and establish a Bluetooth connection with the master device, thus ensuring the stability of the Bluetooth connection.
[0057] In another implementation, if a Bluetooth connection is not established between the first and second earpieces, the first earpiece can enter pairing mode, and the first and second earpieces can use different Bluetooth addresses. Other electronic devices can scan the current Bluetooth address of the first earpiece and send a Bluetooth connection request to the first earpiece based on the scanned Bluetooth address to establish a Bluetooth connection. Pairing is also required during the process of establishing a Bluetooth connection with the first earpiece.
[0058] It should be noted that the establishment of Bluetooth connection involved in the above embodiments can be understood as including the establishment of physical links such as ACL (Asynchronous Connectionless) and / or SCO (Synchronous ConnectionOriented), or the establishment of transmission links for upper-layer protocol connections, such as A2DP (Advanced Audio Distribution Profile) and HFP (Hands-free Profile). There are no restrictions on this, and the specific details should be based on business requirements or refer to the relevant Bluetooth protocol provisions.
[0059] For example, Figure 3A This is a timing diagram illustrating the control of the first earphone to enter pairing mode in one embodiment. Figure 3AAs shown, earphone A is placed in the earphone case. Based on detected control operations, the earphone case sends a target command to earphone A to indicate that it is entering pairing mode. Earphone A enters pairing mode according to this target command (e.g., simultaneously activating inquiry scan mode and page scan mode). Electronic device C can send a scan request to earphone A in pairing mode, and earphone A can return a scan response to electronic device C based on this scan request. After receiving the scan response, electronic device C can send a Bluetooth connection request to earphone A and establish a Bluetooth connection with earphone A.
[0060] For example, Figure 3B This is a timing diagram illustrating how the first earphone controls the second earphone to enter a pairing state in one embodiment. Figure 3B As shown, a Bluetooth connection can be established between earphones A and B. Earphone A is placed in the charging case. Based on detected control operations, the charging case sends a target command to earphone A, indicating that it needs to enter pairing mode. Earphone A can forward this target command to earphone B, which then enters pairing mode (e.g., simultaneously activating inquiry scan mode and page scan mode). Electronic device C can send a scan request to earphone B in pairing mode, and earphone B can return a scan response to electronic device C. Upon receiving the scan response, electronic device C can send a Bluetooth connection request to earphone B and establish a Bluetooth connection with it.
[0061] For example, Figure 3C This is a timing diagram illustrating how, in one embodiment, the first and second earphones are controlled to enter a pairing state together. Figure 3C As shown, a Bluetooth connection can be established between earphones A and B. Earphone A is placed in the charging case. Based on detected control operations, the charging case sends a target command to earphone A, indicating that it needs to enter pairing mode. Earphone A enters pairing mode according to the target command and forwards the command to earphone B, which then enters pairing mode. Electronic device C can send a scan request. Earphones A and / or B, in pairing mode, can receive the scan request and return a scan response to electronic device C. After receiving the scan response, electronic device C can send a Bluetooth connection request. Earphones A and / or B can then establish a Bluetooth connection with electronic device C based on the received Bluetooth connection request.
[0062] In this embodiment, when only the first earphone is placed in the earphone case, the first earphone receives the target instruction sent by the earphone case, and controls the first earphone and / or the second earphone to enter the working state specified by the target instruction. In this embodiment, the user only needs to place one earphone in the earphone case to trigger the first earphone and / or the second earphone in the earphone device to enter the working state specified in the communication. Compared with the traditional method that requires both earphones to be placed in the earphone case to trigger the earphone device to enter the working state specified in the communication, the operation is more convenient and simplifies the way to control the earphone device to enter the working state specified in the communication, without affecting the user's normal use of the earphone device.
[0063] In some embodiments, when only the first earphone is placed in the earphone case, the step of the first earphone receiving the target instruction sent by the earphone case may include: when only the first earphone is placed in the earphone case, if the earphone case detects a control operation, the earphone case sends a target instruction corresponding to the operation information to the first earphone according to the operation information of the control operation, so that the first earphone receives the target instruction.
[0064] When the earphone case detects a control operation, it can acquire the operation information of that operation and generate a target instruction corresponding to the operation information. The operation information includes one or more of the following: operation duration, operation component identifier, operation direction, and operation force. The types of operation information may differ depending on the control operation method. For example, if the control operation is pressing an operation button, the operation information may include at least one of the following: operation component identifier (used to identify the pressed operation button), operation duration, etc. Similarly, if the control operation is a touch operation on the touchpad, the operation information may include at least one of the following: operation duration, operation direction, and operation force, etc., but is not limited to these and can be set according to actual needs.
[0065] After acquiring the operation information of the control operation, the earphone case can determine whether the control operation is for entering the pairing state. It can also determine whether the operation information meets a first operation condition, where the first operation condition corresponds to the pairing state. If the earphone case determines that the operation information meets the first operation condition, it indicates that the detected control operation is for entering the pairing state, and can then send a first control command to the first earphone. This first control command instructs the earphone to enter the pairing state. The first earphone can then control the first earphone and / or the second earphone to enter the pairing state according to the first control command.
[0066] In some embodiments, if multiple different operating states are included, the earphone case can generate different target instructions for each operating state, and each operating state can correspond one-to-one with the operating conditions. As one implementation, the operating states may include not only pairing states, but also individual use states and / or shared use states. Individual use states refer to the state where the first and second earphones are configured with different Bluetooth addresses (e.g., the first earphone's Bluetooth address is address X, and the second earphone's Bluetooth address is address Y). Shared use states refer to the state where the first and second earphones share the same Bluetooth address (e.g., both the first and second earphones have Bluetooth address X). In individual use states, because the first and second earphones have different Bluetooth addresses, they can be recognized as different Bluetooth devices by external electronic devices, and therefore can establish Bluetooth connections with the same or different electronic devices respectively. The first and second earphones can be asynchronous.
[0067] The standalone use state corresponds to the second operation condition, and the combined use state corresponds to the third operation condition. The second operation condition may be different from the first operation condition, and the third operation condition may also be different from the first operation condition. The second operation condition and the third operation condition may be the same or different.
[0068] In one implementation, after acquiring the operation information for the control operation, if the earphone case determines that the operation information meets the second operation condition, it can send a second control command to the first earphone. This second control command instructs both the first and second earphones to enter a separate usage state. If the first earphone receives the second control command, it controls the first and / or second earphones to change their configured Bluetooth addresses, thereby switching them from a shared usage state to a separate usage state.
[0069] In one implementation, after acquiring the operation information for the control operation, if the earphone case determines that the operation information meets a third operation condition, it can send a third control command to the first earphone. This third control command instructs the first and second earphones to enter a shared usage state. If the first earphone receives the third control command, it controls the first and / or second earphones to change their configured Bluetooth addresses, thereby switching the first and second earphones from a separate usage state to a shared usage state.
[0070] If the second and third operating conditions differ, and the headphone case detects that the control operation information meets the second operating condition, it can be determined that the detected control operation is an operation to control entry into a single-use state. A second control command can then be sent to the first earphone, which controls both the first and second earphones to switch to a single-use state. If the headphone case detects that the control operation information meets the third operating condition, it can be determined that the detected control operation is an operation to control entry into a shared-use state. A third control command can then be sent to the first earphone, which controls both the first and second earphones to switch to a shared-use state.
[0071] If the second and third operating conditions are the same, and if the earphone box detects that the control operation information meets the second operating condition (i.e., the third operating condition), it can send a second control command (i.e., the third control command; both can be the same control command) to the first earphone. Upon receiving the second control command, the first earphone switches to a separate use state if its current state is one of shared use, and switches to a shared use state if its current state is one of separate use. Using the same control operation allows for convenient switching between separate and shared use states for both the first and second earphones.
[0072] In one specific implementation, switching from a shared usage state to a separate usage state for the first and second earphones can be achieved by changing the Bluetooth address of the first earphone to a different Bluetooth address than that of the second earphone. For example, in the shared usage state, if both the first and second earphones use Bluetooth address X, the first earphone can change its Bluetooth address to address Y.
[0073] Switching from shared use to independent use of the first and second earpieces can also be achieved by the second earpiece changing its Bluetooth address to a different address than the first earpiece. The first earpiece can send an address change command to the second earpiece via Bluetooth, and the second earpiece can then change its Bluetooth address accordingly. For example, in shared use, if both the first and second earpieces use Bluetooth address X, the second earpiece can change its Bluetooth address to address Y.
[0074] It should be noted that switching from shared use to independent use of the first and second earphones can also be achieved by simultaneously changing the Bluetooth addresses of both earphones to different Bluetooth addresses. For example, in shared use, if both earphones have Bluetooth address X, the first earphone can change its Bluetooth address to Y, and the second earphone can change its Bluetooth address to Z, etc., but this is not the only possible approach.
[0075] After the first and second earphones are configured with different Bluetooth addresses, the Bluetooth connection between the first and second earphones can be disconnected. Then, the first and second earphones can establish Bluetooth connections with different electronic devices respectively. For example, the first earphone establishes a Bluetooth connection with device A, and the second earphone establishes a Bluetooth connection with device B, etc.
[0076] In one specific implementation, switching from a standalone use mode to a shared use mode for the first and second earphones can be achieved by changing the Bluetooth address of the first earphone to the same Bluetooth address as the second earphone. For example, in standalone use mode, if the Bluetooth address of the first earphone is address Y and the Bluetooth address of the second earphone is address X, then the first earphone can change its Bluetooth address to address X.
[0077] Switching from standalone to shared use for the first and second earphones can also be achieved by the second earphone changing its Bluetooth address to the same address as the first earphone. The first earphone can first establish a Bluetooth connection with the second earphone, and then send an address change command to the second earphone through this connection. The second earphone can then change its Bluetooth address to the same address as the first earphone based on this command. For example, in standalone use, if the first earphone's Bluetooth address is address Y and the second earphone's Bluetooth address is address X, the first earphone can change its Bluetooth address to address Y.
[0078] It should be noted that it is also possible to change the Bluetooth address of both the first and second earphones simultaneously, so that the first and second earphones are configured with the same Bluetooth address; this is not a limitation here.
[0079] In some embodiments, in order not to affect the user's normal use of the headphone device, when the second earphone establishes a Bluetooth connection with an external electronic device, the first earphone changes the Bluetooth address while the second earphone does not change the Bluetooth address. This avoids the situation where the connection with the external electronic device is disconnected due to the change of the Bluetooth address of the second earphone, and does not affect the user's normal use of the headphone device.
[0080] In this embodiment, the user only needs to place one earphone from the headphone device into the headphone case and perform corresponding control operations on the headphone case to trigger the first earphone and / or the second earphone in the headphone device to enter the working state specified in the communication. This simplifies the way to control the headphone device to enter the working state specified in the communication, making the control more flexible and convenient, and will not affect the user's normal use of the headphone device.
[0081] like Figure 4 As shown, in one embodiment, the working state may be a pairing state. After controlling the first earphone and / or the second earphone to enter the pairing state, the method may further include the following steps:
[0082] Step 402: When the first earphone and / or the second earphone are in a paired state, the first earphone and / or the second earphone receive a scan request sent by the first electronic device and send a scan response to the first electronic device according to the scan request.
[0083] Step 404: When the headset device establishes Bluetooth connections with N second electronic devices, the first headset and / or the second headset receives a first connection request sent by the first electronic device. Here, N is the maximum number of Bluetooth connections the headset device can simultaneously establish, and N is an integer greater than or equal to 1.
[0084] In one specific implementation, the first and / or second earphones in a paired state can simultaneously enable both inquiry scan mode and page scan mode, and the first and second earphones can share the same Bluetooth address. When inquiry scan mode is enabled, the first and / or second earphones can receive a scan request from a first electronic device and send a scan response to the first electronic device based on the scan request. The first electronic device can obtain the shared Bluetooth address (i.e., the Bluetooth address of the earphone device) between the first and second earphones based on the scan response and send a first connection request based on that Bluetooth address.
[0085] The first connection request may be a paging data packet. The first electronic device may send the paging data packet using frequency hopping to page the headset device. The first headset and / or the second headset, which has page scan mode enabled, may scan externally sent paging data packets at fixed intervals. If a paging data packet sent by the first electronic device is detected, the first connection request is received.
[0086] If, when the first earphone and / or the second earphone receives the first connection request sent by the first electronic device, the number of second electronic devices currently maintaining a Bluetooth connection with the earphone device is less than N, indicating that the maximum number of simultaneous Bluetooth connections that the earphone device can support has not yet been reached, then the first earphone and / or the second earphone can respond to the first connection request and establish a Bluetooth connection with the first electronic device.
[0087] If, when the first earphone and / or the second earphone receives the first connection request sent by the first electronic device, the earphone device establishes Bluetooth connections with N second electronic devices, that is, the earphone device currently maintains Bluetooth connections with N second electronic devices simultaneously, and the maximum number of Bluetooth connections that the earphone device can maintain at the same time is reached, if the first earphone and / or the second earphone receives the first connection request sent by the first electronic device, it needs to disconnect the Bluetooth connection with one of the second electronic devices before the first electronic device can successfully establish a Bluetooth connection with the earphone device. This is equivalent to the first electronic device preempting the Bluetooth connection between that one of the second electronic devices and the earphone device.
[0088] Step 406: Disconnect from the target electronic device among the N second electronic devices using the second headset, and process the first connection request using the first headset to establish a Bluetooth connection with the first electronic device; or, disconnect from the target electronic device among the N second electronic devices using the first headset, and process the first connection request using the second headset to establish a Bluetooth connection with the first electronic device.
[0089] When the headphone device is in a connection-contending scenario, it needs to disconnect the Bluetooth connection with a connected second electronic device. In this embodiment, one of the headphones can perform the disconnection process. This disconnection process can be used to disconnect the Bluetooth connection between the headphone device and the target electronic device among N second electronic devices, and the other headphone can handle the first connection request. The two headphones can perform disconnection and connection operations in parallel.
[0090] Before disconnecting from either the first or second earpiece, a target electronic device can be determined from among N second electronic devices. As one implementation, the target electronic device can be any one of the N second electronic devices, and can be randomly selected from the N second electronic devices.
[0091] As another implementation, the first or second earpiece can select a second electronic device that meets the priority condition from N second electronic devices as the target electronic device based on the priority of each second electronic device.
[0092] The priority of each second electronic device can be obtained. Optionally, the priority of each second electronic device can be determined based on the device status parameters of each second electronic device. Device status parameters may include, but are not limited to, one or more of the following: service data output parameters, sequence parameters used to characterize the order in which Bluetooth connections are established with the headset device, device type parameters, device remaining battery parameters, and historical connection frequencies.
[0093] The service data output parameter can be used to characterize whether the second electronic device is currently outputting service data to the headset device via Bluetooth connection. The priority of the second electronic device currently outputting service data to the headset device can be higher than that of the second electronic device not currently outputting service data to the headset device.
[0094] Sequence parameters can be used to characterize the order in which Bluetooth connections are established with the headset device. In one implementation, the first and second headsets can store the connection times of the most recent Bluetooth connections established between each second electronic device and the headset device. The connection duration of each second electronic device is determined based on its connection time; this duration is the time from the initial connection to the current time. The sequence parameters of each second electronic device can be determined based on its connection duration. The longer the connection duration, the earlier the sequence parameter indicates its position in the order, meaning the second electronic device established a Bluetooth connection with the headset device earlier.
[0095] As another implementation, a connection queue can be established. The device information of each second electronic device can be stored in the connection queue according to the order in which they establish Bluetooth connections with the headset device. The second electronic device ranked earlier in the connection queue indicates that it established a Bluetooth connection with the headset device earlier. Optionally, the second electronic device that establishes a Bluetooth connection with the headset device earlier can have a lower priority.
[0096] The device type parameter can be used to characterize the device type of the second electronic device. This device type may include, but is not limited to, mobile phones, smartwatches, wristbands, smart home devices, etc. The priority of each device type can be preset, and the device type of each second electronic device can be determined based on its device type parameter, and the priority corresponding to that device type can be obtained.
[0097] The remaining power parameter of a device can be used to characterize the current remaining power of a second electronic device. The priority of a second electronic device with a larger remaining power is higher than that of a second electronic device with a smaller remaining power.
[0098] Historical connection frequency can be used to characterize the historical connection status between the second electronic device and the headset device. This historical connection frequency can be the connection frequency over a past period (e.g., the past week, the past month, etc.). Both the first and second headsets can store connection status data for each connected electronic device and the headset device. This connection status data can include device information, connection time, and connection duration for each connected electronic device. The first headset can use the stored connection status data to calculate the historical connection frequency of the N second electronic devices currently connected to the headset device over a past period. Second electronic devices with higher historical connection frequencies may have a higher priority than those with lower historical connection frequencies.
[0099] The priority of each second electronic device can be determined based on one or more device status parameters. If the priority of each second electronic device is determined based on multiple device status parameters, weights can be assigned to each device status parameter separately. Taking device A as an example, device A can be any second electronic device. First, a baseline priority corresponding to each device status parameter can be determined based on the various device status parameters of device A. For example, if the service data output parameter of device A is 1, indicating that the current headphone device is outputting service data, then the baseline priority corresponding to the service data output parameter can be 4; if the device remaining battery parameter of device A indicates that the current remaining battery of device A is greater than 50%, then the baseline priority corresponding to the remaining battery can be 2, and so on. Then, based on the baseline priorities corresponding to the various device status parameters of device A, and the assigned weights of each device status parameter, a weighted sum or weighted average calculation can be performed to obtain the priority corresponding to device A.
[0100] It should be noted that the methods for determining the priority of each secondary electronic device are not limited to the above-mentioned methods. For example, priority rules can also be set directly, such as the secondary electronic device currently outputting service data to the headphone device having the highest priority, and the secondary electronic device with the lowest remaining battery power among those not currently outputting service data to the headphone device having the lowest priority. Based on the priority rules and the device status parameters of each secondary electronic device, the priority of each secondary electronic device can be determined.
[0101] The target electronic device can be selected from N second electronic devices that meet the priority criteria. Optionally, the priority criteria may include any one of the following: priority below a priority threshold, lowest priority, etc. Further, the second electronic device with the lowest priority can be directly selected as the target electronic device, or a second electronic device with a priority below the priority threshold can be selected first. If multiple second electronic devices have priorities below the priority threshold, one can be randomly selected as the target electronic device, or the second electronic device with the lowest priority can be selected. Determining the target electronic device based on the priority of each second electronic device makes the target electronic device after Bluetooth connection disconnection more closely match user needs and reduces the adverse effects of Bluetooth connection disconnection on normal user operation.
[0102] It should be noted that the priorities of each secondary electronic device can change continuously depending on the specific circumstances, and are not necessarily fixed. Understandably, if the priority of a secondary electronic device changes before the headset receives the first connection request, the target electronic device will be selected according to the latest priority of all secondary electronic devices when a Bluetooth connection request is received.
[0103] For example, if the first earphone enters pairing mode and receives a first connection request from a first electronic device, if none of the second electronic devices are transmitting service data to the earphone, the first connected second electronic device (A) can be disconnected first, according to their Bluetooth connection order. However, if the first earphone enters pairing mode and second electronic device A transmits service data (such as voice or audio data) to the first electronic device before receiving the first connection request, then the priority of second electronic device A changes. In this case, if the first earphone receives the first connection request, it will not disconnect from second electronic device A; the specific second electronic device to disconnect is determined by the set priority rules. Therefore, by not disconnecting upon entering pairing mode but only after receiving the first connection request, the earphone largely ensures user access to the earphone.
[0104] After identifying the target electronic device, the first or second earphone can send a disconnect command to the target electronic device to break the Bluetooth connection with the target electronic device.
[0105] Optionally, since the first earphone is placed in the earphone case, the second earphone is currently the master earphone of the headphone device, and the first earphone can currently be the slave earphone. The second earphone can establish Bluetooth connections with N second electronic devices respectively. In one implementation, if the second earphone receives data from any second electronic device, it sends the data back to the first earphone via its Bluetooth connection, achieving master-slave synchronization. In another implementation, the second earphone can synchronize the connection information of each second electronic device to the first earphone via its Bluetooth connection, allowing the first earphone to monitor the Bluetooth connections between the second earphone and the N second electronic devices based on the connection information, thus achieving master-slave synchronization.
[0106] When the headset is in a connection-preemptive scenario, the second headset can directly disconnect from the target electronic device and send a disconnect command to the target electronic device. The first headset can establish a Bluetooth connection with the first electronic device based on the first connection request sent by the first electronic device. In some embodiments, after the first headset establishes a Bluetooth connection with the first electronic device, it can synchronize the connection information of the first electronic device to the second headset. This connection information may include, but is not limited to, frequency hopping information, channel information, clock information, etc. After the first headset synchronizes the connection information of the first electronic device to the second headset, the Bluetooth connection target of the first electronic device switches from the first headset to the second headset, and the first headset monitors the Bluetooth connection between the second headset and the first electronic device; or, after the first headset synchronizes the connection information of the first electronic device to the first headset, the Bluetooth connection target of the first electronic device switches from the first headset to the second headset, and the second headset synchronizes the data transmitted between itself and the first electronic device to the first headset.
[0107] After acquiring the connection information, the second earpiece can directly transmit data with the first electronic device. The physical link between the first earpiece and the first electronic device transitions to the physical link between the second earpiece and the first electronic device, and the Bluetooth connection target of the first electronic device switches from the first earpiece to the second earpiece. The first earpiece can monitor the physical link between the second earpiece and the first electronic device, or the second earpiece can forward data transmitted with the first electronic device back to the first earpiece, achieving master-slave synchronization. Through information synchronization between earpieces, all electronic devices that establish a Bluetooth connection with the earpiece device can use the method of connecting with the master earpiece and monitoring or receiving data forwarded by the master earpiece, making it easier to manage and transmit data between connected electronic devices.
[0108] In some embodiments, after the second earpiece completes the disconnection process, the second earpiece may synchronize disconnection information to the first earpiece. The disconnection information may include at least the device information of the target electronic device whose Bluetooth connection has been disconnected, and the first earpiece may no longer monitor the Bluetooth connection between the target electronic device and the second earpiece.
[0109] For example, Figure 5 This is a timing diagram of the interaction in a scenario where the headphone device attempts to connect, as shown in one embodiment. Figure 5As shown, the headphone device can be a Bluetooth "one-to-two" device, capable of establishing Bluetooth connections with both electronic device A and electronic device B. Electronic device C can be a device that does not store device information corresponding to the headphone device. The headphone device can enter pairing mode (the first and / or second earphone enter pairing mode, i.e., simultaneously enabling inquiry scan and page scan modes), and maintain Bluetooth connections with both electronic devices A and B while in pairing mode. Electronic device C can send a scan request, and the first and / or second earphone, upon receiving the scan request, can send a scan response to electronic device C. When electronic device C determines that it needs to establish a Bluetooth connection with the headphone device, it can send a Bluetooth connection request to the headphone device. After receiving the Bluetooth connection request from electronic device C, the second earphone can connect to the target electronic device (e.g., ...). Figure 5 Regarding the disconnection handling for electronic device B), the first earpiece can handle the Bluetooth connection request and establish a Bluetooth connection with electronic device C, pairing with electronic device C during the connection process. After the second earpiece disconnects from the target electronic device, it can synchronize the disconnection information to the first earpiece. Conversely, after the first earpiece successfully establishes a Bluetooth connection with electronic device C, it can synchronize the connection information to the second earpiece, thus switching the Bluetooth connection target of electronic device C from the first earpiece to the second earpiece.
[0110] Optionally, in a connection-preemptive scenario, the first earphone (i.e., the slave earphone) can also handle the disconnection from the target electronic device. In such a scenario, the first earphone can monitor the Bluetooth connection between the second earphone and the target electronic device and send a disconnection request to the target electronic device on the transmission channel between the second earphone and the target electronic device. This disconnection request can trigger the Bluetooth connection between the target electronic device and the second earphone to be disconnected. The second earphone can process the first connection request sent by the first electronic device and establish a Bluetooth connection with it.
[0111] It should be noted that if only the first earphone or only the second earphone has page scan mode enabled, the earphone with page scan mode enabled can process the first connection request upon receiving it, and the earphone without page scan mode enabled can disconnect the connection.
[0112] In this embodiment, when a first electronic device preempts the Bluetooth connection of the headset device, the disconnection and connection operations are performed in parallel by the first and second earphones, which can improve the connection acquisition speed and efficiency of the first electronic device. Furthermore, after the disconnection and connection operations are completed, the first and second earphones synchronize information, which facilitates the management of all established Bluetooth connections and ensures data transmission efficiency.
[0113] like Figure 6 As shown, in one embodiment, the working state may be a pairing state. After controlling the first earphone and / or the second earphone to enter the pairing state, the method may further include the following steps:
[0114] Step 602: When the first earphone and / or the second earphone are in a paired state, the first earphone and / or the second earphone receive a scan request sent by the first electronic device and send a scan response to the first electronic device according to the scan request; and the first earphone and / or the second earphone receive a scan request sent by the third electronic device and send a scan response to the third electronic device according to the scan request.
[0115] The description of the first and / or second earpieces receiving a scan request from a third electronic device and sending a scan response to the third electronic device according to the scan request is similar to the method of the first and / or second earpieces receiving a scan request from a first electronic device and sending a scan response to the first electronic device according to the scan request. Please refer to the relevant descriptions in the above embodiments, and they will not be repeated here.
[0116] Step 604: If a first connection request sent by a first electronic device and a second connection request sent by a third electronic device are received within the first time period, the first connection request is processed through the first headset to establish a Bluetooth connection with the first electronic device, and the second connection request is processed through the second headset to establish a Bluetooth connection with the third electronic device.
[0117] The headphone device can be a device that supports Bluetooth "one-to-many" functionality, meaning the maximum number of Bluetooth connections N that the headphone device can simultaneously establish is greater than or equal to 2. After the headphone device enters pairing mode, both the first and second headphones can enable page scan mode and receive Bluetooth connection requests from other electronic devices. If a first connection request from the first electronic device and a second connection request from the third electronic device are received within a first time period, it indicates that the headphone device needs to establish Bluetooth connections with the first and third electronic devices simultaneously or consecutively. There is a high probability that the headphone device will receive another Bluetooth connection request before completing the processing of one. Therefore, the first headphone can establish a Bluetooth connection with the first electronic device, while the second headphone can establish a Bluetooth connection with the second electronic device in parallel. The first and second headphones can perform connection operations in parallel, establishing Bluetooth connections with the first and second electronic devices respectively. This transforms the serial connection establishment process into a parallel connection establishment process, reducing connection waiting time.
[0118] The first time period can be set according to actual needs, such as 1 second, 2 seconds, etc. The first time period can also be set based on the speed at which the headphone device establishes a Bluetooth connection; the faster the headphone device establishes a Bluetooth connection, the shorter the first time period can be, and the slower the headphone device establishes a Bluetooth connection, the longer the first time period can be. Furthermore, the first time period can be the duration for the headphone device to normally establish a Bluetooth connection with other electronic devices.
[0119] In some embodiments, a Bluetooth connection can be established between the first earpiece and the second earpiece. After the first earpiece establishes a Bluetooth connection with the first electronic device, the connection information of the first electronic device can be synchronized from the first earpiece to the second earpiece. Similarly, after the second earpiece establishes a Bluetooth connection with a third electronic device, the connection information of the third electronic device can be synchronized from the second earpiece to the first earpiece. This achieves information synchronization between the first and second earpieces.
[0120] In some embodiments, the second earpiece can be the master earpiece in the headphone device, and the first earpiece can be the slave earpiece in the headphone device. After the first earpiece synchronizes the connection information of the first electronic device to the second earpiece, the Bluetooth connection target of the first electronic device can be switched from the first earpiece to the second earpiece, and the first earpiece monitors the Bluetooth connection between the second earpiece and the first electronic device; or, after the first earpiece synchronizes the connection information of the first electronic device to the second earpiece, the Bluetooth connection target of the first electronic device can be switched from the first earpiece to the second earpiece, and the second earpiece synchronizes the data transmitted between itself and the first electronic device to the first earpiece.
[0121] After obtaining the connection information synchronized from the first earpiece, the second earpiece can directly transmit data with the first electronic device based on this connection information. The physical link between the first earpiece and the first electronic device transitions to the physical link between the second earpiece and the first electronic device, and the Bluetooth connection target of the first electronic device switches from the first earpiece to the second earpiece. The first earpiece can monitor the Bluetooth physical link between the second earpiece and the first electronic device, or the second earpiece can forward the data transmitted with the first electronic device to the first earpiece, thus achieving master-slave synchronization.
[0122] After the second earpiece establishes a Bluetooth connection with the third electronic device, it can also synchronize the connection information of the third electronic device to the first earpiece. The first earpiece can then monitor the established Bluetooth connection between the second earpiece and the third electronic device based on this connection information. This information synchronization between earpieces ensures that all electronic devices connected to the earpieces use a master earpiece connection method, listening to or receiving data forwarded by the master earpiece, making it easier to manage and transmit data between connected electronic devices.
[0123] For example, Figure 7 This is a timing diagram illustrating the interaction between a headphone device and two electronic devices in one embodiment. For example... Figure 7 As shown, the headphone device can be a Bluetooth "one-to-two" device, entering pairing mode when not connected to any other electronic device. Neither electronic device D nor electronic device E stores device information corresponding to the headphone device. When the headphone device enters pairing mode (the first and / or second headphone enters pairing mode, simultaneously in inquiry scan and pagescan modes), electronic devices D and E can scan for the headphone device and send Bluetooth connection requests. Within a first time period, the headphone device receives Bluetooth connection requests from electronic devices E and F. The first headphone can process the Bluetooth connection request from electronic device D and establish a Bluetooth connection with it, pairing during the connection process. The second headphone can process the Bluetooth connection request from electronic device E and establish a Bluetooth connection with it, pairing during the connection process. After the first headphone successfully establishes a Bluetooth connection with electronic device D, it can synchronize the connection information of electronic device D to the second headphone, switching the Bluetooth connection target of electronic device D from the first headphone to the second headphone. After the second headphone successfully establishes a Bluetooth connection with electronic device E, it can synchronize the connection information of electronic device E to the first headphone.
[0124] In some embodiments, if the headset device receives a first connection request from a first electronic device first, the first headset can process the first connection request. When responding to the first connection request, the first headset can send a first message to the second headset, which notifies the second headset that it is processing the Bluetooth connection request. After the first headset completes processing the first connection request and successfully establishes a Bluetooth connection with the first electronic device, it can send a second message to the second headset, which notifies the second headset that the first headset has completed processing the Bluetooth connection request. If the second headset receives the first message but has not yet received the second message, it indicates that the first headset is still processing the first connection request from the first electronic device. If, during this process, it receives a second connection request from a third electronic device, the second headset can process the second connection request from the third electronic device and establish a Bluetooth connection with it. This can improve the connection speed between the headset device and two electronic devices.
[0125] In some embodiments, the second earphone (i.e., the main earphone) may first process the first connection request sent by the first electronic device that the earphone device receives first, and then the first earphone (i.e., the slave earphone) may process the second connection request sent by the third electronic device that the earphone device receives later. This application embodiment does not limit this.
[0126] In some embodiments, if the headset device has already established Bluetooth connections with M second electronic devices before receiving the first connection request from the first electronic device and the second connection request from the second electronic device, and if M is an integer greater than or equal to 0 and less than or equal to N-2, then the headset device can also establish Bluetooth connections with NM electronic devices, where NM is greater than or equal to 2. Therefore, after receiving the first connection request from the first electronic device and the second connection request from the second electronic device, the headset device can establish Bluetooth connections with the first electronic device and the third electronic device, respectively.
[0127] In some embodiments, when the number of second electronic devices establishing Bluetooth connections with the headset device reaches N-1, if a first connection request from a first electronic device and a second connection request from a third electronic device are received within a first time period, the target electronic device among the second electronic devices can be disconnected first, and then Bluetooth connections can be established with the first and second electronic devices respectively. Alternatively, a Bluetooth connection can be established with the electronic device that first receives the Bluetooth connection request (such as the first electronic device), then the target electronic device among the second electronic devices can be disconnected, and a Bluetooth connection can be established with another electronic device (such as the third electronic device). Specific disconnection methods and Bluetooth connection processes can be found in the relevant descriptions and Bluetooth standard protocols in the above embodiments, and will not be repeated here.
[0128] In this embodiment, the first and second earpieces of the headset device can establish Bluetooth connections with the first and third electronic devices respectively. The first and second earpieces connect in parallel, eliminating the need to wait for the headset device to complete its Bluetooth connection with one electronic device before establishing a connection with the other. This improves the speed and efficiency of establishing Bluetooth connections between the headset device and the two electronic devices. Furthermore, the first and second earpieces synchronize information, allowing the first electronic device to switch its Bluetooth connection target from the first earpiece to the second earpiece. This facilitates the management of all established Bluetooth connections and ensures efficient data transmission.
[0129] It should be noted that the first electronic device and the third electronic device mentioned above can also be electronic devices that have been paired with the first electronic device (i.e., storing device information). If there is no conflict, the Bluetooth connection establishment method described in the above embodiments can also be used to establish a Bluetooth connection with the headphone device.
[0130] Optionally, the Bluetooth connection in this application embodiment may include either a classic Bluetooth connection or a Bluetooth Low Energy (BLE) connection. In a BLE connection scenario, the headphone device (first earphone and / or second earphone) can send a BLE broadcast, which other electronic devices can scan and obtain to establish a BLE Bluetooth connection with the headphone device.
[0131] like Figure 8 As shown, in one embodiment, the working state includes a shared use state. The steps of controlling the first and second earpieces to enter the working state specified by the target instruction may include: when the first earpiece and the second earpiece have not established a Bluetooth connection, and the second earpiece has established a Bluetooth connection with the fourth electronic device, the first earpiece sends a broadcast signal. The broadcast signal is used to trigger the fourth electronic device that receives the broadcast signal to send a connection instruction to the second earpiece, so that the second earpiece establishes a Bluetooth connection with the first earpiece according to the connection instruction and shares the same Bluetooth address with the first earpiece.
[0132] In this embodiment, the headphone device supports two usage modes: individual use of the first and second earphones (i.e., single-use mode) and joint use of the first and second earphones (i.e., joint-use mode). In single-use mode, the first and second earphones are configured with different Bluetooth addresses. In joint-use mode, the first and second earphones are configured with the same Bluetooth address. Users can switch between single-use and joint-use modes according to their needs. This can be achieved by placing the first earphone in the charging case and triggering the corresponding control operation.
[0133] If the second earpiece establishes a Bluetooth connection with the fourth electronic device, but the first earpiece does not establish a Bluetooth connection with the second earpiece, then the second earpiece and the fourth electronic device are not connected via Bluetooth, indicating that the first and second earpieces are currently in independent use. The first earpiece may respond to a target command sent by the earphone case (such as the third control command mentioned above) by sending a broadcast signal, causing the fourth electronic device receiving the broadcast signal to send a connection command to the second earpiece based on the broadcast signal. This connection command can be used to instruct the second earpiece to establish a Bluetooth connection with the first earpiece.
[0134] Optionally, the broadcast signal may include a BLE broadcast signal. When the first earphone receives a target instruction (such as the third control instruction mentioned above) sent by the earphone box, it may send a BLE broadcast signal on the broadcast channel based on the BLE Bluetooth protocol. In some embodiments, the Bluetooth module of the fourth electronic device may be in a scanning state, listening to various broadcast channels, and when it detects a BLE broadcast signal sent by the first earphone, it sends a connection instruction to the second earphone through the Bluetooth connection with the second earphone.
[0135] In some embodiments, the broadcast signal described above includes first specific information. Optionally, the broadcast signal is used to trigger a fourth electronic device receiving the broadcast signal to send a connection command to the second earpiece when it determines that the first specific information is the same as the second specific information, so that the second earpiece establishes a Bluetooth connection with the first earpiece according to the connection command and shares the same Bluetooth address; wherein, the second specific information is sent by the second earpiece to the fourth electronic device; or,
[0136] The broadcast signal is used to trigger the fourth electronic device that receives the broadcast signal to send the first specific information and connection instructions to the second earpiece, so that when the second earpiece determines that the first specific information is the same as the second specific information stored in the second earpiece, it establishes a Bluetooth connection with the first earpiece according to the connection instructions and shares the same Bluetooth address with the first earpiece.
[0137] The first and second earpieces belonging to the same headphone device can pre-agree on specific information and store this agreed-upon information separately. The specific information stored in the first and second earpieces is identical. Further, this specific information can be a string composed of one or more of numbers, letters, symbols, etc., which identifies the first and second earpieces as matching earpieces belonging to the same headphone device. Optionally, this specific information can be fixed specific information set by the headphone device before leaving the factory, and the specific information is different for each headphone device. Alternatively, this specific information can be generated and stored in the first and second earpieces each time the headphone device switches to a state where each earpiece is used individually; the specific information generated by the headphone device may be different each time.
[0138] In some embodiments, after the second earpiece establishes a Bluetooth connection with the fourth electronic device, the second earpiece can send stored second specific information to the fourth electronic device. Upon receiving a target instruction (such as the third control instruction described above), the first earpiece can retrieve the stored first specific information and generate a broadcast signal carrying that first specific information for broadcasting. Upon receiving the broadcast signal, the fourth electronic device can parse the broadcast signal to obtain the first specific information and compare it with the second specific information sent by the second earpiece to determine if they are the same. If the first specific information is the same as the second specific information, it indicates that the broadcast signal was sent by the first earpiece, which belongs to the same earpiece device as the second earpiece, and a connection instruction can be sent to the second earpiece.
[0139] In other embodiments, after the fourth electronic device parses the first specific information, it can also send the first specific information and a connection command to the second earpiece. The second earpiece can compare the first specific information with the stored second specific information to determine whether they are the same. If the first specific information is the same as the second specific information, it can respond to the connection command and establish a Bluetooth connection with the first earpiece according to the connection command.
[0140] In this embodiment, the fourth electronic device or the second earphone can accurately identify the identity of the first earphone that sent the broadcast signal through the first specific information carried in the broadcast signal, thereby improving the accuracy of the Bluetooth connection between the first earphone and the second earphone.
[0141] In some embodiments, the broadcast signal may further include the Bluetooth address corresponding to the first earpiece when it is in stand-alone use. After receiving the broadcast signal from the first earpiece, the fourth electronic device can parse the first specific information and the Bluetooth address corresponding to the first earpiece, and send a connection command containing the Bluetooth address to the second earpiece. Upon receiving the connection command, the second earpiece can parse the command to obtain the Bluetooth address of the first earpiece, and send a Bluetooth connection request to the first earpiece based on that Bluetooth address. In this embodiment, the use of a fourth electronic device connected to the second earpiece as an intermediary for information relay enables the second earpiece to obtain the Bluetooth address of the first earpiece and accurately initiate a Bluetooth connection request to the first earpiece, ensuring the reliability of the Bluetooth connection between the first and second earpieces.
[0142] After the second earphone establishes a Bluetooth connection with the first earphone, the second earphone and the first earphone can share the same Bluetooth address. This same Bluetooth address can be the Bluetooth address of the second earphone or the Bluetooth address of the first earphone, so the first earphone and the second earphone are in a shared usage state.
[0143] For example, Figure 8 This is a timing interaction diagram illustrating the control of the first and second earphones into a shared usage state in one embodiment. Figure 8 As shown, the headphone device may include earphone A, earphone B, and a charging case. Earphone A and earphone B are not connected via Bluetooth and are used independently. Earphone B establishes a Bluetooth connection with electronic device F and sends second specific information to electronic device F. When the user needs to switch earphone A and earphone B from independent use to joint use, earphone A can be placed in the charging case, and the charging case can be controlled accordingly. When the charging case detects the control operation, it can send a target command (such as the third control command mentioned above) to earphone A. Earphone A responds to the target command and sends a broadcast signal, which may carry first specific information and the Bluetooth address of earphone A. Electronic device F receives the broadcast signal, parses it, and obtains the first specific information and the Bluetooth address of earphone A. Electronic device F can compare the first specific information with the second specific information sent by earphone B, and when it determines that the first specific information and the second specific information are the same, it sends a connection command to earphone B, which includes the Bluetooth address of earphone A. After receiving the connection command, earphone B can send a Bluetooth connection request to earphone A based on the Bluetooth address of earphone A contained in the connection command, and establish a Bluetooth connection with earphone A. After earphone A and earphone B establish a Bluetooth connection, earphone A and earphone B can share the same Bluetooth address and achieve data synchronization, jointly playing audio data transmitted by the same electronic device.
[0144] In other embodiments, when the first earphone and the second earphone have not established a Bluetooth connection, the first earphone sends a broadcast signal, which triggers the second earphone that receives the broadcast signal to establish a Bluetooth connection with the first earphone and share the same Bluetooth address with the first earphone.
[0145] Optionally, the broadcast signal may include first specific information and the Bluetooth address corresponding to the first earphone. The broadcast signal can be used to trigger the second earphone that receives the broadcast signal to send a Bluetooth connection request to the first earphone according to the Bluetooth address when it determines that the first specific information is the same as the second specific information stored in the second earphone, so that the first earphone responds to the Bluetooth connection request and establishes a Bluetooth connection with the second earphone.
[0146] If the second earpiece receives a broadcast signal from the first earpiece, it can parse the broadcast signal to obtain first specific information and the Bluetooth address of the first earpiece. The second earpiece can compare the parsed first specific information with the stored second specific information to determine if they are the same. If the first specific information is the same as the second specific information, the second earpiece can send a Bluetooth connection request to the first earpiece based on the first earpiece's Bluetooth address, thereby establishing a Bluetooth connection with the first earpiece. After establishing a Bluetooth connection with the first earpiece, the second earpiece shares the same Bluetooth address with the first earpiece.
[0147] In this embodiment, the user can switch the headphone device from a state where each earphone is used individually to a state where both earphones are used together simply by placing one earphone into the headphone case. Compared to related technologies, which require placing both earphones into the headphone case and performing corresponding operations on the headphone case to achieve the state switch, this method is simpler and faster, improves the switching efficiency, and does not affect the user's normal use of the second earphone.
[0148] like Figure 9 As shown, in one embodiment, another state control method for a headphone device is provided, which can be applied to the headphone device described above. The headphone device may include a first earphone, a second earphone, and an earphone case. The method may include the following steps:
[0149] Step 910: If only the first earphone is placed in the earphone case, the first earphone receives the target instruction sent by the earphone case.
[0150] In one embodiment, step 910 includes: when only the first earphone is placed in the earphone case, if the earphone case detects a control operation, the earphone case sends a target instruction corresponding to the operation information to the first earphone according to the operation information of the control operation, so that the first earphone receives the target instruction.
[0151] In one embodiment, the operation information includes one or more of the following: operation duration, operation component identifier, operation direction, and operation force.
[0152] Step 920: According to the target instruction, the first earphone controls the first earphone and the second earphone to enter a state of independent use or a state of joint use. The state of independent use refers to the state in which the first earphone and the second earphone are configured with different Bluetooth addresses, and the state of joint use refers to the state in which the first earphone and the second earphone share the same Bluetooth address.
[0153] In one embodiment, the step of the earphone box sending a target instruction corresponding to the operation information to the first earphone according to the operation information of the control operation includes: if the earphone box determines that the operation information meets the second operation condition, then sending a second control instruction to the first earphone; if the earphone box determines that the operation information meets the third operation condition, then sending a third control instruction to the first earphone, wherein the third operation condition is different from the second operation condition.
[0154] Step 920 includes: if the first earpiece receives a second control command, controlling the first earpiece and / or the second earpiece to change the configured Bluetooth address, so that the first earpiece and the second earpiece switch from a shared use state to a single use state; if the first earpiece receives a third control command, controlling the first earpiece and / or the second earpiece to change the configured Bluetooth address, so that the first earpiece and the second earpiece switch from a single use state to a shared use state.
[0155] In one embodiment, step 920 includes: if the headphone devices are currently in a shared use state, the first headphone controls the first headphone and the second headphone to enter a separate use state according to the target instruction; if the headphone devices are currently in a separate use state, the first headphone controls the first headphone and the second headphone to enter a shared use state according to the target instruction.
[0156] In one embodiment, controlling the first and second earpieces to enter a separate use state includes: controlling the first and / or second earpieces to change their configured Bluetooth addresses so that the first and second earpieces correspond to different Bluetooth addresses. In one embodiment, the method further includes: disconnecting the Bluetooth connection between the first and second earpieces.
[0157] In one embodiment, controlling the first and second earpieces to enter a shared usage state includes: when the first and second earpieces have not established a Bluetooth connection, the first earpiece sends a broadcast signal, which triggers the second earpiece that receives the broadcast signal to establish a Bluetooth connection with the first earpiece and share the same Bluetooth address with the first earpiece.
[0158] In one embodiment, controlling the first and second earpieces to enter a shared usage state includes: when the first earpiece and the second earpiece have not established a Bluetooth connection, but the second earpiece has established a Bluetooth connection with a fourth electronic device, the first earpiece sends a broadcast signal, which triggers the fourth electronic device that receives the broadcast signal to send a connection command to the second earpiece, so that the second earpiece establishes a Bluetooth connection with the first earpiece according to the connection command and shares the same Bluetooth address with the first earpiece.
[0159] It should be noted that the description of the state control method of the headphone device provided in the embodiments of this application can be referred to the relevant descriptions in the above embodiments, and will not be repeated here.
[0160] In this embodiment, the user can switch between using the first and second earphones individually or together simply by placing one earphone into the earphone case. Compared to related technologies that require placing both earphones into the earphone case and performing corresponding operations on the case to achieve the state switch, this method is simpler and faster, improves switching efficiency, and does not affect the user's normal use of the second earphone.
[0161] like Figure 10 As shown, in one embodiment, a state control device 1000 for an earphone device is provided. The earphone device includes a first earphone, a second earphone, and an earphone case. The state control device 1000 may include an instruction receiving module 1010 and a state control module 1020.
[0162] The instruction receiving module 1010 is used to receive a target instruction sent by the earphone box when only the first earphone is placed in the earphone box.
[0163] The status control module 1020 is used to control the first earphone and / or the second earphone to enter the working state specified by the target instruction according to the target instruction.
[0164] The working state includes the pairing state; the pairing state refers to the state in which the first earphone and / or the second earphone can be detected by other electronic devices.
[0165] In one embodiment, the state control device 1000 of the headphone device includes, in addition to the instruction receiving module 1010 and the state control module 1020, an instruction sending module.
[0166] The instruction sending module is used to send a target instruction corresponding to the operation information to the first earphone when only the first earphone is placed in the earphone case, so that the first earphone receives the target instruction.
[0167] In one embodiment, the operation information includes one or more of the following: operation duration, operation component identifier, operation direction, and operation force.
[0168] In one embodiment, the instruction sending module is further configured to send a first control instruction to the first earphone if the earphone box determines that the operation information meets the first operation condition. The state control module 1020 is further configured to control the first earphone and / or the second earphone to enter a pairing state according to the first control instruction.
[0169] In one embodiment, the working state also includes a single-use state and / or a shared-use state, wherein the single-use state refers to the state in which the first earphone and the second earphone are configured to different Bluetooth addresses, and the shared-use state refers to the state in which the first earphone and the second earphone share the same Bluetooth address.
[0170] The instruction sending module is further configured to send a second control instruction to the first earphone if the earphone box determines that the operation information meets the second operation condition, wherein the second operation condition is different from the first operation condition; and / or, if the earphone box determines that the operation information meets the third operation condition, send a third control instruction to the first earphone, wherein the third operation condition is different from the first operation condition.
[0171] The status control module 1020 is further configured to, if the first earpiece receives a second control command, control the first earpiece and / or the second earpiece to change the configured Bluetooth address so that the first earpiece and the second earpiece switch from a shared use state to a single use state; and / or, is further configured to, if the first earpiece receives a third control command, control the first earpiece and / or the second earpiece to change the configured Bluetooth address so that the first earpiece and the second earpiece switch from a single use state to a shared use state.
[0172] In this embodiment, the user only needs to place one earphone from the headphone device into the headphone case and perform corresponding control operations on the headphone case to trigger the first earphone and / or the second earphone in the headphone device to enter the working state specified in the communication. This simplifies the way to control the headphone device to enter the working state specified in the communication, making the control more flexible and convenient, and will not affect the user's normal use of the headphone device.
[0173] In one embodiment, the state control device 1000 of the headphone device includes, in addition to the instruction receiving module 1010, the state control module 1020, and the instruction sending module, a scanning response module and a connection module.
[0174] The scanning response module is used to receive a scanning request sent by a first electronic device when the first earphone and / or the second earphone are in a paired state, and to send a scanning response to the first electronic device according to the scanning request.
[0175] The connection module is configured to, when the headset device establishes a Bluetooth connection with N second electronic devices, receive a first connection request sent by the first electronic device via the first headset and / or the second headset; wherein N is the maximum number of Bluetooth connections that the headset device can maintain simultaneously, and N is an integer greater than or equal to 1; and to, via the second headset, perform disconnection processing with the target electronic device among the N second electronic devices, and via the first headset, process the first connection request to establish a Bluetooth connection with the first electronic device; or, via the first headset, perform disconnection processing with the target electronic device among the N second electronic devices, and via the second headset, process the first connection request to establish a Bluetooth connection with the first electronic device.
[0176] In one embodiment, the connection module is further configured to select, by the first or second earpiece, a second electronic device whose priority meets the priority condition from among N second electronic devices as the target electronic device, based on the priority of each second electronic device.
[0177] In this embodiment, when a first electronic device preempts the Bluetooth connection of the headset device, the disconnection and connection operations are performed in parallel by the first and second earphones, which can improve the connection acquisition speed and efficiency of the first electronic device. Furthermore, after the disconnection and connection operations are completed, the first and second earphones synchronize information, which facilitates the management of all established Bluetooth connections and ensures data transmission efficiency.
[0178] In one embodiment, the maximum number N of Bluetooth connections that the headphone device can maintain simultaneously is an integer greater than or equal to 2.
[0179] The scan response module is further configured to, when the first earphone and / or the second earphone are in a paired state, receive a scan request sent by the first electronic device and send a scan response to the first electronic device according to the scan request, and receive a scan request sent by the third electronic device and send a scan response to the third electronic device according to the scan request.
[0180] The connection module is further configured to, if it receives a first connection request sent by a first electronic device and a second connection request sent by a third electronic device within a first time period, process the first connection request through a first headset to establish a Bluetooth connection with the first electronic device, and process the second connection request through a second headset to establish a Bluetooth connection with the third electronic device.
[0181] In one embodiment, the aforementioned headphone device status control device 1000 further includes a synchronization module.
[0182] The synchronization module is used to synchronize the connection information of the first electronic device to the second earpiece via the first earpiece, so that the Bluetooth connection target of the first electronic device is switched from the first earpiece to the second earpiece, and the first earpiece listens to the Bluetooth connection between the second earpiece and the first electronic device; or, it is used to synchronize the connection information of the first electronic device to the second earpiece via the first earpiece, so that the Bluetooth connection target of the first electronic device is switched from the first earpiece to the second earpiece, and the second earpiece synchronizes the data transmitted between itself and the first electronic device to the first earpiece.
[0183] In this embodiment, the first and second earpieces of the headset device can establish Bluetooth connections with the first and third electronic devices respectively. The first and second earpieces connect in parallel, eliminating the need to wait for the headset device to complete its Bluetooth connection with one electronic device before establishing a connection with the other. This improves the speed and efficiency of establishing Bluetooth connections between the headset device and the two electronic devices. Furthermore, the first and second earpieces synchronize information, allowing the first electronic device to switch its Bluetooth connection target from the first earpiece to the second earpiece. This facilitates the management of all established Bluetooth connections and ensures efficient data transmission.
[0184] In one embodiment, the operating state includes a shared usage state. The state control module 1020 is further configured to, when the first earpiece and the second earpiece have not established a Bluetooth connection, have the first earpiece send a broadcast signal to trigger the second earpiece, upon receiving the broadcast signal, to establish a Bluetooth connection with the first earpiece and share the same Bluetooth address.
[0185] In one embodiment, the operating state includes sharing a Bluetooth address. The state control module 1020 is further configured to, when the first earpiece and the second earpiece have not established a Bluetooth connection, but the second earpiece has established a Bluetooth connection with a fourth electronic device, send a broadcast signal from the first earpiece. This broadcast signal triggers the fourth electronic device, upon receiving the broadcast signal, to send a connection command to the second earpiece, causing the second earpiece to establish a Bluetooth connection with the first earpiece according to the connection command and share the same Bluetooth address with the first earpiece.
[0186] In one embodiment, the broadcast signal includes first specific information. This broadcast signal is further used to trigger a fourth electronic device receiving the broadcast signal to send a connection command to a second earpiece when it determines that the first specific information is identical to second specific information. This causes the second earpiece to establish a Bluetooth connection with the first earpiece according to the connection command and share the same Bluetooth address. The second specific information is sent by the second earpiece to the fourth electronic device after establishing a Bluetooth connection. Alternatively, the broadcast signal may also trigger the fourth electronic device receiving the broadcast signal to send the first specific information and the connection command to the second earpiece, causing the second earpiece to establish a Bluetooth connection with the first earpiece according to the connection command when it determines that the first specific information is identical to the stored second specific information, and share the same Bluetooth address with the first earpiece.
[0187] In this embodiment, the user can switch the headphone device from a state where each earphone is used individually to a state where both earphones are used together simply by placing one earphone into the headphone case. Compared to related technologies, which require placing both earphones into the headphone case and performing corresponding operations on the headphone case to achieve the state switch, this method is simpler and faster, improves the switching efficiency, and does not affect the user's normal use of the second earphone.
[0188] like Figure 11 As shown, in another embodiment, a state control device 1100 for an earphone device is provided. The earphone device includes a first earphone, a second earphone, and an earphone case. The state control device 1100 for the earphone device includes a command receiving module 1110 and a state control module 1120.
[0189] The instruction receiving module 1110 is used to receive a target instruction sent by the earphone box when the first earphone is placed in the earphone box.
[0190] The status control module 1120 is used to control the first earphone and the second earphone to enter a separate use state or a joint use state according to the target instruction. The separate use state refers to the state in which the first earphone and the second earphone are configured with different Bluetooth addresses, and the joint use state refers to the state in which the first earphone and the second earphone share the same Bluetooth address.
[0191] In one embodiment, the state control module 1120 is further configured to control the first earphone and / or the second earphone to change the configured Bluetooth address, so that the first earphone and the second earphone correspond to different Bluetooth addresses respectively. In one embodiment, the state control module 1120 is further configured to disconnect the Bluetooth connection between the first earphone and the second earphone.
[0192] In one embodiment, the status control module 1120 is further configured to, when the first earphone and the second earphone have not established a Bluetooth connection, send a broadcast signal from the first earphone, which triggers the second earphone that receives the broadcast signal to establish a Bluetooth connection with the first earphone and share the same Bluetooth address with the first earphone.
[0193] In one embodiment, the state control module 1120 is further configured to, when the first earphone and the second earphone have not established a Bluetooth connection, but the second earphone has established a Bluetooth connection with the fourth electronic device, send a broadcast signal from the first earphone. The broadcast signal is used to trigger the fourth electronic device that receives the broadcast signal to send a connection command to the second earphone, so that the second earphone establishes a Bluetooth connection with the first earphone according to the connection command and shares the same Bluetooth address with the first earphone.
[0194] In one embodiment, the status control device 1100 of the headphone device includes, in addition to the instruction receiving module 1110 and the status control module 1120, an instruction sending module.
[0195] The instruction sending module is used to send a target instruction corresponding to the operation information to the first earphone when only the first earphone is placed in the earphone case, so that the first earphone receives the target instruction.
[0196] In one embodiment, the operation information includes one or more of the following: operation duration, operation component identifier, operation direction, and operation force.
[0197] In one embodiment, the instruction sending module is further configured to send a second control instruction to the first earphone if the earphone box determines that the operation information meets the second operation condition; and to send a third control instruction to the first earphone if the earphone box determines that the operation information meets the third operation condition, wherein the third operation condition is different from the second operation condition.
[0198] The status control module 1120 is further configured to, if the first earpiece receives a second control command, control the first earpiece and / or the second earpiece to change the configured Bluetooth address so that the first earpiece and the second earpiece switch from a shared use state to a single use state; and if the first earpiece receives a third control command, control the first earpiece and / or the second earpiece to change the configured Bluetooth address so that the first earpiece and the second earpiece switch from a single use state to a shared use state.
[0199] In one embodiment, the state control module 1120 is further configured to, if the headphone device is currently in a shared use state, control the first headphone and the second headphone to enter a separate use state according to a target instruction; if the headphone device is currently in a separate use state, control the first headphone and the second headphone to enter a shared use state according to a target instruction.
[0200] In this embodiment, the user can switch between using the first and second earphones individually or together simply by placing one earphone into the earphone case. Compared to related technologies that require placing both earphones into the earphone case and performing corresponding operations on the case to achieve the state switch, this method is simpler and faster, improves switching efficiency, and does not affect the user's normal use of the second earphone.
[0201] Figure 12 This is a structural block diagram of a headphone device in one embodiment. Figure 12 As shown, the headphone device 1200 may include one or more of the following components: a processor 1210 and a memory 1220 coupled to the processor 1210, wherein the memory 1220 may store one or more computer programs, which may be configured to implement the methods described in the above embodiments when executed by one or more processors 1210.
[0202] Processor 1210 may include one or more processing cores. Processor 1210 connects to various parts within the headphone device 1200 using various interfaces and lines, and performs various functions and processes data of the headphone device 1200 by running or executing instructions, programs, code sets, or instruction sets stored in memory 1220, and by calling data stored in memory 1220. Optionally, processor 1210 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). Processor 1210 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the displayed content; and the modem handles wireless communication. It is understood that the modem may also not be integrated into processor 1210 and may be implemented separately using a communication chip.
[0203] The memory 1220 may include random access memory (RAM) or read-only memory (ROM). The memory 1220 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 1220 may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as touch control, sound playback, image playback, etc.), and instructions for implementing the various method embodiments described above. The data storage area may also store data created during the use of the headphone device 1200.
[0204] The headphone device 1200 may also include a Bluetooth module, which can be used to provide Bluetooth communication functionality, establish Bluetooth connections with other electronic devices, and perform Bluetooth data transmission. The Bluetooth module may support one or more Bluetooth protocols (such as Classic Bluetooth, BLE, etc.), but is not limited to these, and may change as Bluetooth protocols evolve.
[0205] In some embodiments, the headphone device includes a first earphone, a second earphone, and an earphone case. Both the first earphone and the second earphone may include at least the processor 1210, the memory 1220, and the Bluetooth module described above.
[0206] Understandably, the headphone device 1200 may include more or fewer structural elements than those shown in the block diagram above, such as a power module, physical buttons, sensors, etc., and is not limited herein.
[0207] This application discloses a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the methods described in the above embodiments.
[0208] This application discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program can be executed by a processor to implement the methods described in the above embodiments.
[0209] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, ROM, etc.
[0210] Any references to memory, storage, databases, or other media used herein may include non-volatile and / or volatile memory. Suitable non-volatile memory may include ROM, Programmable ROM (PROM), Erasable PROM (EPROM), Electrically Erasable PROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM), which is used as an external cache. By way of illustration and not limitation, RAM may take many forms, such as Static RAM (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), Rambus DRAM (RDRAM), and Direct Rambus DRAM (DRDRAM).
[0211] It should be understood that the phrase "one embodiment" or "an embodiment" throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of this application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Those skilled in the art should also recognize that the embodiments described in the specification are optional embodiments, and the actions and modules involved are not necessarily essential to this application.
[0212] In the various embodiments of this application, it should be understood that the sequence number of each process does not necessarily imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0213] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; they can be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0214] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0215] The foregoing has provided a detailed description of a state control method, apparatus, earphone device, and storage medium for an earphone device disclosed in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A state control method for an earphone device, characterized in that, The headphone device includes a first earphone, a second earphone, and an earphone case; the method includes: When only the first earphone is placed in the earphone case, if the earphone case detects a control operation, the earphone case sends a target instruction corresponding to the operation information to the first earphone according to the operation information of the control operation, so that the first earphone receives the target instruction; The first earpiece controls the first earpiece and / or the second earpiece to enter the working state specified by the target instruction according to the target instruction; wherein, the working state specified by the target instruction includes one of a pairing state, a single-use state, and a shared-use state, the pairing state refers to the state in which the first earpiece and / or the second earpiece can be discovered by other electronic devices; the single-use state refers to the state in which the first earpiece and the second earpiece are configured to different Bluetooth addresses, and the shared-use state refers to the state in which the first earpiece and the second earpiece share the same Bluetooth address. The earphone box sends a target instruction corresponding to the operation information to the first earphone according to the operation information of the control operation, including: If the earphone box determines that the operation information of the control operation meets the second operation condition, it sends a second control command to the first earphone; and / or, if the earphone box determines that the operation information of the control operation meets the third operation condition, it sends a third control command to the first earphone. The first earpiece controls the first earpiece and / or the second earpiece to enter the working state specified by the target instruction according to the target instruction, including: If the first earpiece receives the second control command, it controls the first earpiece and / or the second earpiece to change their configured Bluetooth addresses, so that the first earpiece and the second earpiece switch from the shared use state to the individual use state; and / or, if the first earpiece receives the third control command, it controls the first earpiece and / or the second earpiece to change their configured Bluetooth addresses, so that the first earpiece and the second earpiece switch from the individual use state to the shared use state.
2. The method according to claim 1, characterized in that, The operation information includes one or more of the following: operation duration, operation component identifier, operation direction, and operation force corresponding to the control operation.
3. The method according to claim 2, characterized in that, The earphone box sends a target instruction corresponding to the operation information to the first earphone according to the operation information of the control operation, including: If the earphone box determines that the operation information meets the first operation condition, it sends a first control command to the first earphone; the second operation condition is different from the first operation condition, and the third operation condition is different from the first operation condition. The first earpiece controls the first earpiece and / or the second earpiece to enter the working state specified by the target instruction according to the target instruction, including: The first earphone controls the first earphone and / or the second earphone to enter a pairing state according to the first control command.
4. The method according to claim 1, characterized in that, The third operating condition is different from the second operating condition.
5. The method according to any one of claims 1, characterized in that, The method further includes: When the first earphone and / or the second earphone are in the pairing state, the first earphone and / or the second earphone receive a scan request sent by the first electronic device, and send a scan response to the first electronic device according to the scan request; When the headphone device establishes a Bluetooth connection with N second electronic devices, the first earphone and / or the second earphone receives a first connection request sent by the first electronic device; wherein, N is the maximum number of Bluetooth connections that the headphone device can maintain simultaneously, and N is an integer greater than or equal to 1; The second headset is used to disconnect the device from the target device among the N second electronic devices, and the first headset is used to process the first connection request to establish a Bluetooth connection with the first electronic device; or, the first headset is used to disconnect the device from the target device among the N second electronic devices, and the second headset is used to process the first connection request to establish a Bluetooth connection with the first electronic device.
6. The method according to claim 5, characterized in that, Before performing the disconnection process with the target electronic device among the N second electronic devices via the second earphone, the method further includes: The first or second earphone selects a target electronic device from the N second electronic devices based on the priority of each of the second electronic devices, ensuring that the priority meets the priority condition.
7. The method according to claim 1, characterized in that, The maximum number N that the headset device can support for maintaining Bluetooth connections simultaneously is an integer greater than or equal to 2; the method further includes: When the first earphone and / or the second earphone are in the pairing state, the first earphone and / or the second earphone receive a scan request sent by the first electronic device and send a scan response to the first electronic device according to the scan request; and the first earphone and / or the second earphone receive a scan request sent by the third electronic device and send a scan response to the third electronic device according to the scan request. If a first connection request sent by the first electronic device and a second connection request sent by the third electronic device are received within the first time period, the first connection request is processed through the first headset to establish a Bluetooth connection with the first electronic device, and the second connection request is processed through the second headset to establish a Bluetooth connection with the third electronic device.
8. The method according to any one of claims 5 to 7, characterized in that, After processing the first connection request through the first earpiece and establishing a Bluetooth connection with the first electronic device, the method further includes: The first earpiece synchronizes the connection information of the first electronic device to the second earpiece, thereby switching the Bluetooth connection target of the first electronic device from the first earpiece to the second earpiece, and the first earpiece monitors the Bluetooth connection between the second earpiece and the first electronic device; or, The first earpiece synchronizes the connection information of the first electronic device to the second earpiece, so that the Bluetooth connection target of the first electronic device switches from the first earpiece to the second earpiece, and the second earpiece synchronizes the data transmitted between itself and the first electronic device to the first earpiece.
9. The method according to claim 1 or 2, characterized in that, The operating states include a shared use state; controlling the first and second earphones to enter the operating state specified by the target instruction includes: If the first earphone and the second earphone do not establish a Bluetooth connection, the first earphone sends a broadcast signal. The broadcast signal is used to trigger the second earphone, which receives the broadcast signal, to establish a Bluetooth connection with the first earphone and share the same Bluetooth address with the first earphone.
10. The method according to claim 1 or 2, characterized in that, The operating state includes sharing a Bluetooth address; controlling the first and / or second earphones to enter the operating state corresponding to the target instruction includes: If the first earphone and the second earphone do not establish a Bluetooth connection, but the second earphone establishes a Bluetooth connection with the fourth electronic device, the first earphone sends a broadcast signal. The broadcast signal is used to trigger the fourth electronic device that receives the broadcast signal to send a connection command to the second earphone, so that the second earphone establishes a Bluetooth connection with the first earphone according to the connection command and shares the same Bluetooth address with the first earphone.
11. The method according to claim 10, characterized in that, The broadcast signal includes first specific information. The broadcast signal is further used to trigger the fourth electronic device receiving the broadcast signal to send a connection command to the second earpiece when it determines that the first specific information is the same as the second specific information. This causes the second earpiece to establish a Bluetooth connection with the first earpiece according to the connection command and share the same Bluetooth address. The second specific information is sent by the second earpiece to the fourth electronic device after establishing a Bluetooth connection with it. The broadcast signal is also used to trigger the fourth electronic device that receives the broadcast signal to send the first specific information and connection instruction to the second earphone, so that when the second earphone determines that the first specific information is the same as the stored second specific information, it establishes a Bluetooth connection with the first earphone according to the connection instruction and shares the same Bluetooth address with the first earphone.
12. A state control method for an earphone device, characterized in that, The headphone device includes a first earphone, a second earphone, and an earphone case; the method includes: When only the first earphone is placed in the earphone case, if the earphone case detects a control operation, the earphone case sends a target instruction corresponding to the operation information to the first earphone according to the operation information of the control operation, so that the first earphone receives the target instruction; According to the target instruction, the first earphone controls the first earphone and the second earphone to switch from a single use state to a shared use state, or from a shared use state to a single use state. The single use state refers to the state in which the first earphone and the second earphone are configured with different Bluetooth addresses, and the shared use state refers to the state in which the first earphone and the second earphone share the same Bluetooth address. The earphone box sends a target instruction corresponding to the operation information to the first earphone according to the operation information of the control operation, including: If the earphone box determines that the operation information of the control operation meets the second operation condition, then it sends a second control command to the first earphone. If the earphone box determines that the operation information of the control operation meets the third operation condition, then it sends a third control command to the first earphone. The first earpiece controls the first earpiece and / or the second earpiece to enter the working state specified by the target instruction according to the target instruction, including: If the first earphone receives the second control command, it controls the first earphone and / or the second earphone to change the configured Bluetooth address, so that the first earphone and the second earphone switch from the shared use state to the individual use state; If the first earphone receives the third control command, it controls the first earphone and / or the second earphone to change the configured Bluetooth address, so that the first earphone and the second earphone switch from the individual use state to the joint use state.
13. The method according to claim 12, characterized in that, The control of switching the first and second earphones from a shared use state to a separate use state includes: Control the first and / or second earphones to change their configured Bluetooth addresses so that the first and second earphones correspond to different Bluetooth addresses.
14. The method according to claim 13, characterized in that, The method further includes: Disconnect the Bluetooth connection between the first earphone and the second earphone.
15. The method according to claim 12, characterized in that, The method further includes: If the first earphone and the second earphone do not establish a Bluetooth connection, the first earphone sends a broadcast signal. The broadcast signal is used to trigger the second earphone, which receives the broadcast signal, to establish a Bluetooth connection with the first earphone and share the same Bluetooth address with the first earphone, so that the first earphone and the second earphone enter the shared use state.
16. The method according to claim 12, characterized in that, Controlling the first and second earphones to switch from a single-use state to a shared-use state includes: If the first earphone and the second earphone have not established a Bluetooth connection, but the second earphone has established a Bluetooth connection with the fourth electronic device, the first earphone sends a broadcast signal. The broadcast signal is used to trigger the fourth electronic device that receives the broadcast signal to send a connection command to the second earphone, so that the second earphone establishes a Bluetooth connection with the first earphone according to the connection command and shares the same Bluetooth address with the first earphone.
17. The method according to claim 12, characterized in that, The operation information includes one or more of the following: operation duration, operation component identifier, operation direction, and operation force corresponding to the control operation.
18. The method according to claim 12, characterized in that, The third operating condition is different from the second operating condition.
19. The method according to any one of claims 12 to 16, characterized in that, The first earpiece controls the first earpiece and the second earpiece to switch from a single-use state to a shared-use state, or from a shared-use state to a single-use state, according to the target instruction, including: If the headphone devices are currently in a shared use state, the first headphone controls the first headphone and the second headphone to enter a separate use state according to the target instruction; If the headphone device is currently in standby mode, the first headphone controls the first headphone and the second headphone to enter a shared mode according to the target instruction.
20. A state control device for an earphone device, characterized in that, The headphone device includes a first earphone, a second earphone, and an earphone case; the device includes: The instruction sending module is configured to, when only the first earphone is placed in the earphone case, if the earphone case detects a control operation, send a target instruction corresponding to the operation information of the control operation to the first earphone, so that the first earphone receives the target instruction; A state control module is used to control the first earphone and / or the second earphone to enter a working state specified by the target instruction according to the target instruction; wherein, the working state specified by the target instruction includes one of a pairing state, a solo use state, and a shared use state; the pairing state refers to the state in which the first earphone and / or the second earphone can be discovered by other electronic devices; the solo use state refers to the state in which the first earphone and the second earphone are configured with different Bluetooth addresses; and the shared use state refers to the state in which the first earphone and the second earphone share the same Bluetooth address. The instruction sending module is further configured to send a second control instruction to the first earphone if the earphone box determines that the operation information of the control operation meets the second operation condition; and / or, send a third control instruction to the first earphone if the earphone box determines that the operation information of the control operation meets the third operation condition. The state control module is further configured to, if the first earpiece receives the second control command, control the first earpiece and / or the second earpiece to change the configured Bluetooth address so that the first earpiece and the second earpiece switch from the shared use state to the individual use state; and / or, if the first earpiece receives the third control command, control the first earpiece and / or the second earpiece to change the configured Bluetooth address so that the first earpiece and the second earpiece switch from the individual use state to the shared use state.
21. A status control device for an earphone device, characterized in that, The headphone device includes a first earphone, a second earphone, and an earphone case; the device includes: The instruction sending module is configured to, when only the first earphone is placed in the earphone case, if the earphone case detects a control operation, send a target instruction corresponding to the operation information of the control operation to the first earphone, so that the first earphone receives the target instruction; The status control module is used to control the first earphone and the second earphone to switch from a single use state to a joint use state, or from a joint use state to a single use state, according to the target instruction. The single use state refers to the state in which the first earphone and the second earphone are configured with different Bluetooth addresses, and the joint use state refers to the state in which the first earphone and the second earphone share the same Bluetooth address. The instruction sending module is further configured to send a second control instruction to the first earphone if the earphone box determines that the operation information of the control operation meets the second operation condition; and to send a third control instruction to the first earphone if the earphone box determines that the operation information of the control operation meets the third operation condition. The state control module is further configured to, if the first earpiece receives the second control instruction, control the first earpiece and / or the second earpiece to change the configured Bluetooth address so that the first earpiece and the second earpiece switch from the shared use state to the individual use state; and if the first earpiece receives the third control instruction, control the first earpiece and / or the second earpiece to change the configured Bluetooth address so that the first earpiece and the second earpiece switch from the individual use state to the shared use state.
22. A headphone device, characterized in that, The system includes a memory and a processor, wherein the memory stores a computer program that, when executed by the processor, causes the processor to perform the method as described in any one of claims 1 to 19.
23. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 19.
24. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 19.
Citation Information
Patent Citations
Bluetooth earphone, pairing connection method and device thereof, and TWS earphone
CN111629369A
Earphone control method and device and electronic equipment
CN112165665A