CN112073995B - Data transmission method and device, storage medium and electronic equipment - Google Patents

Data transmission method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN112073995B
CN112073995B CN202010916788.6A CN202010916788A CN112073995B CN 112073995 B CN112073995 B CN 112073995B CN 202010916788 A CN202010916788 A CN 202010916788A CN 112073995 B CN112073995 B CN 112073995B
Authority
CN
China
Prior art keywords
distance
network
electronic device
access point
electronic equipment
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
CN202010916788.6A
Other languages
Chinese (zh)
Other versions
CN112073995A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202010916788.6A priority Critical patent/CN112073995B/en
Publication of CN112073995A publication Critical patent/CN112073995A/en
Application granted granted Critical
Publication of CN112073995B publication Critical patent/CN112073995B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/08Load balancing or load distribution
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/10Flow control between communication endpoints
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W88/00Devices specially adapted for wireless communication networks, e.g. terminals, base stations or access point devices
    • H04W88/02Terminal devices
    • H04W88/06Terminal devices adapted for operation in multiple networks or having at least two operational modes, e.g. multi-mode terminals
    • 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

Abstract

The application discloses a data transmission method, a data transmission device, a storage medium and electronic equipment. The method is applied to electronic equipment, the electronic equipment comprises a first Wi-Fi module and a second Wi-Fi module, the electronic equipment is connected to a first Wi-Fi network through the first Wi-Fi module and connected to a second Wi-Fi network through the second Wi-Fi module, and the method comprises the following steps: acquiring a first distance, wherein the first distance is the distance between the electronic equipment and access point equipment corresponding to the first Wi-Fi network; acquiring a second distance, wherein the second distance is the distance between the electronic equipment and access point equipment corresponding to the second Wi-Fi network; according to the first distance and the second distance, determining the network traffic distribution ratio of the first Wi-Fi network and the second Wi-Fi network; and distributing the network traffic of the electronic equipment for data transmission to the first Wi-Fi network and the second Wi-Fi network according to the network traffic distribution proportion. The application can improve the flexibility of the electronic equipment for carrying out data transmission by using the double Wi-Fi network.

Description

Data transmission method and device, storage medium and electronic equipment
Technical Field
The present application belongs to the field of network technologies, and in particular, to a data transmission method, a data transmission device, a storage medium, and an electronic device.
Background
Wi-Fi technology is a wireless network transmission technology that is currently in very wide use. In the related art, an electronic device may use a dual Wi-Fi technology to connect to two Wi-Fi networks simultaneously for surfing the internet. With the dual Wi-Fi technology, the electronic device can acquire higher network speed and actual throughput. However, in the related art, when the electronic device uses the dual Wi-Fi network for data transmission, flexibility is poor.
Disclosure of Invention
The embodiment of the application provides a data transmission method, a data transmission device, a storage medium and electronic equipment, which can improve the flexibility of the electronic equipment in using a double Wi-Fi network for data transmission.
In a first aspect, an embodiment of the present application provides a data transmission method, applied to an electronic device, where the electronic device includes a first Wi-Fi module and a second Wi-Fi module, and the electronic device is connected to a first Wi-Fi network through the first Wi-Fi module and connected to a second Wi-Fi network through the second Wi-Fi module, where the method includes:
acquiring a first distance, wherein the first distance is the distance between the electronic equipment and access point equipment corresponding to the first Wi-Fi network;
Acquiring a second distance, wherein the second distance is the distance between the electronic equipment and access point equipment corresponding to the second Wi-Fi network;
determining a network traffic distribution ratio of the first Wi-Fi network and the second Wi-Fi network according to the first distance and the second distance;
and distributing the network traffic of the electronic equipment for data transmission to the first Wi-Fi network and the second Wi-Fi network according to the network traffic distribution proportion.
In a second aspect, an embodiment of the present application provides a data transmission apparatus, applied to an electronic device, where the electronic device includes a first Wi-Fi module and a second Wi-Fi module, the electronic device is connected to a first Wi-Fi network through the first Wi-Fi module and connected to a second Wi-Fi network through the second Wi-Fi module, and the apparatus includes:
the first acquisition module is used for acquiring a first distance, wherein the first distance is the distance between the electronic equipment and the access point equipment corresponding to the first Wi-Fi network;
the second acquisition module is used for acquiring a second distance, wherein the second distance is the distance between the electronic equipment and the access point equipment corresponding to the second Wi-Fi network;
The determining module is used for determining the network traffic distribution ratio of the first Wi-Fi network and the second Wi-Fi network according to the first distance and the second distance;
and the processing module is used for distributing the network traffic of the electronic equipment for data transmission to the first Wi-Fi network and the second Wi-Fi network according to the network traffic distribution proportion.
In a third aspect, an embodiment of the present application provides a storage medium having stored thereon a computer program which, when executed on a computer, causes the computer to perform the method provided by the embodiment of the present application.
In a fourth aspect, an embodiment of the present application further provides an electronic device, including a memory, and a processor, where the processor is configured to execute the method provided by the embodiment of the present application by calling a computer program stored in the memory.
In the embodiment of the application, the electronic device can firstly acquire the first distance of the access point device corresponding to the first Wi-Fi network and the second distance of the access point device corresponding to the second Wi-Fi network. The electronic device may then determine a network traffic allocation ratio of the first Wi-Fi network and the second Wi-Fi network based on the first distance and the second distance. After determining the network traffic distribution proportion, the electronic device can distribute the network traffic of the electronic device for data transmission to the first Wi-Fi network and the second Wi-Fi network according to the determined network traffic distribution proportion. In the embodiment of the application, the electronic equipment can determine the network flow distribution ratio between the first Wi-Fi network and the second Wi-Fi network according to the distance between the electronic equipment and the accessed access point equipment, so that data is distributed according to the network flow distribution ratio when the data is transmitted, and the embodiment of the application can improve the flexibility when the electronic equipment uses the double Wi-Fi networks to transmit the data.
Drawings
The technical solution of the present application and its advantageous effects will be made apparent by the following detailed description of the specific embodiments of the present application with reference to the accompanying drawings.
Fig. 1 is a flow chart of a data transmission method according to an embodiment of the present application.
Fig. 2 is another flow chart of a data transmission method according to an embodiment of the present application.
Fig. 3 to fig. 5 are schematic diagrams of a scenario of a data transmission method according to an embodiment of the present application.
Fig. 6 is a schematic structural diagram of a data transmission device according to an embodiment of the present application.
Fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Fig. 8 is another schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Referring to the drawings, wherein like reference numerals refer to like elements throughout, the principles of the present application are illustrated in a suitable computing environment. The following description is based on illustrative embodiments of the application and should not be taken as limiting other embodiments of the application not described in detail herein.
It is understood that the execution subject of the embodiment of the present application may be an electronic device such as a smart phone or a tablet computer.
Referring to fig. 1, fig. 1 is a flowchart of a data transmission method according to an embodiment of the application. The data transmission method can be applied to electronic equipment, the electronic equipment can comprise a first Wi-Fi module and a second Wi-Fi module, the electronic equipment can be connected to a first Wi-Fi network through the first Wi-Fi module and can be connected to a second Wi-Fi network through the second Wi-Fi module, and therefore the function of double Wi-Fi is achieved.
The flow of the data transmission method can comprise the following steps:
101. and acquiring a first distance, wherein the first distance is the distance between the electronic equipment and the access point equipment corresponding to the first Wi-Fi network.
Wi-Fi technology is a wireless network transmission technology that is currently in very wide use. In the related art, an electronic device may use a dual Wi-Fi technology to connect to two Wi-Fi networks simultaneously for surfing the internet. With the dual Wi-Fi technology, the electronic device can acquire higher network speed and actual throughput. However, in the related art, when the electronic device uses the dual Wi-Fi network for data transmission, flexibility is poor.
In the embodiment of the application, the electronic device can firstly acquire the first distance, and the first distance is the distance between the electronic device and the access point device corresponding to the first Wi-Fi network. For example, the access point device corresponding to the first Wi-Fi network is AP1, and then the first distance is a distance between the electronic device and the access point device AP 1.
102. And acquiring a second distance, wherein the second distance is the distance between the electronic equipment and the access point equipment corresponding to the second Wi-Fi network.
For example, the electronic device may also first obtain a second distance, where the second distance is a distance between the electronic device and an access point device corresponding to the second Wi-Fi network. For example, the access point device corresponding to the second Wi-Fi network is AP2, and then the second distance is a distance between the electronic device and the access point device AP 2.
103. And determining the network traffic distribution ratio of the first Wi-Fi network and the second Wi-Fi network according to the first distance and the second distance.
For example, after the first distance and the second distance are acquired, the electronic device may determine a network traffic allocation ratio of the first Wi-Fi network and the second Wi-Fi network according to the first distance and the second distance. It will be appreciated that the network traffic allocation proportion is the proportion of data traffic split.
For example, according to the first distance and the second distance, the electronic device determines that the network traffic distribution ratio of the first Wi-Fi network to the second Wi-Fi network is 1:1.
104. And distributing the network traffic of the electronic equipment for data transmission to the first Wi-Fi network and the second Wi-Fi network according to the network traffic distribution proportion.
For example, after determining the network traffic distribution ratio of the first Wi-Fi network and the second Wi-Fi network, the electronic device may distribute the network traffic of the data transmission performed by the electronic device to the first Wi-Fi network and the second Wi-Fi network according to the network traffic distribution ratio. That is, the electronic device may split data between the first Wi-Fi network and the second Wi-Fi network according to the network traffic distribution ratio.
For example, the network traffic distribution ratio of the first Wi-Fi network to the second Wi-Fi network determined by the electronic device is 1:1, and then the electronic device may distribute the network traffic for data transmission to the first Wi-Fi network and the second Wi-Fi network on average. For example, the electronic device currently needs to send 10MB of data, then the electronic device may send 5MB of data therein over a first Wi-Fi network, and send another portion of the 5MB of data over a second Wi-Fi network.
For another example, the network traffic distribution ratio of the first Wi-Fi network to the second Wi-Fi network determined by the electronic device is 2:3, and then the electronic device may distribute the network traffic for data transmission to the first Wi-Fi network and the second Wi-Fi network according to the ratio of 2:3. For example, the electronic device currently needs to send 10MB of data, then the electronic device may send 4MB of data therein over a first Wi-Fi network, another portion of 6MB of data over a second Wi-Fi network, and so on.
It can be appreciated that in the embodiment of the present application, the electronic device may first acquire a first distance of the access point device corresponding to the first Wi-Fi network and a second distance of the access point device corresponding to the second Wi-Fi network. The electronic device may then determine a network traffic allocation ratio of the first Wi-Fi network and the second Wi-Fi network based on the first distance and the second distance. After determining the network traffic distribution proportion, the electronic device can distribute the network traffic of the electronic device for data transmission to the first Wi-Fi network and the second Wi-Fi network according to the determined network traffic distribution proportion. In the embodiment of the application, the electronic equipment can determine the network flow distribution ratio between the first Wi-Fi network and the second Wi-Fi network according to the distance between the electronic equipment and the accessed access point equipment, so that data is distributed according to the network flow distribution ratio when the data is transmitted, and the embodiment of the application can improve the flexibility when the electronic equipment uses the double Wi-Fi networks to transmit the data.
Referring to fig. 2, fig. 2 is another flow chart of a data transmission method according to an embodiment of the application. The data transmission method can be applied to electronic equipment, the electronic equipment can comprise a first Wi-Fi module and a second Wi-Fi module, the electronic equipment can be connected to a first Wi-Fi network through the first Wi-Fi module and can be connected to a second Wi-Fi network through the second Wi-Fi module, and therefore the function of double Wi-Fi is achieved.
The flow of the data transmission method provided by the embodiment of the application can comprise the following steps:
201. the electronic equipment acquires a first distance, wherein the first distance is the distance between the electronic equipment and access point equipment corresponding to a first Wi-Fi network.
202. The electronic equipment acquires a second distance, wherein the second distance is the distance between the electronic equipment and the access point equipment corresponding to the second Wi-Fi network.
For example, the electronic device is connected to a first Wi-Fi network corresponding to the access point device AP1 and a second Wi-Fi network corresponding to the access point device AP2, so as to implement a dual Wi-Fi function. The electronic device may then obtain a first distance from the access point device AP1 and a second distance from the access point device AP 2.
In one embodiment, the electronic device may obtain its distance from a certain access point device by:
controlling the electronic equipment to interact with the access point equipment back and forth once;
acquiring round trip time spent for carrying out one round trip interaction, and marking the round trip time as T;
calculating the distance d= (t×c)/(2) between the electronic device and the accessed access point device, wherein C is the speed of light.
For example, when it is required to obtain a distance between an electronic device and an access point device, the electronic device may perform a Round-Trip interaction with the access point device, and obtain a Round-Trip Time (RTT) taken for performing a Round-Trip interaction. The electronic device may note this round trip time as T. Then, the electronic device can calculate its distance d= (t×c)/(2) from the accessed access point device by the following formula, where C is the wireless signal transmission speed, i.e., the speed of light.
In another embodiment, the electronic device may also obtain its distance from the access point device corresponding to the accessed Wi-Fi network by:
acquiring an intensity value of Wi-Fi signal received by electronic equipment;
and determining the distance between the electronic equipment and the access point equipment corresponding to the accessed Wi-Fi network according to the intensity value of the received Wi-Fi signal.
For example, the electronic device may pre-measure different Wi-Fi signal strengths received at different distances from the access point device and form a correspondence table. For example, the Wi-Fi signal received by the electronic device has a first strength when separated from the access point device by 1 meter. The Wi-Fi signal is received by the electronic device having a second strength when separated from the access point device by 1.1 meters. The electronic device receives Wi-Fi signals having a third strength when separated from the access point device by 1.2 meters, and so on.
When the distance between the electronic device and the access point device needs to be acquired, the electronic device can acquire the intensity value of the Wi-Fi signal received by the electronic device, and then determine the distance between the electronic device and the accessed access point device according to the corresponding relation table. For example, the strength of the Wi-Fi signal received by the electronic device is the third strength, and then the electronic device may determine that it is 1.2 meters away from the access point device to which it is connected.
Of course, in other embodiments, the distance of the electronic device from the access point device to which it is connected may be obtained in other ways. For example, the electronic device may determine the distance of the electronic device from the access point device by means of bluetooth assisted positioning.
203. If the value of the first distance is smaller than the preset distance threshold, the electronic equipment assigns the value of the preset distance threshold to the first distance; if the value of the second distance is smaller than the preset distance threshold, the electronic equipment assigns the value of the preset distance threshold to the second distance.
For example, after the first distance and the second distance are acquired, the electronic device may detect whether the first distance is less than a preset distance threshold, and detect whether the second distance is less than the preset distance threshold.
If the value of the first distance is smaller than the preset distance threshold, the electronic device may assign the value of the preset distance threshold to the first distance. That is, if the value of the first distance is smaller than the preset distance threshold, the electronic device may adjust the value of the first distance to the preset distance threshold. For example, the preset distance threshold is 2 meters. Then, if the first distance is less than 2 meters, for example, the first distance is 1.5 meters, the electronic device may adjust the first distance from 1.5 meters to 2 meters.
If the value of the second distance is smaller than the preset distance threshold, the electronic device may assign the value of the preset distance threshold to the second distance. That is, if the value of the second distance is smaller than the preset distance threshold, the electronic device may adjust the value of the second distance to the preset distance threshold. For example, the preset distance threshold is 2 meters. Then, if the second distance is less than 2 meters, for example the first distance is 1.8 meters, the electronic device may adjust the second distance from 1.8 meters to 2 meters.
If the values of the first distance and the second distance are not less than the preset distance threshold, the values of the first distance and the second distance may not be adjusted. For example, the first distance is 2.5 meters and the second distance is 3 meters. Then, since the first distance and the second distance are both greater than the preset distance threshold, the electronic device may not adjust the values of the first distance and the second distance.
When the distance between the electronic device and the access point device is smaller than the preset distance threshold, the data transmission quality between the electronic device and the access point device can be considered to be good, and even if the distances are different, the data transmission quality is different. Therefore, by adopting the mode that if the value of the first distance is smaller than the preset distance threshold, the value of the preset distance threshold is assigned to the first distance, and if the value of the second distance is smaller than the preset distance threshold, the value of the preset distance threshold is assigned to the second distance, on the one hand, calculation can be simplified, and on the other hand, the actual data transmission effect is attached more.
204. The electronic device determines a ratio of the second distance to the first distance as a network traffic allocation ratio of the first Wi-Fi network to the second Wi-Fi network.
For example, after determining the first distance and the second distance, the electronic device may determine a ratio of the second distance to the first distance as a network traffic allocation ratio of the first Wi-Fi network to the second Wi-Fi network.
For example, the first distance is actually 1.5 meters, the second distance is actually 1.8 meters, and the preset distance threshold is 2 meters. Because the first distance and the second distance are smaller than the preset distance threshold, the electronic device can adjust the first distance and the second distance to 2 meters. Then the ratio of the second distance to the first distance is 1:1. That is, the network traffic distribution ratio of the first Wi-Fi network and the second Wi-Fi network is 1:1.
As another example, the first distance is effectively 1.5 meters and the second distance is effectively 3 meters. Since the first distance is smaller than the preset distance threshold, the electronic device may first adjust the first distance to 2 meters. Then the ratio of the second distance to the first distance is 3:2. That is, the network traffic distribution ratio of the first Wi-Fi network and the second Wi-Fi network is 3:2.
For another example, the first distance is substantially 3 meters and the second distance is substantially 5 meters. Because the first distance and the second distance are both greater than the preset distance threshold, the electronic device does not need to adjust the values of the first distance and the second distance. Then the ratio of the second distance to the first distance is 5:3. That is, the network traffic distribution ratio of the first Wi-Fi network and the second Wi-Fi network is 5:3.
It will be appreciated that, generally, when the distance between the electronic device and the access point device is relatively short, the quality of data transmission between the two devices will be relatively good, and the efficiency and rate of data transmission will be relatively good, so that the electronic device may distribute more data traffic to the access point device that is relatively short. According to the embodiment of the application, the network traffic distribution proportion and the distance can be related in the mode, the access point equipment with the shorter distance with the electronic equipment can distribute more network data traffic, and the access point equipment with the longer distance with the electronic equipment can distribute less network data traffic, so that the efficiency of the electronic equipment for carrying out data transmission by utilizing the double Wi-Fi network can be improved.
205. And according to the network traffic distribution proportion, the electronic equipment distributes the network traffic for data transmission to the first Wi-Fi network and the second Wi-Fi network.
For example, after determining the network traffic distribution ratio of the first Wi-Fi network and the second Wi-Fi network, the electronic device may distribute the network traffic of the data transmission performed by the electronic device to the first Wi-Fi network and the second Wi-Fi network according to the network traffic distribution ratio. That is, the electronic device may split data between the first Wi-Fi network and the second Wi-Fi network according to the network traffic distribution ratio.
For example, the network traffic distribution ratio of the first Wi-Fi network to the second Wi-Fi network determined by the electronic device is 1:1, and then the electronic device may distribute the network traffic for data transmission to the first Wi-Fi network and the second Wi-Fi network on average. For example, the electronic device currently needs to send 10MB of data, then the electronic device may send 5MB of data therein over a first Wi-Fi network, and send another portion of the 5MB of data over a second Wi-Fi network.
For another example, the network traffic distribution ratio of the first Wi-Fi network to the second Wi-Fi network determined by the electronic device is 2:3, and then the electronic device may distribute the network traffic for data transmission to the first Wi-Fi network and the second Wi-Fi network according to the ratio of 2:3. For example, the electronic device currently needs to send 10MB of data, then the electronic device may send 4MB of data therein over a first Wi-Fi network, another portion of 6MB of data over a second Wi-Fi network, and so on.
It can be understood that in the embodiment of the present application, on one hand, because the electronic device may determine the network traffic allocation ratio between the first Wi-Fi network and the second Wi-Fi network according to the distance between the electronic device and the access point device to which the electronic device is connected, so that when data transmission is performed, data is split according to the network traffic allocation ratio, the embodiment of the present application may improve flexibility when the electronic device uses the dual Wi-Fi network to perform data transmission. On the other hand, the embodiment of the application can correlate the distribution proportion of the network traffic with the distance, the access point equipment with the shorter distance with the electronic equipment can distribute more network data traffic, and the access point equipment with the longer distance with the electronic equipment can distribute less network data traffic. Therefore, the embodiment of the application can effectively avoid distributing more network data traffic to the access point equipment with a longer distance, thereby effectively avoiding the problems of packet loss, retransmission, large network delay, slow network speed and the like in the data transmission process, namely the embodiment of the application can improve the efficiency and the quality of the data transmission of the electronic equipment by utilizing the double Wi-Fi network.
In one embodiment, for example, the access point device corresponding to the first Wi-Fi network is AP1, the access point device corresponding to the second Wi-Fi network is AP2, and the electronic device may acquire the first distance from the access point device AP1 and the second distance from the access point device AP2 at intervals of a preset time. For example, the preset time interval may be 5 seconds, 8 seconds, 10 seconds, or the like, which is not particularly limited in the embodiment of the present application.
Each time the latest first distance and the latest second distance are acquired, the electronic device can determine the network traffic distribution ratio of the first Wi-Fi network and the second Wi-Fi network according to the latest first distance and the latest second distance acquired. After determining the latest network traffic distribution proportion, the electronic device can distribute the network traffic of the electronic device for data transmission to the first Wi-Fi network and the second Wi-Fi network according to the latest network traffic distribution proportion.
For example, at time T1, the electronic device obtains a first distance of 3 meters from the access point device AP1 and a second distance of 5 meters from the access point device AP 2. Then, the electronic device may distribute network traffic for data transmission to the first Wi-Fi network and the second Wi-Fi network in a 5:3 ratio.
After a period of time, at time T2, the electronic device obtains that a first distance between the electronic device and the access point device AP1 is 6 meters, and a second distance between the electronic device and the access point device AP2 is 1.5 meters. Then the electronic device may distribute network traffic for data transmission to the first Wi-Fi network and the second Wi-Fi network in a 1:3 ratio, and so on.
It can be understood that, because the user may move the position at any time in the process of using the electronic device, the effect of adjusting the network traffic distribution ratio of the first Wi-Fi network and the second Wi-Fi network along with the position movement of the electronic device can be achieved by obtaining the first distance and the second distance at regular intervals and re-calculating the latest network traffic distribution ratio according to the latest obtained first distance and second distance, so that the data transmission efficiency is improved, and the hysteresis of the adjustment of the network traffic distribution ratio is effectively avoided.
Referring to fig. 3 to 5, fig. 3 to 5 are schematic views of a data transmission method according to an embodiment of the application.
For example, the user opens a dual Wi-Fi function on the electronic device, and the electronic device is connected to a first Wi-Fi network corresponding to the access point device AP1 through a first Wi-Fi module, and is connected to a second Wi-Fi network corresponding to the access point device AP2 through a second Wi-Fi module, as shown in fig. 3.
The electronic device may then acquire its first distance to the access point device AP1 and its second distance to the access point device AP 2. For example, the electronic device is now at a first distance of 1.5 meters from access point device AP1 and at a second distance of 5 meters from access point device AP 2. Since the distance 1.5 meters between the electronic device and the access point device AP1 is less than the preset distance threshold value of 2 meters, the electronic device may adjust the value of the first distance from 1.5 meters to 2 meters. The electronic device may then calculate a ratio of the second distance to the first distance and determine the ratio as a network traffic allocation ratio of the first Wi-Fi network to the second Wi-Fi network. For example, the ratio of the second distance to the first distance is 5:2, and the network traffic distribution ratio of the first Wi-Fi network to the second Wi-Fi network is 5:2. The electronic device may then distribute network traffic for data transmission to the first Wi-Fi network and the second Wi-Fi network in a 5:2 ratio.
For example, as shown in fig. 4, the electronic device is currently performing a task of uploading data, where 21MB of data needs to be transmitted to the server, then the electronic device may transmit 15MB of data through the first Wi-Fi network, and 6MB of data through the second Wi-Fi network.
The electronic device may acquire a first distance from the access point device AP1 and a second distance from the access point device AP2 at regular intervals. For example, after a period of time, the user moves the electronic device to another location, where the electronic device obtains that its first distance from the access point device AP1 is 5.5 meters, and its second distance from the access point device AP2 is 3.5 meters, as shown in fig. 5, for example, as can be seen in fig. 3 and 5, the electronic device changes from being closer to the access point device AP1, being farther from the access point device AP2, to being farther from the access point device AP1, and being closer to the access point device AP 2. Then, after acquiring the latest first distance and second distance, the electronic device may calculate a ratio of the second distance to the first distance, for example, the ratio of the second distance to the first distance at this time is 7:11. And then, the electronic device can determine the network traffic distribution ratio of the first Wi-Fi network and the second Wi-Fi network to be 7:11, and distribute the network traffic for data transmission to the first Wi-Fi network and the second Wi-Fi network according to the ratio of 7:11. For example, the electronic device is currently still performing a task of uploading data, and 18MB of data needs to be transmitted to the server, then the electronic device may transmit 7MB of data through the first Wi-Fi network, and 11MB of data through the second Wi-Fi network parameters.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a data transmission device according to an embodiment of the application. The data transmission device is applied to electronic equipment, the electronic equipment comprises a first Wi-Fi module and a second Wi-Fi module, the electronic equipment is connected to a first Wi-Fi network through the first Wi-Fi module, and is connected to a second Wi-Fi network through the second Wi-Fi module.
The data transmission apparatus 300 may include: the device comprises a first acquisition module 301, a second acquisition module 302, a determination module 303 and a processing module 304.
The first obtaining module 301 is configured to obtain a first distance, where the first distance is a distance between the electronic device and an access point device corresponding to the first Wi-Fi network;
a second obtaining module 302, configured to obtain a second distance, where the second distance is a distance between the electronic device and an access point device corresponding to the second Wi-Fi network;
a determining module 303, configured to determine a network traffic allocation ratio of the first Wi-Fi network to the second Wi-Fi network according to the first distance and the second distance;
and the processing module 304 is configured to distribute, according to the network traffic distribution ratio, network traffic for data transmission by the electronic device to the first Wi-Fi network and the second Wi-Fi network.
In one embodiment, the determining module 303 may be configured to: and determining the ratio of the second distance to the first distance as the network traffic distribution ratio of the first Wi-Fi network to the second Wi-Fi network.
In one embodiment, the determining module 303 may also be configured to: if the value of the first distance is smaller than a preset distance threshold value, assigning the value of the preset distance threshold value to the first distance; and if the value of the second distance is smaller than the preset distance threshold value, assigning the value of the preset distance threshold value to the second distance.
In one embodiment, the first acquisition module 301 and the second acquisition module 302 may be configured to: the first distance and the second distance are acquired once at preset time intervals.
Then, the determining module 303 may be configured to: and determining the network traffic distribution ratio of the first Wi-Fi network and the second Wi-Fi network according to the latest acquired first distance and second distance.
The processing module 304 may be configured to: and distributing the network traffic of the electronic equipment for data transmission to the first Wi-Fi network and the second Wi-Fi network according to the latest determined network traffic distribution proportion.
In one embodiment, obtaining the distance between the electronic device and the access point device corresponding to the accessed Wi-Fi network may include: controlling the electronic equipment to interact with the access point equipment back and forth once; acquiring the round trip time spent for carrying out the round trip interaction once, and recording as T; and calculating the distance D= (T multiplied by C)/(2) between the electronic equipment and the accessed access point equipment, wherein C is the speed of light.
In another embodiment, obtaining the distance between the electronic device and the access point device corresponding to the accessed Wi-Fi network may include: acquiring the intensity value of Wi-Fi signals received by the electronic equipment; and determining the distance between the electronic equipment and the access point equipment corresponding to the accessed Wi-Fi network according to the intensity value of the received Wi-Fi signal.
An embodiment of the present application provides a computer-readable storage medium having stored thereon a computer program which, when executed on a computer, causes the computer to execute a flow in a data transmission method as provided in the present embodiment.
The embodiment of the application also provides electronic equipment, which comprises a memory and a processor, wherein the processor is used for executing the flow in the data transmission method provided by the embodiment by calling the computer program stored in the memory.
For example, the electronic device may be a mobile terminal such as a tablet computer or a smart phone. Referring to fig. 7, fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the application.
The electronic device 400 may include Wi-Fi module 401, memory 402, processor 403, etc. It will be appreciated by those skilled in the art that the electronic device structure shown in fig. 7 is not limiting of the electronic device and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
The Wi-Fi module 401 may be a first Wi-Fi module and a second Wi-Fi module. The first Wi-Fi module may include a first MAC address and a first Wi-Fi antenna. The second Wi-Fi module can include a second MAC address and a second Wi-Fi antenna. The electronic device may establish a connection with the first access point AP through the first Wi-Fi antenna based on the first MAC address, thereby connecting to the first Wi-Fi network. The electronic device may also establish a connection with a second access point AP through a second Wi-Fi antenna based on the second MAC address, thereby connecting to a second Wi-Fi network.
Memory 402 may be used to store applications and data. The memory 402 stores application programs including executable code. Applications may constitute various functional modules. Processor 403 executes various functional applications and data processing by running application programs stored in memory 402.
The processor 403 is a control center of the electronic device, connects various parts of the entire electronic device using various interfaces and lines, and performs various functions of the electronic device and processes data by running or executing application programs stored in the memory 402 and calling data stored in the memory 402, thereby performing overall monitoring of the electronic device.
In this embodiment, the electronic device is connected to a first Wi-Fi network through the first Wi-Fi module and connected to a second Wi-Fi network through the second Wi-Fi module.
The processor 403 in the electronic device loads executable code corresponding to the process of one or more application programs into the memory 402 according to the following instructions, and the processor 403 executes the application programs stored in the memory 402, so as to execute:
acquiring a first distance, wherein the first distance is the distance between the electronic equipment and access point equipment corresponding to the first Wi-Fi network;
acquiring a second distance, wherein the second distance is the distance between the electronic equipment and access point equipment corresponding to the second Wi-Fi network;
determining a network traffic distribution ratio of the first Wi-Fi network and the second Wi-Fi network according to the first distance and the second distance;
And distributing the network traffic of the electronic equipment for data transmission to the first Wi-Fi network and the second Wi-Fi network according to the network traffic distribution proportion.
Referring to fig. 8, an electronic device 400 may include Wi-Fi module 401, memory 402, processor 403, display 404, microphone 405, speaker 406, and the like.
The Wi-Fi module 401 may be a first Wi-Fi module and a second Wi-Fi module. The first Wi-Fi module may include a first MAC address and a first Wi-Fi antenna. The second Wi-Fi module can include a second MAC address and a second Wi-Fi antenna. The electronic device may establish a connection with the first access point AP through the first Wi-Fi antenna based on the first MAC address, thereby connecting to the first Wi-Fi network. The electronic device may also establish a connection with a second access point AP through a second Wi-Fi antenna based on the second MAC address, thereby connecting to a second Wi-Fi network.
Memory 402 may be used to store applications and data. The memory 402 stores application programs including executable code. Applications may constitute various functional modules. Processor 403 executes various functional applications and data processing by running application programs stored in memory 402.
The processor 403 is a control center of the electronic device, connects various parts of the entire electronic device using various interfaces and lines, and performs various functions of the electronic device and processes data by running or executing application programs stored in the memory 402 and calling data stored in the memory 402, thereby performing overall monitoring of the electronic device.
The display 404 may be used to display information such as text, images, etc., and may also be used to receive touch operations from a user.
Microphone 405 may be used to collect sound signals in the surrounding environment.
The speaker 406 may be used to play sound signals.
In addition, the electronic device may include components such as a battery that may be used to provide power support for proper operation of the various components of the electronic device.
In this embodiment, the electronic device is connected to a first Wi-Fi network through the first Wi-Fi module and connected to a second Wi-Fi network through the second Wi-Fi module.
The processor 403 in the electronic device loads executable code corresponding to the process of one or more application programs into the memory 402 according to the following instructions, and the processor 403 executes the application programs stored in the memory 402, so as to execute:
Acquiring a first distance, wherein the first distance is the distance between the electronic equipment and access point equipment corresponding to the first Wi-Fi network;
acquiring a second distance, wherein the second distance is the distance between the electronic equipment and access point equipment corresponding to the second Wi-Fi network;
determining a network traffic distribution ratio of the first Wi-Fi network and the second Wi-Fi network according to the first distance and the second distance;
and distributing the network traffic of the electronic equipment for data transmission to the first Wi-Fi network and the second Wi-Fi network according to the network traffic distribution proportion.
In one implementation, when the processor 403 determines the network traffic allocation ratio of the first Wi-Fi network to the second Wi-Fi network according to the first distance and the second distance, the method may be performed: and determining the ratio of the second distance to the first distance as the network traffic distribution ratio of the first Wi-Fi network to the second Wi-Fi network.
In one embodiment, the processor 403 may also perform: if the value of the first distance is smaller than a preset distance threshold value, assigning the value of the preset distance threshold value to the first distance; and if the value of the second distance is smaller than the preset distance threshold value, assigning the value of the preset distance threshold value to the second distance.
In one embodiment, when processor 403 performs acquiring the first distance and the second distance, it may perform: the first distance and the second distance are acquired once at preset time intervals.
Then, when the processor 403 executes the determining the network traffic allocation ratio of the first Wi-Fi network and the second Wi-Fi network according to the first distance and the second distance, it may execute: and determining the network traffic distribution ratio of the first Wi-Fi network and the second Wi-Fi network according to the latest acquired first distance and second distance.
When the processor 403 executes the network traffic distribution of the electronic device for data transmission to the first Wi-Fi network and the second Wi-Fi network according to the network traffic distribution ratio, the method may be executed: and distributing the network traffic of the electronic equipment for data transmission to the first Wi-Fi network and the second Wi-Fi network according to the latest determined network traffic distribution proportion.
In one implementation, when the processor 403 executes to obtain the distance between the electronic device and the access point device corresponding to the accessed Wi-Fi network, the method may be executed: controlling the electronic equipment to interact with the access point equipment back and forth once; acquiring the round trip time spent for carrying out the round trip interaction once, and recording as T; and calculating the distance D= (T multiplied by C)/(2) between the electronic equipment and the accessed access point equipment, wherein C is the speed of light.
In another embodiment, when the processor 403 executes to obtain the distance between the electronic device and the access point device corresponding to the accessed Wi-Fi network, the method may be executed: acquiring the intensity value of Wi-Fi signals received by the electronic equipment; and determining the distance between the electronic equipment and the access point equipment corresponding to the accessed Wi-Fi network according to the intensity value of the received Wi-Fi signal.
In the foregoing embodiments, the descriptions of the embodiments are focused on, and the portions of an embodiment that are not described in detail in the foregoing embodiments may be referred to in the foregoing detailed description of the data transmission method, which is not repeated herein.
The data transmission device provided by the embodiment of the present application belongs to the same concept as the data transmission method in the above embodiment, and any method provided in the data transmission method embodiment may be run on the data transmission device, and the specific implementation process is detailed in the data transmission method embodiment, which is not repeated here.
It should be noted that, for the data transmission method according to the embodiment of the present application, it will be understood by those skilled in the art that all or part of the flow of implementing the data transmission method according to the embodiment of the present application may be implemented by controlling related hardware through a computer program, where the computer program may be stored in a computer readable storage medium, such as a memory, and executed by at least one processor, and the execution may include the flow of the embodiment of the data transmission method as described in the embodiment. The storage medium may be a magnetic disk, an optical disk, a Read Only Memory (ROM), a random access Memory (RAM, random Access Memory), etc.
For the data transmission device according to the embodiment of the present application, each functional module may be integrated in one processing chip, or each module may exist alone physically, or two or more modules may be integrated in one module. The integrated modules may be implemented in hardware or in software functional modules. The integrated module, if implemented as a software functional module and sold or used as a stand-alone product, may also be stored on a computer readable storage medium such as read-only memory, magnetic or optical disk, etc.
The foregoing describes in detail a data transmission method, apparatus, storage medium and electronic device provided in the embodiments of the present application, and specific examples are applied to illustrate the principles and embodiments of the present application, where the foregoing examples are only used to help understand the method and core idea of the present application; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in light of the ideas of the present application, the present description should not be construed as limiting the present application.

Claims (6)

1. The data transmission method is applied to electronic equipment, and is characterized in that the electronic equipment comprises a first Wi-Fi module and a second Wi-Fi module, the electronic equipment is connected to a first Wi-Fi network through the first Wi-Fi module and is connected to a second Wi-Fi network through the second Wi-Fi module, and the method comprises the following steps:
acquiring a first distance every preset time interval, wherein the first distance is the distance between the electronic equipment and the access point equipment corresponding to the first Wi-Fi network;
acquiring a second distance every preset time interval, wherein the second distance is the distance between the electronic equipment and the access point equipment corresponding to the second Wi-Fi network;
if the value of the first distance is smaller than a preset distance threshold value, assigning the value of the preset distance threshold value to the first distance;
if the value of the second distance is smaller than the preset distance threshold value, assigning the value of the preset distance threshold value to the second distance; the preset distance threshold is used for calculating the network flow distribution proportion;
if the values of the first distance and the second distance are not smaller than the preset distance threshold, maintaining the values of the first distance and the second distance unchanged;
Determining the ratio of the second distance to the first distance which is currently acquired as the network traffic distribution ratio of the first Wi-Fi network to the second Wi-Fi network;
and distributing the network traffic of the electronic equipment for data transmission to the first Wi-Fi network and the second Wi-Fi network according to the network traffic distribution proportion.
2. The data transmission method according to claim 1, wherein obtaining a distance between the electronic device and an access point device corresponding to the accessed Wi-Fi network comprises:
controlling the electronic equipment to interact with the access point equipment back and forth once;
acquiring the round trip time spent for carrying out the round trip interaction once, and recording as T;
and calculating the distance D= (T multiplied by C)/(2) between the electronic equipment and the accessed access point equipment, wherein C is the speed of light.
3. The data transmission method according to claim 1, wherein obtaining a distance between the electronic device and an access point device corresponding to the accessed Wi-Fi network comprises:
acquiring the intensity value of Wi-Fi signals received by the electronic equipment;
and determining the distance between the electronic equipment and the access point equipment corresponding to the accessed Wi-Fi network according to the intensity value of the received Wi-Fi signal.
4. A data transmission apparatus for an electronic device, the electronic device comprising a first Wi-Fi module and a second Wi-Fi module, the electronic device being connected to a first Wi-Fi network through the first Wi-Fi module and to a second Wi-Fi network through the second Wi-Fi module, the apparatus comprising:
the first acquisition module is used for acquiring a first distance every preset time interval, wherein the first distance is the distance between the electronic equipment and the access point equipment corresponding to the first Wi-Fi network;
the second acquisition module is used for acquiring a second distance every preset time interval, wherein the second distance is the distance between the electronic equipment and the access point equipment corresponding to the second Wi-Fi network;
the determining module is used for assigning the value of the preset distance threshold value to the first distance if the value of the first distance is smaller than the preset distance threshold value; if the value of the second distance is smaller than the preset distance threshold value, assigning the value of the preset distance threshold value to the second distance; the preset distance threshold is used for calculating the network flow distribution proportion; if the values of the first distance and the second distance are not smaller than the preset distance threshold, maintaining the values of the first distance and the second distance unchanged; determining the ratio of the second distance to the first distance which is currently acquired as the network traffic distribution ratio of the first Wi-Fi network to the second Wi-Fi network;
And the processing module is used for distributing the network traffic of the electronic equipment for data transmission to the first Wi-Fi network and the second Wi-Fi network according to the network traffic distribution proportion.
5. A computer-readable storage medium, on which a computer program is stored, characterized in that the computer program, when executed on a computer, causes the computer to perform the method of any one of claims 1 to 3.
6. An electronic device comprising a memory, a processor, wherein the processor executes the method of any of claims 1 to 3 by invoking a computer program stored in the memory.
CN202010916788.6A 2020-09-03 2020-09-03 Data transmission method and device, storage medium and electronic equipment Active CN112073995B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010916788.6A CN112073995B (en) 2020-09-03 2020-09-03 Data transmission method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010916788.6A CN112073995B (en) 2020-09-03 2020-09-03 Data transmission method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN112073995A CN112073995A (en) 2020-12-11
CN112073995B true CN112073995B (en) 2023-09-12

Family

ID=73666536

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010916788.6A Active CN112073995B (en) 2020-09-03 2020-09-03 Data transmission method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN112073995B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101854663A (en) * 2010-04-30 2010-10-06 华为技术有限公司 Data transmission equipment and method and communication system
CN109617802A (en) * 2018-12-13 2019-04-12 Oppo广东移动通信有限公司 Link aggregation implementation method and Related product
CN109803325A (en) * 2019-02-12 2019-05-24 Oppo广东移动通信有限公司 Data distribution method, device, mobile terminal and storage medium
CN109922504A (en) * 2019-03-27 2019-06-21 Oppo广东移动通信有限公司 Data distribution method and Related product
CN111148182A (en) * 2019-12-30 2020-05-12 Oppo广东移动通信有限公司 Device control method, device, storage medium and electronic device
WO2020164349A1 (en) * 2019-02-12 2020-08-20 Oppo广东移动通信有限公司 Data transmission control method and related product

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101854663A (en) * 2010-04-30 2010-10-06 华为技术有限公司 Data transmission equipment and method and communication system
CN109617802A (en) * 2018-12-13 2019-04-12 Oppo广东移动通信有限公司 Link aggregation implementation method and Related product
CN109803325A (en) * 2019-02-12 2019-05-24 Oppo广东移动通信有限公司 Data distribution method, device, mobile terminal and storage medium
WO2020164349A1 (en) * 2019-02-12 2020-08-20 Oppo广东移动通信有限公司 Data transmission control method and related product
CN109922504A (en) * 2019-03-27 2019-06-21 Oppo广东移动通信有限公司 Data distribution method and Related product
CN111148182A (en) * 2019-12-30 2020-05-12 Oppo广东移动通信有限公司 Device control method, device, storage medium and electronic device

Also Published As

Publication number Publication date
CN112073995A (en) 2020-12-11

Similar Documents

Publication Publication Date Title
CN113259952B (en) Beam indication method, device, equipment and medium
CN113382439B (en) Information reporting method, access mode determining method, terminal and network equipment
CN110176672A (en) Adjust method, apparatus, electronic equipment and the storage medium in antenna scanning direction
CN112805936B (en) Inter-cell interference mitigation method and electronic device for the same
CN103002497A (en) AAS (advanced antenna system) based information interaction method, AAS based information interaction system, UE (user equipment) and base station
CN108093444B (en) Wireless network transmission rate control method and device, terminal equipment and storage medium
CN114521012B (en) Positioning method, positioning device, terminal equipment, base station and position management server
CN109495840B (en) Wireless communication method, device, system and storage medium
US10054664B2 (en) Enhanced time of arrival positioning system
CN113766528A (en) Positioning processing method, terminal and network side equipment
CN112073995B (en) Data transmission method and device, storage medium and electronic equipment
CN108307485B (en) Wireless network scanning method and device, terminal equipment and storage medium
CN111083763B (en) Network control method, network control device, storage medium and electronic equipment
Chilukuri et al. Raincloud-cloudlet selection for effective cyber foraging
CN108134808A (en) A kind of network request method and device
CN112787734B (en) Signal-to-interference-and-noise ratio measuring method, device, equipment and medium
CN112152689B (en) Beam transmission control method and device and transmitting end
CN112886990B (en) Interference elimination method and device and electronic equipment
CN105188113B (en) A kind of information processing method and radio reception device
CN112954758A (en) Network switching method and device and electronic equipment
US20240073882A1 (en) Beam Control Method and Apparatus for Intelligent Surface Device and Electronic Device
CN112600605B (en) Method and device for switching antenna, electronic equipment and storage medium
US20240080723A1 (en) Information processing method and apparatus, terminal, and network side device
WO2023236094A1 (en) Sensing result information sending method and apparatus, sensing result information receiving method and apparatus, and device and storage medium
CN112888012B (en) Method, apparatus, device and medium for determining measurement purpose

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