CN110913447B - Network control method, network control device, storage medium and electronic equipment - Google Patents

Network control method, network control device, storage medium and electronic equipment Download PDF

Info

Publication number
CN110913447B
CN110913447B CN201911396227.1A CN201911396227A CN110913447B CN 110913447 B CN110913447 B CN 110913447B CN 201911396227 A CN201911396227 A CN 201911396227A CN 110913447 B CN110913447 B CN 110913447B
Authority
CN
China
Prior art keywords
network
wifi
data transmission
switching
wifi network
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
CN201911396227.1A
Other languages
Chinese (zh)
Other versions
CN110913447A (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 CN201911396227.1A priority Critical patent/CN110913447B/en
Publication of CN110913447A publication Critical patent/CN110913447A/en
Application granted granted Critical
Publication of CN110913447B publication Critical patent/CN110913447B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/0005Control or signalling for completing the hand-off
    • H04W36/0083Determination of parameters used for hand-off, e.g. generation or modification of neighbour cell lists
    • H04W36/0085Hand-off measurements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/24Reselection being triggered by specific parameters
    • H04W36/30Reselection being triggered by specific parameters by measured or perceived connection quality data

Landscapes

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

Abstract

The application discloses a network control method, a network control device, a storage medium and an electronic device, wherein the network control method comprises the following steps: acquiring a first network parameter of a first WiFi module and a second network parameter of a second WiFi module, wherein the network parameters represent the network quality of the WiFi network; when the network quality of the first WiFi network is worse than that of the second WiFi network, acquiring target historical switching information; determining the switching error times according to the target historical switching information; and when the switching error times do not meet the preset condition, judging that the electronic equipment needs to switch the WiFi network for data transmission. In the scheme, when the network quality of the first WiFi network is inferior to that of the second WiFi network and the switching error times do not meet the preset conditions, the WiFi network for data transmission is switched, so that the problem that the data transmission efficiency is low due to the fact that the WiFi network is frequently switched for transmission is avoided.

Description

Network control method, network control device, storage medium and electronic equipment
Technical Field
The present application belongs to the field of information technology, and in particular, to a network control method, apparatus, storage medium, and electronic device.
Background
With the continuous development of wireless network technology, data transmission based on wireless network has become a common communication mode for people. In the related art, the electronic device may select a WiFi network with better network quality from two connected WiFi networks in real time for data transmission, so as to improve the efficiency of data transmission. However, when the WiFi network with better network quality is selected in real time for data transmission to improve the efficiency of data transmission, information is frequently switched to the WiFi network for transmission, and the efficiency of data transmission is low because the information is frequently switched to the WiFi network for transmission.
Disclosure of Invention
The embodiment of the application provides a network control method, a network control device, a storage medium and electronic equipment, which can avoid low data transmission efficiency caused by frequent information switching to a WiFi network for transmission.
In a first aspect, an embodiment of the present application provides a network control method, including:
when the electronic equipment performs data transmission based on a first WiFi network and does not perform data transmission based on a second WiFi network, acquiring a first network parameter of a first WiFi module, wherein the first network parameter represents the network quality of the first WiFi network;
acquiring a second network parameter of a second WiFi module, wherein the second network parameter represents the network quality of the second WiFi network;
when the network quality of the first WiFi network is worse than that of the second WiFi network, acquiring target historical switching information, wherein the target historical switching information is information for switching a network for data transmission between the first WiFi network and the second WiFi network;
determining the switching error times according to the target historical switching information;
when the switching error times meet a preset condition, judging that the electronic equipment does not need to switch a WiFi network for data transmission;
and when the switching error times do not meet the preset condition, judging that the electronic equipment needs to switch the WiFi network for data transmission.
In a second aspect, an embodiment of the present application provides a network control apparatus, including:
the device comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a first network parameter of a first WiFi module when the electronic equipment performs data transmission based on a first WiFi network and does not perform data transmission based on a second WiFi network, and the first network parameter represents the network quality of the first WiFi network;
a second obtaining module, configured to obtain a second network parameter of a second WiFi module, where the second network parameter represents a network quality of the second WiFi network;
a third obtaining module, configured to obtain target historical handover information when the network quality of the first WiFi network is worse than the network quality of the second WiFi network, where the target historical handover information is information of a network used for data transmission that is handed over between the first WiFi network and the second WiFi network;
the first determining module is used for determining the switching error times according to the target historical switching information;
the first judging module is used for judging that the electronic equipment does not need to switch the WiFi network for data transmission when the switching error times meet a preset condition;
and the second judging module is used for judging that the electronic equipment needs to switch the WiFi network for data transmission when the switching error times do not meet the preset condition.
In a third aspect, a storage medium is provided in this application, where a computer program is stored, and when the computer program runs on a computer, the computer is caused to execute a network control method as provided in any of the embodiments of this application.
In a fourth aspect, an electronic device provided in an embodiment of the present application includes a processor and a memory, where the memory has a computer program, and the processor is configured to execute the network control method provided in any embodiment of the present application by calling the computer program.
According to the network control scheme provided by the embodiment of the application, when the electronic equipment performs data transmission based on the first WiFi network and does not perform data transmission based on the second WiFi network, the first network parameter of the first WiFi module and the second network parameter of the second WiFi module are obtained, and the network parameters represent the network quality of the WiFi network. And when the network quality of the first WiFi network is worse than that of the second WiFi network, acquiring target historical switching information. And then determining the switching error times according to the target historical switching information, and judging that the electronic equipment needs to switch the WiFi network for data transmission when the switching error times do not meet the preset condition. That is, when it is determined that the network quality of the first WiFi network is worse than the network quality of the second WiFi network, the electronic device needs to switch the WiFi network for data transmission only if the number of switching errors does not meet the preset condition, so that it is avoided that the data transmission efficiency is low due to frequent switching of information to the WiFi network for transmission.
Drawings
The technical solutions and advantages of the present application will become apparent from the following detailed description of specific embodiments of the present application when taken in conjunction with the accompanying drawings.
Fig. 1 is a first flowchart of a network control method according to an embodiment of the present application.
Fig. 2 is a second flowchart of a network control method according to an embodiment of the present application.
Fig. 3 is a schematic structural diagram of a network control apparatus according to an embodiment of the present application.
Fig. 4 is a schematic structural diagram of a first electronic device according to an embodiment of the present application.
Fig. 5 is a second structural schematic diagram of an electronic device provided in the embodiment of the present application.
Detailed Description
The following description is based on illustrated embodiments of the application and should not be taken as limiting the application with respect to other embodiments that are not detailed herein. The term "module" as used herein may be considered a software object executing on the computing system. The various modules, engines, and services herein may be considered as objects of implementation on the computing system.
An execution main body of the network control method may be the network control device provided in the embodiment of the present application, or an electronic device integrated with the network control device. The electronic equipment comprises a first WiFi module and a second WiFi module. The electronic device may be a smart phone, a tablet computer, a Personal Digital Assistant (PDA), or the like.
The following is a detailed description of the analysis.
Referring to fig. 1, fig. 1 is a first flowchart of a network control method according to an embodiment of the present disclosure, where the network control method includes the following steps:
101. when the electronic equipment performs data transmission based on a first WiFi network and does not perform data transmission based on a second WiFi network, acquiring a first network parameter of a first WiFi module, wherein the first network parameter represents the network quality of the first WiFi network.
In the embodiment of the application, when the electronic device performs data transmission based on the first WiFi network and does not perform data transmission based on the second WiFi network, the electronic device may obtain the first network parameter of the first WiFi module.
The electronic device can be connected to a first WiFi network through the first WiFi module and connected to a second WiFi network through the second WiFi module. The first WiFi network and the second WiFi network may be wireless signals of different frequency bands, for example, the first WiFi network is a wireless signal of a 2.4G frequency band, and the second WiFi network is a wireless signal of a 5G frequency band. It is understood that the electronic device can perform data transmission based on the first WiFi network only on the premise of connecting to the first WiFi network.
Wherein the first network parameter represents a network quality of the first WiFi network. The first network parameter may be represented by a related performance parameter of a first WiFi network to which the first WiFi module is connected. The first network parameters may include one or more performance parameters of the first WiFi network. For example, the first network parameter includes a signal strength of the first WiFi network. For example, the first network parameters include signal strength, time delay, and the like of the first WiFi network. In addition, the embodiment of the present application is not particularly limited to the manner of acquiring the first network parameter.
102. And acquiring a second network parameter of the second WiFi module, wherein the second network parameter represents the network quality of the second WiFi network.
In the embodiment of the application, when the electronic device performs data transmission based on the first WiFi network and does not perform data transmission based on the second WiFi network, the electronic device may obtain the second network parameter of the second WiFi module.
Wherein the second network parameter represents a network quality of the second WiFi network. The second network parameter may be represented by a related performance parameter of a second WiFi network to which the second WiFi module is connected. The second network parameters may include one or more performance parameters of the second WiFi network. For example, the second network parameter includes a signal strength of the second WiFi network. For example, the second network parameters include signal strength, time delay, and the like of the second WiFi network. In addition, as for the manner of obtaining the second network parameter, the embodiment of the present application is not particularly limited.
It should be noted that, in the implementation, the present application is not limited by the execution sequence of the described steps, and some steps may be performed in other sequences or simultaneously without conflict. For example, in some embodiments, the obtaining of the first network parameter and the obtaining of the second network parameter may be performed sequentially or simultaneously.
103. When the network quality of the first WiFi network is worse than that of the second WiFi network, target historical switching information is obtained, wherein the target historical switching information is information for switching a network for data transmission between the first WiFi network and the second WiFi network.
In the embodiment of the application, after the first network parameter of the first WiFi module and the second network parameter of the second WiFi module are obtained, the electronic device determines whether the network quality of the first WiFi network is worse than that of the second WiFi network according to the first network parameter and the second network parameter.
And when the network quality of the first WiFi network is not worse than that of the second WiFi network, the electronic equipment is judged not to need to switch the WiFi network for data transmission.
When the network quality of the first WiFi network is lower than that of the second WiFi network, the fact that the electronic equipment needs to switch the WiFi network for data transmission is preliminarily judged, and the electronic equipment obtains target historical switching information so as to further judge whether the electronic equipment needs to switch the WiFi network for data transmission.
The performance parameters used for representing the network parameters are different, and the evaluation methods of the network quality are also different. For example, when the network parameters are expressed by signal strength, a network with high signal strength is good in quality, and a network with low signal strength is poor in quality. For example, when the network parameters are expressed by the delay, the network quality is good when the delay is short, the network quality is poor when the delay is long, and the like.
Wherein the target historical handover information comprises one or more historical handover information. One historical handover information is information about a WiFi network that is handed over once for data transmission. Before or after the WiFi network for data transmission is switched, the WiFi network for data transmission of the electronic equipment is always only one WiFi network.
It should be noted that, for an electronic device that supports connection of two WiFi networks at the same time, there are some application scenarios in daily life, for example, when the electronic device is running an application program that supports only one network transmission and the quality of the WiFi network currently performing a network task is not good, the electronic device needs to switch the WiFi network that performs the network task, instead of performing the network task through two WiFi networks together. Therefore, the WiFi network for data transmission of the electronic device always has only one WiFi network no matter before or after the WiFi network for data transmission is switched.
The embodiment of the present application is not particularly limited to the manner of acquiring the target historical handover information. For example, the electronic device takes all the history switching information as the target history switching information. For example, the electronic device acquires history switching information generated within a preset time period as target history switching information by taking the current time as an end time. For example, the electronic device takes historical handover information of a WiFi network regarding data transmission being handed over from a first WiFi network to a second WiFi network as target historical handover information or the like.
104. And determining the switching error times according to the target historical switching information.
In the embodiment of the application, after the target history switching information is acquired, the electronic device determines the number of switching errors according to the target history switching information, so as to be used as a basis for further judging whether the electronic device needs to switch the WiFi network for data transmission.
The switching error times refer to switching times that do not improve the data transmission efficiency of the electronic device after switching the network for data transmission. Conversely, the correct number of times of switching refers to the number of times of switching that improves the data transmission efficiency of the electronic device after switching the network for data transmission.
For example, the electronic device determines, as the number of switching errors, the number of times of switching in which the switching evaluation result is a switching error in the target history switching information.
Wherein, for each historical switching information in the target historical switching information, a switching evaluation result is included. Each handover evaluation result is a handover error or a handover correct.
It should be noted that, each time the electronic device switches the WiFi network for data transmission, the switching needs to be evaluated, and the switching evaluation result is obtained. The correct switching is used for indicating that the data transmission efficiency of the electronic equipment is improved after the WiFi network for data transmission is switched. The handover error is used to indicate that the data transmission efficiency of the electronic device is not improved after the WiFi network performs data transmission.
105. And when the switching error times meet the preset condition, judging that the electronic equipment does not need to switch the WiFi network for data transmission.
In the embodiment of the application, after the switching error times are determined according to the target historical switching information, the electronic equipment judges whether the switching error times meet the preset condition. When the switching error times meet the preset condition, it is presumed that the data transmission efficiency of the electronic device cannot be improved if the WiFi network for data transmission is switched. The electronic device determines that a WiFi network for data transmission does not need to be switched.
The switching error frequency meeting the preset condition means that the switching error frequency meets a certain requirement, for example, the switching error frequency is greater than a certain numerical value.
106. And when the switching error times do not meet the preset condition, judging that the electronic equipment needs to switch the WiFi network for data transmission.
In the embodiment of the application, after the switching error times are determined according to the target historical switching information, the electronic equipment judges whether the switching error times meet the preset condition. When the number of switching errors does not satisfy the preset condition, it is presumed that the data transmission efficiency of the electronic device can be improved if the WiFi network for data transmission is switched. The electronic device determines that a WiFi network for data transmission needs to be switched.
It should be noted that, in general, the efficiency of data transmission based on the WiFi network with good network quality is higher than the efficiency of data transmission based on the WiFi network with poor network quality. However, because some influencing factors, such as the network quality evaluation, are not necessarily correct, such as the network quality evaluation is correct but the number of network connections is too large, the efficiency of data transmission based on the WiFi network with good network quality is sometimes lower than that based on the WiFi network with poor network quality.
Therefore, the accuracy is not high when the WiFi network which is used for carrying out data transmission needs to be switched or not is judged according to the network quality represented by the network parameters. Based on this, after determining that the WiFi network which needs to be switched for data transmission is switched according to the network quality indicated by the network parameter, the electronic device further needs to further determine whether the WiFi network which needs to be switched for data transmission needs to be switched according to the switching error frequency of the switching evaluation result in the target historical switching information, so that the data transmission efficiency is prevented from being low due to the fact that the WiFi network is frequently switched for data transmission, the switching accuracy is improved, and the data transmission efficiency is prevented from being low due to the fact that the WiFi network which conducts data transmission is wrongly switched.
As can be seen from the above, when it is determined that the network quality of the first WiFi network is worse than the network quality of the second WiFi network, the electronic device needs to switch the WiFi network for data transmission only if the switching error times of the switching error in the target historical switching information is not satisfied with the preset condition according to the switching evaluation result, so that it is possible to avoid that the data transmission efficiency is low due to frequent switching of information to the WiFi network for transmission and that the data transmission efficiency is low due to incorrect switching of the WiFi network for data transmission.
Referring to fig. 2, fig. 2 is a second flow chart of a network control method according to an embodiment of the present disclosure, where the network control method includes the following steps:
201. when the electronic equipment performs data transmission based on a first WiFi network and does not perform data transmission based on a second WiFi network, acquiring a first network parameter of a first WiFi module, wherein the first network parameter represents the network quality of the first WiFi network.
In the embodiment of the application, when the electronic device performs data transmission based on the first WiFi network and does not perform data transmission based on the second WiFi network, the electronic device may obtain the first network parameter of the first WiFi module.
Wherein the first network parameter represents a network quality of the first WiFi network. The first network parameter may be represented by a related performance parameter of a first WiFi network to which the first WiFi module is connected. The first network parameters may include one or more performance parameters of the first WiFi network. For example, the first network parameter includes a signal strength of the first WiFi network. For example, the first network parameters include signal strength, time delay, and the like of the first WiFi network. In addition, the embodiment of the present application is not particularly limited to the manner of acquiring the first network parameter.
In some embodiments, when obtaining the first network parameter of the first WiFi module, the electronic device may perform the following:
and acquiring first signal strength of the first WiFi network, and taking the first signal strength as a first network parameter of the first WiFi module.
In general, the higher the signal strength of the WiFi network, the better the network quality, and the higher the efficiency of data transmission based on the WiFi network. The lower the signal strength of the WiFi network, the worse the network quality, the lower the efficiency of data transmission based on the WiFi network.
In some embodiments, when obtaining the first network parameter of the first WiFi module, the electronic device may perform the following:
and acquiring a first time delay of the first WiFi network, and taking the first time delay as a first network parameter of the first WiFi module.
Wherein, the time delay refers to the time required for the information to be transmitted from the electronic equipment to the access point based on the first WiFi network. Such as the time required for the message to travel from the electronic device to the access point based on the first WiFi network. In addition, in general, the shorter the delay of the WiFi network, the better the network quality, and the higher the efficiency of data transmission based on the WiFi network. The longer the delay, the worse the network quality, the lower the efficiency of data transmission based on the WiFi network.
It should be noted that the electronic device may update the time delay once every a certain time interval, and store the updated time delay. When the electronic device needs to obtain the time delay, the stored time delay can be directly obtained.
In some embodiments, when obtaining the first network parameter of the first WiFi module, the electronic device may perform the following:
acquiring first signal strength of a first WiFi network, and grading according to the first signal strength to obtain a first score;
acquiring a first time delay of a first WiFi network, and grading according to the first time delay to obtain a second score;
and acquiring a first network parameter of the first WiFi module according to the first score and the second score.
Wherein the higher the first signal strength, the higher the first score, and the lower the first signal strength, the lower the first score. The shorter the first delay, the higher the second score, the longer the first delay, and the lower the second score.
The first network parameter may be a sum of a first score obtained based on the first signal strength and a second score obtained based on the first delay, or a value obtained by weighted summation of the first score obtained based on the first signal strength and the second score obtained based on the first delay.
In addition, in general, the larger the value of the network parameter is, the better the network quality is for the WiFi network, and the higher the efficiency of data transmission based on the WiFi network is. The smaller the value of the network parameter is, the worse the network quality is, and the lower the efficiency of data transmission based on the WiFi network is.
Note that, the weight value for the weighted sum is set in the electronic device in advance. The user may manually modify the weight values.
In some embodiments, before acquiring the first network parameter of the first WiFi module, the electronic device may further perform the following:
acquiring a first data transmission speed of a first WiFi network during data transmission;
and if the first data transmission speed is less than the preset speed, acquiring the first network parameter of the first WiFi module.
The first data transmission speed represents the data transmission speed of the electronic equipment based on the first WiFi network. The larger the first data transmission speed is, the faster the electronic device performs data transmission based on the first WiFi network is, and the higher the data transmission efficiency of the electronic device is. The smaller the first data transmission speed is, the slower the electronic device performs data transmission based on the first WiFi network is, and the lower the data transmission efficiency of the electronic device is.
The preset speed is a measure for fast data transmission. When the first data transmission speed is lower than the preset speed, it indicates that the efficiency of data transmission based on the first WiFi network is not good, and the WiFi network for data transmission may need to be switched. When the first data transmission speed is greater than or equal to the preset speed, the efficiency of data transmission based on the first WiFi network is high, and the WiFi network for data transmission does not need to be switched.
It should be noted that, the electronic device increases the condition that the first data transmission speed is less than the preset speed, and as a result, determines whether to switch the WiFi network for data transmission, it can more effectively prevent the data transmission efficiency from being low due to frequent information switching and transmission of the WiFi network.
202. And acquiring a second network parameter of the second WiFi module, wherein the second network parameter represents the network quality of the second WiFi network.
In the embodiment of the application, when the electronic device performs data transmission based on the first WiFi network and does not perform data transmission based on the second WiFi network, the electronic device may obtain the second network parameter of the second WiFi module.
Wherein the second network parameter represents a network quality of the second WiFi network. The second network parameter may be represented by a related performance parameter of a second WiFi network to which the second WiFi module is connected. The second network parameters may include one or more performance parameters of the second WiFi network. For example, the second network parameter includes a signal strength of the second WiFi network. For example, the second network parameters include signal strength, time delay, and the like of the second WiFi network. In addition, as for the manner of obtaining the second network parameter, the embodiment of the present application is not particularly limited.
In some embodiments, when obtaining the second network parameter of the second WiFi module, the electronic device may perform the following:
and acquiring second signal strength of the second WiFi network, and taking the second signal strength as a second network parameter of the second WiFi module.
In general, the higher the signal strength of the WiFi network, the better the network quality, and the higher the efficiency of data transmission based on the WiFi network. The lower the signal strength of the WiFi network, the worse the network quality, the lower the efficiency of data transmission based on the WiFi network.
In some embodiments, when obtaining the second network parameter of the second WiFi module, the electronic device may perform the following:
and acquiring a second time delay of the second WiFi network, and taking the second time delay as a second network parameter of the second WiFi module.
Wherein, the time delay refers to the time required for the information to be transmitted from the electronic equipment to the access point based on the second WiFi network. Such as the time required for the message to travel from the electronic device to the access point based on the second WiFi network. In addition, in general, the shorter the delay of the WiFi network, the better the network quality, and the higher the efficiency of data transmission based on the WiFi network. The longer the delay, the worse the network quality, the lower the efficiency of data transmission based on the WiFi network.
It should be noted that the electronic device may update the time delay once every a certain time interval, and store the updated time delay. When the electronic device needs to obtain the time delay, the stored time delay can be directly obtained.
In some embodiments, when obtaining the second network parameter of the second WiFi module, the electronic device may perform the following:
acquiring second signal strength of a second WiFi network, and grading according to the second signal strength to obtain a third score;
acquiring a second time delay of a second WiFi network, and grading according to the second time delay to obtain a fourth score;
and acquiring a second network parameter of the second WiFi module according to the third score and the fourth score.
Wherein the higher the second signal strength, the higher the third score, and the lower the second signal strength, the lower the third score. The shorter the second delay, the higher the fourth fraction, the longer the second delay, the lower the fourth fraction.
The second network parameter may be a sum of a third fraction obtained based on the second signal strength and a fourth fraction obtained based on the second time delay, or a value obtained by weighted summation of the third fraction obtained based on the second signal strength and a fourth fraction obtained based on the second time delay.
In addition, in general, the larger the value of the network parameter is, the better the network quality is for the WiFi network, and the higher the efficiency of data transmission based on the WiFi network is. The smaller the value of the network parameter is, the worse the network quality is, and the lower the efficiency of data transmission based on the WiFi network is.
Note that, the weight value for the weighted sum is set in the electronic device in advance. The user may manually modify the weight values. Compared with the mode of representing the network parameters by the first performance parameters (such as signal strength), the mode of representing the network parameters by the two performance parameters (such as signal strength and time delay) has the advantages that the network parameters are more reasonable, and the network quality represented by the network parameters is more accurate.
203. When the network quality of the first WiFi network is worse than that of the second WiFi network, first identification information of an access point currently connected with the first WiFi network is acquired, and second identification information of the access point currently connected with the second WiFi network is acquired.
In the embodiment of the application, after the first network parameter of the first WiFi module and the second network parameter of the second WiFi module are obtained, the electronic device judges whether the network quality of the first WiFi network is worse than that of the second WiFi network according to the first network parameter and the second network parameter.
And when the network quality of the first WiFi network is not worse than that of the second WiFi network, the electronic equipment is judged not to need to switch the WiFi network for data transmission.
When the network quality of the first WiFi network is worse than that of the second WiFi network, the fact that the electronic equipment needs to switch the WiFi network for data transmission is preliminarily judged, the electronic equipment obtains first identification information of an access point currently connected with the first WiFi network and second identification information of the access point currently connected with the second WiFi network, the first identification information and the second identification information are used as basis for obtaining target historical switching information, and whether the electronic equipment needs to switch the WiFi network for data transmission is further judged through the target historical switching information.
Wherein each access point has unique identification information. The WiFi network is different in current connection access point, and different in obtained identification information. The embodiment of the present application is not particularly limited to the specific representation form of the identification information. For example, the identification information may be a Media Access Control Address (MAC Address) of the WiFi network, which is commonly referred to as a physical Address.
204. And acquiring target historical switching information according to the first identification information and the second identification information, wherein the target historical switching information is information for switching the network for data transmission between the first WiFi network and the second WiFi network.
In the embodiment of the application, after the first identification information and the second identification information are obtained, the electronic device may obtain the target historical switching information from the historical switching information stored in the preset information base according to the first identification information and the second identification information. The preset information base is mainly used for storing historical switching information.
In some embodiments, the electronic device may obtain the target history switching information according to the first identification information and the second identification information, and perform the following: and searching historical switching information related to the first identification information and the second identification information in the historical switching information of the preset information base to serve as target historical switching information.
Wherein each historical switching information further comprises two identification information. The historical switching information related to the first identification information refers to historical switching information with the first identification information. The historical switching information related to the second identification information refers to the historical switching information with the second identification information.
205. And determining the switching error times according to the target historical switching information.
In the embodiment of the application, after the target history switching information is acquired, the electronic device determines the number of switching errors according to the target history switching information, so as to be used as a basis for further judging whether the electronic device needs to switch the WiFi network for data transmission.
For example, the electronic device determines, as the number of switching errors, the number of times of switching in which the switching evaluation result is a switching error in the target history switching information.
Wherein, for each historical switching information in the target historical switching information, a switching evaluation result is included. Each handover evaluation result is a handover error or a handover correct.
It should be noted that, each time the electronic device switches the WiFi network for data transmission, the switching needs to be evaluated, and the switching evaluation result is obtained. The correct switching is used for indicating that the data transmission efficiency of the electronic equipment is improved after the WiFi network for data transmission is switched. The handover error is used to indicate that the data transmission efficiency of the electronic device is not improved after the WiFi network performs data transmission.
206. And judging whether the switching error frequency is greater than a first preset threshold, wherein if the switching error frequency is less than or equal to the first preset threshold, the switching error frequency is judged not to meet the preset condition.
In the embodiment of the application, after determining the number of switching errors according to the target historical switching information, the electronic device needs to determine whether the number of switching errors is greater than a first preset threshold. And when the switching error frequency is less than or equal to a first preset threshold value, judging that the switching error frequency does not meet a preset condition. And when the switching error frequency is greater than a first preset threshold value, judging that the switching error frequency meets a preset condition.
The first preset threshold is a numerical value preset in the electronic equipment. The first preset threshold may be set by the electronic device according to a certain rule, or may be set by a user.
In another embodiment, 206 may also perform the following:
determining the total switching times according to the target historical switching information, and determining the ratio of the switching error times to the total switching times, wherein the total switching times comprise the switching error times and the switching success times;
and judging whether the ratio is greater than a second preset threshold, wherein if the ratio is less than or equal to the second preset threshold, the switching error frequency is judged not to meet the preset condition.
Wherein, the ratio of the switching error times to the switching total times is a value between 0 and 1. The second preset threshold is a numerical value preset in the electronic device. The second preset threshold may be set by the electronic device according to a certain rule, or may be set by the user.
207. And when the switching error times meet the preset condition, judging that the electronic equipment does not need to switch the WiFi network for data transmission.
In the embodiment of the application, when the switching error frequency is greater than a first preset threshold, the electronic device determines that the switching error frequency meets a preset condition, and it is presumed that the data transmission efficiency of the electronic device cannot be improved if the WiFi network for data transmission is switched. The electronic device determines that a WiFi network for data transmission does not need to be switched.
208. And when the switching error times do not meet the preset condition, judging that the electronic equipment needs to switch the WiFi network for data transmission, and switching the WiFi network for data transmission from the first WiFi network to the second WiFi network.
In the embodiment of the application, when the number of switching errors is less than or equal to the first preset threshold, the electronic device determines that the number of switching errors does not satisfy the preset condition, and it is presumed that the data transmission efficiency of the electronic device can be improved if the WiFi network for data transmission is switched. The electronic equipment judges that the WiFi network for data transmission needs to be switched, and switches the WiFi network for data transmission from the first WiFi network to the second WiFi network.
In some embodiments, before switching the WiFi network for data transmission from the first WiFi network to the second WiFi network, the electronic device may perform the following:
acquiring a first data transmission speed of a first WiFi network when the first WiFi network executes a network task;
after switching the WiFi network for data transmission from the first WiFi network to the second WiFi network, the electronic device may perform the following:
acquiring a second data transmission speed of a second WiFi network when the second WiFi network executes a network task;
evaluating the switching according to the first data transmission speed and the second data transmission speed to obtain a switching evaluation result;
and generating historical switching information according to the switching evaluation result, and storing the historical switching information into a preset information base.
The electronic equipment switches the WiFi network for data transmission once to obtain a switching evaluation result. One handover evaluation result is handover correct or handover error. A historical handover message includes a handover evaluation result. Information other than the handover evaluation result may also be included in one of the historical handover information.
The first data transmission speed represents the speed of the electronic equipment for executing the network task based on the first WiFi network. The second data transmission speed represents how fast the electronic device performs network tasks based on the second WiFi network.
It should be noted that the greater the data transmission speed, the shorter the data transmission time, and the higher the data transmission efficiency.
In some embodiments, the electronic device may perform the following operations when evaluating the handover according to the first data transmission speed and the second data transmission speed and obtaining a handover evaluation result:
when the first data transmission speed is lower than the second data transmission speed, the switching is correctly used as a switching evaluation result of the current switching evaluation;
and when the first data transmission speed is greater than or equal to the second data transmission speed, taking the switching error as a switching evaluation result of the current switching evaluation.
When the first data transmission speed is lower than the second data transmission speed, the data transmission efficiency before switching the network for data transmission is lower than the data transmission efficiency after switching the network for data transmission, that is, the data transmission efficiency of the electronic device is improved by switching the network for data transmission, and the electronic device correctly switches the network as a switching evaluation result of the switching evaluation.
When the first data transmission speed is higher than the second data transmission speed, the data transmission efficiency before switching the network for data transmission is higher than the data transmission efficiency after switching the network for data transmission, that is, the data transmission efficiency of the electronic device is reduced instead by switching the network for data transmission, and the electronic device takes the switching error as the switching evaluation result of the current switching evaluation.
When the first data transmission speed is equal to the second data transmission speed, the data transmission efficiency before switching the network for data transmission is equal to the data transmission efficiency after switching the network for data transmission, that is, the data transmission efficiency of the electronic device is not changed by switching the network for data transmission. However, it takes a certain time to switch the network for data transmission, so the electronic device takes a switching error as a switching evaluation result of the current switching evaluation.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a network control device according to an embodiment of the present disclosure. The network control device 300 includes: a first obtaining module 301, a second obtaining module 302, a third obtaining module 303, a first determining module 304, a first determining module 305, and a second determining module 306.
A first obtaining module 301, configured to obtain a first network parameter of a first WiFi module when an electronic device performs data transmission based on a first WiFi network and does not perform data transmission based on a second WiFi network, where the first network parameter represents network quality of the first WiFi network;
a second obtaining module 302, configured to obtain a second network parameter of a second WiFi module, where the second network parameter represents a network quality of the second WiFi network;
a third obtaining module 303, configured to obtain target historical handover information when the network quality of the first WiFi network is worse than the network quality of the second WiFi network, where the target historical handover information is information of a network used for data transmission being handed over between the first WiFi network and the second WiFi network;
a first determining module 304, configured to determine a number of switching errors according to the target historical switching information;
a first determining module 305, configured to determine that the electronic device does not need to switch a WiFi network for data transmission when the number of switching errors satisfies a preset condition;
the second determining module 306 is configured to determine that the electronic device needs to switch a WiFi network for data transmission when the number of switching errors does not meet a preset condition.
In some embodiments, when the number of switching errors does not satisfy the preset condition and it is determined that the electronic device needs to switch the WiFi network for data transmission, the second determining module 306 may further be configured to:
and when the switching error times do not meet the preset condition, judging that the electronic equipment needs to switch the WiFi network for data transmission, and switching the WiFi network for data transmission from the first WiFi network to the second WiFi network.
In some embodiments, before switching the WiFi network for data transmission from the first WiFi network to the second WiFi network, the network control apparatus 300 further includes:
a fourth obtaining module, configured to obtain a first data transmission speed of the first WiFi network during data transmission;
after switching the WiFi network for data transmission from the first WiFi network to the second WiFi network, the network control apparatus 300 further includes:
a fifth obtaining module, configured to obtain a second data transmission speed when the second WiFi network performs data transmission;
the switching evaluation module is used for evaluating the switching according to the first data transmission speed and the second data transmission speed to obtain a switching evaluation result;
and the generating module is used for generating historical switching information according to the switching evaluation result and storing the historical switching information into a preset information base.
In some embodiments, the handover evaluation module may be further configured to, when evaluating the handover according to the first data transmission speed and the second data transmission speed to obtain a handover evaluation result:
when the first data transmission speed is lower than the second data transmission speed, the switching is correct and is used as a switching evaluation result of the switching evaluation;
and when the first data transmission speed is greater than or equal to the second data transmission speed, taking the switching error as a switching evaluation result of the current switching evaluation.
In some embodiments, when acquiring the first network parameter of the first WiFi module, the first acquiring module 301 may further be configured to:
acquiring first signal strength of a first WiFi network, and taking the first signal strength as a first network parameter of a first WiFi module;
when acquiring the second network parameter of the second WiFi module, the second acquiring module 302 may further be configured to:
and acquiring second signal strength of a second WiFi network, and taking the second signal strength as a second network parameter of the second WiFi module.
In some embodiments, when acquiring the first network parameter of the first WiFi module, the first acquiring module 301 may further be configured to:
acquiring a first time delay of a first WiFi network, and taking the first time delay as a first network parameter of the first WiFi module;
when acquiring the second network parameter of the second WiFi module, the second acquiring module 302 may further be configured to:
and acquiring a second time delay of a second WiFi network, and taking the second time delay as a second network parameter of the second WiFi module.
In some embodiments, when obtaining the target history switching information, the third obtaining module 303 may further be configured to:
acquiring first identification information of an access point currently connected with a first WiFi network and acquiring second identification information of an access point currently connected with a second WiFi network;
and acquiring target historical switching information according to the first identification information and the second identification information.
In some embodiments, after determining the number of handover errors in the target historical handover information for which the handover evaluation result is a handover error, the network control apparatus 300 further includes:
the first judging module is used for judging whether the switching error frequency is greater than a first preset threshold value, wherein if the switching error frequency is less than or equal to the first preset threshold value, the switching error frequency is judged not to meet a preset condition.
In some embodiments, after determining the number of handover errors in the target historical handover information for which the handover evaluation result is a handover error, the network control apparatus 300 further includes:
the second determining module is used for determining the total switching times according to the target historical switching information and determining the ratio of the switching error times to the total switching times, wherein the total switching times comprise the switching error times and the switching success times;
and the second judging module is used for judging whether the ratio is greater than a second preset threshold, wherein if the ratio is less than or equal to the second preset threshold, the switching error times are judged not to meet a preset condition.
In some embodiments, before the first network parameter of the first WiFi module is obtained, the fourth obtaining module is configured to obtain a first data transmission speed of the first WiFi network during data transmission;
the first obtaining module 301 may be further configured to, if the first data transmission speed is less than a preset speed, perform the obtaining of the first network parameter of the first WiFi module.
It should be noted that the network control device provided in this embodiment of the present application and the network control method in the foregoing embodiments belong to the same concept, and any method provided in the network control method embodiment may be run on the network control device, and a specific implementation process thereof is described in detail in the network control method embodiment, and is not described herein again.
As can be seen from the above, the network control apparatus 300 according to the embodiment of the present application, when the electronic device performs data transmission based on the first WiFi network and does not perform data transmission based on the second WiFi network, the first acquisition module 301 acquires a first network parameter of the first WiFi module, and the second acquisition module 302 acquires a second network parameter of the second WiFi module, wherein the network parameter represents the network quality of the WiFi network, when the network quality of the first WiFi network is worse than the network quality of the second WiFi network, the third obtaining module 303 obtains the target historical switching information, the first determining module 304 then determines the number of handover errors according to the target historical handover information, and when the number of handover errors satisfies a preset condition, the first determination module 305 determines that the electronic device does not need to switch the WiFi network for data transmission, when the number of switching errors does not satisfy the preset condition, the second determination module 306 determines that the electronic device needs to switch the WiFi network for data transmission. The electronic equipment judges whether the WiFi network for data transmission needs to be switched or not by adopting a plurality of conditions, so that the problem that the data transmission efficiency is low due to the fact that the WiFi network is frequently switched for transmission due to information can be avoided.
An electronic device is further provided in the embodiment of the present application, please refer to fig. 4, and fig. 4 is a first structural schematic diagram of the electronic device provided in the embodiment of the present application. The electronic device 400 includes a processor 401, a memory 402, and a wireless network module 403. The wireless network module 403 and the memory 402 are electrically connected to the processor 401, and the processor 401 is configured to control the wireless network module 403 and the wireless network access point to establish a connection relationship.
The processor 401 is a control center of the electronic device 400, connects various parts of the entire electronic device using various interfaces and lines, performs various functions of the electronic device 400 by running or loading a computer program stored in the memory 402 and calling data stored in the memory 402, and processes the data, thereby performing overall monitoring of the electronic device 400.
The memory 402 may be used to store software programs and modules, and the processor 401 executes various functional applications and data processing by operating the computer programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, a computer program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to use of the electronic device, and the like.
Further, the memory 402 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 access to the memory 402.
The wireless network module 403 can support simultaneous transceiving of wireless signals of two different frequency bands, and the wireless signals of the two different frequency bands do not interfere with each other. The wireless network module 403 may include a first WiFi module and a second WiFi module, which are electrically connected to the processor 401. The processor 401 may control the first WiFi module to connect to the first WiFi network and control the second WiFi module to connect to the second WiFi network.
The wireless network module 403 has a Dual Band Dual Current (DBDC) function, and supports 2 × 2 antennas (a first antenna and a second antenna), and 2 groups of antennas are all configured with an amplifying circuit and a power amplifier chip, which can support the antennas to transmit and receive signals simultaneously. When the first WiFi module and the second WiFi module operate simultaneously, the electronic device may connect two wireless signals simultaneously, such as the first WiFi network and the second WiFi network, and support data transceiving of two signal paths, such as the first WiFi path and the second WiFi path.
For example, the electronic device establishes a connection relationship between the first antenna and the first WiFi access point through the first WiFi module to form a first WiFi access, and performs data transceiving through the first WiFi access; and establishing a connection relationship between the second antenna and the second WiFi access point through the second WiFi module to form a second WiFi access, and performing data transceiving through the second WiFi access.
It should be noted that the first WiFi access is a data access formed after the electronic device establishes a connection with the first WiFi through the first WiFi module. The second WiFi access is a data access formed after the electronic device establishes a connection with the second WiFi access point through the second WiFi module.
Further, the first WiFi module and the second WiFi module support different frequency bands, for example, the first WiFi module supports a 2.4g (hz) frequency band, and the second WiFi module supports a 5g (hz) frequency band; or the first WiFi module supports a 5G frequency band, and the second WiFi module supports a 2.4G frequency band. That is, when the first WiFi module and the second WiFi module operate simultaneously, the electronic device may support transceiving of two wireless signals of different frequency bands. When the electronic device only has one wireless network sub-module to work, the electronic device can only support the transceiving of wireless signals of one frequency band, and at the moment, the first antenna and the second antenna of the electronic device are both used for transceiving wireless signals of one frequency band, so that a 2x2 multi-input multi-output antenna array is formed.
In this embodiment, the processor 401 in the electronic device 400 loads instructions corresponding to one or more processes of the computer program into the memory 402 according to the following steps, and the processor 401 runs the computer program stored in the memory 402, so as to implement various functions, as follows:
when the electronic equipment performs data transmission based on a first WiFi network and does not perform data transmission based on a second WiFi network, acquiring a first network parameter of a first WiFi module, wherein the first network parameter represents the network quality of the first WiFi network;
acquiring a second network parameter of a second WiFi module, wherein the second network parameter represents the network quality of the second WiFi network;
when the network quality of the first WiFi network is worse than that of the second WiFi network, acquiring target historical switching information, wherein the target historical switching information is information for switching a network for data transmission between the first WiFi network and the second WiFi network;
determining the switching error times according to the target historical switching information;
when the switching error times meet a preset condition, judging that the electronic equipment does not need to switch a WiFi network for data transmission;
and when the switching error times do not meet the preset condition, judging that the electronic equipment needs to switch the WiFi network for data transmission.
Referring to fig. 5, fig. 5 is a second structural schematic diagram of an electronic device according to an embodiment of the present disclosure. The electronic device 500 includes: a processor 501, a memory 502, a wireless network module 503, a power supply 504, and an input unit 505. The processor 501 is electrically connected to the memory 502, the wireless network module 503, the power supply 504, and the input unit 505, respectively.
The power supply 504 is used to power the various components of the electronic device 500. In some embodiments, the power supply 504 may be logically connected to the processor 501 through a power management system, so that functions of managing charging, discharging, and power consumption are implemented through the power management system.
The input unit 505 may be used to receive input numbers, character information, or user characteristic information (e.g., fingerprint), and generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control. The input unit 505 may include a fingerprint recognition module.
Although not shown in fig. 5, the electronic device 500 may further include a display screen, a camera, and the like, which are not described in detail herein.
In this embodiment, the processor 501 in the electronic device 500 loads instructions corresponding to one or more processes of the computer program into the memory 502, and the processor 501 runs the computer program stored in the memory 502, so as to implement various functions as follows:
when the electronic equipment performs data transmission based on a first WiFi network and does not perform data transmission based on a second WiFi network, acquiring a first network parameter of a first WiFi module, wherein the first network parameter represents the network quality of the first WiFi network;
acquiring a second network parameter of a second WiFi module, wherein the second network parameter represents the network quality of the second WiFi network;
when the network quality of the first WiFi network is worse than that of the second WiFi network, acquiring target historical switching information, wherein the target historical switching information is information for switching a network for data transmission between the first WiFi network and the second WiFi network;
determining the switching error times according to the target historical switching information;
when the switching error times meet a preset condition, judging that the electronic equipment does not need to switch a WiFi network for data transmission;
and when the switching error times do not meet the preset condition, judging that the electronic equipment needs to switch the WiFi network for data transmission.
In some embodiments, when it is determined that the electronic device needs to switch to a WiFi network for data transmission when the number of switching errors does not satisfy a preset condition, the processor 501 may perform:
and when the switching error times do not meet the preset condition, judging that the electronic equipment needs to switch the WiFi network for data transmission, and switching the WiFi network for data transmission from the first WiFi network to the second WiFi network.
In some embodiments, before switching the WiFi network for data transmission from the first WiFi network to the second WiFi network, the processor 501 may further perform:
acquiring a first data transmission speed of the first WiFi network during data transmission;
after switching the WiFi network for data transmission from the first WiFi network to the second WiFi network, the processor 501 may further perform:
acquiring a second data transmission speed when the second WiFi network carries out data transmission;
evaluating the switching according to the first data transmission speed and the second data transmission speed to obtain a switching evaluation result;
and generating historical switching information according to the switching evaluation result, and storing the historical switching information into a preset information base.
In some embodiments, when evaluating the handover according to the first data transmission speed and the second data transmission speed, and obtaining a handover evaluation result, the processor 501 may perform:
when the first data transmission speed is lower than the second data transmission speed, the switching is correct and is used as a switching evaluation result of the switching evaluation;
and when the first data transmission speed is greater than or equal to the second data transmission speed, taking the switching error as a switching evaluation result of the current switching evaluation.
In some embodiments, when obtaining the first network parameter of the first WiFi module, the processor 501 may perform:
acquiring first signal strength of a first WiFi network, and taking the first signal strength as a first network parameter of a first WiFi module;
the acquiring of the second network parameter of the second WiFi module includes:
and acquiring second signal strength of a second WiFi network, and taking the second signal strength as a second network parameter of the second WiFi module.
In some embodiments, when obtaining the first network parameter of the first WiFi module, the processor 501 may perform:
acquiring a first time delay of a first WiFi network, and taking the first time delay as a first network parameter of the first WiFi module;
when obtaining the second network parameter of the second WiFi module, the processor 501 may perform:
and acquiring a second time delay of a second WiFi network, and taking the second time delay as a second network parameter of the second WiFi module.
In some embodiments, when obtaining the target history switching information, the processor 501 may perform:
acquiring first identification information of an access point currently connected with a first WiFi network and acquiring second identification information of an access point currently connected with a second WiFi network;
and acquiring target historical switching information according to the first identification information and the second identification information.
In some embodiments, after determining the number of handover errors according to the target historical handover information, the processor 501 may further perform:
and judging whether the switching error frequency is greater than a first preset threshold, wherein if the switching error frequency is less than or equal to the first preset threshold, the switching error frequency is judged not to meet a preset condition.
In some embodiments, after determining that the handover evaluation result in the target historical handover information is a handover error number, the processor 501 may further perform:
determining the ratio of the switching error times to the number of switching evaluation results in the target historical switching information;
and judging whether the ratio is greater than a second preset threshold, wherein if the ratio is less than or equal to the second preset threshold, the switching error times are judged not to meet a preset condition.
In some embodiments, before obtaining the first network parameter of the first WiFi module, the processor 501 may further perform:
acquiring a first data transmission speed of the first WiFi network during data transmission;
and if the first data transmission speed is less than a preset speed, executing the acquisition of the first network parameter of the first WiFi module.
Therefore, when the electronic device provided in the embodiment of the application determines that the network quality of the first WiFi network is worse than the network quality of the second WiFi network, the electronic device needs to switch the WiFi network for data transmission only if the number of switching errors does not meet the preset condition, so that it is possible to avoid that the data transmission efficiency is low due to frequent switching of information to the WiFi network for transmission and that the data transmission efficiency is low due to incorrect switching of the WiFi network for data transmission.
An embodiment of the present application further provides a storage medium, where the storage medium stores a computer program, and when the computer program runs on a computer, the computer is caused to execute the memory management method in any of the above embodiments, for example: when the electronic equipment performs data transmission based on a first WiFi network and does not perform data transmission based on a second WiFi network, acquiring a first network parameter of a first WiFi module, wherein the first network parameter represents the network quality of the first WiFi network; acquiring a second network parameter of a second WiFi module, wherein the second network parameter represents the network quality of the second WiFi network; when the network quality of the first WiFi network is worse than that of the second WiFi network, acquiring target historical switching information, wherein the target historical switching information is information for switching a network for data transmission between the first WiFi network and the second WiFi network; determining the switching error times according to the target historical switching information; when the switching error times meet a preset condition, judging that the electronic equipment does not need to switch a WiFi network for data transmission; and when the switching error times do not meet the preset condition, judging that the electronic equipment needs to switch the WiFi network for data transmission.
In the embodiment of the present application, the storage medium may be a magnetic disk, an optical disk, a Read Only Memory (ROM), a Random Access Memory (RAM), or the like.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
It should be noted that, for the network control method of the embodiment of the present application, it can be understood by a person skilled in the art that all or part of the process of implementing the network control method of the embodiment of the present application can be completed by controlling the relevant hardware through a computer program, where the computer program can be stored in a computer readable storage medium, such as a memory of an electronic device, and executed by at least one processor in the electronic device, and during the execution process, the process of the embodiment of the network control method can be included. The storage medium may be a magnetic disk, an optical disk, a read-only memory, a random access memory, etc.
In the network control device according to the embodiment of the present application, each functional module may be integrated into one processing chip, or each module may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented as a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium such as a read-only memory, a magnetic or optical disk, or the like.
The network control method, the network control device, the storage medium and the electronic device provided by the embodiments of the present application are described in detail above, and a specific example is applied in the present application to explain the principle and the implementation of the present application, and the description of the above embodiments is only used to help understanding the method and the core idea of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A network control method is applied to an electronic device, wherein the electronic device comprises a first WiFi module and a second WiFi module, the electronic device is connected to a first WiFi network through the first WiFi module and is connected to a second WiFi network through the second WiFi module, and the method comprises the following steps:
when the electronic equipment performs data transmission based on the first WiFi network and does not perform data transmission based on the second WiFi network, acquiring a first network parameter of the first WiFi module, wherein the first network parameter represents the network quality of the first WiFi network;
acquiring a second network parameter of the second WiFi module, wherein the second network parameter represents the network quality of the second WiFi network;
when the network quality of the first WiFi network is worse than that of the second WiFi network, acquiring target historical switching information, wherein the target historical switching information is information for switching a network for data transmission between the first WiFi network and the second WiFi network;
determining the switching error times according to the target historical switching information;
when the switching error times meet a preset condition, judging that the electronic equipment does not need to switch a WiFi network for data transmission;
when the switching error times do not meet a preset condition, judging that the electronic equipment needs to switch a WiFi network for data transmission;
acquiring a first data transmission speed of the first WIFI network during data transmission;
switching a network for data transmission from the first WIFI network to the second WIFI network;
acquiring a second data transmission speed when the second WIFI network transmits data;
when the first data transmission speed is lower than the second data transmission speed, the switching is correct and is used as a switching evaluation result of the switching evaluation;
when the first data transmission speed is greater than or equal to the second data transmission speed, taking a switching error as a switching evaluation result of the current switching evaluation;
and generating historical switching information according to the switching evaluation result, and storing the historical switching information into a preset information base.
2. The network control method of claim 1, wherein the obtaining the first network parameter of the first WiFi module comprises:
acquiring first signal strength of a first WiFi network, and taking the first signal strength as a first network parameter of a first WiFi module;
the acquiring of the second network parameter of the second WiFi module includes:
and acquiring second signal strength of a second WiFi network, and taking the second signal strength as a second network parameter of the second WiFi module.
3. The network control method of claim 1, wherein the obtaining the first network parameter of the first WiFi module comprises:
acquiring a first time delay of a first WiFi network, and taking the first time delay as a first network parameter of the first WiFi module;
the acquiring of the second network parameter of the second WiFi module includes:
and acquiring a second time delay of a second WiFi network, and taking the second time delay as a second network parameter of the second WiFi module.
4. The network control method of claim 1, wherein the obtaining of the target historical handover information comprises:
acquiring first identification information of an access point currently connected with a first WiFi network and acquiring second identification information of an access point currently connected with a second WiFi network;
and acquiring target historical switching information according to the first identification information and the second identification information.
5. The network control method according to claim 1, wherein after determining the number of handover errors according to the target historical handover information, further comprising:
and judging whether the switching error frequency is greater than a first preset threshold, wherein if the switching error frequency is less than or equal to the first preset threshold, the switching error frequency is judged not to meet a preset condition.
6. The network control method according to claim 1, wherein after determining the number of handover errors according to the target historical handover information, further comprising:
determining the total switching times according to the target historical switching information, and determining the ratio of the switching error times to the total switching times, wherein the total switching times comprise the switching error times and the switching success times;
and judging whether the ratio is greater than a second preset threshold, wherein if the ratio is less than or equal to the second preset threshold, the switching error times are judged not to meet a preset condition.
7. The network control method according to claim 1, wherein before the obtaining the first network parameter of the first WiFi module, further comprising:
acquiring a first data transmission speed of the first WiFi network during data transmission;
and if the first data transmission speed is less than a preset speed, executing the acquisition of the first network parameter of the first WiFi module.
8. A network control device applied to an electronic device, wherein the electronic device comprises a first WiFi module and a second WiFi module, the electronic device is connected to a first WiFi network through the first WiFi module and is connected to a second WiFi network through the second WiFi module, and the network control device comprises:
the first obtaining module is configured to obtain a first network parameter of the first WiFi module when the electronic device performs data transmission based on the first WiFi network and does not perform data transmission based on the second WiFi network, where the first network parameter represents network quality of the first WiFi network;
a second obtaining module, configured to obtain a second network parameter of the second WiFi module, where the second network parameter represents a network quality of the second WiFi network;
a third obtaining module, configured to obtain target historical handover information when the network quality of the first WiFi network is worse than the network quality of the second WiFi network, where the target historical handover information is information of a network used for data transmission that is handed over between the first WiFi network and the second WiFi network;
the first determining module is used for determining the switching error times according to the target historical switching information;
the first judging module is used for judging that the electronic equipment does not need to switch the WiFi network for data transmission when the switching error times meet a preset condition;
the second judging module is used for judging that the electronic equipment needs to switch the WiFi network for data transmission when the switching error times do not meet the preset condition;
the third acquisition module is used for acquiring a first data transmission speed of the first WIFI network during data transmission;
the switching module is used for switching the network for data transmission from the first WIFI network to the second WIFI network;
the fourth acquisition module is used for acquiring a second data transmission speed when the second WIFI network transmits data;
a third determining module, configured to, when the first data transmission speed is lower than the second data transmission speed, take the handover correctness as a handover evaluation result of the current handover evaluation;
a fourth determining module, configured to take a handover error as a handover evaluation result of the current handover evaluation when the first data transmission speed is greater than or equal to the second data transmission speed;
and the storage module is used for generating historical switching information according to the switching evaluation result and storing the historical switching information into a preset information base.
9. A storage medium having stored thereon a computer program, characterized in that, when the computer program runs on a computer, it causes the computer to execute the network control method according to any one of claims 1 to 7.
10. An electronic device comprising a processor, a memory, said memory having a computer program, wherein said processor is adapted to perform the network control method of any of claims 1 to 7 by invoking said computer program.
CN201911396227.1A 2019-12-30 2019-12-30 Network control method, network control device, storage medium and electronic equipment Active CN110913447B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911396227.1A CN110913447B (en) 2019-12-30 2019-12-30 Network control method, network control device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911396227.1A CN110913447B (en) 2019-12-30 2019-12-30 Network control method, network control device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN110913447A CN110913447A (en) 2020-03-24
CN110913447B true CN110913447B (en) 2022-01-07

Family

ID=69814139

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911396227.1A Active CN110913447B (en) 2019-12-30 2019-12-30 Network control method, network control device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN110913447B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112272398B (en) * 2020-11-13 2024-01-19 Oppo广东移动通信有限公司 Data transmission method and device, electronic equipment and storage medium
CN113099497B (en) * 2021-03-30 2022-09-02 捷开通讯(深圳)有限公司 Network switching method, storage medium and electronic equipment
CN114221862A (en) * 2021-12-08 2022-03-22 深圳绿米联创科技有限公司 Network configuration method and device of equipment, electronic equipment and storage medium
CN114157659B (en) * 2022-02-10 2022-06-21 荣耀终端有限公司 File sharing method and terminal equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104703234A (en) * 2013-12-04 2015-06-10 中国移动通信集团公司 Method and device for access switching in wireless local area network
CN106231640A (en) * 2016-07-29 2016-12-14 北京小米移动软件有限公司 Wireless access point switching method and device
CN106559848A (en) * 2015-09-30 2017-04-05 苹果公司 For enhanced handover mechanism and the devices, systems and methods of cell reselection
CN106851723A (en) * 2017-02-16 2017-06-13 北京小米移动软件有限公司 cell switching method and device
CN108337702A (en) * 2017-12-25 2018-07-27 中国电子科技集团公司第七研究所 A kind of wireless switching acceptance controlling method based on switching historical information statistics
CN109257783A (en) * 2018-11-09 2019-01-22 浙江国自机器人技术有限公司 A kind of roaming switching method, device, system and readable storage medium storing program for executing

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2595426B1 (en) * 2011-11-15 2014-10-08 Alcatel Lucent Method for changing the wireless access point associated with a terminal in a WiFi-DECT cordless telecommunications network
KR101689621B1 (en) * 2015-07-22 2016-12-27 (주)피타소프트 Image recording device having function for dual wifi access mode and image sharing system having the said device
CN107426781B (en) * 2017-08-16 2021-04-13 高新兴物联科技有限公司 Dual-frequency WiFi automatic switching method and device and computer readable storage medium
CN108307432B (en) * 2017-09-29 2020-08-25 济南龙超信息技术有限公司 WiFi control method, mobile terminal and computer-readable storage medium
CN109803325B (en) * 2019-02-12 2020-12-22 Oppo广东移动通信有限公司 Data distribution method and device, mobile terminal and storage medium
CN109788519B (en) * 2019-03-12 2021-06-08 深圳市网是科技有限公司 Double-frequency WiFi intelligent switching method based on 2.4G self-adaptive threshold

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104703234A (en) * 2013-12-04 2015-06-10 中国移动通信集团公司 Method and device for access switching in wireless local area network
CN106559848A (en) * 2015-09-30 2017-04-05 苹果公司 For enhanced handover mechanism and the devices, systems and methods of cell reselection
CN106231640A (en) * 2016-07-29 2016-12-14 北京小米移动软件有限公司 Wireless access point switching method and device
CN106851723A (en) * 2017-02-16 2017-06-13 北京小米移动软件有限公司 cell switching method and device
CN108337702A (en) * 2017-12-25 2018-07-27 中国电子科技集团公司第七研究所 A kind of wireless switching acceptance controlling method based on switching historical information statistics
CN109257783A (en) * 2018-11-09 2019-01-22 浙江国自机器人技术有限公司 A kind of roaming switching method, device, system and readable storage medium storing program for executing

Also Published As

Publication number Publication date
CN110913447A (en) 2020-03-24

Similar Documents

Publication Publication Date Title
CN110913447B (en) Network control method, network control device, storage medium and electronic equipment
CN108491061B (en) Processing method and device of radio frequency antenna, storage medium and electronic equipment
CN108810260A (en) antenna switching control method and related product
CN113316206B (en) Cell reselection method, device, terminal equipment and storage medium
CN108924908B (en) WiFi scanning method and device and electronic device
CN111148182B (en) Device control method, device, storage medium and electronic device
CN111866976A (en) Network switching method and device
CN108540152A (en) Processing method, device, storage medium and the electronic equipment of radio frequency interference
CN112333114A (en) Data transmission method, device, storage medium, terminal and network access point equipment
CN112415367A (en) Drive chip abnormality detection method and device, electronic equipment and readable storage medium
CN111083763B (en) Network control method, network control device, storage medium and electronic equipment
JP2022088528A (en) In-vehicle calling method, device, electronic device, computer-readable storage medium, and computer program
CN108965042B (en) Network delay obtaining method and device, terminal equipment and storage medium
CN107797832B (en) Application cleaning method and device, storage medium and electronic equipment
CN111123728A (en) Unmanned vehicle simulation method, device, equipment and computer readable medium
CN111065126B (en) Hot spot sharing method and device, storage medium and electronic equipment
CN110289890B (en) Near field communication test method, system, mobile terminal and storage medium
CN109302669B (en) Polling mechanism setting method and device, storage medium and electronic equipment
CN110797985B (en) Coil switching method and device, storage medium and electronic equipment
CN111148278A (en) Data transmission method, device, storage medium and electronic equipment
CN112367428A (en) Electric quantity display method and system, storage medium and mobile terminal
CN113383311A (en) Application processing method and device, storage medium and electronic equipment
CN112492554A (en) Data transmission method, device, storage medium and terminal
CN110113653A (en) A kind of display methods and terminal of setting option
CN112468952B (en) Positioning method, positioning device, storage medium and electronic equipment

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