CN116318585A - Data transmission method and device, terminal and storage medium - Google Patents

Data transmission method and device, terminal and storage medium Download PDF

Info

Publication number
CN116318585A
CN116318585A CN202310268133.6A CN202310268133A CN116318585A CN 116318585 A CN116318585 A CN 116318585A CN 202310268133 A CN202310268133 A CN 202310268133A CN 116318585 A CN116318585 A CN 116318585A
Authority
CN
China
Prior art keywords
data transmission
threads
data
transmission channel
bandwidth
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.)
Pending
Application number
CN202310268133.6A
Other languages
Chinese (zh)
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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Shenzhen Huantai Technology Co Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Shenzhen Huantai 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 Guangdong Oppo Mobile Telecommunications Corp Ltd, Shenzhen Huantai Technology Co Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202310268133.6A priority Critical patent/CN116318585A/en
Publication of CN116318585A publication Critical patent/CN116318585A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L5/00Arrangements affording multiple use of the transmission path
    • H04L5/0001Arrangements for dividing the transmission path
    • H04L5/0003Two-dimensional division
    • H04L5/0005Time-frequency
    • H04L5/0007Time-frequency the frequencies being orthogonal, e.g. OFDM(A), DMT
    • H04L5/001Time-frequency the frequencies being orthogonal, e.g. OFDM(A), DMT the frequencies being arranged in component carriers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L5/00Arrangements affording multiple use of the transmission path
    • H04L5/003Arrangements for allocating sub-channels of the transmission path
    • H04L5/0058Allocation criteria
    • H04L5/0064Rate requirement of the data, e.g. scalable bandwidth, data priority
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the application discloses a data transmission method and device, a terminal and a storage medium, wherein the method comprises the following steps: determining the number of threads for transmitting target data, and establishing the number of threads for the target data; detecting the bandwidth of each data transmission channel in N data transmission channels on the terminal, wherein N is a natural number greater than 1; determining the number of threads on each data transmission channel according to the number of threads of the target data and the bandwidth of each data transmission channel; and distributing a corresponding number of threads for each data transmission channel, and controlling the N data transmission channels to simultaneously transmit the target data.

Description

Data transmission method and device, terminal and storage medium
Description of the division
The present application is a divisional application of chinese patent with application date 2020, 11-month 06, application number 202011232397.9, and invention name "data transmission method and apparatus, terminal, storage medium".
Technical Field
The embodiment of the application relates to a communication technology, and relates to a data transmission method and device, a terminal and a storage medium.
Background
At present, internet traffic has been shown to be explosive growth, and more services show great demands for high bandwidth, such as high-definition video streaming media services and the like. Under such circumstances, the conventional transmission method using a single path may not meet the high bandwidth requirement of the service, for example, currently having both a wireless network and an LTE (Long Term Evolution ) network, when the mobile terminal is surfing the internet, the data channel of the wireless network is generally used by default to load data, and the LTE network is turned off. In addition, operators can consider multi-path splitting of traffic when facing huge network traffic, so as to reduce the cost of operation and equipment maintenance.
Accordingly, various schemes have been proposed by those skilled in the art to solve the above problems, for example, the MPTCP (MultiPath TCP) protocol has been proposed to allow a TCP (Transmission Control Protocol ) connection to use multiple paths to maximize the use of channel resources. As another example, a system level SLA (Static Link Aggregation ) is proposed to increase network resource allocation of data by randomly allocating socket connections to data network or WIFI (Wi-Fi, wireless internet) network interfaces and TCP connections to different network cards to establish different physical links. However, these solutions are not satisfactory for practical use by users, because of various problems.
Disclosure of Invention
In view of this, embodiments of the present application provide a data transmission method and apparatus, a terminal, and a storage medium.
The technical scheme of the embodiment of the application is realized as follows:
in a first aspect, an embodiment of the present application provides a data transmission method, where the method includes:
determining the number of threads for transmitting target data, and establishing the number of threads for the target data;
detecting the bandwidth of each data transmission channel in N data transmission channels on the terminal, wherein N is a natural number greater than 1;
determining the number of threads on each data transmission channel according to the number of threads of the target data and the bandwidth of each data transmission channel;
and distributing a corresponding number of threads for each data transmission channel, and controlling the N data transmission channels to simultaneously transmit the target data.
In a second aspect, an embodiment of the present application provides a data transmission apparatus, including:
a first determining unit, configured to determine the number of threads transmitting target data, and establish the number of threads for the target data;
the detection unit is used for detecting the bandwidth of each data transmission channel in N data transmission channels on the terminal, wherein N is a natural number greater than 1;
The second determining unit is used for determining the number of threads on each data transmission channel according to the number of threads of the target data and the bandwidth of each data transmission channel;
and the control unit is used for distributing a corresponding number of threads for each data transmission channel and controlling the N data transmission channels to simultaneously transmit the target data.
In a third aspect, an embodiment of the present application provides a terminal, including a memory and a processor, where the memory stores a computer program executable on the processor, and the processor implements the steps in the data transmission method described above when executing the program.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the data transmission method described above.
The embodiment of the application provides a data transmission method and device, a terminal and a storage medium, wherein the number of threads for transmitting target data is determined, and the number of threads is established for the target data; detecting the bandwidth of each data transmission channel in N data transmission channels on the terminal, wherein N is a natural number greater than 1; determining the number of threads on each data transmission channel according to the number of threads of the target data and the bandwidth of each data transmission channel; distributing a corresponding number of threads for each data transmission channel, and controlling the N data transmission channels to simultaneously transmit the target data, so that the availability of a client network can be increased through a plurality of data transmission channels, and the downloading success rate is improved; meanwhile, the threads for transmitting the data are dynamically distributed for each data transmission channel, so that the data transmission speed is improved, and the time consumption for transmitting the data is reduced.
Drawings
Fig. 1 is a schematic diagram of an implementation flow of a data transmission method according to an embodiment of the present application;
fig. 2 is a second schematic implementation flow chart of the data transmission method in the embodiment of the present application;
fig. 3 is a schematic diagram of an implementation flow of a data transmission method according to an embodiment of the present application;
FIG. 4 is a schematic diagram of three channel download according to an embodiment of the present application;
fig. 5 is a schematic diagram of a system architecture of a terminal device according to an embodiment of the present application;
fig. 6 is a schematic diagram of an implementation flow of connection monitoring in the embodiment of the present application;
fig. 7 is a schematic diagram of an implementation flow of network acquisition in an embodiment of the present application;
FIG. 8 is a schematic diagram of a network architecture for three channel download according to an embodiment of the present application;
fig. 9 is a schematic diagram of connection multiplexing according to an embodiment of the present application;
fig. 10 is a schematic diagram of an allocation model of optimal bandwidth efficiency according to an embodiment of the present application;
fig. 11 is a schematic diagram of a composition structure of a data transmission device according to an embodiment of the present application;
fig. 12 is a schematic diagram of a hardware entity of a terminal according to an embodiment of the present application.
Detailed Description
In general, multipath transmission schemes mainly include the following categories:
(1) MPTCP protocol: MPTCP is a multi-path TCP working group-dominant deterministic protocol for the internet engineering task force that aims to allow TCP connections to use multiple paths to maximize the use of resources. The MPTCP protocol is capable of using multiple physical network channels over a single TCP connection, and MPTCP is compatible with the TCP protocol, so that an application can enjoy the advantages of MPTCP as long as it can run in a TCP environment.
(2) System level SLA: the system level SLA applies unknowingly, by randomly assigning application layer initiated socket connections to a data network or interface, TCP connections to different network cards (i.e., data network and wireless network), and establishing different physical links. In this way, the network resource allocation of the application is increased.
(3) System level dual wireless WIFI scheme: the android device is provided with two physical wireless network cards, and can be connected to a 2.4GHz (gigahertz) and 5GHz AP (Access Point) created by a user or connected to two completely independent APs. The dual wireless WIFI scheme at the system level can randomly allocate socket connections initiated by the application layer to the wireless WIFI network 1 and the wireless WIFI network 2, and establish independent physical links.
However, the above three multipath transmission schemes have the following drawbacks: (1) MPTCP: the TCP implementation of both the client Linux (an operating system) kernel and the server kernel needs to be modified at the same time, so the modification, post iteration and maintenance costs are very high. Moreover, intelligent terminals on the market at present rarely support the MPTCP protocol. For internet services, many services are third party or deployed at cloud service providers, and the difficulty of modifying the kernel to support MPTCP is extremely high, which is also an important reason that there is currently no large-scale business. In the downloading scenario, if a connection with poor quality is randomly allocated, the downloading speed is reduced, and the use experience is affected. (2) System level SLA: the system is unaware of the specific scenario in which the application uses the connection, and randomly allocating the connection can cause unexpected adverse results. For example, on the premise that the WIFI network signal is better and the data network quality is worse, the request connection of a user visible page is allocated to the data network, and a background request connection is allocated to the WIFI network, which can cause long waiting time of the user and even timeout of the interface request, but rather is better than directly using a single WIFI network. Furthermore, the system level SLA has no way to make policy optimization for specific scenarios such as interface requests, downloads, etc., and a simple rough distribution connection may deplete the number of retries of the application, and vice versa. (3) a system-level dual wireless WIFI scheme: like system level SLAs, randomly distributing connections to two WIFI networks may result in slow down of download speeds.
Therefore, the embodiment of the application provides a new data transmission scheme, and the dynamic change of network quality is dealt with by formulating a reasonable and flexible downloading strategy, so that the optimization of the bandwidth utilization rate is realized. Meanwhile, the data transmission scheme in the embodiment of the application jumps out of the limitations and disadvantages of the existing scheme, and exerts the advantages of the application layer SLA so as to realize functions on the premise of not depending on a system and service, thereby being capable of iterating rapidly and flexibly. In addition, the embodiment of the application also defines a bandwidth utilization index so as to achieve the aim of optimizing the downloading speed.
The technical solutions of the present application are further described in detail below with reference to the drawings and examples. It will be apparent that the described embodiments are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments of the present application without making any inventive effort, are intended to be within the scope of the present application.
In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is to be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments and can be combined with one another without conflict.
In the following description, suffixes such as "module", "component", or "unit" for representing elements are used only for facilitating the description of the present application, and are not of specific significance per se. Thus, "module," "component," or "unit" may be used in combination.
It should be noted that the term "first\second\third" in relation to the embodiments of the present application is merely to distinguish similar objects and does not represent a specific ordering for the objects, it being understood that the "first\second\third" may be interchanged in a specific order or sequence, where allowed, to enable the embodiments of the present application described herein to be practiced in an order other than that illustrated or described herein.
The embodiment of the application provides a data transmission method, which is applied to a terminal, and the functions realized by the method can be realized by calling program codes by a processor in the terminal, and the program codes can be stored in a storage medium of the terminal. Fig. 1 is a schematic diagram of an implementation flow of a data transmission method according to an embodiment of the present application, as shown in fig. 1, where the method includes:
step S101, determining the number of threads for transmitting target data, and establishing the number of threads for the target data;
Here, the terminal may be various types of devices having information processing capability, such as a mobile phone, a tablet computer, a notebook computer, a fixed terminal such as a personal computer, a server cluster, and the like, which have information processing capability.
In this embodiment of the present application, the number of threads for transmitting the target data may be determined by the number of cores of a CPU (Central Processing Unit ) of the terminal and the number of data transmission channels included in the terminal. For example, if the number of CPU cores of the terminal is 8 and three data transmission channels are included, the number of threads for transmitting the target data satisfies the following condition, i.e., max (3*n +.8). When n is 2, the value satisfying the formula Max (3*n.ltoreq.8) is maximum, and therefore the number of threads is 3*2 =6 threads. After a target data transmission instruction is acquired, determining the number of threads for transmitting the target data, and then establishing the number of threads for the target data. The purpose of establishing the number of threads is to transfer the target data for multiple threads.
The method comprises the steps that a data downloading scene is used for illustration, when a user clicks a certain link, opens a certain page or downloads a certain file, the terminal receives a corresponding data downloading instruction, immediately obtains the size of target data to be downloaded, determines the number of threads for downloading the target data according to a certain rule, establishes a corresponding number of threads to divide the data to be downloaded into a plurality of data blocks, and each thread is responsible for loading one data block.
Wherein each program running on the system is a process, and the process can be dynamic execution of the whole program or partial program, and each process comprises one thread to a plurality of threads. A thread is a set of instructions, or a special segment of a program, that can be executed independently within the program. Threads correspond to lightweight processes that are responsible for multitasking in a single program, and often for scheduling and execution of multiple threads by an operating system. Multithreading is to enable multiple threads to work in parallel to accomplish multiple tasks to increase the efficiency of the system, where threads are implemented when multiple tasks need to be accomplished at the same time.
Step S102, detecting the bandwidth of each data transmission channel in N data transmission channels on a terminal, wherein N is a natural number greater than 1;
here, the data transmission channels are data transmission channels corresponding to different networks. The different networks may be 2G (2 rd-Generation, second Generation mobile communication technology) data networks, 3G (3 rd-Generation, third Generation mobile communication technology) data networks, 4G (4 rd-Generation, fourth Generation mobile communication technology) data networks or 5G (5 rd-Generation, fifth Generation mobile communication technology) data networks, etc., such as: LTE network, GSM (Global System for Mobile Communications ) network, GPRS (General Packet Radio Service, general packet radio service) network, CDMA (Code Division Multiple Access ) network, EDGE (Enhanced Data Rate for GSM Evolution, strong data rate GSM evolution technology) network, CDMA-2000 network, TD-SCDMA (Time Division-Synchronous Code Division Multiple Access, time Division synchronous code Division multiple access) network, WCDMA (Wideband Code Division Multiple Access ) network, and the like. Of course, a wireless network, such as a WIFI network, a WLAN (Wireless Local Area Networks, wireless local area network) network, or the like, is also possible. In the embodiment of the present application, the network type corresponding to the data transmission channel is not limited.
Each network on the terminal corresponds to a data transmission channel, and the bandwidth of each network is different, and the networks with different bandwidths correspond to different transmission speeds. The bandwidth may be used to identify the data transmission capabilities of the signal, to identify the amount of data that passes through the link per unit time, to identify the display capabilities of the display. In practical applications, different networks have different bandwidths, and the actual bandwidth of the same network also varies in real time. Therefore, in the embodiment of the application, the bandwidths on different networks can be monitored in real time, and the bandwidths on different networks can be detected according to the preset time interval. For example, the bandwidth on different networks is detected every 10 seconds.
Step S103, determining the number of threads on each data transmission channel according to the number of threads of the target data and the bandwidth of each data transmission channel;
for example, when a user downloads a certain file, the terminal receives a corresponding data downloading instruction, then obtains the size of target data to be downloaded, determines the number of threads for downloading the target data according to the number of CPU cores and the like, detects the bandwidths of a plurality of available networks on the terminal, and determines the number of threads on a corresponding network (i.e., a corresponding data transmission channel) according to the number of threads and the bandwidth of a certain network.
Step S104, a corresponding number of threads are allocated to each data transmission channel, and the N data transmission channels are controlled to simultaneously transmit the target data.
Here, the step S104 of allocating a corresponding number of threads to each data transmission channel refers to allocating the number of threads to the corresponding network (i.e. data transmission channel) according to the number of threads determined in the step S103.
In this embodiment of the present application, the terminal controls each thread to establish connection with the server through a respective data transmission channel, and the N data transmission channels perform data transmission simultaneously. Thus, the downloading speed of the target data can be increased, and the downloading time of the target data can be reduced.
In some embodiments, link aggregation corresponding to the N data transmission channels is implemented at an application layer of the terminal.
In some embodiments, the terminal comprises: the data transmission channel corresponding to the data network, the data transmission channel corresponding to the first wireless network and the data transmission channel corresponding to the second wireless network.
In this embodiment of the present application, the number of threads on each data transmission channel is determined according to the number of threads of the target data and the bandwidth of each data transmission channel; and distributing a corresponding number of threads for each data transmission channel, and controlling the N data transmission channels to simultaneously transmit the target data, so that a reasonable number of transmission threads can be distributed for each data transmission channel according to the dynamic change of network quality, thereby realizing multi-channel data transmission, improving the data transmission speed, and optimizing the bandwidth utilization rate of the network.
Based on the foregoing embodiments, the embodiments of the present application further provide a data transmission method, and fig. 2 is a schematic diagram of a second implementation flow of the data transmission method of the embodiments of the present application, as shown in fig. 2, where the method includes:
step S201, determining the number of threads for transmitting target data, and establishing the number of threads for the target data;
step S202, detecting the bandwidth of each data transmission channel in N data transmission channels on a terminal, wherein N is a natural number greater than 1;
step 203, determining the number of threads on each data transmission channel according to the number of threads of the target data and the bandwidth of each data transmission channel;
step S204, distributing a corresponding number of threads for each data transmission channel, and controlling the N data transmission channels to simultaneously transmit the target data;
step S205, in the transmission process of the target data, detecting the bandwidth of each data transmission channel in the N data transmission channels according to a preset time interval to obtain a detection result;
in practical applications, not only the bandwidths of different data transmission channels are different, but also the bandwidths of the same data transmission channel at different times may be different. Therefore, in the embodiment of the present application, based on the dynamic method, after each preset time interval, the bandwidth of each data transmission channel in the N data transmission channels is detected, and according to the detection result, the steps S202 to S204 are re-executed, and the number of threads on each data transmission channel is re-calculated and allocated. For example, the bandwidth of each data transmission channel may be re-detected every 10 seconds, and the amount of bandwidth to be allocated on each data transmission channel may be re-calculated according to the new detection result.
Step S206, according to the detection result, the number of the threads allocated to each data transmission channel is adjusted.
In the embodiment of the application, the bandwidth of each data transmission channel in the N data transmission channels is detected according to a preset time interval by a dynamic detection method, and the number of the threads allocated to each data transmission channel is adjusted according to the detection result, so that the real-time and reasonable downloading strategy can be customized according to the dynamic change of the network quality, and the purposes of the fastest downloading speed, the shortest downloading time and the highest bandwidth utilization rate are achieved.
Based on the foregoing embodiments, embodiments of the present application further provide a data transmission method, where the method includes:
step S211, determining the number of threads for transmitting target data, and establishing the number of threads for the target data;
step S212, detecting the bandwidth of each data transmission channel in N data transmission channels on the terminal, wherein N is a natural number greater than 1;
step S213, determining the number of threads on each data transmission channel according to the number of threads of the target data and the bandwidth of each data transmission channel;
Step S214, distributing a corresponding number of threads for each data transmission channel, and controlling the N data transmission channels to simultaneously transmit the target data;
step S215, detecting the bandwidth of each data transmission channel in the N data transmission channels according to a preset time interval in the transmission process of the target data, and obtaining a detection result;
step S216, according to the detection result, the number of the threads allocated to each data transmission channel is adjusted;
step S217, utilizing the formula
Figure BDA0004133778040000071
Determining the bandwidth utilization rate at the current moment;
here, the bandwidth utilization at the current time may be the bandwidth utilization of each data transmission channel, or may be the bandwidth utilization of all networks (i.e., all data transmission channels) on the terminal as a whole. And when the bandwidth utilization rate is the bandwidth utilization rate of a certain data transmission channel, F is the size of the transmitted data in the data transmission channel at the current moment. And when the bandwidth utilization rate is the bandwidth utilization rate of the whole of all the data transmission channels, F is the size of the transmitted data in all the data transmission channels at the current moment.
Step S218, adjusting the preset time interval according to the bandwidth utilization rate; wherein P is the bandwidth utilization rate at the current time, F is the size of the transmitted data in the target data at the current time, T is the time consumed for transmitting the transmitted data, and W i And the bandwidth of the ith data transmission channel.
In the embodiment of the application, the bandwidth utilization index is defined, and the preset time interval is adjusted in real time according to the bandwidth utilization index, so that the dynamic change of network quality can be dealt with, the bandwidth utilization is optimized, and the aim of optimizing the downloading speed is fulfilled.
Based on the foregoing embodiments, the embodiments of the present application further provide a data transmission method, and fig. 3 is a schematic diagram of an implementation flow of the data transmission method of the embodiments of the present application, as shown in fig. 3, where the method includes:
step S301, determining the number of threads for transmitting target data, and establishing the number of threads for the target data;
step S302, detecting the bandwidth of each data transmission channel in N data transmission channels on a terminal, wherein N is a natural number greater than 1;
step S303, determining the total bandwidth of the N data transmission channels;
Here, the total bandwidth of the N data transmission channels refers to the sum of bandwidths of each of the N data transmission channels.
Step S304, determining the number of threads on each data transmission channel according to the number of threads of the target data, the bandwidth of each data transmission channel and the total bandwidth;
for example, the number of threads corresponding to the target data to be transmitted is M, and the terminal includes three data transmission channels: a first data transmission channel, a second data transmission channel, and a third data transmission channel. The bandwidth of the first data transmission channel is W 1 The bandwidth of the second data transmission channel is W 2 The bandwidth of the third data transmission channel is W 3 The total bandwidth is w=w 1 +W 2 +W 3 . The number of threads on the first data transfer channel is according to M, W 1 And W, the number of threads on the second data transfer channel is determined according to M, W 2 And W, the number of threads on the second data transfer channel is determined according to M, W 3 And W.
Step S305, allocating a corresponding number of threads to each data transmission channel, and controlling the N data transmission channels to simultaneously transmit the target data.
In this embodiment of the present application, the number of threads on each data transmission channel is determined according to the number of threads of the target data, the bandwidth of each data transmission channel, and the total bandwidth; and distributing a corresponding number of threads for each data transmission channel, and controlling the N data transmission channels to simultaneously transmit the target data, so that reasonable transmission thread numbers can be distributed for each data transmission channel according to the dynamic change of network quality, thereby realizing multi-channel data transmission, improving the data transmission speed, and optimizing the bandwidth utilization rate of the network.
Based on the foregoing embodiments, embodiments of the present application further provide a data transmission method, where the method includes:
step S311, determining the number of threads for transmitting target data, and establishing the number of threads for the target data;
step S312, detecting the bandwidth of each data transmission channel in N data transmission channels on the terminal, wherein N is a natural number greater than 1;
step S313, determining the total bandwidth of the N data transmission channels;
step S314, utilizing the formula
Figure BDA0004133778040000081
Determining the number of threads on an ith data transmission channel; wherein M is i For the number of threads on the ith data transmission channel, M is the number of threads of the target data, W i A bandwidth of the ith data transmission channel;
here the number of the elements is the number,
Figure BDA0004133778040000082
is the sum of the bandwidths of all the data transmission channels, i.e. the total bandwidth.
Step 315, allocating a corresponding number of threads to each data transmission channel, and controlling the N data transmission channels to simultaneously transmit the target data.
Based on the foregoing embodiments, embodiments of the present application further provide a data transmission method, where the method includes:
step S321, determining the number of threads for transmitting target data, and establishing the number of threads for the target data;
step S322, detecting the bandwidth of each data transmission channel in N data transmission channels on the terminal, wherein N is a natural number greater than 1;
step S323, determining the number of threads on each data transmission channel according to the number of threads of the target data and the bandwidth of each data transmission channel;
step S324, allocating a corresponding number of threads to each data transmission channel, and controlling the N data transmission channels to simultaneously transmit the target data.
Step S325, if a first thread initiates a connection link establishment request, determining parameter information carried by a request address in the request;
In this embodiment of the present application, the first thread refers to any thread of all threads, if the first thread initiates a connection link establishment request, parameter information in the request is checked first, and if the parameter information is matched with parameter information of a first connection established in a connection pool, the first connection is used as a connection of the first thread, so that most of the requests use the existing connection in the connection pool, and the time for downloading the request is reduced.
Step S326, if the parameter information is matched with the parameter information of the existing first connection, the first connection is used as a connection link of the first thread; wherein, the parameter information at least comprises: internet protocol address, domain name, and network type.
Of course, in the embodiment of the present application, the parameter information may include other information besides the internet protocol address, the domain name and the network type, which is not limited in the embodiment of the present application.
In some embodiments, the method further comprises:
step S31, if the transmission task of the second thread is completed, determining a third thread with the minimum transmission speed in the threads corresponding to the target data;
Here, the second thread refers to any one of all threads.
Step S32, determining remaining data which are not transmitted in the third thread;
and step S33, transmitting the residual data by using the second thread.
Based on the foregoing embodiments, embodiments of the present application further provide a data transmission method, where the method includes:
step S331, determining the number of threads for transmitting target data, and establishing the number of threads for the target data;
step S332, detecting the bandwidth of each data transmission channel in N data transmission channels on the terminal, wherein N is a natural number greater than 1;
step S333, determining the total bandwidth of the N data transmission channels;
step S334, utilizing the formula
Figure BDA0004133778040000091
Determining the number of threads on an ith data transmission channel;
wherein M is i For the number of threads on the ith data transmission channel, M is the number of threads of the target data, W i A bandwidth of the ith data transmission channel;
step S335, allocating a corresponding number of threads to each data transmission channel, and controlling the N data transmission channels to simultaneously transmit the target data;
step S336, detecting the bandwidth of each data transmission channel in the N data transmission channels according to a preset time interval in the transmission process of the target data, so as to obtain a detection result;
Step S337, according to the detection result, the number of the threads allocated to each data transmission channel is adjusted;
step S338, utilizeFormula (VI)
Figure BDA0004133778040000092
Determining the bandwidth utilization rate at the current moment;
step S339, adjusting the preset time interval according to the bandwidth utilization rate;
wherein P is the bandwidth utilization rate at the current time, F is the size of the transmitted data in the target data at the current time, T is the time consumed for transmitting the transmitted data, and W i A bandwidth of the ith data transmission channel;
step S340, if the first thread initiates a connection link establishment request, determining parameter information carried by a request address in the request;
step S341, if the parameter information is matched with the parameter information of the existing first connection, the first connection is used as a connection link of the first thread;
wherein, the parameter information at least comprises: internet protocol address, domain name, and network type.
Step S342, if the transmission task of the second thread is completed, determining a third thread with the minimum transmission speed in the threads corresponding to the target data;
step S343, determining the remaining data which are not transmitted in the third thread;
Step S344, transmitting the remaining data by using the second thread.
Here, each download thread measures speed independently, taking into account that the actual bandwidth is fluctuating all the time, when one download thread is completed, taking over the slowest thread currently downloaded, and so on, until completion.
In some embodiments, link aggregation corresponding to the N data transmission channels is implemented at an application layer of the terminal.
Here, link aggregation for the N data transmission channels is implemented at an application layer of the terminal, and steps in the data transmission method (i.e., managing a plurality of data transmission channels at the application layer, and observing their states and selecting which network to use) are initiated and scheduled by the application layer. Therefore, the network intelligent scheduling strategy for downloading and using by the application layer can be finally realized through layer-by-layer API call, the advantages of the application layer SLA are fully exerted, the functions are realized on the premise of not depending on the system and the service, and the iteration is rapid and flexible.
In some embodiments, the terminal comprises: the data transmission channel corresponding to the data network, the data transmission channel corresponding to the first wireless network and the data transmission channel corresponding to the second wireless network.
Based on the foregoing embodiments, the embodiments of the present application further provide a data transmission method, where the data transmission method is mainly applied to a download scenario. The download scenario is a network usage scenario that is very sensitive to the speed performance index, so in the embodiment of the present application, three channels of download are implemented by using the application layer SLA technology, where the three channels may include a transmission channel corresponding to mobile data on the terminal, and a transmission channel corresponding to two wireless networks. Fig. 4 is a schematic diagram of three-channel downloading in the embodiment of the present application, as shown in fig. 4, in which the terminal includes three connection links, namely, a first connection link 41, a second connection link 42, and a third connection link 43. And the main realization is completed at the application layer 44, and the network intelligent scheduling strategy for downloading use by the application layer 44 is finally realized through calling by the layer-by-layer API (Application Programming Interface, application program interface). Here, the main implementation is all completed at the application layer 44, essentially by initiating and scheduling by the application layer 44, while the measured throughput is performed for each connection link during transmission. That is, the application layer 44 of the terminal manages the networks corresponding to the three connection links, observes the states of the networks corresponding to the three connection links, and selects the use cases of the networks according to a certain policy. Of course, in the process of data transmission, in addition to the application layer 44, the TCP protocol layer 45, the IP (Internet Protocol ) protocol layer 46 and the NIC 47 (network interface controller, network adapter) corresponding to each of the three connection links are also included.
Next, a data transmission method regarding a download scenario in the embodiment of the present application will be described from various aspects. Of course, the method in the embodiment of the present application is equally applicable to other data transmission scenarios.
(1) And (3) layering design:
the hierarchical design of the application layer downloading SLA is respectively a Linux kernel, an android system architecture, a network module and a downloading module from bottom to top. The Linux kernel and the android system architecture belong to a system in practice. The Linux kernel is mainly responsible for physical connection of a network, including data packet receiving and transmitting. The android system architecture is mainly responsible for packaging network connections into interfaces. The network module is mainly responsible for network monitoring, network management and connection management. The downloading module is mainly responsible for a file slicing strategy and is connected with a scheduling strategy. Fig. 5 is a schematic diagram of a system architecture of a terminal device according to an embodiment of the present application, as shown in fig. 5, where the system architecture of the terminal device mainly includes a Download Module 501 (Download Module 501), a Network Module 502 (Network Module 502), a Android Framework 503 (android architecture 503), and a Linux Kernel 504 (Linux Kernel 504). Wherein, the download module 501 includes: speed Monitor, retry policy module, file Splitter, job Persistence module, download Thread Manager, and Download Thread. The network module 502 includes: network Monitor, network Manager, and Connection Pool. The android architecture 503 includes: connectivity Manager (connection manager), network, and Socket. The Linux kernel 504 includes: TCP protocol, WIFI1 (wireless network 1), WIFI2 (wireless network 2), and LTE networks. Here, some modules are described, and in the download module 501: the speed monitor is mainly used for monitoring the downloading speed, and the retry strategy module is mainly used for carrying out adjustment on the downloading strategy again according to the downloading speed after a period of time. The file dividing module is mainly used for dividing the downloaded data, dividing the downloaded data into a plurality of threads, and downloading a part of data in each thread. The task persistence module is mainly used for saving progress and the like. In the network module 502: the connection pool is mainly used for storing established connection links.
(2) Connection listening and management:
fig. 6 is a schematic diagram of an implementation flow of connection monitoring in the embodiment of the present application, and as shown in fig. 6, the implementation flow of connection monitoring includes: step S601, detecting whether to turn on a WIFI switch under the condition of network change; step S602, if the WIFI switch is turned on, whether the WIFI network is connected or not is detected; step S603, if the WIFI network is connected, notifying that the WIFI network is in an available state; step S604, if the WIFI switch is not turned on, or the WIFI switch is turned on but in an unconnected state, notifying that the WIFI network is in an unavailable state; step S605, detecting whether to open a data switch under the condition of network change; step S606, if the data switch is opened, detecting whether the data network is connected; step S607, if the data network is connected or the data network is not connected but the request for using the data network is successful, notifying that the data network is in an available state; step S608, if the data switch is not opened, or the data network is not connected and the request to use the data network fails, notifying that the data network is in an unavailable state.
(3) Network acquisition:
based on the current network state (which is related to network quality), the available network is returned, and if the requested network is not available, a default network is used.
For example, fig. 7 is a schematic diagram of an implementation flow of network acquisition according to an embodiment of the present application, and as shown in fig. 7, the implementation flow of network acquisition includes: step S701, requesting a WIFI network; step S702, if the WIFI network is available, returning to the available WIFI network; step S703, requesting an LTE network; step S704, if the LTE network is not available, returning to a default network, where the default network is the WIFI network.
Here, determining whether the WIFI network or the LTE network is an available network is implemented in a network manager of the network module 502 in fig. 5.
(4) Connection multiplexing:
in the actual download process, the establishment of the connection link is costly, and therefore connection multiplexing needs to be designed. In this embodiment of the present application, the principle of connection multiplexing is: the network address involved in the downloading process is determined by four tuples, namely, the IP address of the client, the port of the client, the IP address of the server where the data to be downloaded is located, and the port of the server where the data to be downloaded is located, where the client may be a terminal. In the three-channel downloading technology of the embodiment of the present application, the three-channel SLA implemented by the application layer of the client actually establishes three connection links, and only requests to the server for different source network addresses. For example, three connection links, one of which is a connection link corresponding to the data network, the other of which is a connection link corresponding to the WIFI network 1, and the other of which is a connection link corresponding to the WIFI network 2. The operators corresponding to the three links must be different and the network address of the server (i.e. the source network address) must be different. Fig. 8 is a schematic diagram of a network architecture of three channel downloading in the embodiment of the present application, as shown in fig. 8, a client 801 supports three networks, namely, a network a, a network B, and a network C. The distribution server 802 is mainly configured to distribute the download data (i.e. distribute the download data to different networks for transmission), and control each thread (one download data may be divided into a plurality of data blocks, each data block corresponds to one thread), establish a connection link through a corresponding data transmission channel (each network corresponds to one data transmission channel), and download the data through each connection link in blocks. The connection link a can be established through a data transmission channel corresponding to the network a, the connection link B can be established through a data transmission channel corresponding to the network B, and the connection link C can be established through a data transmission channel corresponding to the network C.
In the embodiment of the application, in order to support connection multiplexing, a connection pool is designed, and the connection pool supports a mapping mode of a source IP/port/network and a destination IP/port/network.
The concrete design of the connecting pool is as follows: the request address corresponds to the connections in the connection pool one-to-one, i.e. the connections can only be multiplexed if the IP address/domain name/network corresponds to the destination IP address/domain name/network. The request address refers to a request address corresponding to a server where data is located. Connection multiplexing refers to multiplexing existing connections that were last created. After a connection establishment request is initiated to a server, the connection establishment request carries address information (i.e., a request address), wherein the address information comprises an IP address, a domain name and a network, the network is a currently used network, and the IP address and the domain name can be regarded as an identifier of the server.
For example, fig. 9 is a schematic diagram of connection multiplexing according to an embodiment of the present application, as shown in fig. 9, where the request address includes three parameter values, the first parameter value is a domain name "www.A.com", the second parameter value is an IP address "8.8.8.8", and the third parameter value is a network "cellular network". The first connection in the connection pool also includes three parameter values, the first parameter value being the domain name "www.A.com", the second parameter value being the IP address "8.8.8.8", and the third parameter value being the network "wireless network". It can be seen that the third parameter value in the request address is not identical to the third parameter value in the first connection, and therefore the request address does not match the first connection and cannot be multiplexed. The second connection in the connection pool also includes three parameter values, the first parameter value being the domain name "www.A.com", the second parameter value being the IP address "8.8.8.8", and the third parameter value being the network "cellular". It can be seen that the three parameter values in the request address are all the same as the three parameter values in the second connection, and therefore the request address matches the second connection, which can be multiplexed.
In the embodiment of the application, by designing a connection pool, most requests can use the existing connection in the connection pool, and the time for downloading the requests is reduced.
(5) Network allocation rules:
initial thread count: the conditions are satisfied: 3*n the number of CPU cores is less than or equal to 1, and n is a natural number. Of the 3*n threads, 2*n threads use a wireless WIFI network and n threads use a data network (note that 2*n threads use a wireless WIFI network and n threads use a data network are only initial non-matching rules).
For example, if the number of CPU cores in the terminal is 8, the maximum value of n is 2 and the total number of threads is 6 when the condition "3*n is equal to or smaller than the number of CPU cores" is satisfied. Wherein, 4 threads use wireless WIFI network, and 2 threads use data network. If the number of CPU cores is 12, the maximum value of n is 4 when the condition 3*n is less than or equal to the number of CPU cores, and the total number of threads is 12. Wherein 8 threads use a wireless WIFI network and 4 threads use a data network.
Here, the number of CPU cores refers to the number of CPU processing cores, and includes single core, dual core, multi-core, and the like. Multi-core CPUs are equivalent to integrating multiple complete compute engines (i.e., cores) on one CPU that share caches, memory, registers, etc.
(6) Bandwidth utilization:
assume that bandwidths of the wireless WIFI network 1, the wireless WIFI network 2 and the data network are respectively W 1 、W 2 And W is 3 . When the time consumed for downloading a file with the size F is T, the downloading speed is s=f/T. Therefore, in the embodiment of the present application, the bandwidth utilization is defined as: p=s/(W) 1 +W 2 +W 3 )=F/T(W 1 +W 2 +W 3 )。
The optimal bandwidth efficiency multi-network download model is exemplified as follows: taking a wireless WIFI network and a data network as examples, the three networks are the same. Assume that the bandwidth of the wireless WIFI network is W 1 The bandwidth of the data network is W 2 The size of the file to be downloaded is F, and the downloading speed W 1 >=W 2 The method comprises the steps of carrying out a first treatment on the surface of the And the number of the simulation threads established by the file to be downloaded is 2. In an ideal state, the data volume downloaded by the wireless WIFI network is f×w 1 /(W 1 +W 2 ) The data volume F x W downloaded by the data network 2 /(W 1 +W 2 ) When the bandwidth efficiency is optimal. Wherein, download time: t=f/(W) 1 +W 2 ) Average download speed of downloads: s=w 1 +W 2
For example, fig. 10 is a schematic diagram of an allocation model of optimal bandwidth efficiency according to the embodiment of the present application, as shown in fig. 10, a file with a size of 30M (mega), when the wireless WIFI network bandwidth is 1M and the data network bandwidth is 2M, the download speed reaches the maximum 3M if the file allocation is 10M and 20M. The graph 101 represents a data downloading situation of the wireless WIFI network, the graph 102 represents a data downloading situation of the data network, and the graph 103 represents a data downloading situation of the terminal under multiple channels, that is, two networks. It can be seen that when two channels are adopted to download files simultaneously, and the wireless WIFI network is responsible for downloading 10M of the files, and the data network is responsible for downloading 20M of the files, the downloading speed of the files is the fastest, and the downloading time of the whole files is the shortest.
(7) Scheduling policy:
the embodiment of the application provides a data transmission method based on speed measurement dynamic allocation data.
For example, assuming that 600M files are downloaded, the bandwidth of the WIFI network 1 is 3M, the bandwidth of the WIFI network 2 is 2M, and the bandwidth of the data network is 1M, the three networks should be respectively allocated 300M,200M, and 100M download data with the highest download speed based on the conclusion in the optimal bandwidth efficiency multi-network download model.
However, before data is downloaded, the actual bandwidth is not known, so that the speed needs to be measured every 5 seconds after the downloading is started, and threads are dynamically allocated based on the speed measurement result of each network. Assuming that the initial number of threads is 6, each thread downloads 100M, the network used by the assigned thread can change the size of the file allocation. For example: the first speed measurement result is that the bandwidth of the wireless WIFI network 1 is 3.4M, the bandwidth of the wireless WIFI network 2 is 1.6M, the bandwidth of the data network is 1.4M, and the total bandwidth is 6.4M.
In this regard, by adopting the data transmission method based on the speed measurement dynamic allocation data, the number of threads allocated to the wireless WIFI network 1 is as follows: 6 (3.4M/6.4M) =3.2, rounded to 3. The number of threads allocated to the wireless WIFI network 2 is: 6 (1.6M/6.4M) =1.5, rounded to 2. The number of threads allocated to the data network is: 6 (1.4M/6.4M) =1.3, rounded to 1. Thus, to approach optimal bandwidth efficiency, the network used by the threads is reassigned by wireless WIFI network 1 comprising 3 threads, wireless WIFI network 2 comprising 2 threads, and data network comprising 1 thread. After the bandwidth speed of three networks is measured every 5s, the thread allocation number of each network is recalculated according to the method. Of course, in the embodiment of the present application, if the determined number of threads is not a natural number, it may be rounded off by rounding, and other count-keeping methods may be used.
It should be noted that, in the embodiment of the present application, in order to ensure that three networks download at the same time and cover most of the time, and consider the actual situation, if the number of threads calculated by a certain network is less than 0.5, it is not adjusted to 0 according to the rounding method. But adjusts the number of threads of the network to 0 if and only if the calculated number of threads is less than 0.1. Thus, a plurality of networks can be used for simultaneous downloading, the total downloading speed is improved, and the downloading time is shortened.
And, considering that the actual bandwidth is fluctuating all the time, each downloading thread independently tests the speed, when one downloading thread is completed, the slowest downloading thread is replaced, and the like until the completion.
Table 1 comparison of data transmission method and related method in the embodiment of the present application
Comparison item/protocol MPTCP System level SLA The scheme of the application
Whether the server needs to be modified Is that Whether or not Whether or not
Relying on android system Is that Is that Whether or not
Bandwidth utilization High height Low and low High height
Upgrade iteration cost Extremely high High height Low and low
As can be seen from table 1, compared with the MPTCP scheme in the prior art, the data transmission scheme in the embodiment of the present application, the server side does not need to be modified and does not depend on the android system, and has a very low upgrade iteration cost. Compared with the system level SLA scheme in the prior art, the system level SLA scheme does not depend on an android system, is high in bandwidth utilization rate, and has low upgrading iteration cost.
That is, the data transmission scheme in the embodiment of the application (1) breaks out the limitations and disadvantages of the existing scheme, exerts the advantages of the application layer SLA, can realize functions on the premise of not depending on a system and a service, and can iterate rapidly and flexibly. (2) The method defines the index of the bandwidth utilization rate, formulates a reasonable and flexible downloading strategy, can cope with the dynamic change of the network quality, and realizes the optimal bandwidth utilization rate so as to achieve the aim of optimal downloading speed. (3) And the hardware of the android device is utilized, and three network bandwidths are used simultaneously, so that the bandwidth limit is expanded.
Thus, the peak value of the downloading speed can be improved, the peak value of the downloading speed is equivalent to the sum of three bandwidths, and the average downloading speed is improved by more than 30%. Correspondingly, the downloading time is reduced by more than 23%. Meanwhile, the three channels increase the availability of the client network, improve the downloading success rate and increase the distribution quantity of software stores in the same time.
Based on the foregoing embodiments, the embodiments of the present application provide a data transmission apparatus, where the apparatus includes units included, modules included in the units, and components included in the modules, and may be implemented by a processor in a terminal device; of course, the method can also be realized by a specific logic circuit; in an implementation, the processor may be a CPU, MPU (Microprocessor Unit, microprocessor), DSP (Digital Signal Processing, digital signal processor), FPGA (Field Programmable Gate Array ), or the like.
Fig. 11 is a schematic diagram of a composition structure of a data transmission device according to an embodiment of the present application, as shown in fig. 11, the data transmission device 110 includes:
a first determining unit 111 configured to determine the number of threads transmitting target data, and establish the number of threads for the target data;
a detecting unit 112, configured to detect a bandwidth of each of N data transmission channels on the terminal, where N is a natural number greater than 1;
a second determining unit 113, configured to determine the number of threads on each data transmission channel according to the number of threads of the target data and the bandwidth of each data transmission channel;
and the control unit 114 is configured to allocate a corresponding number of threads to each data transmission channel, and control the N data transmission channels to simultaneously transmit the target data.
In some embodiments, the apparatus 110 further comprises:
the interval detection unit is used for detecting the bandwidth of each data transmission channel in the N data transmission channels according to a preset time interval in the transmission process of the target data to obtain a detection result;
and the first adjusting unit is used for adjusting the number of the threads allocated to each data transmission channel according to the detection result.
In some embodiments, the second determining unit 113 includes:
the bandwidth total amount determining module is used for determining the bandwidth total amount of the N data transmission channels;
and the quantity determining module is used for determining the quantity of threads on each data transmission channel according to the quantity of threads of the target data, the bandwidth of each data transmission channel and the total bandwidth.
In some embodiments, the number determination module includes:
data determining means for using the formula
Figure BDA0004133778040000151
Determining the number of threads on an ith data transmission channel;
wherein M is i For the number of threads on the ith data transmission channel, M is the number of threads of the target data, W i And the bandwidth of the ith data transmission channel.
In some embodiments, the apparatus 110 further comprises:
a bandwidth utilization determination unit for utilizing the formula
Figure BDA0004133778040000161
Determining the bandwidth utilization rate at the current moment;
the second adjusting unit is used for adjusting the preset time interval according to the bandwidth utilization rate;
wherein P is the bandwidth utilization rate at the current time, F is the size of the transmitted data in the target data at the current time, T is the time consumed for transmitting the transmitted data, and W i And the bandwidth of the ith data transmission channel.
In some embodiments, the apparatus 110 further comprises:
the parameter determining unit is used for determining parameter information carried by a request address in a request if a first thread initiates a connection link establishment request;
a processing unit, configured to use the first connection as a connection link of the first thread if the parameter information matches parameter information of an existing first connection;
wherein, the parameter information at least comprises: internet protocol address, domain name, and network type.
In some embodiments, the apparatus 110 further comprises:
a thread determining unit, configured to determine a third thread with a minimum transmission speed in threads corresponding to the target data if the transmission task of the second thread is completed;
a remaining data determining unit, configured to determine remaining data that is not transmitted in the third thread;
and the replacing unit is used for transmitting the residual data by using the second thread.
In some embodiments, link aggregation corresponding to the N data transmission channels is implemented at an application layer of the terminal.
In some embodiments, the terminal comprises: the data transmission channel corresponding to the data network, the data transmission channel corresponding to the first wireless network and the data transmission channel corresponding to the second wireless network.
The description of the apparatus embodiments above is similar to that of the method embodiments above, with similar advantageous effects as the method embodiments. For technical details not disclosed in the device embodiments of the present application, please refer to the description of the method embodiments of the present application for understanding.
It should be noted that, in the embodiment of the present application, if the above-mentioned data transmission method is implemented in the form of a software functional module, and sold or used as a separate product, the data transmission method may also be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially or portions contributing to the prior art, embodied in the form of a software product stored in a storage medium, including several instructions for causing an apparatus (which may be a personal computer, a server, etc.) to perform all or part of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a ROM (Read Only Memory), a magnetic disk, or an optical disk. Thus, embodiments of the present application are not limited to any specific combination of hardware and software.
Correspondingly, the embodiment of the application provides a terminal, which comprises a memory and a processor, wherein the memory stores a computer program capable of running on the processor, and the processor realizes the steps in the data transmission method provided in the embodiment when executing the program.
Correspondingly, the embodiment of the application provides a readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, implements the steps of the data transmission method described above.
It should be noted here that: the description of the storage medium and the terminal embodiments above is similar to that of the method embodiments above, with similar advantageous effects as the method embodiments. For technical details not disclosed in the embodiments of the storage medium and the terminal device of the present application, please refer to the description of the method embodiments of the present application for understanding.
It should be noted that fig. 12 is a schematic diagram of a hardware entity of the terminal according to the embodiment of the present application, as shown in fig. 12, the hardware entity of the terminal 120 includes: a processor 121, a communication interface 122, and a memory 123, wherein
The processor 121 generally controls the overall operation of the terminal 120.
Communication interface 122 may enable terminal 120 to communicate with other devices or servers over a network.
The memory 123 is configured to store instructions and applications executable by the processor 121, and may also cache data (e.g., image data, audio data, voice communication data, and video communication data) to be processed or processed by each module in the processor 121 and the terminal 120, and may be implemented by FLASH (FLASH memory) or RAM (Random Access Memory ).
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above described device embodiments are only illustrative, e.g. the division of the units is only one logical function division, and there may be other divisions in practice, such as: multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. In addition, the various components shown or discussed may be coupled or directly coupled or communicatively coupled to each other via some interface, whether indirectly coupled or communicatively coupled to devices or units, whether electrically, mechanically, or otherwise.
The units described as separate units may or may not be physically separate, and units displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units; some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing module, or each unit may be separately used as one unit, or two or more units may be integrated in one unit; the integrated units may be implemented in hardware or in hardware plus software functional units. Those of ordinary skill in the art will appreciate that: all or part of the steps for implementing the above method embodiments may be implemented by hardware associated with program instructions, where the foregoing program may be stored in a computer readable storage medium, and when executed, the program performs steps including the above method embodiments; and the aforementioned storage medium includes: a removable storage device, ROM, RAM, magnetic or optical disk, or other medium capable of storing program code.
The methods disclosed in the several method embodiments provided in the present application may be arbitrarily combined without collision to obtain a new method embodiment.
The features disclosed in the several product embodiments provided in the present application may be combined arbitrarily without conflict to obtain new product embodiments.
The features disclosed in the several method or apparatus embodiments provided in the present application may be arbitrarily combined without conflict to obtain new method embodiments or apparatus embodiments.
The foregoing is merely specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the present application, and the changes and substitutions are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (12)

1. A method of data transmission, the method comprising:
determining the number of threads for transmitting target data, and establishing the number of threads for the target data;
detecting the bandwidth of each data transmission channel in N data transmission channels on a terminal, wherein N is a natural number greater than 1, and the data transmission channels on the terminal comprise data transmission channels of a data network type and/or data transmission channels of a wireless network type;
determining the number of threads on each data transmission channel according to the number of threads of the target data and the bandwidth of each data transmission channel;
And distributing a corresponding number of threads for each data transmission channel, and controlling the N data transmission channels to simultaneously transmit the target data.
2. The method according to claim 1, wherein the method further comprises:
in the transmission process of the target data, detecting the bandwidth of each data transmission channel in the N data transmission channels according to a preset time interval to obtain a detection result;
and according to the detection result, the number of the threads allocated to each data transmission channel is adjusted.
3. The method according to claim 2, wherein the method further comprises:
using the formula
Figure FDA0004133778020000011
Determining the bandwidth utilization rate at the current moment;
according to the bandwidth utilization rate, adjusting the preset time interval;
wherein P is the bandwidth utilization rate at the current time, F is the size of the transmitted data in the target data at the current time, T is the time consumed for transmitting the transmitted data, and W i And the bandwidth of the ith data transmission channel.
4. The method of claim 1, wherein determining the number of threads on each data transmission channel based on the number of threads of the target data and the bandwidth of each data transmission channel comprises:
Determining the total bandwidth of the N data transmission channels;
and determining the number of threads on each data transmission channel according to the number of threads of the target data, the bandwidth of each data transmission channel and the total bandwidth.
5. The method of claim 4, wherein determining the number of threads on each data transmission channel based on the number of threads of the target data, the bandwidth of each data transmission channel, and the total bandwidth comprises:
using the formula
Figure FDA0004133778020000012
Determining the number of threads on an ith data transmission channel;
wherein M is i For the number of threads on the ith data transmission channel, M is the number of threads of the target data, W i And the bandwidth of the ith data transmission channel.
6. The method according to claim 1, wherein the method further comprises:
if a first thread initiates a connection link establishment request, determining parameter information carried by a request address in the request;
if the parameter information is matched with the parameter information of the existing first connection, the first connection is used as a connection link of the first thread;
wherein, the parameter information at least comprises: internet protocol address, domain name, and network type.
7. The method of claim 6, wherein the method further comprises:
if the transmission task of the second thread is completed, determining a third thread with the minimum transmission speed in the threads corresponding to the target data;
determining remaining data not transmitted in the third thread;
and transmitting the residual data by using the second thread.
8. The method according to any one of claims 1 to 7, wherein link aggregation corresponding to the N data transmission channels is implemented at an application layer of the terminal.
9. The method according to any of claims 1 to 7, wherein the terminal comprises: the data transmission channel corresponding to the data network, the data transmission channel corresponding to the first wireless network and the data transmission channel corresponding to the second wireless network.
10. A data transmission apparatus, the apparatus comprising:
a first determining unit, configured to determine the number of threads transmitting target data, and establish the number of threads for the target data;
the detection unit is used for detecting the bandwidth of each data transmission channel in N data transmission channels on the terminal, wherein N is a natural number greater than 1, and the data transmission channels on the terminal comprise data transmission channels of a data network type and/or data transmission channels of a wireless network type;
The second determining unit is used for determining the number of threads on each data transmission channel according to the number of threads of the target data and the bandwidth of each data transmission channel;
and the control unit is used for distributing a corresponding number of threads for each data transmission channel and controlling the N data transmission channels to simultaneously transmit the target data.
11. A terminal comprising a memory and a processor, the memory storing a computer program executable on the processor, the processor implementing the steps in the data transmission method of any one of claims 1 to 9 when the program is executed.
12. A computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the data transmission method of any of claims 1 to 9.
CN202310268133.6A 2020-11-06 2020-11-06 Data transmission method and device, terminal and storage medium Pending CN116318585A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310268133.6A CN116318585A (en) 2020-11-06 2020-11-06 Data transmission method and device, terminal and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202310268133.6A CN116318585A (en) 2020-11-06 2020-11-06 Data transmission method and device, terminal and storage medium
CN202011232397.9A CN112422251B (en) 2020-11-06 2020-11-06 Data transmission method and device, terminal and storage medium

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN202011232397.9A Division CN112422251B (en) 2020-11-06 2020-11-06 Data transmission method and device, terminal and storage medium

Publications (1)

Publication Number Publication Date
CN116318585A true CN116318585A (en) 2023-06-23

Family

ID=74782034

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202310268133.6A Pending CN116318585A (en) 2020-11-06 2020-11-06 Data transmission method and device, terminal and storage medium
CN202011232397.9A Active CN112422251B (en) 2020-11-06 2020-11-06 Data transmission method and device, terminal and storage medium

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN202011232397.9A Active CN112422251B (en) 2020-11-06 2020-11-06 Data transmission method and device, terminal and storage medium

Country Status (1)

Country Link
CN (2) CN116318585A (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113438324A (en) * 2021-08-25 2021-09-24 北京拙成科技发展有限公司 Digital information transmission method and system
CN116450564B (en) * 2023-06-15 2023-11-28 支付宝(杭州)信息技术有限公司 Data transmission method and system between multi-processing cards

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070091922A1 (en) * 2005-10-21 2007-04-26 Steven Elliot Method and apparatus for adaptive bandwidth control with a bandwidth guarantee
CN105101173A (en) * 2015-07-20 2015-11-25 努比亚技术有限公司 Multi-data-channel-based data loading apparatus and method
CN110225291B (en) * 2019-05-22 2023-04-18 深圳壹账通智能科技有限公司 Data transmission method and device and computer equipment
CN110674942A (en) * 2019-09-26 2020-01-10 深圳前海达闼云端智能科技有限公司 Bandwidth management method and device, electronic equipment and readable storage medium

Also Published As

Publication number Publication date
CN112422251B (en) 2023-03-31
CN112422251A (en) 2021-02-26

Similar Documents

Publication Publication Date Title
CN102016804B (en) A data processing arrangement
US10652360B2 (en) Access scheduling method and apparatus for terminal, and computer storage medium
CN112905305B (en) VPP-based cluster type virtualized data forwarding method, device and system
CN104348798B (en) A kind of method, apparatus, dispatch server and system for distributing network
CN110166524B (en) Data center switching method, device, equipment and storage medium
CN102215481B (en) Mobile terminal and resource downloading method
EP3605991B1 (en) Data distribution method, device and system
CN116318585A (en) Data transmission method and device, terminal and storage medium
US20210360476A1 (en) Method for downloading data and terminal device
Chen et al. Latency minimization for mobile edge computing networks
US20130148596A1 (en) Resource management system and method of centralized base station in mobile communication network
US20220264675A1 (en) System and method for processing data
CN112703774A (en) Network slice management
WO2016095524A1 (en) Resource allocation method and apparatus
CN110198267A (en) A kind of traffic scheduling method, system and server
US20230403608A1 (en) Data router connectivity to wireless communication slices
KR20170028228A (en) Method and apparatus for adaptive cache management
CN112749012A (en) Data processing method, device and system of terminal equipment and storage medium
CN115866059B (en) Block chain link point scheduling method and device
CN112380001A (en) Log output method, load balancing device and computer readable storage medium
US20230128078A1 (en) Unified data repository (udr) access across wireless communication networks
WO2017012276A1 (en) Method and apparatus for dynamically adjusting baseband board
US11510191B2 (en) Decentralized radio resource allocation using a distributed cache
CN113946437A (en) Calculation force resource allocation method and device and mobile edge calculation integrated equipment
WO2014161502A1 (en) Multiple system resource management method and device

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