WO2021022720A1 - 基于蓝牙的数据传输方法、存储介质及终端 - Google Patents
基于蓝牙的数据传输方法、存储介质及终端 Download PDFInfo
- Publication number
- WO2021022720A1 WO2021022720A1 PCT/CN2019/120917 CN2019120917W WO2021022720A1 WO 2021022720 A1 WO2021022720 A1 WO 2021022720A1 CN 2019120917 W CN2019120917 W CN 2019120917W WO 2021022720 A1 WO2021022720 A1 WO 2021022720A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- data
- wifi module
- wireless network
- bluetooth
- terminal
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72403—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
- H04M1/72406—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by software upgrading or downloading
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72403—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
- H04M1/72409—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72448—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
- H04M1/72454—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/80—Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
Definitions
- This application relates to the field of terminal technology, and in particular to a Bluetooth-based data transmission method, storage medium and terminal.
- WiFi Wireless FIdelity (wireless fidelity)
- Bluetooth share the same antenna and use them in time slots. Therefore, when WiFi and Bluetooth are concurrent, efficiency is bound to be affected. Especially when using Bluetooth transmission for data transmission, due to the influence of WiFi, Bluetooth data transmission efficiency is likely to be unstable.
- the embodiments of the present application provide a Bluetooth-based data transmission method, storage medium, and terminal, which can improve the efficiency of data transmission through Bluetooth.
- an embodiment of the present application provides a Bluetooth-based data transmission method, which is applied to a terminal.
- the Bluetooth module and the WiFi module of the terminal share the same antenna, and the method includes:
- the WiFi module When the WiFi module is connected to a wireless network, and the target application to which the current interface of the terminal belongs is transmitting data through the wireless network, determining whether the first data amount of the remaining data to be transmitted exceeds a preset threshold;
- the embodiments of the present application provide a Bluetooth-based data transmission device applied to a terminal, including:
- the Bluetooth module and WiFi module of the terminal share the same antenna, and the device includes:
- the determining unit is used to determine whether the current WiFi module is connected to a wireless network when it is detected that the terminal transmits data through the Bluetooth module;
- the judging unit is used for judging whether the first data volume of the remaining data to be transmitted exceeds the preset value when the WiFi module is connected to a wireless network and the target application to which the current interface of the terminal belongs is transmitting data through the wireless network Set threshold
- the shutdown module is configured to shut down the WiFi module if the first data amount does not exceed a preset threshold.
- an embodiment of the present application also provides a storage medium in which multiple instructions are stored, and the instructions are suitable for being loaded by a processor to perform the following steps:
- the WiFi module When the WiFi module is connected to a wireless network, and the target application to which the current interface of the terminal belongs is transmitting data through the wireless network, determining whether the first data amount of the remaining data to be transmitted exceeds a preset threshold;
- an embodiment of the present application also provides a terminal, including a processor, a memory, a Bluetooth module, and a WiFi module.
- the processor is electrically connected to the memory, the Bluetooth module, and the WiFi module, respectively,
- the memory is used to store instructions and data; the processor is used to execute the following steps:
- the WiFi module When the WiFi module is connected to a wireless network, and the target application to which the current interface of the terminal belongs is transmitting data through the wireless network, determining whether the first data amount of the remaining data to be transmitted exceeds a preset threshold;
- the embodiments of the present application provide a Bluetooth-based data transmission method, storage medium, and terminal, which can improve the efficiency of data transmission through Bluetooth.
- Fig. 1 is a schematic flowchart of a Bluetooth-based data transmission method provided by an embodiment of the present application.
- Fig. 2 is a schematic diagram of another process of a Bluetooth-based data transmission method provided by an embodiment of the present application.
- Fig. 3 is a schematic diagram of an application scenario of a Bluetooth-based data transmission method provided by an embodiment of the present application.
- Fig. 4 is a first structural diagram of a Bluetooth-based data transmission device provided by an embodiment of the present application.
- FIG. 5 is a schematic diagram of a second structure of a Bluetooth-based data transmission device provided by an embodiment of the present application.
- Fig. 6 is a third structural schematic diagram of a Bluetooth-based data transmission device provided by an embodiment of the present application.
- Fig. 7 is a fourth structural diagram of a Bluetooth-based data transmission device provided by an embodiment of the present application.
- FIG. 8 is a schematic structural diagram of a terminal provided by an embodiment of the present application.
- FIG. 9 is a schematic diagram of another structure of a terminal provided by an embodiment of the present application.
- the embodiments of the present application provide a Bluetooth-based data transmission method, storage medium, and terminal. The detailed description will be given below.
- a Bluetooth-based data transmission method is provided, which is applied to terminal devices such as smart phones, tablet computers, and notebook computers.
- the terminal device has a Bluetooth module and a WiFi module, and the Bluetooth module and the WiFi module share the same antenna.
- the specific process of the Bluetooth-based data transmission method may be as follows:
- the data type of the data transmitted through the Bluetooth module can have many types, such as digital data, byte data, text data, and so on.
- the terminal transmits data via Bluetooth.
- the terminal may receive data sent by an external Bluetooth device, or the terminal may send data to an external Bluetooth device. For example, when it is detected that the terminal turns on Bluetooth to send a file to an external Bluetooth device, the current network status can be checked to determine whether a WiFi network is connected.
- the external Bluetooth device may be a smart phone, a notebook computer, a TV device with Bluetooth function, a Bluetooth speaker, etc., which is not specifically limited in this application.
- the wireless network to which the WiFi module is connected may include a WiFi network or a WiFi hotspot (such as a mobile phone WiFi hotspot).
- the WiFi module When the WiFi module is connected to a wireless network and the target application to which the current interface of the terminal belongs is transmitting data through the wireless network, determine whether the first data amount of the remaining data to be transmitted exceeds a preset threshold.
- the terminal when the terminal transmits data through the wireless network, the terminal may receive data sent by an external device, or the terminal may send data to an external device.
- the terminal desktop is essentially an application.
- the remaining data volume of the target application to be transmitted (that is, the first data volume) is detected and acquired. Then, the first data amount can be compared with the preset threshold, and different operations can be performed based on different comparison results.
- the data transmission method may further include the following steps:
- the target application can be considered as the application currently being used by the user. If the application currently being used by the user is not using the wireless network, it can be closed. However, in order to avoid the situation that some of the more important applications that are occupying the wireless network to process data are interrupted among the applications running in the background, in this embodiment, it is possible to further determine the applications that are currently running and transmitting data through the wireless network. The importance of the program. If the level of importance reaches the specified level (that is, a higher-level application), the wireless network connection of the WiFi module is maintained. If the level of importance does not reach the specified level (that is, a lower level application), the wireless network connection of the WiFi module is disconnected.
- the specified level that is, a higher-level application
- the wireless network connection of the WiFi module is maintained. If the level of importance does not reach the specified level (that is, a lower level application), the wireless network connection of the WiFi module is disconnected.
- the important level of the application is preset according to the actual needs of the user. For example, applications that are relatively less tolerant of interruption, such as office and games, can be set to a higher level, while applications such as shopping, reading, etc. that have less impact after being interrupted can be set to a lower level.
- the data transmission method may further include vaguely following the process:
- the mobile terminal since most mobile terminals can support WiFi positioning, in order to improve positioning accuracy, the mobile terminal allows applications and services to monitor the surrounding WLAN (Wireless Local Area Network, wireless local area network) at any time.
- the WiFi module will perform irregular scans and search for surrounding WLAN networks in the background, which will occupy the antenna and affect the data transmission efficiency of the Bluetooth module. Therefore, when the WiFi module is not connected to a wireless network, if the WiFi module is in an on state, it can be considered that the WiFi module is performing the scanning operation of the WLAN network in the background. At this time, the WiFi module can be turned off to prohibit background scanning and release the WiFi module from occupying the antenna, thereby reducing the impact on the data transmission efficiency of the Bluetooth module.
- the aforementioned preset threshold can be set to a smaller value.
- the preset threshold indicates that the amount of data transmitted by the remaining band is small. Even if the data is transmitted in a data flow mode without using a wireless network, it will not consume too much data flow. Therefore, if the first data amount does not exceed the preset threshold, it is reasonable to turn off the WiFi module.
- the WiFi module in order to reduce the impact of the WiFi module on the Bluetooth module, as far as possible to ensure that the data transmitted by the target application is not affected by the disconnection of the wireless network, you can switch to the data flow to deal with the target application corresponding to the pending transmission Data is processed. That is, in some embodiments, after the WiFi module is turned off, the data flow of the terminal can also be turned on to process the remaining data to be transmitted.
- the data transmission method may further include the following process:
- the WiFi module can be given priority to work. After the data transmission is completed quickly through the wireless network, the WiFi module is turned off to perform the data transmission of the Bluetooth module, thereby efficiently using time.
- the WiFi module If it takes a long time to transmit data through the wireless network (that is, the first time period is greater than the second time period), you can turn off the WiFi module first and let the Bluetooth module work first. After the data transmission is completed quickly through Bluetooth, the WiFi module is started to connect to the wireless network to process related data.
- the data transmission method may further include the following procedures:
- the first data amount exceeds the preset threshold, it indicates that more data traffic is required to complete the data transmission.
- the information can be fed back to the user, by generating an information prompt interface to remind the user of the traffic that needs to be consumed, and at the same time providing the user with options, so that the user can choose whether to continue using the wireless network to transmit data.
- the data flow information can be displayed in the interface in the form of text or graphics, and the selection control can be displayed in the form of buttons.
- the information prompt interface may also display the status of the remaining data traffic package in the terminal, so that the user can better balance the selection.
- the data transmission method may further include the following process:
- the WiFi module can be activated to connect to the corresponding wireless network to process the previously uncompleted data.
- the WiFi module when this solution transmits data via Bluetooth, the WiFi module can be turned off to cut off the WiFi network connected to the terminal and its Wlan scanning function.
- the Bluetooth module can monopolize the antenna resources, which effectively improves the efficiency of data transmission via Bluetooth.
- Bluetooth-based data transmission method may specifically include the following processes:
- step 201 When it is detected that the terminal transmits data through the Bluetooth module, it is determined whether the current WiFi module is connected to a wireless network; if so, step 202 is executed, otherwise, step 208 is executed.
- the current network status can be checked to determine whether a WiFi network is connected.
- step 202 Determine that the target application to which the current interface of the terminal belongs is transmitting data through the wireless network; if yes, perform step 203; otherwise, perform step 207.
- the WiFi module when the WiFi module is connected to a wireless network, and the terminal display is not locked (that is, in a working state with a bright screen), it is determined that the current interface displayed on the display corresponds to the target application to which it belongs. Then determine whether the target application is using the wireless network.
- the target application can be considered to a certain extent as the application currently being used by the user.
- step 203 Determine whether the first data amount of the remaining data to be transmitted exceeds a preset threshold; if so, execute step 204, otherwise, execute step 208.
- the remaining data volume of the target application to be transmitted (that is, the first data volume) is detected and acquired. Then, the first data amount can be compared with the preset threshold, and different operations can be performed based on different comparison results.
- the first data amount exceeds the preset threshold, which indicates that more data flow is required to complete the data transmission.
- the first data volume does not exceed the preset threshold, which indicates that less data volume is required to complete the data transmission.
- the data flow information that needs to be consumed can be obtained based on the correspondence between the data volume and the data flow.
- the corresponding relationship may be a preset rule. For example, to transmit 100Mb of data, it will consume 100M data traffic.
- the first data amount exceeds the preset threshold, it indicates that more data traffic is required to complete the data transmission.
- the information can be fed back to the user, by generating an information prompt interface to remind the user of the traffic that needs to be consumed, and at the same time providing the user with options, so that the user can choose whether to continue using the wireless network to transmit data.
- the data flow information can be displayed in the interface in the form of text or graphics, and the selection control can be displayed in the form of buttons.
- the current interface is displaying the download interface of an application.
- the application is downloading a compressed package file in RAR format using the WiFi network, and displays the download progress with a progress bar, and displays the download information "Downloading... (250MB/ 350MB)".
- the message prompt interface can display a text message: "The data flow required to send the current file is 100M.
- the button can correspond to the text message including two buttons , One button is used to confirm turning off WiFi (the "Yes” button as shown in Figure 3), and the other button refuses to turn off WiFi (the "No” button as shown in Figure 3).
- the user decides to turn off the WiFi, he can trigger the shutdown instruction of the WiFi module by clicking on the selection control and touching the light.
- the WiFi module when the WiFi module is not connected to a wireless network, if the WiFi module is in an on state, it can be considered that the WiFi module performs the scanning operation of the WLAN network in the background.
- the WiFi module when the first data amount of the remaining data to be transmitted exceeds the preset threshold, or when a user-triggered shutdown instruction of the WiFi module is received, or the WiFi module is not connected to a wireless network, but the WiFi module is in the on state , You can turn off the WiFi module.
- the WiFi module is started, and the corresponding wireless network is connected through the WiFi module, and the unprocessed data in the remaining data to be transmitted is processed based on the wireless network currently connected to .
- the WiFi module can be activated to connect to the corresponding wireless network to process the previously uncompleted data.
- the WiFi module when this solution transmits data via Bluetooth, the WiFi module can be turned off to cut off the WiFi network connected to the terminal and its Wlan scanning function.
- the Bluetooth module can monopolize the antenna resources, which effectively improves the efficiency of data transmission via Bluetooth.
- a Bluetooth-based data transmission device is also provided.
- the Bluetooth-based data transmission device can be integrated in the terminal in the form of software or hardware.
- the terminal may specifically include mobile phones, tablet computers, notebook computers and other devices, and has a Bluetooth module and a WiFi module, and the Bluetooth module and the WiFi module share the same antenna.
- the Bluetooth-based data transmission device 300 may include: a determining unit 301, a first determining unit 302, and a closing unit 303, where:
- the network determining unit 301 is configured to determine whether the current WiFi module is connected to a wireless network when it is detected that the terminal transmits data through the Bluetooth module;
- the first determining unit 302 is configured to determine the first data amount of the remaining data to be transmitted when the WiFi module is connected to a wireless network, and the target application to which the current interface of the terminal belongs is transmitting data through the wireless network Whether it exceeds the preset threshold;
- the shutdown module 303 is configured to shut down the WiFi module if the first data amount does not exceed a preset threshold.
- the apparatus 300 may further include:
- the obtaining unit 304 is configured to obtain the second data amount when data is transmitted through the Bluetooth module after determining that the first data amount of the remaining data to be transmitted does not exceed the preset threshold and before turning off the WiFi module;
- the prediction unit 305 is configured to predict the first time length for completing the transmission of the first data amount and the second time length for completing the transmission of the second data amount;
- the shutdown unit 303 may be specifically configured to turn off the WiFi module when the first duration is greater than the second duration.
- the device 300 may further include an opening unit 306, configured to turn on the data flow of the terminal after turning off the WiFi module to process the remaining data to be transmitted.
- the apparatus 300 may further include:
- the second determining unit is used to determine whether the WiFi module is in an on state when the WiFi module is not connected to a wireless network
- the shutdown module 303 can be specifically used to turn off the WiFi module if the status determination module determines that it is yes, so as to prohibit searching for surrounding wireless network signals.
- the apparatus 300 may further include:
- the application determining unit is used to determine the application that is currently running and transmits data through the wireless network when the WiFi module is connected to a wireless network and the target application to which the current interface of the terminal belongs does not transmit data through the wireless network ;
- the level determining unit is used to determine the important level corresponding to the application program
- the shutdown unit 303 may be specifically configured to shut down the WiFi module if the importance level is lower than the preset level.
- the apparatus 300 may further include:
- the activation unit 306 is configured to activate the WiFi module after it is detected that the data transmitted through the Bluetooth module has been transmitted after the WiFi module is turned off;
- the processing unit 307 is configured to connect to a corresponding wireless network through the WiFi module, and process unprocessed data in the remaining data to be transmitted based on the wireless network currently connected to.
- the apparatus 300 may further include:
- the flow determination unit 308 is configured to determine the data flow information that needs to be consumed for transmitting the data of the first data amount if the first data amount exceeds a preset threshold;
- the prompt unit 309 is configured to generate an information prompt interface based on at least the data flow information, wherein the information prompt interface displays at least the data flow information and a selection control of whether to close the WiFi module.
- the Bluetooth-based data transmission device when detecting that the terminal transmits data through the Bluetooth module, determines whether the current WiFi module is connected to a wireless network; when the WiFi module is connected to a wireless network, and the terminal When the target application to which the current interface belongs is transmitting data through the wireless network, it is determined whether the first data volume of the remaining data to be transmitted exceeds the preset threshold; if the first data volume does not exceed the preset threshold, the WiFi module is turned off.
- This solution turns off the WiFi module to cut off the WiFi network connected to the terminal and its Wlan scanning function when transmitting data via Bluetooth.
- the Bluetooth module can monopolize the antenna resources, which effectively improves the efficiency of data transmission via Bluetooth.
- a terminal is also provided.
- the terminal may be a terminal device such as a smart phone or a tablet computer.
- the terminal 400 includes a processor 401, a memory 402, a Bluetooth module 407, and a WiFi module 408.
- the processor 401 is electrically connected to the memory 402, the Bluetooth module 407, and the WiFi module 408, respectively.
- the processor 401 is the control center of the terminal 400. It uses various interfaces and lines to connect the various parts of the entire terminal. It executes various functions of the terminal by running or loading applications stored in the memory 402, and calling data stored in the memory 402. Function and processing data to monitor the terminal as a whole.
- the processor 401 in the terminal 400 will follow the steps below to load the instructions corresponding to the processes of one or more applications into the memory 402, and the processor 401 will run the instructions stored in the memory 402 Application to realize various functions:
- the WiFi module When the WiFi module is connected to a wireless network, and the target application to which the current interface of the terminal belongs is transmitting data through the wireless network, determining whether the first data amount of the remaining data to be transmitted exceeds a preset threshold;
- the WiFi module is turned off, and the data flow of the terminal is turned on to process the remaining data to be transmitted.
- the processor 401 may perform the following operations:
- the processor 401 may perform an operation of turning off the WiFi module.
- the processor 401 may perform the following operations:
- the processor 401 may perform the following operations or the following operations :
- the processor 401 may perform the following operations:
- the processor 401 may perform the following operations:
- An information prompt interface is generated based on at least the data flow information, wherein at least the data flow information and a selection control for turning off the WiFi module are displayed in the information prompt interface.
- the memory 402 can be used to store applications and data.
- the application stored in the memory 402 contains instructions that can be executed in the processor.
- Applications can be composed of various functional modules.
- the processor 401 executes various functional applications and data processing by running applications stored in the memory 402.
- the Bluetooth module 407 can be used for short-distance wireless communication to realize the sending and receiving of Bluetooth signals. According to function, it is divided into Bluetooth data module and Bluetooth voice module. As a short-distance wireless communication technology that replaces data cables, Bluetooth supports point-to-point and point-to-multipoint communication, wirelessly connecting various data and voice devices in the home or office into a pico-net, several Piconet can further realize interconnection, forming a distributed network (scatter-net), so as to realize fast and convenient communication between these connected devices.
- Bluetooth supports point-to-point and point-to-multipoint communication, wirelessly connecting various data and voice devices in the home or office into a pico-net, several Piconet can further realize interconnection, forming a distributed network (scatter-net), so as to realize fast and convenient communication between these connected devices.
- WiFi module 408 also known as serial port Wi-Fi module, belongs to the transmission layer of the Internet of Things. Its function is to convert the serial port or TTL level into an embedded module that conforms to the Wi-Fi wireless network communication standard.
- Traditional hardware devices embedded in Wi-Fi modules can directly use Wi-Fi to connect to the Internet, which is an important part of realizing wireless smart home, M2M and other Internet of Things applications.
- the Bluetooth module and the WiFi module share the same antenna.
- the terminal 400 further includes: a display screen 403, a control circuit 404, a radio frequency circuit 405, an input unit 406, and a power supply 409.
- the processor 401 is electrically connected to the display screen 403, the control circuit 404, the radio frequency circuit 405, the input unit 406, and the power supply 409, respectively.
- the display screen 403 may be used to display information input by the user or information provided to the user, and various graphical user interfaces of the terminal. These graphical user interfaces may be composed of images, text, icons, videos, and any combination thereof.
- the control circuit 404 is electrically connected to the display screen 403 for controlling the display screen 403 to display information.
- the radio frequency circuit 405 is used to send and receive radio frequency signals to establish wireless communication with network equipment or other terminals through wireless communication, and to send and receive signals with the network equipment or other terminals.
- the input unit 406 can be used to receive inputted numbers, character information or user characteristic information (such as fingerprints), and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
- the input unit 406 may include a fingerprint recognition module.
- the power supply 409 is used to supply power to various components of the terminal 400.
- the power supply 409 may be logically connected to the processor 401 through a power management system, so that functions such as charging, discharging, and power consumption management can be managed through the power management system.
- the terminal 400 may also include a camera, a speaker, a sensor, etc., which will not be repeated here.
- the WiFi module when the terminal provided by the embodiment of the present application transmits data via Bluetooth, the WiFi module is turned off to cut off the WiFi network connected to the terminal and its Wlan scanning function.
- the Bluetooth module can monopolize the antenna resources, which effectively improves the efficiency of data transmission via Bluetooth.
- a storage medium is also provided, and the storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute any of the aforementioned Bluetooth-based data transmission methods.
- the program can be stored in a computer-readable storage medium, and the storage medium can include: Read Only Memory (ROM, Read Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disks or CDs, etc.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Human Computer Interaction (AREA)
- Environmental & Geological Engineering (AREA)
- Mobile Radio Communication Systems (AREA)
- Telephone Function (AREA)
Abstract
本申请公开了一种基于蓝牙的数据传输方法、存储介质及终端。其中,终端的蓝牙模块与WiFi模块共用同一天线,当终端通过蓝牙模块传输数据时,若WiFi模块连接到有无线网络,且终端当前界面所属应用程序正通过无线网络传输数据,则判断剩余待传输数据的第一数据量是否超过预设阈值;若第一数据量未超过预设阈值,则关闭WiFi模块。
Description
本申请要求于2019年08月02日提交中国专利局、申请号为201910711037.8、发明名称为“基于蓝牙的数据传输方法、装置、存储介质及终端”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及终端技术领域,尤其涉及一种基于蓝牙的数据传输方法、存储介质及终端。
目前,为了节省终端内部的器件布局空间,普遍是采用WiFi(Wireless
FIdelity,无线保真)和蓝牙共用同一天线,并分时隙使用。因此,当WiFi和蓝牙并发时,效率必然受到影响。尤其是在使用蓝牙传输进行数据传输时,由于受WiFi 的影响,容易导致蓝牙数据传输效率不稳定。
本申请实施例提供一种基于蓝牙的数据传输方法、存储介质及终端,可以提升通过蓝牙进行数据传输时的效率。
第一方面,本申请实施例提供一种基于蓝牙的数据传输方法,应用于终端,所述终端的蓝牙模块与WiFi模块共用同一根天线,所述方法包括:
当检测到终端通过蓝牙模块传输数据时,确定当前WiFi模块是否连接到有无线网络;
当所述WiFi模块连接到有无线网络,且所述终端当前界面所属的目标应用程序正通过所述无线网络传输数据时,判断剩余待传输数据的第一数据量是否超过预设阈值;
若所述第一数据量未超过预设阈值,则关闭所述WiFi模块。
第二方面,本申请实施例提供了一种基于蓝牙的数据传输装置,应用于终端,包括:
所述终端的蓝牙模块与WiFi模块共用同一根天线,所述装置包括:
确定单元,用于当检测到终端通过蓝牙模块传输数据时,确定当前WiFi模块是否连接到有无线网络;
判断单元,用于当所述WiFi模块连接到有无线网络,且所述终端当前界面所属的目标应用程序正通过所述无线网络传输数据时,判断剩余待传输数据的第一数据量是否超过预设阈值;
关闭模块,用于若所述第一数据量未超过预设阈值,则关闭所述WiFi模块。
第三方面,本申请实施例还提供了一种存储介质,所述存储介质中存储有多条指令,所述指令适于由处理器加载以执行以下步骤:
当检测到终端通过蓝牙模块传输数据时,确定当前WiFi模块是否连接到有无线网络;
当所述WiFi模块连接到有无线网络,且所述终端当前界面所属的目标应用程序正通过所述无线网络传输数据时,判断剩余待传输数据的第一数据量是否超过预设阈值;
若所述第一数据量未超过预设阈值,则关闭所述WiFi模块。
第四方面,本申请实施例还提供了一种终端,包括处理器、存储器、蓝牙模块及WiFi模块,所述处理器分别与所述存储器、所述蓝牙模块及所述WiFi模块电性连接,所述存储器用于存储指令和数据;处理器用于执行以下步骤:
当检测到终端通过蓝牙模块传输数据时,确定当前WiFi模块是否连接到有无线网络;
当所述WiFi模块连接到有无线网络,且所述终端当前界面所属的目标应用程序正通过所述无线网络传输数据时,判断剩余待传输数据的第一数据量是否超过预设阈值;
若所述第一数据量未超过预设阈值,则关闭所述WiFi模块,并开启所述终端的数据流量对所述剩余待传输数据进行处理。
本申请实施例提供一种基于蓝牙的数据传输方法、存储介质及终端,可以提升通过蓝牙进行数据传输时的效率。
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本申请实施例提供的基于蓝牙的数据传输方法的一流程示意图。
图2是本申请实施例提供的基于蓝牙的数据传输方法的另一流程示意图。
图3是本申请实施例提供的基于蓝牙的数据传输方法的应用场景示意图。
图4是本申请实施例提供的基于蓝牙的数据传输装置的第一结构示意图。
图5是本申请实施例提供的基于蓝牙的数据传输装置的第二结构示意图。
图6是本申请实施例提供的基于蓝牙的数据传输装置的第三结构示意图。
图7是本申请实施例提供的基于蓝牙的数据传输装置的第四结构示意图。
图8是本申请实施例提供的终端的一种结构示意图。
图9是本申请实施例提供的终端的另一种结构示意图。
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请实施例提供一种基于蓝牙的数据传输方法、存储介质及终端。以下将分别进行详细说明。
在一实施例中,提供一种基于蓝牙的数据传输方法,应用于智能手机、平板电脑、笔记本电脑等终端设备中。在本申请实施例中,终端设备具有蓝牙模块和WiFi模块,且蓝牙模块与WiFi模块共用同一根天线。参考图1,该基于蓝牙的数据传输方法的具体流程可以如下:
101、当检测到终端通过蓝牙模块传输数据时,确定当前WiFi模块是否连接到有无线网络。
其中,通过蓝牙模块传输的数据的数据类型可以有多种,如数字型数据、字节型数据、文本型数据等。另外,本实施例中,终端通过蓝牙传输数据,可以是终端接收外部蓝牙设备发送的数据,也可以终端是向外部蓝牙设备发送数据。例如,当检测到终端开启蓝牙发送文件至外部蓝牙设备时,可检查当前的网络状态,以确定是否连接有WiFi网络。
需要说明的是,外部蓝牙设备可以是智能手机、笔记本电脑、具有蓝牙功能的电视设备、蓝牙音箱等等,本申请对此不做具体限定。
在本实施例中,WiFi模块连接到的无线网络,可以包括WiFi网络,也可以是WiFi热点(如手机WiFi热点)。
102、当WiFi模块连接到有无线网络,且终端当前界面所属的目标应用程序正通过无线网络传输数据时,判断剩余待传输数据的第一数据量是否超过预设阈值。
同样的,终端通过无线网络传输数据,可以是终端接收外部设备发送的数据,也可以终端是向外部设备发送数据。
在本实施例中,若检测WiFi模块连接到有无线网络,且终端显示屏未锁定(即处于亮屏的工作状态),则确定显示屏显示的当前界面对应所属的目标应用程序。本实施例中,终端中安装有不同应用程序,例如办公应用、社交应用、游戏应用、购物类应用等,对此不做具体限定。需要说明的是,终端桌面实质上也是一个应用程序。
若所确定的目标应用程序正在使用WiFi模块连接的无线网络接收数据或发送数据,则检测获取该目标应用程序剩余的待传输数据的数据量(即第一数据量)。然后,便可将第一数据量与预设阈值进行比较,并基于不同的比较结果来执行不同的操作。
在一些实施例中,该数据传输方法还可以包括以下步骤:
(11)当WiFi模块连接到有无线网络,且终端当前界面所属的目标应用程序未通过无线网络传输数据时,确定当前处于运行状态并通过无线网络传输数据的应用程序;
(12)确定应用程序对应的重要级别;
(13)若重要级别低于预设级别,则关闭WiFi模块。
具体的,目标应用程序在一定程度上可认为是当前用户正在使用的应用程序。若用户当前正在使用的应用程序没有在使用无线网络,则可以将关闭的。但为了避免后台运行的应用程序中,有些较为重要的应用程序正占用无线网络处理数据而被中断的情况发生,因此本实施例中,可以进一步确定当前处于运行状态并通过无线网络传输数据的应用程序的重要级别。若重要级别程度达到指定级别(即为较高级别的应用程序),则保持WiFi模块的无线网络连接。若重要级别程度未达到指定级别(即为较低级别的应用程序),则断开WiFi模块的无线网络连接。
其中,应用程序的重要级别是根据用户实际需求预先设定好的。例如,可以将办公类、游戏类等相对不太容许被中断的应用程序设置为较高级别,而对于购物类、阅读类等被中断后影响较小的应用程序设置较低级别。
在一些实施例中,该数据传输方法还可以包括依稀按流程:
(21)当WiFi模块未连接到有无线网络时,判断WiFi模块是否处于开启状态;
(22)若是,则关闭WiFi模块,以禁止搜索周围的无线网络信号。
具体的,由于移动终端大部分都能支持WiFi定位,为了提高定位精度,移动终端允许应用程序和服务随时监测周围的WLAN(Wireless Local Area Network,无线局域网络)。WiFi模块会在后台做不定期执行扫描、搜索周围WLAN网络的工作,从而占用天线,影响蓝牙模块的数据传输效率。因此,当WiFi模块未连接到有无线网络时,若WiFi模块处于开启状态,则可以认为WiFi模块在后台执行WLAN网络的扫描操作。此时则可以将WiFi模块关闭,以禁止后台扫描、解除WiFi模块对天线的占用,从而降低对蓝牙模块数据传输效率的影响。
103、若第一数据量未超过预设阈值,则关闭WiFi模块。
具体的,可将上述预设阈值设置为较小的值。当剩余待传输数据的数据量未超过预设阈值,则表明剩余带传输的数据量较小,即便不使用无线网络而采用数据流量的方式传输数据,也不会耗费太多数据流量。因此,若第一数据量未超过预设阈值,则关闭WiFi模块,具有一定的合理性。
具体时,为了在降低WiFi模块对蓝牙模块的影响的同时,尽可能保证目标应用传输的数据也不受无线网络断开影响,可切换到数据流量来对目标应用程序中对应要处理的待传输数据进行处理。也即,在一些实施例中,在关闭WiFi模块之后,还可以开启终端的数据流量对剩余待传输数据进行处理。
在一些实施例中,在判定剩余待传输数据的第一数据量未超过预设阈值之后,关闭WiFi模块之前,该数据传输方法还可以包括以下流程:
(31)获取通过蓝牙模块传输数据时的第二数据量;
(32)预测完成收发第一数据量的第一时长、以及完成传输第二数据量传输的第二时长;
(33)若第一时长大于第二时长,则执行关闭WiFi模块的步骤
具体的,当蓝牙传输数据的时间较长时,可以优先让WiFi模块工作,通过无线网络快速将数据传输完成后,再关闭WiFi模块执行蓝牙模块的数据传输,从而高效利用时间。
而若是通过无线网络传输数据所要耗费的时间较长时(即第一时长大于第二时长),则可以先关闭WiFi模块,优先让蓝牙模块工作。通过蓝牙的方式快速将数据传输完成后,再启动WiFi模块连接无线网络来进行相关数据的处理。
在一些实施例中,该数据传输方法还可以包括以下流程:
(41)若第一数据量超过预设阈值,则确定传输第一数据量的数据对应需耗费的数据流量信息;
(42)至少基于数据流量信息生成信息提示界面,其中,信息提示界面中至少显示有数据流量信息、以及是否关闭WiFi模块的选择控件。
具体的,第一数据量超过预设阈值,则表明完成该数据传输需要较多的数据流量。此时可将信息反馈给用户,通过生成信息提示界面的方式提醒用户需要耗费的流量、同时为用户提供选项,从而交由用户来选择是否继续使用无线网络传输数据。
实际应用中,该数据流量信息可以文字或图案的形式显示在界面中,该选择控件可以按钮的形式显示。
更进一步的,该信息提示界面还可以显示有终端中剩余的数据流量套餐情况,以便用户更好的均衡选择。
在一些实施例中,在关闭WiFi模块之后,该数据传输方法还可以包括以下流程:
(51)当检测到通过蓝牙模块进行传输的数据完成传输时,启动WiFi模块;
(52)通过WiFi模块连接到对应的无线网络,并基于当前连接到的无线网络对所述剩余待传输数据中未处理的数据进行处理。
具体的,当蓝牙模块完成数据传输时,可启动WiFi模块连接到对应的无线网络来处理之前未传输完成的数据。
由上可知,本方案在通过蓝牙传输数据时,可将WiFi模块关闭以切断终端连接的WiFi网络、及其WlAN扫描功能。从而以解除对天线的占用,使蓝牙模块独占天线资源,有效提高通过蓝牙传输数据时的效率。
在一些实施例中,为了便于理解本申请方案保护的内容,将提供另一种基于蓝牙的数据传输方法,并进行详细描述。具体可参考图2,该基于蓝牙的数据传输方法,具体可以包括以下流程:
201、当检测到终端通过蓝牙模块传输数据时,判断当前WiFi模块是否连接到有无线网络;若是,执行步骤202,否则执行步骤208。
例如,当检测到终端开启蓝牙功能发送文件至外部蓝牙设备时,可检查当前的网络状态,以确定是否连接有WiFi网络。
202、判断终端当前界面所属的目标应用程序正通过无线网络传输数据;若是,执行步骤203,否则,执行步骤207。
具体的,当WiFi模块连接到有无线网络,且终端显示屏未锁定(即处于亮屏的工作状态),则确定显示屏显示的当前界面对应所属的目标应用程序。然后再确定该目标应用程序是否正使用无线网络。
其中,目标应用程序在一定程度上可认为是当前用户正在使用的应用程序。
203、判断剩余待传输数据的第一数据量是否超过预设阈值;若是,执行步骤204,否则执行步骤208。
若所确定的目标应用程序正在使用WiFi模块连接的无线网络接收数据或发送数据,则检测获取该目标应用程序剩余的待传输数据的数据量(即第一数据量)。然后,便可将第一数据量与预设阈值进行比较,并基于不同的比较结果来执行不同的操作。
其中,第一数据量超过预设阈值,则表明完成该数据传输需要较多的数据流量。第一数据量未超过预设阈值,则表明完成该数据传输需要较少的数据流量。
204、确定收发第一数据量的数据对应需耗费的数据流量信息。
具体的,可基于数据量与数据流量之间的对应关系,获取需耗费的数据流量信息。其中,该对应关系可以是预先设置的规则。例如,传输100Mb的数据,需要耗费100M数据流量。
205、至少基于数据流量信息生成信息提示界面,其中,信息提示界面中至少显示有数据流量信息、以及是否关闭WiFi模块的选择控件。
具体的,第一数据量超过预设阈值,则表明完成该数据传输需要较多的数据流量。此时可将信息反馈给用户,通过生成信息提示界面的方式提醒用户需要耗费的流量、同时为用户提供选项,从而交由用户来选择是否继续使用无线网络传输数据。
实际应用中,该数据流量信息可以文字或图案的形式显示在界面中,该选择控件可以按钮的形式显示。例如,参考图3,当前界面正在显示某应用程序的下载界面,该应用程序正在使用WiFi网络下载RAR格式的压缩包文件,并用进度条显示下载进度,并显示下载信息“下载中…(250MB/350MB)”。此时检测到需要通过蓝牙模块传输文件,则该信息提示界面可显示文字信息为:“发送当前文件需消耗数据流量为100M,是否继续关闭WiFi?”;按钮则可以对应文字信息包括两个按钮,一个按钮用于确认关闭WiFi(如图3所示的“是”按钮),另一按钮拒绝关闭WiFi(如图3所示的“否”按钮)。
206、接收用户通过选择控件触发的WiFi模块关闭指令。
具体的,若用户确定关闭WiFi,则可通过对选择控件进行点击、触摸灯操作,触发WiFi模块的关闭指令。
207、判断WiFi模块是否处于开启状态;若是,执行步骤208;否则结束流程。
具体的,当WiFi模块未连接到有无线网络时,若WiFi模块处于开启状态,则可以认为WiFi模块在后台执行WLAN网络的扫描操作。
208、关闭WiFi模块。
具体的,当剩余待传输数据的第一数据量超过预设阈值时、或者接收到用户触发的WiFi模块的关闭指令时、或者WiFi模块未连接到有无线网络时,但WiFi模块处于开启状态时,可关闭WiFi模块。
209、当检测到通过蓝牙模块进行传输的数据完成传输时启动WiFi模块,并通过WiFi模块连接到对应的无线网络,并基于当前连接到的无线网络对剩余待传输数据中未处理的数据进行处理。
具体的,当蓝牙模块完成数据传输时,可启动WiFi模块连接到对应的无线网络来处理之前未传输完成的数据。
由上可知,本方案在通过蓝牙传输数据时,可将WiFi模块关闭以切断终端连接的WiFi网络、及其WlAN扫描功能。从而以解除对天线的占用,使蓝牙模块独占天线资源,有效提高通过蓝牙传输数据时的效率。
在本申请又一实施例中,还提供一种基于蓝牙的数据传输装置,该基于蓝牙的数据传输装置可以软件或硬件的形式集成在终端中。该终端具体可以包括手机、平板电脑、笔记本电脑等设备,并具有蓝牙模块和WiFi模块,且蓝牙模块与WiFi模块共用同一根天线。如图4所示,该基于蓝牙的数据传输装置300可以包括:确定单元301、第一判断单元302、及关闭单元303,其中:
网络确定单元301,用于当检测到终端通过蓝牙模块传输数据时,确定当前WiFi模块是否连接到有无线网络;
第一判断单元302,用于当所述WiFi模块连接到有无线网络,且所述终端当前界面所属的目标应用程序正通过所述无线网络传输数据时,判断剩余待传输数据的第一数据量是否超过预设阈值;
关闭模块303,用于若所述第一数据量未超过预设阈值,则关闭所述WiFi模块。
在一些实施例中,参考图5,该装置300还可以包括:
获取单元304,用于在判定剩余待传输数据的第一数据量未超过预设阈值之后,关闭所述WiFi模块之前,获取通过蓝牙模块传输数据时的第二数据量;
预测单元305,用于预测完成传输所述第一数据量的第一时长、以及完成传输所述第二数据量传输的第二时长;
关闭单元303,具体可以用于在所述第一时长大于第二时长时,关闭所述WiFi模块。
继续参考图5,在一些实施例中,该装置300还可以包括开启单元306,用于在关闭WiFi模块之后,开启终端的数据流量对剩余待传输数据进行处理。
在一些实施例中,该装置300还可以包括:
第二判断单元,用于当WiFi模块未连接到有无线网络时,判断所述WiFi模块是否处于开启状态;
关闭模块303,具体可以用于若在状态判断模块判定为是时,关闭WiFi模块,以禁止搜索周围的无线网络信号。
在一些实施例中,该装置300还可以包括:
应用确定单元,用于当WiFi模块连接到有无线网络,且终端当前界面所属的目标应用程序未通过所述无线网络传输数据时,确定当前处于运行状态并通过所述无线网络传输数据的应用程序;
级别确定单元,用于确定所述应用程序对应的重要级别;
关闭单元303,具体可以用于若所述重要级别低于预设级别,则关闭WiFi模块。
参考图6,在一些实施例中,该装置300还可以包括:
启动单元306,用于在关闭所述WiFi模块之后,当检测到通过所述蓝牙模块进行传输的数据完成传输后,启动WiFi模块;
处理单元307,用于通过所述WiFi模块连接到对应的无线网络,并基于当前连接到的无线网络对所述剩余待传输数据中未处理的数据进行处理。
参考图7,在一些实施例中,该装置300还可以包括:
流量确定单元308,用于若所述第一数据量超过预设阈值,则确定传输所述第一数据量的数据对应需耗费的数据流量信息;
提示单元309,用于至少基于所述数据流量信息生成信息提示界面,其中,所述信息提示界面中至少显示有所述数据流量信息、以及是否关闭所述WiFi模块的选择控件。
由上可知,本申请实施例提供的基于蓝牙的数据传输装置,当检测到终端通过蓝牙模块传输数据时,确定当前WiFi模块是否连接到有无线网络;当WiFi模块连接到有无线网络,且终端当前界面所属的目标应用程序正通过无线网络传输数据时,判断剩余待传输数据的第一数据量是否超过预设阈值;若第一数据量未超过预设阈值,则关闭WiFi模块。该方案在通过蓝牙传输数据时,将WiFi模块关闭以切断终端连接的WiFi网络、及其WlAN扫描功能。从而以解除对天线的占用,使蓝牙模块独占天线资源,有效提高通过蓝牙传输数据时的效率。
在本申请又一实施例中还提供一种终端,该终端可以是智能手机、平板电脑等终端设备。如图8所示,终端400包括处理器401、存储器402、蓝牙模块407、WiFi模块408。其中,处理器401分别与存储器402、蓝牙模块407、WiFi模块408电性连接。
处理器401是终端400的控制中心,利用各种接口和线路连接整个终端的各个部分,通过运行或加载存储在存储器402内的应用,以及调用存储在存储器402内的数据,执行终端的各种功能和处理数据,从而对终端进行整体监控。
在本实施例中,终端400中的处理器401会按照如下的步骤,将一个或一个以上的应用的进程对应的指令加载到存储器402中,并由处理器401来运行存储在存储器402中的应用,从而实现各种功能:
当检测到终端通过蓝牙模块传输数据时,确定当前WiFi模块是否连接到有无线网络;
当所述WiFi模块连接到有无线网络,且所述终端当前界面所属的目标应用程序正通过所述无线网络传输数据时,判断剩余待传输数据的第一数据量是否超过预设阈值;
若所述第一数据量未超过预设阈值,则关闭所述WiFi模块,并开启终端的数据流量对所述剩余待传输数据进行处理。
在一些实施例中,在判定剩余待传输数据的第一数据量未超过预设阈值之后,关闭所述WiFi模块之前,处理器401可以执行以下操作:
获取通过蓝牙模块传输数据时的第二数据量;
预测完成传输所述第一数据量的第一时长、以及完成传输所述第二数据量传输的第二时长;
当所述第一时长大于第二时长时,处理器401则可以执行关闭WiFi模块的操作。
在一些实施例中,当所述WiFi模块未连接到有无线网络时,处理器401可以执行以下操作:
判断所述WiFi模块是否处于开启状态;
若是,则关闭所述WiFi模块,以禁止搜索周围的无线网络信号。
在一些实施例中,当所述WiFi模块连接到有无线网络,且所述终端当前界面所属的目标应用程序未通过所述无线网络传输数据时,处理器401可以执行以下操作还可以执行以下操作:
确定当前处于运行状态并通过所述无线网络传输数据的应用程序;
确定所述应用程序对应的重要级别;
若所述重要级别低于预设级别,则关闭所述WiFi模块。
在一些实施例中,在关闭所述WiFi模块之后,并检测到通过所述蓝牙模块进行传输的数据完成传输时,处理器401可以执行以下操作:
启动所述WiFi模块;
通过所述WiFi模块连接到对应的无线网络,并基于当前连接到的无线网络对所述剩余待传输数据中未处理的数据进行处理。
在一些实施例中,若所述第一数据量超过预设阈值,处理器401可以执行以下操作:
确定传输所述第一数据量的数据对应需耗费的数据流量信息;
至少基于所述数据流量信息生成信息提示界面,其中,所述信息提示界面中至少显示有所述数据流量信息、以及是否关闭所述WiFi模块的选择控件。
存储器402可用于存储应用和数据。存储器402存储的应用中包含有可在处理器中执行的指令。应用可以组成各种功能模块。处理器401通过运行存储在存储器402的应用,从而执行各种功能应用以及数据处理。
蓝牙模块407可用于于短距离无线通讯,实现蓝牙信号的收发。按功能分为蓝牙数据模块和蓝牙语音模块。作为取代数据电缆的短距离无线通信技术,蓝牙支持点对点以及点对多点的通信,以无线方式将家庭或办公室中的各种数据和语音设备连成一个微微网(Pico-net),几个微微网还可以进一步实现互联,形成一个分布式网络(scatter-net),从而在这些连接设备之间实现快捷而方便的通信。
WiFi模块408又名串口Wi-Fi模块,属于物联网传输层,功能是将串口或TTL电平转为符合Wi-Fi无线网络通信标准的嵌入式模块,内置无线网络协议IEEE802.11b.g.n协议栈以及TCP/IP协议栈。传统的硬件设备嵌入Wi-Fi模块可以直接利用Wi-Fi联入互联网,是实现无线智能家居、M2M等物联网应用的重要组成部分。
需要说明的是,在本申请实施例中,蓝牙模块与WiFi模块共用同一根天线。
在一些实施例中,如图9所示,终端400还包括:显示屏403、控制电路404、射频电路405、输入单元406以及电源409。其中,处理器401分别与显示屏403、控制电路404、射频电路405、输入单元406、以及电源409电性连接。
显示屏403可用于显示由用户输入的信息或提供给用户的信息以及终端的各种图形用户接口,这些图形用户接口可以由图像、文本、图标、视频和其任意组合来构成。
控制电路404与显示屏403电性连接,用于控制显示屏403显示信息。
射频电路405用于收发射频信号,以通过无线通信与网络设备或其他终端建立无线通讯,与网络设备或其他终端之间收发信号。
输入单元406可用于接收输入的数字、字符信息或用户特征信息(例如指纹),以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。其中,输入单元406可以包括指纹识别模组。
电源409用于给终端400的各个部件供电。在一些实施例中,电源409可以通过电源管理系统与处理器401逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。
尽管图9中未示出,终端400还可以包括摄像头、扬声器、传感器等,在此不再赘述。
由上可知,本申请实施例提供的终端,通过蓝牙传输数据时,将WiFi模块关闭以切断终端连接的WiFi网络、及其WlAN扫描功能。从而以解除对天线的占用,使蓝牙模块独占天线资源,有效提高通过蓝牙传输数据时的效率。
在一些实施例中,还提供了一种存储介质,该存储介质中存储有多条指令,该指令适于由处理器加载以执行上述任一基于蓝牙的数据传输方法。
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,存储介质可以包括:只读存储器(ROM,Read Only Memory)、随机存取记忆体(RAM,Random Access Memory)、磁盘或光盘等。
以上对本申请实施例所提供的基于蓝牙的数据传输方法、存储介质及终端进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。
Claims (20)
- 一种基于蓝牙的数据传输方法,应用于终端,其中,所述终端的蓝牙模块与WiFi模块共用同一根天线,所述方法包括:当检测到终端通过蓝牙模块传输数据时,确定当前WiFi模块是否连接到有无线网络;当所述WiFi模块连接到有无线网络,且所述终端当前界面所属的目标应用程序正通过所述无线网络传输数据时,判断剩余待传输数据的第一数据量是否超过预设阈值;若所述第一数据量未超过预设阈值,则关闭所述WiFi模块。
- 根据权利要求1所述的基于蓝牙的数据传输方法,其中,在判定剩余待传输数据的第一数据量未超过预设阈值之后,关闭所述WiFi模块之前,所述方法还包括:获取通过蓝牙模块传输数据时的第二数据量;预测完成传输所述第一数据量的第一时长、以及完成传输所述第二数据量传输的第二时长;若所述第一时长大于第二时长,则执行所述关闭所述WiFi模块的步骤。
- 根据权利要求1所述的基于蓝牙的数据传输方法,其中,在关闭所述WiFi模块之后,所述方法还包括:开启所述终端的数据流量对所述剩余待传输数据进行处理。
- 根据权利要求1所述的基于蓝牙的数据传输方法,其中,所述方法还包括:当所述WiFi模块未连接到有无线网络时,判断所述WiFi模块是否处于开启状态;若是,则关闭所述WiFi模块,以禁止搜索周围的无线网络信号。
- 根据权利要求1所述的基于蓝牙的数据传输方法,其中,所述方法还包括:当所述WiFi模块连接到有无线网络,且所述终端当前界面所属的目标应用程序未通过所述无线网络传输数据时,确定当前处于运行状态并通过所述无线网络传输数据的应用程序;确定所述应用程序对应的重要级别;若所述重要级别低于预设级别,则关闭所述WiFi模块。
- 根据权利要求1所述的基于蓝牙的数据传输方法,其中,在关闭所述WiFi模块之后,所述方法还包括:当检测到通过所述蓝牙模块进行传输的数据完成传输时,启动所述WiFi模块;通过所述WiFi模块连接到对应的无线网络,并基于当前连接到的无线网络对所述剩余待传输数据中未处理的数据进行处理。
- 根据权利要求1所述的基于蓝牙的数据传输方法,其中,所述方法还包括:若所述第一数据量超过预设阈值,则确定传输所述第一数据量的数据对应需耗费的数据流量信息;至少基于所述数据流量信息生成信息提示界面,其中,所述信息提示界面中至少显示有所述数据流量信息、以及是否关闭所述WiFi模块的选择控件。
- 一种存储介质,其中,所述存储介质中存储有多条指令,所述指令适于由处理器加载以执行以下步骤:当检测到终端通过蓝牙模块传输数据时,确定当前WiFi模块是否连接到有无线网络;当所述WiFi模块连接到有无线网络,且所述终端当前界面所属的目标应用程序正通过所述无线网络传输数据时,判断剩余待传输数据的第一数据量是否超过预设阈值;若所述第一数据量未超过预设阈值,则关闭所述WiFi模块。
- 根据权利要求8所述的存储介质,其中,在判定剩余待传输数据的第一数据量未超过预设阈值之后,关闭所述WiFi模块之前,所述指令由处理器加载还执行以下步骤:获取通过蓝牙模块传输数据时的第二数据量;预测完成传输所述第一数据量的第一时长、以及完成传输所述第二数据量传输的第二时长;若所述第一时长大于第二时长,则执行所述关闭所述WiFi模块的步骤。
- 根据权利要求8所述的存储介质,其中,在关闭所述WiFi模块之后,所述指令由处理器加载还执行以下步骤:开启所述终端的数据流量对所述剩余待传输数据进行处理。
- 根据权利要求8所述的存储介质,其中,所述指令由处理器加载还执行以下步骤:当所述WiFi模块未连接到有无线网络时,判断所述WiFi模块是否处于开启状态;若是,则关闭所述WiFi模块,以禁止搜索周围的无线网络信号。
- 根据权利要求8所述的存储介质,其中,所述指令由处理器加载还执行以下步骤:当所述WiFi模块连接到有无线网络,且所述终端当前界面所属的目标应用程序未通过所述无线网络传输数据时,确定当前处于运行状态并通过所述无线网络传输数据的应用程序;确定所述应用程序对应的重要级别;若所述重要级别低于预设级别,则关闭所述WiFi模块。
- 根据权利要求8所述的存储介质,其中,在关闭所述WiFi模块之后,所述指令由处理器加载还执行以下步骤:当检测到通过所述蓝牙模块进行传输的数据完成传输时,启动所述WiFi模块;通过所述WiFi模块连接到对应的无线网络,并基于当前连接到的无线网络对所述剩余待传输数据中未处理的数据进行处理。
- 根据权利要求8所述的基于蓝牙的数据传输方法,其中,所述指令由处理器加载还执行以下步骤:若所述第一数据量超过预设阈值,则确定传输所述第一数据量的数据对应需耗费的数据流量信息;至少基于所述数据流量信息生成信息提示界面,其中,所述信息提示界面中至少显示有所述数据流量信息、以及是否关闭所述WiFi模块的选择控件。
- 一种终端,其中,包括处理器、存储器、蓝牙模块及WiFi模块,所述处理器分别与所述存储器、所述蓝牙模块及所述WiFi模块电性连接,所述存储器用于存储指令和数据;所述处理器用于执行以下步骤:当检测到终端通过蓝牙模块传输数据时,确定当前WiFi模块是否连接到有无线网络;当所述WiFi模块连接到有无线网络,且所述终端当前界面所属的目标应用程序正通过所述无线网络传输数据时,判断剩余待传输数据的第一数据量是否超过预设阈值;若所述第一数据量未超过预设阈值,则关闭所述WiFi模块,并开启所述终端的数据流量对所述剩余待传输数据进行处理。
- 根据权利要求15所述的终端,其中,在判定剩余待传输数据的第一数据量未超过预设阈值之后,关闭所述WiFi模块之前,所述处理器还用于执行以下步骤:获取通过蓝牙模块传输数据时的第二数据量;预测完成传输所述第一数据量的第一时长、以及完成传输所述第二数据量传输的第二时长;若所述第一时长大于第二时长,则执行所述关闭所述WiFi模块的步骤。
- 根据权利要求15所述的终端,其中,所述处理器还用于执行以下步骤:当所述WiFi模块未连接到有无线网络时,判断所述WiFi模块是否处于开启状态;若是,则关闭所述WiFi模块,以禁止搜索周围的无线网络信号。
- 根据权利要求15所述的终端,其中,所述处理器还用于执行以下步骤:当所述WiFi模块连接到有无线网络,且所述终端当前界面所属的目标应用程序未通过所述无线网络传输数据时,确定当前处于运行状态并通过所述无线网络传输数据的应用程序;确定所述应用程序对应的重要级别;若所述重要级别低于预设级别,则关闭所述WiFi模块。
- 根据权利要求15所述的终端,其中,在关闭所述WiFi模块之后,所述处理器还用于执行以下步骤:当检测到通过所述蓝牙模块进行传输的数据完成传输时,启动所述WiFi模块;通过所述WiFi模块连接到对应的无线网络,并基于当前连接到的无线网络对所述剩余待传输数据中未处理的数据进行处理。
- 根据权利要求15所述的终端,其中,所述处理器还用于执行以下步骤:若所述第一数据量超过预设阈值,则确定传输所述第一数据量的数据对应需耗费的数据流量信息;至少基于所述数据流量信息生成信息提示界面,其中,所述信息提示界面中至少显示有所述数据流量信息、以及是否关闭所述WiFi模块的选择控件。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910711037.8 | 2019-08-02 | ||
| CN201910711037.8A CN110290278A (zh) | 2019-08-02 | 2019-08-02 | 基于蓝牙的数据传输方法、装置、存储介质及终端 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2021022720A1 true WO2021022720A1 (zh) | 2021-02-11 |
Family
ID=68024756
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2019/120917 Ceased WO2021022720A1 (zh) | 2019-08-02 | 2019-11-26 | 基于蓝牙的数据传输方法、存储介质及终端 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN110290278A (zh) |
| WO (1) | WO2021022720A1 (zh) |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113840269A (zh) * | 2021-08-06 | 2021-12-24 | 深圳Tcl新技术有限公司 | 一种多媒体数据传输方法、装置、电子设备和存储介质 |
| CN114080077A (zh) * | 2021-11-30 | 2022-02-22 | 深圳市飞天鹰科技有限公司 | 一种带wifi及蓝牙双模的led控制器 |
| CN119946679A (zh) * | 2025-04-08 | 2025-05-06 | 温州安可尼电子科技有限公司 | 一种蓝牙功能检测方法、系统及智能终端 |
| CN120812549A (zh) * | 2025-07-04 | 2025-10-17 | 广州索诺康医疗科技有限公司 | 一种无线掌超通讯方法及装置 |
Families Citing this family (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110290278A (zh) * | 2019-08-02 | 2019-09-27 | 惠州Tcl移动通信有限公司 | 基于蓝牙的数据传输方法、装置、存储介质及终端 |
| CN111065080B (zh) * | 2019-12-20 | 2023-07-18 | 深圳市椰壳信息科技有限公司 | 基于蓝牙路由器的数据传输方法及蓝牙路由器 |
| CN113676881B (zh) * | 2021-08-06 | 2024-05-07 | Oppo广东移动通信有限公司 | 设备控制方法、装置、电子设备及存储介质 |
| CN113691668B (zh) * | 2021-08-17 | 2023-06-13 | Oppo广东移动通信有限公司 | 设备控制方法、装置、芯片、电子设备及存储介质 |
| CN117221990B (zh) * | 2023-11-09 | 2024-02-13 | 钦原科技有限公司 | 一种移动终端设备待机数据网络连接控制方法 |
Citations (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| EP2461631A2 (en) * | 2010-12-01 | 2012-06-06 | Deutsche Telekom AG | System support for accessing and switching among multiple wireless interfaces on mobile devices |
| US8340034B1 (en) * | 2009-11-11 | 2012-12-25 | Marvell International Ltd. | Bluetooth and wireless LAN arbitration |
| CN103378884A (zh) * | 2012-04-23 | 2013-10-30 | 联想(北京)有限公司 | 通信终端及数据通信控制方法 |
| CN107148055A (zh) * | 2017-04-27 | 2017-09-08 | 努比亚技术有限公司 | 一种流量管控方法、移动终端及计算机可读存储介质 |
| CN107222777A (zh) * | 2017-07-19 | 2017-09-29 | 深圳创维数字技术有限公司 | 一种机顶盒WiFi和蓝牙共存优化方法及装置 |
| CN109041026A (zh) * | 2018-08-14 | 2018-12-18 | 深圳创维数字技术有限公司 | 天线占比设置方法、装置、用户设备及存储介质 |
| CN109151784A (zh) * | 2018-08-14 | 2019-01-04 | Oppo广东移动通信有限公司 | 网络连接方法、装置及电子设备 |
| CN110290278A (zh) * | 2019-08-02 | 2019-09-27 | 惠州Tcl移动通信有限公司 | 基于蓝牙的数据传输方法、装置、存储介质及终端 |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106302824A (zh) * | 2016-10-31 | 2017-01-04 | 努比亚技术有限公司 | 无线WiFi控制方法、装置和移动终端 |
| CN109274407B (zh) * | 2018-08-14 | 2020-08-21 | Oppo广东移动通信有限公司 | 数据传输方法、装置、电子设备以及存储介质 |
| CN109152057A (zh) * | 2018-08-14 | 2019-01-04 | Oppo广东移动通信有限公司 | 时间片分配方法、装置及电子设备 |
-
2019
- 2019-08-02 CN CN201910711037.8A patent/CN110290278A/zh active Pending
- 2019-11-26 WO PCT/CN2019/120917 patent/WO2021022720A1/zh not_active Ceased
Patent Citations (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8340034B1 (en) * | 2009-11-11 | 2012-12-25 | Marvell International Ltd. | Bluetooth and wireless LAN arbitration |
| EP2461631A2 (en) * | 2010-12-01 | 2012-06-06 | Deutsche Telekom AG | System support for accessing and switching among multiple wireless interfaces on mobile devices |
| CN103378884A (zh) * | 2012-04-23 | 2013-10-30 | 联想(北京)有限公司 | 通信终端及数据通信控制方法 |
| CN107148055A (zh) * | 2017-04-27 | 2017-09-08 | 努比亚技术有限公司 | 一种流量管控方法、移动终端及计算机可读存储介质 |
| CN107222777A (zh) * | 2017-07-19 | 2017-09-29 | 深圳创维数字技术有限公司 | 一种机顶盒WiFi和蓝牙共存优化方法及装置 |
| CN109041026A (zh) * | 2018-08-14 | 2018-12-18 | 深圳创维数字技术有限公司 | 天线占比设置方法、装置、用户设备及存储介质 |
| CN109151784A (zh) * | 2018-08-14 | 2019-01-04 | Oppo广东移动通信有限公司 | 网络连接方法、装置及电子设备 |
| CN110290278A (zh) * | 2019-08-02 | 2019-09-27 | 惠州Tcl移动通信有限公司 | 基于蓝牙的数据传输方法、装置、存储介质及终端 |
Cited By (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113840269A (zh) * | 2021-08-06 | 2021-12-24 | 深圳Tcl新技术有限公司 | 一种多媒体数据传输方法、装置、电子设备和存储介质 |
| CN113840269B (zh) * | 2021-08-06 | 2023-11-14 | 深圳Tcl新技术有限公司 | 一种多媒体数据传输方法、装置、电子设备和存储介质 |
| CN114080077A (zh) * | 2021-11-30 | 2022-02-22 | 深圳市飞天鹰科技有限公司 | 一种带wifi及蓝牙双模的led控制器 |
| CN114080077B (zh) * | 2021-11-30 | 2024-01-12 | 深圳市飞天鹰科技有限公司 | 一种带wifi及蓝牙双模的led控制器 |
| CN119946679A (zh) * | 2025-04-08 | 2025-05-06 | 温州安可尼电子科技有限公司 | 一种蓝牙功能检测方法、系统及智能终端 |
| CN120812549A (zh) * | 2025-07-04 | 2025-10-17 | 广州索诺康医疗科技有限公司 | 一种无线掌超通讯方法及装置 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN110290278A (zh) | 2019-09-27 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2021022720A1 (zh) | 基于蓝牙的数据传输方法、存储介质及终端 | |
| CN102832975B (zh) | 数据传输方法、装置以及具有触摸显示屏的终端 | |
| CN104243671B (zh) | 音量调节方法、装置及电子设备 | |
| CN108781236B (zh) | 音频播放方法及电子设备 | |
| CN106020987A (zh) | 处理器中内核运行配置的确定方法以及装置 | |
| CN106776036A (zh) | 一种资源分配方法及装置 | |
| CN107707768A (zh) | 运行游戏应用的处理方法以及相关产品 | |
| CN106817540A (zh) | 一种拍照控制方法及设备 | |
| CN107302628A (zh) | 应用功能的控制方法及相关产品 | |
| CN107172671A (zh) | 一种信道切换方法、装置、存储介质和终端 | |
| CN105491135A (zh) | 建立数据连接的方法及装置 | |
| CN103491240B (zh) | 一种闹钟响铃方法、装置及移动终端 | |
| CN106658623A (zh) | 一种热点网络切换方法及终端设备 | |
| CN106658657A (zh) | 一种接入网络的方法和装置 | |
| CN107291328A (zh) | 界面显示方法及相关产品 | |
| CN106507447A (zh) | 一种Wi‑Fi热点连接方法及移动终端 | |
| CN106714279A (zh) | 一种热点网络切换方法及终端设备 | |
| CN111314900B (zh) | 无线连接方法、无线连接装置及移动终端 | |
| CN106131402B (zh) | 一种自拍杆、拍照方法及自拍系统 | |
| CN106231575A (zh) | 短信息处理方法及装置 | |
| CN106332023A (zh) | 未读信息显示方法、装置和移动终端 | |
| CN106604361B (zh) | 一种WiFi扫描方法及移动终端 | |
| CN106201682A (zh) | 一种应用控制方法及装置 | |
| CN108601063B (zh) | 个人热点实现方法及相关产品 | |
| CN104254020B (zh) | 媒体数据的播放方法、装置及终端 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19940355 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 19940355 Country of ref document: EP Kind code of ref document: A1 |