Method, device, equipment and storage medium for broadcasting device information
The first electronic device replaces the Bluetooth playback device to broadcast the device information, which solves the problem of high power consumption of the Bluetooth playback device and extends the battery life.
Patent Information
- Application Number
- CN202111137776.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-27
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2041-09-27
AI Technical Summary
Bluetooth playback devices consume a lot of power and have poor battery life when continuously sending BLE broadcasts.
The device information of the playback device is obtained through the first electronic device and broadcast it, reducing the broadcast frequency of the playback device and reducing power consumption.
Reduces the power consumption of the playback device and improves battery life.
Smart Images

Figure CN115884326B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a method, apparatus, device, and storage medium for broadcasting device information. Background Art
[0002] With the development of terminal technology, Bluetooth headsets, Bluetooth speakers and other playback devices have been widely used.
[0003] The same playback device can be connected to one or more electronic devices. When the playback device establishes a connection with one of the electronic devices, the device information of the playback device needs to be sent out via BLE broadcast so that other electronic devices can obtain the above device information and establish a connection with the playback device to complete the device switching.
[0004] However, using the above method, the playback device needs to continuously send BLE broadcasts, resulting in high power consumption and poor battery life of the playback device. Summary of the Invention
[0005] The embodiments of the present application provide a method, apparatus, device, and storage medium for broadcasting device information, which can reduce the power consumption of playback devices.
[0006] In a first aspect, a method for broadcasting device information is provided, applied to a first electronic device, wherein the first electronic device has a communication connection with a playback device, and is characterized in that the method comprises:
[0007] Obtaining device information of the playback device;
[0008] Broadcast the device information of the playback device; wherein the device information is used to enable the second electronic device to obtain the device information of the playback device.
[0009] In a second aspect, a method for broadcasting device information is applied to a second electronic device, the method comprising:
[0010] Receiving device information broadcast by a first electronic device; the first electronic device is a device that currently establishes a communication connection with the playback device;
[0011] According to the device information, it is determined whether to send a connection request to the playback device; the connection request is used by the playback device to establish a communication connection with the second electronic device according to the connection request.
[0012] In a third aspect, a method for broadcasting device information is provided, applied to a playback device, the method comprising:
[0013] Obtaining the remaining power of the playback device;
[0014] When the remaining power is less than a first power threshold, an alternative broadcast instruction is sent to a first electronic device; the first electronic device is a device that currently establishes a communication connection with the playback device; the alternative broadcast instruction is used to instruct the first electronic device to broadcast device information of the playback device.
[0015] In a fourth aspect, a device information broadcasting apparatus is applied to a first electronic device, wherein the first electronic device has a communication connection with a playback device, and the apparatus includes:
[0016] An acquisition module, configured to acquire device information of the playback device;
[0017] The broadcast module is used to broadcast the device information of the playback device; wherein the device information is used to enable the second electronic device to obtain the device information of the playback device.
[0018] In a fifth aspect, a device information broadcasting apparatus is applied to a second electronic device, comprising:
[0019] A receiving module, configured to receive device information broadcast by a first electronic device; the first electronic device is a device currently establishing a communication connection with the playback device;
[0020] The connection module is used to determine whether to send a connection request to the playback device according to the device information; the connection request is used for the playback device to establish a communication connection with the second electronic device according to the connection request.
[0021] In a sixth aspect, a device information broadcasting apparatus is applied to a playback device, comprising:
[0022] An acquisition module, configured to acquire the remaining power of the playback device;
[0023] A sending module is used to send an alternative broadcast instruction to a first electronic device when the remaining power is less than a first power threshold; the first electronic device is a device that currently establishes a communication connection with the playback device; the alternative broadcast instruction is used to instruct the first electronic device to broadcast the device information of the playback device.
[0024] In the seventh aspect, an electronic device includes a memory and a processor, wherein a computer program is stored in the memory, and is characterized in that when the computer program is executed by the processor, the processor executes the steps of the device information broadcasting method in the above-mentioned first aspect or second aspect.
[0025] In an eighth aspect, a playback device includes a memory and a processor, wherein a computer program is stored in the memory. When the computer program is executed by the processor, the processor executes the steps of the device information broadcasting method in the third aspect.
[0026] In a ninth aspect, a computer-readable storage medium stores a computer program, which implements the steps of the above-mentioned device information broadcasting method when executed by a processor.
[0027] In the aforementioned device information broadcasting method, apparatus, device, and storage medium, when a first electronic device establishes a communication connection with a playback device, the first electronic device obtains the playback device's device information and then broadcasts the playback device's device information; the device information is used to enable a second electronic device to obtain the playback device's device information. The aforementioned device information broadcasting method, which broadcasts device information via the first electronic device without requiring the playback device to broadcast, can reduce the power consumption of the playback device and improve its battery life. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0029] Figure 1 A diagram illustrating an application environment of a method for broadcasting device information in one embodiment;
[0030] Figure 2 is a flowchart of a method for broadcasting device information in one embodiment;
[0031] Figure 3 is a flowchart of a method for broadcasting device information in one embodiment;
[0032] Figure 4 is a flowchart of a method for broadcasting device information in one embodiment;
[0033] Figure 5 is a flowchart of a method for broadcasting device information in one embodiment;
[0034] Figure 6 is a flowchart of a method for broadcasting device information in one embodiment;
[0035] Figure 7 is a flowchart of a method for broadcasting device information in one embodiment;
[0036] Figure 8 is a flowchart of a method for broadcasting device information in one embodiment;
[0037] Figure 9 is a flowchart of a method for broadcasting device information in one embodiment;
[0038] Figure 10 is a flowchart of a method for broadcasting device information in one embodiment;
[0039] Figure 11 is a flowchart of a method for broadcasting device information in one embodiment;
[0040] Figure 12 is a structural block diagram of a device for broadcasting device information in one embodiment;
[0041] Figure 13 is a structural block diagram of a device for broadcasting device information in one embodiment;
[0042] Figure 14 is a structural block diagram of a device for broadcasting device information in one embodiment;
[0043] Figure 15 is a structural block diagram of a device for broadcasting device information in one embodiment;
[0044] Figure 16 is a structural block diagram of a playback device in one embodiment;
[0045] Figure 17 FIG. 4 is a structural block diagram of an electronic device in an embodiment. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical solutions and advantages of this application more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0047] It is understood that the terms "first," "second," and the like used herein may be used to describe various elements herein, but these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, a first electronic device may be referred to as a second electronic device, and similarly, a second electronic device may be referred to as a first electronic device, without departing from the scope of this application. The first electronic device and the second electronic device are both electronic devices, but they are not the same electronic device.
[0048] Figure 1 FIG. 1 is a schematic diagram of an application environment of a method for broadcasting device information in an embodiment. Figure 1As shown, the application environment includes a playback device 100, and a first electronic device 200 communicatively connected to the playback device 100, and also includes at least one second electronic device 300 that is not communicatively connected to the playback device 100. The above-mentioned playback device 100 can be used to play the voice service of the electronic device, and can also be used to assist in playing the video service of the electronic device, which is not limited here. The above-mentioned playback device 100 can be a Bluetooth headset, a smart watch, a smart helmet, and can also be various types of devices such as a smart speaker, an augmented reality (AR) device, and a virtual reality (VR) device, which is not limited here. The above-mentioned first electronic device 200 and the second electronic device 300 can be, but are not limited to, personal computers, laptops, smart phones, tablet computers and portable wearable devices, and the types of the above-mentioned first electronic device 200 and the second electronic device 300 can be the same or different.
[0049] Figure 2 FIG. 1 is a flow chart of a method for broadcasting device information in one embodiment. The method for broadcasting device information in this embodiment is to run on Figure 1 The first electronic device in the example is used for description. Figure 2 As shown, the above method includes:
[0050] S101: Obtain device information of the playback device.
[0051] The above-mentioned playback device can be used to assist in playing the voice service of the electronic device, and can also be used to play the video service of the electronic device, which is not limited here. The above-mentioned playback device can be a Bluetooth headset, a smart watch, a smart helmet, or various types of devices such as a smart speaker, AR device, VR device, etc., which are not limited here. The above-mentioned playback device can include a wireless communication module, and the above-mentioned playback device can establish a communication connection with the electronic device through the wireless communication module. The communication connection between the above-mentioned playback device and the electronic device can be a Bluetooth connection, or a wireless fidelity (Wi-Fi) connection, Zigbee or other short-range communication connection, which is not limited here. The above-mentioned playback device can establish a communication connection with one electronic device, or it can establish a communication connection with multiple electronic devices at the same time; when the playback device establishes a communication connection with multiple electronic devices, the above-mentioned playback device can play the business data of one of the electronic devices within a time period.
[0052] The first electronic device may be in communication with the playback device. The communication connection may be a physical connection, such as an asynchronous connection-oriented link (ACL) connection between the playback device and the first electronic device. When the playback device is in communication with the first electronic device, the first electronic device may send service data to the playback device and play the service data of the first electronic device through the playback device; or, the first electronic device may be in an idle state and remain connected to the playback device. The service data may be audio data or video data, which is not limited here. The audio data may be data for a call service or data for a voice playback service. The call service data may be service data for scenarios such as telephone calls, voice calls, and video calls. The playback device may play the call data sent by the peer device to the user, or may collect the user's call data and send it to the first electronic device, which is then sent to the peer device via the first electronic device. The data for the voice playback service may be music played on the first electronic device, recorded audio data, audio data in a video file, etc. The data type for the voice playback service is not limited here.
[0053] On the basis of the above-mentioned communication connection, the first electronic device can obtain the device information of the above-mentioned playback device. The above-mentioned device information can be the information that the playback device needs to broadcast when it is in operation. The above-mentioned device information can be the model of the playback device, the remaining power of the playback device, or the picture information of the playback device. The type of the above-mentioned device information is not limited here. For example, when the electronic device receives the device information of the playback device, it can obtain the picture of the playback device according to the device information, and then display the above-mentioned picture through a pop-up window, so that the user can more intuitively see the type, color and other characteristics of the playback device through the picture. The above-mentioned device information can also include the name and address of the playback device, so that the electronic device that receives the device information can use the name and address of the above-mentioned playback device to initiate a connection request. Optionally, in the case where the above-mentioned playback device is a wearable device such as a Bluetooth headset, the above-mentioned device information can also include the wearing status of the wearable device. The above-mentioned Bluetooth headset can be of various types, for example, it can be an earbud type, an in-ear type, a head-mounted type, an earmuff type or an ear-hook type wireless headset. The above-mentioned Bluetooth headset can be a headset comprising a first part and a second part worn on the user's left ear and right ear respectively, or it can be connected by a connecting cable, such as a neckband wireless headset; it can also be a true wireless stereo (TWS) headset. Accordingly, different types of wearable devices can correspond to different wearing states. For example, the wearing state of the Bluetooth headset can include single-ear wearing and dual-ear wearing.
[0054] When obtaining the above-mentioned device information, the first electronic device can determine the name and address of the playback device based on the communication connection with the playback device, and can also receive the device information sent by the playback device; optionally, the first electronic device can extract the device information carried in the broadcast instruction sent by the playback device. In one implementation, the first electronic device can also combine the partial device information sent by the playback device with the partial device information of the playback device determined based on the communication connection to obtain the device information to be broadcast. Optionally, the broadcast instruction sent by the playback device can carry the connection information of the playback device; the above-mentioned connection information includes the identification of the playback device and the address of the playback device.
[0055] S102: Broadcast device information of the playback device; wherein the device information is used to enable a second electronic device to obtain the device information of the playback device.
[0056] After the first electronic device obtains the above-mentioned device information, it can broadcast the device information. For example, the above-mentioned first electronic device can broadcast the device information via Bluetooth Low Energy (BLE). The first electronic device can automatically broadcast the device information of the playback device after establishing a communication connection with the playback device; it can also receive a broadcast instruction sent by the playback device, and then broadcast the above-mentioned device information in response to the above-mentioned broadcast instruction; the broadcasting method of the above-mentioned device information is not limited here. Optionally, the above-mentioned first electronic device can determine whether to broadcast the device information based on the device type. When the device type of the first electronic device is a preset type, for example, the first electronic device is a tablet computer, or an electronic device connected to a power source, the first electronic device can automatically broadcast the device information of the playback device; further, when the first electronic device determines to automatically broadcast the device information of the playback device, it can send a feedback message to the playback device so that the broadcasting device can be informed that the first electronic device performs an alternative broadcast task of the device information.
[0057] After the playback device broadcasts the device information through the first electronic device, the second electronic device located within the broadcast receiving range of the first electronic device can receive the device information.
[0058] In the aforementioned device information broadcasting method, when a first electronic device establishes a communication connection with a playback device, the first electronic device obtains the playback device's device information and then broadcasts the playback device's device information; the device information is used to enable a second electronic device to obtain the playback device's device information. By broadcasting the device information via the first electronic device without requiring the playback device to broadcast the information, the device information can be broadcasted, thereby reducing the power consumption of the playback device and improving its battery life.
[0059] In the following embodiments, different ways in which the first electronic device broadcasts device information are described in detail.
[0060] Figure 3 FIG. 1 is a flow chart of a method for broadcasting device information in an embodiment. This embodiment relates to a method for broadcasting device information by a first electronic device. Based on the above embodiment, Figure 3 As shown, the above S102 includes:
[0061] S201: Receive a replacement broadcast instruction sent by a playback device.
[0062] After establishing a communication connection with the first electronic device, the playback device may send a replacement broadcast instruction to the first electronic device. The replacement broadcast instruction may be used to instruct the first electronic device to broadcast the device information of the playback device in place of the playback device. The replacement broadcast instruction may include an indication field for the replacement broadcast and may also include an identifier of the first electronic device, so that the first electronic device that receives the replacement broadcast instruction executes the replacement broadcast task.
[0063] S202: In response to the replacement broadcast instruction, broadcast device information of the playback device.
[0064] After receiving the replacement broadcast instruction, the first electronic device may broadcast the device information of the playback device in response to the replacement broadcast instruction. Alternatively, after receiving the replacement broadcast instruction, the first electronic device may determine whether to execute the replacement broadcast task based on the remaining battery power of the first electronic device. When the remaining battery power of the first electronic device is greater than a preset threshold, the remaining battery power of the first electronic device can meet the power requirement for the replacement broadcast, and the first electronic device may broadcast the device information of the playback device.
[0065] When the remaining power of the first electronic device is less than the preset threshold, the remaining power of the first electronic device cannot meet the power requirement of the alternative broadcast, and the alternative broadcast instruction of the playback device can be rejected, and feedback information of rejecting the broadcast can be returned to the playback device.
[0066] In another implementation, after receiving the replacement broadcast instruction, the first electronic device may also determine whether to respond to the replacement broadcast instruction based on parameters such as the operating state of the first electronic device and the type of service currently being run.
[0067] In the above-mentioned method for broadcasting device information, after the first electronic device receives the alternative broadcast instruction of the playback device, it executes the step of broadcasting the device information of the playback device. This can avoid the situation where multiple electronic devices establish a communication connection with the playback device and broadcast the device information at the same time, causing invalid power consumption of the electronic devices, and also makes the alternative broadcast process more controllable.
[0068] Figure 4FIG. 1 is a flow chart of a method for broadcasting device information in an embodiment. This embodiment relates to another method for broadcasting device information by a first electronic device. Based on the above embodiment, Figure 4 As shown, the above S102 includes:
[0069] S301: Obtain the remaining power of the playback device.
[0070] After establishing a communication connection with the playback device, the first electronic device can obtain the remaining power of the playback device. The first electronic device can obtain the remaining power from information broadcast by the first playback device, or can obtain the remaining power based on the communication connection with the playback device, which is not limited here.
[0071] S302: When the remaining power of the playback device is less than a first power threshold, broadcast device information of the playback device.
[0072] The first electronic device may compare the remaining battery level of the playback device with a preset first battery level threshold. If the remaining battery level is less than the first battery level threshold, the first electronic device may broadcast the device information instead of the playback device. If the remaining battery level is greater than or equal to the first battery level threshold, the first electronic device may determine that the current remaining battery level of the playback device is sufficient for playback and may not broadcast the device information instead. The first electronic device may obtain the remaining battery level of the playback device in real time and, if the remaining battery level is less than the first battery level threshold, broadcast the device information instead of the playback device.
[0073] In the above-mentioned method for broadcasting device information, when the remaining power of the playback device is less than the first power threshold, the first electronic device promptly replaces the playback device to broadcast the device information, so that the playback device does not need to broadcast the device information, thereby reducing the power consumption of the playback device and extending the battery life of the playback device.
[0074] In one embodiment, the above device information can be used by the second electronic device to determine whether to initiate a connection request to the playback device based on the device information; the connection request is used by the playback device to establish a communication connection with the second electronic device based on the connection request.
[0075] The second electronic device can determine whether to initiate a connection request to the playback device based on the device information. After the second electronic device sends the connection request, if the playback device is within the transmission range of the second electronic device, it can receive the above connection request. The playback device can directly respond to the above connection request and establish a communication connection with the first electronic device; optionally, the playback device can also determine whether to switch to the second electronic device based on parameters such as the distance between the playback device and each electronic device; the above switching method is not limited here. The above connection request may include information such as the name and address of the second electronic device, so that after the playback device receives the above connection request, it can determine which electronic device sent the connection request, and thus can establish a communication connection with the second electronic device based on the address of the second electronic device.
[0076] After the playback device establishes a communication connection with the second electronic device, the second electronic device can act as the electronic device currently connected to the playback device and broadcast the device information of the playback device. The second electronic device can act as the new first electronic device and perform the task of broadcasting device information. The device information broadcast by the new first electronic device can be the device information newly generated after the playback device updates its connection status.
[0077] In the aforementioned device information broadcasting method, a playback device establishes a communication connection with a first electronic device. The first electronic device then broadcasts the device information of the playback device. When a second electronic device receives the device information, it can determine whether to initiate a connection request to the playback device based on the device information, thereby switching the connection between the first and second electronic devices. In the aforementioned device information broadcasting method, the first electronic device performs the task of broadcasting device information without requiring the playback device to perform the broadcasting itself, which can reduce the power consumption of the playback device and improve its battery life.
[0078] The above embodiment mainly introduces the process in which the second electronic device can send a connection request to the playback device based on the device information broadcast by the first electronic device. When the second electronic device sends a connection request and establishes a communication connection with the playback device, the playback device can maintain a communication connection with one electronic device. Optionally, if the above playback device has multiple functions, it can also maintain a communication connection with the first electronic device and the second electronic device at the same time. The following embodiment mainly introduces the process in which the first electronic device determines whether to continue to replace the broadcast device information when the playback device maintains a communication connection with multiple electronic devices at the same time.
[0079] In one embodiment, after the second electronic device establishes a communication connection with the playback device, the first electronic device can determine whether to send a broadcast transfer instruction to the second electronic device and / or the playback device based on the power information of the second electronic device and / or the first electronic device; wherein the above-mentioned broadcast transfer instruction is used to broadcast the device information through the second electronic device.
[0080] The power information may be the remaining power of the electronic device, the power consumption rate of the electronic device, or the battery health of the electronic device, etc. The type of power information is not limited here.
[0081] The first electronic device can determine whether to send the above-mentioned broadcast transfer instruction based on its own power information; it can also determine whether to send the above-mentioned broadcast transfer instruction based on the power information of the second electronic device; it can also determine whether to send the above-mentioned broadcast transfer instruction based on the power information of the first electronic device and the second electronic device; there is no limitation here.
[0082] The first electronic device may send the aforementioned broadcast transfer instruction to the second electronic device, instructing the second electronic device to broadcast the device information of the playback device; or the first electronic device may also send a broadcast transfer instruction to the playback device, instructing the playback device to send an alternative broadcast instruction to the second electronic device, broadcasting the device information through the second electronic device; or the first electronic device may simultaneously send a broadcast transfer instruction to the second electronic device and the playback device, with no limitation on the method of broadcasting the device information through the second electronic device. The device information broadcast by the second electronic device may be sent by the first electronic device or by the playback device, without limitation on the method.
[0083] In one implementation, the power information includes the remaining power of the electronic device. The first electronic device can obtain the first remaining power of the first electronic device and the second remaining power of the second electronic device; then, when the first remaining power is less than the second remaining power, a broadcast transfer instruction is sent to the second electronic device and / or the playback device, and the device information is broadcast through the second electronic device.
[0084] The first electronic device compares the first remaining power with the second remaining power. If the first remaining power is less than the second remaining power, the first electronic device sends a broadcast transfer instruction to the second electronic device and / or the playback device. If the first remaining power is greater than or equal to the second remaining power, the first electronic device may determine that the remaining power is sufficient compared to the second electronic device and may continue to broadcast the device information instead of the playback device.
[0085] The first electronic device selects an electronic device with more remaining power to replace the playback device to broadcast device information, so that the power consumed by the broadcast device information will not affect the normal operation of the first electronic device and the second electronic device. It can also reduce the number of switching times of the electronic device broadcasting device information, making the broadcast process of the device information of the playback device more reliable.
[0086] In one implementation, the first electronic device may obtain a first remaining power of the first electronic device; and send a broadcast transfer instruction to the second electronic device and / or the playback device when the first remaining power is less than a second power threshold.
[0087] The first electronic device can determine whether to broadcast the device information through the second electronic device based on the first remaining power of the first electronic device. If the first remaining power is less than the second power threshold, the first electronic device believes that its own power is insufficient and cannot meet the power requirements of the alternative broadcast, and can broadcast the device information through the second electronic device. The process of the first electronic device broadcasting device information through the second electronic device is as described in the previous implementation method and will not be repeated here. If the first remaining power is greater than the second power threshold, the first electronic device can believe that the remaining power can meet the power requirements of the alternative broadcast, and can continue to broadcast the device information of the alternative playback device.
[0088] The first electronic device compares the first remaining power with the second power threshold, and can broadcast device information through the second electronic device in a timely manner when its own power is insufficient, avoiding interruption of device information broadcasting and improving the connection stability between the playback device and the electronic device.
[0089] In one implementation, the first electronic device can obtain the second remaining power of the second electronic device; when the second remaining power is greater than a third power threshold, a broadcast transfer instruction is sent to the second electronic device and / or the playback device, and device information is broadcast through the second electronic device.
[0090] The first electronic device can determine whether to broadcast the device information through the second sub-device based on the second remaining power of the second electronic device. If the second remaining power is less than or equal to the third power threshold, the first electronic device believes that the power of the second electronic device is insufficient and cannot meet the power requirements of the alternative broadcast, and continues to broadcast the device information of the alternative playback device. If the second remaining power is greater than the third power threshold, the first electronic device can believe that the remaining power of the second electronic device can meet the power requirements of the alternative broadcast, and can broadcast the device information of the playback device through the second electronic device. The process of the first electronic device broadcasting device information through the second electronic device is as described in the previous implementation method and will not be repeated here.
[0091] The first electronic device compares the second remaining power with the third power threshold, and can broadcast device information through the second electronic device when the second electronic device has sufficient power. This can avoid interruption of the broadcast of device information, reduce power consumption of the first electronic device, and extend the battery life of the first electronic device.
[0092] In the above-mentioned method for broadcasting device information, the first electronic device can determine whether to broadcast the device information through the second device based on the power information of the first electronic device and / or the power information of the second electronic device. The device information can be broadcast by an electronic device with sufficient power, thereby improving the broadcast stability of the device information; further, it can also avoid the first electronic device and the second electronic device being unable to support normal operation of the device due to the broadcast of the device information.
[0093] In one embodiment, the first electronic device can determine whether to broadcast device information through the second electronic device based on the device type. After the second electronic device establishes a communication connection with the playback device, the first electronic device can obtain the device type of the second electronic device; then, based on the device type, the first electronic device can compare the broadcast priority of the first electronic device with the broadcast priority of the second electronic device; if the broadcast priority of the second electronic device is higher than the broadcast priority of the first electronic device, the first electronic device can send a broadcast transfer instruction to the second electronic device and / or the playback device, and broadcast the device information through the second electronic device.
[0094] Among them, different device types correspond to different broadcast priorities. The above-mentioned device types may be mobile phones, watches, tablet computers, etc.; the battery power levels of the above-mentioned device types are different, and the corresponding broadcast priorities are different; for example, the broadcast priority of a tablet computer is higher than that of a mobile phone, and the broadcast priority of a mobile phone is higher than that of a watch. In addition, the above-mentioned device types can also be divided according to whether the device is connected to a power source, and can be divided into electronic devices connected to a power source and electronic devices not connected to a power source; for example, the above-mentioned electronic devices connected to a power source can be mobile phones, tablet computers, etc. in a charging state, or they can be car-mounted devices. The broadcast priority of the above-mentioned electronic devices connected to a power source can be higher than the broadcast priority of electronic devices not connected to a power source.
[0095] The first electronic device may determine the broadcast priority of the first electronic device and the broadcast priority of the second electronic device based on the preset correspondence between the device type and the broadcast priority and on the basis of obtaining the device type of the first electronic device and the device type of the second electronic device.
[0096] Alternatively, the first electronic device may obtain the power connection status of the electronic device to determine the broadcast priority of the electronic device. For example, if the first electronic device is charging, it may be determined that the broadcast priority of the first electronic device is high. At this time, the first electronic device may further obtain the broadcast priority of the second electronic device, or may choose not to continue to obtain the broadcast priority of the second electronic device and choose to continue broadcasting device information to the alternative playback device.
[0097] The first electronic device may compare the broadcast priority of the first electronic device with the broadcast priority of the second electronic device; if the broadcast priority of the second electronic device is higher than the broadcast priority of the first electronic device, the device information may be broadcast through the second electronic device. If the broadcast priority of the second electronic device is lower than or equal to the broadcast priority of the first electronic device, the device information may continue to be broadcasted through the alternative playback device.
[0098] Furthermore, when the first electronic device determines whether to broadcast device information through the second electronic device based on the broadcast priority, it may also consider the remaining power of the first electronic device and / or the second electronic device to determine whether to broadcast the device information through the second electronic device. For example, if the broadcast priority of the second electronic device is higher than the broadcast priority of the first electronic device, the first electronic device may obtain the remaining power of the second electronic device. If the remaining power of the second electronic device is less than a preset threshold at this time, the first electronic device may stop broadcasting the device information through the second electronic device.
[0099] In the above-mentioned method for broadcasting device information, the first electronic device determines whether to broadcast the device information through the second electronic device according to the broadcast priority of the electronic device, so that the device information can be broadcast through the electronic device with stable power supply, thereby improving the broadcast stability of the device information.
[0100] The above embodiment mainly describes the process of selecting which electronic device to broadcast device information instead of the playback device when both the first electronic device and the second electronic device are simultaneously connected to the playback device. The following embodiment mainly describes the device information corresponding to different parameter types broadcast by the first electronic device.
[0101] In one embodiment, the above-mentioned device information may include the current service type of the playback device; the above-mentioned device information can be used by the second electronic device to send a connection request to the playback device when the playback priority of the requested service type is higher than the playback priority of the current service type.
[0102] The above-mentioned service type can be video and voice playback, or device prompt tone playback; optionally, the service types that the playback device can execute may include idle service, call service and voice playback service; the above-mentioned current service type can be any one of idle service, call service and voice playback service.
[0103] Among them, the above-mentioned playback priority may refer to the priority level when the playback device plays service data of different service types. The above-mentioned playback device can execute different service types, and different service types may correspond to different playback priorities. For example, the playback priority of the above-mentioned idle service may be the lowest, and the playback priority of the above-mentioned call service may be the highest, or the playback priority of the above-mentioned voice playback service may also be the highest. The arrangement of the above-mentioned playback priorities is not limited here. Optionally, according to the order of playback priority from high to low, the service types may be sorted as: call service, voice service, idle service.
[0104] In the above-mentioned connection method for playback devices, the device information broadcast by the first electronic device includes the current service type of the playback device, so that the second electronic device can determine whether to initiate a connection request to the playback device based on the current service type, which can avoid the second electronic device initiating a connection request affecting the currently playing service data, making the switching process of the playback device more reliable; it can avoid the playback device switching from high-priority services to low-priority services, and can ensure that the second electronic device can successfully grab the connection when it needs to play high-priority services, thereby ensuring the playback needs of high-priority services.
[0105] In one embodiment, the device information may include capability parameters of the playback device; the capability parameters are used to indicate whether the playback device allows device access; the device information is used by the second electronic device to send a connection request to the playback device when the capability parameters indicate that the playback device allows device access.
[0106] The above-mentioned capability parameter can be used to characterize whether the playback device allows device access. The above-mentioned capability parameter can indicate whether the playback device allows device access through an identifier. For example, "1" can be used to indicate that device access is allowed, so that the second electronic device that receives the above-mentioned device information can know that the number of communication connections between the above-mentioned playback device and the electronic device is not saturated; the above-mentioned capability parameter can be used to indicate that device access is not allowed through "0", so that the second electronic device that receives the above-mentioned device information can know that the number of communication connections between the playback device and the electronic device is not saturated. In another possible implementation, the above-mentioned capability parameter can also be the number of devices allowed to access, and "0" can be used to indicate that the number of communication connections between the above-mentioned playback device and the electronic device is saturated; "1" can be used to indicate that the playback device can also establish a communication connection with an electronic device; the identification method of the above-mentioned capability parameter is not limited here.
[0107] In another possible implementation, the above-mentioned capability parameters may include whether the playback device supports simultaneous connection to multiple electronic devices, i.e., one-to-many capability, and may also include the number of electronic devices currently connected to the playback device. If the playback device supports one-to-many capability in the above-mentioned capability parameters, and the playback device currently has not established a communication connection with the electronic device, or has established a communication connection with one electronic device, then the second electronic device may deem that the playback device allows device access. If the playback device supports one-to-many capability in the above-mentioned capability parameters, and has established a communication connection with multiple electronic devices, and the number of connected electronic devices is saturated, then the second electronic device may deem that the playback device does not allow device access. If the playback device does not support one-to-many capability in the above-mentioned capability parameters, and the playback device currently has not established a communication connection with the electronic device, then the second electronic device may deem that the playback device allows device access. If the playback device does not support one-to-many capability in the above-mentioned capability parameters, and the playback device has established a communication connection with one electronic device, then the second electronic device may deem that the playback device does not allow device access.
[0108] After the second electronic device receives the above-mentioned current device information, it can directly initiate a connection request to the playback device if the capability parameter indicates that the playback device allows the device to access. Alternatively, the second electronic device can also combine the capability parameter with other types of device information to jointly determine whether to send a connection request to the playback device. For example, the above-mentioned other types of device information also include the remaining power of the playback device. The second electronic device can send a connection request to the playback device if it determines that the playback device allows the device to access and the remaining power is greater than a preset threshold. Optionally, the second electronic device can also determine whether to send a connection request to the playback device based on its own business needs and the capability parameters of the playback device. For example, the second electronic device can use the capability parameter to indicate that the playback device allows access, and when the second electronic device is in an idle state, it does not send a connection request to the playback device.
[0109] In the above-mentioned method for broadcasting device information, the device information broadcast by the first electronic device includes the capability parameters of the playback device, so that the second electronic device can send a connection request to the playback device when the capability parameters indicate that the playback device allows the device to access. After the playback device receives the connection request sent by the second electronic device, since the above-mentioned connection request is sent by the second electronic device based on the device information, the connection request can be used to establish a communication connection with the second electronic device without disconnecting the communication connection with the currently connected electronic device, that is, a communication connection can be established with the second electronic device, which simplifies the switching process of the playback device and reduces the connection delay between the second electronic device and the playback device.
[0110] In one embodiment, the device information broadcast by the first electronic device may include the capability parameters of the playback device and the current service type of the playback device, allowing the second electronic device to send a connection request to the playback device when the playback priority of the requested service type is higher than the playback priority of the current service type, or when the capability parameters indicate that the playback device allows the device to access. This method of broadcasting device information can prevent the second electronic device from initiating a connection request from affecting the currently playing service data, making the switching process of the playback device more reliable.
[0111] Figure 5 FIG. 1 is a flow chart of a method for broadcasting device information in one embodiment. The method for broadcasting device information in this embodiment is to run on Figure 1 The second electronic device in the example is used for description. Figure 5 As shown, the above method includes:
[0112] S401: Receive device information broadcast by a first electronic device; the first electronic device is a device that currently establishes a communication connection with a playback device.
[0113] The specific limitations of the above-mentioned device information and communication connection are described in the above-mentioned embodiments and will not be repeated here. Based on the above-mentioned communication connection, the first electronic device can obtain the device information of the above-mentioned playback device. After the playback device broadcasts the device information through the first electronic device, the second electronic device within the broadcast reception range of the first electronic device can receive the above-mentioned current device information.
[0114] S402: Determine whether to send a connection request to the playback device based on the device information; the connection request is used by the playback device to establish a communication connection with the second electronic device based on the connection request.
[0115] The second electronic device can determine whether to initiate a connection request to the auxiliary playback device based on the device information. The above connection request may include the name, address and other information of the second electronic device. After receiving the current device information, the second electronic device can directly initiate a connection request to the playback device; or after receiving the device information, it can determine whether to initiate a connection request based on the content carried in the current device information, which is not limited here. In addition, the second electronic device can also determine whether to initiate a connection request to the playback device based on its own playback needs. The second electronic device can initiate a connection request to the playback device when there is a playback service. If the second electronic device is in an idle state, it can not respond to the device information after receiving the device information.
[0116] The second electronic device may initiate the connection request in an idle state or in a service playing state, which is not limited here.
[0117] Among them, the above-mentioned connection request may include the identification of the second electronic device, so that the playback device can know which device sends the connection request; the above-mentioned connection request may also include the address of the second electronic device, so that the playback device can establish a communication connection with the second electronic device through the address.
[0118] After receiving the connection request sent by the second electronic device, the playback device may establish a communication connection with the second electronic device according to the connection request.
[0119] In the aforementioned device information broadcasting method, after the playback device establishes a communication connection with a first electronic device, the playback device's device information is broadcasted via the first electronic device. When a second electronic device receives the device information, it can determine whether to initiate a connection request to the playback device based on the device information, thereby switching the playback device's connection between the first and second electronic devices. By broadcasting the current device information via the first electronic device, without requiring the playback device to broadcast itself, the playback device's power consumption can be reduced, thereby improving its battery life.
[0120] In one embodiment, the device information may include capability parameters of the playback device. For specific definitions of the capability parameters, refer to the above embodiment and will not be described in detail here.
[0121] The second electronic device can determine whether to send a connection request to the playback device based on the capability parameter, and send a connection request to the playback device if the capability parameter indicates that the playback device allows the device to access.
[0122] In one implementation, the second electronic device can also determine whether to send a connection request to the playback device based on the playback requirements and capability parameters. If the second electronic device currently has no service playback requirements, it can read the capability parameters and initiate a connection request when the capability parameters indicate that the playback device allows the device to access. If the second electronic device currently has service playback requirements, it can determine whether to initiate a connection request to the playback device based on the requested service type corresponding to the service playback requirement and the above-mentioned capability parameters. For example, when the service playback requirement of the above-mentioned second electronic device is a call service, it is possible to directly initiate a connection request to the playback device without reading the capability parameters.
[0123] If the capability parameter indicates that the playback device does not allow device access, the second electronic device may temporarily stop initiating a connection request to the playback device, wait for the capability parameter in the current device information broadcast by the playback device to allow device access, and then initiate a connection request to the playback device.
[0124] In the above-mentioned connection method for playback devices, after receiving the device information, the second electronic device initiates a connection request to the playback device when the capability parameters indicate that the playback device allows the device to access, without having to initiate a connection request again when the second electronic device has a business playback requirement, so that the second electronic device and the playback device can establish a connection request in advance in an idle state; when the second electronic device has a business playback requirement, it can directly send business data to the playback device and perform the business playback task without waiting for the communication connection process, further simplifying the switching process of the playback device and reducing the device switching delay.
[0125] In one embodiment, the device information may include the current service type of the playback device, which can be used to trigger the second electronic device to determine whether to initiate a connection request to the playback device based on the current service type and the requested service type of the second electronic device. The specific definition of the service type is described in the above embodiment and is not further described here.
[0126] In one optional implementation, after receiving the device information, the second electronic device can extract the current service type from the device information and then compare it with the requested service type to be played by the second electronic device to determine whether to initiate a connection request to the playback device. When comparing the current service type with the requested service type, the second electronic device can first determine whether the current service type and the requested service type are the same. If the service types are the same, the second electronic device can choose to initiate a connection request to the playback device or not. In addition, the second electronic device can also determine whether to initiate a connection request to the playback device based on the service type and device type.
[0127] In the above-mentioned linking method for playback devices, after the playback device broadcasts device information through the first electronic device, the second electronic device can determine whether to initiate a connection request to the playback device based on the current service type and the requested service type, so that a communication connection with the playback device can be established after the connection request is initiated, avoiding the second electronic device from initiating invalid connection requests multiple times, thereby improving the efficiency of establishing a communication connection between the second electronic device and the playback device.
[0128] In another optional implementation, the above-mentioned device information can be used to trigger the second electronic device to initiate a connection request to the playback device when the playback priority of the requested service type is higher than the playback priority of the current service type. The specific definition of the above-mentioned playback priority is given in the above-mentioned embodiment and is not repeated here. After receiving the device information, the second electronic device can compare the playback priority of the current service type with the playback priority of the requested service type. The manner in which the second electronic device initiates a connection request may include the following situations.
[0129] (1) If the playback priority of the requested service type is higher than the playback priority of the current service type, a connection request is initiated to the playback device.
[0130] (2) If the playback priority of the requested service type is equal to or lower than the playback priority of the current service type, no connection request is initiated to the playback device.
[0131] (3) When the second electronic device is currently in an idle state, the second electronic device may not compare the playback priority of the current service type with the playback priority of the requested service type, and directly determine not to initiate a connection request to the playback device.
[0132] The above-mentioned method of broadcasting device information includes the current service type in the device information, so that the second electronic device can initiate a connection request to the playback device when the playback priority of the requested service type is higher than the playback priority of the current service type; it can not only avoid the playback device from switching from a high-priority service to a low-priority service, but also ensure that the second electronic device can successfully grab the connection when it needs to play a high-priority service, thereby ensuring the playback needs of the high-priority service.
[0133] In one embodiment, the device information may include capability parameters of the playback device and the current service type of the playback device. The second electronic device may determine whether to send a connection request to the playback device based on the capability parameters of the playback device and the current service type of the playback device.
[0134] The second electronic device can send a connection request to the playback device when the current service type is a preset service type and the capability parameter indicates that the playback device allows the device to access. For example, the second electronic device can determine whether to initiate a connection request based on the capability parameter of the playback device in an idle state; if the capability parameter indicates that the playback device allows the device to access, the second electronic device initiates a connection request to the playback device; when the service playback requirement of the above-mentioned second electronic device is a call service, the capability parameter can be not read and a connection request can be directly initiated to the playback device. Alternatively, the second electronic device can compare the current service type with the requested service type of the second electronic device, and determine whether to initiate a connection request to the playback device based on the playback priority and capability parameters of each electronic device.
[0135] Optionally, the second electronic device may send a connection request to the playback device when the playback priority of the requested service type is higher than the playback priority of the current service type, or when the capability parameter indicates that the playback device allows the device to access.
[0136] Regarding the specific process of the second electronic device determining whether to send a connection request to the playback device based on the capability parameters and comparing the playback priority of the current service type and the requested service type, the process of the second electronic device judging the access allowed status of the playback device based on the capability parameters, and the process of judging the playback priority of the current service type and the requested service type, different judgment orders can be adopted. The following embodiments introduce the process of determining the connection request under different judgment orders respectively.
[0137] In one implementation, the second electronic device may first judge the playback priority of the current service type and the requested service type, and the second electronic device may determine whether the playback priority of the requested service type of the second electronic device is higher than the playback priority of the current service type. When the playback priority of the requested service type is equal to or lower than the playback priority of the current service type, the capability parameter in the device information is read, and when the capability parameter indicates that the playback device allows the device to access, a connection request is sent to the playback device. If the playback priority of the requested service type is equal to or lower than the playback priority of the current service type, and the capability parameter indicates that the playback device allows the device to access, the second electronic device may initiate a connection request to the playback device. If the playback priority of the requested service type is equal to or lower than the playback priority of the current service type, and the capability parameter indicates that the playback device does not allow the device to access, the second electronic device does not initiate a connection request to the playback device.
[0138] If the playback priority of the requested service type is higher than the playback priority of the current service type, the second electronic device can directly initiate a connection request to the playback device. In this case, the second electronic device does not need to read the capability parameters of the playback device. In other words, regardless of whether the playback device currently allows other devices to access, the second electronic device can directly initiate a connection request to the playback device.
[0139] When the playback priority of the requested service type is higher than the playback priority of the current service type, the second electronic device directly initiates a connection request to the playback device. This can avoid the second electronic device needing to play high-priority service data and executing the steps of reading capability parameters and determining whether to initiate a connection request based on the capability parameters, thereby ensuring the playback needs of high-priority services.
[0140] In another implementation, the second electronic device may first determine the access permission status of the playback device. If the capability parameter indicates that the playback device allows device access, the second electronic device may send a connection request to the playback device.
[0141] If the second electronic device determines, based on the capability parameter, that the playback device does not allow device access, the second electronic device may further compare the playback priority of the requested service type with the playback priority of the current service type. If the playback priority of the requested service type is higher than the playback priority of the current service type, the second electronic device sends a connection request to the playback device; if the playback priority of the requested service type is lower than or equal to the playback priority of the current service type, the second electronic device does not send a connection request to the playback device.
[0142] After receiving the device information, the second electronic device directly sends a connection request to the playback device when the capability parameter indicates that the playback device allows the device to access, thereby improving the efficiency of sending connection requests in this scenario; further, when the second electronic device determines that the playback device does not allow the device to access, it compares the playback priority of the requested service type with the playback priority of the current service type, so that when the requested service type is a high-priority service and the playback device and the connection are saturated, the second electronic device can send a connection request to the playback device, so that the playback device can establish a communication connection with the second electronic device according to the connection request, thereby ensuring the playback needs of high-priority services.
[0143] In one embodiment, based on the above embodiment, the above connection request is also used to switch between the business data of the second electronic device and the currently played business data according to the current business type and the requested business type of the second electronic device after the playback device establishes a communication connection with the second electronic device.
[0144] When the playback device establishes a communication connection with the second electronic device, the second electronic device can send business data to the playback device, and the business data of the second electronic device can be played through the playback device; alternatively, the above-mentioned second electronic device can also be in an idle state and maintain a connection with the playback device.
[0145] Among them, the above-mentioned business data can be audio data or video data, which is not limited here. The above-mentioned audio data can be data of call services or data of voice playback services. The above-mentioned call service data can be business data in scenarios such as telephone calls, voice calls, and video calls. The playback device can play the call data sent by the peer device to the user, or it can collect the user's call data and send it to the second electronic device, and then send it to the peer device through the second electronic device. The data of the above-mentioned voice playback service can be music played in the second electronic device, recorded audio data, audio data in a video file, etc., and the data type of the above-mentioned voice playback service is not limited here.
[0146] The second electronic device can send a request for a service type to the playback device through a connection request, so that the playback device can switch between the service data of the second electronic device and the service data currently being played based on the request for the service type and the current service type. Alternatively, after establishing a communication connection with the playback device, the second electronic device can send a request for a service type to the playback device through a service playback request, so that the playback device can request the service type and the current service type to switch between the service data of the second electronic device and the service data currently being played. The timing of switching the above-mentioned service data is not limited here.
[0147] In the above-mentioned method of broadcasting device information, the second electronic device can directly carry the requested service type when initiating a connection request, or it can send the requested service type to the playback device through a service data playback request after establishing a communication connection with the playback device, so that the playback device can switch between the service data of the second electronic device and the currently played service data in a timely manner, so that the playback device can realize the switching of service data more flexibly.
[0148] The following embodiments mainly introduce some specific implementation processes of the second electronic device when the second electronic device initiates a connection request to the playback device but fails to establish a communication connection with the playback device.
[0149] In one embodiment, when the playback device receives connection requests initiated by multiple second electronic devices, it can establish a virtual connection with other second electronic devices when a communication connection is established with one of the second electronic devices. The above-mentioned virtual connection is used to characterize that the other second electronic devices are within the connection range of the playback device. For the specific definition of the virtual connection, please refer to the above embodiment and will not be repeated here. The second electronic device can establish a virtual connection with the playback device when sending a connection request to the playback device and has not established a communication connection with the playback device.
[0150] The playback device may send a virtual connection indication to the other second electronic device, and the second electronic device may establish a virtual connection with the playback device based on the virtual connection indication after receiving the virtual connection indication sent by the playback device.
[0151] After receiving the updated device information broadcast by the electronic device communicatively connected to the playback device, the second electronic device can determine whether the virtual connection with the playback device remains connected; if so, determine whether to send a connection request to the playback device again.
[0152] After the second electronic device (assuming it is the second electronic device A) establishes a communication connection with the playback device, the second electronic device can broadcast device information as the new first electronic device. When the second electronic device (assuming it is the second electronic device B) that is not communicatively connected with the playback device receives the above device information, it can first determine whether the virtual connection between the second electronic device B and the playback device is in a maintained connection state. If so, the second electronic device B believes that the distance between the playback device and itself is less than a preset threshold and can receive a connection request, and then determines whether to initiate a connection request to the playback device based on the device information. If the virtual connection between the second electronic device B and the playback device is disconnected, the second electronic device believes that the distance to the playback device is far, and does not initiate a connection request to the playback device.
[0153] In the above-mentioned method of broadcasting device information, before the second electronic device initiates a connection request to the playback device, it first determines whether the virtual connection with the playback device is in a connected state. When it is virtually connected to the playback device, it initiates a connection request to the playback device. This can avoid the situation where the second electronic device is close to the current first electronic device but far away from the playback device and has exceeded the connection range, and initiates an invalid connection request, thereby increasing the success rate of the communication connection between the second electronic device and the playback device.
[0154] Figure 6 FIG. 1 is a flow chart of a method for broadcasting device information in one embodiment. The method for broadcasting device information in this embodiment is to run on Figure 1 This article describes the playback device in the example. Figure 6 As shown, the above method includes:
[0155] S501: Obtain the remaining power of the playback device.
[0156] The playback device can obtain the remaining power of the playback device based on the device operating parameters. The remaining power can be a percentage of the remaining power to the battery power, or the remaining time that the current power can support the playback device to operate, which is not limited here.
[0157] S502: When the remaining power is less than a first power threshold, send an alternative broadcast instruction to a first electronic device; the first electronic device is a device that currently establishes a communication connection with the playback device; the alternative broadcast instruction is used to instruct the first electronic device to broadcast device information of the playback device.
[0158] The replacement broadcast instruction can be used to instruct the first electronic device to broadcast the device information of the playback device in place of the playback device. The replacement broadcast instruction can include an indication field for the replacement broadcast and can also include an identifier of the first electronic device, so that the first electronic device that receives the replacement broadcast instruction executes the replacement broadcast task. For the definition of the device information and communication connection, refer to the above embodiment and are not further described here.
[0159] The playback device may compare the remaining battery level with a first battery threshold. If the remaining battery level is less than the first battery threshold, the playback device may determine that its battery level is insufficient and may send an alternative broadcast instruction to the first device. If the remaining battery level is greater than or equal to the first battery threshold, the playback device may broadcast its own device information.
[0160] In the above-mentioned method for broadcasting device information, when the remaining power of the playback device is less than the first power threshold, the first electronic device replaces the playback device in broadcasting the device information, so that the playback device does not need to broadcast the device information, thereby reducing the power consumption of the playback device and extending the battery life of the playback device.
[0161] In one embodiment, the device information can be used by the second electronic device to determine whether to initiate a connection request to the playback device based on the device information; the connection request is used by the playback device to establish a communication connection with the second electronic device based on the connection request. The specific definition of the connection request is described in the above embodiment and is not further described here.
[0162] The second electronic device can determine whether to initiate a connection request to the playback device based on the device information. After the second electronic device sends the connection request, if the playback device is within the transmission range of the second electronic device, it can receive the above connection request. The playback device can directly respond to the above connection request and establish a communication connection with the first electronic device; optionally, the playback device can also determine whether to switch to the second electronic device based on parameters such as the distance between the playback device and each electronic device; the above switching method is not limited here. After the playback device establishes a communication connection with the second electronic device, the second electronic device can serve as the electronic device currently connected to the playback device and broadcast the device information of the playback device. The second electronic device can serve as a new first electronic device and perform the task of broadcasting device information. The device information broadcast by the new first electronic device can be the device information regenerated after the playback device updates the connection status.
[0163] In the aforementioned device information broadcasting method, a playback device establishes a communication connection with a first electronic device. The first electronic device then broadcasts the device information of the playback device. When a second electronic device receives the device information, it can determine whether to initiate a connection request to the playback device based on the device information, thereby switching the connection between the first and second electronic devices. In the aforementioned device information broadcasting method, the first electronic device performs the task of broadcasting device information without requiring the playback device to perform the broadcasting itself, which can reduce the power consumption of the playback device and improve its battery life.
[0164] After the playback device receives the connection request sent by the second electronic device, it can determine whether to establish a communication connection with the second electronic device based on the connection request and the status of the playback device allowing device access. If the above connection request is initiated by the second electronic device when the playback device allows device access, then the playback device can establish a communication connection with the second electronic device after receiving the connection request. If the above connection request is initiated by the second electronic device without determining whether the playback device allows device access, or when it is determined that the playback device does not allow device access, then the playback device can determine whether the playback device currently allows device access after receiving the connection request, and then determine whether to establish a communication connection with the second electronic device based on the status.
[0165] After the playback device establishes a communication connection with the second electronic device, the number of devices and service types established with the playback device may change. The playback device can update the device information of the playback device and broadcast the updated capability parameters to other electronic devices.
[0166] In one embodiment, the playback device may receive a connection request sent by one or more second electronic devices. After receiving the connection request, the playback device can determine whether the current number of connections is less than a preset number threshold; if the current number of connections of the playback device is less than the connection number threshold, a communication connection is established with the second electronic device.
[0167] If the number of current connections of the playback device is greater than the connection number threshold, then the playback device may not establish a communication connection with the second electronic device, or may further determine whether to establish a communication connection with the second electronic device based on other information of the electronic device. For example, the playback device may determine based on the historical connection times of the electronic device. If the historical connection times of the second electronic device are greater than the preset number threshold, then the playback device may deem that the second electronic device is an electronic device frequently used by the user, and the playback device may disconnect the communication connection with one of the electronic devices, and then establish a communication connection with the second electronic device. In addition, the above-mentioned other information may also be the device type of the second electronic device, the historical connection duration of the second electronic device, etc., which are not limited here. If the device type of the second electronic device is the device type with the highest device priority, then the playback device disconnects the communication connection with one of the electronic devices and establishes a communication connection with the second electronic device; or, if the device priority of the second electronic device is higher than the device priority of the electronic device to which the playback device is currently connected, then the playback device disconnects the communication connection with one of the electronic devices and establishes a communication connection with the second electronic device.
[0168] After establishing a communication connection with the second electronic device, the playback device can promptly update the device information of the playback device, such as updating the number of connectable playback devices or updating the capability parameters of the playback device, so that other electronic devices receiving the device information can accurately know whether the playback device allows device access.
[0169] In the above-mentioned method for broadcasting device information, after the playback device receives a connection request from the second electronic device, it can directly establish a communication connection with the second electronic device if the playback device allows the device access, further simplifying the process of establishing a communication connection with the second electronic device and improving the connection efficiency of the second electronic device.
[0170] In one embodiment, the connection request sent by the second electronic device to the playback device may include the requested service type of the second electronic device. When determining whether to establish a communication connection with the second electronic device, the playback device may also determine whether to establish a communication connection with the second electronic device based on the requested service type. The playback device may establish a communication connection with the second electronic device if the playback priority of the requested service type is higher than the playback priority of the current service type, or if the playback device allows the device to access.
[0171] The specific limitations of the above service types and playback priorities refer to the above embodiments and will not be elaborated here.
[0172] With the above-mentioned method for broadcasting device information, the playback device can determine from multiple dimensions whether to establish a communication connection with the second electronic device based on the requested service type of the second electronic device and the status of whether the playback device allows device access, thereby improving the reliability of the connection with the second electronic device.
[0173] The following embodiments mainly describe a specific process in which, after receiving a connection request, the playback device determines whether to establish a communication connection with the second electronic device based on the requested service type and the status of whether the playback device allows device access.
[0174] In one embodiment, the playback device may first compare the playback priority of the requested service type with the playback priority of the current service type to determine whether the playback priority of the requested service type is higher than the playback priority of the current service type. If the playback priority of the requested service type is higher than the playback priority of the current service type, the playback device may establish a communication connection with the second electronic device. If the number of devices currently connected to the playback device is less than a quantity threshold, the playback device directly establishes a communication connection with the second electronic device; if the number of devices currently connected to the playback device is equal to the quantity threshold, the playback device may disconnect the communication connection with one of the electronic devices and establish a communication connection with the second electronic device. If the playback priority of the requested service type is equal to or lower than the playback priority of the current service type, the playback device may further determine whether the playback device allows the device to access. The playback device may determine the number of connected playback devices based on the current connection status, that is, the number of electronic devices that have currently established communication connections. Furthermore, the playback device may compare the number of connections with the connection quantity threshold to determine whether the current connection of the playback device is saturated. If the number of connected playback devices is less than the connection quantity threshold, a communication connection is established with the second electronic device; if the number of connected playback devices is equal to the connection quantity threshold, a communication connection is not established with the second electronic device.
[0175] In the above-mentioned device information broadcasting method, when the playback priority of the requested service type is higher, the playback device directly determines to establish a communication connection with the second electronic device, simplifies the connection process of the second electronic device, and enables the service with higher playback priority to be played in time.
[0176] In one embodiment, after receiving the connection request, the playback device may first obtain the number of connections of the playback device and determine whether the number of connections of the playback device is less than the connection number threshold. If the current number of connections of the playback device is less than the connection number threshold, the current connection of the playback device is not saturated, and a communication connection can be directly established with the second electronic device. If the current number of connections of the playback device is equal to the connectable number threshold, that is, the number of connections of the playback device is saturated, the playback device can establish a communication connection with the second electronic device if the playback priority of the requested service type is higher than the playback priority of the current service type of the playback device.
[0177] The playback device can disconnect the communication connection of one of the connected electronic devices, and then establish a communication connection with the second electronic device. The playback device can select a target electronic device to disconnect from among the currently connected electronic devices. The target electronic device to be disconnected can be an electronic device randomly selected by the playback device; or, the target electronic device can be the electronic device with the shortest connection time with the playback device; or, the target electronic device can be the electronic device with the least number of connections with the playback device; or, the target electronic device can be the electronic device with the lowest device priority among all connected devices. The method for selecting the target electronic device is not limited here. Optionally, among the electronic devices currently connected to the playback device, the playback device can select the target electronic device with the lowest playback priority of the service type; disconnect the communication connection with the target electronic device, and establish a communication connection with the second electronic device.
[0178] In the above-mentioned method for broadcasting device information, after receiving a connection request, the playback device directly establishes a communication connection with the second electronic device if other devices can be allowed to access; if other devices are not allowed to access, the playback device can determine whether to establish a communication connection with the second electronic device based on the playback priority of the service type, so that when the playback priority of the requested service type of the second electronic device is higher, a communication connection can be established with the playback device, thereby ensuring the playback needs of high-priority services.
[0179] When the playback device establishes communication connections with the first electronic device and the second electronic device at the same time, a target device for alternative broadcasting can be selected from the first electronic device and the second electronic device; an alternative broadcast instruction is sent to the target device to broadcast the device information of the playback device through the target device.
[0180] Among them, the playback device can randomly select a target device from the first electronic device and the second electronic device to replace the broadcast device information, or the playback device can select a target device closest to the playback device from the first electronic device and the second electronic device to replace the broadcast device information; the method for selecting the target device is not limited here.
[0181] The following embodiments mainly introduce several ways for a playback device to determine a target device when the playback device maintains communication connections with multiple electronic devices at the same time.
[0182] In one embodiment, the playback device may select the device with the largest remaining power among the first electronic device and the second electronic device as the target device.
[0183] In the above-mentioned method for broadcasting device information, the playback device selects an electronic device with more remaining power to replace the playback device to broadcast the device information, so that the power consumed by the broadcast device information will not affect the normal operation of the first electronic device and the second electronic device. It can also reduce the number of switching times of the electronic device broadcasting the device information, making the broadcast process of the device information of the playback device more reliable.
[0184] In one embodiment, the playback device can obtain the device type of the second electronic device and the device type of the first electronic device; then, based on the device type, compare the broadcast priority of the first electronic device and the broadcast priority of the second electronic device; and determine the electronic device with the highest broadcast priority as the target device.
[0185] For the specific limitations of the above-mentioned device types and broadcast priorities, please refer to the above-mentioned embodiments and will not be described in detail here.
[0186] In the above-mentioned method for broadcasting device information, the playback device determines the target device according to the broadcast priority of the electronic device, so that the device information can be broadcast through the electronic device with stable power supply, thereby improving the broadcast stability of the device information.
[0187] The above embodiments mainly describe the specific process of establishing a communication connection between the playback device and the second electronic device after receiving a connection request. The following embodiments mainly describe the process of selecting which electronic device's service data to play after the playback device establishes a communication connection with the second electronic device.
[0188] After establishing a communication connection with the second electronic device, the playback device can continue to play the current business data; it can also determine whether to switch to playing the business data of the second electronic device based on a connection request sent by the second electronic device. In another implementation, the second electronic device and the playback device can maintain a communication connection, and when the second electronic device has a business playback request, it sends a business playback request to the playback device. The playback device can determine whether to switch to playing the business data of the second electronic device based on the business playback request.
[0189] In one embodiment, after the second electronic device determines that the playback priority of the requested service type is higher than the playback priority of the current service type and initiates a connection request, the playback device can send a service pause instruction to the electronic device corresponding to the currently playing service data, or mute the currently playing service data; and then select to play the service data corresponding to the requested service type of the second electronic device. The above-mentioned service pause instruction is used to instruct the electronic device corresponding to the currently playing service data to stop sending service data to the playback device; the above-mentioned mute processing means that the electronic device corresponding to the currently playing service data can continue to send service data to the playback device, but the playback device will not play the service data.
[0190] In the above-mentioned method of broadcasting device information, when the playback priority of the requested service type of the second electronic device is higher than the current service type, the playback device can directly switch to playing the service data of the second electronic device after receiving the connection request, thereby reducing the switching delay of data playback, thereby quickly responding to the user's high-priority needs.
[0191] In one embodiment, when the playback priority of the current service type is lower than the playback priority of the requested service type, the playback device may send a service pause instruction to the electronic device corresponding to the currently playing service data, or mute the currently playing service data; and then play the service data corresponding to the requested service type of the second electronic device. If the playback priority of the current service type is higher than or equal to the playback priority of the requested service type, the playback device may send a service pause instruction to the second electronic device, causing the second electronic device to stop sending service data to the playback device.
[0192] In the above-mentioned method for broadcasting device information, the playback device determines whether to play the business data of the second electronic device based on the comparison result of the playback priority of the current business type and the playback priority of the requested business type, so that when the second electronic device has a high-priority business to play, the playback device can promptly switch to playing the business data of the second electronic device; and, when the playback priority of the current business type is higher, the second electronic device is prevented from sending business data, thereby ensuring the playback needs of high-priority business.
[0193] For example, a Bluetooth headset is used as a playback device. The Bluetooth headset establishes a communication connection with a first electronic device (device A), and the device information broadcast by the first electronic device includes the current service type. Secondary electronic devices that receive the broadcast may include devices B, C, ..., and N. The following embodiments describe in detail the device information broadcasting methods for different application scenarios.
[0194] In one application scenario, after the Bluetooth headset establishes a communication connection with the first electronic device (device A), devices A, B, ..., and N are all in an idle state. Figure 7 As shown, the above-mentioned method for broadcasting device information includes:
[0195] S601: The Bluetooth headset sends a replacement broadcast instruction to the first electronic device;
[0196] S602: The first electronic device broadcasts the device information of the Bluetooth headset via BLE.
[0197] After receiving the BLE broadcast, the second electronic device does not initiate a connection to the Bluetooth headset because it currently has no business need to use the Bluetooth headset.
[0198] In an application scenario, the current service type of the first electronic device is a voice playback service or a call service, and the second electronic devices such as device B and device N are all in an idle state. Figure 8 As shown, the above-mentioned method for broadcasting device information includes:
[0199] S701: The Bluetooth headset sends a replacement broadcast instruction to the first electronic device;
[0200] S702: The first electronic device broadcasts the device information of the Bluetooth headset via BLE.
[0201] S703: The second electronic device determines whether the Bluetooth headset allows device access based on the device information; if so, execute S704; if not, end the process;
[0202] S704: The second electronic device initiates a connection request to the Bluetooth headset;
[0203] S705. The Bluetooth headset determines whether the number of connections is less than the connection number threshold. If so, execute S706; if not, end the process.
[0204] S706: The Bluetooth headset establishes a communication connection with the second electronic device;
[0205] S707: The Bluetooth headset updates device information and sends it to the first electronic device;
[0206] S708: The first electronic device broadcasts updated device information.
[0207] In one application scenario, after the Bluetooth headset establishes a communication connection with the first electronic device (device A), device A is in an idle state, and the service type requested by the second electronic device (device B) is a voice playback service or a call service. Figure 9 As shown, the above-mentioned method for broadcasting device information includes:
[0208] S801. The Bluetooth headset sends a replacement broadcast instruction to the first electronic device;
[0209] S802: The first electronic device broadcasts the device information of the Bluetooth headset via BLE.
[0210] S803, the second electronic device determines whether the playback priority of the requested service type is higher than the playback priority of the current service type, if so, execute S805; if not, execute S804;
[0211] S804: The second electronic device determines whether the Bluetooth headset allows device access; if so, execute S805; if not, end the process;
[0212] S805: The second electronic device initiates a connection request to the Bluetooth headset;
[0213] S806. The Bluetooth headset determines whether the number of connections is less than the connection number threshold. If so, execute S807; if not, end the process.
[0214] S807: The Bluetooth headset establishes a communication connection with the second electronic device;
[0215] S808: The Bluetooth headset updates device information and sends it to the first electronic device;
[0216] S809: The first electronic device broadcasts updated device information.
[0217] In an application scenario, after a Bluetooth headset establishes a communication connection with device A, the current service type of device A is a low-priority voice service (such as a voice playback service), and the playback priority of the service type requested by device B is higher than the current service type (such as a call service). Figure 10 As shown, the above-mentioned method for broadcasting device information includes:
[0218] S901. The Bluetooth headset sends a replacement broadcast instruction to the first electronic device;
[0219] S902: The first electronic device broadcasts the device information of the Bluetooth headset via BLE;
[0220] S903, the second electronic device determines whether the playback priority of the requested service type is higher than the playback priority of the current service type, if so, execute S905; if not, execute S904;
[0221] S904: The second electronic device determines whether the Bluetooth headset allows device access; if so, execute S905; if not, end the process;
[0222] S905: The second electronic device initiates a connection request to the Bluetooth headset;
[0223] S906. The Bluetooth headset determines whether the number of connections is less than the connection number threshold. If so, execute S907; if not, end the process.
[0224] S907: The Bluetooth headset establishes a communication connection with the second electronic device;
[0225] S908. The Bluetooth headset updates device information and sends it to the first electronic device;
[0226] S909: The first electronic device broadcasts updated device information;
[0227] S910, the Bluetooth headset determines whether the playback priority of the current service type is lower than the playback priority of the requested service type, and if so, executes S911; if not, keeps playing the current service data;
[0228] S911. The Bluetooth headset plays service data corresponding to the requested service type of the second electronic device;
[0229] S912. The Bluetooth headset sends a service pause instruction to the electronic device corresponding to the currently playing service data, or mutes the currently playing service data.
[0230] The implementation principle and technical effects of the method for broadcasting device information in the above embodiment are similar to those in the above embodiment and will not be described in detail here.
[0231] In one embodiment, a method for broadcasting device information is provided, such as Figure 11 As shown, the above method includes:
[0232] S1001: The playback device sends a replacement broadcast instruction to the first electronic device;
[0233] S1002: The first electronic device obtains device information of a playback device;
[0234] S1003: The first electronic device broadcasts device information of the playback device;
[0235] S1004: The second electronic device determines whether to send a connection request to the playback device based on the device information; if so, execute S1005;
[0236] S1005: The second electronic device sends a connection request to the playback device;
[0237] S1006: The playback device establishes a communication connection with the second electronic device according to the connection request;
[0238] S1007: The first electronic device obtains the device type of the second electronic device;
[0239] S1008. The first electronic device compares the broadcast priority of the first electronic device with the broadcast priority of the second electronic device based on the device type; if the broadcast priority of the second electronic device is higher than the broadcast priority of the first electronic device, execute S1009;
[0240] S1009: The first electronic device sends a broadcast transfer instruction to the second electronic device;
[0241] S1010: The second electronic device broadcasts device information of the playback device.
[0242] Regarding the above-mentioned method for broadcasting device information, the specific definitions of steps S1001-S11010 refer to the above-mentioned embodiment. The technical effects of this embodiment are similar to those of the above-mentioned embodiment and are not described in detail here.
[0243] It should be understood that although Figure 2-11 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. In addition, Figure 2-11 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0244] Figure 12 The above device is applied to a playback device, and is applied to a first electronic device, wherein the first electronic device and the playback device have a communication connection, such as Figure 12 As shown, the above device includes:
[0245] An acquisition module 110 is configured to acquire device information of the playback device;
[0246] The broadcast module 120 is configured to broadcast the device information of the playback device; wherein the device information is used to enable a second electronic device to obtain the device information of the playback device.
[0247] In one embodiment, based on the above embodiment, the broadcast module 120 is specifically configured to: receive a replacement broadcast instruction sent by the playback device; and broadcast the device information of the playback device in response to the replacement broadcast instruction.
[0248] In one embodiment, based on the above embodiment, the broadcast module 120 is specifically used to: obtain the remaining power of the playback device; and broadcast the device information of the playback device when the remaining power of the playback device is less than a first power threshold.
[0249] In one embodiment, based on the above embodiment, the device information is used by the second electronic device to determine whether to initiate a connection request to the playback device based on the device information; the connection request is used by the playback device to establish a communication connection with the second electronic device based on the connection request.
[0250] In one embodiment, based on the above embodiment, the broadcast module 120 is further configured to determine whether to broadcast the device information through the second electronic device according to the power information of the second electronic device and / or the first electronic device.
[0251] In one embodiment, the power information includes the remaining power of the electronic device. Based on the above embodiment, the above-mentioned broadcast module 120 is also used to: obtain the first remaining power of the first electronic device and the second remaining power of the second electronic device; when the first remaining power is less than the second remaining power, broadcast the device information through the second electronic device.
[0252] In one embodiment, based on the above embodiment, the broadcast module 120 is further used to: obtain a first remaining power of the first electronic device; and when the first remaining power is less than a second power threshold, broadcast the device information through the second electronic device.
[0253] In one embodiment, based on the above embodiment, the broadcast module 120 is further used to: obtain the second remaining power of the second electronic device; and broadcast the device information through the second electronic device when the second remaining power is greater than a third power threshold.
[0254] In one embodiment, based on the above embodiment, the above-mentioned broadcast module 120 is also used to: obtain the device type of the second electronic device; compare the broadcast priority of the first electronic device and the broadcast priority of the second electronic device according to the device type; and broadcast the device information through the second electronic device when the broadcast priority of the second electronic device is higher than the broadcast priority of the first electronic device.
[0255] In one embodiment, based on the above embodiment, the device information includes the current service type of the playback device; the device information is used by the second electronic device to send a connection request to the playback device when the playback priority of the requested service type is higher than the playback priority of the current service type.
[0256] In one embodiment, based on the above embodiment, the device information includes capability parameters of the playback device; the capability parameters are used to indicate whether the playback device allows device access; the device information is used by the second electronic device to send a connection request to the playback device when the capability parameters indicate that the playback device allows device access.
[0257] The implementation principle and technical effects of the device for broadcasting device information in the above embodiment are similar to those of the above method embodiment, and are not described in detail here.
[0258] Figure 13 FIG. 1 is a structural block diagram of a device information broadcasting apparatus according to an embodiment of the present invention. The above-mentioned apparatus is applied to a second electronic device, such as Figure 13 As shown, the above device includes:
[0259] The receiving module 210 is configured to receive device information broadcast by a first electronic device; the first electronic device is a device that currently establishes a communication connection with the playback device;
[0260] The connection module 220 is used to determine whether to send a connection request to the playback device according to the device information; the connection request is used by the playback device to establish a communication connection with the second electronic device according to the connection request.
[0261] In one embodiment, based on the above embodiment, the second electronic device establishes a virtual connection with the playback device when sending a connection request to the playback device and without establishing a communication connection with the playback device; the virtual connection is used to represent that the second electronic device is within the connection range of the playback device.
[0262] In one embodiment, based on the above embodiment, the connection module 220 is also used to: receive device information broadcast by an electronic device that is communicatively connected to the playback device; determine whether the virtual connection with the playback device remains connected; and if so, determine whether to send a connection request to the playback device again.
[0263] The implementation principle and technical effects of the device for broadcasting device information in the above embodiment are similar to those of the above method embodiment, and are not described in detail here.
[0264] Figure 14FIG. 1 is a structural block diagram of a device information broadcasting apparatus according to an embodiment of the present invention. The above-mentioned apparatus is applied to a second electronic device, such as Figure 14 As shown, the above device includes:
[0265] An acquisition module 310 is configured to acquire the remaining power of the playback device;
[0266] The sending module 320 is used to send an alternative broadcast instruction to a first electronic device when the remaining power is less than a first power threshold; the first electronic device is a device that currently establishes a communication connection with the playback device; the alternative broadcast instruction is used to instruct the first electronic device to broadcast the device information of the playback device.
[0267] In one embodiment, based on the above embodiment, the device information is used by the second electronic device to determine whether to initiate a connection request to the playback device based on the device information; the connection request is used by the playback device to establish a communication connection with the second electronic device based on the connection request.
[0268] In one embodiment, based on the above embodiment, when the playback device establishes communication connections with the first electronic device and the second electronic device at the same time, as shown in FIG. Figure 15 As shown, the apparatus further includes a broadcast module 330, which is used to: select a target device for alternative broadcasting from the first electronic device and the second electronic device; and broadcast the device information of the playback device through the target device.
[0269] In one embodiment, based on the above embodiment, the broadcast module 330 is specifically configured to: select the device with the largest remaining power among the first electronic device and the second electronic device as the target device.
[0270] In one embodiment, based on the above embodiment, the broadcast module 330 is specifically used to: obtain the device type of the second electronic device and the device type of the first electronic device; compare the broadcast priority of the first electronic device and the broadcast priority of the second electronic device according to the device type; and determine the electronic device with the highest broadcast priority as the target device.
[0271] The implementation principle and technical effects of the device for broadcasting device information in the above embodiment are similar to those of the above method embodiment, and are not described in detail here.
[0272] The division of the modules in the above-mentioned device information broadcasting apparatus is only for illustration. In other embodiments, the device information broadcasting apparatus may be divided into different modules as needed to complete all or part of the functions of the above-mentioned device information broadcasting apparatus.
[0273] The specific definition of the device information broadcasting device can be found in the definition of the device information broadcasting method above and will not be repeated here. The various modules in the aforementioned device information broadcasting device can be implemented in whole or in part through software, hardware, or a combination thereof. Each of the aforementioned modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the computer device's memory in software form, so that the processor can call and execute the corresponding operations of each of the aforementioned modules.
[0274] Figure 16 The figure is a schematic diagram of the structure of a playback device in one embodiment. The playback device may include at least one processor, at least one memory, a wireless communication module, an audio and video module, and input / output interfaces. The processor may include one or more interfaces for connecting to other components of the playback device. The memory may be used to store program code, which, when executed, implements the steps of the auxiliary device connection method. The memory may also be used to store other information, such as the playback priority of the electronic device's service type. The processor may be used to execute the application code and call relevant modules to implement the functions of the playback device in the embodiment of the present application. The processor may include one or more processing units, each of which may be independent devices or integrated into one or more processors. The processor may specifically be an integrated control chip or comprised of circuits including various active and / or passive components. The wireless communication module may be used to support data exchange in communication. The wireless communication module may also include an antenna, which receives electromagnetic waves via the antenna, frequency-modulates and filters the electromagnetic wave signals, and transmits the processed signals to the processor. The wireless communication module may also receive signals to be transmitted from the processor, frequency-modulate and amplify them, and then convert them into electromagnetic waves for radiation via the antenna. The audio and video module can be used to manage audio and video data, enable the playback device to input and output audio and video signals, and enable the playback device to perform call services, voice playback services and other functions. The audio and video module may include a speaker (or earpiece, receiver) component for outputting audio signals, a microphone (or microphone, microphone), a microphone receiving circuit that matches the microphone, etc. The speaker can be used to convert audio electrical signals into sound signals and play them. The microphone can be used to convert sound signals into audio electrical signals. The above-mentioned playback device may also include a sensor for determining the wearing status of the playback device. It can be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the playback device. It may have more Figure 16 More or fewer components may be shown, two or more components may be combined, or there may be
[0275] There are different component configurations.
[0276] Figure 17Schematic diagram of the internal structure of an electronic device in one embodiment. The electronic device can be any terminal device such as a mobile phone, tablet computer, laptop computer, desktop computer, PDA (Personal Digital Assistant), POS (Point of Sales), vehicle-mounted computer, wearable device, etc. The electronic device includes a processor and a memory connected via a system bus. The processor may include one or more processing units. The processor may be a CPU (Central Processing Unit) or a DSP (Digital Signal Processing), etc. The memory may include a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The computer program can be executed by the processor to implement a method for broadcasting device information provided in the following embodiments. The internal memory provides a cached operating environment for the operating system computer program in the non-volatile storage medium.
[0277] The various modules in the device information broadcasting apparatus provided in the embodiments of the present application may be implemented in the form of a computer program. The computer program may be executed on a terminal or server. The program modules comprising the computer program may be stored in a memory of an electronic device. When the computer program is executed by a processor, the steps of the method described in the embodiments of the present application are implemented.
[0278] The present application also provides a computer-readable storage medium, one or more non-volatile computer-readable storage media containing computer-executable instructions, which, when executed by one or more processors, cause the processors to perform the steps of the device information broadcasting method.
[0279] An embodiment of the present application also provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the method for broadcasting device information.
[0280] As used herein, any reference to memory, storage, database, or other medium may include non-volatile and / or volatile memory. Non-volatile memory may include ROM (Read-Only Memory), PROM (Programmable Read-only Memory), EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-only Memory), or flash memory. Volatile memory may include RAM (Random Access Memory), which serves as an external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as SRAM (Static Random Access Memory), DRAM (Dynamic Random Access Memory), SDRAM (Synchronous Dynamic Random Access Memory), Double Data Rate DDRSDRAM (Double Data Rate Synchronous Dynamic Random Access memory), ESDRAM (Enhanced Synchronous Dynamic Random Access memory), SLDRAM (Sync Link Dynamic Random Access Memory), RDRAM (Rambus Dynamic Random Access Memory), and DRDRAM (Direct Rambus Dynamic Random Access Memory).
[0281] The above embodiments merely illustrate several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art could make various modifications and improvements without departing from the spirit of the present invention, all of which fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be determined by the appended claims.
Claims
1. A method for broadcasting device information, applied to a first electronic device, wherein the first electronic device has a communication connection with a playback device, characterized in that: The method comprises: Obtaining device information of the playback device; Broadcast the device information of the playback device; wherein the device information is used to enable the second electronic device to obtain the device information of the playback device and determine whether to initiate a connection request to the playback device based on the device information; the connection request is used for the playback device to establish a communication connection with the second electronic device based on the connection request.
2. The method according to claim 1, characterized in that The broadcast device information of the playback device includes: receiving a replacement broadcast instruction sent by the playback device; In response to the replacement broadcast instruction, the device information of the playback device is broadcast.
3. The method according to claim 1, characterized in that The broadcast device information of the playback device includes: Obtaining the remaining power of the playback device; When the remaining power of the playback device is less than a first power threshold, the device information of the playback device is broadcast.
4. The method according to claim 1, wherein After the second electronic device establishes a communication connection with the playback device, the method further includes: Determine whether to send a broadcast transfer instruction to the second electronic device and / or the playback device based on the power information of the second electronic device and / or the first electronic device; the broadcast transfer instruction is used to broadcast the device information through the second electronic device.
5. The method according to claim 4, characterized in that The power information includes the remaining power of the electronic device, and the determining whether to send the broadcast transfer instruction to the second electronic device and / or the playback device includes: Acquiring a first remaining power of the first electronic device and a second remaining power of the second electronic device; When the first remaining power is less than the second remaining power, a broadcast transfer instruction is sent to the second electronic device and / or the playback device.
6. The method according to claim 4, characterized in that The determining whether to send a broadcast transfer instruction to the second electronic device and / or the playback device includes: Obtaining a first remaining power of the first electronic device; When the first remaining power is less than a second power threshold, a broadcast transfer instruction is sent to the second electronic device and / or the playback device.
7. The method according to claim 4, characterized in that The determining whether to send a broadcast transfer instruction to the second electronic device and / or the playback device includes: obtaining a second remaining power of the second electronic device; When the second remaining power is greater than a third power threshold, a broadcast transfer instruction is sent to the second electronic device and / or the playback device.
8. The method according to claim 1, characterized in that After the second electronic device establishes a communication connection with the playback device, the method further includes: Acquire a device type of the second electronic device; comparing the broadcast priority of the first electronic device and the broadcast priority of the second electronic device according to the device type; When the broadcast priority of the second electronic device is higher than that of the first electronic device, a broadcast transfer instruction is sent to the second electronic device and / or the playback device; the broadcast transfer instruction is used to broadcast the device information through the second electronic device.
9. The method according to claim 1, characterized in that The device information includes the current service type of the playback device; the device information is used by the second electronic device to send a connection request to the playback device when the playback priority of the requested service type is higher than the playback priority of the current service type.
10. The method according to claim 1, characterized in that The device information includes the capability parameters of the playback device; the capability parameters are used to indicate whether the playback device allows device access; the device information is used by the second electronic device to send a connection request to the playback device when the capability parameters indicate that the playback device allows device access.
11. A method for broadcasting device information, characterized in that: Applied to a second electronic device, the method includes: Receiving device information broadcast by a first electronic device, wherein the first electronic device is a device currently establishing a communication connection with a playback device; According to the device information, it is determined whether to send a connection request to the playback device; the connection request is used by the playback device to establish a communication connection with the second electronic device according to the connection request.
12. The method according to claim 11, characterized in that The method further comprises: When a connection request is sent to the playback device and no communication connection is established with the playback device, a virtual connection is established with the playback device; the virtual connection is used to indicate that the second electronic device is within the connection range of the playback device.
13. The method according to claim 12, characterized in that After establishing a virtual connection with the playback device, the method further includes: Obtain updated device information of the playback device; Determining whether the virtual connection with the playback device remains connected; If so, determine whether to send a connection request to the playback device again.
14. A method for broadcasting device information, characterized in that: Applied to a playback device, the method includes: Obtaining the remaining power of the playback device; When the remaining power is less than a first power threshold, an alternative broadcast instruction is sent to a first electronic device; the first electronic device is a device that currently establishes a communication connection with the playback device; the alternative broadcast instruction is used to instruct the first electronic device to broadcast device information of the playback device.
15. The method according to claim 14, characterized in that The device information is used by the second electronic device to determine whether to initiate a connection request to the playback device according to the device information; the connection request is used by the playback device to establish a communication connection with the second electronic device according to the connection request.
16. The method according to claim 15, characterized in that When the playback device establishes communication connections with the first electronic device and the second electronic device at the same time, the method further includes: selecting a target device for alternative broadcasting in the first electronic device and the second electronic device; The replacement broadcast instruction is sent to the target device.
17. The method according to claim 16, characterized in that The selecting a target device for the replacement broadcast in the first electronic device and the second electronic device includes: Among the first electronic device and the second electronic device, the device with the largest remaining power is selected as the target device.
18. The method according to claim 16, characterized in that The selecting a target device for the replacement broadcast in the first electronic device and the second electronic device includes: Acquire a device type of the second electronic device and a device type of the first electronic device; comparing the broadcast priority of the first electronic device and the broadcast priority of the second electronic device according to the device type; The electronic device with the highest broadcast priority is determined as the target device.
19. A device for broadcasting device information, characterized in that: Applied to a first electronic device, the first electronic device is in communication with a playback device, and the apparatus includes: An acquisition module, configured to acquire device information of the playback device; A broadcast module, configured to broadcast device information of the playback device; wherein the device information is used to enable a second electronic device to obtain the device information of the playback device and determine whether to initiate a connection request to the playback device based on the device information; the connection request is used by the playback device to establish a communication connection with the second electronic device based on the connection request.
20. A device for broadcasting device information, characterized in that: Applicable to a second electronic device, comprising: A receiving module, configured to receive device information broadcast by a first electronic device; the first electronic device is a device currently establishing a communication connection with the playback device; The connection module is used to determine whether to send a connection request to the playback device according to the device information; the connection request is used for the playback device to establish a communication connection with the second electronic device according to the connection request.
21. A device for broadcasting device information, characterized in that: Applicable to playback devices, including: An acquisition module, configured to acquire the remaining power of the playback device; A sending module is used to send an alternative broadcast instruction to a first electronic device when the remaining power is less than a first power threshold; the first electronic device is a device that currently establishes a communication connection with the playback device; the alternative broadcast instruction is used to instruct the first electronic device to broadcast the device information of the playback device.
22. An electronic device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the computer program is executed by the processor, the processor is caused to perform the steps of the method according to any one of claims 1 to 13.
23. A playback device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the computer program is executed by the processor, the processor is caused to perform the steps of the method according to any one of claims 14 to 18.
24. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 18 are implemented.
Citation Information
Patent Citations
Bluetooth equipment sharing request and control method and electronic equipment
CN107770761A