Background
At present, a Bluetooth chip is generally adopted on a mobile terminal, so that the mobile terminal supports the Bluetooth function, and is wirelessly connected with other equipment with Bluetooth, such as an automobile, a watch and the like. Bluetooth is a wireless technology standard that enables short-range data exchange (using UHV radio waves in the ISM band of 2.4 to 2.485 GHz) between fixed devices, mobile devices and building personal area networks. Bluetooth was originally created by ericsson in 1994, when it was an alternative to RS232 data lines. Bluetooth can be connected with a plurality of devices, and the problem of data synchronization is solved. Bluetooth is today managed by the bluetooth special interest group (SIG for short). The bluetooth consortium has over two million member companies worldwide, which are distributed in multiple areas of telecommunications, computers, networks, and consumer electronics. IEEE lists bluetooth as IEEE 802.15.1, but today the standard is no longer maintained. The bluetooth alliance is responsible for supervising the development of bluetooth specifications, managing authentication projects, and maintaining trademark rights and interests. The manufacturer's devices must conform to the standards of the bluetooth alliance in order to enter the market under the name of "bluetooth devices". At present, mobile terminals are interconnected through bluetooth in a common connection mode, but in practical use, when data transmission is performed by using bluetooth, especially when large files are often transmitted by using mobile terminals for a long time, in the research and practice processes of the prior art, the inventor of the present invention finds that when files are transmitted by using bluetooth, a terminal device allocates a buffer space for bluetooth, and a default bluetooth transmission speed sometimes causes that the occupied time of the bluetooth buffer space is too long, and the bluetooth transmission efficiency is low, so that other functions of the mobile terminal are affected, and the performance of related applications is reduced.
Disclosure of Invention
Embodiments of the present invention provide a bluetooth transmission control method, apparatus, terminal device and storage medium, which pre-divide a plurality of bluetooth buffer space ranges and match corresponding bluetooth transmission speeds, so that a mobile terminal can use a reasonable bluetooth transmission speed each time a mobile terminal uses a bluetooth transmission file to allocate a buffer space to bluetooth, thereby improving bluetooth transmission efficiency and avoiding other functions of the terminal device from being affected.
The embodiment of the invention provides a Bluetooth transmission control method, which comprises the following steps:
dividing a plurality of Bluetooth cache space ranges in advance;
each Bluetooth cache space range corresponds to a Bluetooth transmission speed;
starting a Bluetooth transmission function, and determining the current Bluetooth cache space according to the current memory size;
and setting the corresponding Bluetooth transmission speed as the current Bluetooth transmission speed according to the Bluetooth cache space range matched with the current Bluetooth cache space.
Optionally, in some embodiments of the present invention, the sizes of the bluetooth buffer space ranges are the same or partially the same or different from each other.
Optionally, in some embodiments of the present invention, the bluetooth transmission speeds corresponding to the bluetooth buffer space ranges are different.
Optionally, in some embodiments of the present invention, the larger the bluetooth buffer space included in the bluetooth buffer space range is, the larger the corresponding bluetooth transmission speed is.
Optionally, in some embodiments of the present invention, the starting the bluetooth transmission function and determining the current bluetooth cache space according to the current memory size includes:
starting the Bluetooth transmission function and determining the size of the current memory;
and setting the current Bluetooth cache space, wherein the size of the current Bluetooth cache space is between 1% and 5% of the size of the current memory.
Optionally, in some embodiments of the present invention, the setting, according to the bluetooth buffer space range matched with the current bluetooth buffer space, the corresponding bluetooth transmission speed as a current bluetooth transmission speed includes:
and if the current Bluetooth cache space is larger than the maximum Bluetooth cache space included in the Bluetooth cache space range, setting the Bluetooth transmission speed corresponding to the Bluetooth cache space range matched with the maximum Bluetooth cache space as the current Bluetooth transmission speed.
Optionally, in some embodiments of the present invention, the setting, according to the bluetooth buffer space range matched with the current bluetooth buffer space, the corresponding bluetooth transmission speed as a current bluetooth transmission speed includes:
and if the current Bluetooth cache space is smaller than the minimum Bluetooth cache space included in the Bluetooth cache space range, setting the Bluetooth transmission speed corresponding to the Bluetooth cache space range matched with the minimum Bluetooth cache space as the current Bluetooth transmission speed.
Correspondingly, an embodiment of the present invention further provides a bluetooth transmission control apparatus, including:
the dividing unit is used for dividing a plurality of Bluetooth cache space ranges in advance;
the corresponding unit is used for enabling each Bluetooth cache space range to correspond to a Bluetooth transmission speed;
the determining unit is used for starting a Bluetooth transmission function and determining the current Bluetooth cache space according to the current memory size;
and the setting unit is used for setting the corresponding Bluetooth transmission speed as the current Bluetooth transmission speed according to the Bluetooth cache space range matched with the current Bluetooth cache space.
Similarly, an embodiment of the present invention further provides a terminal device, including:
a memory for storing a computer program;
a processor for implementing the steps of any of the mobile bluetooth transmission control methods when executing said computer program.
In addition, an embodiment of the present invention further provides a storage medium, where a computer program is stored on the storage medium, and when the computer program is executed by a processor, the computer program implements the steps of any one of the bluetooth transmission control methods.
The embodiment of the invention provides a Bluetooth transmission control method, a device, a terminal device and a storage medium, wherein a mobile terminal is divided into a plurality of Bluetooth cache space ranges in advance, the size of each Bluetooth cache space range can be the same, can be partially the same or can be different from each other, each Bluetooth cache space range corresponds to a specific Bluetooth transmission speed, if the Bluetooth cache space range comprises a larger Bluetooth cache space, the Bluetooth transmission speed corresponding to the Bluetooth cache space range is larger, when the terminal device utilizes Bluetooth to transmit a file, the terminal device starts a Bluetooth transmission function to allocate a certain cache space for Bluetooth, namely, the terminal device determines the size of a current memory, sets the current Bluetooth cache space, the size of the current Bluetooth cache space is between 1% and 5% of the size of the current memory, the terminal device determines the Bluetooth cache space range matched with the current Bluetooth cache space, the Bluetooth transmission speed corresponding to the Bluetooth cache space range is set to be the current Bluetooth transmission speed, so that the Bluetooth transmission efficiency is improved, and other functions of the terminal equipment are prevented from being influenced.
Detailed Description
The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention provides a Bluetooth transmission control method, a Bluetooth transmission control device, terminal equipment and a storage medium. The device can be integrated in a terminal, and the terminal can be a mobile phone, a tablet computer, a notebook computer, an intelligent watch and other equipment.
For example, as shown in fig. 1, the mobile terminal divides a plurality of bluetooth buffer space ranges in advance, each bluetooth buffer space range may have the same size, may be partially the same size, or may be different from each other, for example, a bluetooth buffer space range LK _1 includes a bluetooth buffer space of 0Mb to 3Mb, a bluetooth buffer space range LK _2 includes a bluetooth buffer space of 3Mb to 10Mb, a bluetooth buffer space range LK _3 includes a bluetooth buffer space of 10Mb to 50Mb, each bluetooth buffer space range corresponds to a specific bluetooth transmission speed, if the bluetooth buffer space range includes a larger bluetooth buffer space, the bluetooth transmission speed corresponding to the bluetooth buffer space range is larger, for example, a bluetooth transmission speed SD _1 corresponding to the bluetooth buffer space range LK _1 is 5Mb/s, a bluetooth transmission speed SD _2 corresponding to the bluetooth buffer space range LK 2 is 8Mb/s, the Bluetooth transmission speed SD _3 corresponding to the Bluetooth cache space range LK _3 is 16Mb/s, when the terminal device utilizes Bluetooth to transmit files, the terminal device allocates a certain cache space for Bluetooth, namely the terminal device determines the size of a current memory and sets the current Bluetooth cache space, the size of the current Bluetooth cache space is between 1% and 5% of the size of the current memory, the terminal device determines the Bluetooth cache space range matched with the current Bluetooth cache space, the Bluetooth transmission speed corresponding to the Bluetooth cache space range is set to be the current Bluetooth transmission speed, and the terminal device utilizes the current Bluetooth transmission speed to transmit files.
The following are detailed below. It should be noted that the following description of the embodiments is not intended to limit the preferred order of the embodiments.
The embodiment will be described from the perspective of a bluetooth transmission control device, which may be specifically integrated in a terminal device, where the terminal device may include a notebook computer, a tablet computer, a smart phone, a smart watch, and the like.
A bluetooth transmission control method, comprising: dividing a plurality of Bluetooth cache space ranges in advance; each Bluetooth cache space range corresponds to a Bluetooth transmission speed; starting a Bluetooth transmission function, and determining the current Bluetooth cache space according to the current memory size; and setting the corresponding Bluetooth transmission speed as the current Bluetooth transmission speed according to the Bluetooth cache space range matched with the current Bluetooth cache space.
As shown in fig. 2, the specific flow of the bluetooth transmission control method is as follows:
step 201, a plurality of bluetooth buffer space ranges are divided in advance.
In some embodiments, referring to fig. 3 together,step 301 is executed, in which the terminal device pre-divides a plurality of bluetooth buffer space ranges, for example, LK _1, LK _2, LK _3, and so on, each bluetooth buffer space range includes one or more bluetooth buffer spaces, that is, the size of each bluetooth buffer space range is not limited, and can be flexibly set according to actual situations.
In one embodiment, each bluetooth buffer space range has an equal size, for example, bluetooth buffer space range LK _1 includes bluetooth buffer space of 0Mb to 10Mb, bluetooth buffer space range LK _2 includes bluetooth buffer space of 10Mb to 20Mb, and bluetooth buffer space range LK _3 includes bluetooth buffer space of 20Mb to 30 Mb.
In one embodiment, the size of each bluetooth buffer space range is partially the same and partially different, for example, the bluetooth buffer space range LK _1 includes 0Mb to 3Mb of bluetooth buffer space, the bluetooth buffer space range LK _2 includes 3Mb to 6Mb of bluetooth buffer space, and the bluetooth buffer space range LK _3 includes 6Mb to 50Mb of bluetooth buffer space.
In one embodiment, the size of each bluetooth buffer space range is different from each other, for example, the bluetooth buffer space range LK _1 includes 0Mb to 3Mb of bluetooth buffer space, the bluetooth buffer space range LK _2 includes 3Mb to 20Mb of bluetooth buffer space, and the bluetooth buffer space range LK _3 includes 20Mb to 50Mb of bluetooth buffer space.
In one embodiment, two adjacent bluetooth buffer space ranges are consecutive, that is, the maximum bluetooth buffer space included in the previous bluetooth buffer space range is the same as the minimum bluetooth buffer space included in the next bluetooth buffer space range.
Step 202, each bluetooth buffer space range corresponds to a bluetooth transmission speed.
In some embodiments, please refer to fig. 3 together, after dividing the plurality of bluetooth buffer space ranges,step 302 is executed to set a plurality of bluetooth transmission speeds according to the plurality of bluetooth buffer spaces, step 303 is executed to match a corresponding bluetooth transmission speed for each bluetooth buffer space range, that is, the terminal device enables all bluetooth buffer spaces included in each bluetooth buffer space range to transmit files at the bluetooth transmission speed corresponding to the bluetooth buffer space range.
In one embodiment, each bluetooth buffer space range corresponds to a bluetooth transmission speed, and the bluetooth transmission speed corresponding to the bluetooth buffer space range is greater if the bluetooth buffer space range includes a larger bluetooth buffer space, for example, if the bluetooth buffer space range LK _1 includes a bluetooth buffer space of 0Mb to 3Mb, the bluetooth transmission speed SD _1 corresponding to the bluetooth buffer space range is 5Mb/s, and if the bluetooth buffer space range LK _2 includes a bluetooth buffer space of 3Mb to 20Mb, the bluetooth transmission speed SD _2 corresponding to the bluetooth buffer space range is 8Mb/s, and the bluetooth buffer space range LK _3 includes a bluetooth buffer space of 20Mb to 50Mb, the bluetooth transmission speed SD _3 corresponding to the bluetooth buffer space range is 16Mb/s,
step 203, starting a bluetooth transmission function, and determining a current bluetooth cache space according to the current memory size.
In some embodiments, referring to fig. 3 together, step 304 is executed, when the terminal device uses bluetooth to transmit a file, the terminal device allocates a certain buffer space for bluetooth, that is, the terminal device determines the size of the current memory, and sets the current bluetooth buffer space according to the size of the current memory, where the size of the current bluetooth buffer space is between 1% and 5% of the size of the current memory.
And 204, setting the corresponding Bluetooth transmission speed as the current Bluetooth transmission speed according to the Bluetooth cache space range matched with the current Bluetooth cache space.
In some embodiments, referring to fig. 3 together, when a file is transmitted by using bluetooth, after the terminal device determines the current bluetooth buffer space,step 305 is executed to determine whether the current bluetooth buffer space belongs to the bluetooth buffer space range, if so,step 306 is executed to determine the bluetooth buffer space range matched with the current bluetooth buffer space,step 311 is executed to set the bluetooth transmission speed corresponding to the bluetooth buffer space range as the current bluetooth transmission speed, and the terminal device transmits the file by using the current bluetooth transmission speed.
In an embodiment, please refer to fig. 3 together, if not, go to step 307, if the current bluetooth buffer space is larger than the maximum bluetooth buffer space included in the bluetooth buffer space range, go to step 308, and set the bluetooth transmission speed corresponding to the bluetooth buffer space range matched with the maximum bluetooth buffer space as the current bluetooth transmission speed.
In one embodiment, please refer to fig. 3,step 309 is executed, if the current bluetooth buffer space is smaller than the minimum bluetooth buffer space included in the bluetooth buffer space range, step 310 is executed, and the bluetooth transmission speed corresponding to the bluetooth buffer space range matched with the minimum bluetooth buffer space is set as the current bluetooth transmission speed.
In order to better implement the above method, an embodiment of the present invention may further provide a bluetooth transmission control apparatus, where the bluetooth transmission control apparatus may be specifically integrated in a network device, and the network device may be a terminal or another device.
For example, as shown in fig. 4, the bluetooth transmission control apparatus may include: the dividingunit 401, the correspondingunit 402, the determiningunit 403, and thesetting unit 404 are as follows:
(1)dividing unit 401
A dividingunit 401, configured to divide multiple bluetooth buffer space ranges in advance.
For example, the terminal device uses thedividing unit 401 to divide a plurality of bluetooth buffer space ranges, such as LK _1, LK _2, LK _3, etc., in advance, each bluetooth buffer space range includes one or more bluetooth buffer spaces, i.e., the size of each bluetooth buffer space range is not limited, and can be flexibly set according to actual situations.
(2) Correspondingunit 402
Acorresponding unit 402, configured to enable each bluetooth buffer space range to correspond to a bluetooth transmission speed.
For example, the terminal device uses thecorresponding unit 402 to match a corresponding bluetooth transmission speed for each bluetooth buffer space range, that is, the terminal device makes all bluetooth buffer spaces included in each bluetooth buffer space range use the bluetooth transmission speed corresponding to the bluetooth buffer space range to transmit files.
(3)Determination unit 403
A determiningunit 403, configured to start a bluetooth transmission function, and determine a current bluetooth cache space according to a current memory size.
For example, when the terminal device uses bluetooth to transmit a file, the terminal device uses the determiningunit 403 to allocate a certain buffer space for bluetooth, that is, the terminal device determines the size of the current memory, and sets the current bluetooth buffer space, where the size of the current bluetooth buffer space is between 1% and 5% of the size of the current memory.
(4)Setting unit 404
Asetting unit 404, configured to set the corresponding bluetooth transmission speed as a current bluetooth transmission speed according to the bluetooth cache space range matched with the current bluetooth cache space.
For example, when a file is transmitted by using bluetooth, after the terminal device determines the current bluetooth buffer space by using the determiningunit 403, the terminal device first determines the bluetooth buffer space range matched with the current bluetooth buffer space by using thesetting unit 404, and then sets the bluetooth transmission speed corresponding to the bluetooth buffer space range as the current bluetooth transmission speed by using thesetting unit 404, and the terminal device transmits the file by using the current bluetooth transmission speed.
Accordingly, an embodiment of the present invention further provides a terminal, as shown in fig. 5, the terminal may include a Radio Frequency (RF)circuit 501, amemory 502 including one or more computer-readable storage media, aninput unit 503, adisplay unit 504, asensor 505, anaudio circuit 506, a Wireless Fidelity (WiFi)module 507, aprocessor 508 including one or more processing cores, and apower supply 509. Those skilled in the art will appreciate that the terminal structure shown in fig. 5 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. Wherein:
theRF circuit 501 may be used for receiving and transmitting signals during information transmission and reception or during a call, and in particular, for receiving downlink information of a base station and then sending the received downlink information to the one ormore processors 508 for processing; in addition, data relating to uplink is transmitted to the base station. In general,RF circuit 501 includes, but is not limited to, an antenna, at least one Amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, theRF circuitry 501 may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Message Service (SMS), and the like.
Thememory 502 may be used to store software programs and modules, and theprocessor 508 executes various functional applications and data processing by operating the software programs and modules stored in thememory 502. Thememory 502 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the terminal, etc. Further, thememory 502 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, thememory 502 may also include a memory controller to provide theprocessor 508 and theinput unit 503 access to thememory 502.
Theinput unit 503 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, in one particular embodiment, theinput unit 503 may include a touch-sensitive surface as well as other input devices. The touch-sensitive surface, also referred to as a touch display screen or a touch pad, may collect touch operations by a user (e.g., operations by a user on or near the touch-sensitive surface using a finger, a stylus, or any other suitable object or attachment) thereon or nearby, and drive the corresponding connection device according to a predetermined program. Alternatively, the touch sensitive surface may comprise two parts, a touch detection means and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to theprocessor 508, and can receive and execute commands sent by theprocessor 508. In addition, touch sensitive surfaces may be implemented using various types of resistive, capacitive, infrared, and surface acoustic waves. Theinput unit 503 may include other input devices in addition to the touch-sensitive surface. In particular, other input devices may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
Thedisplay unit 504 may be used to display information input by or provided to the user and various graphical user interfaces of the terminal, which may be made up of graphics, text, icons, video, and any combination thereof. TheDisplay unit 504 may include a Display panel, and optionally, the Display panel may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch-sensitive surface may overlay the display panel, and when a touch operation is detected on or near the touch-sensitive surface, the touch operation is transmitted to theprocessor 508 to determine the type of touch event, and then theprocessor 508 provides a corresponding visual output on the display panel according to the type of touch event. Although in FIG. 5 the touch-sensitive surface and the display panel are two separate components to implement input and output functions, in some embodiments the touch-sensitive surface may be integrated with the display panel to implement input and output functions.
The terminal may also include at least onesensor 505, such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel according to the brightness of ambient light, and a proximity sensor that may turn off the display panel and/or the backlight when the terminal is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when the mobile phone is stationary, and can be used for applications of recognizing the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured in the terminal, detailed description is omitted here.
Audio circuitry 506, a speaker, and a microphone may provide an audio interface between the user and the terminal. Theaudio circuit 506 may transmit the electrical signal converted from the received audio data to a speaker, and convert the electrical signal into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electric signal, which is received by theaudio circuit 506 and converted into audio data, which is then processed by the audiodata output processor 508, and then transmitted to, for example, another terminal via theRF circuit 501, or the audio data is output to thememory 502 for further processing. Theaudio circuit 506 may also include an earbud jack to provide communication of peripheral headphones with the terminal.
WiFi belongs to short-distance wireless transmission technology, and the terminal can help a user to receive and send e-mails, browse webpages, access streaming media and the like through theWiFi module 507, and provides wireless broadband internet access for the user. Although fig. 5 shows theWiFi module 507, it is understood that it does not belong to the essential constitution of the terminal, and may be omitted entirely as needed within the scope not changing the essence of the invention.
Theprocessor 508 is a control center of the terminal, connects various parts of the entire mobile phone by using various interfaces and lines, and performs various functions of the terminal and processes data by operating or executing software programs and/or modules stored in thememory 502 and calling data stored in thememory 502, thereby integrally monitoring the mobile phone. Optionally,processor 508 may include one or more processing cores; preferably, theprocessor 508 may integrate an application processor, which primarily handles operating systems, user interfaces, application programs, etc., and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into theprocessor 508.
The terminal also includes a power supply 509 (e.g., a battery) for powering the various components, which may preferably be logically connected to theprocessor 508 via a power management system that may be used to manage charging, discharging, and power consumption. Thepower supply 509 may also include any component such as one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
Although not shown, the terminal may further include a camera, a bluetooth module, and the like, which will not be described herein. Specifically, in this embodiment, theprocessor 508 in the terminal loads the executable file corresponding to the process of one or more application programs into thememory 502 according to the following instructions, and theprocessor 508 runs the application programs stored in thememory 502, thereby implementing various functions: dividing a plurality of Bluetooth cache space ranges in advance; each Bluetooth cache space range corresponds to a Bluetooth transmission speed; starting a Bluetooth transmission function, and determining the current Bluetooth cache space according to the current memory size; and setting the corresponding Bluetooth transmission speed as the current Bluetooth transmission speed according to the Bluetooth cache space range matched with the current Bluetooth cache space.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
The bluetooth transmission control method, apparatus, terminal device and storage medium provided by the embodiments of the present invention are described in detail above, and a specific example is applied in this document to explain the principle and implementation manner of the present invention, and the description of the above embodiments is only used to help understanding the technical solution and the core idea of the present invention; those of ordinary skill in the art will understand that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.