Bluetooth connection method and apparatus, and electronic device
By storing device information and connection condition information in the Bluetooth device, the first device automatically decides to connect to the Bluetooth device, solving the problem of inefficient connection in the prior art, realizing automatic connection and disconnection, and improving user experience and efficiency.
Patent Information
- Application Number
- CN202411602721.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-11
- Publication Date
- 2025-02-18
AI Technical Summary
When mobile terminal users use Bluetooth devices, the connection efficiency of electronic devices and Bluetooth devices is low, and the user needs to manually disconnect unnecessary connections.
By storing device information and connection condition information in the Bluetooth device, the first device acquires these information when searching for the Bluetooth device and decides whether to establish a connection with the Bluetooth device based on the connection condition information.
Without manual operation by the user, the sub-device can be automatically connected or disconnected from the Bluetooth device, improving the connection efficiency between electronic devices and Bluetooth devices and simplifying user operation steps.
Smart Images

Figure CN119485237A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of Bluetooth technology, and specifically relates to a Bluetooth connection method and device, and electronic equipment. Background Art
[0002] At present, when a mobile terminal user uses a Bluetooth device, when an electronic device is connected to a Bluetooth device, the Bluetooth device usually actively connects to the electronic device that was connected last time. If the electronic device is not the electronic device that the user wants to connect to, the user needs to manually disconnect the Bluetooth device from the electronic device and then control the Bluetooth device to connect to other electronic devices. This increases the user's operation steps and reduces the efficiency of connecting the electronic device to the Bluetooth device. Summary of the invention
[0003] The purpose of the embodiments of the present application is to provide a Bluetooth connection method and device, and an electronic device, which can solve the problem of low connection efficiency between an electronic device and a Bluetooth device.
[0004] In a first aspect, an embodiment of the present application provides a Bluetooth connection method, which is executed by a first device, and the Bluetooth connection method includes: when a Bluetooth device is searched, obtaining device information stored in the Bluetooth device; when the device information indicates that the first device is a sub-device, obtaining connection condition information corresponding to the first device stored in the Bluetooth device; when the first device meets the connection condition information, establishing a connection with the Bluetooth device; when the first device does not meet the connection condition information, not establishing a connection with the Bluetooth device.
[0005] In a second aspect, an embodiment of the present application provides a Bluetooth connection device, which is applied to a first device, and the Bluetooth connection device includes: an acquisition unit, which is used to acquire device information stored in the Bluetooth device when the Bluetooth device is searched; the acquisition unit is also used to acquire connection condition information corresponding to the first device stored in the Bluetooth device when the device information indicates that the first device is a sub-device; a communication unit, which is used to establish a connection with the Bluetooth device when the first device meets the connection condition information; the communication unit is also used to not establish a connection with the Bluetooth device when the first device does not meet the connection condition information.
[0006] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps of the Bluetooth connection method of the first aspect are implemented.
[0007] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the Bluetooth connection method of the first aspect are implemented.
[0008] In a fifth aspect, an embodiment of the present application provides a chip, which includes a processor and a communication interface, the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the steps of the Bluetooth connection method of the first aspect.
[0009] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the steps of the Bluetooth connection method of the first aspect.
[0010] In the Bluetooth connection method provided in the embodiment of the present application, when the first device searches for a Bluetooth device, the first device obtains the device information stored in the Bluetooth device; when the device information indicates that the first device is a sub-device, the first device obtains the connection condition information corresponding to the first device stored in the Bluetooth device; when the first device satisfies the connection condition information, the connection is established with the Bluetooth device; when the first device does not satisfy the connection condition information, the connection is not established with the Bluetooth device. Through the above-mentioned Bluetooth connection method, the connection condition information of the sub-device paired with the Bluetooth device is limited, and when the sub-device does not satisfy the corresponding connection condition information, the sub-device is not connected to the Bluetooth device. In this way, without manual operation by the user, when the sub-device needs to be connected to the Bluetooth device, the sub-device can be automatically connected to the Bluetooth device through the connection condition information satisfied by the sub-device set in advance, and when the sub-device does not need to be connected to the Bluetooth device, the sub-device can be prohibited from connecting to the Bluetooth device through the connection condition information not satisfied by the sub-device set in advance, thereby reducing the user's manual disconnection of the sub-device from the Bluetooth device, and controlling the link of the Bluetooth device connecting with other devices, reducing the user's operation steps, and improving the connection efficiency between the electronic device and the Bluetooth device. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 One of the flowcharts of the Bluetooth connection method provided in the embodiment of the present application;
[0012] Figure 2 A second flowchart of the Bluetooth connection method provided in an embodiment of the present application;
[0013] Figure 3 One of the schematic diagrams of the operation interface of the Bluetooth connection method provided in the embodiment of the present application;
[0014] Figure 4 A second schematic diagram of the operation interface of the Bluetooth connection method provided in an embodiment of the present application;
[0015] Figure 5 The third schematic diagram of the operation interface of the Bluetooth connection method provided in the embodiment of the present application;
[0016] Figure 6 A structural block diagram of a Bluetooth connection device provided in an embodiment of the present application;
[0017] Figure 7 A structural block diagram of an electronic device provided in an embodiment of the present application;
[0018] Figure 8 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0019] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0020] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way are interchangeable where appropriate, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0021] The Bluetooth connection method provided in the embodiment of the present application is described in detail below through specific embodiments and application scenarios in conjunction with the accompanying drawings.
[0022] like Figure 1 As shown, the embodiment of the present application provides a Bluetooth connection method, which is performed by a first device. The method may include the following S102 to S106:
[0023] S102: When a Bluetooth device is found, obtain device information stored in the Bluetooth device.
[0024] The Bluetooth connection method proposed in the embodiment of the present application is executed by a first device, which may specifically be an intelligent electronic device such as a smart phone, a tablet computer, a laptop computer, and a smart watch, and is not specifically limited here.
[0025] The above-mentioned Bluetooth device may specifically be a Bluetooth headset.
[0026] Furthermore, the Bluetooth device stores device information, which may include the name of the main device that has a pairing relationship with the Bluetooth device, SN (Serial Number) code and other identification information. The pairing relationship between the main device and the Bluetooth device means that the Bluetooth device stores a historical pairing record with the main device.
[0027] S104: When the device information indicates that the first device is a sub-device, obtain connection condition information corresponding to the first device stored in the Bluetooth device.
[0028] Among them, the above-mentioned connection condition information is used to indicate the connection restriction conditions between the first device and the Bluetooth device. The connection condition information may specifically include the threshold number of connections between the first device and the Bluetooth device, the preset time period during which the first device is allowed to connect to the Bluetooth device, and other information, which is not specifically limited here.
[0029] Furthermore, when the main device searches for a Bluetooth device, if there is a sub-device that is paired with the Bluetooth device and turns on the Bluetooth switch, and the sub-device meets the connection restriction conditions with the Bluetooth device, the sub-device has the highest priority to connect to the Bluetooth device, that is, the Bluetooth device has priority to connect to the sub-device. Otherwise, if the sub-device does not turn on Bluetooth or the sub-device does not meet the connection restriction conditions with the Bluetooth device, the Bluetooth device connects to the main device. Moreover, if the sub-device does not meet the connection restriction conditions with the Bluetooth device, the device with the highest priority to connect to the Bluetooth device will automatically change to the main device without the need for the user to manually change it.
[0030] S106: When the first device meets the connection condition information, establish a connection with the Bluetooth device; when the first device does not meet the connection condition information, do not establish a connection with the Bluetooth device.
[0031] Specifically, in the Bluetooth connection method provided in the embodiment of the present application, after the first device turns on the Bluetooth switch to enable the Bluetooth search function, if the first device searches for a Bluetooth device, the first device will read the device information stored in the Bluetooth device, and determine the master device that has a pairing relationship with the Bluetooth device based on the device information. In the case where the first device is not the master device corresponding to the Bluetooth device, that is, in the case where the first device is a sub-device that has a pairing relationship with the Bluetooth device, the first device will read the connection condition information corresponding to the first device stored in the Bluetooth device again. On this basis, if the first device meets the read connection condition information, the first device will establish a connection with the Bluetooth device. If the first device does not meet the connection condition information, the first device will not establish a connection with the Bluetooth device, so that the Bluetooth device can establish a connection with the master device or other sub-devices. In this way, the connection condition information of the sub-device paired with the Bluetooth device is limited. During the Bluetooth connection process, there is no need for manual operation by the user. When the sub-device needs to be connected to the Bluetooth device, the sub-device can be automatically connected to the Bluetooth device through the connection condition information that is satisfied by the sub-device set in advance. When the sub-device does not need to be connected to the Bluetooth device, the sub-device can be prohibited from connecting to the Bluetooth device through the connection condition information that is not satisfied by the sub-device set in advance. This reduces the need for users to manually disconnect the connection between the sub-device and the Bluetooth device, and controls the connection between the Bluetooth device and other devices, reduces the user's operation steps, and improves the connection efficiency between the electronic device and the Bluetooth device.
[0032] Furthermore, when the Bluetooth device needs to switch the connection between the main device and the sub-device, the connection condition information of the sub-device can be limited so that the sub-device does not meet the connection condition information, thereby avoiding the sub-device from affecting the Bluetooth connection process of the main device paired with the Bluetooth device, so that the main device can quickly connect back to the Bluetooth device, realizing rapid switching of electronic devices connected to Bluetooth, and improving the convenience and efficiency of Bluetooth switching.
[0033] Exemplarily, user A temporarily lends the Bluetooth headset to user B for use, and after user B returns the Bluetooth headset, user A wears the Bluetooth headset again.
[0034] In the traditional Bluetooth connection method, the Bluetooth headset will default to the last connected device, that is, the device of user B. If user A and user B are together at this time, and both user A's device and user B's device are playing sound, after the Bluetooth headset is connected to user B's device, user B's device will stop playing sound, user A's device will continue to play sound, and user A will hear the sound of user B's device from the Bluetooth headset, that is, user A will find that the sound and picture are out of sync, and user B will find that the device is suddenly silent. At this time, user A and user B need to manually switch the device connected to the Bluetooth headset after troubleshooting the cause of the problem.
[0035] In the Bluetooth connection method provided in the embodiment of the present application, by setting user A's device as the main device of the Bluetooth headset, user B's device as the sub-device of the Bluetooth headset, and setting the connection condition information between user B's device and the Bluetooth headset (user B's device and the Bluetooth headset can only be connected once), even if user A and user B are together when user A wears the Bluetooth headset again, the Bluetooth headset will directly connect to user A's device. While avoiding the above-mentioned problems, there is no need for the user to manually switch the connection object of the Bluetooth headset, which improves the convenience and efficiency of the Bluetooth connection.
[0036] In the Bluetooth connection method provided by the embodiment of the present application, when the first device searches for a Bluetooth device, the first device obtains the device information stored in the Bluetooth device; when the device information indicates that the first device is a sub-device, the first device corresponding to the connection condition information stored in the Bluetooth device is obtained; when the first device satisfies the connection condition information, the connection is established with the Bluetooth device; when the first device does not satisfy the connection condition information, the connection is not established with the Bluetooth device. Through the Bluetooth connection method, the connection condition information of the sub-device paired with the Bluetooth device is limited, and when the sub-device does not satisfy the corresponding connection condition information, the sub-device is not connected to the Bluetooth device. In this way, when the sub-device needs to be connected to the Bluetooth device, the connection condition information satisfied by the sub-device set in advance can be used to automatically connect the sub-device to the Bluetooth device without manual operation by the user. When the sub-device does not need to be connected to the Bluetooth device, the sub-device can be prohibited from connecting to the Bluetooth device through the connection condition information not satisfied by the sub-device set in advance, thereby reducing the user's manual disconnection of the sub-device from the Bluetooth device, and controlling the link of the Bluetooth device connecting with other devices, reducing the user's operation steps, and improving the connection efficiency between the electronic device and the Bluetooth device.
[0037] In the embodiment of the present application, after the above S104, the above Bluetooth connection method further includes the following S110 to S114:
[0038] S110: Acquire connection information of the first device.
[0039] The connection information is used to indicate the connection status between the first device and the Bluetooth device. The connection information may specifically include information such as the connection time and number of connections between the first device and the Bluetooth device, which is not specifically limited here.
[0040] S112: When the connection information and the connection condition information satisfy the first condition, determine that the first device does not satisfy the connection condition information.
[0041] Specifically, in the Bluetooth connection method provided in the embodiment of the present application, the first device compares its own connection information and connection condition information, and determines that the first device does not meet the connection condition information when the connection information and the connection condition information meet the first condition.
[0042] The connection information may specifically include the number of connections between the first device and the Bluetooth device. Accordingly, the connection condition information may specifically include a threshold value of the number of connections between the first device and the Bluetooth device.
[0043] The number of connections is the number of times the first device is currently connected to the Bluetooth device, and the number threshold is the maximum number of times the first device is allowed to connect to the Bluetooth device.
[0044] In actual application, the above number threshold is a default setting for any sub-device, and the above number threshold can also be a custom setting for a single sub-device such as the first device, which is not specifically limited here.
[0045] On this basis, in the Bluetooth connection method provided in the embodiment of the present application, the above-mentioned first condition may specifically include: the number of connections between the first device and the Bluetooth device is greater than the number threshold. When the number of connections between the first device and the Bluetooth device is greater than the corresponding number threshold, it means that the number of connections between the first device and the Bluetooth device has reached the upper limit allowed. At this time, the first device does not meet the connection condition information, and the first device does not connect to the Bluetooth device, so that the Bluetooth device can establish a connection with the main device or other sub-devices.
[0046] Furthermore, the connection information may specifically include the connection time between the first device and the Bluetooth device. Accordingly, the connection condition information may specifically include a preset time period during which the first device is allowed to connect to the Bluetooth device.
[0047] The connection time may be the time when the first device searches for the Bluetooth device. The preset time period may be the time period during which the first device is allowed to connect to the Bluetooth device. For example, the preset time period is from 3:00 to 4:00 p.m. every day. The preset time period may also be from March 1, 2024 to March 4, 2024.
[0048] In actual application, the above-mentioned preset time period is a default setting for any sub-device, and the above-mentioned preset time period can also be a custom setting for a single sub-device such as the first device, which is not specifically limited here.
[0049] On this basis, in the Bluetooth connection method provided in the embodiment of the present application, the above-mentioned first condition may also specifically include: the connection time between the first device and the Bluetooth device is outside the preset time period. In the case where the connection time between the first device and the Bluetooth device is outside the corresponding preset time period, it means that the first device is not allowed to connect with the Bluetooth device at the current moment. At this time, the first device does not meet the connection condition information, and the first device does not connect with the Bluetooth device, so that the Bluetooth device can establish a connection with the main device or other sub-devices.
[0050] S114: When the connection information and the connection condition information satisfy the second condition, determine that the first device satisfies the connection condition information.
[0051] Specifically, in the Bluetooth connection method provided in the embodiment of the present application, the first device compares its own connection information and connection condition information, and determines that the first device satisfies the connection condition information when the connection information and the connection condition information satisfy the second condition.
[0052] Specifically, in the Bluetooth connection method provided in the embodiment of the present application, the above-mentioned connection information may specifically include the number of connections between the first device and the Bluetooth device, the above-mentioned connection condition information may specifically include the number threshold of connections between the first device and the Bluetooth device, and the above-mentioned second condition may specifically include: the number of connections between the first device and the Bluetooth device is less than or equal to the number threshold. When the number of connections between the first device and the Bluetooth device is less than or equal to the number threshold, it means that the number of connections between the first device and the Bluetooth device has not reached the allowed upper limit, and the first device is still allowed to connect to the Bluetooth device. At this time, the first device satisfies the connection condition information, and the first device is connected to the Bluetooth device. In this way, the maximum number of connections between the sub-device and the Bluetooth device is limited. During the Bluetooth connection process, the sub-device and the Bluetooth device can be automatically connected without manual operation by the user when the number of connections between the sub-device and the Bluetooth device does not reach the upper limit. When the number of connections between the sub-device and the Bluetooth device reaches the upper limit, the sub-device can be prevented from affecting the Bluetooth connection process of the main device, so that the main device can quickly connect back to the Bluetooth device, thereby improving the convenience and efficiency of Bluetooth switching.
[0053] Furthermore, in the Bluetooth connection method provided in the embodiment of the present application, the connection information may also include the connection time between the first device and the Bluetooth device, the connection condition information may also include a preset time period for the connection between the first device and the Bluetooth device, and the second condition may also specifically include: the connection time between the first device and the Bluetooth device is within the preset time period. When the connection time is within the preset time period, it means that the first device is allowed to connect to the Bluetooth device at the current moment. At this time, the first device satisfies the connection condition information, and the first device is connected to the Bluetooth device. In this way, the preset time period during which the sub-device is allowed to connect to the Bluetooth device is limited. During the Bluetooth connection process, the sub-device and the Bluetooth device can be automatically connected within the preset time period without manual operation by the user. It is also possible to prevent the sub-device from affecting the Bluetooth connection process of the main device outside the preset time period, thereby enabling the main device to quickly connect back to the Bluetooth device, thereby improving the convenience and efficiency of Bluetooth switching.
[0054] The above-mentioned embodiment provided by the present application obtains the connection information of the first device after obtaining the connection condition information corresponding to the first device stored in the Bluetooth device; when the connection information and the connection condition information meet the first condition, it is determined that the first device does not meet the connection condition information; when the connection information and the connection condition information meet the second condition, it is determined that the first device meets the connection condition information; wherein, the connection information includes the number of connections between the first device and the Bluetooth device, the connection condition information includes a number threshold of connections between the first device and the Bluetooth device, and / or the connection information includes the connection time between the first device and the Bluetooth device, and the connection condition information includes a preset time period for the connection between the first device and the Bluetooth device; the first condition includes: the number of connections is greater than the number threshold, and / or the connection time is outside the preset time period; the second condition includes: the number of connections is less than or equal to the number threshold, and / or the connection time is within the preset time period. In this way, the maximum number of times or the preset time period that the sub-device can be connected to the Bluetooth device is limited. During the Bluetooth connection process, the sub-device and the Bluetooth device can be automatically connected when the number of connections between the sub-device and the Bluetooth device has not reached the upper limit or within the preset time period without the need for manual operation by the user. The sub-device can also be prevented from occupying the connection process of the Bluetooth device when the number of connections between the sub-device and the Bluetooth device reaches the upper limit or outside the preset time period, thereby eliminating the need for the user to manually disconnect the connection between the sub-device and the Bluetooth device, thereby improving the efficiency of the Bluetooth connection.
[0055] In the embodiment of the present application, after the above S102, the above Bluetooth connection method may further include the following S118:
[0056] S118: When the device information indicates that the first device is a master device and no Bluetooth signal of a slave device is found, establish a connection with the Bluetooth device.
[0057] Specifically, in the Bluetooth connection method provided in the embodiment of the present application, when the device information indicates that the first device is a main device that has a pairing relationship with the Bluetooth device, the first device will store the information of the sub-device that has been connected to the Bluetooth device. At this time, if the first device does not search for the Bluetooth signal of the sub-device that has a pairing relationship with the Bluetooth device, the first device will determine that the sub-device that has a pairing relationship with the Bluetooth device has not turned on Bluetooth, and directly establish a connection with the Bluetooth device. In this way, when the Bluetooth device is switched from a sub-device to a main device, the Bluetooth of the sub-device can be turned off without re-pairing the Bluetooth device with the main device, thereby improving the convenience and efficiency of Bluetooth switching.
[0058] In addition, after the Bluetooth device switches to connect to the main device, that is, the first device, the first device will obtain the device information, connection time, and historical connection times of the sub-devices that have been connected to the Bluetooth device, and display the obtained information to the user.
[0059] In the above embodiment provided by the present application, after obtaining the device information stored in the Bluetooth device, when the device information indicates that the first device is the main device and the Bluetooth signal of the sub-device is not searched, a connection is established with the Bluetooth device. In this way, when the Bluetooth device is switched from the sub-device to the main device, the Bluetooth of the sub-device can be turned off, without the need to re-pair the Bluetooth device with the main device, thereby improving the convenience and efficiency of Bluetooth switching.
[0060] In the embodiment of the present application, when the first device establishes a connection with the Bluetooth device, the Bluetooth connection method may further include the following S120 to S124:
[0061] S120: In response to the fourth input of the user, determine the device information, and send the device information to the Bluetooth device.
[0062] Among them, the above-mentioned fourth input is the user's touch input to the first device, and the touch input can specifically be a single-click input, a long press input, a double-click input, a sliding input, an input along a preset trajectory, etc. Technical personnel in this field can set the specific form of the above-mentioned fourth input according to actual conditions, and no specific limitation is made here.
[0063] In actual application, the fourth input may specifically be a touch input of a user to a first control in a Bluetooth setting interface of the first device, where the first control is used to set a master device connected to the Bluetooth device.
[0064] Specifically, in the Bluetooth connection method provided in the embodiment of the present application, when the first device establishes a connection with the Bluetooth device, the user can set the main device connected to the Bluetooth device by touch input to the first control in the Bluetooth setting interface of the first device. After the user sets the main device connected to the Bluetooth device, the first device will also send the device information to the Bluetooth device for subsequent use.
[0065] For example, Figure 3 As shown, after the first device is connected to the Bluetooth device, the Bluetooth setting interface 302 of the first device includes a first control 304, which is a switch. When the user turns on the switch, the device currently connected to the Bluetooth device can be set as the main device, that is, the first device can be set as the main device connected to the Bluetooth device.
[0066] S122: In response to a second input from the user, determine first connection condition information for all sub-devices, and send the first connection condition information to the Bluetooth device.
[0067] The first connection condition information is a default setting for all sub-devices. For example, the first connection condition information may be a default number threshold for all sub-devices. The first connection condition information may also be a default preset time period for all sub-devices, which is not specifically limited here.
[0068] Furthermore, the above-mentioned second input is the user's touch input to the first device, and the touch input can specifically be a single-click input, a long press input, a double-click input, a sliding input, an input along a preset trajectory, etc. Technical personnel in this field can set the specific form of the above-mentioned fourth input according to actual conditions, and no specific limitation is made here.
[0069] In actual application, the second input may specifically be a user's touch input to a second control in the Bluetooth setting interface of the first device, and the second control is used to set default connection condition information for all sub-devices.
[0070] Specifically, in the Bluetooth connection method provided in the embodiment of the present application, when the first device establishes a connection with the Bluetooth device, the user can set the default connection condition information for all sub-devices, that is, set the first connection condition information, by touch input to the second control in the Bluetooth setting interface of the first device. After the user sets the first connection condition information, the first device will also send the first connection condition information to the Bluetooth device for subsequent use.
[0071] For example, Figure 3As shown, after the first device is connected to the Bluetooth device, the Bluetooth setting interface 302 of the first device includes a second control 306. The user can open the default setting interface of the sub-device by touch input to the second control 306 to set the default connection condition information for all sub-devices in the default setting interface.
[0072] S124: In response to the third input of the user, determine the second connection condition information for each sub-device, and send the second connection condition information for each sub-device to the Bluetooth device.
[0073] Among them, the above-mentioned second connection condition information is customized for each sub-device. For example, the above-mentioned second connection condition information can be a number threshold customized for each sub-device, and the above-mentioned second connection condition information can also be a preset time period customized for each sub-device, which is not specifically limited here.
[0074] Furthermore, the above-mentioned third input is the user's touch input to the first device, and the touch input can specifically be a single-click input, a long press input, a double-click input, a sliding input, an input along a preset trajectory, etc. Technical personnel in this field can set the specific form of the above-mentioned fourth input according to actual conditions, and no specific limitation is made here.
[0075] In actual application, the third input may be a user's touch input to a third control in the Bluetooth setting interface of the first device. One third control corresponds to one sub-device, and the third control is used to customize the connection condition information of the corresponding sub-device.
[0076] Specifically, in the Bluetooth connection method provided in the embodiment of the present application, when the first device establishes a connection with the Bluetooth device, the user can customize the connection condition information of the sub-device corresponding to the third control by touch input of the third control in the Bluetooth setting interface of the first device, that is, set the second connection condition information of the sub-device corresponding to the third control. After the user sets the second connection condition information of the sub-device, the first device will also send the second connection condition information to the Bluetooth device for subsequent use.
[0077] For example, Figure 3 As shown in FIG. 1 , after the first device is connected to the Bluetooth device, the Bluetooth setting interface 302 of the first device includes a plurality of third controls 308, one third control 308 corresponding to one sub-device. The user can input the third control 308 by touch, such as Figure 4 As shown, the custom setting interface 310 of the corresponding sub-device is opened, and the custom setting interface 310 includes a fourth control 312. The user can customize the connection condition information for the current sub-device by touch input to the fourth control 312.
[0078] In the above embodiment provided by the present application, when the first device establishes a connection with the Bluetooth device, in response to the fourth input of the user, the device information is determined and the device information is sent to the Bluetooth device; in response to the second input of the user, the first connection condition information for all sub-devices is determined and the first connection condition information is sent to the Bluetooth device; in response to the third input of the user, the second connection condition information for each sub-device is determined and the second connection condition information for each sub-device is sent to the Bluetooth device. In this way, the information required for Bluetooth connection is set in advance, which facilitates the subsequent automatic switching connection of Bluetooth based on the set information, thereby improving the convenience and efficiency of Bluetooth switching.
[0079] In the embodiment of the present application, when the first device establishes a connection with the Bluetooth device, the Bluetooth connection method may further include the following S126:
[0080] S126: In response to the first input of the user, determine a switching gesture, and send the switching gesture to the Bluetooth device.
[0081] The switching gesture is used by the Bluetooth device. When the Bluetooth device is connected to a sub-device, the Bluetooth device can switch the connection to the main device in response to the switching gesture.
[0082] Furthermore, the above-mentioned first input is the user's touch input to the first device, and the touch input can specifically be a single-click input, a long press input, a double-click input, a sliding input, an input along a preset trajectory, etc. Technical personnel in this field can set the specific form of the above-mentioned fourth input according to actual conditions, and no specific limitation is made here.
[0083] Specifically, in the Bluetooth connection method provided in the embodiment of the present application, when the first device establishes a connection with the Bluetooth device, the user can set a switching gesture by touch input on the Bluetooth setting interface of the first device. After the user sets the switching gesture, the first device will also send the switching gesture to the Bluetooth device, so that the Bluetooth device can quickly switch to the main device in response to the switching gesture during subsequent work. In this way, a fast connection between the main device and the Bluetooth device is achieved, and the convenience and efficiency of Bluetooth switching connection are improved.
[0084] For example, the switching gesture is tapping the Bluetooth device twice. When the Bluetooth device is connected to the sub-device, the user can quickly switch the Bluetooth device to the main device by tapping the Bluetooth device twice.
[0085] In the above embodiment provided by the present application, when the first device establishes a connection with the Bluetooth device, in response to the first input of the user, a switching gesture is determined, and the switching gesture is sent to the Bluetooth device, so that when the Bluetooth device is connected to the sub-device, in response to the switching gesture, the connection is switched to the main device. In this way, a fast connection between the main device and the Bluetooth device is achieved, and the convenience and efficiency of Bluetooth switching connection are improved.
[0086] In the embodiment of the present application, the above Bluetooth connection method may further include the following S128:
[0087] S128: When the first device establishes a connection with the Bluetooth device, in response to a fifth input from the user, determining connection priorities of the plurality of sub-devices, and sending the connection priorities to the Bluetooth device.
[0088] The connection priority is used to indicate the order in which the Bluetooth device connects to multiple sub-devices when multiple sub-devices search for Bluetooth devices at the same time. If multiple sub-devices meet the restricted connection conditions for connecting to the Bluetooth device, the higher the connection priority of the sub-device, the higher the order in which the sub-device connects to the Bluetooth device, and the lower the connection priority of the sub-device, the lower the order in which the sub-device connects to the Bluetooth device.
[0089] Furthermore, the fifth input is a touch input of the user to the first device, which may specifically be a single-click input, a long-press input, a double-click input, a sliding input, an input along a preset trajectory, etc. Technical personnel in this field may set the specific form of the fourth input according to actual conditions, and no specific limitation is made here.
[0090] Specifically, in the Bluetooth connection method provided in the embodiment of the present application, when the first device establishes a connection with the Bluetooth device, the user can set the connection priority of multiple sub-devices with the Bluetooth device by touch input on the Bluetooth setting interface of the first device. After the user sets the connection priority, the first device will also send the connection priority to the Bluetooth device for subsequent use.
[0091] Specifically, in the Bluetooth connection method provided in the embodiment of the present application, after the connection priorities of multiple sub-devices and the Bluetooth device are sent to the Bluetooth device, when the Bluetooth device searches for the first device and the second device at the same time, if the Bluetooth device determines that the first device and the second device are both sub-devices, and the first device and the second device both meet the corresponding connection condition information, the Bluetooth device will compare the connection priorities of the first device and the second device, and establish a connection with the first device if the connection priority of the first device is higher than that of the second device, otherwise, establish a connection with the second device. In this way, by setting the connection priorities of multiple sub-devices and the Bluetooth device, when multiple sub-devices meet the connection restriction conditions of the Bluetooth device, the user does not need to manually select the device to be connected to the Bluetooth device, and the Bluetooth device and the sub-device can be quickly connected, thereby improving the convenience and efficiency of the Bluetooth connection.
[0092] In the above embodiment provided by the present application, when the first device establishes a connection with the Bluetooth device, in response to the fifth input of the user, the connection priority of multiple sub-devices is determined, and the connection priority is sent to the Bluetooth device. In this way, by setting the connection priority of multiple sub-devices with the Bluetooth device, when multiple sub-devices meet the connection restriction conditions of the Bluetooth device, the Bluetooth device and the sub-device can be quickly connected without the user manually selecting the device to be connected to the Bluetooth device, thereby improving the convenience and efficiency of Bluetooth connection.
[0093] In the embodiment of the present application, the above Bluetooth connection method may further include the following S130 and S132:
[0094] S130: When the first device meets the connection condition information, display first prompt information.
[0095] The first prompt information is used to indicate the connection condition information, and the first prompt information is specifically used to indicate the remaining usage amount of the connection condition information. For example, the first prompt information is used to indicate the remaining number of times the first device is allowed to connect to the Bluetooth device.
[0096] Specifically, in the Bluetooth connection method provided in an embodiment of the present application, when the first device meets the connection condition information, after the first device establishes a connection with the Bluetooth device, the first device will display a first prompt message to prompt the user of the remaining usage amount of the connection condition information of the first device so that the user can update the connection condition information in time.
[0097] In actual application, the first device may also update the connection information stored in the Bluetooth device, such as updating the device information, connection times, connection time, etc. of the sub-device stored in the Bluetooth device. Furthermore, the first device may also display the updated connection information for the user to view.
[0098] For example, Figure 4 As shown, the custom setting interface 310 of the sub-device includes a plurality of fifth controls 314, and the fifth controls 314 are used to display the connection information of the current sub-device and the remaining usage amount of the connection condition information for the user to view.
[0099] S132: When the first device does not meet the connection condition information, display a second prompt information.
[0100] The second prompt information is used to instruct to modify the connection condition information.
[0101] Specifically, in the Bluetooth connection method provided in an embodiment of the present application, when the first device does not meet the connection condition information, that is, when the connection between the first device and the Bluetooth device fails, the first device will display a second prompt message to remind the user to modify the connection condition information of the first device.
[0102] For example, Figure 5 As shown, when the first device fails to connect to the Bluetooth device, the first device displays a second prompt message 316 of "The number of connections has exceeded the upper limit, please contact the main device to modify!" to remind the user to modify the threshold of the number of connections between the first device and the Bluetooth device.
[0103] In the above embodiment provided by the present application, when the first device meets the connection condition information, the first prompt information is displayed, and the first prompt information is used to indicate the connection condition information; when the first device does not meet the connection condition information, the second prompt information is displayed, and the second prompt information is used to indicate to modify the connection condition information. In this way, it is convenient for the user to timely grasp the connection status between the sub-device and the Bluetooth device, so as to make countermeasures in time to avoid delaying the subsequent connection between the sub-device and the Bluetooth device.
[0104] In summary, if Figure 2 As shown, when the Bluetooth device is turned on, the Bluetooth connection method provided in the embodiment of the present application may specifically include the following S202 to S226:
[0105] S202: Turn on Bluetooth and search for Bluetooth devices.
[0106] S204: Connecting a Bluetooth device.
[0107] S206: Enter the Bluetooth setting interface of the Bluetooth device.
[0108] S208: Setting the master device.
[0109] S210: Setting a number threshold corresponding to the sub-device.
[0110] S212: Disconnect the connection with the Bluetooth device.
[0111] S214: Turn on Bluetooth again and search for Bluetooth devices.
[0112] S216: Determine: the current device is the master device, if so, execute S218, if not, execute S220.
[0113] S218: Connect with a Bluetooth device.
[0114] S220: Determine: whether the number of connections between the current device and the Bluetooth device is greater than the number threshold, if so, execute S224, if not, execute S222.
[0115] S222: Display the first prompt information, and update the connection information stored in the Bluetooth device.
[0116] S224: Display the second prompt information.
[0117] S226: Not connected to the Bluetooth device.
[0118] After S222 is executed, S218 is continued to be executed.
[0119] The Bluetooth connection method provided in the embodiment of the present application can be executed by a Bluetooth connection device. In the embodiment of the present application, the Bluetooth connection device provided in the embodiment of the present application is described by taking the Bluetooth connection device executing the above Bluetooth connection method as an example.
[0120] like Figure 6 As shown, an embodiment of the present application provides a Bluetooth connection device 500, which is applied to a first device. The device may include the following acquisition unit 502 and communication unit 504.
[0121] The acquisition unit 502 is used to acquire device information stored in the Bluetooth device when a Bluetooth device is found;
[0122] The acquiring unit 502 is further configured to acquire connection condition information corresponding to the first device stored in the Bluetooth device when the device information indicates that the first device is a sub-device;
[0123] The communication unit 504 is used to establish a connection with the Bluetooth device when the first device meets the connection condition information;
[0124] The communication unit 504 is further configured to not establish a connection with the Bluetooth device when the first device does not satisfy the connection condition information.
[0125] Through the Bluetooth connection device 500 provided in the embodiment of the present application, when the first device searches for a Bluetooth device, the first device obtains the device information stored in the Bluetooth device; when the device information indicates that the first device is a sub-device, the first device obtains the connection condition information corresponding to the first device stored in the Bluetooth device; when the first device satisfies the connection condition information, the connection is established with the Bluetooth device; when the first device does not satisfy the connection condition information, the connection is not established with the Bluetooth device. Through the above-mentioned Bluetooth connection device 500, the connection condition information of the sub-device paired with the Bluetooth device is limited, and when the sub-device does not satisfy the corresponding connection condition information, the sub-device is not connected to the Bluetooth device. In this way, without manual operation by the user, when the sub-device needs to be connected to the Bluetooth device, the sub-device can be automatically connected to the Bluetooth device through the connection condition information satisfied by the sub-device set in advance, and when the sub-device does not need to be connected to the Bluetooth device, the sub-device can be prohibited from connecting to the Bluetooth device through the connection condition information not satisfied by the sub-device set in advance, thereby reducing the user's manual disconnection of the sub-device from the Bluetooth device, and controlling the link of the Bluetooth device connecting with other devices, reducing the user's operation steps, and improving the connection efficiency between the electronic device and the Bluetooth device.
[0126] In an embodiment of the present application, after obtaining the connection condition information corresponding to the first device stored in the Bluetooth device, the acquisition unit 502 is also used to: obtain the connection information of the first device; the Bluetooth connection device 500 also includes a processing unit 506, which is used to: determine that the first device does not meet the connection condition information when the connection information and the connection condition information meet the first condition; determine that the first device meets the connection condition information when the connection information and the connection condition information meet the second condition; wherein the connection information includes the number of connections between the first device and the Bluetooth device, the connection condition information includes a number threshold of connections between the first device and the Bluetooth device, and / or the connection information includes the connection time between the first device and the Bluetooth device, and the connection condition information includes a preset time period for the connection between the first device and the Bluetooth device; the first condition includes: the number of connections is greater than the number threshold, and / or the connection time is outside the preset time period; the second condition includes: the number of connections is less than or equal to the number threshold, and / or the connection time is within the preset time period.
[0127] The above-mentioned embodiment provided by the present application obtains the connection information of the first device after obtaining the connection condition information corresponding to the first device stored in the Bluetooth device; when the connection information and the connection condition information meet the first condition, it is determined that the first device does not meet the connection condition information; when the connection information and the connection condition information meet the second condition, it is determined that the first device meets the connection condition information; wherein, the connection information includes the number of connections between the first device and the Bluetooth device, the connection condition information includes a number threshold of connections between the first device and the Bluetooth device, and / or the connection information includes the connection time between the first device and the Bluetooth device, and the connection condition information includes a preset time period for the connection between the first device and the Bluetooth device; the first condition includes: the number of connections is greater than the number threshold, and / or the connection time is outside the preset time period; the second condition includes: the number of connections is less than or equal to the number threshold, and / or the connection time is within the preset time period. In this way, the maximum number of times or the preset time period that the sub-device can be connected to the Bluetooth device is limited. During the Bluetooth connection process, the sub-device and the Bluetooth device can be automatically connected when the number of connections between the sub-device and the Bluetooth device has not reached the upper limit or within the preset time period without the need for manual operation by the user. The sub-device can also be prevented from occupying the connection process of the Bluetooth device when the number of connections between the sub-device and the Bluetooth device reaches the upper limit or outside the preset time period, thereby eliminating the need for the user to manually disconnect the connection between the sub-device and the Bluetooth device, thereby improving the efficiency of the Bluetooth connection.
[0128] In the embodiment of the present application, the communication unit 504 is further configured to establish a connection with a Bluetooth device when the device information indicates that the first device is a master device and no Bluetooth signal of a slave device is searched.
[0129] In the above embodiment provided by the present application, after obtaining the device information stored in the Bluetooth device, when the device information indicates that the first device is the main device and the Bluetooth signal of the sub-device is not searched, a connection is established with the Bluetooth device. In this way, when the Bluetooth device is switched from the sub-device to the main device, the Bluetooth of the sub-device can be turned off, without the need to re-pair the Bluetooth device with the main device, thereby improving the convenience and efficiency of Bluetooth switching.
[0130] In an embodiment of the present application, when the first device establishes a connection with the Bluetooth device, the processing unit 506 is also used to: determine the device information in response to the user's fourth input; the communication unit 504 is also used to: send the device information to the Bluetooth device; the processing unit 506 is also used to: determine the first connection condition information for all sub-devices in response to the user's second input; the communication unit 504 is also used to: send the first connection condition information to the Bluetooth device; the processing unit 506 is also used to: determine the second connection condition information for each sub-device in response to the user's third input; the communication unit 504 is also used to: send the second connection condition information for each sub-device to the Bluetooth device.
[0131] In the above embodiment provided by the present application, when the first device establishes a connection with the Bluetooth device, in response to the fourth input of the user, the device information is determined and the device information is sent to the Bluetooth device; in response to the second input of the user, the first connection condition information for all sub-devices is determined and the first connection condition information is sent to the Bluetooth device; in response to the third input of the user, the second connection condition information for each sub-device is determined and the second connection condition information for each sub-device is sent to the Bluetooth device. In this way, the information required for Bluetooth connection is set in advance, which facilitates the subsequent automatic switching connection of Bluetooth based on the set information, thereby improving the convenience and efficiency of Bluetooth switching.
[0132] In an embodiment of the present application, when the first device establishes a connection with the Bluetooth device, the communication unit 504 is also used to: determine a switching gesture in response to a first input from a user, and send the switching gesture to the Bluetooth device, so that the Bluetooth device switches its connection to the main device in response to the switching gesture when connected to the sub-device.
[0133] In the above embodiment provided by the present application, when the first device establishes a connection with the Bluetooth device, in response to the first input of the user, a switching gesture is determined, and the switching gesture is sent to the Bluetooth device, so that when the Bluetooth device is connected to the sub-device, in response to the switching gesture, the connection is switched to the main device. In this way, a fast connection between the main device and the Bluetooth device is achieved, and the convenience and efficiency of Bluetooth switching connection are improved.
[0134] In the embodiment of the present application, the communication unit 504 is also used to: when the first device establishes a connection with the Bluetooth device, in response to the user's fifth input, determine the connection priorities of multiple sub-devices and send the connection priorities to the Bluetooth device.
[0135] In the above embodiment provided by the present application, when the first device establishes a connection with the Bluetooth device, in response to the fifth input of the user, the connection priority of multiple sub-devices is determined, and the connection priority is sent to the Bluetooth device. In this way, by setting the connection priority of multiple sub-devices with the Bluetooth device, when multiple sub-devices meet the connection restriction conditions of the Bluetooth device, the Bluetooth device and the sub-device can be quickly connected without the user manually selecting the device to be connected to the Bluetooth device, thereby improving the convenience and efficiency of Bluetooth connection.
[0136] In an embodiment of the present application, the Bluetooth connection device 500 also includes: a display unit 508, which is used to display a first prompt information when the first device meets the connection condition information, and the first prompt information is used to indicate the connection condition information; the display unit 508 is also used to display a second prompt information when the first device does not meet the connection condition information, and the second prompt information is used to indicate the modification of the connection condition information.
[0137] In the above embodiment provided by the present application, when the first device meets the connection condition information, the first prompt information is displayed, and the first prompt information is used to indicate the connection condition information; when the first device does not meet the connection condition information, the second prompt information is displayed, and the second prompt information is used to indicate to modify the connection condition information. In this way, it is convenient for the user to timely grasp the connection status between the sub-device and the Bluetooth device, so as to make countermeasures in time to avoid delaying the subsequent connection between the sub-device and the Bluetooth device.
[0138] The Bluetooth connection device 500 in the embodiment of the present application can be an electronic device, or a component in an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0139] The Bluetooth connection device 500 in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0140] The Bluetooth connection device 500 provided in the embodiment of the present application can achieve Figure 1 To avoid repetition, the various processes implemented by the method embodiment are not described here.
[0141] Alternatively, if Figure 7 As shown, an embodiment of the present application further provides an electronic device 600, including a processor 602 and a memory 604, wherein the memory 604 stores programs or instructions that can be executed on the processor 602, and when the program or instructions are executed by the processor 602, the various steps of the above-mentioned Bluetooth connection method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they are not described here.
[0142] It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
[0143] Figure 8 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.
[0144] The electronic device 700 includes but is not limited to: a radio frequency unit 701, a network module 702, an audio output unit 703, an input unit 704, a sensor 705, a display unit 706, a user input unit 707, an interface unit 708, a memory 709, a processor 710 and other components.
[0145] Those skilled in the art will appreciate that the electronic device 700 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 710 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Figure 8 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0146] The processor 710 is used to obtain device information stored in the Bluetooth device when a Bluetooth device is searched.
[0147] The processor 710 is further configured to, when the device information indicates that the first device is a sub-device, obtain connection condition information corresponding to the first device stored in the Bluetooth device.
[0148] The network module 702 is used to establish a connection with the Bluetooth device when the first device meets the connection condition information.
[0149] The network module 702 is further configured to not establish a connection with the Bluetooth device when the first device does not meet the connection condition information.
[0150] Among them, the first device is the electronic device 700.
[0151] In an embodiment of the present application, when the first device searches for a Bluetooth device, the first device obtains the device information stored in the Bluetooth device; when the device information indicates that the first device is a sub-device, the first device obtains the connection condition information corresponding to the first device stored in the Bluetooth device; when the first device satisfies the connection condition information, the first device establishes a connection with the Bluetooth device; when the first device does not satisfy the connection condition information, the first device does not establish a connection with the Bluetooth device. In an embodiment of the present application, the connection condition information of the sub-device paired with the Bluetooth device is limited, and when the sub-device does not satisfy the corresponding connection condition information, the sub-device is not connected to the Bluetooth device. In this way, when the sub-device needs to be connected to the Bluetooth device, the connection condition information satisfied by the sub-device set in advance can be used to automatically connect the sub-device to the Bluetooth device without the need for manual operation by the user. When the sub-device does not need to be connected to the Bluetooth device, the sub-device is prohibited from connecting to the Bluetooth device through the connection condition information not satisfied by the sub-device set in advance, thereby reducing the user's manual disconnection of the sub-device from the Bluetooth device, and controlling the link of the Bluetooth device connecting to other devices, reducing the user's operation steps, and improving the connection efficiency between the electronic device and the Bluetooth device.
[0152] Optionally, after obtaining the connection condition information corresponding to the first device stored in the Bluetooth device, the processor 710 is further used to: obtain the connection information of the first device; when the connection information and the connection condition information meet the first condition, determine that the first device does not meet the connection condition information; when the connection information and the connection condition information meet the second condition, determine that the first device meets the connection condition information; wherein the connection information includes the number of connections between the first device and the Bluetooth device, the connection condition information includes a number threshold of connections between the first device and the Bluetooth device, and / or the connection information includes the connection time between the first device and the Bluetooth device, and the connection condition information includes a preset time period for the connection between the first device and the Bluetooth device; the first condition includes: the number of connections is greater than the number threshold, and / or the connection time is outside the preset time period; the second condition includes: the number of connections is less than or equal to the number threshold, and / or the connection time is within the preset time period.
[0153] The above-mentioned embodiment provided by the present application obtains the connection information of the first device after obtaining the connection condition information corresponding to the first device stored in the Bluetooth device; when the connection information and the connection condition information meet the first condition, it is determined that the first device does not meet the connection condition information; when the connection information and the connection condition information meet the second condition, it is determined that the first device meets the connection condition information; wherein, the connection information includes the number of connections between the first device and the Bluetooth device, the connection condition information includes a number threshold of connections between the first device and the Bluetooth device, and / or the connection information includes the connection time between the first device and the Bluetooth device, and the connection condition information includes a preset time period for the connection between the first device and the Bluetooth device; the first condition includes: the number of connections is greater than the number threshold, and / or the connection time is outside the preset time period; the second condition includes: the number of connections is less than or equal to the number threshold, and / or the connection time is within the preset time period. In this way, the maximum number of times or the preset time period that the sub-device can be connected to the Bluetooth device is limited. During the Bluetooth connection process, the sub-device and the Bluetooth device can be automatically connected when the number of connections between the sub-device and the Bluetooth device has not reached the upper limit or within the preset time period without the need for manual operation by the user. The sub-device can also be prevented from occupying the connection process of the Bluetooth device when the number of connections between the sub-device and the Bluetooth device reaches the upper limit or outside the preset time period, thereby eliminating the need for the user to manually disconnect the connection between the sub-device and the Bluetooth device, thereby improving the efficiency of the Bluetooth connection.
[0154] Optionally, the network module 702 is further configured to: establish a connection with a Bluetooth device when the device information indicates that the first device is a master device and no Bluetooth signal of a slave device is searched.
[0155] In the above embodiment provided by the present application, after obtaining the device information stored in the Bluetooth device, when the device information indicates that the first device is the main device and the Bluetooth signal of the sub-device is not searched, a connection is established with the Bluetooth device. In this way, when the Bluetooth device is switched from the sub-device to the main device, the Bluetooth of the sub-device can be turned off, without the need to re-pair the Bluetooth device with the main device, thereby improving the convenience and efficiency of Bluetooth switching.
[0156] Optionally, when the first device establishes a connection with the Bluetooth device, the processor 710 is also used to: determine the device information in response to the user's fourth input; the network module 702 is also used to: send the device information to the Bluetooth device; the processor 710 is also used to: determine the first connection condition information for all sub-devices in response to the user's second input; the network module 702 is also used to: send the first connection condition information to the Bluetooth device; the processor 710 is also used to: determine the second connection condition information for each sub-device in response to the user's third input; the network module 702 is also used to: send the second connection condition information for each sub-device to the Bluetooth device.
[0157] In the above embodiment provided by the present application, when the first device establishes a connection with the Bluetooth device, in response to the fourth input of the user, the device information is determined and the device information is sent to the Bluetooth device; in response to the second input of the user, the first connection condition information for all sub-devices is determined and the first connection condition information is sent to the Bluetooth device; in response to the third input of the user, the second connection condition information for each sub-device is determined and the second connection condition information for each sub-device is sent to the Bluetooth device. In this way, the information required for Bluetooth connection is set in advance, which facilitates the subsequent automatic switching connection of Bluetooth based on the set information, thereby improving the convenience and efficiency of Bluetooth switching.
[0158] Optionally, when the first device establishes a connection with the Bluetooth device, the processor 710 is also used to: determine a switching gesture in response to the user's first input; the network module 702 is also used to: send the switching gesture to the Bluetooth device, so that the Bluetooth device switches the connection to the main device in response to the switching gesture when connected to the sub-device.
[0159] In the above embodiment provided by the present application, when the first device establishes a connection with the Bluetooth device, in response to the first input of the user, a switching gesture is determined, and the switching gesture is sent to the Bluetooth device, so that when the Bluetooth device is connected to the sub-device, in response to the switching gesture, the connection is switched to the main device. In this way, a fast connection between the main device and the Bluetooth device is achieved, and the convenience and efficiency of Bluetooth switching connection are improved.
[0160] Optionally, the processor 710 is further used to: when the first device establishes a connection with the Bluetooth device, in response to the user's fifth input, determine the connection priority of multiple sub-devices; the network module 702 is further used to: send the connection priority to the Bluetooth device.
[0161] In the above embodiment provided by the present application, when the first device establishes a connection with the Bluetooth device, in response to the fifth input of the user, the connection priority of multiple sub-devices is determined, and the connection priority is sent to the Bluetooth device. In this way, by setting the connection priority of multiple sub-devices with the Bluetooth device, when multiple sub-devices meet the connection restriction conditions of the Bluetooth device, the Bluetooth device and the sub-device can be quickly connected without the user manually selecting the device to be connected to the Bluetooth device, thereby improving the convenience and efficiency of Bluetooth connection.
[0162] Optionally, the display unit 706 is used to display first prompt information when the first device meets the connection condition information, and the first prompt information is used to indicate the connection condition information; the display unit 706 is also used to display second prompt information when the first device does not meet the connection condition information, and the second prompt information is used to indicate modification of the connection condition information.
[0163] In the above embodiment provided by the present application, when the first device meets the connection condition information, the first prompt information is displayed, and the first prompt information is used to indicate the connection condition information; when the first device does not meet the connection condition information, the second prompt information is displayed, and the second prompt information is used to indicate to modify the connection condition information. In this way, it is convenient for the user to timely grasp the connection status between the sub-device and the Bluetooth device, so as to make countermeasures in time to avoid delaying the subsequent connection between the sub-device and the Bluetooth device.
[0164] It should be understood that in the embodiment of the present application, the input unit 704 may include a graphics processor (Graphics Processing Unit, GPU) 7041 and a microphone 7042, and the graphics processor 7041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 706 may include a display panel 7061, and the display panel 7061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 707 includes a touch panel 7071 and at least one of other input devices 7072. The touch panel 7071 is also called a touch screen. The touch panel 7071 may include two parts: a touch detection device and a touch controller. Other input devices 7072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
[0165] The memory 709 can be used to store software programs and various data. The memory 709 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 709 may include a volatile memory or a non-volatile memory, or the memory 709 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 709 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0166] The processor 710 may include one or more processing units; optionally, the processor 710 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 710.
[0167] The embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned Bluetooth connection method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0168] The processor is the processor in the electronic device in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0169] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned Bluetooth connection method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0170] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0171] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned Bluetooth connection method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0172] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0173] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of each embodiment of the present application.
[0174] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A Bluetooth connection method, characterized in that: Executed by the first device, the Bluetooth connection method includes: When a Bluetooth device is found, obtaining device information stored in the Bluetooth device; When the device information indicates that the first device is a sub-device, acquiring connection condition information corresponding to the first device stored in the Bluetooth device; When the first device satisfies the connection condition information, establishing a connection with the Bluetooth device; If the first device does not meet the connection condition information, no connection is established with the Bluetooth device.
2. The Bluetooth connection method according to claim 1, characterized in that: After acquiring the connection condition information corresponding to the first device stored in the Bluetooth device, the Bluetooth connection method further includes: Acquire connection information of the first device; In a case where the connection information and the connection condition information satisfy a first condition, determining that the first device does not satisfy the connection condition information; If the connection information and the connection condition information satisfy a second condition, determining that the first device satisfies the connection condition information; Among them, the connection information includes the number of connections between the first device and the Bluetooth device, the connection condition information includes a threshold number of connections between the first device and the Bluetooth device, and / or the connection information includes the connection time between the first device and the Bluetooth device, and the connection condition information includes a preset time period for the connection between the first device and the Bluetooth device; the first condition includes: the number of connections is greater than the threshold number, and / or the connection time is outside the preset time period; the second condition includes: the number of connections is less than or equal to the threshold number, and / or the connection time is within the preset time period.
3. The Bluetooth connection method according to claim 1, characterized in that: After acquiring the device information stored in the Bluetooth device, the Bluetooth connection method further includes: When the device information indicates that the first device is a master device and no Bluetooth signal of a slave device is searched, a connection is established with the Bluetooth device.
4. The Bluetooth connection method according to any one of claims 1 to 3, characterized in that: When the first device establishes a connection with the Bluetooth device, the Bluetooth connection method further includes: In response to a first input from a user, a switching gesture is determined, and the switching gesture is sent to the Bluetooth device, so that the Bluetooth device switches the connection to the main device in response to the switching gesture when connected to the sub-device.
5. The Bluetooth connection method according to any one of claims 1 to 3, characterized in that: Also includes: In a case where the first device satisfies the connection condition information, displaying first prompt information, where the first prompt information is used to indicate the connection condition information; In the case that the first device does not satisfy the connection condition information, second prompt information is displayed, where the second prompt information is used to instruct to modify the connection condition information.
6. A Bluetooth connection device, characterized in that: Applied to the first device, the Bluetooth connection device includes: an acquiring unit, configured to acquire device information stored in the Bluetooth device when a Bluetooth device is found; The acquiring unit is further configured to acquire, when the device information indicates that the first device is a sub-device, connection condition information corresponding to the first device stored in the Bluetooth device; a communication unit, configured to establish a connection with the Bluetooth device when the first device satisfies the connection condition information; The communication unit is further configured to not establish a connection with the Bluetooth device if the first device does not satisfy the connection condition information.
7. The Bluetooth connection device according to claim 6, characterized in that: After acquiring the connection condition information corresponding to the first device stored in the Bluetooth device, the acquiring unit is further used to: Acquire connection information of the first device; The Bluetooth connection device also includes: a processing unit, configured to determine that the first device does not satisfy the connection condition information if the connection information and the connection condition information satisfy a first condition; The processing unit is further configured to determine that the first device satisfies the connection condition information if the connection information and the connection condition information satisfy a second condition; Among them, the connection information includes the number of connections between the first device and the Bluetooth device, the connection condition information includes a threshold number of connections between the first device and the Bluetooth device, and / or the connection information includes the connection time between the first device and the Bluetooth device, and the connection condition information includes a preset time period for the connection between the first device and the Bluetooth device; the first condition includes: the number of connections is greater than the threshold number, and / or the connection time is outside the preset time period; the second condition includes: the number of connections is less than or equal to the threshold number, and / or the connection time is within the preset time period.
8. The Bluetooth connection device according to claim 6, characterized in that: The communication unit is also used for: When the device information indicates that the first device is a master device and no Bluetooth signal of a slave device is searched, a connection is established with the Bluetooth device.
9. The Bluetooth connection device according to any one of claims 6 to 8, characterized in that: When the first device establishes a connection with the Bluetooth device, the communication unit is further used for: In response to a first input from a user, a switching gesture is determined, and the switching gesture is sent to the Bluetooth device, so that the Bluetooth device switches the connection to the main device in response to the switching gesture when connected to the sub-device.
10. The Bluetooth connection device according to any one of claims 6 to 8, characterized in that: Also includes: A display unit, configured to display first prompt information when the first device satisfies the connection condition information, wherein the first prompt information is used to indicate the connection condition information; The display unit is further configured to display second prompt information when the first device does not satisfy the connection condition information, wherein the second prompt information is configured to instruct modification of the connection condition information.
11. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the Bluetooth connection method according to any one of claims 1 to 5 are implemented.