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

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

Info

Publication number
CN111163510B
CN111163510B CN201911381709.XA CN201911381709A CN111163510B CN 111163510 B CN111163510 B CN 111163510B CN 201911381709 A CN201911381709 A CN 201911381709A CN 111163510 B CN111163510 B CN 111163510B
Authority
CN
China
Prior art keywords
network
wifi
power consumption
wifi network
historical power
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
CN201911381709.XA
Other languages
Chinese (zh)
Other versions
CN111163510A (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 CN201911381709.XA priority Critical patent/CN111163510B/en
Publication of CN111163510A publication Critical patent/CN111163510A/en
Application granted granted Critical
Publication of CN111163510B publication Critical patent/CN111163510B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0261Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3206Monitoring of events, devices or parameters that trigger a change in power modality
    • G06F1/3212Monitoring battery levels, e.g. power saving mode being initiated when battery voltage goes below a certain level
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0261Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level
    • H04W52/0274Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level by switching on or off the equipment or parts thereof
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The application discloses a network control method, a device, a storage medium and electronic equipment, wherein the network control method comprises the following steps: acquiring the residual electric quantity of the electronic equipment; when the residual electric quantity is smaller than a first preset electric quantity, determining a first historical power consumption rate corresponding to the first WiFi module and a second historical power consumption rate corresponding to the second WiFi module; if the first historical power consumption rate is greater than the second historical power consumption rate, distributing network tasks executed by the first WiFi network to the second WiFi network, and closing the first WiFi network; and if the first historical power consumption rate is smaller than or equal to the second historical power consumption rate, distributing the network task executed by the second WiFi network to the first WiFi network, and closing the second WiFi network. According to the network control scheme provided by the embodiment, when the residual electric quantity is smaller than the first preset electric quantity, the WiFi network with the high historical power consumption rate is turned off, so that the power consumption of the electronic equipment can be reduced.

Description

Network control method and device, storage medium and electronic equipment
Technical Field
The present application belongs to the field of information technologies, and in particular, to a network control method, a device, a storage medium, and an electronic apparatus.
Background
With the continuous development of wireless network technology, information transmission based on wireless network has become a common communication mode for people. In the related art, an electronic device may perform information transmission through two WiFi networks, so as to improve efficiency of information transmission. However, the efficiency of information transmission is improved by performing information transmission through two WiFi networks, and meanwhile, the power consumption of the battery is accelerated.
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 reduce the power consumption of the electronic equipment.
In a first aspect, an embodiment of the present application provides a network control method, including:
acquiring the residual electric quantity of the electronic equipment;
when the residual electric quantity is smaller than a first preset electric quantity, determining a first historical power consumption rate corresponding to the first WiFi module and a second historical power consumption rate corresponding to the second WiFi module;
if the first historical power consumption rate is greater than the second historical power consumption rate, distributing network tasks executed by the first WiFi network to the second WiFi network, and closing the first WiFi network;
and if the first historical power consumption rate is smaller than or equal to the second historical power consumption rate, distributing the network task executed by the second WiFi network to the first WiFi network, and closing the second WiFi network.
In a second aspect, an embodiment of the present application provides a network control device, including:
the first acquisition module is used for acquiring the electric quantity of the electronic equipment;
the first determining module is used for determining a first historical power consumption rate corresponding to the first WiFi module and a second historical power consumption rate corresponding to the second WiFi module when the electric quantity is smaller than a first preset electric quantity;
the first closing module is used for distributing the network task executed by the first WiFi network to the second WiFi network and closing the first WiFi network if the first historical power consumption rate is larger than the second historical power consumption rate;
and the second closing module is used for distributing the network task executed by the second WiFi network to the first WiFi network and closing the second WiFi network if the first historical power consumption rate is smaller than or equal to the second historical power consumption rate.
In a third aspect, a storage medium provided by an embodiment of the present application has a computer program stored thereon, which when run on a computer causes the computer to perform a network control method as provided by any of the embodiments of the present application.
In a fourth aspect, an electronic device provided by 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 a network control method provided by any one of the embodiments of the present application by calling the computer program.
According to the network control scheme provided by the embodiment of the application, when the residual electric quantity is smaller than the first preset electric quantity, the electronic equipment determines a first historical power consumption rate corresponding to the first WiFi module and a second historical power consumption rate corresponding to the second WiFi module, when the first historical power consumption rate is larger than the second historical power consumption rate, the network task executed by the first WiFi network is distributed to the second WiFi network and the first WiFi network is closed, and when the first historical power consumption rate is smaller than or equal to the second historical power consumption rate, the network task executed by the second WiFi network is distributed to the first WiFi network and the second WiFi network is closed. When the residual electric quantity is smaller than the first preset electric quantity, the electronic equipment closes the WiFi network with high historical power consumption rate, and the power consumption of the electronic equipment can be reduced.
Drawings
The technical solution of the present application and its advantageous effects will be made apparent by the following detailed description of the specific embodiments of the present application with reference to the accompanying drawings.
Fig. 1 is a schematic flow chart of a network control method according to an embodiment of the present application.
Fig. 2 is a schematic diagram of a second flow of a network control method according to an embodiment of the present application.
Fig. 3 is a third flow chart of a network control method according to an embodiment of the present application.
Fig. 4 is a schematic structural diagram of a network control device according to an embodiment of the present application.
Fig. 5 is a schematic diagram of a first structure of an electronic device according to an embodiment of the present application.
Fig. 6 is a second schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following description is based on illustrative embodiments of the application and should not be taken as limiting other embodiments of the application not described in detail herein. The term "module" as used herein may be considered as a software object executing on the computing system. The various modules, engines, and services herein may be viewed as implementation objects on the computing system.
The embodiment of the application provides a network control method, and an execution subject of the network control method can be the network control device provided by the embodiment of the application or electronic equipment integrated with the network control device. The electronic device comprises a first WiFi module and a second WiFi module. The electronic device may be a smart phone, tablet, palm top (PDA, personal Digital Assistant), etc.
Specific analysis is described below.
Referring to fig. 1, fig. 1 is a schematic flow chart of a network control method according to an embodiment of the application. The network control method may include the steps of:
101. And acquiring the residual electric quantity of the electronic equipment.
In the embodiment of the application, the electronic equipment can acquire the residual electric quantity of the electronic equipment. The remaining power of the electronic device is a variable value in the time domain, so the remaining power acquired by the electronic device each time may be different. For example, the remaining power of the electronic device may gradually decrease with the use of the electronic device, where the remaining power obtained last time by the electronic device is smaller than the remaining power obtained next time.
It should be noted that, for the method for obtaining the remaining power of the electronic device, embodiments of the present application are not limited specifically. For example, the electronic device may measure a battery power of the electronic device through the power meter to obtain a remaining power of the electronic device.
102. And when the residual electric quantity is smaller than the first preset electric quantity, determining a first historical power consumption rate corresponding to the first WiFi module and a second historical power consumption rate corresponding to the second WiFi module.
In the embodiment of the application, after the residual electric quantity of the electronic equipment is obtained, the electronic equipment judges whether the obtained residual electric quantity is smaller than the first preset electric quantity.
When the residual electric quantity is smaller than the first preset electric quantity, the electronic equipment enters a low-electric-quantity mode at the moment, and the electronic equipment can determine a first historical power consumption rate corresponding to the first WiFi module and serve as a judging basis of the power consumption of the first WiFi module. And determining a second historical power consumption rate corresponding to the second WiFi module, and taking the second historical power consumption rate as a judging basis of the power consumption of the second WiFi module.
When the residual electric quantity is larger than or equal to the first preset electric quantity, the electronic equipment does not enter a low-electric-quantity mode at the moment, and the electronic equipment jointly executes network tasks based on the first WiFi network and the second WiFi network. The electronic device is connected to a first WiFi network through a first WiFi module and connected to a second WiFi network through a second WiFi module. The allocation manner of the network tasks of the first WiFi network and the second WiFi network is not specifically limited in the embodiments of the present application. For example, a WiFi network with a high network signal strength may be assigned more network tasks than a WiFi network with a low network signal strength.
The first preset electric quantity is preset in the electronic equipment, can be set independently by a user, and can be set uniformly by a manufacturer. The first preset electric quantity is a limit value for the electronic equipment to enter the low electric quantity mode, and when the residual electric quantity of the battery in the electronic equipment is smaller than the first preset electric quantity, the electronic equipment enters the low electric quantity mode.
The first historical power consumption rate refers to the power consumption rate of the first WiFi module in the historical time, and indicates the power consumption speed of the first WiFi module. The second historical power consumption rate refers to the power consumption rate of the second WiFi module in the historical time duration, and represents the power consumption speed of the second WiFi module.
It should be noted that, for a specific numerical range of the historical duration, embodiments of the present application are not limited in particular. The historical time length of the first WiFi module is the same as the historical time length of the second WiFi module.
It is understood that the end time of the history period is before the acquisition time of the remaining power smaller than the first preset power.
103. And if the first historical power consumption rate is greater than the second historical power consumption rate, distributing the network task executed by the first WiFi network to the second WiFi network, and closing the first WiFi network.
In the embodiment of the application, after determining the first historical power consumption rate corresponding to the first WiFi module and the second historical power consumption rate corresponding to the second WiFi module, the electronic device may compare the first historical power consumption rate with the second historical power consumption rate.
When the first historical power consumption rate is greater than the second historical power consumption rate, the power consumption of the first WiFi module is determined to be greater than the power consumption of the second WiFi module, namely more power is consumed for information transmission through the first WiFi network than for information transmission through the second WiFi network. The electronic device may assign network tasks performed by the first WiFi network to the second WiFi network and shut down the first WiFi network. Therefore, the electric quantity consumed by executing the network task is reduced, and the power consumption of the electronic equipment is reduced.
Wherein network tasks at different moments of the electronic device may be different, and the network tasks may change over time.
104. And if the first historical power consumption rate is smaller than or equal to the second historical power consumption rate, distributing the network task executed by the second WiFi network to the first WiFi network, and closing the second WiFi network.
In the embodiment of the application, after determining the first historical power consumption rate corresponding to the first WiFi module and the second historical power consumption rate corresponding to the second WiFi module, the electronic device may compare the first historical power consumption rate with the second historical power consumption rate.
When the first historical power consumption rate is smaller than the second historical power consumption rate, the power consumption of the first WiFi module is smaller than the power consumption of the second WiFi module, namely the information transmission through the first WiFi network is conducted in a next mode, and the power consumption of the information transmission through the second WiFi network is smaller. The electronic device may assign network tasks performed by the second WiFi network to the first WiFi network and shut down the second WiFi network. Therefore, the electric quantity consumed by executing the network task is reduced, and the power consumption of the electronic equipment is reduced.
When the first historical power consumption rate is equal to the second historical power consumption rate, the power consumption of the first WiFi module is equal to the power consumption of the second WiFi module, namely the information transmission through the first WiFi network is the same as the power consumption of the information transmission through the second WiFi network. The electronic device may close any one of the two WiFi networks, such as closing the second WiFi network, so as to reduce the power consumption for performing the network task, and reduce the power consumption of the electronic device.
As can be seen from the above, in the network control method provided by the embodiment of the present application, when the remaining power is smaller than the first preset power, the electronic device determines a first historical power consumption rate corresponding to the first WiFi module and a second historical power consumption rate corresponding to the second WiFi module, when the first historical power consumption rate is greater than the second historical power consumption rate, the network task executed by the first WiFi network is allocated to the second WiFi network, and the first WiFi network is closed, and when the first historical power consumption rate is smaller than or equal to the second historical power consumption rate, the network task executed by the second WiFi network is allocated to the first WiFi network, and the second WiFi network is closed. When the residual electric quantity is smaller than the first preset electric quantity, the electronic equipment closes the WiFi network with high historical power consumption rate, and the power consumption of the electronic equipment can be reduced.
Referring to fig. 2, fig. 2 is a schematic diagram of a second flow of a network control method according to an embodiment of the application. The network control method may include the steps of:
201. when the electric quantity of the electronic equipment is equal to the second preset electric quantity, the network tasks are averagely distributed to the first WiFi network and the second WiFi network until the electric quantity of the electronic equipment is equal to the first preset electric quantity.
In the embodiment of the application, when the electric quantity of the electronic device is equal to the second preset electric quantity, the electronic device can averagely distribute the network tasks to the first WiFi network and the second WiFi network until the electric quantity of the electronic device is equal to the first preset electric quantity. When the electric quantity of the battery is in the second preset electric quantity to the first preset electric quantity, the electronic equipment executes the network task through the first WiFi network and the second WiFi network according to the ratio of the network task 1:1.
The first preset electric quantity and the second preset electric quantity are values preset in the electronic equipment, and the second preset electric quantity is larger than the first preset electric quantity. For example, the first preset electrical quantity is 20%, the second preset electrical quantity is 30%, etc.
202. And acquiring the residual electric quantity of the electronic equipment.
In the embodiment of the application, after the electric quantity of the electronic device is equal to the first preset electric quantity, the electronic device can acquire the residual electric quantity of the electronic device.
The method for obtaining the residual electric quantity of the electronic device is not particularly limited in the embodiment of the application. For example, the electronic device may test the battery power of the electronic device through the power meter to obtain the remaining power of the electronic device.
203. And when the residual electric quantity is smaller than the first preset electric quantity, counting the duration of the electric quantity of the electronic equipment from the second preset electric quantity to the first preset electric quantity.
In the embodiment of the application, after the residual electric quantity of the electronic equipment is obtained, the electronic equipment judges whether the obtained residual electric quantity is smaller than the first preset electric quantity. When the residual electric quantity is smaller than the first preset electric quantity, the electronic equipment enters a low electric quantity mode at the moment, and the electronic equipment can count the time length of the electronic equipment from the second preset electric quantity to the first preset electric quantity, so that the time length can be used as the history time length.
204. The method comprises the steps of obtaining first historical power consumption of a first WiFi module in a time period and second historical power consumption of a second WiFi module in the time period.
In the embodiment of the application, after the time length that the electric quantity of the electronic device is reduced from the second preset electric quantity to the first preset electric quantity is counted, the electronic device can acquire the first historical power consumption of the first WiFi module in the time length and the second historical power consumption of the second WiFi module in the time length.
The first historical power consumption is the power consumption of the first WiFi module in the historical time, and the second historical power consumption is the power consumption of the second WiFi module in the historical time. The historical time length takes the moment when the electric quantity of the electronic equipment is equal to the second preset threshold value as a starting point and takes the moment when the electric quantity of the electronic equipment is equal to the first preset threshold value as an ending point.
205. And calculating a first historical power consumption rate corresponding to the first WiFi module according to the first historical power consumption and the duration.
In the embodiment of the application, after the first historical power consumption of the first WiFi module in the duration is obtained, the electronic equipment can calculate the first historical power consumption rate corresponding to the first WiFi module according to the first historical power consumption and the duration.
Wherein S1 represents a first historical power consumption rate, Q1 represents a first historical power consumption, T1 represents a time period, and a calculation formula of the first historical power consumption rate is as follows:
S1=Q1÷T1
206. And calculating a second historical power consumption rate corresponding to the second WiFi module according to the second historical power consumption and the duration.
In the embodiment of the application, after obtaining the second historical power consumption of the second WiFi module in the duration, the electronic device may calculate the second historical power consumption rate corresponding to the second WiFi module according to the second historical power consumption and the duration.
Wherein S2 represents a first historical power consumption rate, Q2 represents a first historical power consumption, T1 represents a time period, and a calculation formula of the first historical power consumption rate is as follows:
S2=Q2÷T1
in addition, it should be noted that, in the implementation, the present application is not limited by the execution order of the steps described, and some steps may be performed in other orders or performed simultaneously without conflict. For example, in some embodiments, 205 and 206 may be performed simultaneously, 205 may be performed first and then 206 may be performed, or 206 may be performed first and then 205 may be performed.
207. And if the first historical power consumption rate is greater than the second historical power consumption rate, distributing the network task executed by the first WiFi network to the second WiFi network, and closing the first WiFi network.
In the embodiment of the application, after the first historical power consumption rate corresponding to the first WiFi module and the second historical power consumption rate corresponding to the second WiFi module are obtained, the electronic device may compare the first historical power consumption rate with the second historical power consumption rate.
When the first historical power consumption rate is greater than the second historical power consumption rate, the power consumption of the first WiFi module is determined to be greater than the power consumption of the second WiFi module, namely more power is consumed for information transmission through the first WiFi network than for information transmission through the second WiFi network. The electronic device may assign network tasks performed by the first WiFi network to the second WiFi network and shut down the first WiFi network. Therefore, the electric quantity consumed by executing the network task is reduced, and the power consumption of the electronic equipment is reduced.
Wherein network tasks at different moments of the electronic device may be different, and the network tasks may change over time.
208. And if the first historical power consumption rate is smaller than or equal to the second historical power consumption rate, distributing the network task executed by the second WiFi network to the first WiFi network, and closing the second WiFi network.
In the embodiment of the application, after determining the first historical power consumption rate corresponding to the first WiFi module and the second historical power consumption rate corresponding to the second WiFi module, the electronic device may compare the first historical power consumption rate with the second historical power consumption rate.
When the first historical power consumption rate is smaller than the second historical power consumption rate, the power consumption of the first WiFi module is smaller than the power consumption of the second WiFi module, namely the information transmission through the first WiFi network is conducted in a next mode, and the power consumption of the information transmission through the second WiFi network is smaller. The electronic device may assign network tasks performed by the second WiFi network to the first WiFi network and shut down the second WiFi network. Therefore, the electric quantity consumed by executing the network task is reduced, and the power consumption of the electronic equipment is reduced.
Referring to fig. 3, fig. 3 is a schematic diagram of a third flow of a network control method according to an embodiment of the application. The network control method may include the steps of:
301. and acquiring the residual electric quantity of the electronic equipment.
In the embodiment of the application, the electronic equipment can acquire the residual electric quantity of the electronic equipment. The remaining power of the electronic device is a variable value in the time domain, so the remaining power acquired by the electronic device each time may be different. For example, the remaining power of the electronic device may gradually decrease with the use of the electronic device, where the remaining power obtained last time by the electronic device is smaller than the remaining power obtained next time.
302. And when the residual electric quantity is smaller than the first preset electric quantity, counting the duration of the electric quantity of the electronic equipment in the preset electric quantity interval.
In the embodiment of the application, after the residual electric quantity of the electronic equipment is obtained, the electronic equipment judges whether the obtained residual electric quantity is smaller than the first preset electric quantity. When the remaining power is smaller than the first preset power, the electronic device enters a low power mode at this time, and the electronic device may count a duration of the power of the electronic device in a preset power interval, for example, count a duration of the power of the electronic device in a preset power interval of [25%,15% ].
It should be noted that, when the remaining power is greater than or equal to the first preset power, the electronic device does not enter the low power mode at this time, and the electronic device performs the network task together based on the first WiFi network and the second WiFi network. The allocation manner of the network tasks of the first WiFi network and the second WiFi network is not specifically limited in the embodiments of the present application. For example, a WiFi network with a high network signal strength may be assigned more network tasks than a WiFi network with a low network signal strength.
303. And determining a first network task amount processed by the first WiFi module in the duration and a second network task amount processed by the second WiFi module in the duration.
In the embodiment of the application, after the duration that the electric quantity of the electronic device is in the preset electric quantity interval is counted, the electronic device can determine the first network task quantity processed by the first WiFi module in the duration and the second network task quantity processed by the second WiFi module in the duration. The network task amount is the total amount of network tasks processed by the WiFi module in a time length.
304. And judging whether the difference value of the first network task quantity and the second network task quantity meets a preset range or not.
In the embodiment of the application, after determining the first network task amount processed by the first WiFi module in the duration and the second network task amount processed by the second WiFi module in the duration, the electronic equipment can judge whether the difference value between the first network task amount and the second network task amount meets the preset range. When the difference between the first network task amount and the second network task amount meets a preset range, the network task amount is an irrelevant factor of the historical power consumption. When the difference value between the first network task amount and the second network task amount does not meet the preset range, the network task amount is an independent variable of the historical power consumption.
The preset range is preset in the electronic device, and may be formulated by a user or formulated by the electronic device according to a certain rule, for example, the preset range is [ -D1, D1] or the like.
It is understood that the independent factor is a variable affecting the historical power consumption in addition to the independent variable in the control variable experiment. Independent variables are variables that are manipulated and controlled by the experimenter in a controlled variable experiment.
305. If the difference value of the first network task amount and the second network task amount meets the preset range, acquiring first historical power consumption of the first WiFi module in the duration and second historical power consumption of the second WiFi module in the duration.
In the embodiment of the application, after judging whether the difference value of the first network task amount and the second network task amount meets the preset range, when the difference value of the first network task amount and the second network task amount meets the preset range, the network task amount is an irrelevant factor of the historical power consumption, and the electronic equipment can acquire the first historical power consumption of the first WiFi module in the duration and the second historical power consumption of the second WiFi module in the duration.
306. And calculating a first historical power consumption rate corresponding to the first WiFi module according to the first historical power consumption and the duration.
In the embodiment of the application, after the first historical power consumption of the first WiFi module in the duration is obtained, the electronic equipment can calculate the first historical power consumption rate corresponding to the first WiFi module according to the first historical power consumption and the duration.
Wherein S1 represents a first historical power consumption rate, Q1 represents a first historical power consumption, T1 represents a time period, and a calculation formula of the first historical power consumption rate is as follows:
S1=Q1÷T1
307. and calculating a second historical power consumption rate corresponding to the second WiFi module according to the second historical power consumption and the duration.
In the embodiment of the application, after obtaining the second historical power consumption of the second WiFi module in the duration, the electronic device may calculate the second historical power consumption rate corresponding to the second WiFi module according to the second historical power consumption and the duration.
Wherein S2 represents a first historical power consumption rate, Q2 represents a first historical power consumption, T1 represents a time period, and a calculation formula of the first historical power consumption rate is as follows:
S2=Q2÷T1
if the first historical power consumption rate is greater than the second historical power consumption rate, then 308 is performed. Wherein 308 specifically performs as follows: and allocating the network task executed by the first WiFi network to the second WiFi network, and closing the first WiFi network.
In the embodiment of the application, after the first historical power consumption rate corresponding to the first WiFi module and the second historical power consumption rate corresponding to the second WiFi module are obtained, the electronic device may compare the first historical power consumption rate with the second historical power consumption rate.
When the first historical power consumption rate is greater than the second historical power consumption rate, the power consumption of the first WiFi module is determined to be greater than the power consumption of the second WiFi module, namely more power is consumed for information transmission through the first WiFi network than for information transmission through the second WiFi network. The electronic device may assign network tasks performed by the first WiFi network to the second WiFi network and shut down the first WiFi network. Therefore, the electric quantity consumed by executing the network task is reduced, and the power consumption of the electronic equipment is reduced.
Wherein network tasks at different moments of the electronic device may be different, and the network tasks may change over time.
If the first historical power consumption rate is less than or equal to the second historical power consumption rate, 309 is performed. Wherein 309 specifically performs as follows: and allocating the network task executed by the second WiFi network to the first WiFi network, and closing the second WiFi network.
In the embodiment of the application, after determining the first historical power consumption rate corresponding to the first WiFi module and the second historical power consumption rate corresponding to the second WiFi module, the electronic device may compare the first historical power consumption rate with the second historical power consumption rate.
When the first historical power consumption rate is smaller than the second historical power consumption rate, the power consumption of the first WiFi module is smaller than the power consumption of the second WiFi module, namely the information transmission through the first WiFi network is conducted in a next mode, and the power consumption of the information transmission through the second WiFi network is smaller. The electronic device may assign network tasks performed by the second WiFi network to the first WiFi network and shut down the second WiFi network. Therefore, the electric quantity consumed by executing the network task is reduced, and the power consumption of the electronic equipment is reduced.
It should be noted that, when the difference between the first network task amount and the second network task amount satisfies the preset range, the network task amount is an irrelevant factor of the historical power consumption. Therefore, the difference between the first historical power consumption and the second historical power consumption is mainly determined by the difference between the power consumption required for maintaining the first WiFi module and the power consumption required for maintaining the second WiFi module, and the difference between the power consumption of the first WiFi network and the power consumption of the second WiFi network for performing the same number of tasks.
310. And if the difference value of the first network task amount and the second network task amount does not meet the preset range, determining the first network speed of the first WiFi network and the second network speed of the second WiFi network in the duration.
In the embodiment of the application, after judging whether the difference value of the first network task amount and the second network task amount meets the preset range, when the difference value of the first network task amount and the second network task amount does not meet the preset range, the network task amount is an independent variable of historical power consumption, and the electronic equipment determines the first network speed of the first WiFi network and the second network speed of the second WiFi network in the duration and is used as a selection basis for closing the WiFi network.
Wherein, the network speed represents the speed of information transmission. The greater the network speed, the faster the information transmission; the slower the network speed, the slower the information transfer.
When the first network speed is greater than the second network speed, 308 is performed. Wherein 308 is specifically performed as follows: and allocating the network task executed by the first WiFi network to the second WiFi network, and closing the first WiFi network.
In the embodiment of the application, after determining the first network speed of the first WiFi network and the second network speed of the second WiFi network within the duration, when the first network speed is greater than the second network speed, the electronic equipment distributes the network task executed by the first WiFi network to the second WiFi network and closes the first WiFi network.
It should be noted that when the remaining power is smaller than a first preset threshold, that is, when the electronic device enters a low power mode, the electronic device closes a first WiFi network with a fast network speed, and executes a network task through a second WiFi network with a slow network speed, so that the running time of the electronic device can be prolonged.
In some embodiments, before assigning the network task performed by the first WiFi network to the second WiFi network and powering off the first WiFi network, the electronic device may further perform the following:
Acquiring a second packet loss rate of a second WiFi network;
and if the second packet loss rate is smaller than the preset threshold, executing the network task executed by the first WiFi network to be distributed to the second WiFi network, and closing the first WiFi network.
The second packet loss rate is a ratio between data successfully transmitted based on the second WiFi network and data transmitted based on the second WiFi network. The preset threshold is a value preset in the electronic equipment, and is a measurement standard for judging whether the WiFi network loses the packet seriously. For example, the preset threshold is 10%, when the packet loss rate of the WiFi network is smaller than the preset threshold, it is determined that the packet loss of the WiFi network is not serious, and when the packet loss rate of the WiFi network is greater than or equal to the preset threshold, it is determined that the packet loss of the WiFi network is serious.
It should be noted that, before the first WiFi network with fast network speed is closed and the network task is executed through the second WiFi network with slow network speed, the packet loss condition of the second WiFi network is judged first, the first WiFi network with fast network speed is closed only when the packet loss is not serious, and the network task is executed through the second WiFi network with slow network speed, so that the power consumption is large because the second WiFi network executes the network task packet loss seriously after the first WiFi network with fast network speed is closed.
When the first network speed is less than or equal to the second network speed, 309 is performed. Wherein 309 specifically performs as follows: and allocating the network task executed by the second WiFi network to the first WiFi network, and closing the second WiFi network.
In the embodiment of the application, after determining the first network speed of the first WiFi network and the second network speed of the second WiFi network within the duration, when the first network speed is smaller than or equal to the second network speed, the electronic equipment distributes the network task executed by the second WiFi network to the first WiFi network and closes the second WiFi network.
It should be noted that when the remaining power is smaller than the first preset threshold, that is, when the electronic device enters the low power mode, the electronic device closes the second WiFi network with a fast network speed, and executes a network task through the first WiFi network with a slow network speed, so that the running time of the electronic device can be prolonged.
In some embodiments, before assigning the network task performed by the second WiFi network to the first WiFi network and powering off the second WiFi network, the electronic device may further perform the following:
acquiring a first packet loss rate of a first WiFi network;
and if the first packet loss rate is smaller than a preset threshold value, executing the network task executed by the second WiFi network to be distributed to the first WiFi network, and closing the second WiFi network.
The first packet loss rate is a ratio between data successfully transmitted based on the first WiFi network and data transmitted based on the first WiFi network. The preset threshold is a value preset in the electronic equipment, and is a measurement standard for judging whether the WiFi network loses the packet seriously. For example, the preset threshold is 10%, when the packet loss rate of the WiFi network is smaller than the preset threshold, it is determined that the packet loss of the WiFi network is not serious, and when the packet loss rate of the WiFi network is greater than or equal to the preset threshold, it is determined that the packet loss of the WiFi network is serious.
It should be noted that, before the second WiFi network with fast network speed is closed and the network task is executed through the first WiFi network with slow network speed, the packet loss condition of the first WiFi network is judged, the second WiFi network with fast network speed is closed only when the packet loss is not serious, and the network task is executed through the first WiFi network with slow network speed, so that the electric quantity consumption is large because the first WiFi network executes the network task packet loss seriously after the second WiFi network with fast network speed is closed.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a network control device according to an embodiment of the application. The network control device 400 includes: a first acquisition module 401, a first determination module 402, a first closing module 403, and a second closing module 404.
A first obtaining module 401, configured to obtain an electric quantity of the electronic device;
a first determining module 402, configured to determine a first historical power consumption rate corresponding to the first WiFi module and a second historical power consumption rate corresponding to the second WiFi module when the power is less than a first preset power;
a first shutdown module 403, configured to allocate a network task executed by the first WiFi network to the second WiFi network and shutdown the first WiFi network if the first historical power consumption rate is greater than the second historical power consumption rate;
and a second shutdown module 404, configured to allocate a network task executed by the second WiFi network to the first WiFi network and shutdown the second WiFi network if the first historical power consumption rate is less than or equal to the second historical power consumption rate.
In some embodiments, when determining the first historical power consumption rate corresponding to the first WiFi module and the second historical power consumption rate corresponding to the second WiFi module, the first determining module 402 may be further configured to:
counting the duration of the electric quantity of the electronic equipment in a preset electric quantity interval;
acquiring first historical power consumption of the first WiFi module in the duration and second historical power consumption of the second WiFi module in the duration;
According to the first historical power consumption and the duration, calculating a first historical power consumption rate corresponding to the first WiFi module;
and calculating a second historical power consumption rate corresponding to the second WiFi module according to the second historical power consumption and the duration.
In some embodiments, before obtaining the remaining power of the electronic device, the network control apparatus 400 further includes:
the distribution module is used for distributing network tasks to the first WiFi network and the second WiFi network evenly when the electric quantity of the electronic equipment is equal to the second preset electric quantity until the electric quantity of the electronic equipment is equal to the first preset electric quantity;
when counting the duration that the electric quantity of the electronic device is in the preset electric quantity interval, the first determining module 402 may be further configured to:
and counting the time length for reducing the electric quantity of the electronic equipment from the second preset electric quantity to the first preset electric quantity.
In some embodiments, after counting the duration that the power of the electronic device is within the preset power interval, the network control apparatus 400 further includes:
the second determining module is used for determining a first network task amount processed by the first WiFi module in the duration and a second network task amount processed by the second WiFi module in the duration;
The judging module is used for judging whether the difference value of the first network task quantity and the second network task quantity meets a preset range or not;
the first determining module 402 may be further configured to execute the obtaining the first historical power consumption of the first WiFi module in the duration and the second historical power consumption of the second WiFi module in the duration if the difference between the first network task amount and the second network task amount meets a preset range.
In some embodiments, after determining whether the difference between the first network task amount and the second network task amount satisfies a preset range, the network control device 400 further includes:
a third determining module, configured to determine a first network speed of the first WiFi network and a second network speed of the second WiFi network within the duration if a difference between the first network task amount and the second network task amount does not meet a preset range;
a third closing module, configured to allocate a network task executed by the first WiFi network to the second WiFi network when the first network speed is greater than the second network speed, and close the first WiFi network;
and the fourth closing module is used for distributing the network task executed by the second WiFi network to the first WiFi network when the first network speed is smaller than or equal to the second network speed, and closing the second WiFi network.
In some embodiments, when the first network speed is less than or equal to the second network speed, the network task performed by the second WiFi network is allocated to the first WiFi network, and before the second WiFi network is turned off, the network control apparatus 400 further includes:
the second acquisition module is used for acquiring a first packet loss rate of the first WiFi network;
the fourth closing module is further configured to execute the network task executed by the second WiFi network to be allocated to the first WiFi network if the first packet loss rate is smaller than a preset threshold, and close the second WiFi network;
when the first network speed is greater than the second network speed, the network control device 400 further includes, before assigning the network task executed by the first WiFi network to the second WiFi network and closing the first WiFi network:
the third acquisition module is used for acquiring a second packet loss rate of the second WiFi network;
and the third closing module is configured to execute the network task executed by the first WiFi network to be allocated to the second WiFi network if the second packet loss rate is smaller than the preset threshold, and close the first WiFi network.
It should be noted that, the network control device provided in the embodiment of the present application and the network control method in the foregoing embodiment belong to the same concept, and any method provided in the network control method embodiment may be run on the network control device, and the specific implementation process is detailed in the network control method embodiment and will not be repeated herein.
As can be seen from the above, in the network control device 400 provided by the embodiment of the present application, the first obtaining module 401 obtains the electric quantity of the electronic device, when the electric quantity is smaller than the first preset electric quantity, the first determining module 402 determines the first historical power consumption rate corresponding to the first WiFi module and the second historical power consumption rate corresponding to the second WiFi module, if the first historical power consumption rate is greater than the second historical power consumption rate, the first closing module 403 allocates the network task executed by the first WiFi network to the second WiFi network and closes the first WiFi network, and if the first historical power consumption rate is less than or equal to the second historical power consumption rate, the second closing module 404 allocates the network task executed by the second WiFi to the first WiFi network and closes the second WiFi network. When the residual electric quantity is smaller than the first preset electric quantity, the electronic equipment closes the WiFi network with high historical power consumption rate, and the power consumption of the electronic equipment can be reduced.
The embodiment of the application further provides an electronic device, please refer to fig. 5, and fig. 5 is a schematic diagram of a first structure of the electronic device according to the embodiment of the application. The electronic device 500 comprises a processor 501, a memory 502 and a wireless network module 503. The wireless network module 503 and the memory 502 are electrically connected to the processor 501, and the processor 501 is configured to control the wireless network module 503 to establish a connection with a wireless network access point.
The processor 501 is a control center of the electronic device 500, connects various parts of the entire electronic device using various interfaces and lines, and performs various functions of the electronic device 500 and processes data by running or loading computer programs stored in the memory 502 and calling data stored in the memory 502, thereby performing overall monitoring of the electronic device 500.
The memory 502 may be used to store software programs and modules, and the processor 501 performs various functional applications and data processing by executing the computer programs and modules stored in the memory 502. The memory 502 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, a computer program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data created according to the use of the electronic device, etc.
In addition, memory 502 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 502 may also include a memory controller to provide access to the memory 502 by the processor 501.
The wireless network module 503 may support simultaneous transceiving of two wireless signals in different frequency bands, and the wireless signals in the two different frequency bands do not interfere with each other. The wireless network module 503 may include a first WiFi module and a second WiFi module, where the first WiFi module and the second WiFi module are electrically connected to the processor 501. The processor 501 may control the first WiFi module to connect to a first WiFi network and control the second WiFi module to connect to a second WiFi network.
The wireless network module 503 has a dual-frequency dual-transmit (Dual Band Dual Concurrent, DBDC) function, supports 2×2 antennas (a first antenna and a second antenna), and the 2 groups of antennas are all matched with an amplifying circuit and a power amplifying chip, so that the antennas can be supported to transmit and receive signals simultaneously. When the first WiFi module and the second WiFi module work 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 data transceiving of the first WiFi path and the second WiFi path.
For example, the electronic device establishes a connection relationship between a first antenna and a first WiFi access point through a first WiFi module, forms a first WiFi access, and receives and transmits data through the first WiFi access; and establishing a connection relation between the second antenna and the second WiFi access point through the second WiFi module to form a second WiFi access, and carrying out data receiving and transmitting through the second WiFi access.
It should be noted that the first WiFi path is a data path 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 equipment establishes connection with the second WiFi access point through the second WiFi module.
Further, the frequency bands supported by the first WiFi module and the second WiFi module are different, 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 the transmission and reception of two wireless signals in different frequency bands. When the electronic equipment only has one wireless network submodule to work, the electronic equipment can only support the receiving and transmitting of wireless signals of one frequency band, and at the moment, the first antenna and the second antenna of the electronic equipment are used for receiving and transmitting the wireless signals of one frequency band to form a 2x2 multiple-input multiple-output antenna array.
In the embodiment of the present application, the processor 501 in the electronic device 500 loads the instructions corresponding to the processes of one or more computer programs into the memory 502 according to the following steps, and the processor 501 executes the computer programs stored in the memory 502, so as to implement various functions, as follows:
acquiring the residual electric quantity of the electronic equipment;
when the residual electric quantity is smaller than a first preset electric quantity, determining a first historical power consumption rate corresponding to the first WiFi module and a second historical power consumption rate corresponding to the second WiFi module;
if the first historical power consumption rate is greater than the second historical power consumption rate, distributing network tasks executed by the first WiFi network to the second WiFi network, and closing the first WiFi network;
and if the first historical power consumption rate is smaller than or equal to the second historical power consumption rate, distributing the network task executed by the second WiFi network to the first WiFi network, and closing the second WiFi network.
Referring to fig. 6, fig. 6 is a schematic diagram of a second structure of an electronic device according to an embodiment of the application. The electronic device 600 includes: processor 601, memory 602, wireless network module 603, power supply 604, input unit 605. The processor 601 is electrically connected to the memory 602, the wireless network module 603, the power supply 604, and the input unit 605, respectively.
The power supply 604 is used to power the various components of the electronic device 600. In some embodiments, the power supply 604 may be logically connected to the processor 601 through a power management system, so as to perform functions of managing charging, discharging, and power consumption management through the power management system.
The input unit 605 may be used to receive entered numbers, character information, or user characteristic information (e.g., fingerprints), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control. The input unit 605 may include a fingerprint recognition module.
Although not shown in fig. 6, the electronic device 600 may further include a display screen, a camera, etc., and will not be described herein.
In the embodiment of the present application, the processor 601 in the electronic device 600 loads the instructions corresponding to the processes of one or more computer programs into the memory 602 according to the following steps, and the processor 601 executes the computer programs stored in the memory 602, so as to implement various functions, as follows:
acquiring the residual electric quantity of the electronic equipment;
when the residual electric quantity is smaller than a first preset electric quantity, determining a first historical power consumption rate corresponding to the first WiFi module and a second historical power consumption rate corresponding to the second WiFi module;
If the first historical power consumption rate is greater than the second historical power consumption rate, distributing network tasks executed by the first WiFi network to the second WiFi network, and closing the first WiFi network;
and if the first historical power consumption rate is smaller than or equal to the second historical power consumption rate, distributing the network task executed by the second WiFi network to the first WiFi network, and closing the second WiFi network.
In some embodiments, when determining the first historical power consumption rate corresponding to the first WiFi module and the second historical power consumption rate corresponding to the second WiFi module, the processor 601 may perform:
counting the duration of the electric quantity of the electronic equipment in a preset electric quantity interval;
acquiring first historical power consumption of the first WiFi module in the duration and second historical power consumption of the second WiFi module in the duration;
according to the first historical power consumption and the duration, calculating a first historical power consumption rate corresponding to the first WiFi module;
and calculating a second historical power consumption rate corresponding to the second WiFi module according to the second historical power consumption and the duration.
In some embodiments, the processor 601 may further perform, before obtaining the remaining power of the electronic device:
When the electric quantity of the electronic equipment is equal to a second preset electric quantity, averagely distributing network tasks to a first WiFi network and a second WiFi network until the electric quantity of the electronic equipment is equal to the first preset electric quantity;
when counting the duration that the power of the electronic device is within the preset power interval, the processor 601 may execute:
and counting the time length for reducing the electric quantity of the electronic equipment from the second preset electric quantity to the first preset electric quantity.
In some embodiments, after counting the duration that the power of the electronic device is within the preset power interval, the processor 601 may further perform:
determining a first network task amount processed by the first WiFi module in the duration and a second network task amount processed by the second WiFi module in the duration;
judging whether the difference value of the first network task quantity and the second network task quantity meets a preset range or not;
and if yes, executing the first historical power consumption of the first WiFi module in the duration and the second historical power consumption of the second WiFi module in the duration.
In some embodiments, after determining whether the difference between the first network task amount and the second network task amount satisfies a preset range, the processor 601 may further perform:
If not, determining a first network speed of the first WiFi network and a second network speed of the second WiFi network in the duration;
when the first network speed is greater than the second network speed, distributing network tasks executed by the first WiFi network to the second WiFi network, and closing the first WiFi network;
and when the first network speed is smaller than or equal to the second network speed, distributing network tasks executed by the second WiFi network to the first WiFi network, and closing the second WiFi network.
In some embodiments, before assigning the network task performed by the second WiFi network to the first WiFi network and powering off the second WiFi network, the processor 601 may further perform:
acquiring a first packet loss rate of the first WiFi network;
if the first packet loss rate is smaller than a preset threshold, executing the network task executed by the second WiFi network to be distributed to the first WiFi network, and closing the second WiFi network;
the processor 601 may further perform, before assigning the network task performed by the first WiFi network to the second WiFi network and powering off the first WiFi network:
Acquiring a second packet loss rate of the second WiFi network;
and if the second packet loss rate is smaller than the preset threshold, executing the network task executed by the first WiFi network to be distributed to the second WiFi network, and closing the first WiFi network.
As can be seen from the above, in the electronic device provided by the embodiment of the present application, when the remaining power is less than the first preset power, the first historical power consumption rate corresponding to the first WiFi module and the second historical power consumption rate corresponding to the second WiFi module are determined, when the first historical power consumption rate is greater than the second historical power consumption rate, the network task executed by the first WiFi network is allocated to the second WiFi network, and the first WiFi network is closed, and when the first historical power consumption rate is less than or equal to the second historical power consumption rate, the network task executed by the second WiFi network is allocated to the first WiFi network, and the second WiFi network is closed. When the residual electric quantity is smaller than the first preset electric quantity, the electronic equipment closes the WiFi network with high historical power consumption rate, and the power consumption of the electronic equipment can be reduced.
The embodiment of the present application also provides a storage medium storing a computer program, which when executed on a computer, causes the computer to perform the memory management method in any of the above embodiments, for example: acquiring the residual electric quantity of the electronic equipment; when the residual electric quantity is smaller than a first preset electric quantity, determining a first historical power consumption rate corresponding to the first WiFi module and a second historical power consumption rate corresponding to the second WiFi module; if the first historical power consumption rate is greater than the second historical power consumption rate, distributing network tasks executed by the first WiFi network to the second WiFi network, and closing the first WiFi network; and if the first historical power consumption rate is smaller than or equal to the second historical power consumption rate, distributing the network task executed by the second WiFi network to the first WiFi network, and closing the second WiFi network.
In an 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 (Random Access Memory, RAM), or the like.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to related descriptions of other embodiments.
It should be noted that, for the network control method according to the embodiment of the present application, it will be understood by those skilled in the art that all or part of the flow of implementing the network control method according to the embodiment of the present application may be implemented by controlling related hardware by a computer program, where the computer program may 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 the execution may include, for example, the flow of the embodiment of the network control method. The storage medium may be a magnetic disk, an optical disk, a read-only memory, a random access memory, etc.
For the network control device of the embodiment of the application, each functional module may be integrated in one processing chip, or each module may exist alone physically, or two or more modules may be integrated in one module. The integrated modules may be implemented in hardware or in software functional modules. The integrated module, if implemented as a software functional module and sold or used as a stand-alone product, may also be stored on a computer readable storage medium such as read-only memory, magnetic or optical disk, etc.
The network control method, the device, the storage medium and the electronic equipment provided by the embodiment of the application are described in detail, and specific examples are applied to the explanation of the principle and the implementation mode of the application, and the explanation of the above embodiment is only used for helping to understand the method and the core idea of the application; meanwhile, as those skilled in the art will vary in the specific embodiments and application scope according to the ideas of the present application, the present description should not be construed as limiting the present application in summary.

Claims (5)

1. The network control method is applied to electronic equipment, and is characterized in that the electronic equipment comprises a first WiFi module and a second WiFi module, the electronic equipment 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 method comprises the following steps:
when the electric quantity is equal to a second preset electric quantity, averagely distributing network tasks to the first WiFi network and the second WiFi network until the electric quantity is equal to the first preset electric quantity;
acquiring the residual electric quantity of the electronic equipment;
when the residual electric quantity is smaller than a first preset electric quantity, counting the duration of the electric quantity of the electronic equipment in a preset electric quantity interval;
Determining a first network task amount processed by the first WiFi module in the duration and a second network task amount processed by the second WiFi module in the duration;
judging whether the difference value of the first network task quantity and the second network task quantity meets a preset range or not;
if the difference value between the first network task amount and the second network task amount meets a preset range, acquiring first historical power consumption of the first WiFi module in the duration and second historical power consumption of the second WiFi module in the duration, wherein the first network task amount is an irrelevant factor of the first historical power consumption, and the second network task amount is an irrelevant factor of the second historical power consumption;
according to the first historical power consumption and the duration, calculating a first historical power consumption rate corresponding to the first WiFi module;
calculating a second historical power consumption rate corresponding to the second WiFi module according to the second historical power consumption and the duration;
if the first historical power consumption rate is greater than the second historical power consumption rate, distributing network tasks executed by the first WiFi network to the second WiFi network, and closing the first WiFi network;
If the first historical power consumption rate is smaller than the second historical power consumption rate, distributing network tasks executed by the second WiFi network to the first WiFi network, and closing the second WiFi network;
if the first historical power consumption rate is equal to the second historical power consumption rate, closing any one of the first WiFi network and the second WiFi network;
if the difference value between the first network task amount and the second network task amount does not meet the preset range, determining a first network speed of the first WiFi network and a second network speed of the second WiFi network within the duration;
when the first network speed is greater than the second network speed, distributing network tasks executed by the first WiFi network to the second WiFi network, and closing the first WiFi network;
when the first network speed is smaller than or equal to the second network speed, distributing network tasks executed by the second WiFi network to the first WiFi network, and closing the second WiFi network;
the method further includes, before allocating the network task executed by the second WiFi network to the first WiFi network and closing the second WiFi network, further including:
Acquiring a first packet loss rate of the first WiFi network;
if the first packet loss rate is smaller than a preset threshold, executing the network task executed by the second WiFi network to be distributed to the first WiFi network, and closing the second WiFi network;
the method further includes, before allocating the network task executed by the first WiFi network to the second WiFi network and closing the first WiFi network, further including:
acquiring a second packet loss rate of the second WiFi network;
and if the second packet loss rate is smaller than the preset threshold, executing the network task executed by the first WiFi network to be distributed to the second WiFi network, and closing the first WiFi network.
2. The network control method according to claim 1, characterized in that before the obtaining the remaining power of the electronic device, further comprising:
when the electric quantity of the electronic equipment is equal to a second preset electric quantity, averagely distributing network tasks to a first WiFi network and a second WiFi network until the electric quantity of the electronic equipment is equal to the first preset electric quantity;
the counting the duration that the electric quantity of the electronic equipment is in a preset electric quantity interval comprises the following steps:
and counting the time length for reducing the electric quantity of the electronic equipment from the second preset electric quantity to the first preset electric quantity.
3. A network control device integrated in an electronic device, wherein the electronic device includes a first WiFi module and a second WiFi module, the network control device comprising:
the first acquisition module is used for acquiring the electric quantity of the electronic equipment;
the first determining module is used for counting the duration of the electric quantity of the electronic equipment in a preset electric quantity interval when the electric quantity is smaller than a first preset electric quantity;
the second determining module is used for determining a first network task amount processed by the first WiFi module in the duration and a second network task amount processed by the second WiFi module in the duration;
the judging module is used for judging whether the difference value of the first network task quantity and the second network task quantity meets a preset range or not;
the first determining module is further configured to obtain a first historical power consumption of the first WiFi module in the duration and a second historical power consumption of the second WiFi module in the duration if a difference between the first network task amount and the second network task amount meets a preset range, where the first network task amount is an irrelevant factor of the first historical power consumption, and the second network task amount is an irrelevant factor of the second historical power consumption;
According to the first historical power consumption and the duration, calculating a first historical power consumption rate corresponding to the first WiFi module;
calculating a second historical power consumption rate corresponding to the second WiFi module according to the second historical power consumption and the duration;
the first closing module is used for distributing the network task executed by the first WiFi network to the second WiFi network and closing the first WiFi network if the first historical power consumption rate is larger than the second historical power consumption rate;
the second closing module is configured to allocate a network task executed by the second WiFi network to the first WiFi network and close the second WiFi network if the first historical power consumption rate is less than or equal to the second historical power consumption rate;
a third determining module, configured to determine a first network speed of the first WiFi network and a second network speed of the second WiFi network within the duration if a difference between the first network task amount and the second network task amount does not meet a preset range;
a third closing module, configured to allocate a network task executed by the first WiFi network to the second WiFi network when the first network speed is greater than the second network speed, and close the first WiFi network;
A fourth closing module, configured to allocate a network task executed by the second WiFi network to the first WiFi network when the first network speed is less than or equal to the second network speed, and close the second WiFi network;
the second acquisition module is used for acquiring a first packet loss rate of the first WiFi network;
the fourth closing module is further configured to execute the network task executed by the second WiFi network to be allocated to the first WiFi network if the first packet loss rate is smaller than a preset threshold, and close the second WiFi network;
the third acquisition module is used for acquiring a second packet loss rate of the second WiFi network;
and the third closing module is further configured to execute the network task executed by the first WiFi network to the second WiFi network and close the first WiFi network if the second packet loss rate is smaller than the preset threshold.
4. A storage medium having stored thereon a computer program, which, when run on a computer, causes the computer to perform the network control method according to any one of claims 1 to 2.
5. An electronic device comprising a processor, a memory, said memory having a computer program, characterized in that the processor is adapted to execute the network control method according to any one of claims 1 to 2 by invoking said computer program.
CN201911381709.XA 2019-12-27 2019-12-27 Network control method and device, storage medium and electronic equipment Active CN111163510B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911381709.XA CN111163510B (en) 2019-12-27 2019-12-27 Network control method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911381709.XA CN111163510B (en) 2019-12-27 2019-12-27 Network control method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN111163510A CN111163510A (en) 2020-05-15
CN111163510B true CN111163510B (en) 2023-09-22

Family

ID=70558793

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911381709.XA Active CN111163510B (en) 2019-12-27 2019-12-27 Network control method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN111163510B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2732664A1 (en) * 2012-06-06 2014-05-21 Unify GmbH & Co. KG Method of operating a communication device operable in an active mode and in an idle mode, a computer program product for executing the method, and the communication device operable in an active mode and in an idle mode
CN105101173A (en) * 2015-07-20 2015-11-25 努比亚技术有限公司 Multi-data-channel-based data loading apparatus and method
CN105094960A (en) * 2015-07-20 2015-11-25 努比亚技术有限公司 Data loading device and method based on two channels
CN105722142A (en) * 2016-02-26 2016-06-29 努比亚技术有限公司 Mobile terminal and multilink-based data streaming method
CN105722118A (en) * 2016-01-27 2016-06-29 努比亚技术有限公司 Data service communication processing method and device
CN105759937A (en) * 2016-02-03 2016-07-13 努比亚技术有限公司 Method for lowering terminal power consumption and terminal
CN107708190A (en) * 2017-09-29 2018-02-16 努比亚技术有限公司 Wi Fi control methods, mobile terminal and computer-readable recording medium
CN109041103A (en) * 2018-09-30 2018-12-18 Oppo广东移动通信有限公司 terminal control method, system and terminal
CN109474521A (en) * 2018-12-22 2019-03-15 Oppo广东移动通信有限公司 Link aggregation implementation method and Related product
CN109511139A (en) * 2018-12-19 2019-03-22 Oppo广东移动通信有限公司 WIFI control method, device, mobile device, computer readable storage medium
CN110290595A (en) * 2019-06-28 2019-09-27 南昌黑鲨科技有限公司 Network connection control method, system, intelligent terminal and computer readable storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2732570B1 (en) * 2011-07-14 2016-06-29 Telefonaktiebolaget LM Ericsson (publ) Methods and apparatuses for efficient battery utilization during content delivery in telecommunication networks
CN110710277B (en) * 2017-06-08 2023-06-02 三星电子株式会社 Method and apparatus for wireless communication

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2732664A1 (en) * 2012-06-06 2014-05-21 Unify GmbH & Co. KG Method of operating a communication device operable in an active mode and in an idle mode, a computer program product for executing the method, and the communication device operable in an active mode and in an idle mode
CN105101173A (en) * 2015-07-20 2015-11-25 努比亚技术有限公司 Multi-data-channel-based data loading apparatus and method
CN105094960A (en) * 2015-07-20 2015-11-25 努比亚技术有限公司 Data loading device and method based on two channels
CN105722118A (en) * 2016-01-27 2016-06-29 努比亚技术有限公司 Data service communication processing method and device
CN105759937A (en) * 2016-02-03 2016-07-13 努比亚技术有限公司 Method for lowering terminal power consumption and terminal
CN105722142A (en) * 2016-02-26 2016-06-29 努比亚技术有限公司 Mobile terminal and multilink-based data streaming method
CN107708190A (en) * 2017-09-29 2018-02-16 努比亚技术有限公司 Wi Fi control methods, mobile terminal and computer-readable recording medium
CN109041103A (en) * 2018-09-30 2018-12-18 Oppo广东移动通信有限公司 terminal control method, system and terminal
CN109511139A (en) * 2018-12-19 2019-03-22 Oppo广东移动通信有限公司 WIFI control method, device, mobile device, computer readable storage medium
CN109474521A (en) * 2018-12-22 2019-03-15 Oppo广东移动通信有限公司 Link aggregation implementation method and Related product
CN110290595A (en) * 2019-06-28 2019-09-27 南昌黑鲨科技有限公司 Network connection control method, system, intelligent terminal and computer readable storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Android手机应用程序网络流量的监测管理;刘安臣;陈未如;;科技传播(第01期);全文 *
New Architecture Elements for 5G RF Front End Modules;Florinel Balteanu;《2019 IEEE Asia-Pacific Microwave Conference (APMC)》;全文 *

Also Published As

Publication number Publication date
CN111163510A (en) 2020-05-15

Similar Documents

Publication Publication Date Title
CN106851683B (en) Multi-frequency carrier aggregation WIFI data transmission method and device and terminal equipment
CN107484190B (en) Method for connecting network, mobile terminal and computer readable storage medium
CN111177025B (en) Data storage method and device and terminal equipment
CN109564458A (en) Application program is specific, performance aware it is energy-optimised
CN112162863B (en) Edge unloading decision method, terminal and readable storage medium
CN108196482B (en) Power consumption control method and device, storage medium and electronic equipment
CN110489176A (en) A kind of multiple access edge calculations task discharging method based on bin packing
CN109408399A (en) A kind of calculation power estimation method, device, equipment and storage medium
CN110913447A (en) Network control method, network control device, storage medium and electronic equipment
CN108540152A (en) Processing method, device, storage medium and the electronic equipment of radio frequency interference
CN111163510B (en) Network control method and device, storage medium and electronic equipment
CN111083763B (en) Network control method, network control device, storage medium and electronic equipment
CN111338745A (en) Deployment method and device of virtual machine and intelligent equipment
CN112235082A (en) Communication information transmission method, device, equipment and storage medium
CN109302669B (en) Polling mechanism setting method and device, storage medium and electronic equipment
WO2023020385A1 (en) Wireless charging management method and apparatus, and electronic device
CN114310889B (en) Intelligent robot inspection system of transformer substation and access operation method thereof
CN109670932A (en) Credit data calculate method, apparatus, system and computer storage medium
CN103518382B (en) Wavelength allocation method and device
CN113344594B (en) Method, device, terminal and storage medium for processing worksheet in game
CN111132284B (en) Dynamic capacity allocation method for base station and base station
CN110995324B (en) Bluetooth communication method, device, storage medium and terminal equipment
KR20150060186A (en) Method of calculating power consumption of semiconductor integrated circuit and power consumption calculation circuit
CN107205272B (en) Communication method, communication device, computer-readable storage medium and electronic equipment
CN108064085B (en) Wireless resource allocation method and device

Legal Events

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