Bluetooth communication method and device, computer device and storage medium

By detecting and acquiring the data status information of Bluetooth devices, and determining the network status, a Bluetooth dial-up connection is established when connecting to the network. This solves the problem of no network availability caused by device disconnection, and improves connection reliability and user experience.

CN114980042BActive Publication Date: 2026-03-24GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 6 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-02-20
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

If a mobile phone is connected to another Bluetooth device and that device is unable to make a data connection, the phone will not have a usable data link and will be unable to access the internet, potentially causing it to miss important information.

Method used

By detecting the connection status with the second terminal, its data status information is obtained. The network status is determined based on the data status information. If the network is connected, a Bluetooth dial-up connection is initiated; otherwise, the user is prompted and the connection is initiated based on the user's confirmation.

Benefits of technology

By ensuring that data status is obtained before establishing a Bluetooth dial-up connection, and by only connecting when the second terminal is connected to the internet, the problem of no network availability caused by blindly interrupting the data link is avoided, thus improving the reliability of the connection and the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114980042B_ABST
    Figure CN114980042B_ABST
Patent Text Reader

Abstract

The application relates to a Bluetooth communication method, device, computer equipment and storage medium. The method comprises the following steps: detecting a connection state of a second terminal; if it is detected that a data transmission connection is established with the second terminal, acquiring data state information of the second terminal; the data transmission connection is used for acquiring the data state information of the second terminal, and the data state information is used for representing a network connection state of the second terminal; according to the data state information, determining a network state of the second terminal; if the network state of the second terminal is a network connection state, performing Bluetooth dial-up connection with the second terminal through a preset Bluetooth dial-up network configuration file, so as to share data network provided by the second terminal. The method can overcome the defect that the data of a first terminal is interrupted according to the Bluetooth DUN configuration blindly, so that the first terminal has no available data network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a Bluetooth communication method, apparatus, computer device, and storage medium. Background Technology

[0002] Bluetooth DUN (Dial-up Networking Profile) is a protocol file used by Bluetooth to enable one Bluetooth device to share internet access with another Bluetooth device that also supports wireless connectivity. When a mobile phone that supports Bluetooth DUN configuration connects to another Bluetooth device that supports Bluetooth DUN configuration, the phone, according to the Bluetooth DUN configuration, first interrupts its own data transmission, and then the phone re-establishes a data link with the other Bluetooth device before the user can regain internet access.

[0003] However, during the connection process between the mobile terminal and other Bluetooth devices, if the other Bluetooth devices are unable to establish a data dialing connection and establish a data link with the mobile phone, the mobile phone will not have a usable data link and will not be able to access the Internet, which may cause the mobile phone to miss some important information. Summary of the Invention

[0004] Therefore, it is necessary to provide a Bluetooth communication method, device, computer equipment, and storage medium to address the technical problem that, during the connection process between a mobile terminal and other Bluetooth devices, if the other Bluetooth devices are unable to establish a data dial-up connection and a data link is not established, the mobile phone will not have a usable data link and will be unable to access the Internet.

[0005] A Bluetooth communication method, applied to a first terminal, the method comprising:

[0006] Detect the connection status with the second terminal;

[0007] If a data transmission connection is detected to be established with the second terminal, the data status information of the second terminal is obtained; the data transmission connection is used to obtain the data status information of the second terminal, and the data status information is used to characterize the network connection status of the second terminal.

[0008] The network status of the second terminal is determined based on the data status information;

[0009] If the second terminal is connected to the network, it will establish a Bluetooth dial-up connection with the second terminal through a preset Bluetooth dial-up network configuration file to share the data network provided by the second terminal.

[0010] In one embodiment, after determining the network status of the second terminal based on the data status information, the method further includes:

[0011] If the network status of the second terminal is offline, a first prompt information page is displayed; the first prompt information page includes a first prompt information and a first confirmation selection entry; the first prompt information is used to prompt the second terminal that it is offline and whether to establish a Bluetooth dial-up connection with the second terminal.

[0012] If a trigger operation is received for the first confirmation selection entry, a Bluetooth dialing connection is established with the second terminal through the preset Bluetooth dialing network configuration file.

[0013] In one embodiment, if the network status of the second terminal is connected to the network, then establishing a Bluetooth dial-up connection with the second terminal through a preset Bluetooth dial-up network configuration file further includes:

[0014] Obtain the status parameters from the data status information of the second terminal;

[0015] Based on the status parameters, determine whether the data status information of the second terminal meets the network conditions of the current usage scenario of the first terminal;

[0016] If the data status information of the second terminal meets the network conditions of the current usage scenario of the first terminal, then a Bluetooth dial-up connection is established with the second terminal through the preset Bluetooth dial-up network configuration file.

[0017] In one embodiment, the method further includes:

[0018] If the data status information of the second terminal does not meet the network conditions of the current usage scenario of the first terminal, a second prompt information page is displayed; the second prompt information page includes a second prompt information and a second confirmation selection entry; the second prompt information is used to prompt whether to establish a Bluetooth dialing connection with the second terminal if the data status information of the second terminal does not meet the network conditions of the current usage scenario of the first terminal.

[0019] If a trigger operation is received for the second confirmation selection entry, a Bluetooth dialing connection is established with the second terminal through the preset Bluetooth dialing network configuration file.

[0020] In one embodiment, determining whether the data status information of the second terminal meets the network conditions of the current usage scenario of the first terminal based on the status parameter includes:

[0021] Obtain the scene identifier of the current usage scenario of the first terminal;

[0022] Obtain the corresponding state parameter range based on the scene identifier;

[0023] If the status parameter is within the range of the status parameter, then it is determined that the data status information of the second terminal meets the network conditions of the current usage scenario of the first terminal.

[0024] In one embodiment, the status parameters include signal strength, network latency, upload speed, and download speed;

[0025] The step of determining that the data status information of the second terminal satisfies the network conditions of the current usage scenario of the first terminal if the status parameter is within the range of the status parameter further includes:

[0026] If the signal strength in the data status information of the second terminal is within the signal strength range, the network latency is within the network latency range, the upload speed is within the upload speed range, and the download speed is within the download speed range, then the data status information of the second terminal is determined to meet the network conditions of the current usage scenario of the first terminal.

[0027] In one embodiment, if the data transmission connection established with the second terminal is the Bluetooth dial-up connection, after determining the network status of the second terminal based on the data status information, the method further includes:

[0028] If the network status of the second terminal is connected, then the current connection between the first terminal and the second terminal is maintained;

[0029] If the network status of the second terminal is offline, a third prompt information page is displayed; the third prompt information page includes a third prompt information, a third confirmation selection entry, and a third negation selection entry. The third prompt information is used to indicate that the network status of the second terminal is offline and whether to disconnect the Bluetooth dial-up connection with the second terminal.

[0030] A Bluetooth communication device is installed on a first terminal, the device comprising:

[0031] The status detection module is used to detect the connection status with the second terminal;

[0032] The information acquisition module is used to acquire data status information of the second terminal if a data transmission connection with the second terminal is detected; the data transmission connection is used to acquire the data status information of the second terminal, and the data status information is used to characterize the network connection status of the second terminal.

[0033] A status determination module is used to determine the network status of the second terminal based on the data status information.

[0034] The Bluetooth connection module is used to establish a Bluetooth dial-up connection with the second terminal through a preset Bluetooth dial-up network configuration file if the network status of the second terminal is connected to the network, so as to share the data network provided by the second terminal.

[0035] A computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program performing the following steps:

[0036] Detect the connection status with the second terminal;

[0037] If a data transmission connection is detected to be established with the second terminal, the data status information of the second terminal is obtained; the data transmission connection is used to obtain the data status information of the second terminal, and the data status information is used to characterize the network connection status of the second terminal.

[0038] The network status of the second terminal is determined based on the data status information;

[0039] If the second terminal is connected to the network, it will establish a Bluetooth dial-up connection with the second terminal through a preset Bluetooth dial-up network configuration file to share the data network provided by the second terminal.

[0040] A computer-readable storage medium having a computer program stored thereon, the computer program performing the following steps when executed by a processor:

[0041] Detect the connection status with the second terminal;

[0042] If a data transmission connection is detected to be established with the second terminal, the data status information of the second terminal is obtained; the data transmission connection is used to obtain the data status information of the second terminal, and the data status information is used to characterize the network connection status of the second terminal.

[0043] The network status of the second terminal is determined based on the data status information;

[0044] If the second terminal is connected to the network, it will establish a Bluetooth dial-up connection with the second terminal through a preset Bluetooth dial-up network configuration file to share the data network provided by the second terminal.

[0045] The aforementioned Bluetooth communication method, apparatus, computer device, and storage medium, wherein the first terminal detects the connection status with the second terminal, and upon detecting the establishment of a data transmission connection with the second terminal, acquires the data status information of the second terminal; the data transmission connection is used to acquire the data status information of the second terminal, and the data status information is used to characterize the network connection status of the second terminal; so as to determine the network status of the second terminal based on the data status information; further, when it is determined that the network status of the second terminal is connected to the network, a Bluetooth dial-up connection is established with the second terminal through a preset Bluetooth dial-up network configuration file to share the data network provided by the second terminal. This method overcomes the defect of blindly interrupting the data of the first terminal based on the Bluetooth DUN configuration, resulting in the first terminal having no data network available. Attached Figure Description

[0046] Figure 1 This is a diagram illustrating the application environment of a Bluetooth communication method in one embodiment;

[0047] Figure 2 This is a flowchart illustrating a Bluetooth communication method in one embodiment;

[0048] Figure 3 This is a configuration control flowchart based on Bluetooth data status in one embodiment;

[0049] Figure 4 This is a configuration control flowchart based on Bluetooth data state in another embodiment;

[0050] Figure 5 This is a flowchart illustrating the Bluetooth communication method in another embodiment;

[0051] Figure 6 This is a structural block diagram of a Bluetooth communication device in one embodiment;

[0052] Figure 7 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0053] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0054] The Bluetooth communication method provided in this application can be applied to, for example... Figure 1In the application environment shown, both the first terminal 102 and the second terminal 104 support Bluetooth dial-up connection (DUN). Taking the method applied to the first terminal 102 as an example, the first terminal 102 first detects its connection status with the second terminal 104. If a data transmission connection is established between the first terminal 102 and the second terminal 104, the data status information of the second terminal 104 is obtained to determine the network status of the second terminal 104. If the second terminal 104 is connected to the network, the first terminal 102 can establish a Bluetooth dial-up connection with the second terminal 104 through a preset Bluetooth dial-up network configuration file to share the data network provided by the second terminal 104. The first terminal 102 and the second terminal 104 can be, but are not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices.

[0055] In one embodiment, such as Figure 2 As shown, a Bluetooth communication method is provided, which can be applied to... Figure 1 Taking the first terminal 102 as an example, the explanation includes the following steps:

[0056] Step S202: Detect the connection status between the first terminal and the second terminal.

[0057] Specifically, the first terminal 102 detects the connection status between the first terminal 102 and the second terminal 104, which can be to detect whether a Bluetooth connection or other data transmission connection that can obtain data status information of the second terminal has been established between the two.

[0058] Step S204: If a data transmission connection is established between the first terminal and the second terminal, the data status information of the second terminal is obtained; the data transmission connection is used to obtain the data status information of the second terminal, and the data status information is used to characterize the network connection status of the second terminal.

[0059] The data transmission connection can be any connection that can obtain the data status information of the second terminal, such as a Bluetooth PAN connection (Personal Area Network).

[0060] Among them, data status information can be state parameters that characterize the network, and these state parameters may include signal strength, network latency, upload speed, and download speed.

[0061] Specifically, if the first terminal 102 detects that it has established a data transmission connection with the second terminal 104 that can obtain the data status information of the second terminal 104, it can obtain the data status information of the second terminal 104 and send the data status information to the configuration control module based on Bluetooth data status information installed in the first terminal 102, so that the configuration control module can analyze and process the data status information.

[0062] Step S206: Determine the network status of the second terminal based on the data status information.

[0063] The network status can include both connected and disconnected status.

[0064] Specifically, after the configuration control module in the first terminal 102 receives the data status information of the second terminal 104, it can determine the network status of the second terminal 104 based on the status parameters in the data status information, that is, determine whether the second terminal 104 is in a connected state or a disconnected state.

[0065] Step S208: If the network status of the second terminal is connected to the network, then establish a Bluetooth dial-up connection with the second terminal through the preset Bluetooth dial-up network configuration file to share the data network provided by the second terminal.

[0066] The Bluetooth dial-up network configuration file is a protocol file for Bluetooth that provides a standard for accessing the Internet and other dial-up services via Bluetooth technology.

[0067] Specifically, if the configuration control module of the first terminal 102 determines that the second terminal 104 is in a network-connected state based on the data status information of the second terminal 104, it can establish a Bluetooth dial-up connection (Bluetooth DUN connection) with the second terminal 104 through a preset Bluetooth dial-up network configuration file. After the connection is established, the first terminal 102 can share the data network provided by the second terminal 104 and access the Internet.

[0068] More specifically, the process of the first terminal 102 and the second terminal 104 establishing a Bluetooth dial-up connection includes: the first terminal 102 sending a Bluetooth dial-up connection request to the second terminal 104 through a preset Bluetooth dial-up network configuration file; the second terminal 104 responding to the Bluetooth dial-up connection request by returning a connection confirmation response to the first terminal 102; and then establishing network communication for the dial-up network. The first terminal 102 can use the telephone calling function of the second terminal 104 to open a network connection such as the Internet, thereby using the data network of the second terminal 104.

[0069] Furthermore, in one embodiment, after determining the network status of the second terminal based on the data status information, the method further includes: if the network status of the second terminal is offline, then displaying a first prompt information page; the first prompt information page includes a first prompt information and a first confirmation selection entry; the first prompt information is used to prompt whether to establish a Bluetooth dial-up connection with the second terminal when the second terminal is offline; if a trigger operation is received for the first confirmation selection entry, then establishing a Bluetooth dial-up connection with the second terminal through a preset Bluetooth dial-up network configuration file.

[0070] Specifically, if it is determined that the second terminal 104 is in a disconnected state, a first prompt information page will pop up on the first terminal 102, prompting the user that the second terminal 104 has no available data connection and asking whether the user still wants to establish a Bluetooth dial-up connection with the second terminal 104. The first prompt information page also includes a first negative selection entry; if a trigger operation is received for the first negative entry, the Bluetooth dial-up connection with the second terminal will be abandoned.

[0071] refer to Figure 3 The following is a configuration control flowchart based on Bluetooth data status in one embodiment. Taking the example that both the first terminal 102 and the second terminal 104 are mobile phones, the Bluetooth communication method will be described below:

[0072] (1) The user selects another mobile phone on the first mobile phone to make a Bluetooth dialing connection.

[0073] (2) The first mobile phone connects to the other mobile phone through a non-DUN configuration, that is, establishes a data transmission connection with the other mobile phone, obtains the data status information of the other mobile phone, and sends it to the Bluetooth status-based configuration control module in the first mobile phone.

[0074] (3) After receiving the data status information of another mobile phone, the configuration control module based on Bluetooth status determines whether the current data of the other mobile phone is connected, that is, whether the other mobile phone is in the network state. If it is determined that the other mobile phone is in the network state, the first mobile phone and the other mobile phone are connected via Bluetooth dialing through DUN configuration.

[0075] (4) If it is determined that the other mobile phone is not connected to the network, a prompt box will pop up to inform the user that the other mobile phone has no data connection at this time. If the first mobile phone is connected via DUN configuration, it may cause the first mobile phone to lose data. The user will be asked whether they still want to connect via Bluetooth according to DUN configuration. If the user selects yes (i.e., selects the first confirmation selection entry), the first mobile phone will establish a Bluetooth dial-up connection with the other mobile phone through DUN configuration. If the user selects no (i.e., selects the first negative selection entry), the Bluetooth dial-up connection with the other mobile phone will be abandoned.

[0076] (5) Complete the Bluetooth dialing connection between the first mobile phone and the second mobile phone (Bluetooth DUN connection).

[0077] It is understood that the first terminal and the second terminal can be a mobile phone and a computer, or a computer and a mobile phone, respectively. This embodiment is only for illustration and does not limit the scope of the invention.

[0078] In the aforementioned Bluetooth communication method, the first terminal detects the connection status with the second terminal. When a data transmission connection is established with the second terminal, the first terminal acquires the data status information of the second terminal. The data transmission connection is used to acquire the data status information of the second terminal, and the data status information is used to characterize the network connection status of the second terminal. This allows the network status of the second terminal to be determined based on the data status information. Furthermore, when the network status of the second terminal is determined to be connected to the network, a Bluetooth dial-up connection is established with the second terminal through a preset Bluetooth dial-up network configuration file to share the data network provided by the second terminal. This method overcomes the defect of blindly interrupting the data of the first terminal based on the Bluetooth DUN configuration, resulting in the first terminal having no data network available.

[0079] In one embodiment, step S208 includes: obtaining status parameters from the data status information of the second terminal; determining whether the data status information of the second terminal meets the network conditions of the current usage scenario of the first terminal based on the status parameters; if the data status information of the second terminal meets the network conditions of the current usage scenario of the first terminal, then establishing a Bluetooth dialing connection with the second terminal through a preset Bluetooth dialing network configuration file.

[0080] Furthermore, in one embodiment, if the data status information of the second terminal does not meet the network conditions of the current usage scenario of the first terminal, a second prompt information page is displayed; the second prompt information page includes a second prompt information and a second confirmation selection entry; the second prompt information is used to prompt whether to establish a Bluetooth dialing connection with the second terminal if the data status information of the second terminal does not meet the network conditions of the current usage scenario of the first terminal; if a trigger operation is received for the second confirmation selection entry, a Bluetooth dialing connection is established with the second terminal through a preset Bluetooth dialing network configuration file.

[0081] The current usage scenarios of the first terminal can include gaming, watching videos, downloading files, listening to music, and so on.

[0082] Specifically, when the first terminal 102 determines that the second terminal 104 is connected to the network, it can further determine whether the data status information of the second terminal 104 meets the network conditions required for the current usage scenario of the first terminal 102 based on status parameters such as signal strength, network latency, upload speed, and download speed in the data status information of the second terminal 104. If it does, a Bluetooth dial-up connection is established with the second terminal through a preset Bluetooth dial-up network profile. If it does not meet the requirements, a second prompt information page pops up, prompting the user that the network status of the second terminal 104 does not meet the current network conditions and asking whether the user still wants to establish a Bluetooth dial-up connection with the second terminal. The second prompt information page displays a second confirmation selection entry and a second negation selection entry for the user to choose from. When the first terminal 102 receives a trigger operation for the second confirmation selection entry, it establishes a Bluetooth dial-up connection with the second terminal through the preset Bluetooth dial-up network profile. Conversely, if a trigger operation is received for the second negation selection entry, the Bluetooth dial-up connection with the second terminal 104 is abandoned.

[0083] refer to Figure 4 The following is a configuration control flowchart based on Bluetooth data status in another embodiment. Taking the example that both the first terminal 102 and the second terminal 104 are mobile phones, the Bluetooth communication method is explained as follows:

[0084] (1) After the configuration control module based on Bluetooth data status in the first mobile phone obtains the data connection information of the other mobile phone, it obtains the status parameters such as signal strength, network latency, upload speed and download speed in the data status information.

[0085] (2) Determine whether the data connection of the other mobile phone can meet the current usage scenario of the first mobile phone based on the status parameters. If it can, connect the other mobile phone through DUN configuration. If it cannot, prompt the user that the data connection of the other mobile phone is poor at this time. If the other mobile phone is connected through DUN configuration, it may affect the mobile phone Internet experience. Ask the user whether they still want to make a Bluetooth dial-up connection according to DUN configuration.

[0086] (3) If the user chooses to still connect to another mobile phone via DUN configuration, then connect to another mobile phone via DUN configuration; if the user chooses no, then maintain the current Bluetooth connection.

[0087] (4) Execute other pending requests.

[0088] In this embodiment, when it is determined that the second terminal is in a network-connected state, the system further determines whether the data status information of the second terminal meets the network conditions of the first terminal's current usage scenario based on the status parameters. If it does, a Bluetooth dial-up connection is established with the second terminal. This improves the matching degree of the second terminal with the network conditions of the first terminal, making it easier to provide the first terminal with the optimal network conditions. When the data status information of the second terminal does not meet the network conditions of the first terminal's current usage scenario, the system prompts the user through a second prompt information page, allowing the user to choose whether to establish a Bluetooth dial-up connection with the second terminal according to their needs.

[0089] In one embodiment, the step of determining whether the data status information of the second terminal meets the network conditions of the current usage scenario of the first terminal based on the status parameters includes: obtaining the scenario identifier of the current usage scenario of the first terminal, obtaining the corresponding status parameter range based on the scenario identifier; if the status parameters are within the status parameter range, then determining that the data status information of the second terminal meets the network conditions of the current usage scenario of the first terminal.

[0090] The scene identifier is a unique identifier that marks the scene of use, and can be the scene name, scene number, etc.

[0091] Specifically, applications can be pre-categorized, for example, into game applications, video applications, music applications, and news applications. Each category of application is associated with a corresponding usage scenario; for example, game applications are associated with game scenarios, and video applications are associated with video viewing scenarios. A corresponding range of state parameters is set for each application scenario. Then, by obtaining the application currently used by the first terminal 102 and determining the current usage scenario of the first terminal 102 based on the associated usage scenario, the range of state parameters corresponding to the current usage scenario is further obtained and compared with the state parameters of the second terminal. If the state parameters are within the specified range, it is determined that the data status information of the second terminal meets the network conditions of the current usage scenario of the first terminal.

[0092] Furthermore, in one embodiment, the status parameters include signal strength, network latency, upload speed, and download speed; the step of determining that the data status information of the second terminal meets the network conditions of the current usage scenario of the first terminal if the status parameters are within the range of the status parameters further includes: if the signal strength in the data status information of the second terminal is within the signal strength range, the network latency is within the network latency range, the upload speed is within the upload speed range, and the download speed is within the download speed range, then the data status information of the second terminal meets the network conditions of the current usage scenario of the first terminal.

[0093] Network latency refers to the time taken for a message to travel through the transmission medium, that is, the time from when a message enters the network to when it leaves the network. For example, network latency can be expressed from smallest to largest as follows: 1~30ms < 31~50ms < 51~100ms < ... < 200~500ms.

[0094] In practical applications, it can also be set that when at least n conditions (n ​​is within the interval [1, 4]) of the signal strength, network latency, upload speed, and download speed of the second terminal are all satisfied, it is determined that the data status information of the second terminal meets the network conditions of the current usage scenario of the first terminal.

[0095] In this embodiment, by obtaining the range of state parameters corresponding to the current usage scenario of the first terminal, and comparing it with the state parameters in the data state information of the second terminal, it is determined whether the data state information of the second terminal meets the network conditions of the current usage scenario of the first terminal, so as to further determine whether to establish a Bluetooth dialing connection with the second terminal.

[0096] In one embodiment, if the data transmission connection established with the second terminal is a Bluetooth dial-up connection, then after step S106, the method further includes: if the network status of the second terminal is connected, then maintain the current connection between the first terminal and the second terminal; if the network status of the second terminal is disconnected, then display a third prompt information page; the third prompt information page includes a third prompt information, a third confirmation selection entry, and a third negation selection entry, the third prompt information being used to prompt whether to disconnect the Bluetooth dial-up connection with the second terminal when the network status of the second terminal is disconnected.

[0097] Specifically, if the initial data transmission connection established between the first terminal 102 and the second terminal 104 is a Bluetooth dial-up connection, then when it is determined that the network status of the second terminal 104 is connected, the current connection between the first terminal 102 and the second terminal 104 can be maintained. If the network status of the second terminal 104 is disconnected, the user is prompted that the second terminal 104 currently has no data connection and whether they want to disconnect the Bluetooth dial-up connection with the second terminal 104. If a trigger operation is received for the third confirmation selection entry, the Bluetooth dial-up connection with the second terminal 104 is disconnected; conversely, if a trigger operation is received for the third negation selection entry, the current Bluetooth dial-up connection with the second terminal 104 is maintained.

[0098] In this embodiment, the initial data transmission connection between the first terminal and the second terminal is a Bluetooth dial-up connection. The corresponding triggering strategy is executed according to the determined network status of the second terminal, so that the user can decide whether to disconnect the Bluetooth dial-up connection with the second terminal according to their needs, thereby improving the user's choice.

[0099] In another embodiment, such as Figure 5 As shown, a Bluetooth communication method is provided, which includes the following steps:

[0100] Step S502: Detect the connection status with the second terminal;

[0101] Step S504: If a data transmission connection is detected to be established with the second terminal, the data status information of the second terminal is obtained; the data transmission connection is used to obtain the data status information of the second terminal, and the data status information is used to characterize the network connection status of the second terminal;

[0102] Step S506: If the network status of the second terminal is connected, obtain the status parameters from the data status information of the second terminal;

[0103] Step S508: Based on the status parameters, determine whether the data status information of the second terminal meets the network conditions of the current usage scenario of the first terminal;

[0104] Step S510: If the data status information of the second terminal meets the network conditions of the current usage scenario of the first terminal, then a Bluetooth dialing connection is established with the second terminal through the preset Bluetooth dialing network configuration file.

[0105] Step S512: If the network status of the second terminal is offline, the first prompt information page is displayed; the first prompt information page includes the first prompt information and the first confirmation selection entry; the first prompt information is used to prompt the second terminal that it is offline and whether to make a Bluetooth dial-up connection with the second terminal.

[0106] Step S514: If a trigger operation is received for the first confirmation selection entry, a Bluetooth dialing connection is established with the second terminal through a preset Bluetooth dialing network configuration file.

[0107] The Bluetooth communication method provided in this embodiment obtains the data status of the second terminal through other non-Bluetooth dial-up connections before establishing a Bluetooth dial-up connection with the second terminal, thereby determining the network status of the second terminal. Only when it is determined that the second terminal is in a network state will a Bluetooth dial-up connection be established with the second terminal to share the data network provided by the second terminal. This overcomes the defect of blindly interrupting the data of the first terminal according to the Bluetooth DUN configuration, resulting in the first terminal having no data network available.

[0108] It should be understood that, although Figure 2-5 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 2-5 At least some of the steps in the process may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but may be executed at different times. The execution order of these steps or stages is not necessarily sequential, but may be executed in turn or alternately with other steps or at least some of the steps or stages in other steps.

[0109] In one embodiment, such as Figure 6 As shown, a Bluetooth communication device is provided, which is set in a first terminal and includes: a status detection module 602, an information acquisition module 604, a status determination module 606, and a Bluetooth connection module 608, wherein:

[0110] Status detection module 602 is used to detect the connection status with the second terminal;

[0111] The information acquisition module 604 is used to acquire the data status information of the second terminal if a data transmission connection with the second terminal is detected; the data transmission connection is used to acquire the data status information of the second terminal, and the data status information is used to characterize the network connection status of the second terminal.

[0112] The status determination module 606 is used to determine the network status of the second terminal based on the data status information.

[0113] The Bluetooth connection module 608 is used to establish a Bluetooth dial-up connection with the second terminal through a preset Bluetooth dial-up network configuration file if the second terminal is in a network connected state, so as to share the data network provided by the second terminal.

[0114] In one embodiment, the above-mentioned apparatus further includes:

[0115] The first page display module is used to display a first prompt information page if the network status of the second terminal is offline; the first prompt information page includes a first prompt information and a first confirmation selection entry; the first prompt information is used to prompt whether to establish a Bluetooth dial-up connection with the second terminal if the second terminal is offline.

[0116] The first dialing connection module is used to establish a Bluetooth dialing connection with the second terminal through a preset Bluetooth dialing network configuration file if a trigger operation is received for the first confirmation selection entry.

[0117] In one embodiment, the Bluetooth connection module 608 is specifically used to obtain the status parameters in the data status information of the second terminal; determine whether the data status information of the second terminal meets the network conditions of the current usage scenario of the first terminal based on the status parameters; if the data status information of the second terminal meets the network conditions of the current usage scenario of the first terminal, then establish a Bluetooth dial-up connection with the second terminal through a preset Bluetooth dial-up network configuration file.

[0118] In one embodiment, the above-mentioned apparatus further includes:

[0119] The second page display module is used to display a second prompt information page if the data status information of the second terminal does not meet the network conditions of the current usage scenario of the first terminal; the second prompt information page includes a second prompt information and a second confirmation selection entry; the second prompt information is used to prompt whether to establish a Bluetooth dialing connection with the second terminal if the data status information of the second terminal does not meet the network conditions of the current usage scenario of the first terminal.

[0120] The second dialing connection module is used to establish a Bluetooth dialing connection with the second terminal through a preset Bluetooth dialing network configuration file if a trigger operation for the second confirmation selection entry is received.

[0121] In one embodiment, the Bluetooth connection module 608 is further configured to obtain the scene identifier of the current usage scenario of the first terminal, and obtain the corresponding state parameter range according to the scene identifier; if the state parameter is within the state parameter range, it is determined that the data state information of the second terminal meets the network conditions of the current usage scenario of the first terminal.

[0122] In one embodiment, the Bluetooth connection module 608 is further configured to determine that the data status information of the second terminal meets the network conditions of the current usage scenario of the first terminal if the signal strength in the data status information of the second terminal is within the signal strength range, the network latency is within the network latency range, the upload speed is within the upload speed range, and the download speed is within the download speed range.

[0123] In one embodiment, if the data transmission connection established with the second terminal is a Bluetooth dial-up connection, the above-mentioned device further includes:

[0124] The maintenance module is used to maintain the current connection between the first terminal and the second terminal if the network status of the second terminal is connected.

[0125] The third page display module is used to display a third prompt information page if the network status of the second terminal is offline. The third prompt information page includes a third prompt information, a third confirmation selection entry, and a third negation selection entry. The third prompt information is used to indicate that the network status of the second terminal is offline and whether to disconnect the Bluetooth dial-up connection with the second terminal.

[0126] It should be noted that the Bluetooth communication device and the Bluetooth communication method of this application correspond one-to-one. The technical features and beneficial effects described in the embodiments of the Bluetooth communication method described above are applicable to the embodiments of the Bluetooth communication device. For details, please refer to the description in the embodiments of the method of this application. They will not be repeated here.

[0127] Furthermore, each module in the aforementioned Bluetooth communication device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0128] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 7 As shown, the computer device includes a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a Bluetooth communication method. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad located on the computer device's casing, or an external keyboard, touchpad, or mouse.

[0129] Those skilled in the art will understand that Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0130] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.

[0131] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.

[0132] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.

[0133] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0134] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A Bluetooth communication method, applied to a first terminal, characterized in that, The method includes: Before the first terminal interrupts its existing data network and establishes a Bluetooth connection with the second terminal, the connection status between the first terminal and the second terminal is detected. Both the first terminal and the second terminal support Bluetooth dial-up connection. After the first terminal interrupts its current data network, there will be no available data network and it will be unable to access the Internet. If a data transmission connection is detected between the first terminal and the second terminal, the data status information of the second terminal is obtained; the data transmission connection is any connection that can obtain the data status information of the second terminal, and the data status information is used to characterize the network connection status of the second terminal. The network status of the second terminal is determined based on the data status information; If the network status of the second terminal is connected, then obtain the status parameters, the scene identifier of the current usage scenario of the first terminal, and the range of status parameters corresponding to the scene identifier from the data status information; If the status parameter is within the range of the status parameter, it is determined that the data status information of the second terminal meets the network conditions of the current usage scenario of the first terminal, and a Bluetooth dialing connection is established with the second terminal through the preset Bluetooth dialing network configuration file to share the data network provided by the second terminal.

2. The method according to claim 1, characterized in that, After determining the network status of the second terminal based on the data status information, the process further includes: If the network status of the second terminal is offline, a first prompt information page is displayed; the first prompt information page includes a first prompt information and a first confirmation selection entry; the first prompt information is used to prompt that the second terminal is offline and whether to establish a Bluetooth dial-up connection with the second terminal. If a trigger operation is received for the first confirmation selection entry, a Bluetooth dialing connection is established with the second terminal through the preset Bluetooth dialing network configuration file.

3. The method according to claim 1, characterized in that, The method further includes: If the data status information of the second terminal does not meet the network conditions of the current usage scenario of the first terminal, a second prompt information page is displayed; the second prompt information page includes a second prompt information and a second confirmation selection entry; the second prompt information is used to prompt whether to establish a Bluetooth dialing connection with the second terminal if the data status information of the second terminal does not meet the network conditions of the current usage scenario of the first terminal. If a trigger operation is received for the second confirmation selection entry, a Bluetooth dialing connection is established with the second terminal through the preset Bluetooth dialing network configuration file.

4. The method according to claim 1, characterized in that, The status parameters include signal strength, network latency, upload speed, and download speed; The step of determining that the data status information of the second terminal satisfies the network conditions of the current usage scenario of the first terminal if the status parameter is within the range of the status parameter further includes: If the signal strength, network latency, upload speed, and download speed in the data status information of the second terminal are within the signal strength range, the network latency is within the network latency range, the upload speed is within the upload speed range, and the download speed is within the download speed range, then it is determined that the data status information of the second terminal meets the network conditions of the current usage scenario of the first terminal.

5. The method according to claim 4, characterized in that, The step of determining that the data status information of the second terminal satisfies the network conditions of the current usage scenario of the first terminal if the status parameter is within the range of the status parameter further includes: If at least one of the following conditions is met in the data status information of the second terminal: signal strength is within the signal strength range, network latency is within the network latency range, upload speed is within the upload speed range, and download speed is within the download speed range, then the data status information of the second terminal is determined to meet the network conditions of the current usage scenario of the first terminal.

6. The method according to any one of claims 1-5, characterized in that, If the data transmission connection established with the second terminal is a Bluetooth dial-up connection, after determining the network status of the second terminal based on the data status information, the method further includes: If the network status of the second terminal is connected, then the current connection between the first terminal and the second terminal is maintained; If the network status of the second terminal is offline, a third prompt information page will be displayed. The third prompt information page includes a third prompt information, a third confirmation selection entry, and a third negation selection entry. The third prompt information is used to indicate that the network status of the second terminal is offline and whether to disconnect the Bluetooth dial-up connection with the second terminal.

7. A Bluetooth communication device, disposed in a first terminal, characterized in that, The device includes: The status detection module is used to detect the connection status with the second terminal before the first terminal interrupts the existing data network and establishes a Bluetooth connection with the second terminal. Both the first terminal and the second terminal support Bluetooth dial-up connection. After the first terminal interrupts the current data network, there will be no available data network and it will be unable to access the Internet. The information acquisition module is used to acquire the data status information of the second terminal if a data transmission connection with the second terminal is detected; the data transmission connection is any connection that can acquire the data status information of the second terminal, and the data status information is used to characterize the network connection status of the second terminal. A status determination module is used to determine the network status of the second terminal based on the data status information. The Bluetooth connection module is used to, if the network status of the second terminal is connected, obtain the status parameters in the data status information, the scene identifier of the current usage scenario of the first terminal, and the range of status parameters corresponding to the scene identifier; if the status parameters are within the range of status parameters, determine that the data status information of the second terminal meets the network conditions of the current usage scenario of the first terminal, and establish a Bluetooth dial-up connection with the second terminal through a preset Bluetooth dial-up network configuration file to share the data network provided by the second terminal.

8. The apparatus according to claim 7, characterized in that, The device further includes: The first page display module is used to display a first prompt information page if the network status of the second terminal is offline; the first prompt information page includes a first prompt information and a first confirmation selection entry; the first prompt information is used to prompt whether to establish a Bluetooth dial-up connection with the second terminal if the second terminal is offline. The first dialing connection module is used to establish a Bluetooth dialing connection with the second terminal through the preset Bluetooth dialing network configuration file if a trigger operation is received for the first confirmation selection entry.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Bandwidth control method and device in bluetooth shared network

    CN104968021A

  • Network switching method and mobile terminal

    CN107466077A

  • Network prompting method and device and electronic equipment

    CN111526529A

  • Vehicle data transmission method and device, storage medium and device

    CN111818478A

  • Method for providing of tethering service, apparatus and system using the same

    KR1020150101094A