Automatic switching method, device, equipment and medium for Bluetooth connection

By automatically identifying and feedbacking the connection information of Bluetooth devices, disconnecting existing connections, and establishing new Bluetooth connections, the problem of low Bluetooth connection efficiency is solved, and the connection efficiency and user experience between devices are improved.

CN115515117BActive Publication Date: 2024-10-01DONGGUAN YUANSHENG INTELLIGENT TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211168274.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-23
Publication Date
2024-10-01
Estimated Expiration
2042-09-23

AI Technical Summary

Technical Problem

The connection efficiency of the existing technology is not high during the Bluetooth connection process. In particular, the device cannot determine and select Bluetooth pairing information conveniently and quickly, which affects the efficiency of the Bluetooth connection.

Method used

An automatic switching method for Bluetooth connections is provided. By receiving the pairing information and device scanning information of the Bluetooth device, it identifies the connection type, feeds back the target connection information, disconnects the existing connection, and establishes a new Bluetooth connection.

Benefits of technology

It improves the connection efficiency between the Bluetooth device and the target device, simplifies user operations, and enhances the convenience of connection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115515117B_ABST
    Figure CN115515117B_ABST
Patent Text Reader

Abstract

The present invention discloses an automatic switching method, device, equipment and medium for Bluetooth connection. The method includes: if pairing information from a Bluetooth device is received, a Bluetooth connection is established with the Bluetooth device, device scanning information from the Bluetooth device is received and displayed; the connection type of each device in the device scanning information is identified, and the target connection information corresponding to the preset connection type is determined; the target connection information is fed back to the Bluetooth device; if confirmation information from the Bluetooth device is received, the Bluetooth connection with the Bluetooth device is disconnected, so that the Bluetooth device establishes a new Bluetooth connection with the corresponding target device according to the target connection information. Through the above method, the client establishes a Bluetooth connection with the Bluetooth device and obtains the device scanning information, identifies the device scanning information and determines the target connection information, and feeds back the target connection information to the Bluetooth device so that the Bluetooth device establishes the corresponding Bluetooth connection, thereby improving the connection efficiency between the Bluetooth device and the target device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of wireless communications, and in particular to an automatic switching method, device, equipment and medium for Bluetooth connection. Background Art

[0002] Bluetooth connection is widely used in short-distance information transmission scenarios. Two devices at a certain distance are connected through Bluetooth connection to achieve information transmission. With the increase of connectable devices, after obtaining multiple sets of Bluetooth pairing information, the device cannot easily and quickly determine the set of Bluetooth pairing information required for connection. In particular, for hearing aids, headphones and other devices, the Bluetooth pairing information cannot be displayed, and the user cannot conveniently input the selection information of the Bluetooth pairing information, resulting in the device being unable to quickly switch the Bluetooth connection according to the Bluetooth pairing information, affecting the efficiency of the Bluetooth connection. Therefore, the existing technical methods have the problem of low connection efficiency during the Bluetooth connection process. Summary of the invention

[0003] The embodiments of the present invention provide a method, device, equipment and medium for automatically switching Bluetooth connections, aiming to solve the problem of low connection efficiency in the Bluetooth connection process in the prior art methods.

[0004] In a first aspect, an embodiment of the present invention provides a method for automatically switching a Bluetooth connection, the method being applied in a client, the method comprising:

[0005] If pairing information is received from a Bluetooth device, a Bluetooth connection is established with the Bluetooth device;

[0006] receiving device scanning information from the Bluetooth device and displaying it;

[0007] Identifying the connection type of each device in the device scanning information, and determining target connection information corresponding to the preset connection type according to the identification result;

[0008] Feedback the target connection information to the Bluetooth device;

[0009] If confirmation information is received from the Bluetooth device, the Bluetooth connection with the Bluetooth device is disconnected, so that the Bluetooth device establishes a new Bluetooth connection with the corresponding target device according to the target connection information.

[0010] In a second aspect, an embodiment of the present invention provides an automatic switching device for a Bluetooth connection, wherein the device is configured in a client, and the device includes:

[0011] A Bluetooth connection establishing unit, configured to establish a Bluetooth connection with the Bluetooth device upon receiving pairing information from the Bluetooth device;

[0012] An information display unit, used for receiving and displaying device scanning information from the Bluetooth device;

[0013] a target connection information determination unit, configured to identify the connection type of each device in the device scanning information, and determine the target connection information corresponding to the preset connection type according to the identification result;

[0014] A target connection information feedback unit, configured to feed back the target connection information to the Bluetooth device;

[0015] The connection disconnection unit is used to disconnect the Bluetooth connection with the Bluetooth device if confirmation information is received from the Bluetooth device, so that the Bluetooth device can establish a new Bluetooth connection with the corresponding target device according to the target connection information.

[0016] In a third aspect, an embodiment of the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the automatic switching method of the Bluetooth connection described in the first aspect is implemented.

[0017] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor executes the automatic switching method of the Bluetooth connection described in the first aspect above.

[0018] The embodiment of the present invention provides a method, device, equipment and medium for automatically switching Bluetooth connections. If pairing information is received from a Bluetooth device, a Bluetooth connection is established with the Bluetooth device, and device scanning information from the Bluetooth device is received and displayed; the connection type of each device in the device scanning information is identified to determine the target connection information corresponding to the preset connection type according to the identification result; the target connection information is fed back to the Bluetooth device; if confirmation information is received from the Bluetooth device, the Bluetooth connection with the Bluetooth device is disconnected so that the Bluetooth device establishes a new Bluetooth connection with the corresponding target device according to the target connection information. Through the above method, the client establishes a Bluetooth connection with the Bluetooth device and obtains the device scanning information, identifies the device scanning information and determines the target connection information, and feeds back the target connection information to the Bluetooth device so that the Bluetooth device establishes the corresponding Bluetooth connection, thereby improving the connection efficiency between the Bluetooth device and the target device. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.

[0020] Figure 1 A schematic diagram of a flow chart of an automatic switching method for a Bluetooth connection provided by an embodiment of the present invention;

[0021] Figure 2 A schematic diagram of an application scenario of the automatic switching method for Bluetooth connection provided by an embodiment of the present invention;

[0022] Figure 3 A schematic diagram of a sub-process of an automatic switching method for a Bluetooth connection provided by an embodiment of the present invention;

[0023] Figure 4 Another schematic diagram of a flow chart of the automatic switching method of a Bluetooth connection provided by an embodiment of the present invention;

[0024] Figure 5 Another schematic diagram of a flow chart of the automatic switching method of a Bluetooth connection provided by an embodiment of the present invention;

[0025] Figure 6 A further flow chart of the automatic switching method of a Bluetooth connection provided by an embodiment of the present invention;

[0026] Figure 7 A schematic diagram of the next process of the automatic switching method of the Bluetooth connection provided by the embodiment of the present invention;

[0027] Figure 8 A schematic block diagram of an automatic switching device for a Bluetooth connection provided by an embodiment of the present invention;

[0028] Fig. 9 A schematic block diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0029] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0030] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0031] It should also be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0032] It should be further understood that the term "and / or" used in the present description and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0033] See also Figure 1 and Figure 2 As shown in the figure, the automatic switching method of the Bluetooth connection is applied to the client 10. The client 10 can establish a Bluetooth connection with the Bluetooth device 20 and realize the transmission of data information. The method is executed by the application software installed in the client 10. The client 10 can be a terminal device for the user to input information and establish a Bluetooth connection with the Bluetooth device 20, such as a desktop computer, a laptop computer, a tablet computer or a mobile phone. The Bluetooth device 20 can be a device for establishing a Bluetooth connection with other devices and realizing data transmission, such as a smart wearable device, a hearing aid, a Bluetooth headset, etc. The Bluetooth device can establish a Bluetooth connection with the target device 30. The target device 30 can be other terminal devices other than the client 10, such as a smart speaker, a TV, etc. The Bluetooth device 20 sends Bluetooth pairing information and establishes a Bluetooth connection with the client 10 first. The Bluetooth device 20 sends device scanning information to the client 10. The client 10 identifies the connection type of each device in the device scanning information and determines the target connection information therefrom. The client 10 feeds back the target connection information to the Bluetooth device 20. After the Bluetooth connection between the Bluetooth device 20 and the client 10 is disconnected, a new Bluetooth connection is established with the corresponding target device 30 according to the target connection information. The above method realizes the application of automatic switching connection during the Bluetooth connection process.

[0034] like Figure 1 As shown, the method includes steps S110 to S150.

[0035] S110: If pairing information from a Bluetooth device is received, establish a Bluetooth connection with the Bluetooth device.

[0036] If pairing information is received from a Bluetooth device, a Bluetooth connection is established with the Bluetooth device. The client can receive pairing information from a Bluetooth device. The pairing information of a Bluetooth device includes information such as the device name and the device MAC address (Media Access Control Address). The Bluetooth device broadcasts the pairing information, and other devices within a certain range from the Bluetooth device can receive the pairing information of the Bluetooth device. After the client receives the pairing information of the Bluetooth device, it can establish a Bluetooth connection with the Bluetooth device based on the pairing information. Specifically, the client sends return information corresponding to the pairing information to the Bluetooth device according to the Bluetooth protocol, thereby establishing a Bluetooth connection with the Bluetooth device.

[0037] S120: Receive device scanning information from the Bluetooth device and display it.

[0038] Receive and display device scanning information from the Bluetooth device. After establishing a Bluetooth connection, the Bluetooth device can send device scanning information to the client. The device scanning information is the scanning information of the surrounding devices obtained by the Bluetooth device before sending the pairing information. Other surrounding devices send Bluetooth pairing information to the Bluetooth device. The Bluetooth device collects the Bluetooth pairing information of other surrounding devices to scan the surrounding devices and obtain device scanning information. The device scanning information includes the device name, device MAC address and other information of the surrounding devices.

[0039] After receiving the device scanning information, the client displays the device scanning information, such as displaying the device scanning information on a display screen of a mobile phone, tablet computer or other device.

[0040] S130: Identify the connection type of each device in the device scanning information to determine target connection information corresponding to the preset connection type according to the identification result.

[0041] The connection type of each device in the device scanning information is identified, so as to determine the target connection information corresponding to the preset connection type according to the identification result. The client can identify the device scanning information, that is, identify the connection type of each device in the device scanning information, and determine the target connection information corresponding to the preset connection type from the device scanning information according to the identification result. The device scanning information may contain one or more devices of connection types, and the connection types of the devices include target connection types, alternative connection types, non-target connection types, etc.

[0042] For example, if the preset connection type is the target connection type, the device address (such as MAC address) of the device of the target connection type in the identification result may be determined as the target connection information corresponding to the preset connection type.

[0043] In a specific embodiment, Figure 3 As shown, step S130 includes sub-steps S131 and S132.

[0044] S131. Receive identification information fed back by the user according to the device scanning information.

[0045] Specifically, after the device scanning information is displayed on the client, the user can add identification information to the device scanning information displayed on the client, and the identification information is information for classifying and identifying each device in the device scanning information. The client can receive the identification information input by the user. The identification information can include identifications added to some devices in the device scanning information, or it can be the device scanning information.

[0046] For example, a user may click on a device in the device scan information to add a classification identifier to the device. The identification information is information used to identify the device to be connected to Bluetooth.

[0047] Users can also add different classification identifiers to each device in the device scanning information. This information is used to identify the importance of the Bluetooth connection required, such as selecting one or more devices to add a classification identifier of "1", and selecting one or more devices to add a classification identifier of "2".

[0048] S132: Determine the connection type of each device in the device scanning information according to the identification information, and obtain a corresponding identification result.

[0049] Determine the connection type of each device in the device scanning information based on the identification information, and determine the devices in the device scanning information that belong to the target connection type or the alternative connection type based on the identification information, thereby obtaining an identification result. For example, if only one device in the device scanning information has a classification identifier added, then the device is determined to be the target connection type and the corresponding identification result is obtained. If classification identifiers are added to multiple devices in the device scanning information, then the devices are determined to correspond to different connection types based on the classification identifiers of the devices, such as devices containing a classification identifier of "1" correspond to the target connection type, devices containing a classification identifier of "2" correspond to the alternative connection type, and devices containing a classification identifier of "3" correspond to the non-target connection type, and the corresponding identification result is obtained.

[0050] In a specific embodiment, step S130 includes a sub-step of: identifying the connection type of each device in the device scanning information according to a pre-stored device type identification table to obtain a corresponding identification result.

[0051] The client also stores a device type identification table, and the connection type of each device in the device scan information can be identified according to the device type identification table, thereby obtaining an identification result. The device type identification table includes connection type labels corresponding to different device basic information, wherein the device basic information includes the device name, MAC address, etc. The connection type of each device in the device scan information can be identified according to the matching relationship between the information of each device in the device scan information and the device basic information. If the information of the device in the device scan information matches a certain device basic information, the connection type of the device is determined to be the connection type label corresponding to the matching device basic information, thereby obtaining the corresponding identification result.

[0052] In a specific embodiment, Figure 4 As shown, the step of identifying the connection type of each device in the device scan information according to the pre-stored device type identification table, before obtaining the corresponding identification result, also includes steps S1301, S1302 and S1303.

[0053] S1301: Acquire first driver information of a connection device for establishing a Bluetooth connection.

[0054] Before identifying the connection type of each device in the device scanning information through the device type identification table, the corresponding driver information can also be obtained to construct the device type identification table. Specifically, the first driver information of the connection device that establishes the Bluetooth connection can be obtained, that is, when the Bluetooth connection is established between the connection device and the client, the first driver information of the connection device can be obtained through the established Bluetooth connection. The client can obtain the first driver information before establishing a Bluetooth connection between the client and the Bluetooth device.

[0055] For example, when the client establishes a Bluetooth connection with the TV, the client can obtain the first driver information of the connected device through an interface provided by the system (such as the interface provided by the Android operating system is device.getBluetoothClass()). The first driver information can be a string of binary characters.

[0056] S1302: Identify the first drive information according to a preset drive identification rule to obtain a connection type label corresponding to the connection device.

[0057] The first drive information can be identified according to the drive identification rule, so as to obtain the connection type label corresponding to the connection device according to the identification result. Specifically, the characters in a specific section of the binary string in the first drive information can be identified to obtain the corresponding connection type information.

[0058] Specifically, the binary characters of a specific section in the drive identification rule and the corresponding identification type can be represented by Table 1.

[0059] Table 1

[0060] 12-bit 11th place 10-bit 9-digit 8-bit Drive type 0 0 0 0 1 Computer (laptop, tablet, etc.) 0 0 0 1 0 Telephone 0 0 0 1 1 network 0 0 1 0 0 video 0 0 1 0 1 Peripherals (mouse, keyboard, etc.)

[0061] According to the content shown in Table 1, the binary characters from the 8th to the 12th bits in the binary character can be obtained, and the 8th to the 12th bits are the specific segment for drive type identification. According to the correspondence between the binary characters of the specific segment and the numerical values ​​of the drive types in the above table, the drive type that uniquely matches the binary characters of the specific segment can be obtained.

[0062] The driver identification rules also include the correspondence between the driver type and the connection type. Specifically, the correspondence between the driver type and the connection type can be: video-target connection type, phone-alternative connection type, computer-alternative connection type, network-non-target connection type, peripheral-non-target connection type. According to the correspondence between the driver type and the connection type, after obtaining the driver type corresponding to the first driver information, the connection type matching the first driver information can be further obtained, and the connection type matching the first driver information can be used as the connection type label of the connection device to which the first driver information belongs.

[0063] For example, according to the drive identification rule, the drive type of the binary character in the specific segment of the first drive information is identified as a video type (the television is used to play videos and belongs to the video type), then the connection type label of the connecting device can be further determined to be the target connection type, and the target connection type is used as the connection type label of the connecting device.

[0064] S1303: Add the connection type tag of the connection device to the device type identification table.

[0065] Add the connection type tag of the connected device to the device type identification table. Specifically, when the client obtains the first driver information of the connected device, it will also obtain the basic device information of the connected device. The basic device information includes the device name, MAC address and other information of the connected device. The basic device information of the connected device can be associated with the connection type tag of the connected device and stored in the device type identification table together. The device type identification table then contains the basic device information and connection type tag of the same connected device.

[0066] In a specific embodiment, Figure 5 As shown, before step S1303, steps S1311 and S1312 are also included.

[0067] S1311. Receive second driver information from the Bluetooth device, where the second driver information is driver information of a connection device that establishes a Bluetooth connection with the Bluetooth device; S1312. Identify the second driver information according to a preset driver identification rule to obtain a connection type label corresponding to the connection device.

[0068] The Bluetooth device can also establish a Bluetooth connection with the peripheral device, then the Bluetooth device can obtain the second driver information of the connected device with which the Bluetooth connection is established, and send the second driver information to the client. After the client obtains the second driver information, it can identify the second driver information according to the driver identification rule. Specifically, the second driver information is similar to the first driver information, and the process of identifying the second driver information is the same as the process of identifying the first driver information, which is not described in detail here. Among them, the Bluetooth device can obtain the second driver information before the Bluetooth device establishes a Bluetooth connection with the client.

[0069] After the second driving information is identified, the connection type label of the connection device can also be obtained. The connection device here is the device that establishes a Bluetooth connection with the Bluetooth device.

[0070] S140: Feedback the target connection information to the Bluetooth device.

[0071] Feedback the target connection information to the Bluetooth device. After the client obtains the target connection information, it can feed back the target connection information to the Bluetooth device. The information transmission performed in this feedback process can be achieved through the Bluetooth connection established with the Bluetooth device.

[0072] S150: If confirmation information is received from the Bluetooth device, disconnect the Bluetooth connection with the Bluetooth device, so that the Bluetooth device establishes a new Bluetooth connection with the corresponding target device according to the target connection information.

[0073] If confirmation information is received from the Bluetooth device, the Bluetooth connection with the Bluetooth device is disconnected, so that the Bluetooth device can establish a new Bluetooth connection with the corresponding target device according to the target connection information. After the Bluetooth device obtains the target connection information, it can feed back confirmation information to the client. The confirmation information is also the information that the Bluetooth device confirms the receipt of the target connection information. After the client receives the confirmation information, it can disconnect the Bluetooth connection with the Bluetooth device. After the Bluetooth device disconnects the Bluetooth connection with the client, the Bluetooth device can establish a new Bluetooth connection with the target device corresponding to the target connection information according to the target connection information.

[0074] If the target connection information is the MAC address of the TV, the Bluetooth device can establish a Bluetooth connection with the TV according to the target connection information.

[0075] In a specific embodiment, Figure 6 As shown, after step S110 and before step S150, steps S210, S211, S212 and S213 are also included.

[0076] S210: Send a Bluetooth signal to scan surrounding devices to obtain device information of the surrounding devices.

[0077] After establishing a Bluetooth connection between the client and the Bluetooth device, the client can also transmit Bluetooth signals to scan surrounding devices and obtain device information of surrounding devices. The device information includes device name and MAC address. As long as there is a device with Bluetooth function turned on around the client, the client can obtain the device information of the device.

[0078] S211. Match the device information of each of the peripheral devices according to the device type identification table to determine the connection type of each of the peripheral devices.

[0079] The device information of each peripheral device is matched according to the device type identification table. Specifically, the device information of the peripheral device can be matched with the basic device information corresponding to each connection type in the device type identification table. If the device information of a peripheral device matches the basic device information in the device type identification table, the connection type corresponding to the basic device information can be obtained and determined as the connection type of the peripheral device.

[0080] S212: Determine whether a peripheral device whose connection type matches the preset connection type is included.

[0081] The connection types of all peripheral information can be identified, thereby obtaining the connection types of all peripheral devices, and determining whether peripheral devices whose connection types match the preset connection types are included. For example, the preset connection type can be a target connection type.

[0082] S213: If a peripheral device matching the preset connection type is included, determine the peripheral device matching the preset connection type as a target connection device and send device connection information of the target connection device to the Bluetooth device.

[0083] If a peripheral device matching the preset connection type is included, the peripheral device matching the preset connection type can be determined as the target connection device, and the device connection information of the target connection device is obtained and sent to the Bluetooth device. The device connection information of the target connection device can be the MAC address of the target connection device.

[0084] In a specific embodiment, Figure 7 As shown, after step S150, step S151 is also included.

[0085] S151. A preset trigger condition is met, and a virtual Bluetooth name is generated, so that the Bluetooth device re-establishes a Bluetooth connection with the client after scanning the Bluetooth signal and obtaining the virtual Bluetooth name.

[0086] The client can also pre-set trigger conditions. If the client detects that the trigger conditions are met, a virtual Bluetooth name can be generated. For example, the trigger conditions can be broadcasting a call, receiving a call, starting a voice call, starting a video call, etc. If it is determined that the client meets the trigger condition, a virtual Bluetooth name can be generated. The virtual Bluetooth name can be a string containing a specific identifier. For example, the virtual Bluetooth name is a string containing the three letters "ztq". Other random characters can be added to combine with "ztq" to generate a virtual Bluetooth name. For example, the generated virtual Bluetooth name is "ztpXXXXX". The client can broadcast the generated virtual Bluetooth name, and the Bluetooth device can scan the surrounding devices by transmitting Bluetooth signals and obtain the device information of the surrounding devices. The device information includes the Bluetooth name and MAC address. The device information of the surrounding devices obtained by the Bluetooth device must include the device information named as the virtual Bluetooth name. If the Bluetooth device determines that the virtual Bluetooth name contains "ztp", it can disconnect the Bluetooth connection with other devices and establish a Bluetooth connection with the client through the MAC address corresponding to the virtual Bluetooth name.

[0087] In this application scenario, when users use the client to make calls, receive calls, start voice calls, and start video calls, they can generate a virtual Bluetooth name by themselves. After the Bluetooth device detects the virtual Bluetooth name, it can establish a Bluetooth connection with the client, making it convenient for customers to use Bluetooth devices to answer calls, etc. This realizes the intelligent switching of Bluetooth, greatly improving the convenience of user use.

[0088] In the automatic switching method of Bluetooth connection provided in the embodiment of the present invention, if pairing information is received from a Bluetooth device, a Bluetooth connection is established with the Bluetooth device, device scanning information from the Bluetooth device is received and displayed; the connection type of each device in the device scanning information is identified to determine the target connection information corresponding to the preset connection type according to the identification result; the target connection information is fed back to the Bluetooth device; if confirmation information is received from the Bluetooth device, the Bluetooth connection with the Bluetooth device is disconnected so that the Bluetooth device establishes a new Bluetooth connection with the corresponding target device according to the target connection information. Through the above method, the client establishes a Bluetooth connection with the Bluetooth device and obtains the device scanning information, identifies the device scanning information and determines the target connection information, and feeds back the target connection information to the Bluetooth device so that the Bluetooth device establishes the corresponding Bluetooth connection, thereby improving the connection efficiency between the Bluetooth device and the target device.

[0089] The embodiment of the present invention further provides an automatic switching device for Bluetooth connection, which can be configured in the client 10 and is used to execute any embodiment of the automatic switching method for Bluetooth connection described above. Figure 8 , Figure 8 A schematic block diagram of an automatic switching device for a Bluetooth connection provided by an embodiment of the present invention.

[0090] like Figure 8 As shown, the automatic switching device 100 of the Bluetooth connection includes a Bluetooth connection establishing unit 110 , an information display unit 120 , a target connection information determining unit 130 , a target connection information feedback unit 140 and a connection disconnecting unit 150 .

[0091] The Bluetooth connection establishing unit 110 is configured to establish a Bluetooth connection with the Bluetooth device upon receiving pairing information from the Bluetooth device.

[0092] The information display unit 120 is used to receive and display the device scanning information from the Bluetooth device.

[0093] The target connection information determining unit 130 is configured to identify the connection type of each device in the device scanning information, and determine the target connection information corresponding to the preset connection type according to the identification result.

[0094] The target connection information feedback unit 140 is configured to feed back the target connection information to the Bluetooth device.

[0095] The connection disconnection unit 150 is used to disconnect the Bluetooth connection with the Bluetooth device if confirmation information is received from the Bluetooth device, so that the Bluetooth device can establish a new Bluetooth connection with the corresponding target device according to the target connection information.

[0096] The automatic switching device for Bluetooth connection provided in the embodiment of the present invention applies the above-mentioned automatic switching method for Bluetooth connection. If pairing information is received from a Bluetooth device, a Bluetooth connection is established with the Bluetooth device, and device scanning information from the Bluetooth device is received and displayed; the connection type of each device in the device scanning information is identified to determine the target connection information corresponding to the preset connection type according to the identification result; the target connection information is fed back to the Bluetooth device; if confirmation information is received from the Bluetooth device, the Bluetooth connection with the Bluetooth device is disconnected so that the Bluetooth device establishes a new Bluetooth connection with the corresponding target device according to the target connection information. Through the above-mentioned method, the client establishes a Bluetooth connection with the Bluetooth device and obtains the device scanning information, identifies the device scanning information and determines the target connection information, and feeds back the target connection information to the Bluetooth device so that the Bluetooth device establishes the corresponding Bluetooth connection, thereby improving the connection efficiency between the Bluetooth device and the target device.

[0097] The automatic switching device for Bluetooth connection can be implemented in the form of a computer program. Fig. 9 Runs on the computer device shown.

[0098] See also Fig. 9 , Fig. 9 : is a schematic block diagram of a computer device provided by an embodiment of the present invention. The computer device may be a client for executing an automatic switching method for Bluetooth connection to identify device scanning information from a Bluetooth device and to identify and obtain target connection information and feed it back to the Bluetooth device.

[0099] See also Fig. 9 The computer device 500 includes a processor 502 , a memory and a network interface 505 connected via a system bus 501 , wherein the memory may include a storage medium 503 and an internal memory 504 .

[0100] The storage medium 503 may store an operating system 5031 and a computer program 5032. When the computer program 5032 is executed, the processor 502 may execute an automatic switching method for a Bluetooth connection, wherein the storage medium 503 may be a volatile storage medium or a non-volatile storage medium.

[0101] The processor 502 is used to provide computing and control capabilities to support the operation of the entire computer device 500 .

[0102] The internal memory 504 provides an environment for the operation of the computer program 5032 in the storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute the automatic switching method of the Bluetooth connection.

[0103] The network interface 505 is used for network communication, such as providing data information transmission, etc. Those skilled in the art will understand that Fig. 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present invention, and does not constitute a limitation on the computer device 500 to which the solution of the present invention is applied. The specific computer device 500 may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0104] The processor 502 is used to run the computer program 5032 stored in the memory to implement the corresponding functions in the above-mentioned automatic switching method of Bluetooth connection.

[0105] Those skilled in the art will understand that Fig. 9The embodiments of the computer device shown in the figure do not constitute a limitation on the specific composition of the computer device. In other embodiments, the computer device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. For example, in some embodiments, the computer device may only include a memory and a processor. In such embodiments, the structure and function of the memory and the processor are the same as those of the embodiment of the present invention. Fig. 9 The embodiments shown are consistent and will not be described again here.

[0106] It should be understood that in the embodiment of the present invention, the processor 502 may be a central processing unit (CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0107] In another embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium may be a volatile or non-volatile computer-readable storage medium. The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps included in the automatic switching method of the Bluetooth connection are implemented.

[0108] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the above-described equipment, devices and units can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. Those of ordinary skill in the art can appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to the function. Whether these functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.

[0109] In the several embodiments provided by the present invention, it should be understood that the disclosed equipment, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. Units with the same function may also be combined into one unit. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices or units, or may be an electrical, mechanical or other form of connection.

[0110] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present invention.

[0111] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0112] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a computer-readable storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned computer-readable storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a magnetic disk or an optical disk.

[0113] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A method for automatically switching Bluetooth connections, It is characterized in that The method is applied in a client, and the method includes: If pairing information is received from a Bluetooth device, a Bluetooth connection is established with the Bluetooth device; Receive and display device scanning information from the Bluetooth device; the device scanning information is information collected by the Bluetooth device when other surrounding devices send Bluetooth pairing information to the Bluetooth device; the device scanning information includes one or more devices of the connection type; Identifying the connection type of each device in the device scanning information, and determining target connection information corresponding to the preset connection type according to the identification result; Feedback the target connection information to the Bluetooth device; If confirmation information is received from the Bluetooth device, disconnecting the Bluetooth connection with the Bluetooth device, so that the Bluetooth device establishes a new Bluetooth connection with the corresponding target device according to the target connection information; The identifying the connection type of each device in the device scanning information includes: Receiving identification information fed back by the user based on the device scanning information; Determine the connection type of each device in the device scanning information according to the identification information, and obtain a corresponding identification result; the connection type includes a target connection type, an alternative connection type and a non-target connection type, Alternatively, the identifying the connection type of each device in the device scanning information includes: The connection type of each device in the device scanning information is identified according to the pre-stored device type identification table to obtain a corresponding identification result.

2. The automatic switching method of Bluetooth connection according to claim 1, It is characterized in that Before identifying the connection type of each device in the device scanning information according to the pre-stored device type identification table, the method further includes: Acquire first driver information of a connection device for establishing a Bluetooth connection; Identify the first drive information according to a preset drive identification rule to obtain a connection type label corresponding to the connection device; The connection type tag of the connection device is added to the device type identification table.

3. The automatic switching method of Bluetooth connection according to claim 2, It is characterized in that Before adding the connection type tag of the connection device to the device type identification table, the method further includes: receiving second driving information from the Bluetooth device, where the second driving information is driving information of a connection device that establishes a Bluetooth connection with the Bluetooth device; The second drive information is identified according to a preset drive identification rule to obtain a connection type label corresponding to the connection device.

4. The automatic switching method of Bluetooth connection according to claim 1, It is characterized in that After establishing the Bluetooth connection with the Bluetooth device and before disconnecting the Bluetooth connection with the Bluetooth device if confirmation information from the Bluetooth device is received, the method further includes: Transmit Bluetooth signals to scan surrounding devices to obtain device information of surrounding devices; Matching the device information of each of the peripheral devices according to the device type identification table to determine the connection type of each of the peripheral devices; Determining whether a peripheral device whose connection type matches the preset connection type is included; If a peripheral device matching the preset connection type is included, the peripheral device matching the preset connection type is determined as a target connection device and device connection information of the target connection device is sent to the Bluetooth device.

5. The automatic switching method of Bluetooth connection according to claim 1, It is characterized in that After disconnecting the Bluetooth connection with the Bluetooth device, the method further includes: When the preset triggering condition is met, a virtual Bluetooth name is generated, so that the Bluetooth device re-establishes a Bluetooth connection with the client after scanning the Bluetooth signal and obtaining the virtual Bluetooth name.

6. An automatic switching device for Bluetooth connection, It is characterized in that The device is configured in a client, and includes: A Bluetooth connection establishing unit, configured to establish a Bluetooth connection with the Bluetooth device upon receiving pairing information from the Bluetooth device; An information display unit, used for receiving and displaying device scanning information from the Bluetooth device; the device scanning information is information collected by the Bluetooth device when other surrounding devices send Bluetooth pairing information to the Bluetooth device; the device scanning information includes one or more devices of the connection type; a target connection information determination unit, configured to identify the connection type of each device in the device scanning information, and determine the target connection information corresponding to the preset connection type according to the identification result; A target connection information feedback unit, configured to feed back the target connection information to the Bluetooth device; a connection disconnection unit, configured to disconnect the Bluetooth connection with the Bluetooth device upon receiving confirmation information from the Bluetooth device, so that the Bluetooth device can establish a new Bluetooth connection with the corresponding target device according to the target connection information; The identifying the connection type of each device in the device scanning information includes: Receiving identification information fed back by the user based on the device scanning information; Determine the connection type of each device in the device scanning information according to the identification information, and obtain a corresponding identification result; the connection type includes a target connection type, an alternative connection type, and a non-target connection type; Alternatively, the identifying the connection type of each device in the device scanning information includes: The connection type of each device in the device scanning information is identified according to the pre-stored device type identification table to obtain a corresponding identification result.

7. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the method for automatically switching Bluetooth connections according to any one of claims 1 to 5 is implemented.

8. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for automatically switching a Bluetooth connection according to any one of claims 1 to 5 is implemented.