Disclosure of Invention
For this reason, it is desirable to provide a method and apparatus capable of achieving reduction of power consumption and improvement of standby time of a terminal.
To achieve the above object, the inventors provide a bandwidth control method in a bluetooth shared network, comprising the steps of,
the master device is connected to a first network;
the master device shares a first network to the slave device through Bluetooth;
detecting the network data transmission rate of the master device;
the first preset operation is performed when the master device network data transmission rate exceeds a set value, which is a value greater than or equal to the current first network bandwidth 1/2.
Further, the executing the first preset operation includes prompting the bandwidth usage amount of the current first network, and displaying a connectable second network according to the current available network, wherein the bandwidth of the second network is larger than the bandwidth of the first network.
Further, the executing the first preset operation includes that the master device disconnects from the first network and connects to the second network; the bandwidth of the second network is greater than the bandwidth of the first network.
Further, the set value is a multiple of a bandwidth required for playing the 720p video, and the second network is a network with a bandwidth substantially equal to that of the 4G network.
Further, when the data transmission rate of the network of the main equipment exceeds the maximum bandwidth of the currently available network, the first network and the second network are started simultaneously.
The method further comprises the following steps that the master device presets a flow value of the slave device capable of using the shared network, and when the flow value of the slave device using the shared network reaches the preset value, a second preset operation is executed;
or the master device presets the time that the slave device can use the shared network, and when the time that the slave device uses the shared network exceeds a preset value, a second preset operation is executed;
the sharing network is a network shared by the master device to the slave device through Bluetooth.
Further, the second preset operation includes disconnecting the network shared to the slave device by bluetooth.
Further, the second preset operation includes displaying prompt information on the master device or the slave device, where the prompt information includes prompt information to display disconnection of a network shared to the slave device through bluetooth or prompt information to display disconnection of a network shared to the slave device through bluetooth.
Further, the method also comprises the step of setting an open Bluetooth port on the main equipment.
Further, setting accessible network addresses of the slave devices on the master device.
Further, the method also comprises that when the network access request is sent from the slave device to the master device, and the network access request accesses an address other than the network address which can be accessed by the master device set by the slave device, the master device discards the network access request.
Further, after the master device discards the network access request, the method further comprises the following steps:
the master device returns the inaccessible prompt message to the slave device.
The inventor also provides a bandwidth control method in a bluetooth shared network, comprising the following steps,
the master device is connected to a first network;
the master device shares a first network of a network to which the master device is connected to the slave device through Bluetooth;
detecting the network data transmission rate of the main equipment;
the third preset operation is performed when the master network data transmission rate is lower than a set value, which is a value of a bandwidth less than or equal to the current network bandwidth 1/4.
Further, the executing of the third preset operation includes prompting the current network bandwidth usage amount, and displaying a connectable second bandwidth network according to the current available network, where the bandwidth of the second network is smaller than the first network bandwidth.
Further, the executing the third preset operation includes that the master device switches the first network to be connected to the second network; the bandwidth of the second network is less than the bandwidth of the first network.
The invention also provides a Bluetooth sharing network device for realizing the method, which comprises a Bluetooth chip module and a bandwidth control module, wherein the bandwidth control module is used for executing a first preset operation when judging that the network data transmission rate of the equipment reaches a first set value;
the set value is a value of bandwidth that is substantially equal to the current network bandwidth 1/2.
Further, the first preset operation executed by the bandwidth control module comprises prompting the current bandwidth usage amount, and displaying a connectable second network or disconnecting and connecting the first network to the second network according to the current available network, wherein the bandwidth of the second network is greater than that of the first network.
The flow control module is used for setting a flow value of the shared network which can be used by the slave equipment, and when the flow value of the shared network used by the slave equipment reaches the set flow value, displaying prompt information for achieving the set flow for disconnecting the network shared to the slave equipment through Bluetooth or disconnecting the network shared to the slave equipment through Bluetooth;
or further comprising a time control module, wherein the time control module is used for setting the time that the slave equipment can use the shared network, and when the time that the slave equipment uses the shared network reaches the set time value, the time control module displays prompt information that the network shared by the Bluetooth to the slave equipment is disconnected and the set time is reached, or the network shared by the Bluetooth to the slave equipment is disconnected;
the sharing network is a network shared by the master device to the slave device through Bluetooth;
further, the system also comprises a safety access control module, wherein the safety access control module is used for setting an open Bluetooth port.
The network access control method further comprises a security access control module, wherein the security access control module is used for discarding the network access request by the master device when setting addresses except network addresses accessible by the slave device. Different from the prior art, the technical scheme predicts which type of network operation of the user is performed through detecting the network data transmission rate of the main device and through the network data transmission rate, and then prompts or allocates proper network connection for the user. The network access experience of the user is improved, and meanwhile, when the high-speed bandwidth is not needed, the low-network-speed bandwidth network with low power consumption is selected to be connected, so that the use and standby time of the mobile equipment can be prolonged.
Detailed Description
To explain technical contents, structural features, and objects and effects of the technical solutions in detail, the following detailed description is given with reference to the accompanying drawings in conjunction with the embodiments.
For convenience of describing the embodiments of the present invention, the Bandwidth (english: Bandwidth) in this document refers to the frequency Bandwidth occupied by the signal; when used to describe a channel, bandwidth refers to the maximum frequency bandwidth of a signal that can effectively pass through the channel. Bandwidth in digital devices is expressed in bps (b/s). In the field of telecommunications, data transmission rate or transmission rate in short refers to the average value of bits, characters, or blocks transmitted between data transmission system devices in a unit of time.
For convenience of illustration, in the specific embodiment, the first network and the second network are GPRS, 3G, 4G, 5G, wifi, dial-up connection, and the first network bandwidth and the second network bandwidth are bandwidths of the networks. The first and second network bandwidths are limited by the bandwidth allocated to the external network, which is a fixed value in some cases, for example, 10M bandwidth is allocated to the master device, but in some cases, the bandwidth allocated to the master device is changed, for example, the signal is weak at the corner 4g of the public area, and then the bandwidth value that can be used by the master device is small.
The current bandwidth (sometimes also described as the current bandwidth usage) that distinguishes the first network bandwidth from the second network bandwidth is the current actual amount of packet switching per second by the master device, which is limited to the first network bandwidth and the second network bandwidth.
Referring to fig. 1, a connection method of a bluetooth dial-up network according to the present embodiment is shown, in which a computer 101 is connected to a local area network or a wide area network, and the computer has a bluetooth module capable of opening a bluetooth network sharing function. The mobile phone also has a Bluetooth module, which can be connected to other Bluetooth modules to share their network connection. At this time, we also refer to the computer end as gateway equipment and the mobile phone end as a data terminal.
Referring to fig. 2, fig. 2 shows a network protocol model of a gateway device and a data terminal in establishing and using a bluetooth dial-up network. The baseband and link control layers of the baseband protocol ensure the physical connection formed by radio frequency between each bluetooth device unit in the piconet. The connection management protocol (LMP) is responsible for the establishment of connections between bluetooth devices. A logical link control and adaptation protocol (L2CAP), which operates in parallel with the LMP, is different in that the L2CAP provides services to an upper layer when traffic data does not pass through the LMP. Service Discovery Protocol (SDP), which plays a crucial role in the bluetooth framework, is the basis for all user modes. The cable replacement protocol (RFCOMM) is a serial line emulation protocol based on the ETSI-07.10 specification. It emulates RS-232 control and data signals over the bluetooth baseband protocol to serve upper layer protocols (e.g., OBEX) that use a serial line transfer mechanism. Application layer (application) the application layer accesses some lower layer procedures (e.g., establishment of SCO synchronous links).
The inventor finds that a network data counting module is added on or above an application layer and is used for counting network data flow used by the application layer in a Bluetooth dialing network protocol of a master device, and then calculating network data transmission flow of a slave device.
In some embodiments, a method of bandwidth control in a bluetooth shared network process, as shown in figure 3, comprises the steps of,
s301, the master device is connected to a network through a first network;
s302, the master device shares a first network to the slave device;
s303, detecting the network data transmission rate of the main equipment;
s304, when the network data transmission rate of the main equipment exceeds a set value, executing a first preset operation;
the set value is a value greater than or equal to the current first network bandwidth 1/2.
In the above embodiments, the first network is a wireless network or a wired network, the wireless network is a wireless local area network formed by using radio waves as a medium for information transmission, and the purpose of the wireless local area network is very similar to that of the wired network, and the greatest difference lies in that the wireless local area network uses a radio technology instead of a network cable. Such as a wireless fidelity Wi-Fi network, a wireless fidelity direct Wi-Fi direct network, 5g, 4g, 3g, 2g, etc., and may also be other wireless protocols or wireless networks with the development of technologies. The master device may range to a local area network or a wide area network by connecting to the first network.
The slave device is connected to the master device via bluetooth, and forms a Personal Area Network (PAN) with the master device via a bluetooth dial-up network protocol (dun), which uses frequency hopping spread spectrum to transmit data over short distances from fixed or mobile devices. The slave device is connected with the access network through the Bluetooth, and compared with other common wireless networks such as wifi and 4g, the power consumption is low, and the standby time of the device can be prolonged. In other usage scenarios, for example, when the slave device cannot be connected to the network through the operator (for example, the phone card in the home country cannot be used after going out of the country) or because the network traffic rate of the master device is lower, the bluetooth sharing network is turned on by the master device, the slave device is connected to the master device through bluetooth, and shares the network of the master device, and the standby time of the master device can be better prolonged by using the bluetooth sharing network than by turning on the wifi hotspot sharing network by the master device.
The network data transmission rate of the master device is then obtained through network monitoring, and in different embodiments, the monitoring of the data transmission rate may be different, for example, the average data transmission rate of the master device at this minute, that is, the data transmission rate of the master device, may be obtained by measuring the total flow rate of the master device within 1 minute and then dividing the flow rate value by 60 seconds. The average value of the network data transmission rate in a longer time period may also be used, and for example, the average value of the network data transmission rate of the master device in 2 minutes may be used as the network data transmission rate for the next determination.
When the measured network data transmission rate exceeds a set value, which is a bandwidth value equal to or greater than the current network bandwidth 1/2, a first preset operation is performed. The setting value may be different values according to different embodiments, and may be a bandwidth value of 2/3, a bandwidth value of 3/4, or the like. The setting may be a network data transfer rate that facilitates differentiation of a user's network access behavior, for example, a rate value that differentiates whether the user is browsing a web page or watching a video. Since the common bitrate of most network videos is 720p at present, the preferred setting value can be set to be a multiple of the bandwidth required for playing 720p videos, and the multiple is not necessarily an integer. For example, when the user often plays 480p network video, since the bandwidth required for playing 480p is about 0.4 times the bandwidth required for playing 720p video, the setting value can be set to 0.4 times the bandwidth required for playing 720p video. When the network data transmission rate of the main device is detected to be equal to or multiple of the bandwidth required by playing the 720p video, the network of the main device is switched to be connected to a 4G network or a network with the bandwidth larger than 4G, such as a wifi network, so as to ensure the fluency of the played network video.
The first preset operation comprises the operation of switching the network of the main equipment or providing convenience and prompt for the switching operation.
In some embodiments, the performing the first preset operation includes prompting a current network bandwidth usage amount, and displaying a connectable second network according to a currently available network, the second network having a bandwidth greater than the first network bandwidth. The user is prompted about the current network usage amount, so that the user can understand why the current network access is not smooth, and the network usage experience of the user is improved. In other embodiments, the connectable second network is displayed or prompted for the user, so that the user can conveniently switch the network to be connected to a network which is faster than the first network, and convenient switching operation is provided for the user.
In some embodiments, the performing the first preset operation includes the master device switching the first network to be connected to the second network; the bandwidth of the second network is greater than the bandwidth of the first network. This will directly simplify the handover network operation steps made by the user. Switching from the first network to the second network is switching from the low speed network to the high speed network, for example, switching from 2g to 3g, switching from 3g to 4g, switching from 4g to 5g, or switching from 2g to 4 g. The master switching network typically disconnects the first network and connects to the second network. In other cases, the network bandwidth of wifi corresponding to the current can be known according to the wifi broadcast frame, the wifi is sequenced according to the wifi network bandwidth, and when the first network is connected to the wifi network, the connection to the second network can be the wifi with the largest current bandwidth or the wifi with the best current signal.
In some embodiments, the first network is connected to the second network after the first network is disconnected, and then the first network is connected to the second network.
By detecting the network data transmission rate of the main equipment, whether the website accessed by the user belongs to a video website or a text and picture type website is predicted through the network data transmission rate, and then a proper network connection is prompted or allocated to the user. The network access experience of the user is improved, and meanwhile, when the high-speed bandwidth is not needed, the low-network-speed bandwidth network with low power consumption is selected to be connected, so that the use and standby time of the mobile equipment can be prolonged.
In other embodiments, when the master device network data transmission rate exceeds the maximum bandwidth of the currently available network, the first network and the second network are simultaneously turned on to increase the network access bandwidth of the master device. In some embodiments, the master device and the slave device form a Personal Area Network (PAN) through a bluetooth dial-up network, and then in the bluetooth sharing process, it may be determined which network the master device and the slave device are respectively dedicated to use according to their respective network data transmission rates for a period of time, for example, the master device has video access, the slave device mainly has text-type web access, the master device is dedicated to the second network, and the slave device accesses the first network through the bluetooth dial-up network of the master device. In other embodiments, the master device and the slave device may mix the first network and the second network, and the master device obtains the maximum network bandwidth by simultaneously starting and using the first network and the second network.
In other embodiments, the master device presets the traffic value of the shared network that the slave device can use, and when the traffic value of the shared network that the slave device uses reaches a preset value, or the master device presets the time that the slave device can use the shared network, and when the slave device use time exceeds the preset value, the second preset operation is performed. The sharing network is a network shared by the master device to the slave device through Bluetooth. The flow value of the slave equipment is counted, so that a user, particularly a user ordering the flow package, can know the flow use condition in the Bluetooth network sharing in time, and the user can take preset measures in time for the network data flow which is about to be over-rated or is over-rated. In some cases the second predetermined operation may be to disconnect the network that the master device shares to the slave device via bluetooth. Or to inform the master or slave device that the network shared to the slave device over bluetooth will be disconnected.
In other embodiments, in bluetooth network sharing, the master device also sets a port through which the slave device can access the bluetooth, i.e., the master device also sets a port for bluetooth dial-up network connection. The open port is generally a default port, or may be an open port set by a user through a setting interface. And when the Bluetooth connection is authenticated, the port information of the two parties in the negotiation information of the Bluetooth connection. And judging whether the port requested to be connected by the slave device is included in the port set to be opened by the master device, if so, allowing the connection, and otherwise, not connecting. This step can be implemented in the bluetooth protocol, and also can be implemented by the relevant interface in the bluetooth protocol stack. By setting the development port, illegal access requests or Bluetooth connection requests can be rejected.
In other embodiments, in bluetooth network sharing, the master device further sets an accessible network address of the slave device for restricting network access of the slave device and protecting secure access of the slave device network. When the network access request is sent from the slave device to the master device, and the network access request accesses an address other than the network address which can be accessed by the master device set by the slave device, the master device discards the network access request.
In other embodiments, the method further comprises the step that the master device returns the inaccessible prompting information to the slave device. In some cases, the user may be prompted that the master device in bluetooth sharing has set access address filtering, and in other cases may be placed back 404 directly or otherwise have no access to the prompt.
In other embodiments, a method of bandwidth control in a bluetooth shared network process as shown in fig. 4 includes the following steps
S401, the main equipment is connected to a network through a first network;
s402, the master device shares a first network to the slave device;
s403, detecting the network data transmission rate of the master device;
s404, when the network data transmission rate of the main equipment is lower than a set value, executing a third preset operation;
the set value is a value of a bandwidth that is less than or equal to the current network bandwidth 1/4.
Namely, when the network data transmission rate of the main equipment is at the low level of the current network bandwidth, the third preset operation is executed. The lower bits of the network bandwidth may be defined as a bandwidth value smaller than or equal to current network bandwidth 1/2, or may also be defined as a bandwidth value smaller than or equal to current network bandwidth 1/3, or may be defined as a bandwidth value of network bandwidth 1/4. The third preset operation comprises the operation that the main equipment network is switched to low bandwidth or convenience and prompt are provided for the switching operation.
In still other embodiments, the performing the third preset operation includes prompting a current network bandwidth usage amount, and displaying a connectable second network according to a currently available network, wherein a bandwidth of the second network is smaller than a bandwidth of the first network.
In some embodiments, the performing the third preset operation includes switching, by the master device, the first network to be connected to the second network; the bandwidth of the second network is less than the bandwidth of the first network.
By actively detecting the network data transmission rate of the main equipment, whether the website accessed by the user belongs to a video website or a text and picture type website is predicted through the network data transmission rate. When the main device does not need high bandwidth connection, the main device selects a low network speed bandwidth network with low power consumption, which is beneficial to prolonging the use and standby time of the mobile device.
The present invention further provides a bluetooth sharing network apparatus, which is used as a master device sharing network, i.e. as a gateway device, as shown in fig. 5. The Bluetooth sharing network device comprises a Bluetooth chip module and a bandwidth control module.
The Bluetooth chip module is used for constructing a Bluetooth communication link and receiving and analyzing and executing a Bluetooth command.
The bandwidth control module is used for executing preset operation when judging that the network data transmission rate of the equipment reaches a first set value; the set value is a value of bandwidth that is substantially equal to the current network bandwidth 1/2.
In some embodiments, the preset operation includes prompting the current bandwidth usage amount, and displaying a connectable second bandwidth network or a master device to switch the first network to be connected to the second network according to the currently available network; the bandwidth of the second network is greater than the bandwidth of the first network; in some embodiments the preset operation comprises the master device switching the first network to connect to the second network; the bandwidth of the second network is greater than the bandwidth of the first network.
The network data transmission rate of the main equipment is detected, and the type of the network operation of the user is predicted according to the network data transmission rate, so that the user is prompted or allocated with proper network connection. The network access experience of the user is improved, and meanwhile, when the high-speed bandwidth is not needed, the low-network-speed bandwidth network with low power consumption is selected to be connected, so that the use and standby time of the mobile equipment can be prolonged.
In other embodiments, the bluetooth sharing network apparatus further includes a flow control module, where the flow control module is configured to receive a preset time for which the slave device can use the sharing network, perform a preset operation on a flow value for which the slave device can use the sharing network when the time for which the slave device is used exceeds the preset value, and display a prompt message or disconnect the network shared by bluetooth to the slave device when the flow value for which the slave device is used reaches the preset value.
In other embodiments, the bluetooth sharing network apparatus further comprises a time control module, wherein the time control module is configured to receive a preset time for which the slave device can use the sharing network, and when the time for which the slave device uses exceeds the preset value, display a prompt message, or disconnect or inform disconnection of the network shared by bluetooth to the slave device.
In some embodiments, the bluetooth sharing network further comprises a security access control module, and the security access control module is configured to set an open bluetooth port.
In some embodiments, the bluetooth sharing network apparatus further includes a security access control module, where the security access control module is configured to set an address other than a network address accessible by the slave device, and the master device discards the network access request.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrases "comprising … …" or "comprising … …" does not exclude the presence of additional elements in a process, method, article, or terminal that comprises the element. Further, herein, "greater than," "less than," "more than," and the like are understood to exclude the present numbers; the terms "above", "below", "within" and the like are to be understood as including the number.
As will be appreciated by one skilled in the art, the above-described embodiments may be provided as a method, apparatus, or computer program product. These embodiments may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. All or part of the steps in the methods according to the embodiments may be implemented by a program instructing associated hardware, where the program may be stored in a storage medium readable by a computer device and used to execute all or part of the steps in the methods according to the embodiments. The computer devices, including but not limited to: personal computers, servers, general-purpose computers, special-purpose computers, network devices, embedded devices, programmable devices, intelligent mobile terminals, intelligent home devices, wearable intelligent devices, vehicle-mounted intelligent devices, and the like; the storage medium includes but is not limited to: RAM, ROM, magnetic disk, magnetic tape, optical disk, flash memory, U disk, removable hard disk, memory card, memory stick, network server storage, network cloud storage, etc.
The various embodiments described above are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a computer apparatus to produce a machine, such that the instructions, which execute via the processor of the computer apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer device to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer apparatus to cause a series of operational steps to be performed on the computer apparatus to produce a computer implemented process such that the instructions which execute on the computer apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Although the embodiments have been described, once the basic inventive concept is obtained, other variations and modifications of these embodiments can be made by those skilled in the art, so that the above embodiments are only examples of the present invention, and not intended to limit the scope of the present invention, and all equivalent structures or equivalent processes using the contents of the present specification and drawings, or any other related technical fields, which are directly or indirectly applied thereto, are included in the scope of the present invention.