CN107708216B - Data link allocation method, mobile terminal and computer readable storage medium - Google Patents

Data link allocation method, mobile terminal and computer readable storage medium Download PDF

Info

Publication number
CN107708216B
CN107708216B CN201710912789.1A CN201710912789A CN107708216B CN 107708216 B CN107708216 B CN 107708216B CN 201710912789 A CN201710912789 A CN 201710912789A CN 107708216 B CN107708216 B CN 107708216B
Authority
CN
China
Prior art keywords
transmission rate
data
data channel
real
data link
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.)
Active
Application number
CN201710912789.1A
Other languages
Chinese (zh)
Other versions
CN107708216A (en
Inventor
车晓东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nubia Technology Co Ltd
Original Assignee
Nubia Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201710912789.1A priority Critical patent/CN107708216B/en
Publication of CN107708216A publication Critical patent/CN107708216A/en
Application granted granted Critical
Publication of CN107708216B publication Critical patent/CN107708216B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W72/00Local resource management
    • H04W72/50Allocation or scheduling criteria for wireless resources
    • H04W72/54Allocation or scheduling criteria for wireless resources based on quality criteria
    • H04W72/542Allocation or scheduling criteria for wireless resources based on quality criteria using measured or perceived quality

Landscapes

  • Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a data link distribution method, a mobile terminal and a computer readable storage medium, for the mobile terminal comprising two WiFi antennas and two data channels, when two wireless hotspots are connected simultaneously, the two data channels transmit a data link generated by an upper layer application, the mobile terminal detects the real-time transmission rate of the data link transmitted by the two data channels, calculates the average transmission rate of the two data channels based on the detected real-time transmission rate and a preset smoothing algorithm, then determines the data link distribution ratio of the two data channels according to the average transmission rate of the two data channels, when a new link of the upper layer application is detected, the newly-built data link of the upper layer application is distributed to the two data channels for transmission based on the determined data link distribution ratio, the data link distribution ratio is adjusted through the transmission rates of the two data channels, the data balance of the two data channels can be effectively ensured, and the network access efficiency is improved.

Description

Data link allocation method, mobile terminal and computer readable storage medium
Technical Field
The present invention relates to the field of mobile terminal technologies, and in particular, to a data link allocation method, a mobile terminal, and a computer-readable storage medium.
Background
With the improvement of the living standard of modern people, mobile terminals such as smart phones and PADs (PADs) have become necessities in life, and an important function of the mobile terminals is to realize network access through WiFi (Wireless Fidelity) and internet communication. With the rapid evolution of the mobile terminal technology, in order to improve the network access efficiency of the mobile terminal, the mobile terminal greatly increases the available bandwidth of the mobile terminal from the initial support of single WiFi to the current support of dual WiFi.
At present, a mobile terminal supporting dual WiFi can adopt a dual data channel concurrency scheme to realize bandwidth superposition of dual data channels, thereby improving network access efficiency of the mobile terminal, but when the dual data channel concurrency scheme is adopted, the number of data links allocated to each data channel needs to be considered to ensure data balance of the two data channels, and therefore how to ensure data balance of the two data channels is a problem to be solved urgently at present.
The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.
Disclosure of Invention
The invention mainly aims to provide a data link allocation method, a mobile terminal and a computer readable storage medium, and aims to solve the technical problem of ensuring data balance of two data channels.
In order to achieve the above object, the present invention provides a data link allocation method, which is applied to a mobile terminal, where the mobile terminal includes a first WiFi antenna and a second WiFi antenna, the mobile terminal establishes a connection with a first wireless hotspot through the first WiFi antenna to establish a first data channel, and establishes a connection with a second wireless hotspot through the second WiFi antenna to establish a second data channel, and the data link allocation method includes the following steps:
detecting a first real-time transmission rate of the first data channel and detecting a second real-time transmission rate of the second data channel;
calculating a first average transmission rate according to a preset smoothing algorithm and the first real-time transmission rate, and calculating a second average transmission rate according to the preset smoothing algorithm and the second real-time transmission rate;
and calculating the data link distribution ratio of the first data channel and the second data channel according to the first average transmission rate and the second average transmission rate.
Optionally, the step of calculating the data link allocation ratio of the first data channel and the second data channel according to the first average transmission rate and the second average transmission rate includes:
calculating a transmission rate weight of the first data channel according to the first average transmission rate and the second average transmission rate;
and determining the data link distribution ratio of the first data channel and the second data channel according to the transmission rate weight.
Optionally, the step of determining the data link allocation ratio of the first data channel and the second data channel according to the transmission rate weight includes:
when the transmission rate weight is greater than a first preset threshold value, setting the data link distribution ratio of the first data channel and the second data channel as a first preset data link distribution ratio;
when the transmission rate weight is smaller than a second preset threshold value, setting the data link distribution ratio of the first data channel and the second data channel as a second preset data link distribution ratio;
when the transmission rate weight is smaller than or equal to a first preset threshold and larger than or equal to a second preset threshold, calculating the transmission rate weight of the second data channel according to the first average transmission rate and the second average transmission rate;
setting the ratio of the transmission rate weight of the first data channel to the transmission rate weight of the second data channel as the data link allocation ratio of the first data channel and the second data channel.
Optionally, the step of determining the data link allocation ratio of the first data channel and the second data channel according to the transmission rate weight further includes:
judging whether the first real-time transmission rate and the second real-time transmission rate are both lower than a preset threshold value;
when the first real-time transmission rate and the second real-time transmission rate are both lower than a preset threshold, judging whether the transmission rate weight is larger than a first preset threshold or smaller than a second preset threshold;
and when the transmission rate weight is greater than a first preset threshold value or less than a second preset threshold value, setting the data link distribution ratio of the first data channel and the second data channel as a third preset data link distribution ratio.
Optionally, after the step of determining whether the first real-time transmission rate and the second real-time transmission rate are both lower than a preset threshold, the method further includes:
when the first real-time transmission rate and the second real-time transmission rate are both lower than a preset threshold value, recording the duration of the first real-time transmission rate and the second real-time transmission rate which are both lower than the preset threshold value;
and judging whether the duration is longer than a preset duration, and when the duration is longer than the preset duration, executing the step of judging whether the transmission rate weight is larger than a first preset threshold or smaller than a second preset threshold.
Optionally, after the step of determining whether the first real-time transmission rate and the second real-time transmission rate are both lower than a preset threshold, the method further includes:
when the first real-time transmission rate and the second real-time transmission rate are both lower than a preset threshold value, detecting a first working frequency band of a first wireless hotspot and detecting a second working frequency band of a second wireless hotspot;
when the first working frequency band is 2.4G and the second working frequency band is 5G, controlling the mobile terminal to disconnect the first wireless hotspot and establish connection with the second wireless hotspot through the first WiFi antenna;
and when the first working frequency band is 5G and the second working frequency band is 2.4G, the mobile terminal is controlled to be disconnected from the second wireless hotspot and is connected with the first wireless hotspot through the second WiFi antenna.
Optionally, before the steps of detecting the first real-time transmission rate of the first data channel and detecting the second real-time transmission rate of the second data channel, the method further includes:
detecting a signal strength of the first wireless hotspot when a number of data links are detected;
when the signal intensity is in a first preset interval, setting a wireless hotspot carrying the data links as the first wireless hotspot, and transmitting the data links based on the first data channel;
when the signal intensity is in a second preset interval, setting the wireless hot spot carrying the plurality of data links as the first wireless hot spot and the second wireless hot spot, and calculating the distribution ratio of the initial data links according to the quantity of the plurality of data links;
and allocating the data link to the first data channel and the second data channel according to the initial data link allocation ratio for transmission, and executing the steps of detecting a first real-time transmission rate of the first data channel and detecting a second real-time transmission rate of the second data channel.
Optionally, after the step of detecting the signal strength of the first wireless hotspot, the method further includes:
and when the signal intensity is in a third preset interval, setting the wireless hotspot carrying the data links as the second wireless hotspot, and transmitting the data links based on the second data channel.
In addition, to achieve the above object, the present invention also provides a mobile terminal, including: the mobile terminal is connected with a first wireless hotspot through the first WiFi antenna, a first data channel is built, a second data channel is built through connection between the second WiFi antenna and a second wireless hotspot, the mobile terminal further comprises a data link distribution program which is stored on the memory and can run on the processor, and the data link distribution program realizes the following steps when executed by the processor:
detecting a first real-time transmission rate of the first data channel and detecting a second real-time transmission rate of the second data channel;
calculating a first average transmission rate according to a preset smoothing algorithm and the first real-time transmission rate, and calculating a second average transmission rate according to the preset smoothing algorithm and the second real-time transmission rate;
and calculating the data link distribution ratio of the first data channel and the second data channel according to the first average transmission rate and the second average transmission rate.
The invention also provides a computer-readable storage medium, which is applied to a mobile terminal, wherein the mobile terminal comprises a first WiFi antenna and a second WiFi antenna, the mobile terminal establishes connection with a first wireless hotspot through the first WiFi antenna to establish a first data channel, and establishes connection with a second wireless hotspot through the second WiFi antenna to establish a second data channel, a data link allocation program is stored on the computer-readable storage medium, and when being executed by a processor, the data link allocation program realizes the following steps:
detecting a first real-time transmission rate of the first data channel and detecting a second real-time transmission rate of the second data channel;
calculating a first average transmission rate according to a preset smoothing algorithm and the first real-time transmission rate, and calculating a second average transmission rate according to the preset smoothing algorithm and the second real-time transmission rate;
and calculating the data link distribution ratio of the first data channel and the second data channel according to the first average transmission rate and the second average transmission rate.
The invention provides a data link distribution method, a mobile terminal and a computer readable storage medium, for the mobile terminal comprising two WiFi antennas and two data channels, when two wireless hotspots are connected simultaneously, the two data channels transmit a data link generated by an upper layer application, the mobile terminal detects the real-time transmission rate of the data link transmitted by the two data channels, calculates the average transmission rate of the two data channels based on the detected real-time transmission rate and a preset smoothing algorithm, then determines the data link distribution ratio of the two data channels according to the average transmission rate of the two data channels, when a new data link of the upper layer application is detected, the newly-built data link of the upper layer application is distributed to the two data channels for transmission based on the determined data link distribution ratio, the data link distribution ratio is adjusted through the transmission rates of the two data channels, the data balance of the two data channels can be effectively ensured, and the network access efficiency is improved.
Drawings
Fig. 1 is a schematic diagram of a hardware structure of an optional mobile terminal for implementing various embodiments of the present invention;
FIG. 2 is a schematic diagram of a logical hierarchical structure of a WiFi module of a mobile terminal;
FIG. 3 is a flowchart illustrating a first embodiment of a data link allocation method according to the present invention;
fig. 4 is a schematic diagram of the respective transmission data links of the first data channel and the second data channel in the first embodiment of the data link allocation method of the present invention;
FIG. 5 is a detailed flow chart of the step of calculating the data link allocation ratio of the first data channel and the second data channel according to the first average transmission rate and the second average transmission rate in FIG. 3;
fig. 6 is a schematic diagram of a first data channel and a second data channel respectively transmitting a newly-built data link according to a first embodiment of a data link allocation method of the present invention;
fig. 7 is a detailed flowchart of the step of determining the data link allocation ratio of the first data channel and the second data channel according to the transmission rate weight in the second embodiment of the data link allocation method of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for facilitating the explanation of the present invention, and have no specific meaning in itself. Thus, "module", "component" or "unit" may be used mixedly.
The terminal may be implemented in various forms. For example, the terminal described in the present invention may include a mobile terminal such as a mobile phone, a tablet computer, a notebook computer, a palm top computer, a Personal Digital Assistant (PDA), a Portable Media Player (PMP), a navigation device, a wearable device (such as a smart band), a pedometer, and the like, and a fixed terminal such as a Digital TV, a desktop computer, and the like.
The following description will be given by way of example of a mobile terminal, and it will be understood by those skilled in the art that the construction according to the embodiment of the present invention can be applied to a fixed type terminal, in addition to elements particularly used for mobile purposes.
Referring to fig. 1, which is a schematic diagram of a hardware structure of an optional mobile terminal for implementing various embodiments of the present invention, the mobile terminal 100 may include: RF (Radio Frequency) unit 101, WiFi module 102, display unit 106, user input unit 107, interface unit 108, memory 109, processor 110, and power supply 111. Those skilled in the art will appreciate that the mobile terminal architecture shown in fig. 1 is not intended to be limiting of mobile terminals, which may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The following describes each component of the mobile terminal in detail with reference to fig. 1:
the radio frequency unit 101 may be configured to receive and transmit signals during information transmission and reception or during a call, and specifically, receive downlink information of a base station and then process the downlink information to the processor 110; in addition, the uplink data is transmitted to the base station. Typically, radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 101 can also communicate with a network and other devices through wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System for Mobile communications), GPRS (General Packet Radio Service), CDMA2000(Code Division Multiple Access 2000), WCDMA (Wideband Code Division Multiple Access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access), FDD-LTE (Frequency Division duplex Long Term Evolution), and TDD-LTE (Time Division duplex Long Term Evolution).
WiFi belongs to short-distance wireless transmission technology, and the mobile terminal can help a user to receive and send e-mails, browse webpages, access streaming media and the like through the WiFi module 102, and provides wireless broadband internet access for the user. Referring to fig. 2, corresponding to the logical hierarchy of the android system, the WiFi module 102 includes a WiFi chip 1021, a WiFi dual-port driver module 1022, a WiFi dual-port protocol module 1023, a WiFi dual-port frame module 1024, and a display module 1025.
The WiFi chip 1021 supports a double-MAC technology, can burn two different MAC addresses at the same time, and is responsible for realizing data communication of the bottommost layer.
The WiFi dual-port driver module 1022 adds the support to the port wlan1 on the basis that the existing WiFi driver only supports the wlan0, and binds the two MAC addresses with the port wlan0 and the port wlan1, respectively, and builds a communication channel to ensure that the driver command can be smoothly sent to the WiFi chip 1021.
The WiFi dual port protocol module 1023 comprises two protocol stacks, which are respectively used for supporting a port wlan0 and a port wlan1, and contain relatively independent configuration files for storing wireless hotspot information and protocol stack configuration information. The information in the two ports wlan0 and wlan1 can be synchronized through separate services in the protocol stacks, so that the operation of a user on any path can be stored, and in the process of opening WiFi, when the protocol stacks are started, the protocol stacks of the two ports can be respectively started, and simultaneously the WiFi dual-port driver module 1022 can be notified to enable the two ports, and after the two wlan ports at the bottom layer are enabled, the bottom layer driver part and the following parts really have the dual WiFi functions. The WiFi dual port protocol module 1023 completes the binding of the protocol stack and the bottom port through the common interface provided by the WiFi dual port driver module 1022, and then completes the building of the data channel.
The WiFi dual-port frame module 1024 is different from the original single WiFi frame in that the support for the wlan1 port is added, the original WiFi frame and the message mechanism are kept unchanged, a new set of message transmission mechanism is separately built, two sockets are simultaneously enabled to bind different protocol stacks, and normal communication of the upper layer and the lower layer is kept. The WiFi dual port frame module 1024 distinguishes whether the issued command belongs to wlan0 or wlan1 by port number.
And the display module 1025 is used for displaying the user interface, receiving the triggered user interface operation and responding by other corresponding modules.
The display unit 106 is used to display information input by a user or information provided to the user. The Display unit 106 may include a Display panel 1061, and the Display panel 1061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 107 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the mobile terminal. Specifically, the user input unit 107 may include a touch panel 1071 and other input devices 1072. The touch panel 1071, also referred to as a touch screen, may collect a touch operation performed by a user on or near the touch panel 1071 (e.g., an operation performed by the user on or near the touch panel 1071 using a finger, a stylus, or any other suitable object or accessory), and drive a corresponding connection device according to a predetermined program. The touch panel 1071 may include two parts of a touch detection device 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 the processor 110, and can receive and execute commands sent by the processor 110. In addition, the touch panel 1071 may be implemented in various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 may include other input devices 1072. In particular, other input devices 1072 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like, and are not limited to these specific examples.
Further, the touch panel 1071 may cover the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or nearby, the touch panel 1071 transmits the touch operation to the processor 110 to determine the type of the touch event, and then the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of the touch event. Although the touch panel 1071 and the display panel 1061 are shown in fig. 1 as two separate components to implement the input and output functions of the mobile terminal, in some embodiments, the touch panel 1071 and the display panel 1061 may be integrated to implement the input and output functions of the mobile terminal, and is not limited herein.
The interface unit 108 serves as an interface through which at least one external device is connected to the mobile terminal 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from external devices and transmit the received input to one or more elements within the mobile terminal 100 or may be used to transmit data between the mobile terminal 100 and external devices.
The memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a storage program area and a storage data area, wherein the storage program 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 cellular phone, and the like. Further, the memory 109 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.
The processor 110 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by operating or executing software programs and/or modules stored in the memory 109 and calling data stored in the memory 109, thereby performing overall monitoring of the mobile terminal. Processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 110.
The mobile terminal 100 may further include a power supply 112 (e.g., a battery) for supplying power to the various components, and preferably, the power supply 112 may be logically connected to the processor 110 via a power management system, so that functions of managing charging, discharging, and power consumption are performed via the power management system.
Although not shown in fig. 1, the mobile terminal 100 may further include a bluetooth module or the like, which is not described in detail herein.
Based on the above mobile terminal hardware structure, various embodiments of the mobile terminal of the present invention are provided.
Referring to fig. 1, in a first embodiment of the mobile terminal of the present invention, the mobile terminal includes: the mobile terminal is connected with a first wireless hotspot through the first WiFi antenna, a first data channel is built, a second data channel is built through connection between the second WiFi antenna and a second wireless hotspot, the mobile terminal further comprises a data link distribution program which is stored on the memory and can run on the processor, and the data link distribution program realizes the following steps when executed by the processor:
detecting a first real-time transmission rate of the first data channel and detecting a second real-time transmission rate of the second data channel;
calculating a first average transmission rate according to a preset smoothing algorithm and the first real-time transmission rate, and calculating a second average transmission rate according to the preset smoothing algorithm and the second real-time transmission rate;
and calculating the data link distribution ratio of the first data channel and the second data channel according to the first average transmission rate and the second average transmission rate.
Further, the data link assignment program when executed by the processor further implements the steps of:
calculating a transmission rate weight of the first data channel according to the first average transmission rate and the second average transmission rate;
and determining the data link distribution ratio of the first data channel and the second data channel according to the transmission rate weight.
Further, the data link assignment program when executed by the processor further implements the steps of:
when the transmission rate weight is greater than a first preset threshold value, setting a first preset data link distribution ratio as a data link distribution ratio of the first data channel and the second data channel;
when the transmission rate weight is smaller than a second preset threshold value, setting a second preset data link distribution ratio as the data link distribution ratio of the first data channel and the second data channel;
when the transmission rate weight is smaller than or equal to a first preset threshold and larger than or equal to a second preset threshold, calculating the transmission rate weight of the second data channel according to the first average transmission rate and the second average transmission rate;
setting the ratio of the transmission rate weight of the first data channel to the transmission rate weight of the second data channel as the data link allocation ratio of the first data channel and the second data channel.
Further, the data link assignment program when executed by the processor further implements the steps of:
judging whether the first real-time transmission rate and the second real-time transmission rate are both lower than a preset threshold value;
when the first real-time transmission rate and the second real-time transmission rate are both lower than a preset threshold, judging whether the transmission rate weight is larger than a first preset threshold or smaller than a second preset threshold;
and when the transmission rate weight is greater than a first preset threshold or less than a second preset threshold, setting a third preset data link distribution ratio as the data link distribution ratio of the first data channel and the second data channel.
Further, the data link assignment program when executed by the processor further implements the steps of:
when the first real-time transmission rate and the second real-time transmission rate are both lower than a preset threshold value, recording the duration of the first real-time transmission rate and the second real-time transmission rate which are both lower than the preset threshold value;
and judging whether the duration is longer than a preset duration, and judging whether the transmission rate weight is larger than a first preset threshold or smaller than a second preset threshold when the duration is longer than the preset duration.
Further, the data link assignment program when executed by the processor further implements the steps of:
when the first real-time transmission rate and the second real-time transmission rate are both lower than a preset threshold value, detecting a first working frequency band of the first wireless hotspot and detecting a second working frequency band of the second wireless hotspot;
when the first working frequency band is 2.4G and the second working frequency band is 5G, controlling the mobile terminal to disconnect the first wireless hotspot and establish connection with the second wireless hotspot through the first WiFi antenna;
and when the first working frequency band is 5G and the second working frequency band is 2.4G, the mobile terminal is controlled to be disconnected from the second wireless hotspot and is connected with the first wireless hotspot through the second WiFi antenna.
Further, the data link assignment program when executed by the processor further implements the steps of:
detecting a signal strength of the first wireless hotspot when a number of data links are detected;
when the signal intensity is in a first preset interval, setting a wireless hotspot carrying the data links as the first wireless hotspot, and transmitting the data links based on the first data channel;
when the signal intensity is in a second preset interval, setting the wireless hot spot carrying the plurality of data links as the first wireless hot spot and the second wireless hot spot, and calculating the distribution ratio of the initial data links according to the quantity of the plurality of data links;
and allocating the data link to the first data channel and the second data channel according to the initial data link allocation ratio for transmission, detecting a first real-time transmission rate of the first data channel, and detecting a second real-time transmission rate of the second data channel.
Further, the data link assignment program when executed by the processor further implements the steps of:
and when the signal intensity is in a third preset interval, setting the wireless hotspot carrying the data links as the second wireless hotspot, and transmitting the data links based on the second data channel.
The embodiment of the mobile terminal of the present invention is basically the same as the following embodiments of the data link allocation method, and will not be described herein again.
Further, the present invention also provides a data link allocation method applied to the mobile terminal shown in fig. 1, referring to fig. 3, fig. 3 is a flowchart illustrating a first embodiment of the data link allocation method according to the present invention.
In this embodiment, the data link allocation method includes:
step S101, detecting a first real-time transmission rate of the first data channel and detecting a second real-time transmission rate of the second data channel;
step S102, calculating a first average transmission rate according to a preset smoothing algorithm and the first real-time transmission rate, and calculating a second average transmission rate according to the preset smoothing algorithm and the second real-time transmission rate;
the data link allocation method is applied to the mobile terminal shown in fig. 1, and based on the foregoing description about the hardware structure of the mobile terminal, in this embodiment, the mobile terminal further includes a first WiFi antenna and a second WiFi antenna, the WiFi module 102 can be connected to two wireless hotspots through the first WiFi antenna and the second WiFi antenna at the same time, the WiFi module 102 establishes connection with the first wireless hotspot through the first WiFi antenna based on the first MAC address, the WiFi module 102 establishes connection with the second wireless hotspot through the second WiFi antenna based on the second MAC address, and in the process of establishing connection between the WiFi module 102 and the first wireless hotspot, a first data channel is established, and in the process of establishing connection between the WiFi module 102 and the second wireless hotspot, a second data channel is established.
The working frequency band of the first wireless hotspot is a first frequency band, the working frequency band of the second wireless hotspot is a second frequency band, and the second frequency band is 5G when the first frequency band is 2.4G, or the second frequency band is 2.4G when the first frequency band is 5G. For example, after establishing a connection with a wireless hotspot operating in the 2.4G frequency band, the WiFi module 102 of the mobile terminal defaults to establish a connection with another wireless hotspot operating in the 5G frequency band. It should be noted that, in other embodiments, the WiFi module 102 of the mobile terminal may simultaneously connect two wireless hotspots operating in the 2.4G frequency band, or may simultaneously connect two wireless hotspots operating in the 5G frequency band.
The user opens the double data channels of the mobile terminal, starts the data link concurrency function, at this time, when the mobile terminal detects a plurality of data links generated by the upper layer application, the number of the data links of the plurality of data links is calculated, the initial data link distribution ratio is determined and calculated according to the number of the data links, and after the initial data link distribution ratio is determined, the mobile terminal distributes the plurality of data links generated by the upper layer application to the first data channel and the second data channel for transmission based on the initial data link distribution ratio. Assuming that the initial data link allocation ratio is weight _ ratio and the number of data links is n, the relationship between the initial data link allocation ratio and the number of data links may be represented as weight _ ratio ═ 2 (n + n% 2)/2: [ n- (n + n% 2)/2], for example, if the number of newly created data links is 4, the initial data link allocation ratio weight _ ratio is 4+ 4% 2)/2: [4- (4+ 4% 2)/2] ═ 1:1, for example, if the number of newly created data links is 7, the initial data link allocation ratio weight _ ratio is 7+ 7% 2)/2: [7- (7+ 7% 2)/2 ]: 4: 3.
Referring to fig. 4, as shown in fig. 4, if the number of the newly created data links of the upper layer application is 5, the initial data link allocation ratio of the first data channel to the second data channel is 3:2, where the 5 data links are respectively a data link a, a data link B, a data link C, a data link D, and a data link E, and then the first data channel is allocated 3 data links which are respectively a data link a, a data link B, and a data link C, and the second data channel is allocated 2 data links which are respectively a data link D and a data link E.
When the mobile terminal transmits a data link based on two data channels, detecting a first real-time transmission rate of the first data channel and a second real-time transmission rate of the second data channel, then calculating a first average transmission rate of the first data channel according to a preset smoothing algorithm and the first real-time transmission rate, and calculating a second average transmission rate of the second data channel according to the preset smoothing algorithm and the second real-time transmission rate, setting the first real-time transmission rate and the second real-time transmission rate as wlan1_ cur _ speed and wlan2_ cur _ speed respectively, setting the first average transmission rate and the second average transmission rate as wlan1_ avg and wlan2_ avg respectively, setting a historical average transmission rate of the first data channel as wlan1_ old _ avg, and setting a historical average transmission rate of the second data channel as wlan2_ old _ avg, the preset smoothing algorithm may be expressed as: wlan _ avg ═ wlan _ old _ avg ═ a + wlan _ cur _ speed ═ B, where a >0, B >0, and a + B ═ 1, in this embodiment, a ═ 0.8, and B ═ 0.2, then the first average transmission rate is expressed as: the wlan1_ avg ═ wlan1_ old _ avg 0.8+ wlan1_ cur _ speed 0.2, and this second average transmission rate can be expressed as: wlan2_ avg ═ wlan2_ old _ avg 0.8+ wlan2_ cur _ speed 0.2. It should be noted that the historical average transmission rate is stored in a register, and the initial value is zero, when the average transmission rate is obtained through calculation, the historical average transmission rate in the register is replaced by the average transmission rate obtained through calculation, and the values of a and B may be set by those skilled in the art according to actual situations, which is not limited in this embodiment. For example, assuming that the wlan1_ old _ avg is 150bps, the wlan1_ cur _ speed is 140bps, the wlan2_ old _ avg is 160bps, and the wlan2_ cur _ speed is 130bps, the first average transmission rate wlan1_ avg is 150 × 0.8+140 ═ 0.2 ═ 148bps, and the second average transmission rate wlan2_ avg is 160.8 +130 ═ 0.2 ═ 154 bps.
Step S103, calculating the data link distribution ratio of the first data channel and the second data channel according to the first average transmission rate and the second average transmission rate;
after the first average transmission rate and the second average transmission rate are obtained through calculation, the mobile terminal calculates the data link allocation ratio of the first data channel and the second data channel according to the first average transmission rate and the second average transmission rate.
Specifically, referring to fig. 5, fig. 5 is a detailed flowchart of step S103 shown in fig. 3, where the step S103 includes:
step S1031, calculating the transmission rate weight of the first data channel according to the first average transmission rate and the second average transmission rate;
step S1032, determining a data link allocation ratio of the first data channel and the second data channel according to the transmission rate weight.
After the first average transmission rate and the second average transmission rate are obtained through calculation, the mobile terminal calculates a transmission rate weight of a first data channel according to the first average transmission rate and the second average transmission rate, specifically, adds the first average transmission rate and the second average transmission rate to obtain a total average transmission rate, and then calculates a ratio of the first average transmission rate to the total average transmission rate, where the ratio is the transmission rate weight of the first data channel, and the transmission rate weight is wlan _ speed _ ratio, and the transmission rate weight may be represented as: wlan _ speed _ ratio is wlan1_ avg/(wlan1_ avg + wlan2_ avg). For example, if the first average transmission rate wlan1_ avg is 150bps and the second average transmission rate wlan2_ avg is 120bps, the transmission rate weight is 5/9.
After calculating the transmission rate weight of the first data channel, determining the data link allocation ratio of the first data channel and the second data channel according to the transmission rate weight, specifically, when the transmission rate weight of the first data channel is greater than a first preset threshold, that is, wlan _ speed _ ratio >0.7, setting the first preset data link allocation ratio as the data link allocation ratio of the first data channel and the second data channel, that is, weight _ ratio is 1: 0; when the transmission rate weight of the first data channel is less than a second preset threshold value, namely wlan _ speed _ ratio <0.3, setting a second preset data link allocation ratio as the data link allocation ratio of the first data channel and the second data channel, namely weight _ ratio is 0: 1; when the transmission rate weight of the first data channel is less than or equal to a first preset threshold and is greater than or equal to a second preset threshold, namely wlan _ speed _ ratio is less than or equal to 0.7 and wlan _ speed _ ratio is greater than or equal to 0.3, calculating the transmission rate weight of the second data channel according to the first average transmission rate and the second average transmission rate, namely adding the first average transmission rate and the second average transmission rate to obtain a total average transmission rate, then calculating the ratio of the second average transmission rate to the total average transmission rate, wherein the ratio is the transmission rate weight of the second data channel, and setting the ratio of the transmission rate weight of the first data channel to the transmission rate weight of the second data channel as the data link allocation ratio of the first data channel and the second data channel.
For example, if the first average transmission rate wlan1_ avg is 150bps, the second average transmission rate wlan2_ avg is 120bps, the transmission rate weight of the first data channel is 5/9, and the transmission rate weight of the second data channel is 4/9, the ratio of the transmission rate weight of the first data channel to the transmission rate weight of the second data channel is 5:4, and the data link allocation ratio of the first data channel to the second data channel is 5: 4. It should be noted that the first preset threshold, the second preset threshold, the first preset data link allocation ratio, and the second preset data link allocation ratio may be set by those skilled in the art according to actual situations, and this embodiment is not limited in this respect.
When detecting a newly-built data link applied by an upper layer, the mobile terminal allocates a first data channel and a second data channel for transmission to the newly-built data link according to the data link allocation ratio, for example, if the number of the data links of the newly-built data link applied by the upper layer is 9 and the data link allocation ratio is 5:4, 5 of the data links are allocated to the first data channel for transmission, and the remaining 4 data links are allocated to the second data channel for transmission. Referring to fig. 6, as shown in fig. 6, the number of data links newly established by the upper layer application is 5, the data link allocation ratio is 4:1, and the 5 data links are respectively data link 1, data link 2, data link 3, data link 4 and data link 5, then the first data channel is allocated with 4 data links which are respectively data link 1, data link 2, data link 3 and data link 4, and the second data channel is allocated with 1 data link which is data link 5.
In this embodiment, for a mobile terminal including two WiFi antennas and two data channels, when two wireless hotspots are connected simultaneously, the two data channels transmit a data link generated by an upper layer application, the mobile terminal detects a real-time transmission rate of the two data channels transmitting the data link, calculates an average transmission rate of the two data channels based on the detected real-time transmission rate and a preset smoothing algorithm, and then determines a data link distribution ratio of the two data channels according to the average transmission rate of the two data channels, so that when a new data link is detected by the upper layer application, the new data link distribution ratio of the upper layer application is transmitted to the two data channels based on the determined data link distribution ratio, and the data link distribution ratio is adjusted by the transmission rates of the two data channels, so as to effectively ensure data balance of the two data channels, and the network access efficiency is improved.
Further, referring to fig. 7, a second embodiment of the data link allocation method of the present invention is proposed based on the above first embodiment, and the difference from the foregoing embodiment is that the step S1032 includes:
step S10321, determining whether both the first real-time transmission rate and the second real-time transmission rate are lower than a preset threshold;
step S10322, when both the first real-time transmission rate and the second real-time transmission rate are lower than a preset threshold, determining whether the transmission rate weight is greater than a first preset threshold or less than a second preset threshold;
step S10323, when the transmission rate weight is greater than a first preset threshold or smaller than a second preset threshold, setting a third preset data link allocation ratio as the data link allocation ratio of the first data channel and the second data channel.
It should be noted that the present invention proposes a specific determination method of the data link allocation ratio based on the foregoing embodiments, and only this will be described below, and other references may be made to the foregoing embodiments.
After the transmission rate weight of the first data channel is obtained through calculation, whether the first real-time transmission rate and the second real-time transmission rate are both lower than a preset threshold value or not is judged, if the first real-time transmission rate and the second real-time transmission rate are both lower than the preset threshold value, whether the transmission rate weight of the first data channel is larger than the first preset threshold value or smaller than the second preset threshold value or not is judged, and if the transmission rate weight of the first data channel is larger than the first preset threshold value or smaller than the second preset threshold value, a third preset data link distribution ratio is set as the data link distribution ratio of the first data channel and the second data channel, namely, the weight _ ratio is 7: 3. It should be noted that the third preset data link allocation ratio can be set by those skilled in the art according to actual situations, and this is not described in this embodiment.
In this embodiment, in the case that the transmission rates of the two data channels are both poor, the present invention performs data link allocation of the two data channels according to a preset data link allocation ratio, and changes the preferred scheme into a concurrent scheme by force to increase the bandwidth and improve the transmission efficiency.
Further, based on the second embodiment, a third embodiment of the data link allocation method of the present invention is proposed, which is different from the foregoing embodiments in that after step S10321, the method further includes:
when the first real-time transmission rate and the second real-time transmission rate are both lower than a preset threshold value, recording the duration of the first real-time transmission rate and the second real-time transmission rate which are both lower than the preset threshold value;
and judging whether the duration is longer than a preset duration, and executing the step S10322 when the duration is longer than the preset duration, that is, judging whether the transmission rate weight is greater than a first preset threshold or less than a second preset threshold.
After calculating the transmission rate weight of the first data channel, the mobile terminal judges whether the first real-time transmission rate and the second real-time transmission rate are both lower than a preset threshold, if the first real-time transmission rate and the second real-time transmission rate are both lower than the preset threshold, records the duration that the first real-time transmission rate and the second real-time transmission rate are both lower than the preset threshold, and judges whether the duration is longer than the preset duration, if the duration is longer than the preset duration, judges whether the transmission rate weight of the first data channel is larger than the first preset threshold or smaller than the second preset threshold, if the transmission rate weight of the first data channel is larger than the first preset threshold or smaller than the second preset threshold, sets the third preset data link allocation ratio as the data link allocation ratio of the first data channel and the second data channel, namely, weight _ ratio is 7: 3.
In this embodiment, when both the first real-time transmission rate and the second real-time transmission rate are lower than the preset threshold, it is further verified whether the duration of the low-rate transmission state is longer than the preset duration, thereby preventing a ping-pong effect in communication and ensuring the transmission rates of the two data channels.
Further, based on the second or third embodiment, a fourth embodiment of the data link allocation method of the present invention is proposed, which is different from the foregoing embodiment in that after step S10321, the method further includes:
when the first real-time transmission rate and the second real-time transmission rate are both lower than a preset threshold value, detecting a first working frequency band of a first wireless hotspot and detecting a second working frequency band of a second wireless hotspot;
when the first working frequency band is 2.4G and the second working frequency band is 5G, controlling the mobile terminal to disconnect the first wireless hotspot and establish connection with the second wireless hotspot through the first WiFi antenna;
and when the first working frequency band is 5G and the second working frequency band is 2.4G, the mobile terminal is controlled to be disconnected from the second wireless hotspot and is connected with the first wireless hotspot through the second WiFi antenna.
After calculating the transmission rate weight of the first data channel, the mobile terminal judges whether the first real-time transmission rate and the second real-time transmission rate are both lower than a preset threshold, and if the first real-time transmission rate and the second real-time transmission rate are both lower than the preset threshold, a first working frequency band of the first wireless hotspot is detected, and a second working frequency band of the second wireless hotspot is detected; and when the first working frequency band is 2.4G and the second working frequency band is 5G, the mobile terminal is controlled to be disconnected from the second wireless hotspot and to be connected with the first wireless hotspot through a second WiFi antenna, and when the first working frequency band is 5G and the second working frequency band is 2.4G, the mobile terminal is controlled to be disconnected from the second wireless hotspot and to be connected with the first wireless hotspot through a second WiFi antenna.
In this embodiment, when both the first real-time transmission rate and the second real-time transmission rate are lower than the preset threshold, the transmission rates of the two data channels are increased by transmitting the data link through the dual 5G wireless hot spot.
Further, based on the first, second, third or fourth embodiment, a fifth embodiment of the data link allocation method of the present invention is provided, which is different from the foregoing embodiment in that before step S101, the method further includes:
detecting a signal strength of the first wireless hotspot when a number of data links are detected;
when the signal intensity is in a first preset interval, setting a wireless hotspot carrying the data links as the first wireless hotspot, and transmitting the data links based on the first data channel;
when the signal intensity is in a second preset interval, setting the wireless hot spot carrying the plurality of data links as the first wireless hot spot and the second wireless hot spot, and calculating the distribution ratio of the initial data links according to the quantity of the plurality of data links;
and allocating the data link to the first data channel and the second data channel according to the initial data link allocation ratio for transmission, and executing the steps of detecting a first real-time transmission rate of the first data channel and detecting a second real-time transmission rate of the second data channel.
It should be noted that, based on the foregoing embodiments, the present invention provides a scheme for increasing the rate by superimposing the rate of the secondary wireless hotspot when the signal of the primary wireless hotspot is weak, which is only described below, but other parameters may be set in the foregoing embodiments.
The working frequency band of the first wireless hotspot is 5G, the working frequency band of the second wireless hotspot is 2.4G, the first wireless hotspot is used as a main wireless hotspot, the second wireless hotspot is used as an auxiliary wireless hotspot, and therefore when the mobile terminal detects that a plurality of newly-built data links are applied to an upper layer, the main wireless hotspot is detected, namely the signal intensity of the first wireless hotspot is detected, then a specific data transmission scheme is determined according to a preset interval where the signal intensity is located, specifically, the signal intensity is set to be level, when the signal intensity is in the first preset interval, namely, the level is less than 0dbm and the level is-60 dbm, the signal quality of the main wireless hotspot is indicated to be excellent, the main wireless hotspot is used for data transmission, namely, the wireless hotspot carrying the plurality of data links is set as the first wireless hotspot, and the plurality of data links are transmitted based on the first data channel; when the signal intensity is in a second preset interval, namely, the level is less than-60 dbm and the level is less than-80 dbm, if the signal quality of the main wireless hotspot is poor, calling a dual-channel data superposition routing script to carry out dual-channel data rate superposition, namely, setting wireless hotspots carrying a plurality of data links as a first wireless hotspot and a second wireless hotspot, calculating the distribution ratio of the initial data links according to the quantity of the data links, the data link is then allocated to the first data channel and second data channel transmissions according to the initial data link allocation ratio, detecting a first real-time transmission rate of a first data channel and a second real-time transmission rate of a second data channel while transmitting a data link, and adjusting the distribution ratio of the initial data link based on the first real-time transmission rate and the second real-time transmission rate, and distributing the subsequently newly-built data link according to the adjusted distribution ratio of the data link.
Optionally, in this embodiment, after the step of detecting the signal strength of the first wireless hotspot, the method further includes:
and when the signal intensity is in a third preset interval, setting the wireless hotspot carrying the data links as the second wireless hotspot, and transmitting the data links based on the second data channel.
When the signal strength is in a third preset interval, namely level < -80dbm, the signal quality of the main wireless hotspot is poor, so that the wireless hotspot carrying the data links is set as a second wireless hotspot, and the data links are transmitted based on a second data channel.
In this embodiment, the method and the device can determine whether the concurrent function of the dual data channels is started or not based on the signal quality of the main wireless hotspot, and pay more attention to the consideration of power consumption in the process of ensuring good internet surfing experience of a user.
In addition, an embodiment of the present invention further provides a mobile terminal using a computer-readable storage medium, where the mobile terminal includes a first WiFi antenna and a second WiFi antenna, the mobile terminal establishes a connection with a first wireless hotspot through the first WiFi antenna, establishes a first data channel, establishes a connection with a second wireless hotspot through the second WiFi antenna, and establishes a second data channel, where a data link allocation program is stored in the computer-readable storage medium, and when executed by a processor, the data link allocation program implements the following steps:
detecting a first real-time transmission rate of the first data channel and detecting a second real-time transmission rate of the second data channel;
calculating a first average transmission rate according to a preset smoothing algorithm and the first real-time transmission rate, and calculating a second average transmission rate according to the preset smoothing algorithm and the second real-time transmission rate;
and calculating the data link distribution ratio of the first data channel and the second data channel according to the first average transmission rate and the second average transmission rate.
Further, the data link assignment program when executed by the processor further implements the steps of:
calculating a transmission rate weight of the first data channel according to the first average transmission rate and the second average transmission rate;
and determining the data link distribution ratio of the first data channel and the second data channel according to the transmission rate weight.
Further, the data link assignment program when executed by the processor further implements the steps of:
when the transmission rate weight is greater than a first preset threshold value, setting a first preset data link distribution ratio as a data link distribution ratio of the first data channel and the second data channel;
when the transmission rate weight is smaller than a second preset threshold value, setting a second preset data link distribution ratio as the data link distribution ratio of the first data channel and the second data channel;
when the transmission rate weight is smaller than or equal to a first preset threshold and larger than or equal to a second preset threshold, calculating the transmission rate weight of the second data channel according to the first average transmission rate and the second average transmission rate;
setting the ratio of the transmission rate weight of the first data channel to the transmission rate weight of the second data channel as the data link allocation ratio of the first data channel and the second data channel.
Further, the data link assignment program when executed by the processor further implements the steps of:
judging whether the first real-time transmission rate and the second real-time transmission rate are both lower than a preset threshold value;
when the first real-time transmission rate and the second real-time transmission rate are both lower than a preset threshold, judging whether the transmission rate weight is larger than a first preset threshold or smaller than a second preset threshold;
and when the transmission rate weight is greater than a first preset threshold or less than a second preset threshold, setting a third preset data link distribution ratio as the data link distribution ratio of the first data channel and the second data channel.
Further, the data link assignment program when executed by the processor further implements the steps of:
when the first real-time transmission rate and the second real-time transmission rate are both lower than a preset threshold value, recording the duration of the first real-time transmission rate and the second real-time transmission rate which are both lower than the preset threshold value;
and judging whether the duration is longer than a preset duration, and judging whether the transmission rate weight is larger than a first preset threshold or smaller than a second preset threshold when the duration is longer than the preset duration.
Further, the data link assignment program when executed by the processor further implements the steps of:
when the first real-time transmission rate and the second real-time transmission rate are both lower than a preset threshold value, detecting a first working frequency band of the first wireless hotspot and detecting a second working frequency band of the second wireless hotspot;
when the first working frequency band is 2.4G and the second working frequency band is 5G, controlling the mobile terminal to disconnect the first wireless hotspot and establish connection with the second wireless hotspot through the first WiFi antenna;
and when the first working frequency band is 5G and the second working frequency band is 2.4G, the mobile terminal is controlled to be disconnected from the second wireless hotspot and is connected with the first wireless hotspot through the second WiFi antenna.
Further, the data link assignment program when executed by the processor further implements the steps of:
detecting a signal strength of the first wireless hotspot when a number of data links are detected;
when the signal intensity is in a first preset interval, setting a wireless hotspot carrying the data links as the first wireless hotspot, and transmitting the data links based on the first data channel;
when the signal intensity is in a second preset interval, setting the wireless hot spot carrying the plurality of data links as the first wireless hot spot and the second wireless hot spot, and calculating the distribution ratio of the initial data links according to the quantity of the plurality of data links;
and allocating the data link to the first data channel and the second data channel according to the initial data link allocation ratio for transmission, detecting a first real-time transmission rate of the first data channel, and detecting a second real-time transmission rate of the second data channel.
Further, the data link assignment program when executed by the processor further implements the steps of:
and when the signal intensity is in a third preset interval, setting the wireless hotspot carrying the data links as the second wireless hotspot, and transmitting the data links based on the second data channel.
The specific embodiment of the computer-readable storage medium of the present invention is substantially the same as the specific embodiments of the data link allocation method described above, and will not be described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system 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 system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (9)

1. A data link distribution method is applied to a mobile terminal, the mobile terminal comprises a first WiFi antenna and a second WiFi antenna, the mobile terminal is connected with a first wireless hotspot through the first WiFi antenna to build a first data channel, and is connected with a second wireless hotspot through the second WiFi antenna to build a second data channel, and the data link distribution method comprises the following steps:
when detecting that an upper layer application generates an initial data link, determining the number of the data links of the initial data link;
calculating an initial data link distribution ratio according to the number of the data links;
allocating the initial data link to the first data channel and the second data channel for transmission according to the initial data link allocation ratio;
detecting a first real-time transmission rate of the first data channel and detecting a second real-time transmission rate of the second data channel;
calculating a first average transmission rate according to a preset smoothing algorithm and the first real-time transmission rate, and calculating a second average transmission rate according to the preset smoothing algorithm and the second real-time transmission rate;
calculating a data link distribution ratio of the first data channel and the second data channel according to the first average transmission rate and the second average transmission rate;
the relationship between the initial data link allocation ratio and the number of data links comprises:
weight_ratio=(n+n%2)/2:[n-(n+n%2)/2];
wherein, weight _ ratio is the initial data link distribution ratio, and n is the number of data links;
the method comprises the following steps of detecting a first real-time transmission rate of a first data channel and a second real-time transmission rate of a second data channel, wherein the working frequency band of the first wireless hotspot is 5G, the working frequency band of the second wireless hotspot is 2.4G, and the method further comprises the following steps of:
detecting a signal strength of the first wireless hotspot when a number of data links are detected;
when the signal intensity is in a first preset interval, setting a wireless hotspot carrying the data links as the first wireless hotspot, and transmitting the data links based on the first data channel;
when the signal intensity is in a second preset interval, setting the wireless hot spot carrying the plurality of data links as the first wireless hot spot and the second wireless hot spot, and calculating the distribution ratio of the initial data links according to the quantity of the plurality of data links;
and allocating the data link to the first data channel and the second data channel according to the initial data link allocation ratio for transmission, and executing the steps of detecting a first real-time transmission rate of the first data channel and detecting a second real-time transmission rate of the second data channel.
2. The data link allocation method of claim 1 wherein said step of calculating a data link allocation ratio for said first and second data channels based on said first and second average transmission rates comprises:
calculating a transmission rate weight of the first data channel according to the first average transmission rate and the second average transmission rate;
and determining the data link distribution ratio of the first data channel and the second data channel according to the transmission rate weight.
3. The data link allocation method of claim 2 wherein said step of determining a data link allocation ratio for said first and second data channels based on said transmission rate weight comprises:
when the transmission rate weight is greater than a first preset threshold value, setting a first preset data link distribution ratio as a data link distribution ratio of the first data channel and the second data channel;
when the transmission rate weight is smaller than a second preset threshold value, setting a second preset data link distribution ratio as the data link distribution ratio of the first data channel and the second data channel;
when the transmission rate weight is smaller than or equal to a first preset threshold and larger than or equal to a second preset threshold, calculating the transmission rate weight of the second data channel according to the first average transmission rate and the second average transmission rate;
setting the ratio of the transmission rate weight of the first data channel to the transmission rate weight of the second data channel as the data link allocation ratio of the first data channel and the second data channel.
4. The data link allocation method of claim 2 wherein said step of determining a data link allocation ratio for said first and second data channels based on said transmission rate weight further comprises:
judging whether the first real-time transmission rate and the second real-time transmission rate are both lower than a preset threshold value;
when the first real-time transmission rate and the second real-time transmission rate are both lower than a preset threshold, judging whether the transmission rate weight is larger than a first preset threshold or smaller than a second preset threshold;
and when the transmission rate weight is greater than a first preset threshold or less than a second preset threshold, setting a third preset data link distribution ratio as the data link distribution ratio of the first data channel and the second data channel.
5. The method for allocating data links according to claim 4, wherein after the step of determining whether the first real-time transmission rate and the second real-time transmission rate are both lower than a preset threshold, the method further comprises:
when the first real-time transmission rate and the second real-time transmission rate are both lower than a preset threshold value, recording the duration of the first real-time transmission rate and the second real-time transmission rate which are both lower than the preset threshold value;
and judging whether the duration is longer than a preset duration, and when the duration is longer than the preset duration, executing the step of judging whether the transmission rate weight is larger than a first preset threshold or smaller than a second preset threshold.
6. The method according to claim 4 or 5, wherein after the step of determining whether the first real-time transmission rate and the second real-time transmission rate are both lower than a preset threshold, the method further comprises:
when the first real-time transmission rate and the second real-time transmission rate are both lower than a preset threshold value, detecting a first working frequency band of the first wireless hotspot and detecting a second working frequency band of the second wireless hotspot;
when the first working frequency band is 2.4G and the second working frequency band is 5G, controlling the mobile terminal to disconnect the first wireless hotspot and establish connection with the second wireless hotspot through the first WiFi antenna;
and when the first working frequency band is 5G and the second working frequency band is 2.4G, the mobile terminal is controlled to be disconnected from the second wireless hotspot and is connected with the first wireless hotspot through the second WiFi antenna.
7. The method for data link assignment as claimed in claim 1, wherein the step of detecting the signal strength of the first wireless hotspot is followed by further comprising:
and when the signal intensity is in a third preset interval, setting the wireless hotspot carrying the data links as the second wireless hotspot, and transmitting the data links based on the second data channel.
8. A mobile terminal, characterized in that the mobile terminal comprises: the mobile terminal is connected with a first wireless hotspot through the first WiFi antenna, a first data channel is built, a second data channel is built through connection between the second WiFi antenna and a second wireless hotspot, the mobile terminal further comprises a data link distribution program which is stored on the memory and can run on the processor, and the data link distribution program realizes the following steps when executed by the processor:
when detecting that an upper layer application generates an initial data link, determining the number of the data links of the initial data link;
calculating an initial data link distribution ratio according to the number of the data links;
allocating the initial data link to the first data channel and the second data channel for transmission according to the initial data link allocation ratio;
detecting a first real-time transmission rate of the first data channel and detecting a second real-time transmission rate of the second data channel;
calculating a first average transmission rate according to a preset smoothing algorithm and the first real-time transmission rate, and calculating a second average transmission rate according to the preset smoothing algorithm and the second real-time transmission rate;
calculating the data link distribution ratio of the first data channel and the second data channel according to the first average transmission rate and the second average transmission rate;
the relationship between the initial data link allocation ratio and the number of data links comprises:
weight_ratio=(n+n%2)/2:[n-(n+n%2)/2];
wherein, weight _ ratio is the initial data link distribution ratio, and n is the number of data links;
the method comprises the following steps of detecting a first real-time transmission rate of a first data channel and a second real-time transmission rate of a second data channel, wherein the working frequency band of the first wireless hotspot is 5G, the working frequency band of the second wireless hotspot is 2.4G, and the method further comprises the following steps of:
detecting a signal strength of the first wireless hotspot when a number of data links are detected;
when the signal intensity is in a first preset interval, setting a wireless hotspot carrying the data links as the first wireless hotspot, and transmitting the data links based on the first data channel;
when the signal intensity is in a second preset interval, setting the wireless hot spot carrying the plurality of data links as the first wireless hot spot and the second wireless hot spot, and calculating the distribution ratio of the initial data links according to the quantity of the plurality of data links;
and allocating the data link to the first data channel and the second data channel according to the initial data link allocation ratio for transmission, and executing the steps of detecting a first real-time transmission rate of the first data channel and detecting a second real-time transmission rate of the second data channel.
9. A computer readable storage medium is applied to a mobile terminal, and is characterized in that the mobile terminal comprises a first WiFi antenna and a second WiFi antenna, the mobile terminal establishes connection with a first wireless hotspot through the first WiFi antenna to establish a first data channel, and establishes connection with a second wireless hotspot through the second WiFi antenna to establish a second data channel, a data link allocation program is stored on the computer readable storage medium, and when being executed by a processor, the data link allocation program realizes the following steps:
when detecting that an upper layer application generates an initial data link, determining the number of the data links of the initial data link;
calculating an initial data link distribution ratio according to the number of the data links;
allocating the initial data link to the first data channel and the second data channel for transmission according to the initial data link allocation ratio;
detecting a first real-time transmission rate of the first data channel and detecting a second real-time transmission rate of the second data channel;
calculating a first average transmission rate according to a preset smoothing algorithm and the first real-time transmission rate, and calculating a second average transmission rate according to the preset smoothing algorithm and the second real-time transmission rate;
calculating the data link distribution ratio of the first data channel and the second data channel according to the first average transmission rate and the second average transmission rate;
the relationship between the initial data link allocation ratio and the number of data links comprises:
weight_ratio=(n+n%2)/2:[n-(n+n%2)/2];
wherein, weight _ ratio is the initial data link distribution ratio, and n is the number of data links;
the method comprises the following steps of detecting a first real-time transmission rate of a first data channel and a second real-time transmission rate of a second data channel, wherein the working frequency band of the first wireless hotspot is 5G, the working frequency band of the second wireless hotspot is 2.4G, and the method further comprises the following steps of:
detecting a signal strength of the first wireless hotspot when a number of data links are detected;
when the signal intensity is in a first preset interval, setting a wireless hotspot carrying the data links as the first wireless hotspot, and transmitting the data links based on the first data channel;
when the signal intensity is in a second preset interval, setting the wireless hot spot carrying the plurality of data links as the first wireless hot spot and the second wireless hot spot, and calculating the distribution ratio of the initial data links according to the quantity of the plurality of data links;
and allocating the data link to the first data channel and the second data channel according to the initial data link allocation ratio for transmission, and executing the steps of detecting a first real-time transmission rate of the first data channel and detecting a second real-time transmission rate of the second data channel.
CN201710912789.1A 2017-09-29 2017-09-29 Data link allocation method, mobile terminal and computer readable storage medium Active CN107708216B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710912789.1A CN107708216B (en) 2017-09-29 2017-09-29 Data link allocation method, mobile terminal and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710912789.1A CN107708216B (en) 2017-09-29 2017-09-29 Data link allocation method, mobile terminal and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN107708216A CN107708216A (en) 2018-02-16
CN107708216B true CN107708216B (en) 2022-04-22

Family

ID=61175781

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710912789.1A Active CN107708216B (en) 2017-09-29 2017-09-29 Data link allocation method, mobile terminal and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN107708216B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109743285A (en) * 2018-11-28 2019-05-10 视联动力信息技术股份有限公司 A kind of method and system obtaining PCTV resource
CN109495931B (en) * 2018-12-26 2022-06-17 Oppo广东移动通信有限公司 Data transmission method for link aggregation and related device
CN109743712A (en) * 2018-12-29 2019-05-10 Oppo广东移动通信有限公司 Data transfer control method and Related product
CN109803318B (en) * 2019-02-12 2021-01-22 Oppo广东移动通信有限公司 Data packet distribution method and device, mobile terminal and storage medium
CN109862556A (en) * 2019-02-12 2019-06-07 Oppo广东移动通信有限公司 Packet distribution method, device, mobile terminal and storage medium
CN109803325B (en) * 2019-02-12 2020-12-22 Oppo广东移动通信有限公司 Data distribution method and device, mobile terminal and storage medium
CN112040520B (en) * 2020-08-20 2023-02-17 Oppo(重庆)智能科技有限公司 Network switching method, device, terminal equipment and computer storage medium
CN112929409A (en) * 2021-01-20 2021-06-08 努比亚技术有限公司 WIFI data transmission method, terminal and storage medium
CN112867118B (en) * 2021-01-20 2023-04-11 维沃移动通信有限公司 WiFi dual-connection control method and device and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102665142A (en) * 2012-04-05 2012-09-12 浙江大学 Wireless audio and video parallel transmission method with terminal equalization rate
CN104219739A (en) * 2013-05-30 2014-12-17 华为终端有限公司 Communication rate adjusting method and wireless hotspot
CN105656798A (en) * 2016-01-08 2016-06-08 努比亚技术有限公司 Data transmission method and device, multichannel routing method and user equipment
WO2016095416A1 (en) * 2014-12-16 2016-06-23 中兴通讯股份有限公司 Network switching terminal, method, and system
CN105764079A (en) * 2016-02-19 2016-07-13 努比亚技术有限公司 Data transmission method and data transmission device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102665142A (en) * 2012-04-05 2012-09-12 浙江大学 Wireless audio and video parallel transmission method with terminal equalization rate
CN104219739A (en) * 2013-05-30 2014-12-17 华为终端有限公司 Communication rate adjusting method and wireless hotspot
WO2016095416A1 (en) * 2014-12-16 2016-06-23 中兴通讯股份有限公司 Network switching terminal, method, and system
CN105656798A (en) * 2016-01-08 2016-06-08 努比亚技术有限公司 Data transmission method and device, multichannel routing method and user equipment
CN105764079A (en) * 2016-02-19 2016-07-13 努比亚技术有限公司 Data transmission method and data transmission device

Also Published As

Publication number Publication date
CN107708216A (en) 2018-02-16

Similar Documents

Publication Publication Date Title
CN107708216B (en) Data link allocation method, mobile terminal and computer readable storage medium
CN107770814B (en) Data link equalization method, mobile terminal and computer readable storage medium
CN109803325B (en) Data distribution method and device, mobile terminal and storage medium
CN110324859B (en) Method for selecting transmission resource of sidelink, configuration method, terminal and network equipment
WO2018121148A1 (en) Communication resource selection method, hand-held intelligent terminal and access device
EP3624404B1 (en) Method and device for establishing wireless communication connection
WO2017080378A1 (en) Method implementing licensed-assisted access, network equipment, and terminal equipment
CN107580359B (en) Wireless hotspot sharing method, mobile terminal and computer readable storage medium
CN108307432B (en) WiFi control method, mobile terminal and computer-readable storage medium
CN107770841B (en) Hotspot connection method, mobile terminal and computer-readable storage medium
CN108307433B (en) Wireless hotspot sharing method, mobile terminal and computer readable storage medium
CN110365347B (en) Power amplifier control method, device and computer readable storage medium
EP3389314B1 (en) Communication device, and method and apparatus for reducing power consumption of communication device
EP3322230B1 (en) Communication method and device, terminal and base station
CN109890022B (en) Data transmission control method, mobile terminal and computer readable storage medium
WO2021022720A1 (en) Bluetooth-based data transmission method, storage medium and terminal
JP2022500949A (en) Transmission method and related equipment
CN110096375B (en) Method and device for sharing data by application programs and computer readable storage medium
WO2020063222A1 (en) Transmission processing method, terminal and control node
CN111935849A (en) Information processing method, device and storage medium
CN111787542A (en) Service data transmission method, device, storage medium and terminal equipment
US20200359332A1 (en) Power control method, related apparatus, and product
EP3174332B1 (en) Method and terminal for processing concurrent services
WO2017107152A1 (en) Method for determining network standard in wireless communication network, access point apparatus, terminal apparatus and wireless network controller
JP6941673B2 (en) Communication enhancement method and terminal by pressure-sensitive touch

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant