CN114513830B - High-speed network starting method and device and terminal equipment - Google Patents

High-speed network starting method and device and terminal equipment Download PDF

Info

Publication number
CN114513830B
CN114513830B CN202011281137.0A CN202011281137A CN114513830B CN 114513830 B CN114513830 B CN 114513830B CN 202011281137 A CN202011281137 A CN 202011281137A CN 114513830 B CN114513830 B CN 114513830B
Authority
CN
China
Prior art keywords
application program
network
speed
flow
current application
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
CN202011281137.0A
Other languages
Chinese (zh)
Other versions
CN114513830A (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.)
Oneplus Technology Shenzhen Co Ltd
Original Assignee
Oneplus Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oneplus Technology Shenzhen Co Ltd filed Critical Oneplus Technology Shenzhen Co Ltd
Priority to CN202011281137.0A priority Critical patent/CN114513830B/en
Publication of CN114513830A publication Critical patent/CN114513830A/en
Application granted granted Critical
Publication of CN114513830B publication Critical patent/CN114513830B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/18Selecting a network or a communication service
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/14Reselecting a network or an air interface

Abstract

The embodiment of the application relates to the technical field of communication, in particular to a high-speed network starting method, a device and terminal equipment. The high-speed network opening method is applied to the terminal equipment and comprises the following steps: when the foreground monitors that the application program runs, searching the use data of the current application program in a database, wherein the use data comprises average network speed and average flow of preset duration; if the use data of the current application program is found, determining whether the current application program meets the high-speed network starting condition according to the average network speed and the average flow of the preset duration; when the current application meets the high-speed network opening condition, the high-speed network is opened to allow the high-speed network to establish connection. By means of the method, the terminal equipment can be prevented from starting the high-speed network for a long time, so that the power consumption of the terminal equipment is reduced, the endurance time is prolonged, and the user experience is improved.

Description

High-speed network starting method and device and terminal equipment
Technical Field
The embodiment of the application relates to the technical field of communication, in particular to a high-speed network starting method, a device and terminal equipment.
Background
With the development of mobile communication technology, the types of networks supported by terminal devices are gradually evolving towards high-speed networks. Although the high-speed network has the characteristics of high speed, high reliability, low time delay and the like, if the high-speed network is started for a long time, the power consumption of the terminal equipment is increased due to the large power consumption of the high-speed network, so that the endurance time is shortened, and the user experience is affected.
Disclosure of Invention
The embodiment of the application provides a high-speed network starting method, a high-speed network starting device and terminal equipment, which can reduce the power consumption of the terminal equipment, increase the endurance time and improve the user experience.
In order to solve the technical problems, one technical scheme adopted by the embodiment of the application is as follows: the method for starting the high-speed network is applied to the terminal equipment and comprises the following steps:
When the foreground monitors that an application program runs, searching the use data of the current application program in a database, wherein the use data comprises average network speed and average flow of preset duration;
If the use data of the current application program is found, determining whether the current application program meets a high-speed network starting condition according to the average network speed and the average flow of the preset duration;
and when the current application program meets the high-speed network starting condition, starting the high-speed network to allow the high-speed network to establish connection.
Optionally, the searching the database for the usage data of the current application program specifically includes:
Acquiring a first package name of the current application program;
and searching the use data of the current application program in the database according to the first package name.
Optionally, in the database, each usage data corresponds to a preset package name; then the first time period of the first time period,
The searching the usage data of the current application program in the database according to the first package name specifically comprises the following steps:
Searching a preset package name matched with the first package name in the database;
And if the preset package name matched with the first package name is found, determining that the use data of the current application program is found in the database.
Optionally, the determining whether the current application program meets a high-speed network opening condition according to the average network speed and the average flow of the preset duration specifically includes:
Determining whether the average net speed is greater than a net speed threshold;
If the average network speed is greater than the network speed threshold, determining that the current application program meets the high-speed network opening condition,
Otherwise, determining whether the average flow of the preset duration is greater than a flow threshold;
if the average flow of the preset duration is greater than the flow threshold, determining that the current application program meets the high-speed network starting condition,
Otherwise, determining that the current application program does not meet the high-speed network starting condition.
Optionally, after the step of turning on the high speed network, the method further comprises:
when the foreground monitors that the current application program finishes running, determining the using time of the current application program;
if the using time is longer than the preset time, determining the current network speed of the current application program and the current flow of the preset time;
updating the average network speed of the current application program based on the current network speed;
And updating the average flow of the preset duration of the current application program based on the current flow of the preset duration.
Optionally, the method further comprises:
When the foreground monitors the running of the application program, recording the starting time of the current application program; then the first time period of the first time period,
The determining the using time of the current application program specifically includes:
recording closing time of the current application program when the foreground monitors that the current application program finishes running;
and determining the difference value of the opening time and the closing time as the using duration of the current application program.
Optionally, the determining the current internet speed of the current application program and the current flow of the preset duration specifically includes:
acquiring a first flow value when the current application program starts to run and a second flow value when the current application program ends to run;
Calculating the current network speed according to the first flow value, the second flow value and the using duration;
And determining the flow in the preset time length from the opening time as the current flow of the preset time length.
Optionally, the average network speed is calculated according to network speed data stored in a network speed data list; then the first time period of the first time period,
The updating the average network speed of the current application program based on the current network speed specifically comprises the following steps:
determining a first data capacity of the network speed data list;
Determining a first amount of network speed data stored in the network speed data list;
If the first quantity is smaller than the first data accommodating quantity, adding the current network speed to the network speed data list, and then recalculating the average network speed of the current application program according to the network speed data stored in the network speed data list;
And if the first quantity is equal to the first data accommodating quantity, deleting the oldest network speed data in the network speed data list, adding the current network speed to the network speed data list, and recalculating the average network speed of the current application program according to the network speed data stored in the network speed data list.
Optionally, the average flow of the preset duration is calculated according to the flow data stored in the flow data list; then the first time period of the first time period,
The updating the average flow of the preset duration of the current application program based on the current flow of the preset duration specifically comprises the following steps:
determining a second data capacity of the traffic data list;
Determining a second amount of traffic data stored in the traffic data list;
If the second number is smaller than the second data accommodating amount, adding the current flow of the preset duration to the flow data list, and then recalculating the average flow of the preset duration of the current application program according to the flow data stored in the flow data list;
And if the second quantity is equal to the second data accommodating quantity, deleting the oldest flow data in the flow data list, adding the current flow of the preset time length to the flow data list, and recalculating the average flow of the preset time length of the current application program according to the flow data stored in the flow data list.
Optionally, the method further comprises:
And closing the high-speed network when the current application program does not meet the high-speed network opening condition so as to limit the high-speed network to establish connection.
Optionally, the method further comprises:
and when the use data of the current application program cannot be found, maintaining the current network.
In order to solve the technical problems, another technical scheme adopted by the embodiment of the application is as follows: there is provided a high-speed network opening device applied to a terminal apparatus, the device comprising:
The searching module is used for searching the use data of the current application program in the database when the foreground monitors the running of the application program, wherein the use data comprises average network speed and average flow of preset duration;
The determining module is used for determining whether the current application program meets a high-speed network starting condition according to the average network speed and the average flow of the preset duration when the use data of the current application program is searched;
And the starting module is used for starting the high-speed network when the current application program meets the high-speed network starting condition so as to allow the high-speed network to establish connection.
In order to solve the technical problems, another technical scheme adopted by the embodiment of the application is as follows: there is provided a terminal device including:
At least one processor; and
A memory communicatively coupled to the at least one processor;
Wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the high speed network opening method described above.
In order to solve the technical problems, another technical scheme adopted by the embodiment of the application is as follows: there is provided a non-volatile computer-readable storage medium storing computer-executable instructions for causing a terminal device to perform the above-described high-speed network opening method.
The embodiment of the application provides a high-speed network opening method, a device and terminal equipment, wherein in the high-speed network opening method, when an application program is monitored in the foreground, the average network speed of a current application program and the average flow of preset duration are searched in a database, if the average network speed of the current application program and the average flow of the preset duration are searched in the database, whether the current application program meets the high-speed network opening condition is determined according to the average network speed of the current application program and the average flow of the preset duration, if the current application program meets the high-speed network opening condition, the high-speed network is opened to allow the high-speed network to establish connection, namely, the terminal equipment only opens the high-speed network when the running application program needs the high-speed network, so that the power consumption of the terminal equipment is prevented from being increased due to the fact that the high-speed network is opened for a long time, the power consumption of the terminal equipment is reduced, the duration is increased, and user experience is improved.
Drawings
One or more embodiments are illustrated by way of example and not limitation in the figures of the accompanying drawings, in which like references indicate similar elements, and in which the figures of the drawings are not to be taken in a limiting sense, unless otherwise indicated.
Fig. 1 is a schematic structural diagram of a terminal device according to an embodiment of the present application;
fig. 2 is a flow chart of a method for starting up a high-speed network according to an embodiment of the present application;
Fig. 3 is a flowchart of a method for starting up a high-speed network according to another embodiment of the present application;
fig. 4 is a schematic structural diagram of a high-speed network opening device according to an embodiment of the present application;
Fig. 5 is a schematic structural diagram of a high-speed network opening device according to another embodiment of the present application.
Detailed Description
In order to make the technical solutions of the embodiments of the present application more clear, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
It will be understood that when an element is referred to as being "connected" to another element, it can be directly connected to the other element or one or more intervening elements may be present therebetween.
In addition, the technical features mentioned in the embodiments of the present application described below may be combined with each other as long as they do not collide with each other.
The application provides a method and a device for starting a high-speed network, which are applied to terminal equipment, so that the terminal equipment can start the high-speed network only when the current application program meets the starting condition of the high-speed network, the power consumption increase caused by the long-term starting of the high-speed network of the terminal equipment is prevented, the power consumption of the terminal equipment is reduced, the endurance time is prolonged, and the user experience is improved. The terminal equipment is equipment capable of carrying out network communication, such as a mobile phone, a tablet personal computer, a smart watch and the like.
It will be appreciated that the present application defines a network with the highest network speed among the network types supported by the terminal device as a high-speed network. For example, when the network types supported by the terminal device include a 3G network and a 4G network, since the network speed of the 4G network is large relative to the 3G network in the 3G network and the 4G network, the 4G network is defined as a high-speed network; when the network types supported by the terminal device include a 4G network and a 5G network, since the 5G network of the 4G network and the 5G network has a large network speed relative to the 4G network, the 5G network is defined as a high-speed network. In this way, when a new network having a higher network speed than the 5G network appears with the development of mobile communication technology, the new network can be defined as a high-speed network.
The application will now be illustrated by means of specific examples.
Fig. 1 is a schematic structural diagram of a terminal device according to an embodiment of the present application, where the terminal device includes: the device comprises an interaction unit 100, a monitoring unit 200, a memory 300 and a processor 400, wherein the processor 400 is respectively connected with the interaction unit 100, the monitoring unit 200 and the memory 300. It will be appreciated by those skilled in the art that the structure shown in fig. 1 is not limiting and that a terminal device may include more or fewer components than shown, or may combine certain components, split certain components, or employ a different arrangement of components.
Wherein the interaction unit 100 is configured to interact with a user, including outputting display content to the user and/or receiving an input operation of the user.
Specifically, the interaction unit 100 can display information provided to a user, or display information input by a user, or display an application of a terminal device.
When the interaction unit 100 displays an application of the terminal device, a user can trigger the application to run through the interaction unit 100.
The monitoring unit 200 is configured to monitor a foreground of the terminal device, and when the user triggers the application to run, the monitoring unit 200 can monitor that the application starts to run in the foreground, so that the application monitored by the monitoring unit 200 is a current application of the terminal device.
When the listening unit 200 cannot listen to the current application program in the foreground, it determines that the current application program ends running. When the current application is turned off or the current application runs in the background, the monitoring unit 200 cannot monitor the current application in the foreground.
Memory 300 is a non-volatile computer-readable storage medium that may be used to store non-volatile software programs, instructions, and modules.
The memory 300 may include a stored program area and a stored data area. The storage program area can store an operating system and application programs required by at least one function; the storage data area may store data created according to the use of the terminal device, etc., and may also store preset data, including a database, etc.
The database is used for storing the use data of the application programs needing to use the high-speed network, and the use data of each application program is stored under the preset package names of the application programs, so that the use data of different application programs correspond to different preset package names. Wherein, the package name of the application program is set as a preset package name. Since the package name of the application has uniqueness, the preset package name can uniquely identify the application.
The usage data comprises an average network speed and an average flow of a preset duration. The average network speed is calculated according to the network speed data stored in the network speed data list, and the average flow of the preset duration is calculated according to the flow data stored in the flow data list. That is, the network speed data list and the traffic data list of each application program that needs to use the high-speed network are actually stored in the database.
The network speed data list is used for storing network speed data of the application program, the network speed data are network speeds in the using time of the application program, and each network speed data are in one-to-one correspondence with the adding time of the network speed data in the network speed data list.
The flow data list is used for storing flow data of the application program, the flow data is flow within the preset duration of the application program, and in the flow data list, each flow data corresponds to the adding time one by one.
In addition, memory 300 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 non-volatile solid-state storage device.
In some embodiments, memory 300 optionally includes remotely located memory relative to processor 400, which may be connected to the terminal device via a network. Such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The processor 400 is a control center of the terminal device, and can connect various parts of the entire terminal device using various interfaces and lines, and perform various functions of the terminal device and process the data by running or executing nonvolatile software programs, instructions and modules stored in the memory 300, and calling the data stored in the memory 300, thereby performing overall control of the terminal device. For example, implementing the high-speed network opening method according to any of the embodiments of the present application.
The number of processors 400 may be one or more, one processor 400 being illustrated in fig. 1.
Processor 400 may be connected to interactive unit 100, snoop unit 200, and memory 300 via a bus or otherwise, for example in fig. 1.
The processor 400 may include a Central Processing Unit (CPU), a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a controller, a Field Programmable Gate Array (FPGA), or the like. Processor 400 may also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP core, or any other such configuration.
It may be understood that, when the user triggers the application program to run through the interaction unit 100, the monitoring unit 200 can monitor that the application program starts to run in the foreground, at this time, the processor 400 searches the database for the average network speed and the average flow of the preset duration of the current application program, if the average network speed and the average flow of the preset duration of the current application program are found, it is determined whether the current application program meets the high-speed network opening condition according to the average network speed and the average flow of the preset duration of the found average network speed and the preset duration of the preset application program, and only when the current application program meets the high-speed network opening condition, the high-speed network can be opened to allow the high-speed network to establish a connection, based on this, it can be prevented that the power consumption is increased due to the long-term opening of the high-speed network of the terminal device, so that the power consumption of the terminal device is reduced, the duration is increased, and user experience is improved.
Further, please refer to fig. 2, which is a schematic flow chart of a high-speed network opening method according to an embodiment of the present application, wherein the high-speed network opening method is applied to the terminal device, and as one specific implementation manner, the high-speed network opening method is executed by the processor 400, so as to reduce power consumption of the terminal device and improve user experience.
Specifically, the high-speed network opening method comprises the following steps:
s100: when the foreground monitors the running of the application program, the database is searched for the use data of the current application program, wherein the use data comprises average network speed and average flow of preset duration.
In the embodiment of the application, the database is used for storing the use data of the application programs needing to use the high-speed network, and the use data of each application program is stored under the preset package names of the application programs, so that the use data of different application programs correspond to different preset package names. Wherein, the package name of the application program is set as a preset package name. Since the package name of the application has uniqueness, the preset package name can uniquely identify the application.
The usage data includes an average network speed and an average flow rate for a preset period of time.
The average network speed is calculated according to network speed data stored in a network speed data list, the network speed data stored in the network speed data list is the network speed in the using time of the application program, and each network speed data corresponds to the adding time of the network speed data one by one. Based on this, it can be appreciated that the average web speed is the average of the web speeds over the duration of application use.
The average flow of the preset duration is calculated according to the flow data stored in the flow data list, the flow data stored in the flow data list is the flow in the preset duration of the application program, and each flow data corresponds to the adding time one by one. Based on this, it can be appreciated that the average flow of the preset duration is the average of the flows within the preset duration of the application.
Preferably, in the embodiment of the present application, the preset time period is 1min.
In the embodiment of the application, the foreground of the terminal equipment is monitored through the monitoring unit, when the monitoring unit monitors the running of the application program in the foreground, the current application program of the terminal equipment is determined to start running, and at the moment, the use data of the current application program is searched in the database.
Since the database is used for storing the use data of the application program requiring the use of the high-speed network, the use data of the current application program is searched in the database, and whether the current application program is the application program requiring the use of the high-speed network can be determined. If the use data of the current application program is found in the database, the current application program is determined to be the application program needing to use the high-speed network, otherwise, the current application program is determined to be the application program not needing to use the high-speed network.
When the use data of the current application program is searched in the database, a first package name of the current application program is obtained, and the use data of the current application program is searched in the database according to the first package name.
Because each of the usage data in the database corresponds to a preset package name, and the package names of the application programs have uniqueness, when the usage data of the current application program is searched in the database according to the first package name, the preset package name matched with the first package name is searched in the database, if the preset package name matched with the first package name is searched, the usage data of the current application program is determined to be searched in the database, and at the moment, the usage data matched with the first package name is the usage data of the current application program.
S200: if the use data of the current application program is found, determining whether the current application program meets the high-speed network starting condition according to the average network speed and the average flow of the preset duration.
When the use data of the current application program is found in the database, the current application program is determined to be the application program needing to use the high-speed network, and at this time, the habit of the user when using the current application program needs to be analyzed according to the use data of the current application program so as to determine whether the high-speed network needs to be started.
And determining whether the current application program meets the high-speed network starting condition according to the average network speed and the average flow of the preset duration, determining whether the average network speed is greater than a network speed threshold value or not when the current application program meets the high-speed network starting condition, if the average network speed is greater than the network speed threshold value, determining whether the average flow of the preset duration is greater than the flow threshold value or not, if the average flow of the preset duration is greater than the flow threshold value, determining that the current application program meets the high-speed network starting condition, and if the average flow of the preset duration is not greater than the flow threshold value, determining that the current application program does not meet the high-speed network starting condition.
The network speed threshold and the flow threshold can be set according to actual use conditions.
It will be appreciated that in some embodiments, when the usage data for the current application is not found in the database, the current application is determined to be an application that does not require the use of the high speed network, at which point the current network is maintained.
For example, if the current network is an open high-speed network, the open high-speed network is maintained; if the current network is a closed high speed network, the closed high speed network is maintained.
S300: when the current application meets the high-speed network opening condition, the high-speed network is opened to allow the high-speed network to establish connection.
In the embodiment of the application, the network with the highest network speed in the network types supported by the terminal equipment is defined as a high-speed network. For example, when the network types supported by the terminal device include a 3G network and a 4G network, since the network speed of the 4G network is large relative to the 3G network in the 3G network and the 4G network, the 4G network is defined as a high-speed network; when the network types supported by the terminal device include a 4G network and a 5G network, since the 5G network of the 4G network and the 5G network has a large network speed relative to the 4G network, the 5G network is defined as a high-speed network. In this way, when a new network having a higher network speed than the 5G network appears with the development of mobile communication technology, the new network can be defined as a high-speed network.
Specifically, the high speed network is turned on, i.e., the data switch of the high speed network is turned on. When the data switch of the high-speed network is opened, the terminal device allows the high-speed network to establish a connection, and at this time, if the terminal device is in a cell of the high-speed network, the terminal device can be connected to the high-speed network.
It will be appreciated that in some embodiments, the high speed network is shut down when the current application does not meet the high speed network on condition to limit the high speed network from establishing a connection.
Specifically, the high speed network, i.e., the data switch of the high speed network, is turned off. When the data switch of the high-speed network is closed, the terminal equipment limits the high-speed network to establish connection, and at the moment, even if the terminal equipment is in a cell of the high-speed network, the terminal equipment cannot be connected to the high-speed network, so that the problem that the power consumption is increased due to the fact that the terminal equipment opens the high-speed network for a long time is solved.
Referring to fig. 3, in some embodiments, after the high-speed network is turned on, the high-speed network turning-on method further includes:
s400: and when the foreground monitors that the current application program finishes running, determining the using time of the current application program.
In the embodiment of the application, when the monitoring unit cannot monitor the current application program in the foreground, the current application program is determined to finish running. When the current application program is closed or the current application program runs in the background, the monitoring unit cannot monitor the current application program in the foreground.
In some embodiments, when the foreground monitors the running of the application program, the starting time of the current application program is recorded, and based on the starting time, determining the using time of the current application program specifically comprises: when the foreground monitors that the current application program finishes running, the closing time of the current application program is recorded, and the difference value between the opening time and the closing time is determined as the using time of the current application program.
The monitoring unit monitors the running of the application program in the foreground, and the current application program of the terminal equipment starts to run, so that the starting time of the current application program is recorded when the application program is monitored in the foreground, namely the starting time of the current application program.
According to the difference value between the starting time of the current application program and the closing time of the current application program, the using time of the current application program can be accurately determined.
S500: if the using time is longer than the preset time, determining the current network speed of the current application program and the current flow of the preset time.
After the use time length of the current application program is determined, comparing the use time length with the preset time length, and if the use time length is longer than the preset time length, determining the current network speed of the current application program and the current flow of the preset time length so as to update the use data of the current application program according to the current network speed and the current flow of the preset time length.
The method for determining the current network speed of the current application program and the current flow of the preset duration specifically comprises the following steps: the method comprises the steps of obtaining a first flow value when a current application program starts to run and a second flow value when the current application program ends to run, calculating the current network speed according to the first flow value, the second flow value and the using time, and determining the flow in a preset time from the starting time as the current flow of the preset time.
The method comprises the steps of obtaining a first flow value when a current application program starts to run and a second flow value when the current application program ends to run through a uid process of the current application program. Specifically, since the time at which the current application starts to run can be represented by the on time and the time at which the current application ends to run can be represented by the off time, the flow value matching the on time in the ui process of the current application can be determined as the first flow value and the flow value matching the off time in the ui process of the current application can be determined as the second flow value.
And when the current network speed is calculated according to the first flow value, the second flow value and the using time length, determining the ratio of the difference value of the second flow value and the first flow value to the using time length as the current network speed of the current application program. The calculation formula of the current network speed is as follows:
Wherein v is the current network speed of the current application program, d1 is the first flow value, d2 is the second flow value, and T is the using time of the current application program.
Determining the flow in a preset time length from the opening time as the current flow in the preset time length, wherein the method specifically comprises the following steps of: determining node time according to the starting time and the preset time length; determining a flow value matched with the node moment in the uid process of the current application program as a third flow value; and determining the difference value between the third flow value and the first flow value as the current flow of the preset duration. Wherein, since the difference value between the third flow rate value and the first flow rate value is the flow rate within the preset time period from the opening time, the difference value between the third flow rate value and the first flow rate value can be determined as the current flow rate of the preset time period.
It can be understood that, since the application program needs to load the content within the preset time period when starting to run, the consumed flow is more, and therefore, whether to start the high-speed network is determined according to the flow within the preset time period from the start time, and the accuracy is higher.
S600: the average network speed of the current application is updated based on the current network speed.
Since the average network speed is calculated according to the network speed data stored in the network speed data list, updating the average network speed of the current application program based on the current network speed specifically includes:
Determining a first data capacity of the network speed data list;
Determining a first amount of network speed data stored in a network speed data list;
If the first quantity is smaller than the first data holding quantity, adding the current network speed to the network speed data list, and then recalculating the average network speed of the current application program according to the network speed data stored in the network speed data list;
When the first number is smaller than the first data accommodating amount, the network speed data list is indicated to not store full data, and the current network speed can be directly added into the network speed data list, and at this time, the average network speed of the current application program is recalculated according to the network speed data stored in the network speed data list, which specifically includes: determining the current quantity of the network speed data stored in the network speed data list; and summing the network speed data stored in the network speed data list to obtain a first sum, and determining the ratio of the first sum to the current number of the network speed data as the average network speed of the current application program.
And if the first quantity is equal to the first data holding quantity, deleting the oldest network speed data in the network speed data list, adding the current network speed to the network speed data list, and recalculating the average network speed of the current application program according to the network speed data stored in the network speed data list.
When the first number is equal to the first data accommodating amount, it indicates that the network speed data list stores full data, and when the network speed data list needs to be deleted according to the adding time of the network speed data, the oldest network speed data in the network speed data list can be added to the network speed data list, and when the average network speed of the current application program is recalculated according to the network speed data stored in the network speed data list, the method specifically includes: and summing the network speed data stored in the network speed data list to obtain a second sum, and determining the ratio of the second sum to the first data accommodating capacity as the average network speed of the current application program.
S700: and updating the average flow of the preset duration of the current application program based on the current flow of the preset duration.
Since the average flow of the preset duration is calculated according to the flow data stored in the flow data list, updating the average flow of the preset duration of the current application program based on the current flow of the preset duration specifically includes:
determining a second data capacity of the traffic data list;
Determining a second amount of traffic data stored in the traffic data list;
If the second quantity is smaller than the second data holding quantity, adding the current flow with the preset duration to a flow data list, and then recalculating the average flow with the preset duration of the current application program according to the flow data stored in the flow data list;
When the second number is smaller than the second data accommodating amount, the flow data list is indicated to not store full data, and the current flow of the preset duration can be directly added into the flow data list, and at this time, the average flow of the preset duration of the current application program is recalculated according to the flow data stored in the flow data list, which specifically includes: determining a current quantity of flow data stored in a flow data list; and summing the flow data stored in the flow data list to obtain a third sum, and determining the ratio of the third sum to the current quantity of the flow data as the average flow of the preset duration of the current application program.
And if the second quantity is equal to the second data holding quantity, deleting the oldest flow data in the flow data list, adding the current flow with the preset duration to the flow data list, and recalculating the average flow with the preset duration of the current application program according to the flow data stored in the flow data list.
When the second number is equal to the second data accommodating amount, it indicates that the flow data list stores full data, and at this time, the current flow with the preset duration can be added to the flow data list only after the oldest flow data in the flow data list is deleted according to the adding time of the flow data, and at this time, the average flow with the preset duration of the current application program is recalculated according to the flow data stored in the flow data list, which specifically includes: and summing the flow data stored in the flow data list to obtain a fourth sum, and determining the ratio of the fourth sum to the second data holding amount as the average flow of the preset duration of the current application program.
It can be understood that in the embodiment of the application, the high-speed network can be started only when the current application program meets the high-speed network starting condition, and based on the high-speed network starting condition, the power consumption increase caused by the long-term starting of the high-speed network by the terminal equipment can be prevented, so that the power consumption of the terminal equipment is reduced, the endurance time is increased, and the user experience is improved.
Further, please refer to fig. 4, which is a schematic structural diagram of a high-speed network opening device according to an embodiment of the present application, where the high-speed network opening device is applied to the terminal device, and as one specific implementation manner, functions of each module of the high-speed network opening device are executed by the processor 400, so as to reduce power consumption of the terminal device and improve user experience.
The term "module" is used below as a combination of software and/or hardware that can implement the intended function. Although the means described in the following embodiments may be implemented in software, implementation in hardware, or a combination of software and hardware, is also conceivable.
Specifically, the high-speed network opening device includes:
the searching module 10 is configured to search, when the foreground monitors that the application program runs, for use data of the current application program in the database, where the use data includes an average network speed and an average flow of a preset duration;
a determining module 20, configured to determine, when the usage data of the current application program is found, whether the current application program meets a high-speed network opening condition according to the average network speed and the average flow of the preset duration;
and an opening module 30, configured to open the high-speed network when the current application program meets the high-speed network opening condition, so as to allow the high-speed network to establish a connection.
In some embodiments, the lookup module 10 is specifically configured to:
Acquiring a first package name of the current application program;
and searching the use data of the current application program in the database according to the first package name.
In some embodiments, each usage data corresponds to a preset package name in the database; then the first time period of the first time period,
The search module 10 is specifically configured to:
Searching a preset package name matched with the first package name in the database when searching the use data of the current application program in the database according to the first package name;
And if the preset package name matched with the first package name is found, determining that the use data of the current application program is found in the database.
In some embodiments, the determining module 20 is specifically configured to:
Determining whether the average net speed is greater than a net speed threshold;
If the average network speed is greater than the network speed threshold, determining that the current application program meets the high-speed network opening condition,
Otherwise, determining whether the average flow of the preset duration is greater than a flow threshold;
if the average flow of the preset duration is greater than the flow threshold, determining that the current application program meets the high-speed network starting condition,
Otherwise, determining that the current application program does not meet the high-speed network starting condition.
In some embodiments, after the step of switching on the high speed network, the determining module 20 is further configured to:
when the foreground monitors that the current application program finishes running, determining the using time of the current application program;
if the using time is longer than the preset time, determining the current network speed of the current application program and the current flow of the preset time;
updating the average network speed of the current application program based on the current network speed;
And updating the average flow of the preset duration of the current application program based on the current flow of the preset duration.
Referring to fig. 5, in some embodiments, the high-speed network opening device further includes:
A recording module 40, configured to record an opening time of the current application program when the foreground monitors that the application program runs; then the first time period of the first time period,
The determining module 20 is specifically configured to:
When the using time of the current application program is determined, recording the closing time of the current application program when the foreground monitors that the current application program finishes running;
and determining the difference value of the opening time and the closing time as the using duration of the current application program.
In some embodiments, the determining module 20 is specifically configured to:
When determining the current network speed of the current application program and the current flow of the preset duration, acquiring a first flow value when the current application program starts to run and a second flow value when the current application program ends to run;
Calculating the current network speed according to the first flow value, the second flow value and the using duration;
And determining the flow in the preset time length from the opening time as the current flow of the preset time length.
In some embodiments, the average network speed is calculated according to network speed data stored in a network speed data list; then the first time period of the first time period,
The determining module 20 is specifically configured to:
determining a first data capacity of the network speed data list when updating an average network speed of the current application program based on the current network speed;
Determining a first amount of network speed data stored in the network speed data list;
If the first quantity is smaller than the first data accommodating quantity, adding the current network speed to the network speed data list, and then recalculating the average network speed of the current application program according to the network speed data stored in the network speed data list;
And if the first quantity is equal to the first data accommodating quantity, deleting the oldest network speed data in the network speed data list, adding the current network speed to the network speed data list, and recalculating the average network speed of the current application program according to the network speed data stored in the network speed data list.
In some embodiments, the average flow of the preset duration is calculated according to the flow data stored in the flow data list; then the first time period of the first time period,
The determining module 20 is specifically configured to:
Determining a second data holding amount of the flow data list when updating the average flow of the preset duration of the current application program based on the current flow of the preset duration;
Determining a second amount of traffic data stored in the traffic data list;
If the second number is smaller than the second data accommodating amount, adding the current flow of the preset duration to the flow data list, and then recalculating the average flow of the preset duration of the current application program according to the flow data stored in the flow data list;
And if the second quantity is equal to the second data accommodating quantity, deleting the oldest flow data in the flow data list, adding the current flow of the preset time length to the flow data list, and recalculating the average flow of the preset time length of the current application program according to the flow data stored in the flow data list.
Referring to fig. 5, in some embodiments, the high-speed network opening device further includes:
and a closing module 50, configured to close the high-speed network to limit the high-speed network from establishing a connection when the current application program does not meet the high-speed network opening condition.
Referring to fig. 5, in some embodiments, the high-speed network opening device further includes:
A maintaining module 60, configured to maintain the current network when no usage data of the current application program is found.
Since the apparatus embodiments and the method embodiments are based on the same concept, on the premise that the contents do not conflict with each other, the contents of the apparatus embodiments may refer to the method embodiments, which are not described in detail herein.
It can be understood that in the embodiment of the application, the high-speed network can be started only when the current application program meets the high-speed network starting condition, and based on the high-speed network starting condition, the power consumption increase caused by the long-term starting of the high-speed network by the terminal equipment can be prevented, so that the power consumption of the terminal equipment is reduced, the endurance time is increased, and the user experience is improved.
Further, embodiments of the present application provide a non-transitory computer readable storage medium storing computer executable instructions for execution by one or more processors, such as one of the processors 400 in fig. 1, to cause a computer to perform the steps of, or implement the functions of, the modules of, one of the high-speed network opening devices in any of the method embodiments described above.
Further, embodiments of the present application also provide a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by one or more processors, such as the one processor 400 in fig. 1, cause the computer to perform the steps of a high speed network opening method in any of the method embodiments described above, or to implement the functions of the modules of a high speed network opening device in any of the apparatus embodiments described above.
The apparatus embodiments described above are merely illustrative, wherein the modules illustrated as separate components may or may not be physically separate, and the components shown as modules may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the modules may be selected according to actual needs to implement the solution of this embodiment.
From the above description of embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus a general purpose hardware platform, but may also be implemented by means of hardware. Those skilled in the art will appreciate that all or part of the processes in the methods of the embodiments described above may be implemented by hardware associated with computer program instructions, where the program may be stored on a computer readable storage medium, where the program, when executed, may include processes for implementing the methods described above. 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.
The foregoing description is only illustrative of the present application and is not intended to limit the scope of the application, and all equivalent structures or equivalent processes or direct or indirect application in other related technical fields are included in the scope of the present application.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and are not limiting; the technical features of the above embodiments or in the different embodiments may also be combined within the idea of the application, the steps may be implemented in any order, and there are many other variations of the different aspects of the application as described above, which are not provided in detail for the sake of brevity; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the application.

Claims (13)

1. A high-speed network opening method applied to a terminal device, the method comprising:
when the foreground monitors that an application program runs, searching use data of a current application program in a database, wherein the use data comprise average network speed and average flow of preset duration, the average network speed is the average value of network speed in the use duration of the application program, the average flow of the preset duration is the average value of flow in the preset duration of the application program, and the database stores the use data of the application program;
If the use data of the current application program is found, determining whether the current application program meets a high-speed network starting condition according to the average network speed and the average flow of the preset duration;
when the current application program meets the high-speed network starting condition, starting the high-speed network to allow the high-speed network to establish connection;
when the foreground monitors that the current application program finishes running, determining the using time of the current application program;
if the using time is longer than the preset time, determining the current network speed of the current application program and the current flow of the preset time;
updating the average network speed of the current application program based on the current network speed;
And updating the average flow of the preset duration of the current application program based on the current flow of the preset duration.
2. The method according to claim 1, wherein the searching the database for the usage data of the current application program specifically comprises:
Acquiring a first package name of the current application program;
and searching the use data of the current application program in the database according to the first package name.
3. The method of claim 2, wherein each usage data corresponds to a preset package name in the database; then the first time period of the first time period,
The searching the usage data of the current application program in the database according to the first package name specifically comprises the following steps:
Searching a preset package name matched with the first package name in the database;
And if the preset package name matched with the first package name is found, determining that the use data of the current application program is found in the database.
4. A method according to any one of claims 1 to 3, wherein said determining whether the current application program satisfies a high-speed network opening condition according to the average network speed and the average traffic of the preset duration specifically includes:
Determining whether the average net speed is greater than a net speed threshold;
If the average network speed is greater than the network speed threshold, determining that the current application program meets the high-speed network opening condition,
Otherwise, determining whether the average flow of the preset duration is greater than a flow threshold;
if the average flow of the preset duration is greater than the flow threshold, determining that the current application program meets the high-speed network starting condition,
Otherwise, determining that the current application program does not meet the high-speed network starting condition.
5. The method according to claim 1, wherein the method further comprises:
When the foreground monitors the running of the application program, recording the starting time of the current application program; then the first time period of the first time period,
The determining the using time of the current application program specifically includes:
recording closing time of the current application program when the foreground monitors that the current application program finishes running;
and determining the difference value of the opening time and the closing time as the using duration of the current application program.
6. The method according to claim 5, wherein the determining the current network speed of the current application program and the current traffic of the preset duration specifically comprises:
acquiring a first flow value when the current application program starts to run and a second flow value when the current application program ends to run;
Calculating the current network speed according to the first flow value, the second flow value and the using duration;
And determining the flow in the preset time length from the opening time as the current flow of the preset time length.
7. The method of claim 6, wherein the average network speed is calculated from network speed data stored in a network speed data list; then the first time period of the first time period,
The updating the average network speed of the current application program based on the current network speed specifically comprises the following steps:
determining a first data capacity of the network speed data list;
Determining a first amount of network speed data stored in the network speed data list;
If the first quantity is smaller than the first data accommodating quantity, adding the current network speed to the network speed data list, and then recalculating the average network speed of the current application program according to the network speed data stored in the network speed data list;
And if the first quantity is equal to the first data accommodating quantity, deleting the oldest network speed data in the network speed data list, adding the current network speed to the network speed data list, and recalculating the average network speed of the current application program according to the network speed data stored in the network speed data list.
8. The method of claim 7, wherein the average flow for the preset duration is calculated from flow data stored in a flow data list; then the first time period of the first time period,
The updating the average flow of the preset duration of the current application program based on the current flow of the preset duration specifically comprises the following steps:
determining a second data capacity of the traffic data list;
Determining a second amount of traffic data stored in the traffic data list;
If the second number is smaller than the second data accommodating amount, adding the current flow of the preset duration to the flow data list, and then recalculating the average flow of the preset duration of the current application program according to the flow data stored in the flow data list;
And if the second quantity is equal to the second data accommodating quantity, deleting the oldest flow data in the flow data list, adding the current flow of the preset time length to the flow data list, and recalculating the average flow of the preset time length of the current application program according to the flow data stored in the flow data list.
9. The method according to claim 1, wherein the method further comprises:
And closing the high-speed network when the current application program does not meet the high-speed network opening condition so as to limit the high-speed network to establish connection.
10. The method according to claim 1, wherein the method further comprises:
and when the use data of the current application program cannot be found, maintaining the current network.
11. A high-speed network opening device applied to a terminal device, the device comprising:
The system comprises a searching module, a database and a control module, wherein the searching module is used for searching the use data of the current application program in the database when the foreground monitors the running of the application program, the use data comprise average network speed and average flow of preset duration, the average network speed is the average value of the network speed in the use duration of the application program, the average flow of the preset duration is the average value of the flow in the preset duration of the application program, and the database stores the use data of the application program;
The determining module is used for determining whether the current application program meets a high-speed network starting condition according to the average network speed and the average flow of the preset duration when the use data of the current application program is searched;
the starting module is used for starting the high-speed network when the current application program meets the high-speed network starting condition so as to allow the high-speed network to establish connection;
The determining module is further configured to:
when the foreground monitors that the current application program finishes running, determining the using time of the current application program;
if the using time is longer than the preset time, determining the current network speed of the current application program and the current flow of the preset time;
updating the average network speed of the current application program based on the current network speed;
And updating the average flow of the preset duration of the current application program based on the current flow of the preset duration.
12. A terminal device, comprising:
At least one processor; and
A memory communicatively coupled to the at least one processor;
Wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the high speed network opening method of any one of claims 1 to 10.
13. A non-transitory computer-readable storage medium storing computer-executable instructions for causing a terminal device to perform the high-speed network start-up method according to any one of claims 1 to 10.
CN202011281137.0A 2020-11-16 2020-11-16 High-speed network starting method and device and terminal equipment Active CN114513830B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011281137.0A CN114513830B (en) 2020-11-16 2020-11-16 High-speed network starting method and device and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011281137.0A CN114513830B (en) 2020-11-16 2020-11-16 High-speed network starting method and device and terminal equipment

Publications (2)

Publication Number Publication Date
CN114513830A CN114513830A (en) 2022-05-17
CN114513830B true CN114513830B (en) 2024-05-03

Family

ID=81547303

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011281137.0A Active CN114513830B (en) 2020-11-16 2020-11-16 High-speed network starting method and device and terminal equipment

Country Status (1)

Country Link
CN (1) CN114513830B (en)

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103347285A (en) * 2013-07-16 2013-10-09 福州大学 Network type automatic switching method for mobile platform
CN104796956A (en) * 2015-04-23 2015-07-22 陆俊 Mobile terminal network switching method and mobile terminal
WO2015154388A1 (en) * 2014-07-01 2015-10-15 中兴通讯股份有限公司 Network mode switching method, device and terminal
CN105517069A (en) * 2015-12-04 2016-04-20 魅族科技(中国)有限公司 Communication mode switching method and mobile terminal
CN106658616A (en) * 2016-12-26 2017-05-10 北京奇虎科技有限公司 Network switching method and apparatus based on network speed, and terminal device
CN106900020A (en) * 2017-04-05 2017-06-27 合肥酷睿网络科技有限公司 A kind of mobile terminal selects the device and method of network
CN107466077A (en) * 2017-07-24 2017-12-12 维沃移动通信有限公司 A kind of method for switching network and mobile terminal
KR101896056B1 (en) * 2017-10-13 2018-09-07 인천대학교 산학협력단 Enabling multimedia aware vertical handover Management in Internet of Things based heterogeneous wireless networks
CN109068359A (en) * 2018-08-28 2018-12-21 深圳市万普拉斯科技有限公司 Method for switching network, device, terminal device and storage medium
CN110505675A (en) * 2019-08-12 2019-11-26 RealMe重庆移动通信有限公司 Method for connecting network and device, storage medium, communication terminal
CN110753389A (en) * 2019-10-23 2020-02-04 维沃移动通信有限公司 Network control method and electronic equipment
CN110913442A (en) * 2019-12-06 2020-03-24 Oppo广东移动通信有限公司 Network switching method and device, electronic equipment and storage medium
CN110996376A (en) * 2019-10-10 2020-04-10 宇龙计算机通信科技(深圳)有限公司 Service data transmission method, device, storage medium and terminal
WO2020182016A1 (en) * 2019-03-09 2020-09-17 华为技术有限公司 Network connection processing method, related device and computer storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3895324A4 (en) * 2019-05-08 2022-01-26 Samsung Electronics Co., Ltd. Electronic device and control method thereof

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103347285A (en) * 2013-07-16 2013-10-09 福州大学 Network type automatic switching method for mobile platform
WO2015154388A1 (en) * 2014-07-01 2015-10-15 中兴通讯股份有限公司 Network mode switching method, device and terminal
CN104796956A (en) * 2015-04-23 2015-07-22 陆俊 Mobile terminal network switching method and mobile terminal
CN105517069A (en) * 2015-12-04 2016-04-20 魅族科技(中国)有限公司 Communication mode switching method and mobile terminal
CN106658616A (en) * 2016-12-26 2017-05-10 北京奇虎科技有限公司 Network switching method and apparatus based on network speed, and terminal device
CN106900020A (en) * 2017-04-05 2017-06-27 合肥酷睿网络科技有限公司 A kind of mobile terminal selects the device and method of network
CN107466077A (en) * 2017-07-24 2017-12-12 维沃移动通信有限公司 A kind of method for switching network and mobile terminal
KR101896056B1 (en) * 2017-10-13 2018-09-07 인천대학교 산학협력단 Enabling multimedia aware vertical handover Management in Internet of Things based heterogeneous wireless networks
CN109068359A (en) * 2018-08-28 2018-12-21 深圳市万普拉斯科技有限公司 Method for switching network, device, terminal device and storage medium
WO2020182016A1 (en) * 2019-03-09 2020-09-17 华为技术有限公司 Network connection processing method, related device and computer storage medium
CN110505675A (en) * 2019-08-12 2019-11-26 RealMe重庆移动通信有限公司 Method for connecting network and device, storage medium, communication terminal
CN110996376A (en) * 2019-10-10 2020-04-10 宇龙计算机通信科技(深圳)有限公司 Service data transmission method, device, storage medium and terminal
CN110753389A (en) * 2019-10-23 2020-02-04 维沃移动通信有限公司 Network control method and electronic equipment
CN110913442A (en) * 2019-12-06 2020-03-24 Oppo广东移动通信有限公司 Network switching method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN114513830A (en) 2022-05-17

Similar Documents

Publication Publication Date Title
US20200219016A1 (en) Method for Cleaning Up Background Application, Storage Medium, and Electronic Device
CN106484848B (en) Application recommendation method and device
US20200225995A1 (en) Application cleaning method, storage medium and electronic device
CN110688169B (en) Application program acceleration method and device, storage medium and electronic equipment
CN111324533B (en) A/B test method and device and electronic equipment
EP4216033A1 (en) Application operation mode switching method and apparatus, electronic device, and storage medium
CN108243032B (en) Method, device and equipment for acquiring service level information
CN112181124B (en) Method for managing power consumption and related equipment
CN110289993A (en) A kind of connection pool management method, apparatus, equipment and adapting system
CN107590016A (en) Power-down rebooting recognition methods and device
US20210216331A1 (en) Application cleaning method, storage medium and electronic device
CN109597482B (en) Automatic page turning method and device for electronic book, medium and electronic equipment
CN114513830B (en) High-speed network starting method and device and terminal equipment
WO2019062409A1 (en) Method for managing and controlling background application program, storage medium, and electronic device
CN112367384B (en) Kafka cluster-based dynamic speed limiting method and device and computer equipment
CN111182526A (en) Data updating method, mobile terminal and computer storage medium
CN110490737B (en) Transaction channel control method and device and electronic equipment
CN115762503A (en) Vehicle-mounted voice system, vehicle-mounted voice autonomous learning method, device and medium
CN111176679A (en) Application program updating method and device
CN111176969B (en) Data processing method, device, equipment and storage medium
CN115291111B (en) Training method of battery rest time prediction model and rest time prediction method
WO2020133441A1 (en) Application program management method and apparatus, storage medium, and electronic device
CN110968334B (en) Application resource updating method, resource package manufacturing method, device, medium and equipment
US20230393891A1 (en) Application performance enhancement system and method based on a user's mode of operation
CN116390043A (en) Calling method, multimode terminal and storage medium

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