CN114513830A - High-speed network opening method and device and terminal equipment - Google Patents

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

Info

Publication number
CN114513830A
CN114513830A CN202011281137.0A CN202011281137A CN114513830A CN 114513830 A CN114513830 A CN 114513830A CN 202011281137 A CN202011281137 A CN 202011281137A CN 114513830 A CN114513830 A CN 114513830A
Authority
CN
China
Prior art keywords
network
speed
application program
current application
flow
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.)
Granted
Application number
CN202011281137.0A
Other languages
Chinese (zh)
Other versions
CN114513830B (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

Images

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Power Sources (AREA)

Abstract

The embodiment of the application relates to the technical field of communication, in particular to a high-speed network starting method, a high-speed network starting device and terminal equipment. The high-speed network starting method is applied to 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 the database, wherein the use data comprises the average network speed and the 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 or not 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. By means of the method, the terminal equipment can be prevented from starting the high-speed network for a long time, power consumption of the terminal equipment is reduced, endurance time is prolonged, and user experience is improved.

Description

High-speed network opening 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 high-speed network starting device and terminal equipment.
Background
With the development of mobile communication technology, the types of networks supported by terminal devices are gradually developing towards high-speed networks. Although the high-speed network has the characteristics of high speed, high reliability, low time delay and the like, the power consumption of the high-speed network is large, and if the high-speed network is started for a long time, the power consumption of the terminal equipment is increased, so that the endurance time is shortened, and the user experience is influenced.
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 above technical problem, one technical solution adopted in the embodiments of the present application is: a high-speed network opening method is provided and applied to terminal equipment, and the method 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 the average network speed and the 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 or not 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 for the usage data of the current application program in the database 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 piece of usage data corresponds to a preset package name; then the process of the first step is carried out,
the searching, according to the first package name, for the usage data of the current application program in the database specifically includes:
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 to find the use data of the current application program in the database.
Optionally, the 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 specifically includes:
determining whether the average wire speed is greater than a wire speed threshold;
if the average network speed is greater than the network speed threshold value, determining that the current application program meets the high-speed network starting 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 opening condition.
Optionally, after the step of starting the high-speed network, the method further includes:
when the foreground monitors that the current application program finishes running, determining the service life of the current application program;
if the service 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:
recording the opening time of the current application program when the foreground monitors the running of the application program; then the process of the first step is carried out,
the determining the use duration of the current application program specifically includes:
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 service life of the current application program.
Optionally, the determining the current network 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 finishes to run;
calculating the current network speed according to the first flow value, the second flow value and the service life;
and determining the flow within a preset time length from the starting 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 process of the first step is carried out,
the 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 quantity of network speed data stored in the network speed data list;
if the first quantity is smaller than the first data capacity, 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;
if the first quantity is equal to the first data capacity, 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 flow data stored in a flow data list; then the process of the first step is carried out,
updating the average flow of the preset duration of the current application program based on the current flow of the preset duration specifically comprises:
determining a second data capacity of the flow data list;
determining a second amount of traffic data stored in the list of traffic data;
if the second quantity is smaller than the second data capacity, 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;
if the second quantity is equal to the second data capacity, deleting the oldest flow data in the flow data list, adding the current flow of the preset duration to the flow data list, and recalculating the average flow of the preset duration of the current application program according to the flow data stored in the flow data list.
Optionally, the method further comprises:
and when the current application program does not meet the high-speed network opening condition, closing the high-speed network 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 searched, maintaining the current network.
In order to solve the above technical problem, another technical solution adopted in the embodiment of the present application is: the high-speed network opening device is applied to terminal equipment and comprises:
the searching module is used for searching the use data of the current application program in the database when the foreground monitors that the application program runs, wherein the use data comprises the average network speed and the average flow of the preset duration;
the determining module is used for determining whether the current application program meets the high-speed network starting condition or not according to the average network speed and the average flow of the preset duration when the using data of the current application program is found;
and the starting module is used for starting the high-speed network to allow the high-speed network to establish connection when the current application program meets the high-speed network starting condition.
In order to solve the above technical problem, another technical solution adopted in the embodiment of the present application is: 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 above technical problem, another technical solution adopted in the embodiment of the present application is: there is provided a non-transitory computer-readable storage medium storing computer-executable instructions for causing a terminal device to perform the high-speed network opening method described above.
The embodiment of the application provides a high-speed network opening method, a device and a terminal device, in the high-speed network opening method, when the foreground monitors that an application program runs, the average network speed and the average flow of preset duration of the current application program are searched in a database, if the average network speed and the average flow of the preset duration of the current application program are searched in the database, whether the current application program meets a high-speed network opening condition or not is determined according to the average network speed and the average flow of the preset duration of the current application program, 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 device opens the high-speed network only when the running application program needs the high-speed network, the power consumption of the terminal device is prevented from being increased due to the long-term opening of the high-speed network, and the power consumption of the terminal device is reduced, the endurance time is increased, and the user experience is improved.
Drawings
One or more embodiments are illustrated by way of example in the accompanying drawings, which correspond to the figures in which like reference numerals refer to similar elements and which are not to scale unless otherwise specified.
Fig. 1 is a schematic structural diagram of a terminal device provided in an embodiment of the present application;
fig. 2 is a schematic flowchart of a high-speed network opening method according to an embodiment of the present application;
fig. 3 is a flowchart illustrating a high-speed network booting method 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 apparatus according to another embodiment of the present application.
Detailed Description
In order to make the technical solutions of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings in the embodiments of the present application, and it is obvious 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 merely illustrative of the present application and are not intended to limit the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present 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 intervening elements may be present.
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 conflict with each other.
The application provides a high-speed network starting method and device, which are applied to terminal equipment, so that the terminal equipment can start the high-speed network only when a current application program meets a high-speed network starting condition, the power consumption increase caused by the long-term starting of the high-speed network by the terminal equipment is prevented, the power consumption of the terminal equipment is reduced, the endurance time is increased, 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 and an intelligent watch.
It is understood that the present application defines a network with the highest network speed among the types of networks 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, the 4G network is defined as a high-speed network because the network speed of the 4G network is higher than that of the 3G network in the 3G network and the 4G network; when the network types supported by the terminal device include a 4G network and a 5G network, the 5G network is defined as a high-speed network because the 5G network is higher than the 4G network in the 4G network and the 5G network. Based on this, if a new network having a higher network speed than that of the 5G network appears with the development of the mobile communication technology, the new network can be defined as a high-speed network.
The present application will be explained below by way of specific examples.
Please refer to fig. 1, which 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 listening unit 200, a memory 300 and a processor 400, wherein the processor 400 is respectively connected with the interaction unit 100, the listening unit 200 and the memory 300. It will be appreciated by those skilled in the art that the configuration shown in fig. 1 does not constitute a limitation of the terminal device, which may include more or fewer components than those shown, or combine certain components, or split certain components, or adopt a different arrangement of components.
The interaction unit 100 is used for interacting with a user, and includes outputting display content to the user and/or receiving input operation of the user.
Specifically, the interaction unit 100 can display information provided to the user, or display information input by the user, or display an application program of the terminal device.
When the interactive unit 100 displays an application of the terminal device, the user can trigger the application to run through the interactive 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 running on the foreground, so that the application monitored by the monitoring unit 200 is a current application of the terminal device.
When the current application program cannot be monitored in the foreground by the monitoring unit 200, it is determined that the current application program is finished running. When the current application is closed or runs in the background, the listening unit 200 cannot listen to the current application in the foreground.
Memory 300 is provided as 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 program storage area and a data storage area. The storage program area can store an operating system and an application program 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 name of the application program, 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 program has uniqueness, the preset package name can uniquely identify the application program.
The use data comprises average network speed and average flow of 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 is the network speed within the use duration of the application program, and in the network speed data list, each network speed data corresponds to the adding time thereof one to one.
The flow data list is used for storing flow data of the application program, the flow data are flows in a preset time length of the application program, and each flow data corresponds to the adding time thereof in the flow data list.
Further, the 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 may optionally include memory located remotely from processor 400, which may be connected to a 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, can connect various parts of the whole terminal device by using various interfaces and lines, and performs various functions of the terminal device and processes data by running or executing the 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, the high-speed network opening method described in any embodiment of the present application is implemented.
The processor 400 may be one or more, and one processor 400 is illustrated in fig. 1.
The processor 400, the interaction unit 100, the listening unit 200 and the memory 300 may be connected by a bus or other means, 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), and 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 can 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 running at the foreground, at this time, the processor 400 searches the database for the average network speed and the average flow rate of the preset duration of the current application program, and if the average network speed and the average flow rate of the preset duration of the current application program are found, determines whether the current application program meets the high-speed network opening condition according to the found average network speed and the average flow rate of the preset duration, 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.
Further, please refer to fig. 2, which is a flowchart illustrating a high-speed network booting method according to an embodiment of the present application, the high-speed network booting method is applied to the terminal device, and as a specific implementation manner of the high-speed network booting method, the high-speed network booting 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 starting method includes:
s100: when the foreground monitors that the application program runs, the database is searched for the use data of the current application program, wherein the use data comprises the average network speed and the average flow of the 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 name of the application program, 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 program has uniqueness, the preset package name can uniquely identify the application program.
The usage data includes average network speed and average flow rate of preset time.
The average network speed is calculated according to the network speed data stored in the network speed data list, the network speed data stored in the network speed data list is the network speed within the service time of the application program, and each network speed data corresponds to the adding time thereof one to one. Based on this, it can be understood that the average wire speed is the average of the wire speed over the application usage period.
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 of the application program within the preset duration, and each flow data corresponds to the adding time thereof one to one. Based on this, it can be understood that the average flow rate of the preset time period is the average value of the flow rate within the preset time period of the application program.
Preferably, in the embodiment of the present application, the preset time period is 1 min.
In the embodiment of the application, the monitoring unit monitors the foreground of the terminal device, and when the monitoring unit monitors the running of the application program in the foreground, it is determined that the current application program of the terminal device starts to run, and at this time, the use data of the current application program is searched in the database.
Since the database is used for storing the usage data of the application program requiring the use of the high-speed network, the current application program can be determined whether the current application program is the application program requiring the use of the high-speed network by looking up the usage data of the current application program in the database. And if the use data of the current application program is searched in the database, determining that the current application program is the application program needing to use the high-speed network, otherwise, determining that the current application program is 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, the 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.
Each piece of use data in the database corresponds to a preset package name, and the package name of the application program has uniqueness, so that when the use 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 use data of the current application program is determined to be searched in the database, and at the moment, the use data matched with the first package name and the preset package name is the use data of the current application program.
S200: and if the use data of the current application program is found, determining whether the current application program meets the high-speed network starting condition or not 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 in the database, the current application program is determined to be the application program needing to use the high-speed network, and at the moment, the habit of a user 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 opened.
The method comprises the steps of determining whether a current application program meets a high-speed network starting condition or not according to an average network speed and an average flow of preset time, determining whether the average network speed is greater than a network speed threshold or not, if the average network speed is greater than the network speed threshold, determining that the current application program meets the high-speed network starting condition or not, if the average network speed is not greater than the network speed threshold, determining whether the average flow of the preset time is greater than a flow threshold or not, if the average flow of the preset time is greater than the flow threshold, determining that the current application program meets the high-speed network starting condition, and if the average flow of the preset time is not greater than the flow threshold, determining that the current application program does not meet the high-speed network starting condition.
The network speed threshold value and the flow threshold value 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 use of the high speed network, at which point the current network is maintained.
For example, if the current network is the high-speed network, the high-speed network is kept to be started; if the current network is the high-speed network, the high-speed network is kept closed.
S300: 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.
In the embodiment of the present application, a network with the highest network speed among network types supported by a terminal device 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, the 4G network is defined as a high-speed network because the network speed of the 4G network is higher than that of the 3G network in the 3G network and the 4G network; when the network types supported by the terminal device include a 4G network and a 5G network, the 5G network is defined as a high-speed network because the 5G network is higher than the 4G network in the 4G network and the 5G network. Based on this, if a new network having a higher network speed than that of the 5G network appears with the development of the mobile communication technology, the new network can be defined as a high-speed network.
Specifically, the high-speed network is turned on, that is, the data switch of the high-speed network is turned on. When a data switch of the high-speed network is turned on, 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 to restrict the high speed network from establishing a connection when the current application does not meet the high speed network open condition.
Specifically, the high speed network is turned off, i.e., the data switch of the high speed network is turned off. When a 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 located in a cell of the high-speed network, the terminal equipment cannot be connected to the high-speed network, so that the power consumption increase caused by the fact that the terminal equipment opens the high-speed network for a long time is prevented.
Referring to fig. 3, in some embodiments, after the high-speed network is started, the high-speed network starting method further includes:
s400: and when the foreground monitors that the current application program finishes running, determining the use duration of the current application program.
In the embodiment of the application, when the monitoring unit cannot monitor the current application program in the foreground, it is determined that the current application program finishes 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 that the application runs, the start time of the current application is recorded, and based on this, determining the use duration of the current application specifically includes: and when the foreground monitors that the current application program finishes running, recording the closing time of the current application program, and determining the difference value between the opening time and the closing time as the service duration of the current application program.
Since the monitoring unit starts to operate the current application program of the terminal device when the foreground monitors the operation of the application program, the starting time of the current application program is recorded when the foreground monitors the operation of the application program, that is, the time when the current application program starts to operate.
According to the difference value between the starting time when the current application program starts to run and the closing time when the current application program finishes to run, the service life of the current application program can be accurately determined.
S500: and if the service 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 duration of the current application program is determined, the use duration is compared with a preset duration, if the use duration is longer than the preset duration, the current network speed of the current application program and the current flow of the preset duration are determined, and the use data of the current application program are updated according to the current network speed and the current flow of the preset duration.
The determining of the current network speed of the current application program and the current flow of the preset duration specifically includes: 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 finishes to run, calculating the current network speed according to the first flow value, the second flow value and the use duration, and determining the flow in the preset duration from the starting time as the current flow of the preset duration.
The method comprises the steps of obtaining a first flow value when the current application program starts to run and a second flow value when the current application program finishes 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 in the uid process of the current application that matches the on time can be determined as the first flow value and the flow value in the uid process of the current application that matches the off time 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 use duration, determining the ratio of the difference value of the second flow value and the first flow value to the use duration as the current network speed of the current application program. The calculation formula of the current network speed is as follows:
Figure BDA0002780773000000131
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 duration of use of the current application program.
Determining the flow in the preset time length from the starting time as the current flow of the preset time length, and specifically comprising the following steps of: determining the node time according to the starting time and the preset time; determining a flow value matched with the node time 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. The difference value between the third flow value and the first flow value is the flow within the preset time length from the starting time, so that the difference value between the third flow value and the first flow value can be determined as the current flow of the preset time length.
It can be understood that, because the application program needs to load the content within the preset time length 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 length from the start time, and the accuracy is higher.
S600: and updating the average network speed of the current application program 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 quantity of network speed data stored in a network speed data list;
if the first quantity is smaller than the first data capacity, adding the current network speed to a 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 quantity is smaller than the first data capacity, it indicates that the network speed data list does not store full data, and the current network speed can be directly added to 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 capacity, 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 quantity is equal to the first data capacity, it indicates that the network speed data list stores full data, and at this time, the current network speed can be added to the network speed data list only after the oldest network speed data in the network speed data list is deleted according to the adding time of the network speed data, 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: 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 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 flow 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 capacity, adding the current flow with the preset duration to a 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 quantity is smaller than the second data capacity, it indicates that the flow data list does not store full data, and the current flow with the preset duration can be directly added to the flow data list, 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: determining the current amount of the flow data stored in the 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.
If the second quantity is equal to the second data capacity, 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 quantity is equal to the second data capacity, 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 capacity as the average flow of the current application program in the preset duration.
It can be understood that, in the embodiment of the present application, the high-speed network can be started only when the current application program meets the high-speed network starting condition, and based on this, it can be prevented that the power consumption is increased due to the terminal device starting the high-speed network for a long time, so that the power consumption of the terminal device 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 booting apparatus according to an embodiment of the present application, the high-speed network booting apparatus is applied to the terminal device, and as a specific implementation manner of the high-speed network booting apparatus, functions of each module of the high-speed network booting apparatus are executed by the processor 400, so as to reduce power consumption of the terminal device and improve user experience.
The term "module" as used below is a combination of software and/or hardware that can implement a predetermined function. Although the means described in the following embodiments may be implemented in software, an implementation in hardware or a combination of software and hardware is also conceivable.
Specifically, the high-speed network opening apparatus includes:
the searching module 10 is configured to search, in the database, usage data of a current application program when the foreground monitors that the application program runs, where the usage data includes an average network speed and an average flow of a preset duration;
a determining module 20, configured to determine whether the current application program meets a high-speed network start condition according to the average network speed and the average flow of the preset duration when the usage data of the current application program is found;
and the starting module 30 is configured to start the high-speed network to allow the high-speed network to establish a connection when the current application program meets the high-speed network starting condition.
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 predetermined package name in the database; then the process of the first step is carried out,
the search module 10 is specifically configured to:
when the use data of the current application program is searched in the database according to the first package name, 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 to find the use data of the current application program in the database.
In some embodiments, the determining module 20 is specifically configured to:
determining whether the average wire speed is greater than a wire speed threshold;
if the average network speed is greater than the network speed threshold value, determining that the current application program meets the high-speed network starting 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 opening condition.
In some embodiments, after the step of turning 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 service life of the current application program;
if the service 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 apparatus further includes:
the recording module 40 is configured to record the starting time of the current application program when the foreground monitors that the application program runs; then the process of the first step is carried out,
the determining module 20 is specifically configured to:
when the use duration 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 service life of the current application program.
In some embodiments, the determining module 20 is specifically configured to:
when the current network speed of the current application program and the current flow of a preset time length are determined, a first flow value when the current application program starts to run and a second flow value when the current application program finishes to run are obtained;
calculating the current network speed according to the first flow value, the second flow value and the service life;
and determining the flow within a preset time length from the starting time as the current flow of the preset time length.
In some embodiments, the average wire speed is calculated according to wire speed data stored in a wire speed data list; then the user can use the device to make a visual display,
the determining module 20 is specifically configured to:
determining a first data capacity of the network speed data list when updating the average network speed of the current application program based on the current network speed;
determining a first quantity of network speed data stored in the network speed data list;
if the first quantity is smaller than the first data capacity, 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;
if the first quantity is equal to the first data capacity, 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 flow data stored in a flow data list; then the process of the first step is carried out,
the determining module 20 is specifically configured to:
determining a second data capacity of the flow data list when updating the average flow of the current application program for a preset duration based on the current flow of the preset duration;
determining a second amount of traffic data stored in the list of traffic data;
if the second quantity is smaller than the second data capacity, 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;
if the second quantity is equal to the second data capacity, deleting the oldest flow data in the flow data list, adding the current flow of the preset duration to the flow data list, and recalculating the average flow of the preset duration 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 apparatus further includes:
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 does not satisfy the high-speed network opening condition.
Referring to fig. 5, in some embodiments, the high-speed network opening apparatus further includes:
a maintaining module 60, configured to maintain the current network when the usage data of the current application is not found.
Since the apparatus embodiment and the method embodiment are based on the same concept, the contents of the apparatus embodiment may refer to the method embodiment on the premise that the contents do not conflict with each other, and are not described in detail herein.
It can be understood that, in the embodiment of the present application, the high-speed network can be started only when the current application program meets the high-speed network starting condition, and based on this, it can be prevented that the power consumption is increased due to the terminal device starting the high-speed network for a long time, so that the power consumption of the terminal device is reduced, the endurance time is increased, and the user experience is improved.
Further, embodiments of the present application also provide a non-transitory computer-readable storage medium storing computer-executable instructions, which are executed by one or more processors, such as a processor 400 in fig. 1, and enable the computer to perform the steps of a high-speed network opening method in any of the above method embodiments or implement the functions of the modules of a high-speed network opening apparatus in any of the above apparatus embodiments.
Further, embodiments of the present application also provide a computer program product, which includes a computer program stored on a non-volatile computer-readable storage medium, where the computer program includes program instructions, and when the program instructions are executed by one or more processors, such as a processor 400 in fig. 1, the computer program instructions may cause the computer to perform the steps of a high-speed network opening method in any of the above method embodiments, or implement the functions of the modules of a high-speed network opening apparatus in any of the above apparatus embodiments.
The above-described embodiments of the apparatus are merely illustrative, wherein the modules described as separate parts may or may not be physically separate, and the parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to implement the solution of the present embodiment.
Through the above description of the embodiments, those skilled in the art will clearly understand that the embodiments may be implemented by software plus a general hardware platform, and may also be implemented by hardware. It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above may be implemented by hardware associated with computer program instructions, and that the programs may be stored in a computer readable storage medium, and when executed, may include processes of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings, or which are directly or indirectly applied to other related technical fields, are intended to be included within the scope of the present application.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; within the context of the present application, where technical features in the above embodiments or in different embodiments can also be combined, the steps can be implemented in any order and there are many other variations of the different aspects of the present application as described above, which are not provided in detail for the sake of brevity; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.

Claims (14)

1. A high-speed network opening method is applied to terminal equipment and is characterized by comprising 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 the average network speed and the 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 or not 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.
2. The method according to claim 1, wherein the searching for the usage data of the current application in the database 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 according to claim 2, wherein in the database, each usage data corresponds to a predetermined package name; then the process of the first step is carried out,
the searching, according to the first package name, for the usage data of the current application program in the database specifically includes:
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 to find the use data of the current application program in the database.
4. The method according to any one of claims 1 to 3, wherein the determining whether the current application program meets a high-speed network start condition according to the average network speed and the average flow of the preset duration specifically includes:
determining whether the average wire speed is greater than a wire speed threshold;
if the average network speed is greater than the network speed threshold value, determining that the current application program meets the high-speed network starting 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 opening condition.
5. The method according to any of claims 1 to 3, wherein after the step of opening the high speed network, the method further comprises:
when the foreground monitors that the current application program finishes running, determining the service life of the current application program;
if the service 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.
6. The method of claim 5, further comprising:
recording the opening time of the current application program when the foreground monitors the running of the application program; then the process of the first step is carried out,
the determining the use duration of the current application program specifically includes:
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 service life of the current application program.
7. The method according to claim 6, wherein the determining the current network speed of the current application program and the current traffic of a 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 finishes to run;
calculating the current network speed according to the first flow value, the second flow value and the service life;
and determining the flow within a preset time length from the starting time as the current flow of the preset time length.
8. The method of claim 7, wherein the average wire speed is calculated from wire speed data stored in a wire speed data list; then the process of the first step is carried out,
the 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 quantity of network speed data stored in the network speed data list;
if the first quantity is smaller than the first data capacity, 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;
if the first quantity is equal to the first data capacity, 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.
9. The method according to claim 8, wherein the average flow of the preset duration is calculated according to flow data stored in a flow data list; then the process of the first step is carried out,
updating the average flow of the preset duration of the current application program based on the current flow of the preset duration specifically comprises:
determining a second data capacity of the flow data list;
determining a second amount of traffic data stored in the list of traffic data;
if the second quantity is smaller than the second data capacity, 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;
if the second quantity is equal to the second data capacity, deleting the oldest flow data in the flow data list, adding the current flow of the preset duration to the flow data list, and recalculating the average flow of the preset duration of the current application program according to the flow data stored in the flow data list.
10. The method of claim 1, further comprising:
and when the current application program does not meet the high-speed network opening condition, closing the high-speed network to limit the high-speed network to establish connection.
11. The method of claim 1, further comprising:
and when the use data of the current application program cannot be searched, maintaining the current network.
12. A high-speed network opening device is applied to terminal equipment and is characterized by comprising:
the searching module is used for searching the use data of the current application program in the database when the foreground monitors that the application program runs, wherein the use data comprises the average network speed and the average flow of the preset duration;
the determining module is used for determining whether the current application program meets the high-speed network starting condition or not according to the average network speed and the average flow of the preset duration when the using data of the current application program is found;
and the starting module is used for starting the high-speed network to allow the high-speed network to establish connection when the current application program meets the high-speed network starting condition.
13. 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 a high speed network boot method as claimed in any one of claims 1 to 11.
14. A non-transitory computer-readable storage medium storing computer-executable instructions for causing a terminal device to perform the high speed network opening method according to any one of claims 1 to 11.
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 true CN114513830A (en) 2022-05-17
CN114513830B 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 (15)

* 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
US20200356149A1 (en) * 2019-05-08 2020-11-12 Samsung Electronics Co., Ltd. Electronic device and control method thereof

Patent Citations (15)

* 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
US20200356149A1 (en) * 2019-05-08 2020-11-12 Samsung Electronics Co., Ltd. Electronic device and control method thereof
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
CN114513830B (en) 2024-05-03

Similar Documents

Publication Publication Date Title
CN108874289B (en) Application history record viewing method and device and electronic equipment
US20200225995A1 (en) Application cleaning method, storage medium and electronic device
US20200219016A1 (en) Method for Cleaning Up Background Application, Storage Medium, and Electronic Device
CN106484848B (en) Application recommendation method and device
CN110474795A (en) Processing method and processing device, storage medium and the electronic equipment of server capacity
CN110069739B (en) Page preloading method and device
CN111666497A (en) Application program loading method and device, electronic equipment and readable storage medium
CN113805962B (en) Application page display method and device and electronic equipment
CN111047425A (en) Behavior prediction method and device
CN111722993A (en) Method and system for monitoring abnormal power consumption of communication terminal, terminal device and storage medium
CN107748697B (en) Application closing method and device, storage medium and electronic equipment
CN109597482B (en) Automatic page turning method and device for electronic book, medium and electronic equipment
WO2021218423A1 (en) Method and apparatus for charging management and control
CN114513830B (en) High-speed network starting method and device and terminal equipment
WO2020015114A1 (en) Method for querying operating state of application, and terminal device
CN107870809B (en) Application closing method and device, storage medium and electronic equipment
CN111194059A (en) Data connection method and device, electronic equipment and readable storage medium
CN111182526A (en) Data updating method, mobile terminal and computer storage medium
CN113448668B (en) Method and device for skipping popup window and electronic equipment
CN110490737B (en) Transaction channel control method and device and electronic equipment
CN114240132A (en) Business process arrangement execution method and device, computer equipment and storage medium
CN113535311A (en) Page display method and device and electronic equipment
CN113344666A (en) Method, device and system for generating menu
WO2014173129A1 (en) Mobile terminal flow identification method and apparatus
CN115291111B (en) Training method of battery rest time prediction model and rest time prediction method

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