CN115529260B - Application program management method, application program management system and terminal equipment - Google Patents

Application program management method, application program management system and terminal equipment Download PDF

Info

Publication number
CN115529260B
CN115529260B CN202210010740.8A CN202210010740A CN115529260B CN 115529260 B CN115529260 B CN 115529260B CN 202210010740 A CN202210010740 A CN 202210010740A CN 115529260 B CN115529260 B CN 115529260B
Authority
CN
China
Prior art keywords
target application
application program
network
preset
terminal device
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
CN202210010740.8A
Other languages
Chinese (zh)
Other versions
CN115529260A (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.)
Honor Device Co Ltd
Original Assignee
Honor Device 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 Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202210010740.8A priority Critical patent/CN115529260B/en
Publication of CN115529260A publication Critical patent/CN115529260A/en
Application granted granted Critical
Publication of CN115529260B publication Critical patent/CN115529260B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0876Network utilisation, e.g. volume of load or congestion level
    • H04L43/0894Packet rate
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/143Termination or inactivation of sessions, e.g. event-controlled end of session
    • H04L67/145Termination or inactivation of sessions, e.g. event-controlled end of session avoiding end of session, e.g. keep-alive, heartbeats, resumption message or wake-up for inactive or interrupted session
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/164Adaptation or special uses of UDP protocol

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Security & Cryptography (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Telephone Function (AREA)

Abstract

The application provides an application program management method, an application program management system and terminal equipment, and relates to the technical field of terminals. The method comprises the following steps: when the terminal equipment is determined to enter a screen-off state, acquiring network transmission data of a target application program; determining whether a user data packet protocol UDP data packet exists in the network transmission data; when the UDP data packets exist in the network transmission data, determining whether the average network data transmission rate of the target application program in a first preset time period is smaller than a preset network speed threshold value or not; and when the average network data transmission rate is determined to be smaller than the preset network speed threshold value, maintaining the network connection of the target application program. By using the scheme, after the terminal equipment enters the screen-off state, the real-time interactive application in the real-time interactive scene keeps a normal running state, and the problem that the target application program cannot provide a real-time interactive function for a user due to disconnection of network connection is avoided, so that user experience is improved.

Description

Application program management method, application program management system and terminal equipment
Technical Field
The present disclosure relates to the field of terminal technologies, and in particular, to an application management method, an application management system, and a terminal device.
Background
Currently, when a terminal device is off-screen, the system may terminate the process of the application program with high power consumption, so as to reduce the power consumption. When the application process is terminated, the network connection of the application is disconnected. When the application re-runs, the user needs to wait for the terminal to re-make the network connection.
Some applications need to be connected through a network to provide real-time interaction function for users when running, if the application is terminated during running, the network connection is disconnected, and before the application is reconnected to the network, the interaction function cannot be realized, so that user experience is reduced.
Therefore, the management mode of the application program after the screen of the terminal equipment is removed at present reduces the user experience.
Disclosure of Invention
In order to solve the above problems, the application program management method, the application program management system and the terminal device are provided for improving user experience.
In a first aspect, the present application provides an application management method, including: and when the terminal equipment is determined to enter the off-screen state, acquiring network transmission data of the target application program. And determining whether user data packet protocol (UDP) data packets exist in the network transmission data of the target application program, namely determining whether the target application program transmits the network data based on UDP. When the UDP data packets exist in the network transmission data of the target application program, determining whether the average network data transmission rate of the target application program in the first preset time period is smaller than a preset network speed threshold value. That is, when it is determined that the target application program performs transmission of network data based on UDP, it is determined whether the target application program has a smaller average network speed. And when the average network data transmission rate is determined to be smaller than the preset network speed threshold value, maintaining the network connection of the target application program. And maintaining the network connection of the target application program, namely maintaining the normal operation of the target application program.
By utilizing the scheme provided by the application, after the terminal equipment enters the screen-off state, whether the target application program is a real-time interactive application is determined by determining whether UDP data packets exist in network transmission data of the target application program; determining whether the target application program is in a real-time interaction scene when running by determining whether the average network data transmission rate of the target application program is smaller than a preset network speed threshold value; and when the target application program is determined to be the real-time interactive application and the running time is in the real-time interactive scene, the network connection of the target application program is maintained.
In summary, by using the scheme provided by the application, after the terminal device enters the screen-off state, the real-time interactive application in the real-time interactive scene keeps a normal running state, and the problem that the target application program cannot provide the real-time interactive function for the user due to the disconnection of the network is avoided, so that the user experience is improved.
In one possible implementation manner, when determining that the terminal device enters the off-screen state, the method further includes: acquiring the operation electric parameters of the terminal equipment in real time; and terminating the target application program when the operation electric parameter of the terminal equipment is determined to be larger than the first preset parameter threshold value. Terminating the target application, i.e., terminating the process of the target application.
When the operation electrical parameters of the terminal equipment are larger, the power consumption of the terminal equipment is larger, or the power consumption required by operating the target application program is larger, so that the user experience is reduced. When the power consumption of the terminal equipment is determined to be overlarge, the target application program is directly terminated, and user experience can be improved.
In one possible implementation, when it is determined that the UDP packet is not present in the network transmission data of the target application, the method further includes performing a first processing operation. The first processing operation includes at least one of: the method comprises the steps of prohibiting a target application program from connecting with a network, prohibiting the target application program from calling a sensor, prohibiting the target application program from calling an output device, or shutting down the processing function of the GPU of the graphics processor.
Wherein the output device comprises at least one of a display, a speaker, and a motor.
Since the call of the application program to the display screen is usually prohibited after the terminal device enters the off-screen state, the output device for prohibiting the call of the target application program in the first processing operation may also not include a display, that is, the output device includes a speaker or a motor.
The target application is a non-real-time interactive web application. The target application program runs without network connection or has low dependence on network connection. Thus, disabling the network connection of the target application does not have an excessive impact on the user experience. And by prohibiting partial function realization of the target application program, the power consumption of the terminal equipment is reduced.
In one possible implementation manner, determining whether a UDP packet exists in the network transmission data of the target application program specifically includes: and carrying out the first preset times of determining operation, and determining that UDP data packets exist in the network transmission data of the target application program when the result of the second preset times of determining operation in the first preset times of determining operation is that UDP data packets exist in the network transmission data of the target application program. The determining operation is to determine whether the UDP packet exists in the network transmission data of the target application, where the second preset number of times is less than or equal to the first preset number of times.
Performing the determination operation a plurality of times can improve the accuracy of the determination.
In one possible implementation manner, the determining operation of the first preset times specifically includes: and carrying out the determining operation of the first preset times according to the first preset time interval.
The determination is performed at regular time intervals to simplify the implementation.
In one possible implementation manner, determining whether a UDP packet exists in the network transmission data of the target application program specifically includes: determining whether UDP data packets exist in network transmission data of the target application program; when the UDP data packet does not exist in the network transmission data of the target application program, determining that the UDP data packet does not exist in the network transmission data of the target application program; when UDP data packets exist in the network transmission data of the target application program, determining operation of a first preset number of times is carried out, wherein the determining operation is to determine whether the UDP data packets exist in the network transmission data of the target application program; when the result of the first preset times of determining operation is that UDP data packets exist in the network transmission data of the target application program, determining that UDP data packets exist in the network transmission data of the target application program; the second preset times are smaller than or equal to the first preset times.
The accuracy of the determination can be improved by performing the determination operation for a plurality of times; the determining operation is performed once before the determining operation for multiple times, so as to avoid useless determining operation for multiple times when the UDP data packet does not exist in the network transmission data of the target application program.
In one possible implementation, the method further includes: when the result of the determination operation of the second preset number of times is that the UDP packet does not exist in the network transmission data of the target application program in the determination operation of the first preset number of times, a first processing operation is performed, where the first processing operation includes at least one of the following: the method comprises the steps of prohibiting a target application program from connecting with a network, prohibiting the target application program from calling a sensor, prohibiting the target application program from calling an output device, or shutting down the processing function of the GPU of the graphics processor.
The target application is a non-real-time interactive web application. And by prohibiting partial function realization of the target application program, the power consumption of the terminal equipment is reduced.
In one possible implementation, the method further includes: terminating the target application program when the average value of the running electric parameters of the terminal equipment in the first preset time period is determined to be larger than the second preset parameter threshold value; or when the current operation electric parameter of the terminal equipment is determined to be larger than a third preset parameter threshold value, terminating the target application program. Terminating the target application, i.e., terminating the process of the target application.
When the operation electrical parameters of the terminal equipment are larger, the power consumption of the terminal equipment is larger, and the power consumption of the terminal equipment can be reduced by terminating the target application program, so that the user experience is improved.
In one possible implementation manner, when determining that the average network data transmission rate of the target application program in the first preset time period is greater than or equal to the preset network speed threshold, the method further includes: performing a second processing operation, the second processing operation comprising at least one of: the method comprises the steps of prohibiting a target application program from connecting with a network, prohibiting the target application program from calling a sensor, prohibiting the target application program from calling an output device, or shutting down the processing function of the GPU of the graphics processor.
The target application program is a real-time interactive network application and is in a non-real-time interactive scene. Real-time interaction is not needed when the target application program runs, so that the network connection of the target application program is forbidden, and the user experience is not influenced excessively. And by prohibiting partial function realization of the target application program, the power consumption of the terminal equipment is reduced.
In one possible implementation, the method further includes: terminating the target application program when the average value of the running electric parameters of the terminal equipment in the first preset time period is determined to be larger than a fourth preset parameter threshold value; or when the current operation electric parameter of the terminal equipment is determined to be larger than the fifth preset parameter threshold value, terminating the target application program.
When the operation electrical parameters of the terminal equipment are larger, the power consumption of the terminal equipment is larger, and the power consumption of the terminal equipment can be reduced by terminating the target application program, so that the user experience is improved.
In one possible implementation manner, when determining that the average network data transmission rate of the target application program in the first preset time period is less than the preset network speed threshold, the method further includes: performing a third processing operation, the third processing operation comprising at least one of: disabling the target application from invoking the sensor, disabling the target application from invoking the output device, or shutting down the processing function of the graphics processor GPU.
The target application program is a real-time interactive network application and is in a real-time interactive scene. And by prohibiting partial function realization of the target application program, the power consumption of the terminal equipment is reduced. The target application program needs to interact in real time when running, so that the network connection of the target application program is not forbidden.
In one possible implementation, the method further includes: terminating the target application program when the average value of the running electric parameters of the terminal equipment in the first preset time period is determined to be larger than a sixth preset parameter threshold value; or when the current operation electric parameter of the terminal equipment is determined to be larger than the seventh preset parameter threshold value, terminating the target application program.
When the operation electrical parameters of the terminal equipment are larger, the power consumption of the terminal equipment is larger, and the power consumption of the terminal equipment can be reduced by terminating the target application program, so that the user experience is improved.
In one possible implementation, before maintaining the network connection of the target application, the method further includes: prohibiting the target application program from transmitting network data based on non-UDP; when it is determined that there is network transmission data of the target application program based on UDP, network connection of the target application program is maintained.
UDP refers to UDP and other extended protocols based on UDP. non-UDP refers to TCP and other extended protocols based on TCP.
And by prohibiting the target application program from carrying out network data transmission based on the non-UDP, the target application program is determined to be the real-time interactive network application again and is in a real-time interactive scene, so that the accuracy of the determination is improved.
In one possible implementation manner, determining that network transmission data of the target application program exists specifically includes: performing a third preset number of determining operations, wherein the determining operations are determining whether UDP data packets exist in network transmission data of the target application program; and when the result of the third preset times of determining operation is that UDP data packets exist in the network transmission data of the target application program, determining that the network transmission data of the target application program exists, wherein the fourth preset times are smaller than or equal to the third preset times.
Performing the determination operation a plurality of times can improve the accuracy of the determination.
In one possible implementation, after disabling the target application from transmitting network data based on the non-UDP, when it is determined that there is no network transmission data based on the UDP for the target application, the method further includes: terminating the target application.
And whether the target application program is the real-time interactive network application or not is determined to be unreliable, the target application program is terminated, and the power consumption of the terminal equipment is reduced.
In one possible implementation, after disabling the target application from transmitting network data based on the non-UDP, when it is determined that there is no network transmission data based on the UDP for the target application, the method further includes: maintaining a network connection of the target application; performing a fourth processing operation, the fourth processing operation comprising at least one of: disabling the target application from invoking the sensor, disabling the target application from invoking the output device, or shutting down the processing function of the graphics processor GPU.
Whether the target application program is the real-time interactive network application or not is determined to be unreliable, partial function realization of the target application program is forbidden, and power consumption of the terminal equipment is reduced.
Further, in one possible implementation, the method further includes: terminating the target application program when the average value of the running electric parameters of the terminal equipment in the first preset time period is determined to be larger than an eighth preset parameter threshold value; or when the current operation electric parameter of the terminal equipment is determined to be larger than the ninth preset parameter threshold value, terminating the target application program.
When the operation electrical parameters of the terminal equipment are larger, the power consumption of the terminal equipment is larger, and the power consumption of the terminal equipment can be reduced by terminating the target application program, so that the user experience is improved.
In one possible implementation, the operating electrical parameter includes at least one of: the temperature of the electrical components in the terminal device, the battery current of the terminal device, the power consumption of the target application program when running, or the current of the terminal device required when the target application program is running.
The temperature and the current can better represent the power consumption of the terminal equipment, and provide more accurate basis for reducing the power consumption of the terminal equipment.
In one possible implementation, when the operating electrical parameter comprises a temperature of an electrical component in the terminal device, the electrical component is a battery of the terminal device or a processor of the terminal device.
The temperature of the battery and the temperature of the processor can better represent the power consumption of the terminal equipment when the application program is operated, and a more accurate basis is provided for reducing the power consumption of the terminal equipment.
In a second aspect, the present application provides an application management system, the system comprising: the device comprises a data acquisition unit, a first determination unit, a second determination unit and a processing unit. The data acquisition unit is used for acquiring network transmission data of the target application program when the terminal equipment is determined to enter the off-screen state; the first determining unit is used for determining whether user data packet protocol (UDP) data packets exist in network transmission data of the target application program, namely determining whether the target application program transmits the network data based on UDP; the second determining unit is used for determining whether the average network data transmission rate of the target application program in the first preset time period is smaller than a preset network speed threshold value when determining that the UDP data packet exists in the network transmission data of the target application program. That is, when it is determined that the target application program performs transmission of network data based on UDP, it is determined whether the target application program has a smaller average network speed. The processing unit is used for maintaining network connection of the target application program when the average network data transmission rate of the target application program in the first preset time period is determined to be smaller than a preset network speed threshold value. And maintaining the network connection of the target application program, namely maintaining the normal operation of the target application program.
By using the application program management system provided by the application program management method, after the terminal equipment enters the screen-off state, whether the target application program is a real-time interactive application is determined by determining whether UDP data packets exist in network transmission data of the target application program; determining whether the target application program is in a real-time interaction scene when running by determining whether the average network data transmission rate of the target application program is smaller than a preset network speed threshold value; and when the target application program is determined to be the real-time interactive application and the running time is in the real-time interactive scene, the network connection of the target application program is maintained.
In summary, by using the system provided by the application, after the terminal device enters the screen-off state, the real-time interactive application in the real-time interactive scene keeps a normal running state, and the problem that the target application program cannot provide the real-time interactive function for the user due to the disconnection of the network is avoided, so that the user experience is improved.
In one possible implementation, the processing unit is further configured to: when the fact that the UDP data packet does not exist in the network transmission data is determined, a first processing operation is executed, wherein the first processing operation comprises at least one of the following steps: the method comprises the steps of prohibiting a target application program from connecting with a network, prohibiting the target application program from calling a sensor, prohibiting the target application program from calling an output device, or shutting down the processing function of the GPU of the graphics processor.
The output device includes at least one of a display, a speaker, and a motor.
Since the call of the application program to the display screen is usually prohibited after the terminal device enters the off-screen state, the output device for prohibiting the call of the target application program in the first processing operation may also not include a display, that is, the output device includes a speaker or a motor.
In a possible implementation manner, the first determining unit is further configured to determine whether a UDP packet exists in the network transmission data of the target application program; when the UDP data packet does not exist in the network transmission data of the target application program, determining that the UDP data packet does not exist in the network transmission data of the target application program; when UDP data packets exist in network transmission data of a target application program, determining a first preset number of times; and when the result of the determining operation with the second preset times in the determining operation with the first preset times is that the UDP data packet exists in the network transmission data of the target application program, determining that the UDP data packet exists in the network transmission data of the target application program. And determining whether UDP data packets exist in network transmission data of the target application program or not, wherein the second preset times are smaller than or equal to the first preset times.
In one possible implementation, the processing unit is further configured to perform a third processing operation when it is determined that the average network data transmission rate of the target application program in the first preset time period is less than the preset network speed threshold. The third processing operation includes at least one of: disabling the target application from invoking the sensor, disabling the target application from invoking the output device, or shutting down the processing function of the graphics processor GPU.
In a possible implementation manner, the processing unit is further configured to terminate the target application program when it is determined that the average value of the operating electrical parameter of the terminal device in the first preset time period is greater than the sixth preset parameter threshold; or when the current operation electric parameter of the terminal equipment is determined to be larger than the seventh preset parameter threshold value, terminating the target application program. Terminating the target application, i.e., terminating the process of the target application.
In a third aspect, the present application provides a terminal device, the terminal device comprising a processor and a display screen. The processor is used for acquiring network transmission data of the target application program when the display screen is determined to enter the screen-off state; determining whether UDP data packets exist in the network transmission data, namely determining whether the target application program transmits the network data based on UDP; when the UDP data packets exist in the network transmission data, determining whether the average network data transmission rate of the target application program in the first preset time period is smaller than a preset network speed threshold value. That is, when it is determined that the target application program performs transmission of network data based on UDP, it is determined whether the target application program has a smaller average network speed. And when the average network data transmission rate is determined to be smaller than the preset network speed threshold value, maintaining the network connection of the target application program. And maintaining the network connection of the target application program, namely maintaining the normal operation of the target application program.
By utilizing the scheme provided by the application, after the terminal equipment enters the screen-off state, whether the target application program is a real-time interactive application is determined by determining whether a user data packet protocol (UDP) data packet exists in network transmission data of the target application program; determining whether the target application program is in a real-time interaction scene when running by determining whether the average network data transmission rate of the target application program is smaller than a preset network speed threshold value; and when the target application program is determined to be the real-time interactive application and the running time is in the real-time interactive scene, the network connection of the target application program is maintained.
After the terminal equipment enters the screen-off state, the real-time interactive application in the real-time interactive scene keeps a normal running state, and the problem that the target application program cannot provide a real-time interactive function for a user due to disconnection of network connection is avoided, so that user experience is improved.
In one possible implementation, the terminal device further comprises a sensor, an output device and an image processor GPU. The processor is further configured to perform a first processing operation when it is determined that the UDP packet is not present in the network transmission data of the target application. The first processing operation includes at least one of: the method includes the steps of prohibiting the target application program from performing network connection, prohibiting the target application program from calling a sensor, prohibiting the target application program from calling an output device, or shutting down the processing function of the GPU.
The output device includes at least one of a display, a speaker, and a motor.
Since the call of the application program to the display screen is usually prohibited after the terminal device enters the off-screen state, the output device for prohibiting the call of the target application program in the first processing operation may also not include a display, that is, the output device includes a speaker or a motor.
In one possible implementation, the terminal device further comprises a sensor, an output device and an image processor GPU. The processor is further configured to perform a third processing operation when it is determined that the average network data transmission rate is less than the preset network rate threshold, the third processing operation including at least one of: disabling the target application from invoking the sensor, disabling the target application from invoking the output device, or shutting down the processing functions of the GPU.
In one possible implementation, the processor is further configured to terminate the target application when it is determined that the average value of the operating electrical parameter of the terminal device over the first preset time period is greater than the sixth preset parameter threshold; or when the current operation electric parameter of the terminal equipment is determined to be larger than the seventh preset parameter threshold value, terminating the target application program.
In one possible implementation, the operating electrical parameter includes at least one of: the temperature of the electrical components in the terminal device, the battery current of the terminal device, the power consumption of the target application program when running, or the current of the terminal device required when the target application program is running.
In one possible implementation, the temperature of the electrical element in the terminal device is the temperature of the battery, and the terminal device further includes a battery management module, where the battery management module is configured to obtain the temperature of the battery.
In one possible implementation, the temperature of the electrical element in the terminal device is the temperature of the processor, the terminal device further comprising a temperature sensor, wherein: the temperature sensor is used for acquiring the temperature of the processor.
In a fourth aspect, the present application provides a terminal device comprising a processor and a memory, wherein the memory stores code, and the processor is configured to invoke the code stored in the memory to perform a method as in any of the above.
After the terminal equipment enters a screen-off state, determining whether the target application program is a real-time interactive application or not by determining whether user data packet protocol (UDP) data packets exist in network transmission data of the target application program; determining whether the target application program is in a real-time interaction scene when running by determining whether the average network data transmission rate of the target application program is smaller than a preset network speed threshold value; and when the target application program is determined to be the real-time interactive application and the running time is in the real-time interactive scene, the network connection of the target application program is maintained. Therefore, after the terminal equipment enters the screen-off state, the real-time interactive application in the real-time interactive scene keeps a normal running state, and the problem that the target application program cannot provide a real-time interactive function for a user due to disconnection of network connection is avoided, so that user experience is improved.
Drawings
Fig. 1 is a schematic diagram of a framework of a terminal device provided in an embodiment of the present application;
fig. 2 is a software architecture block diagram of a terminal device according to an embodiment of the present application;
FIG. 3 is a flowchart of an application management method according to an embodiment of the present application;
FIG. 4 is a flowchart of an application management method according to another embodiment of the present application;
FIG. 5 is a flowchart of an application management method according to another embodiment of the present application;
fig. 6 is a schematic structural diagram of an application management system according to an embodiment of the present application.
Detailed Description
In order to facilitate a clearer understanding of the technical solutions provided in the present application by those skilled in the art, the following description will first be given with terms in the embodiments of the present application.
Open systems interconnection (Open System Interconnection, OSI): the work of network communication is divided into 7 layers, namely a physical layer, a data link layer, a network layer, a transmission layer, a session layer, a presentation layer and an application layer.
User datagram protocol (User Datagram Protocol, UDP): is a connectionless transport layer protocol in the OSI model. UDP provides a method for applications to send encapsulated packets without having to establish a connection. UDP is a non-connection oriented protocol, and connection such as three-way handshake is not required to be established, so that the UDP has the characteristics of small transmission delay and high data transmission efficiency in the data transmission process.
In order to facilitate understanding of the technical solution provided by the embodiments of the present application, the following describes application scenarios common to the embodiments of the present application.
With the development of terminal technology, more and more application programs can be installed on terminal equipment. In order to improve interactivity of users when using application programs, more and more application programs capable of implementing interactive functions are available, and in particular, application programs capable of implementing real-time interactive functions through network connection may also be referred to as real-time interactive network applications.
Because UDP has the characteristic of small transmission delay, when the real-time interaction network application is in real-time interaction, network data transmission is usually carried out based on UDP.
When the terminal device runs the real-time interactive network application, the terminal device may trigger a screen-off operation.
Currently, when a terminal device enters an off-screen state, a system may terminate a process of a high-power-consumption application program, so as to reduce power consumption. When the real-time interactive network application runs, the power consumption of the application program is larger due to the larger data quantity to be processed and the like. When the real-time interactive network application is running, the terminal equipment enters an off-screen state, so that the process of the real-time interactive network application can be terminated.
At this time, the network connection of the real-time interactive network application is disconnected, and the real-time interactive function cannot be provided for the user before the application program reconnects to the network. For example, when the real-time interactive network application is a multi-player real-time fight game application, when the multi-player real-time fight game application is running, the network connection is disconnected, and when the application program is reconnected to the network, the user needs to wait, so that the multi-player fight game cannot be continuously performed, and the user experience is reduced. Therefore, the current management mode of the real-time interactive network application after the terminal equipment enters the screen-off state reduces the user experience.
The words "first," "second," "third," and the like in this description are used for descriptive purposes only and are not to be interpreted as indicating or implying a relative importance or number of technical features indicated.
In the present application, unless explicitly specified and limited otherwise, the term "coupled" is to be construed broadly, and for example, "coupled" may be either fixedly coupled, detachably coupled, or integrally formed; may be directly connected or indirectly connected through an intermediate medium.
The type of the terminal device is not particularly limited, and the terminal device may be a mobile phone, a notebook computer, a wearable electronic device (e.g., a smart watch), a tablet computer, an augmented reality (augmented reality, AR) device, a Virtual Reality (VR) device, or the like.
The architecture of the terminal device is explained below.
Referring to fig. 1, fig. 1 is a schematic diagram of a framework of a terminal device according to an embodiment of the present application.
As shown in fig. 1, the terminal device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display 194, a subscriber identity module (subscriber identification module, SIM) card interface 195, and the like.
The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the terminal device 100. In other embodiments of the present application, the terminal device may include more or less components than illustrated, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The processor 110 is configured to implement the application management method of any of the embodiments of the present application.
The display screen 194 is used to display images, videos, and the like. The display 194 includes a display panel. The display panel may employ a liquid crystal display (liquid crystal display, LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED) or an active-matrix organic light-emitting diode (matrix organic light emitting diode), a flexible light-emitting diode (flex), a mini, a Micro led, a Micro-OLED, a quantum dot light-emitting diode (quantum dot light emitting diodes, QLED), or the like.
In some embodiments, the terminal device may include 1 or N display screens 194, N being a positive integer greater than 1.
The terminal device may receive key inputs, generating key signal inputs related to user settings of the terminal device and function control. In some embodiments, when the terminal device receives a user press of a power-on key (mechanical key), the processor 110 determines that the terminal device enters an off-screen state.
The keys 190 include a power-on key, a volume key, etc. The keys 190 may be mechanical keys. Or may be a touch key. The terminal device may receive key inputs, generating key signal inputs related to user settings of the terminal device and function control. In some embodiments of the present application, the display 194 may be in an off-screen, on-screen, or off-screen state.
The terminal device enters an off-screen state, i.e., the display 194 enters an off-screen state.
In some embodiments of the present application, when the display 194 is in the on-screen state, the terminal device may be brought into the off-screen state by pressing a physical power-on key of the terminal device.
The power management module 141 is used for connecting the battery 142, and the charge management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140 to power the processor 110, the internal memory 121, the display 194, the wireless communication module 160, and the like. The power management module 141 may also be configured to monitor parameters such as battery temperature, battery capacity, battery cycle number, battery health (leakage, impedance), etc.
In some embodiments of the present application, the power management module 141 is configured to monitor the temperature of the battery 142 and send the detection result to the processor 110. The processor 110 terminates all or part of the application to reduce power consumption of the terminal device when it is determined from the detection result that the temperature of the battery 142 exceeds the threshold.
The wireless communication function of the terminal device may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the terminal device may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas.
The mobile communication module 150 may provide a solution for wireless communication including 2G/3G/4G/5G or the like applied on a terminal device.
The wireless communication module 160 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wi-Fi network), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field wireless communication technology (near field communication, NFC), infrared technology (IR), etc. applied on the terminal device.
In some embodiments, the antenna 1 of the terminal device is coupled to the mobile communication module 150 and the antenna 2 is coupled to the wireless communication module 160 so that the terminal device can communicate with the network and other devices through wireless communication technology.
The terminal device implements display functions through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
In some embodiments of the present application, the processor 110 disables the processing functions of the GPU to reduce the power consumption of the terminal. For example, when the target application is a non-real-time interactive network application, the processor 110 disables the processing functions of the GPU. The terminal device may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playing, recording, etc.
In some embodiments of the present application, the processor 110 disables the application from invoking the speaker 170A to reduce the power consumption of the terminal.
The sensor module 180 is a variety of sensors, and embodiments of the present application relate generally to a gyro sensor 180B, an acceleration sensor E, a temperature sensor 180J, and the like.
The gyro sensor 180B may be used to determine a motion gesture of the terminal device. In some embodiments, the angular velocity of the terminal device about three axes (i.e., x, y, and z axes) may be determined by the gyro sensor 180B. The gyro sensor 180B may also be used for navigating, somatosensory game scenes.
The acceleration sensor 180E may detect the magnitude of acceleration of the terminal device in various directions (typically three axes). The magnitude and direction of gravity can be detected when the terminal device is stationary. The electronic equipment gesture recognition method can also be used for recognizing the gesture of the electronic equipment, and is applied to horizontal and vertical screen switching, pedometers and other applications.
In some embodiments of the present application, the processor 110 disables the application from invoking the sensor to reduce the power consumption of the terminal.
The temperature sensor 180J is for detecting temperature.
In some embodiments of the present application, the temperature sensor 180J is configured to monitor the temperature of the electrical components of the terminal device and send the detection result to the processor 110. The processor 110 terminates all or part of the application to reduce power consumption of the terminal device when it is determined from the detection result that the temperature of the electrical component exceeds the threshold.
The terminal device may include one or more temperature sensors for monitoring the temperature of one or more electrical components.
The software system of the terminal device can adopt a layered architecture, an event driven architecture, a microkernel architecture, a microservice architecture or a cloud architecture. In the embodiment of the invention, an Android system with a layered architecture is taken as an example, and the software structure of terminal equipment is illustrated.
Referring to fig. 2, fig. 2 is a software architecture block diagram of a terminal device according to an embodiment of the present application.
The layered architecture divides the software into several layers, each with distinct roles and branches. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, from top to bottom, an application layer, an application framework layer, an Zhuoyun row (Android run) and system libraries, and a kernel layer, respectively.
The application layer may include a series of application packages.
Android application package (Android application package, APK): an application package file format used by the Android operating system is used for distributing and installing mobile applications and middleware. Code of an Android application program is required to run on an Android device, and is compiled first and then packaged into a file which can be identified by an Android system, and the file format which can be identified and run by the Android system is APK. As shown in fig. 2, the application package may include applications for cameras, gallery, calendar, phone calls, maps, navigation, WLAN, bluetooth, music, video, short messages, etc.
The application packages may also include real-time interactive web applications, various game-like applications, and the like.
Applications may be classified based on different classification bases.
For example, based on the network transmission characteristics of the application programs, the application programs can be classified into real-time interactive network applications, non-real-time interactive network applications, and the like. The real-time interactive network application refers to an application capable of providing a real-time interactive function to a user through a network connection;
based on the type of functionality that the application provides to the user, the application may be categorized into gaming applications, navigation applications, and the like.
The application framework layer provides an application programming interface (application programming interface, API) and programming framework for application programs of the application layer. The application framework layer includes a number of predefined functions.
In some embodiments of the present application, through an API provided by an application framework layer for an application of the application layer, a broadcast of a terminal device entering an off-screen state is monitored, and when a broadcast of the terminal device entering the off-screen state is received, the terminal device entering the off-screen state is determined. In some embodiments of the present application, the protocol type of the network transmission data is obtained through an API provided by the application framework layer for an application program of the application layer, so as to determine whether a UDP packet exists in the network transmission data of the target application program.
As shown in FIG. 2, the application framework layer may include a window manager, a content provider, a view system, a telephony manager, a resource manager, a notification manager, and the like.
Android run time includes a core library and virtual machines. Android run time is responsible for scheduling and management of the Android system.
The system library may include a plurality of functional modules. For example: surface manager (surface manager), media Libraries (Media Libraries), three-dimensional graphics processing Libraries (e.g., openGL ES), 2D graphics engines (e.g., SGL), etc.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver and a sensor driver.
The application provides an application program management method, and the application program management method is specifically described below with reference to the accompanying drawings.
Referring to fig. 3, fig. 3 is a flowchart of an application management method according to an embodiment of the present application.
As shown in fig. 3, the application management method in the present embodiment includes S101 to S104.
S101, when the terminal equipment is determined to enter an off-screen state, acquiring network transmission data of a target application program.
The terminal device entering the off-screen state refers to that the display screen of the terminal device enters the off-screen state from the on-screen state.
The network transmission data of the target application refers to data transmitted by the target application through a network and other devices or servers, etc.
S102, determining whether a user data packet protocol UDP data packet exists in the network transmission data.
Because the network data transmission based on the UDP has the characteristic of low time delay, when an application program has higher requirement on the real-time property of the network data transmission, the UDP is generally adopted as a network transmission protocol for the network data transmission.
Therefore, by determining whether the UDP packet exists in the network transmission data of the target application, it can be determined whether the target application has a high real-time requirement for network data transmission, that is, whether the target application is a real-time interactive network application. The real-time interactive network application is an application program that provides a real-time interactive function for a user through a network connection.
When the UDP data packet exists in the network transmission data of the target application program, the target application program is indicated to require the network data transmission to have higher real-time performance; when the fact that the UDP data packet does not exist in the network transmission data of the target application program is determined, the fact that the target application program has no high requirement on the real-time performance of the network data is indicated.
And S103, when determining that UDP data packets exist in the network transmission data, determining whether the average network data transmission rate of the target application program in the first preset time period is smaller than a preset network speed threshold value.
And determining that UDP data packets exist in the network transmission data, namely the target application program is a real-time interactive network application.
Currently, in order to increase the functions of an application program to improve the user experience, the application program may be in different scenes when running. For real-time interactive network application, when data transmission is performed, real-time interaction may be performed, that is, in a real-time interaction scene, or in a non-real-time interaction scene.
And distinguishing the scene of the target application program according to the average network data transmission rate of the target application program in the first preset time period, and determining whether the real-time interaction network application is in the real-time interaction scene.
For example, for real-time interactive network applications, it may be in a scene such as video playback. Because the data volume transmitted during video playing is larger, the average network data transmission rate is larger at the moment, namely, when the average network data transmission rate is larger than or equal to a preset network speed threshold value, the target application program is a real-time interactive network application in a video playing scene;
For the real-time interactive network application, the real-time interactive network application in a real-time interactive scene, for example, in a real-time fight game scene, where the requirement of the target application program for real-time interaction is higher, the network speed corresponding to the target application program is usually smaller, that is, when the average network speed is smaller than the preset network speed threshold, the target application program is the real-time interactive network application in the real-time interactive scene.
The preset network speed threshold is not particularly limited in the embodiment of the present application, and may be set by a person skilled in the art according to actual situations.
And S104, when the average network data transmission rate is determined to be smaller than a preset network speed threshold, maintaining the network connection of the target application program.
When the average network data transmission rate of the target application program in the first preset time period is smaller, the target application program is a real-time interactive network application in a real-time interactive scene, and at the moment, the network connection of the target application program is maintained, so that the target application program is kept in a normal running state.
By utilizing the scheme of the embodiment, after the terminal equipment enters the screen-off state, whether the target application program is a real-time interactive application is determined by determining whether a user data packet protocol (UDP) data packet exists in network transmission data of the target application program; determining whether the target application program is in a real-time interaction scene when running by determining whether the average network data transmission rate of the target application program is smaller than a preset network speed threshold value; and when the target application program is determined to be the real-time interactive application and the running time is in the real-time interactive scene, the network connection of the target application program is maintained. By using the scheme of the embodiment, after the terminal equipment enters the screen-off state, the real-time interactive application in the real-time interactive scene keeps a normal running state, and the problem that the target application program cannot provide a real-time interactive function for a user due to disconnection of network connection is avoided, so that user experience is improved.
The following description is made in connection with specific implementations.
Another application management method is provided, and is specifically described below with reference to the accompanying drawings.
Referring to fig. 4, fig. 4 is a flowchart of an application management method according to another embodiment of the present application.
As shown in fig. 4, the application management method in the present embodiment includes S201 to S215.
And S201, when the terminal equipment is determined to enter an off-screen state, acquiring network transmission data of the target application program.
In one possible implementation manner, when the display screen of the terminal device is in a bright screen state, the terminal device can be put into a screen-off state by pressing a physical start key of the terminal device.
In one possible implementation manner, when the display screen of the terminal device is in a bright screen state, and when the screen of the terminal device does not receive touch operation within a preset time, the terminal device is determined to enter a screen-off state.
For example, when the display screen of the terminal device is in a bright screen state, the user does not perform touch operation on the screen within a preset time period, and it is determined that the terminal device enters a screen-off state.
Further, in a possible case, when the screen of the terminal device does not receive the touch operation within a period of time, determining that the terminal device enters a screen locking state; and after another period of time, determining that the terminal equipment enters a screen-off state when the screen of the terminal equipment still does not receive touch operation.
For example, after the terminal device enters the screen locking state, the user does not perform touch operation on the screen for another period of time, and it is determined that the terminal device enters the screen locking state.
S202, acquiring operation electric parameters of the terminal equipment.
Specifically, when the terminal equipment is determined to enter the off-screen state, the operation electric parameters of the terminal equipment are acquired.
In one possible implementation, the operating electrical parameters of the terminal device are acquired in real time. That is, after determining that the terminal device enters the off-screen state, the operation electrical parameters of the terminal device are continuously obtained.
It will be appreciated that the acquisition process is delayed due to the data acquisition process and the like, and also belongs to the implementation manner of the real-time acquisition.
In one possible implementation, the operating electrical parameter of the terminal device may include, but is not limited to, at least one of the following: the temperature of the electrical components in the terminal device, the battery current of the terminal device when the target application is running, the power consumption when the target application is running, or the current of the terminal device required when the target application is running.
In one possible case, the above-mentioned operating electrical parameter of the terminal device is the temperature of the electrical components in the terminal device.
The temperature of the electrical component is used to characterize the power consumption of the electrical component and thus of the terminal device.
Further, in a possible implementation, the electrical element may be a battery of the terminal device or a processor of the terminal device. That is, the temperature of the above-mentioned electrical component may be the temperature of the battery of the terminal device, or the temperature of the processor of the terminal device.
The temperature of the battery of the terminal device can characterize the power consumption of the terminal device. In general, the higher the power consumption of the terminal device, the higher the battery temperature of the terminal device.
When the battery temperature of the terminal device is too high due to excessive power consumption, it may result in: the performance of the battery decreases, for example, the capacity of the battery decreases; the temperature of the whole terminal equipment is increased; the cell is activated at high temperature, producing a gas with a higher risk of swelling. The above-mentioned several situations may reduce the user experience.
The power consumption of the terminal device is characterized by the battery temperature. Under the condition that the battery temperature is too high, the power consumption of the terminal equipment is high, and at the moment, the power consumption of the terminal equipment needs to be reduced so as to improve the user experience.
The processor of the terminal device is used for performing main works such as data processing when the terminal device realizes functions, so that the temperature of the terminal device can characterize part of power consumption of the terminal device, thereby characterizing the power consumption of the terminal device.
It will be appreciated that the electrical components described above may also be other electrical components of the terminal device.
In some possible cases, the operating electrical parameter of the terminal device is the current of the battery of the terminal device.
The current of the battery of the terminal device can characterize the power consumption of the terminal device. In some possible cases, the operation electrical parameter of the terminal device is power consumption of the target application program when the target application program is running or current of the terminal device required by the target application program when the target application program is running.
The target application program is an operating application program, and can be an application program operated in the foreground or an application program operated in the background.
A foreground running application, typically referred to as a running application visible on a desktop taskbar of a terminal device, typically operated by a user;
background running applications generally refer to programs that are not visible to the user but are still running.
When the terminal device runs the target application, a part of power consumption of the terminal device is used for running the target application.
The power consumption of the target application program during operation, namely the power consumption of the terminal equipment required by the target application program during operation.
The current of the terminal device required by the running of the target application can characterize the power consumption of the terminal device required by the running of the target application.
The power consumption of the target application is typically made up of multiple parts. For example, the power consumption of the target application includes: the processor is used for running the power consumption of the target application program, the power consumption of the sensor called by the target application program when running, the power consumption of the output device called by the target application program when running, and the like.
In some possible cases, the power consumption of the target application program can be obtained by determining the power consumption of each part and then superposing the power consumption of each part.
In some possible cases, the current of the terminal device required by the target application program when running may be used as a measure of the power consumption of the target application program.
In some possible cases, the current of the terminal device required by the target application program when running is a superposition of the following currents: the processor of the terminal device is used for running the working current of the target application program, the working current of the sensor called when the target application program runs and the working current of the output device called when the target application program runs.
Specifically, according to the obtained working current of the processor, the working frequency of the processor and the processor occupancy rate of the target application program, the working current of the processor for running the target application program is obtained; acquiring the working current of a sensor called when a target application program runs; acquiring the working current of the output equipment called when the target application program runs; and overlapping the currents to obtain the currents of the terminal equipment required by the running of the target application program. It will be appreciated that the power consumption of the target application may include other power consumption in addition to that mentioned in the above description. When the power consumption of the target application may also include other power consumption, the power consumption of the target application may be obtained according to an implementation similar to that described in the foregoing description, which is not described herein.
In one possible implementation manner, the current of the terminal device required by the running of the target application program is determined according to the identification of the target application program.
And determining a part required by the running of the target application program in the current of the terminal equipment according to the identification of the target application program.
The identification of the application is used to identify the application and has uniqueness, i.e., the correspondence between the identification of the application and the application is unique.
In one possible implementation, the identification of the application may include: the packet name of the application, the PID of the application, and one of the UID of the application.
The Package Name (Package Name) is the Name of the Android Application Package (APK), and can uniquely identify an application.
PID (Process Identifier) is the identity of the process.
When an application is started, the process of the application will be assigned a PID for uniquely identifying the process.
During the running of the application, the PID of the process of the application remains unchanged; when the process is terminated, the PID of the process is recovered by the system; when the application is restarted, the application's process is reassigned a new PID.
When an application corresponds to a plurality of processes, each process is assigned a PID.
Since the application and the process of the application are corresponding, the PID can uniquely identify the application.
UID (User Identifier) is the identity of the user.
In Linux, UID is an ID of a user, which is used to indicate which user runs a current application program, and is mainly used to manage rights of the user.
In Android single-user systems, each application is typically assigned a different UID, i.e., the UID is able to uniquely identify the application.
In summary, in Android, the packet name, PID, and UID can all uniquely identify the application.
In one possible implementation, the identification of the application is obtained at the start-up run time of the application.
In this embodiment, the order of acquiring the running electrical parameters of the terminal device is not limited to the above-mentioned network transmission data of the target application program.
S203, determining whether UDP data packets exist in the network transmission data of the target application program.
If yes, executing S204-S205; otherwise, S206 is performed.
Because the network data transmission based on the UDP has the characteristic of low time delay, when an application program has higher requirement on the real-time property of the network data transmission, the UDP is generally adopted as a network transmission protocol to carry out the network data transmission.
Therefore, by determining whether the network transmission data of the target application program has the UDP data packet, whether the target application program performs network data transmission based on the UPD can be determined, and whether the target application program has higher real-time requirements on the network data transmission.
When the UDP data packet exists in the network transmission data of the target application program, the target application program is indicated to require the network data transmission to have higher real-time performance; when the fact that the UDP data packet does not exist in the network transmission data of the target application program is determined, the fact that the target application program has no high requirement on the real-time performance of the network data is indicated.
In one possible case, after the terminal screen is determined to enter the off-screen state and a preset off-screen period of time passes, whether a UDP data packet exists in the network transmission data of the target application program is determined.
In one possible implementation, the call interface detects whether a Socket (Socket) connection of the target application program is UDP, so as to determine whether a UDP packet exists in network transmission data of the target application program.
When Socket connection of the target application program is UDP, determining that UDP data packets exist in network transmission data of the target application program; when the Socket connection of the target application program is not UDP, determining that the UDP data packet does not exist in the network transmission data of the target application program.
S204, carrying out the first preset times of determining operation, obtaining the result of the first preset times of determining operation, wherein the determining operation is to determine whether UDP data packets exist in the network transmission data.
Performing a first preset number of determining operations, which means performing a plurality of determining operations to determine whether the target application program stably performs network data transmission based on UDP; the number of times the determining operation is performed is specifically a first preset number of times.
It should be understood that the first preset number of times may be 1, but in order to determine whether the target application program stably performs network data transmission based on UDP, the first preset number of times is generally greater than 1, and thus, in this embodiment, the first preset number of times is all described as being greater than 1.
In one possible implementation, the determining operation is performed for a first preset number of times within a first preset time period.
Further, in one possible implementation manner, the determining operation of the first preset times is performed according to the first preset time interval in the first preset time period.
That is, the determination operation for the first preset number of times is performed within the first preset time period, and the time interval between each determination operation is the first preset time interval.
S205, determining whether the result of the second preset times of determining operation exists in the result of the first preset times of determining operation is that UDP data packets exist in the network transmission data.
If yes, S207 is executed, otherwise S206 is executed.
The second preset times are smaller than or equal to the first preset times.
That is, the first preset number of times of determining operations are performed in total, and the result of determining whether the second preset number of times of determining operations is that the UDP packet exists in the network transmission data.
And when the result of the second preset times of determining operation is that the UDP data packet exists in the network transmission data, determining that the UDP data packet exists in the network transmission data.
The second preset times are equal to the first preset times, namely, a plurality of determining operations are carried out, and the UDP data packets exist in the network transmission data only after all the determining operations result in that the UDP data packets exist in the network transmission data;
The second preset times are smaller than the first preset times, namely, a plurality of determining operations are carried out, the result of a part of determining operations is that the UDP data packet exists in the network transmission data, and the UDP data packet exists in the network transmission data is determined.
The first preset times and the second preset times can be set according to actual requirements.
Because the UDP is used for transmitting the network data, the time delay is small, when the UDP data packet exists in the network transmission data of the target application program, the target application is possibly a real-time network interaction application.
For real-time network interaction applications, it is often desirable to have a relatively stable network data transfer over a period of time.
Therefore, when the second preset times or the first preset times are all determined to have the UDP data packet in the network transmission data of the target application program for the first preset times, the target application program is indicated to perform the network data transmission with UDP more stably in a period of time.
And executing the multiple determining operations and obtaining the result of whether the UDP data packet exists in the network transmission data according to the multiple determining results, so that the accuracy of the determining can be improved.
In addition to the implementation manner provided above, that is, first, it is determined whether a UDP packet exists in the network transmission data of the target application program, if so, the determination operation may be performed multiple times, and if so, the determination operation may be performed multiple times directly.
In one possible implementation manner, a first preset number of determining operations are performed, where the determining operations are performed to determine whether the UDP packet exists in the network transmission data;
and when the result of the determining operation with the second preset times in the determining operation with the first preset times is that the UDP data packet exists in the network transmission data, determining that the UDP data packet exists in the network transmission data, wherein the second preset times are smaller than or equal to the first preset times.
Further, in one possible implementation manner, the determining operation of the first preset times is performed according to the first preset time interval in the first preset time period.
The detailed description of this implementation is similar to the above implementation in this embodiment, and will not be repeated here.
S206, executing a first processing operation.
When the network transmission data of the target application program does not have the UDP data packet, or the network transmission data of the target application program has the UDP data packet but the data transmission is unstable, the target application program is not a real-time interactive network application, that is, the target application program does not need to be connected with a network when running, or the dependence of the target application program on the network connection is low when running.
For example, the target application is a non-real-time interactive class of application, such as a stand-alone gaming application or the like. After the terminal equipment enters the off-screen state, the power consumption of the terminal equipment can be reduced by prohibiting partial function implementation of the target application program.
In one possible implementation manner, the first processing operation may specifically include at least one of the following:
the method comprises the steps of prohibiting a target application from network connection, canceling a target application registration sensor, prohibiting the target application from calling the output device, and closing the processing function of the GPU of the image processor.
The target application program is forbidden to carry out network connection, so that the power consumption generated by the network data transmission of the target application program can be reduced; according to the above description, the target application is not a real-time interactive network application in a real-time interactive state, so that the target application is prohibited from performing network connection, and the user experience is not reduced.
The application may need to register the sensor during running to monitor the activity of the sensor, i.e. the application registers the sensor for data monitoring, and invokes the sensor for data collection, etc. When the terminal device enters the off-screen state, the user may not call the sensor through the target application program to realize the corresponding function. Therefore, the target application registration sensor is canceled and the target application call sensor is disabled to reduce power consumption due to the target application call sensor.
The output device may include, in particular, a display screen, a speaker, and a motor.
Since the invocation of the display by the application will normally be disabled after the terminal device has entered the off-screen state, the output device in some possible cases comprises in particular a speaker and a motor.
In some possible cases, the output device may also include other output devices of the terminal device that the application may invoke at runtime.
The application may need to invoke an output device at run time, for example, to output sound through a speaker. When the terminal device enters the off-screen state, the user may not call the output device to realize the corresponding function through the target application program. Thus, the target application is prohibited from invoking the output device to reduce power consumption due to the target application invoking the sensor without degrading the user experience.
After the terminal device enters the off-screen state, the user typically has no need to see the screen of the application running through the screen. Thus, after the terminal device enters the off-screen state, the processing function of the image processor GPU (for the target application) is turned off.
In one possible implementation manner, the first processing operation may further include:
And determining whether the average value of the running electrical parameters of the terminal equipment in the first preset time period is larger than a second preset parameter threshold value, and if so, terminating the target application program.
When the average value of the running electric parameters of the terminal equipment in the first preset time period is larger than the second preset parameter threshold value, the power consumption of the terminal equipment in the first preset time period is larger, or the power consumption of the terminal equipment required by running the target application program in the first preset time period is larger. Therefore, the target application program is terminated to reduce the power consumption of the terminal equipment, so that the user experience is improved; when the average value of the operation electric parameters of the terminal equipment in the first preset time period is smaller than or equal to the second preset parameter threshold value, the power consumption of the terminal equipment in the first preset time period is smaller, or the power consumption of the terminal equipment required by the operation of the target application program in the first preset time period is smaller.
Terminating the target application refers to terminating the process of the target application.
Compared with the process of terminating the target application program, the process of restarting the target application program again, the running intermediate state of the program can be maintained after the process of suspending the target application program, and the loading speed is higher.
Further, in one possible implementation, when it is determined that the terminal device enters the bright screen state, a process of the target application program is activated, and the process is continuously executed.
In one possible implementation manner, after the terminal device enters the off-screen state, when it is determined that a physical start key of the terminal device is pressed, it is determined that the terminal device enters the on-screen state.
In addition to determining the processing operation performed on the target application according to the power consumption of the terminal device in the first preset time period or the power consumption of the terminal device required to run the target application in the first preset time period, the processing operation performed on the target application may also be determined according to the current power consumption of the terminal device or the power consumption of the terminal device required to run the target application.
In one possible implementation manner, the first processing operation may further include:
and determining whether the current operation electric parameter of the terminal equipment is larger than a third preset parameter threshold value, and if so, terminating the target application program.
When the current operation electric parameter of the terminal equipment is larger than a third preset parameter threshold value, the current power consumption of the terminal equipment is larger, or the power consumption of the terminal equipment required by the current operation of the target application program is larger. Therefore, the target application program is terminated to reduce the power consumption of the terminal equipment, so that the user experience is improved;
When the current operation electric parameter of the terminal equipment is smaller than or equal to the third preset parameter threshold value, the current power consumption of the terminal equipment is smaller, or the power consumption of the terminal equipment required by the current operation of the target application program is smaller.
When the current operating electrical parameter of the terminal device is less than or equal to the third preset parameter threshold, the process of the target application program can be suspended, see in particular the description above.
In some possible cases, the first processing operation specifically includes:
prohibiting the target application program from performing network connection; canceling a target application registration sensor, prohibiting the target application from calling a positioning sensor, prohibiting the target application from outputting sound through a loudspeaker, and closing the drawing of the image processor GPU to the target application;
determining whether an average value of the current of the terminal equipment in a first preset time period required by the operation of the target application program is larger than a first preset current threshold value or whether the battery temperature of the current terminal equipment is larger than a preset first temperature threshold value, and if so, terminating the process of the target application program; otherwise, the process of the target application is suspended.
The battery temperature of the current terminal device refers to the current data of the battery temperature of the terminal device.
The terminal equipment and the battery temperature of the terminal equipment required by the operation of the target application program are all operation electric parameters of the terminal equipment.
The average value of the current of the terminal equipment required by the running of the target application program can represent the power consumption of the terminal equipment required by the running of the target application program; the current battery temperature of the terminal device can characterize the current power consumption of the terminal.
In some possible cases, the threshold value of the operation electrical parameter of the target application program may be determined according to the number of users corresponding to the application program, or the like, that is, the second operation parameter threshold value, the third operation parameter threshold value, the preset first temperature threshold value, and the preset first current threshold value.
S207, determining the average transmission rate of the network transmission data of the target application program in the first preset time period.
When the UDP data packet exists in the network transmission data of the target application program and the network data transmission is stable, the target application program is a UDP-based real-time interactive network application, namely an application program realizing a real-time interactive function through a network, and the network transmission protocol specifically comprises UDP.
Currently, in order to increase the functions of an application program to improve the user experience, the application program may be in different scenes when running.
For real-time interactive network application, when data transmission is performed, real-time interaction may be performed, that is, in a real-time interaction scene, or in a non-real-time interaction scene.
In S207, the scene where the target application is located is distinguished by the size of the web speed.
The network speed herein refers to the average network data transfer rate of the target application.
Specifically, the average network speed is determined according to the data amount of the network transmission of the target application program in the first preset time period and the time length of the first preset time period.
S207 determines the average network data transmission rate, so as to more accurately reflect the speed of network data transmission by the target application program through UDP during multiple UDP packet detections.
S208, determining whether the average transmission rate is smaller than a preset network speed threshold.
If yes, executing S210; otherwise, S209 is executed.
For example, for real-time interactive network applications, it may be in a scene such as video playback. Because the data volume transmitted during video playing is larger, the average network data transmission rate is larger at the moment, namely, when the average network data transmission rate is larger than or equal to a preset network speed threshold value, the target application program is a real-time interactive network application in a video playing scene;
For the real-time interactive network application, the real-time interactive network application in a real-time interactive scene, for example, in a real-time fight game scene, where the requirement of the target application program for real-time interaction is higher, the network speed corresponding to the target application program is usually smaller, that is, when the average network speed is smaller than the preset network speed threshold, the target application program is the real-time interactive network application in the real-time interactive scene.
S209, a second processing operation is performed.
When the target application program is determined to perform network data transmission based on UDP and the average network data transmission rate of the target application program is larger than the preset network speed threshold, the target application program needs to perform network connection in running and the average network data transmission rate is higher. Thus, the target application is a real-time interactive network application for network data transmission based on UDP, but is not in a real-time interactive state. For example, the target application is a real-time interactive web application in a video playback scenario.
After the terminal equipment enters the screen-off state, the power consumption of the terminal equipment can be reduced by prohibiting partial function realization of the target application program.
In one possible implementation manner, the second processing operation may specifically include at least one of the following:
The method comprises the steps of prohibiting a target application from network connection, canceling a target application registration sensor, prohibiting the target application from calling the output device, and closing the processing function of the GPU of the image processor.
The target application program is forbidden to carry out network connection, so that the power consumption generated by the network data transmission of the target application program can be reduced; because the average network data transmission rate of the target application program in the first preset time period is larger, the target application program is forbidden to carry out network connection, and the flow consumption of the terminal equipment can be reduced;
the application may need to register with the sensor at runtime to monitor the activity of the sensor and invoke the sensor. When the terminal device enters the off-screen state, the user may not call the sensor through the target application program to realize the corresponding function. Therefore, canceling the target application registration sensor and disabling the target application invocation sensor reduces power consumption due to the target application invocation sensor without degrading the user experience.
The output device may include, in particular, a display screen, a speaker, and a motor.
Since the invocation of the display by the application will normally be disabled after the terminal device has entered the off-screen state, the output device in some possible cases comprises in particular a speaker and a motor.
In some possible cases, the output device may also include other output devices of the terminal device that the application may invoke at runtime.
The application may need to invoke an output device at run time, for example, to output sound through a speaker. When the terminal device enters the off-screen state, the user may not call the output device to realize the corresponding function through the target application program. Thus, the target application is prohibited from invoking the output device to reduce power consumption due to the target application invoking the sensor without degrading the user experience.
After the terminal device enters the off-screen state, the user typically has no need to see the screen of the application running through the screen. Therefore, after the terminal device enters the off-screen state, the processing function of the GPU of the image processor is turned off.
In one possible implementation manner, the first processing operation may further include:
and determining whether the average value of the running electrical parameters of the terminal equipment in the first preset time period is larger than a fourth preset parameter threshold value, and if so, terminating the target application program.
When the average value of the running electric parameters of the terminal equipment in the first preset time period is larger than the fourth preset parameter threshold value, the power consumption of the terminal equipment in the first preset time period is larger, or the power consumption of the terminal equipment required by running the target application program in the first preset time period is larger. Therefore, the target application program is terminated to reduce the power consumption of the terminal equipment, so that the user experience is improved;
when the average value of the operation electric parameters of the terminal equipment in the first preset time period is smaller than or equal to the fourth preset parameter threshold value, the power consumption of the terminal equipment in the first preset time period is smaller, or the power consumption of the terminal equipment required by the operation of the target application program in the first preset time period is smaller.
When the current operating electrical parameter of the terminal device is less than or equal to the fourth preset parameter threshold, the process of the target application may be suspended, see in particular the description above.
In addition to determining the processing operation performed on the target application according to the power consumption of the terminal device in the first preset time period or the power consumption of the terminal device required to run the target application in the first preset time period, the processing operation performed on the target application may also be determined according to the current power consumption of the terminal device or the power consumption of the terminal device required to run the target application.
In one possible implementation manner, the first processing operation may further include: and determining whether the current operation electric parameter of the terminal equipment is larger than a fifth preset parameter threshold value, and if so, terminating the target application program.
When the current operation electric parameter of the terminal equipment is larger than the fifth preset parameter threshold, the current power consumption of the terminal equipment is larger, or the power consumption of the terminal equipment required by the current operation of the target application program is larger. Therefore, the target application program is terminated to reduce the power consumption of the terminal equipment, so that the user experience is improved;
when the current operation electric parameter of the terminal equipment is smaller than or equal to the fifth preset parameter threshold value, the current power consumption of the terminal equipment is smaller, or the power consumption of the terminal equipment required by the current operation of the target application program is smaller.
When the current operating electrical parameter of the terminal device is less than or equal to the fifth preset parameter threshold, the process of the target application program may be suspended, see in particular the description above.
In some possible cases, the second processing operation specifically includes:
prohibiting the target application program from performing network connection; canceling a target application registration sensor, prohibiting the target application from calling a positioning sensor, prohibiting the target application from outputting sound through a loudspeaker, and closing the drawing of the image processor GPU to the target application;
Determining whether an average value of the current of the terminal equipment in a first preset time period required by the operation of the target application program is larger than a second preset current threshold value or whether the battery temperature of the current terminal equipment is larger than a preset second temperature threshold value, and if so, terminating the process of the target application program; otherwise, the process of the target application is suspended.
The battery temperature of the current terminal device refers to the current data of the battery temperature of the terminal device.
The terminal equipment and the battery temperature of the terminal equipment required by the operation of the target application program are all operation electric parameters of the terminal equipment.
The average value of the current of the terminal equipment required by the running of the target application program can represent the power consumption of the terminal equipment required by the running of the target application program; the current battery temperature of the terminal device can characterize the current power consumption of the terminal.
In some possible cases, the threshold value of the operating electrical parameter of the target application program may be determined according to the number of users corresponding to the application program, or the like, that is, the fourth operating parameter threshold value, the fifth operating parameter threshold value, the preset second temperature threshold value, and the preset second current threshold value.
S210, prohibiting the target application program from transmitting the network data based on the non-UDP.
The protocol by which the application program performs network data transmission may include one or more of UDP or TCP.
UDP here refers to the UDP protocol or an extended UDP based protocol, such as quitc; TCP refers to the TCP protocol or an extended protocol based on TCP.
QUIC (Quick UDP Internet Connection) is a UDP-based low latency internet transport layer protocol.
The application program performs network data transmission based on UDP and TCP, which means that network data transmission can be performed based on UDP (or an extended protocol based on UDP) and TCP (an extended protocol based on TCP) at the same time.
In one possible implementation, the target application is prohibited from transmitting network data based on TCP.
Further, in one possible implementation manner, the target application program is prohibited from transmitting the network data based on the TCP by proxy network data TCP socket.
Protocols used by applications for network data transmission include in particular UDP and TCP (and other extended protocols based on UDP or TCP).
Thus, prohibiting the target application from network data transmission based on TCP is equivalent to prohibiting the target application from network data transmission based on non-UDP.
S211, carrying out the third preset times of determining operation, and obtaining the result of the third preset times of determining operation, wherein the determining operation is to determine whether UDP data packets exist in network transmission data of the target application program.
The determining operation is the same as the determining operation in S204, and the determining operation is performed multiple times to improve accuracy of the determination, and the description of the determining operation is referred to the above description and is not repeated here.
In one possible implementation, the determining operation of the third preset number of times is performed within the second preset time period.
Further, in one possible implementation manner, the determining operation of the third preset times is performed according to the second preset time interval in the second preset time period.
That is, the determination operation is performed a third preset number of times within the second preset time period, and the time interval between each determination operation is the second preset time interval.
S212, determining whether the fourth preset times of determination operation exists in the third preset times of determination operation results is that UDP data packets exist in the network transmission data.
If yes, S213-S214 are performed, otherwise S215 is performed.
The fourth preset times is smaller than or equal to the third preset times.
In S211-S212, the purpose of the determination operation is to determine whether there is still network data transmission based on UDP after prohibiting the target application from network data transmission based on non-UDP in S210.
For the descriptions of S211-S212, refer to the descriptions of S204-S205, and are not described herein.
Therefore, after the target application program is prohibited from transmitting network data based on non-UDP, if the target application program is a real-time interactive network application and the target application program normally operates, and the target application program keeps a state based on UDP network data transmission, at this time, whether the UDP data packet exists in the network transmission data of the target application program is determined.
In S211-S212, it is determined whether or not there is UDP-based network transmission data of the target application by determining whether or not there is a UDP packet in the network transmission data of the target application.
In one possible implementation, it may also be determined whether there is UDP-based network transmission data for the target application by determining whether the average network data transmission rate of the target application over the second preset time period is greater than zero.
The second preset time period is after the target application is prohibited from transmitting network data based on non-UDP at S210.
The protocols used when the application program performs network data transmission include UDP and TCP (and other extended protocols based on UDP or TCP), and after disabling the target application program to perform network data transmission based on non-UDP in S210, if there is network transmission data based on UDP in the target application program, the average network data transmission rate of the target application program is greater than zero, that is, there is network data transmission.
S213, maintaining the network connection of the target application program.
When the target application program performs stable network data transmission based on UDP, the average network data transmission rate of the target application program is smaller than a preset network speed threshold, and stable network data transmission still exists in the target application program after non-UDP network data transmission is forbidden, at the moment, the target application program performs stable network data transmission based on UDP in operation, and the average network data transmission rate is lower. Thus, the target application is a real-time interactive network application for network data transmission based on UDP, and is in a real-time interactive state.
For example, the target application is a real-time interactive online game application in a real-time combat game scenario.
Because the target application program is a real-time interactive network application and is in a real-time interactive scene, the network disconnection can cause the abnormal operation of the target application program, thereby reducing the user experience.
Therefore, when the target application program is determined to be the real-time interactive network application for network data transmission based on UDP, the network connection of the target application program is maintained, so that the user experience is improved.
S214, performing a third processing operation.
After the terminal equipment enters the screen-off state, the power consumption of the terminal equipment can be reduced by prohibiting partial function realization of the target application program.
In one possible implementation manner, the third processing operation may specifically include at least one of the following:
canceling the target application registration sensor, prohibiting the target application from calling the output device, and turning off the processing function of the GPU of the image processor.
The output device may include, in particular, a display screen, a speaker, and a motor.
Since the invocation of the display by the application will normally be disabled after the terminal device has entered the off-screen state, the output device in some possible cases comprises in particular a speaker and a motor.
In some possible cases, the output device may also include other output devices of the terminal device that the application may invoke at runtime.
The application may need to register with the sensor at runtime to monitor the activity of the sensor and invoke the sensor. When the terminal device enters the off-screen state, the user may not call the sensor through the target application program to realize the corresponding function. Therefore, canceling the target application registration sensor and disabling the target application invocation sensor reduces power consumption due to the target application invocation sensor without degrading the user experience.
The application may need to invoke an output device at run time, for example, to output sound through a speaker. When the terminal device enters the off-screen state, the user may not call the output device to realize the corresponding function through the target application program. Thus, the target application is prohibited from invoking the output device to reduce power consumption due to the target application invoking the sensor without degrading the user experience.
After the terminal device enters the off-screen state, the user typically has no need to see the screen of the application running through the screen. Therefore, after the terminal device enters the off-screen state, the processing function of the GPU of the image processor is turned off.
In one possible implementation manner, the third processing operation may further include:
and determining whether the average value of the running electrical parameters of the terminal equipment in the first preset time period is larger than a sixth preset parameter threshold value, and if so, terminating the target application program.
When the average value of the running electric parameters of the terminal equipment in the first preset time period is larger than the sixth preset parameter threshold value, the power consumption of the terminal equipment in the first preset time period is larger, or the power consumption of the terminal equipment required by running the target application program in the first preset time period is larger. Therefore, the target application program is terminated to reduce the power consumption of the terminal equipment, so that the user experience is improved;
When the average value of the operation electric parameters of the terminal equipment in the first preset time period is smaller than or equal to the sixth preset parameter threshold value, the power consumption of the terminal equipment in the first preset time period is smaller, or the power consumption of the terminal equipment required by the operation of the target application program in the first preset time period is smaller.
When the current operating electrical parameter of the terminal device is less than or equal to the sixth preset parameter threshold, the process of the target application may be suspended, see in particular the description above.
In addition to determining the processing operation performed on the target application according to the power consumption of the terminal device in the first preset time period or the power consumption of the terminal device required to run the target application in the first preset time period, the processing operation performed on the target application may also be determined according to the current power consumption of the terminal device or the power consumption of the terminal device required to run the target application.
In one possible implementation manner, the first processing operation may further include: and determining whether the current operation electric parameter of the terminal equipment is larger than a seventh preset parameter threshold value, and if so, terminating the target application program.
When the current operation electric parameter of the terminal equipment is larger than the seventh preset parameter threshold value, the current power consumption of the terminal equipment is larger, or the power consumption of the terminal equipment required by the current operation of the target application program is larger. Therefore, the target application program is terminated to reduce the power consumption of the terminal equipment, so that the user experience is improved;
When the current operation electric parameter of the terminal equipment is smaller than or equal to the seventh preset parameter threshold value, the current power consumption of the terminal equipment is smaller, or the power consumption of the terminal equipment required by the current operation of the target application program is smaller.
When the current operating electrical parameter of the terminal device is less than or equal to the seventh preset parameter threshold, the process of the target application may be suspended, see in particular the description above.
In some possible cases, the third processing operation specifically includes:
prohibiting the target application program from performing network connection; canceling a target application registration sensor, prohibiting the target application from calling a positioning sensor, prohibiting the target application from outputting sound through a loudspeaker, and closing the drawing of the image processor GPU to the target application;
determining whether an average value of the current of the terminal equipment in a first preset time period required by the operation of the target application program is larger than a third preset current threshold value or whether the battery temperature of the current terminal equipment is larger than a preset third temperature threshold value, and if so, terminating the process of the target application program; otherwise, the process of the target application is suspended.
The battery temperature of the current terminal device refers to the current data of the battery temperature of the terminal device.
The terminal equipment and the battery temperature of the terminal equipment required by the operation of the target application program are all operation electric parameters of the terminal equipment.
In some possible cases, the threshold value of the operating electrical parameter of the target application program may be determined according to the number of users corresponding to the application program, or the like, that is, the sixth operating parameter threshold value, the seventh operating parameter threshold value, the preset third temperature threshold value, and the preset third current threshold value.
The average value of the current of the terminal equipment required by the running of the target application program can represent the power consumption of the terminal equipment required by the running of the target application program; the current battery temperature of the terminal device can characterize the current power consumption of the terminal.
In some possible cases, the threshold value of the operating electrical parameter of the target application program may be determined according to the number of users corresponding to the application program, for example, the sixth operating parameter threshold value, the seventh operating parameter threshold value, the preset third temperature threshold value, and the preset third current threshold value.
When the real-time interactive web application is in a real-time interactive scene, the user experience is typically reduced if the process of the target application is terminated, compared to the non-real-time interactive web application, or the real-time interactive web application is in a non-real-time interactive scene. For example, when the real-time interactive network application is in a real-time interactive scene, the process of the target application of the first terminal device is terminated, and the user experience of the first terminal device is reduced; in addition, for the second terminal device that interacts with the first terminal device in real time, the user experience of the second terminal device is also reduced.
Thus, the threshold value referred to in the above-described third processing operation may be larger than the threshold value referred to in the second processing operation, as well as the threshold value designed in the first processing operation.
That is, the sixth operating parameter threshold is greater than the fourth operating parameter threshold, the seventh operating parameter threshold is greater than the fifth operating parameter threshold, the preset third temperature threshold is greater than the preset second temperature threshold, the preset third current threshold is greater than the preset second current threshold, the sixth operating parameter threshold is greater than the second operating parameter threshold, the seventh operating parameter threshold is greater than the third operating parameter threshold, the preset third temperature threshold is greater than the preset first temperature threshold, and the preset third current threshold is greater than the preset first current threshold.
S215, performing a fourth processing operation.
After prohibiting the target application program from transmitting network data based on the non-UDP, if the target application program still has stable network data transmission based on the UDP, the target application program is a real-time interactive network application for transmitting network data based on the UDP and is in a real-time interactive state;
after prohibiting the non-UDP network data transmission, if the target application does not have the UDP-based network data transmission, or if the UDP-based network data transmission is unstable, various situations may exist.
Several implementations of performing the fourth processing operation are provided below for this embodiment.
First, the target application is terminated.
According to the previous step of S210, the target application is a real-time interactive network application for network data transmission based on UDP, and is in a real-time interactive state, but according to S211-S212, it is detected that there is no network data transmission based on UDP by the target application.
Therefore, since the results of the two parts are contradictory, the reliability of the results is low, and the process of the target application program is directly terminated, so that the power consumption is reduced.
And second, maintaining the network connection of the target application program.
According to the step before S210, the target application is a real-time interactive network application for network data transmission based on UDP and is in a real-time interactive state, in which case, if the network connection of the target application is disconnected, the user experience will be reduced. Therefore, the network connection of the target application program is maintained, so that the user experience is improved.
Further, an operation similar to the third processing operation may also be performed.
In one possible implementation, the fourth processing operation may specifically include at least one of the following:
Canceling the target application registration sensor, prohibiting the target application from calling the output device, and turning off the processing function of the GPU of the image processor.
In one possible implementation, the fourth processing operation may further include:
and determining whether the average value of the running electrical parameters of the terminal equipment in the first preset time period is larger than an eighth preset parameter threshold value, and if so, terminating the target application program.
In one possible implementation, the fourth processing operation may further include: and determining whether the current operation electric parameter of the terminal equipment is larger than a ninth preset parameter threshold value, and if so, terminating the target application program.
For the description of the fourth processing operation, refer specifically to the description of the third processing operation, which is not repeated here.
Third, when it is determined that there is a state of network data transmission based on non-UDP or no network data transmission in the normal operation state of the target application, the target application is prohibited from performing network connection.
During the running of an application, there may be multiple running states. For real-time interactive network applications for network data transmission based on UDP, the normal operating state may include various states including, for example, a state with network data transmission, a state without network data transmission, a state with network data transmission based on UDP, and a state with network data transmission based on non-UDP.
For example, during the running process of the application program, the application program may be in different states at different running times, but are in normal running states. For example, the target application is in a state of network data transmission based on UDP after being started, and the target application is in a state of no network data transmission after the target application is running for a period of time.
At this time, the target application is a real-time interactive network application, but is in a state of no network data transmission, and has low dependency on network connection or does not require network connection, so the network connection of the target application is disconnected.
Further, since the dependence of the target application on the network connection is low at this time or the network connection is not required, an operation similar to the first processing operation can also be performed.
For the description of the fourth processing operation, refer specifically to the description of the first processing operation, which is not repeated here.
Further, it may be determined whether there is a state of network data transmission based on non-UDP or no network data transmission in the normal operation state of the target application according to the identification of the target application.
By utilizing the scheme of the embodiment, after the terminal equipment enters the screen-off state, whether the target application program is a real-time interactive application is determined by determining whether a user data packet protocol (UDP) data packet exists in network transmission data of the target application program; determining whether the target application program is in a real-time interaction scene when running by determining whether the average network data transmission rate of the target application program is smaller than a preset network speed threshold value; and when the target application program is determined to be the real-time interactive application and the running time is in the real-time interactive scene, the network connection of the target application program is maintained. By using the scheme of the embodiment, after the terminal equipment enters the screen-off state, the real-time interactive application in the real-time interactive scene keeps a normal running state, and the problem that the target application program cannot provide a real-time interactive function for a user due to disconnection of network connection is avoided, so that user experience is improved.
In addition, the scheme of the embodiment can also identify the non-real-time interaction network application, that the real-time interaction network application is in a non-real-time interaction scene, and that other conditions occur in the identification process, and execute corresponding processing operations for different applications or different scenes so as to improve user experience; in the identification process, the accuracy of identification can be improved through multiple times of determination operation, and the user experience is further improved.
In some possible cases, the application program management method provided by the embodiment of the application program can be further applied to identifying the real-time interactive network application when the terminal equipment is in the bright screen state, so that the time delay of the real-time interactive network application is reduced, the network function of the real-time interactive network application is improved, and the like, and the user experience is improved when the terminal equipment is in the bright screen state. The implementation principle when the terminal device is in the bright screen state is similar to that in the above embodiment, and will not be described here again.
The application program management method provided by the application program management method can be applied to application programs such as real-time interactive game application and real-time interactive social application. That is, the real-time interactive network application in the above embodiment may include an application program of a real-time interactive game application, a real-time interactive social application, or the like.
It will be appreciated that the application management method provided in this application may also be applied to other applications.
The application management method provided in the present application will be described below by taking a multiplayer real-time combat game as an example. The real-time multi-player fight game is a real-time interactive network application, and users need to play the game through internet connection. When an application program runs, the real-time performance of data transmission is required to be high, and network data transmission is usually performed based on UDP.
When a user runs the multi-user real-time fight game by using the terminal equipment, if the running of the application program is terminated after the terminal equipment enters the screen-off state, the network connection of the application program is disconnected, so that the user cannot perform the multi-user real-time fight. When a user wants to continue to perform real-time multi-person combat, the user needs to wait a long time because the application program needs to perform network reconnection, so that the user experience of the current user using the terminal device is reduced, and the experience of the user performing real-time combat with the user is reduced.
Another application management method is provided, and is specifically described below with reference to the accompanying drawings.
Referring to fig. 5, fig. 5 is a flowchart of an application management method according to another embodiment of the present application.
As shown in fig. 5, the application management method in the present embodiment includes S301 to S318.
And S301, when the terminal equipment is determined to enter an off-screen state, acquiring network data transmission of the target application program.
S302, acquiring the type of the currently running application program.
The currently running applications include foreground running and background running applications.
A foreground running application, typically referred to as a running application visible on a desktop taskbar of a terminal device, typically operated by a user;
Background running applications generally refer to programs that are not visible to the user but are still running.
In one possible implementation manner, the method for acquiring the type of the currently running application program specifically includes:
and determining the type of the currently running application program according to the identification of the currently running application program.
For the description of the application program identifier, refer to the description in the above embodiment, and are not repeated here.
In one possible implementation, the type of the currently running application is determined according to the identification of the application and the correspondence between the identification of the application and the type of the application.
Further, the correspondence between the identifier of the application program and the type of the application program may be stored in the memory of the terminal device in advance in the form of a data table in the database, and called when needed.
The plurality of applications may include only applications currently owned by the terminal device; but may also include applications currently owned by the terminal device, as well as other applications, such as those commonly found on the market.
The database may be updated as the system of the terminal device is updated.
The corresponding relation is pre-stored in a memory of the terminal equipment, so that the time for managing the application program can be reduced.
In one possible implementation manner, the correspondence between the identifier of the application program and the type of the application program may also be obtained from the cloud server when the terminal device is networked.
For example, when the terminal device starts an application, a correspondence between an identification of the application and a type of the application is obtained from the cloud server.
In one possible implementation manner, the correspondence between the identifier of the application program and the type of the application program may also be obtained from the application program downloading platform when the terminal device downloads the application program from the application program downloading platform. In one possible implementation manner, after the identifier of the currently running application program is acquired, the type of the application program corresponding to the identifier of the currently running application program may also be acquired by the terminal device through the network.
When it is determined that the terminal device enters the off-screen state, the terminal device may not have an application running in the foreground, that is, the terminal device displays a desktop of the terminal device.
S303, determining whether a target application program exists according to the type of the currently running application program.
If yes, S305 is executed, otherwise S304 is executed.
The target application is an application of which the type is the target type in the currently running applications.
For example, the target type is a game class. In S303, a target application with a target type is obtained to improve the pertinence of application management.
In the above embodiment, the real-time interactive network application refers to an application program that implements a real-time interactive function through a network, and may also be regarded as one type of application program, but the type of application program is determined by the network transmission characteristics of the application program;
the target type in S303 is also used to determine the type of application, but the type of application is determined by the function provided by the application to the user, e.g., the target type may also include social, navigation, weather, etc.
Because users typically have a greater need for use of foreground-running applications than background-running applications.
Thus, in one possible implementation, the threshold value corresponding to the application running in the foreground is greater than the threshold value of the application running in the background.
It will be appreciated that the type of application being the target type may be one or more, in which case each application being the target type is treated separately as the target application.
S304, a fifth processing operation is performed.
None of the currently running applications are of the target type, e.g., none of the currently running applications are of the non-game type.
When the currently running application program comprises a plurality of application programs, processing operation corresponding to each application program in the plurality of application programs is executed respectively.
The processing operations corresponding to each application program may be the same or different.
For example, currently running applications include social class applications (the type of application is social class) and navigation class applications (the type of application is navigation class).
The processing operations corresponding to the social application program comprise: disconnecting the network connection, closing Wi-Fi scanning of the wireless communication technology, and closing an alarm clock awakening function;
the processing operations corresponding to the navigation application program comprise: the bluetooth connection is disconnected.
In one possible case, the processing operations corresponding to the currently running application program are sequentially executed, which may be the processing operations corresponding to the application program running in the foreground are executed first, and then the processing operations corresponding to the application program running in the background are executed.
S305, acquiring the battery temperature of the terminal equipment.
S306, acquiring the current of the terminal equipment required by the running of the target application program.
The battery temperature of the terminal device and the current of the terminal device required by the operation of the target application program are both operation electric parameters of the terminal device.
And acquiring the operation electric parameters of the terminal equipment when the existence of the target application program is determined, and carrying out targeted application program management.
The description of the operation electrical parameters of the terminal device is referred to the description in the above embodiments, and will not be repeated here.
For example, the target application is a game-like application.
S307, determining whether the UDP data packet exists in the network transmission data of the target application program.
If yes, executing S308-S309; otherwise, S310 is performed.
When an application program has a high requirement on the real-time performance of network data transmission, UDP is generally adopted as a network transmission protocol to perform network data transmission.
Therefore, by determining whether the network transmission data of the target application program has the UDP data packet, whether the target application program performs network data transmission based on the UPD can be determined, and whether the target application program has higher real-time requirements on the network data transmission.
For example, when the target application is a time-game application and the game application has a high requirement on real-time performance of network data transmission, network data transmission is usually performed based on UDP.
S308, performing a first preset number of determining operations to obtain a result of the first preset number of determining operations, where the determining operations are determining whether a UDP packet exists in the network transmission data.
S309, determining whether the result of the second preset times of determining operation exists in the result of the first preset times of determining operation is that UDP data packets exist in the network transmission data.
If yes, S311 is executed, otherwise S310 is executed.
The second preset times are smaller than or equal to the first preset times.
S307 is used to determine whether the target application performs network data transmission based on UDP, and S308-S309 are used to determine whether the target application performs stable network data transmission based on UDP.
For example, when determining whether the target application is conducting stable network data transmission based on UDP, the target application is a multiplayer real-time combat game.
S310, executing a first processing operation.
When the network transmission data of the target application program does not have the UDP data packet, or the result of the determination operation of the first preset times does not have the UDP data packet in the network transmission data, the result of the determination operation of the second preset times is determined to be the UDP data packet in the network transmission data, the second preset times is smaller than or equal to the first preset times, namely the UDP data packet is in the network transmission data of the target application program, but the data transmission is unstable, the target application program does not need to be connected with the network when running, or the dependence of the target application program on the network connection when running is lower. Thus, the target application is not a real-time interactive web application.
The description of the first processing operation is referred to the description in the above embodiment, and will not be repeated here.
S311, determining whether the average transmission rate of the network transmission data of the target application program in the first preset time period is smaller than a preset network speed threshold value.
If yes, S313 is executed, otherwise S312 is executed.
For real-time interactive network application, when network data transmission is performed, real-time interaction may be performed, that is, in a real-time interaction scene, or in a non-real-time interaction scene.
The average transmission rate is determined to distinguish the scene in which the target application is located.
For example, when the average transmission rate is large, the multiplayer real-time fight game is in a video playing scene; when the average transmission rate is smaller, the multi-player real-time fight game is in a multi-player real-time fight game scene.
S312, a second processing operation is performed.
The target application is a real-time interactive network application and is in a non-real-time interactive scene, and the description of the second processing operation is referred to the description in the above embodiment, which is not repeated here.
S313, maintaining the network connection of the target application program.
The target application program is a real-time interaction network application and is in a real-time interaction scene, and the network connection is disconnected, so that the target application program is difficult to realize a real-time interaction function, and the user experience is reduced. Thus, the network connection of the target application is maintained.
For example, the target application program is a multi-person real-time fight game and is in a multi-person real-time fight scene, and when the network connection is disconnected, the multi-person real-time fight ongoing by the user is difficult to continue, and the experience of the user participating in the multi-person real-time fight is reduced.
S314, a third processing operation is performed.
The target application is a real-time interactive network application and is in a real-time interactive scene, and the description of the third processing operation is referred to the description in the above embodiment, which is not repeated herein.
When the terminal equipment is determined to enter an off-screen state, firstly, an application program of a target type (such as a game type) is determined in a targeted manner according to the type of the application program; and then determining whether the target application program is a real-time interactive network application (such as a multi-player real-time combat game) according to the characteristics of network data transmission of the target application program. When the target application program is a real-time interactive network application, determining whether the target application program is in a real-time interactive scene (for example, whether the multi-person real-time combat game is in a multi-person real-time combat scene) according to the average transmission rate of network transmission data. When the target application program is a real-time interactive network application and is in a real-time interactive scene, the network connection of the application program is maintained, and the target application program is kept in a normal running state, so that the user experience is improved.
The application also provides another application program management method.
The application program management method provided by the other embodiment of the application program is used for terminating the target application program when the operation electric parameters of the terminal equipment are too large.
The operation electrical parameters of the terminal device are described in the above embodiments, and are not described herein.
And when the terminal equipment is determined to enter the screen-off state, acquiring the operation electric parameters of the terminal equipment in real time.
In the process of executing the application management method in the above embodiment, when it is determined that the running electrical parameter is greater than the preset parameter threshold value, the target application is terminated. Terminating the target application refers to terminating the process of the target application.
In this embodiment, when it is determined that the terminal device enters the off-screen state, the operation electrical parameter of the terminal device is obtained in real time, and when it is determined that the operation electrical parameter is too large, the target application program is terminated. According to the description in the above embodiment, when the operation electric parameter of the terminal device is large, it is indicated that the power consumption of the terminal device is large or that the power consumption of the target application is large. Because the excessive power consumption of the terminal equipment can reduce the user experience, when the excessive power consumption of the terminal equipment is determined according to the running electric parameters acquired in real time, the target application program is directly terminated, so that the user experience is improved.
The application program management system is further provided, and the application program management system is specifically described below with reference to the accompanying drawings.
Referring to fig. 6, fig. 6 is a schematic structural diagram of an application management system according to an embodiment of the present application.
As shown in fig. 6, the application management system 200 in the present embodiment includes a data acquisition unit 201, a first determination unit 202, a second determination unit 203, and a processing unit 204.
And the data acquisition unit 201 is used for acquiring network transmission data of the target application program when the terminal equipment is determined to enter the off-screen state.
In one possible implementation manner, when the display screen of the terminal device is in a bright screen state, the terminal device can be put into a screen-off state by pressing a physical start key of the terminal device.
In one possible implementation manner, when the display screen of the terminal device is in a bright screen state, and when the screen of the terminal device does not receive touch operation within a preset time, the terminal device is determined to enter a screen-off state.
For example, when the display screen of the terminal device is in a bright screen state, the user does not perform touch operation on the screen within a preset time period, and it is determined that the terminal device enters a screen-off state.
Further, in a possible case, when the screen of the terminal device does not receive the touch operation within a period of time, determining that the terminal device enters a screen locking state; and after another period of time, determining that the terminal equipment enters a screen-off state when the screen of the terminal equipment still does not receive touch operation.
For example, after the terminal device enters the screen locking state, the user does not perform touch operation on the screen for another period of time, and it is determined that the terminal device enters the screen locking state.
A first determining unit 202 is configured to determine whether a user datagram protocol UDP packet exists in the network transmission data.
Because the network data transmission based on the UDP has the characteristic of low time delay, when an application program has higher requirement on the real-time property of the network data transmission, the UDP is generally adopted as a network transmission protocol to carry out the network data transmission.
Therefore, by determining whether the network transmission data of the target application program has the UDP data packet, whether the target application program performs network data transmission based on the UPD can be determined, and whether the target application program has higher real-time requirements on the network data transmission.
When the UDP data packet exists in the network transmission data of the target application program, the target application program is indicated to require the network data transmission to have higher real-time performance, and the target application is indicated to be a real-time network interaction application possibly; when the fact that the UDP data packet does not exist in the network transmission data of the target application program is determined, the fact that the target application program has no high requirement on the real-time performance of the network data is indicated.
A second determining unit 203, configured to determine, when it is determined that the UDP packet exists in the network transmission data, whether an average network data transmission rate of the target application program in the first preset period of time is less than a preset network speed threshold.
Currently, in order to increase the functions of an application program to enhance the user experience, the application program may be in different scenes when running. The second determining unit 203 distinguishes the scene where the target application is located by the size of the web speed.
The network speed herein refers to the average network data transfer rate of the target application.
For example, for real-time interactive network applications, it may be in a scene such as video playback. Because the data volume transmitted during video playing is larger, the average network data transmission rate is larger at the moment, namely, when the average network data transmission rate is larger than or equal to a preset network speed threshold value, the target application program is a real-time interactive network application in a video playing scene;
for the real-time interactive network application, the real-time interactive network application in a real-time interactive scene, for example, in a real-time fight game scene, where the requirement of the target application program for real-time interaction is higher, the network speed corresponding to the target application program is usually smaller, that is, when the average network speed is smaller than the preset network speed threshold, the target application program is the real-time interactive network application in the real-time interactive scene.
The processing unit 204 is configured to maintain a network connection of the target application when it is determined that the average network data transmission rate is less than the preset network speed threshold.
When the target application program performs network data transmission based on UDP and the average network data transmission rate of the target application program is lower, the target application program is a real-time interactive network application performing network data transmission based on UDP and is in a real-time interactive state.
For example, the target application is a real-time interactive online game application in a real-time combat game scenario.
Because the target application program is a real-time interactive network application and is in a real-time interactive scene, the network disconnection can cause the abnormal operation of the target application program, thereby reducing the user experience.
Therefore, when the target application program is determined to be the real-time interactive network application for network data transmission based on UDP, the network connection of the target application program is maintained, so that the user experience is improved.
By utilizing the scheme of the embodiment, after the terminal equipment enters the screen-off state, whether the target application program is a real-time interactive application is determined by determining whether a user data packet protocol (UDP) data packet exists in network transmission data of the target application program; determining whether the target application program is in a real-time interaction scene when running by determining whether the average network data transmission rate of the target application program is smaller than a preset network speed threshold value; and when the target application program is determined to be the real-time interactive application and the running time is in the real-time interactive scene, the network connection of the target application program is maintained. By using the scheme of the embodiment, after the terminal equipment enters the screen-off state, the real-time interactive application in the real-time interactive scene keeps a normal running state, and the problem that the target application program cannot provide a real-time interactive function for a user due to disconnection of network connection is avoided, so that user experience is improved.
In a possible implementation manner, the second determining unit 203 is configured to determine the average network speed according to the data amount of the network transmission of the target application program in the first preset time period and the time length of the first preset time period.
In a possible implementation manner, the data obtaining unit 201 is further configured to obtain an operation electrical parameter of the terminal device when it is determined that the terminal device enters the off-screen state.
In one possible implementation, the operating electrical parameters of the terminal device are acquired in real time. That is, after determining that the terminal device enters the off-screen state, the operation electrical parameters of the terminal device are continuously obtained.
It will be appreciated that the acquisition process is delayed due to the data acquisition process and the like, and also belongs to the implementation manner of the real-time acquisition.
In one possible implementation manner, the operation electrical parameter of the terminal device may include at least one of the following: the temperature of the electrical components in the terminal device, the battery current of the terminal device when the target application is running, the power consumption when the target application is running, or the current of the terminal device required when the target application is running.
In one possible case, the above-mentioned operating electrical parameter of the terminal device is the temperature of the electrical components in the terminal device.
The temperature of the electrical component is used to characterize the power consumption of the electrical component and thus of the terminal device.
Further, in a possible implementation, the electrical element may be a battery of the terminal device or a processor of the terminal device. That is, the temperature of the above-mentioned electrical component may be the temperature of the battery of the terminal device, or the temperature of the processor of the terminal device.
The temperature of the battery of the terminal device can characterize the power consumption of the terminal device. In general, the higher the power consumption of the terminal device, the higher the battery temperature of the terminal device.
When the battery temperature of the terminal device is too high due to excessive power consumption, it may result in: the performance of the battery decreases, for example, the capacity of the battery decreases; the temperature of the whole terminal equipment is increased; the cell is activated at high temperature, producing a gas with a higher risk of swelling. The above-mentioned several situations may reduce the user experience.
The power consumption of the terminal device is characterized by the battery temperature. Under the condition that the battery temperature is too high, the power consumption of the terminal equipment is high, and at the moment, the power consumption of the terminal equipment needs to be reduced so as to improve the user experience.
The processor of the terminal device is used for performing main works such as data processing when the terminal device realizes functions, so that the temperature of the terminal device can characterize part of power consumption of the terminal device, thereby characterizing the power consumption of the terminal device.
It will be appreciated that the electrical components described above may also be other electrical components of the terminal device.
In some possible cases, the operating electrical parameter of the terminal device is the current of the battery of the terminal device.
The current of the battery of the terminal device can characterize the power consumption of the terminal device. In some possible cases, the operation electrical parameter of the terminal device is power consumption of the target application program when the target application program is running or current of the terminal device required by the target application program when the target application program is running.
The target application program is an operating application program, and can be an application program operated in the foreground or an application program operated in the background.
A foreground running application, typically referred to as a running application visible on a desktop taskbar of a terminal device, typically operated by a user;
background running applications generally refer to programs that are not visible to the user but are still running.
When the terminal device runs the target application, a part of power consumption of the terminal device is used for running the target application.
The power consumption of the target application program during operation, namely the power consumption of the terminal equipment required by the target application program during operation.
The current of the terminal device required by the running of the target application can characterize the power consumption of the terminal device required by the running of the target application.
The power consumption of the target application is typically made up of multiple parts. For example, the power consumption of the target application includes: the processor is used for running the power consumption of the target application program, the power consumption of the sensor called by the target application program when running, the power consumption of the output device called by the target application program when running, and the like.
In some possible cases, the power consumption of the target application program can be obtained by determining the power consumption of each part and then superposing the power consumption of each part.
The target application is not a hardware device and therefore the target application does not have a current in a physical sense. The current of the terminal device required for the target application to run can be used as a measure of the power consumption of the target application.
In some possible cases, the current of the terminal device required by the target application program when running is a superposition of the following currents: the processor of the terminal device is used for running the working current of the target application program, the working current of the sensor called when the target application program runs and the working current of the output device called when the target application program runs.
Specifically, according to the obtained working current of the processor, the working frequency of the processor and the processor occupancy rate of the target game application, the working current of the processor for running the target application program is obtained; acquiring the working current of a sensor called when a target application program runs; acquiring the working current of the output equipment called when the target application program runs; and overlapping the currents to obtain the currents of the terminal equipment required by the running of the target application program. It will be appreciated that the power consumption of the target application may include other power consumption in addition to that mentioned in the above description. When the power consumption of the target application may also include other power consumption, the power consumption of the target application may be obtained according to an implementation similar to that described in the foregoing description, which is not described herein.
In one possible implementation manner, the current of the terminal device required by the running of the target application program is determined according to the identification of the target application program.
And determining a part required by the running of the target application program in the current of the terminal equipment according to the identification of the target application program.
The identification of the application is used to identify the application and has uniqueness, i.e., the correspondence between the identification of the application and the application is unique.
In one possible implementation, the identification of the application may include: the packet name of the application, the PID of the application, and one of the UID of the application.
The Package Name (Package Name) is the Name of the Android Application Package (APK), and can uniquely identify an application.
PID (Process Identifier) is the identity of the process.
When an application is started, the process of the application will be assigned a PID for uniquely identifying the process.
During the running of the application, the PID of the process of the application remains unchanged; when the process is terminated, the PID of the process is recovered by the system; when the application is restarted, the application's process is reassigned a new PID.
When an application corresponds to a plurality of processes, each process is assigned a PID.
Since the application and the process of the application are corresponding, the PID can uniquely identify the application.
UID (User Identifier) is the identity of the user.
In Linux, UID is an ID of a user, which is used to indicate which user runs a current application program, and is mainly used to manage rights of the user.
In Android single-user systems, each application is typically assigned a different UID, i.e., the UID is able to uniquely identify the application.
In summary, in Android, the packet name, PID, and UID can all uniquely identify the application.
In one possible implementation, the identification of the application is obtained at the start-up run time of the application.
The sequence of acquiring the network transmission data of the target application program and acquiring the operation electrical parameters of the terminal device by the data acquisition unit 201 is not limited in this embodiment.
Different implementations are possible for the first determining unit 202 to determine whether a user datagram protocol UDP packet is present in the network transmission data.
In one possible implementation manner, the first determining unit 202 is specifically configured to determine whether a UDP packet exists in the network transmission data of the target application after determining that the terminal screen enters the off-screen state and the preset off-screen period elapses.
In one possible implementation manner, the first determining unit 202 is specifically configured to invoke the interface to detect whether a Socket (Socket) connection of the target application program is UDP, so as to determine whether a UDP packet exists in network transmission data of the target application program.
When Socket connection of the target application program is UDP, determining that UDP data packets exist in network transmission data of the target application program; when the Socket connection of the target application program is not UDP, determining that the UDP data packet does not exist in the network transmission data of the target application program.
In one possible implementation, the first determining unit 202 is specifically configured to:
determining whether UDP data packets exist in the network transmission data;
when the UDP data packet does not exist in the network transmission data, determining that the UDP data packet does not exist in the network transmission data;
when UDP data packets exist in the network transmission data, determining operation of a first preset number of times is carried out, wherein the determining operation is to determine whether the UDP data packets exist in the network transmission data;
and when the result of the determining operation with the second preset times in the determining operation with the first preset times is that the UDP data packet exists in the network transmission data, determining that the UDP data packet exists in the network transmission data, wherein the second preset times are smaller than or equal to the first preset times.
Performing a first preset number of determining operations, which means performing a plurality of determining operations to determine whether the target application program stably performs network data transmission based on UDP; the number of times the determining operation is performed is specifically a first preset number of times.
It should be understood that the first preset number of times may be 1, but in order to determine whether the target application program stably performs network data transmission based on UDP, the first preset number of times is generally greater than 1, and thus, in this embodiment, the first preset number of times is all described as being greater than 1.
And carrying out the first preset times of determining operation in total, and determining whether the second preset times of determining operation result is that the UDP data packet exists in the network transmission data.
And when the result of the second preset times of determining operation is that the UDP data packet exists in the network transmission data, determining that the UDP data packet exists in the network transmission data.
The second preset times are equal to the first preset times, namely, a plurality of determining operations are carried out, and the UDP data packets exist in the network transmission data only after all the determining operations result in that the UDP data packets exist in the network transmission data;
the second preset times are smaller than the first preset times, namely, a plurality of determining operations are carried out, the result of a part of determining operations is that the UDP data packet exists in the network transmission data, and the UDP data packet exists in the network transmission data is determined.
The first preset times and the second preset times can be set according to actual requirements.
In some possible cases, when the result of the determination operation of the first preset number of times does not exist in the determination operation of the second preset number of times is that the UDP packet exists in the network transmission data, it is determined that the UDP packet does not exist in the network transmission data.
Because the UDP is used for transmitting the network data, the time delay is small, when the UDP data packet exists in the network transmission data of the target application program, the target application is possibly a real-time network interaction application.
For real-time network interaction applications, it is often desirable to have a relatively stable network data transfer over a period of time.
Therefore, when the second preset times or the first preset times are all determined to have the UDP data packet in the network transmission data of the target application program for the first preset times, the target application program is indicated to perform the network data transmission with UDP more stably in a period of time.
And executing the multiple determining operations and obtaining the result of whether the UDP data packet exists in the network transmission data according to the multiple determining results, so that the accuracy of the determining can be improved.
In one possible implementation, the determining operation is performed for a first preset number of times within a first preset time period.
At this time, the first preset time period is a time period corresponding to the first preset number of determination operations by the first determining unit 202, and is also a time period in which the second determining unit 203 determines whether the average network data transmission rate of the target application is less than the preset network speed threshold.
Further, in one possible implementation manner, the determining operation of the first preset times is performed according to the first preset time interval in the first preset time period.
That is, the determination operation for the first preset number of times is performed within the first preset time period, and the time interval between each determination operation is the first preset time interval.
In addition to the implementation manner provided above, that is, first, it is determined whether a UDP packet exists in the network transmission data of the target application program, if so, the determination operation may be performed multiple times, and if so, the determination operation may be performed multiple times directly.
In one possible implementation manner, a first preset number of determining operations are performed, where the determining operations are performed to determine whether the UDP packet exists in the network transmission data;
and when the result of the determining operation with the second preset times in the determining operation with the first preset times is that the UDP data packet exists in the network transmission data, determining that the UDP data packet exists in the network transmission data, wherein the second preset times are smaller than or equal to the first preset times.
Further, in one possible implementation manner, the determining operation of the first preset times is performed according to the first preset time interval in the first preset time period.
The detailed description of this implementation is similar to the above implementation in this embodiment, and will not be repeated here.
In a possible implementation, the processing unit 204 is further configured to perform the first processing operation when it is determined that no UDP data packet is present in the network transmission data.
When the network transmission data of the target application program does not have the UDP data packet, or the network transmission data of the target application program has the UDP data packet but the data transmission is unstable, the target application program is not a real-time interactive network application, that is, the target application program does not need to be connected with a network when running, or the dependence of the target application program on the network connection is low when running.
Thus, the target application is not a real-time interactive network application when it is determined that there are no UDP packets in the network transmission data.
For example, the target application is a non-real-time interactive class of application, such as a stand-alone gaming application or the like. After the terminal equipment enters the off-screen state, the power consumption of the terminal equipment can be reduced by prohibiting partial function implementation of the target application program.
In one possible implementation manner, the first processing operation may specifically include at least one of the following:
The method comprises the steps of prohibiting a target application from network connection, canceling a target application registration sensor, prohibiting the target application from calling the output device, and closing the processing function of the GPU of the image processor.
The target application program is forbidden to carry out network connection, so that the power consumption generated by the network data transmission of the target application program can be reduced; according to the above description, the target application is not a real-time interactive network application in a real-time interactive state, so that the target application is prohibited from performing network connection, and the user experience is not reduced. The application may need to register the sensor during running to monitor the activity of the sensor, i.e. the application registers the sensor for data monitoring, and invokes the sensor for data collection, etc. When the terminal device enters the off-screen state, the user may not call the sensor through the target application program to realize the corresponding function. Therefore, canceling the target application registration sensor and disabling the target application invocation sensor reduces power consumption due to the target application invocation sensor without degrading the user experience.
The output device may include, in particular, a display screen, a speaker, and a motor.
Since the invocation of the display by the application will normally be disabled after the terminal device has entered the off-screen state, the output device in some possible cases comprises in particular a speaker and a motor.
In some possible cases, the output device may also include other output devices of the terminal device that the application may invoke at runtime.
The application may need to invoke an output device at run time, for example, to output sound through a speaker. When the terminal device enters the off-screen state, the user may not call the output device to realize the corresponding function through the target application program. Thus, the target application is prohibited from invoking the output device to reduce power consumption due to the target application invoking the sensor without degrading the user experience.
After the terminal device enters the off-screen state, the user typically has no need to see the screen of the application running through the screen. Therefore, after the terminal device enters the off-screen state, the processing function of the GPU of the image processor is turned off.
In one possible implementation manner, the first processing operation may further include:
And determining whether the average value of the running electrical parameters of the terminal equipment in the first preset time period is larger than a second preset parameter threshold value, and if so, terminating the target application program.
When the average value of the running electric parameters of the terminal equipment in the first preset time period is larger than the second preset parameter threshold value, the power consumption of the terminal equipment in the first preset time period is larger, or the power consumption of the terminal equipment required by running the target application program in the first preset time period is larger. Therefore, the target application program is terminated to reduce the power consumption of the terminal equipment, so that the user experience is improved; when the average value of the operation electric parameters of the terminal equipment in the first preset time period is smaller than or equal to the second preset parameter threshold value, the power consumption of the terminal equipment in the first preset time period is smaller, or the power consumption of the terminal equipment required by the operation of the target application program in the first preset time period is smaller.
Terminating the target application refers to terminating the process of the target application.
Compared with the process of terminating the target application program, the process of restarting the target application program again, the running intermediate state of the program can be maintained after the process of suspending the target application program, and the loading speed is higher.
Further, in one possible implementation, when it is determined that the terminal device enters the bright screen state, the processing unit 204 activates a process of the target application program, and continues to execute the process.
In one possible implementation manner, after the terminal device enters the off-screen state, when it is determined that a physical start key of the terminal device is pressed, it is determined that the terminal device enters the on-screen state.
In addition to determining the processing operation performed on the target application according to the power consumption of the terminal device in the first preset time period or the power consumption of the terminal device required to run the target application in the first preset time period, the processing operation performed on the target application may also be determined according to the current power consumption of the terminal device or the power consumption of the terminal device required to run the target application.
In one possible implementation manner, the first processing operation may further include:
and determining whether the current operation electric parameter of the terminal equipment is larger than a third preset parameter threshold value, and if so, terminating the target application program.
When the current operation electric parameter of the terminal equipment is larger than a third preset parameter threshold value, the current power consumption of the terminal equipment is larger, or the power consumption of the terminal equipment required by the current operation of the target application program is larger. Therefore, the target application program is terminated to reduce the power consumption of the terminal equipment, so that the user experience is improved;
When the current operation electric parameter of the terminal equipment is smaller than or equal to the third preset parameter threshold value, the current power consumption of the terminal equipment is smaller, or the power consumption of the terminal equipment required by the current operation of the target application program is smaller.
When the current operating electrical parameter of the terminal device is less than or equal to the third preset parameter threshold, the process of the target application program can be suspended, see in particular the description above.
In some possible cases, the first processing operation specifically includes:
prohibiting the target application program from performing network connection; canceling a target application registration sensor, prohibiting the target application from calling a positioning sensor, prohibiting the target application from outputting sound through a loudspeaker, and closing the drawing of the image processor GPU to the target application;
determining whether an average value of the current of the terminal equipment in a first preset time period required by the operation of the target application program is larger than a first preset current threshold value or whether the battery temperature of the current terminal equipment is larger than a preset first temperature threshold value, and if so, terminating the process of the target application program; otherwise, the process of the target application is suspended.
The battery temperature of the current terminal device refers to the current data of the battery temperature of the terminal device.
The terminal equipment and the battery temperature of the terminal equipment required by the operation of the target application program are all operation electric parameters of the terminal equipment.
The average value of the current of the terminal equipment required by the running of the target application program can represent the power consumption of the terminal equipment required by the running of the target application program; the current battery temperature of the terminal device can characterize the current power consumption of the terminal.
In some possible cases, the threshold value of the operation electrical parameter of the target application program may be determined according to the number of users corresponding to the application program, or the like, that is, the second operation parameter threshold value, the third operation parameter threshold value, the preset first temperature threshold value, and the preset first current threshold value.
In a possible implementation, the processing unit 204 is further configured to perform a second processing operation when it is determined that the average transmission rate is greater than or equal to the preset network speed threshold.
When the target application program is determined to perform network data transmission based on UDP and the average network data transmission rate of the target application program is larger than the preset network speed threshold, the target application program needs to perform network connection in running and the average network data transmission rate is higher. Thus, the target application is a real-time interactive network application for network data transmission based on UDP, but is not in a real-time interactive state. For example, the target application is a real-time interactive web application in a video playback scenario.
After the terminal equipment enters the screen-off state, the power consumption of the terminal equipment can be reduced by prohibiting partial function realization of the target application program.
In one possible implementation manner, the second processing operation may specifically include at least one of the following:
the method comprises the steps of prohibiting a target application from network connection, canceling a target application registration sensor, prohibiting the target application from calling the output device, and closing the processing function of the GPU of the image processor.
The target application program is forbidden to carry out network connection, so that the power consumption generated by the network data transmission of the target application program can be reduced; because the average network data transmission rate of the target application program in the first preset time period is larger, the target application program is forbidden to carry out network connection, and the flow consumption of the terminal equipment can be reduced;
the application may need to register with the sensor at runtime to monitor the activity of the sensor and invoke the sensor. When the terminal device enters the off-screen state, the user may not call the sensor through the target application program to realize the corresponding function. Therefore, canceling the target application registration sensor and disabling the target application invocation sensor reduces power consumption due to the target application invocation sensor without degrading the user experience.
The output device may include, in particular, a display screen, a speaker, and a motor.
Since the invocation of the display by the application will normally be disabled after the terminal device has entered the off-screen state, the output device in some possible cases comprises in particular a speaker and a motor.
In some possible cases, the output device may also include other output devices of the terminal device that the application may invoke at runtime.
The application may need to invoke an output device at run time, for example, to output sound through a speaker. When the terminal device enters the off-screen state, the user may not call the output device to realize the corresponding function through the target application program. Thus, the target application is prohibited from invoking the output device to reduce power consumption due to the target application invoking the sensor without degrading the user experience.
After the terminal device enters the off-screen state, the user typically has no need to see the screen of the application running through the screen. Therefore, after the terminal device enters the off-screen state, the processing function of the GPU of the image processor is turned off.
In one possible implementation manner, the first processing operation may further include:
And determining whether the average value of the running electrical parameters of the terminal equipment in the first preset time period is larger than a fourth preset parameter threshold value, and if so, terminating the target application program.
When the average value of the running electric parameters of the terminal equipment in the first preset time period is larger than the fourth preset parameter threshold value, the power consumption of the terminal equipment in the first preset time period is larger, or the power consumption of the terminal equipment required by running the target application program in the first preset time period is larger. Therefore, the target application program is terminated to reduce the power consumption of the terminal equipment, so that the user experience is improved;
when the average value of the operation electric parameters of the terminal equipment in the first preset time period is smaller than or equal to the fourth preset parameter threshold value, the power consumption of the terminal equipment in the first preset time period is smaller, or the power consumption of the terminal equipment required by the operation of the target application program in the first preset time period is smaller.
When the current operating electrical parameter of the terminal device is less than or equal to the fourth preset parameter threshold, the process of the target application may be suspended, see in particular the description above.
In addition to determining the processing operation performed on the target application according to the power consumption of the terminal device in the first preset time period or the power consumption of the terminal device required to run the target application in the first preset time period, the processing operation performed on the target application may also be determined according to the current power consumption of the terminal device or the power consumption of the terminal device required to run the target application.
In one possible implementation manner, the first processing operation may further include: and determining whether the current operation electric parameter of the terminal equipment is larger than a fifth preset parameter threshold value, and if so, terminating the target application program.
When the current operation electric parameter of the terminal equipment is larger than the fifth preset parameter threshold, the current power consumption of the terminal equipment is larger, or the power consumption of the terminal equipment required by the current operation of the target application program is larger. Therefore, the target application program is terminated to reduce the power consumption of the terminal equipment, so that the user experience is improved;
when the current operation electric parameter of the terminal equipment is smaller than or equal to the fifth preset parameter threshold value, the current power consumption of the terminal equipment is smaller, or the power consumption of the terminal equipment required by the current operation of the target application program is smaller.
When the current operating electrical parameter of the terminal device is less than or equal to the fifth preset parameter threshold, the process of the target application program may be suspended, see in particular the description above.
In some possible cases, the second processing operation specifically includes:
prohibiting the target application program from performing network connection; canceling a target application registration sensor, prohibiting the target application from calling a positioning sensor, prohibiting the target application from outputting sound through a loudspeaker, and closing the drawing of the image processor GPU to the target application;
Determining whether an average value of the current of the terminal equipment in a first preset time period required by the operation of the target application program is larger than a second preset current threshold value or whether the battery temperature of the current terminal equipment is larger than a preset second temperature threshold value, and if so, terminating the process of the target application program; otherwise, the process of the target application is suspended.
The battery temperature of the current terminal device refers to the current data of the battery temperature of the terminal device.
The terminal equipment and the battery temperature of the terminal equipment required by the operation of the target application program are all operation electric parameters of the terminal equipment.
The average value of the current of the terminal equipment required by the running of the target application program can represent the power consumption of the terminal equipment required by the running of the target application program; the current battery temperature of the terminal device can characterize the current power consumption of the terminal.
In some possible cases, the threshold value of the operating electrical parameter of the target application program may be determined according to the number of users corresponding to the application program, or the like, that is, the fourth operating parameter threshold value, the fifth operating parameter threshold value, the preset second temperature threshold value, and the preset second current threshold value.
In a possible implementation manner, the processing unit 204 is further configured to prohibit the target application program from performing network data transmission based on the non-UDP when it is determined that the average transmission rate is less than the preset network speed threshold.
Protocols for network data transmission by applications include UDP, TCP, or both UDP and TCP.
UDP here refers to the UDP protocol or an extended UDP based protocol, such as quitc; TCP refers to the TCP protocol or an extended protocol based on TCP.
QUIC (Quick UDP Internet Connection) is a UDP based low latency internet transport layer protocol formulated by google.
The application program performs network data transmission based on UDP and TCP, which means that network data transmission can be performed based on UDP (or an extended protocol based on UDP) and TCP (an extended protocol based on TCP) at the same time.
In one possible implementation, the target application is prohibited from transmitting network data based on TCP.
Further, in one possible implementation manner, the target application program is prohibited from transmitting the network data based on the TCP by proxy network data TCP socket.
Protocols used by applications for network data transmission include in particular UDP and TCP (and other extended protocols based on UDP or TCP).
Thus, prohibiting the target application from network data transmission based on TCP is equivalent to prohibiting the target application from network data transmission based on non-UDP.
In a possible implementation manner, the first determining unit 202 is further configured to perform a third preset number of determining operations, to obtain a result of the third preset number of determining operations, where the determining operations are determining whether a UDP packet exists in the network transmission data of the target application program.
Determining whether a UDP packet exists in the network transmission data of the target application program, so as to determine whether the target application program performs network data transmission based on UDP, where the determining operation is performed multiple times to improve accuracy of the determining operation, and description of the determining operation is referred to above and will not be repeated herein.
In one possible implementation, the determining operation of the third preset number of times is performed within the second preset time period.
Further, in one possible implementation manner, the determining operation of the third preset times is performed according to the second preset time interval in the second preset time period.
That is, the determination operation is performed a third preset number of times within the second preset time period, and the time interval between each determination operation is the second preset time interval.
In a possible implementation manner, the first determining unit 202 is further configured to determine whether, among the results of the third preset number of determining operations, the results of the fourth preset number of determining operations are all that UDP packets exist in the network transmission data.
The fourth preset times is smaller than or equal to the third preset times.
The purpose of the determining operation is to prohibit the target application program from transmitting network data based on the non-UDP, and then to determine whether there is network data transmission based on the UDP.
After the target application program is prohibited from transmitting network data based on non-UDP, if the target application program is a real-time interactive network application and the target application program normally operates, and the target application program keeps a state based on UDP network data transmission, determining whether the UDP data packet exists in the network transmission data of the target application program.
And determining whether the network transmission data of the target application program based on UDP exists by determining whether the UDP data packet exists in the network transmission data of the target application program.
In one possible implementation, it may also be determined whether there is UDP-based network transmission data for the target application by determining whether the average network data transmission rate of the target application over the second preset time period is greater than zero.
The second preset time period is after disabling the target application from network data transfer based on non-UDP.
Protocols used when the application program performs network data transmission include UDP and TCP (and other extended protocols based on UDP or TCP), and after the target application program is prohibited from performing network data transmission based on non-UDP, if there is network transmission data based on UDP of the target application program, the average network data transmission rate of the target application program is greater than zero, that is, there is network data transmission.
In one possible implementation manner, the processing unit 204 is specifically configured to maintain the network connection of the target application program when it is determined that, in the results of the determining operation of the third preset number of times, the results of the determining operation of the fourth preset number of times are all that UDP packets exist in the network transmission data.
For the network connection for maintaining the target application, refer to the above description, and will not be repeated here.
In a possible implementation manner, the processing unit 204 is further configured to perform the third processing operation when it is determined that, among the results of the third preset number of determining operations, the results of the fourth preset number of determining operations are all that UDP packets exist in the network transmission data.
The fourth preset times is smaller than or equal to the third preset times.
After the terminal equipment enters the screen-off state, the power consumption of the terminal equipment can be reduced by prohibiting partial function realization of the target application program.
In one possible implementation manner, the third processing operation may specifically include at least one of the following:
canceling the target application registration sensor, prohibiting the target application from calling the output device, and turning off the processing function of the GPU of the image processor.
The application may need to register with the sensor at runtime to monitor the activity of the sensor and invoke the sensor. When the terminal device enters the off-screen state, the user may not call the sensor through the target application program to realize the corresponding function. Therefore, canceling the target application registration sensor and disabling the target application invocation sensor reduces power consumption due to the target application invocation sensor without degrading the user experience.
The application may need to invoke an output device at run time, for example, to output sound through a speaker. When the terminal device enters the off-screen state, the user may not call the output device to realize the corresponding function through the target application program. Thus, the target application is prohibited from invoking the output device to reduce power consumption due to the target application invoking the sensor without degrading the user experience.
After the terminal device enters the off-screen state, the user typically has no need to see the screen of the application running through the screen. Therefore, after the terminal device enters the off-screen state, the processing function of the GPU of the image processor is turned off.
In one possible implementation manner, the third processing operation may further include:
and determining whether the average value of the running electrical parameters of the terminal equipment in the first preset time period is larger than a sixth preset parameter threshold value, and if so, terminating the target application program.
When the average value of the running electric parameters of the terminal equipment in the first preset time period is larger than the sixth preset parameter threshold value, the power consumption of the terminal equipment in the first preset time period is larger, or the power consumption of the terminal equipment required by running the target application program in the first preset time period is larger. Therefore, the target application program is terminated to reduce the power consumption of the terminal equipment, so that the user experience is improved;
when the average value of the operation electric parameters of the terminal equipment in the first preset time period is smaller than or equal to the sixth preset parameter threshold value, the power consumption of the terminal equipment in the first preset time period is smaller, or the power consumption of the terminal equipment required by the operation of the target application program in the first preset time period is smaller.
When the current operating electrical parameter of the terminal device is less than or equal to the sixth preset parameter threshold, the process of the target application may be suspended, see in particular the description above.
In addition to determining the processing operation performed on the target application according to the power consumption of the terminal device in the first preset time period or the power consumption of the terminal device required to run the target application in the first preset time period, the processing operation performed on the target application may also be determined according to the current power consumption of the terminal device or the power consumption of the terminal device required to run the target application.
In one possible implementation manner, the first processing operation may further include: and determining whether the current operation electric parameter of the terminal equipment is larger than a seventh preset parameter threshold value, and if so, terminating the target application program.
When the current operation electric parameter of the terminal equipment is larger than the seventh preset parameter threshold value, the current power consumption of the terminal equipment is larger, or the power consumption of the terminal equipment required by the current operation of the target application program is larger. Therefore, the target application program is terminated to reduce the power consumption of the terminal equipment, so that the user experience is improved;
when the current operation electric parameter of the terminal equipment is smaller than or equal to the seventh preset parameter threshold value, the current power consumption of the terminal equipment is smaller, or the power consumption of the terminal equipment required by the current operation of the target application program is smaller.
When the current operating electrical parameter of the terminal device is less than or equal to the seventh preset parameter threshold, the process of the target application may be suspended, see in particular the description above.
In some possible cases, the third processing operation specifically includes:
prohibiting the target application program from performing network connection; canceling a target application registration sensor, prohibiting the target application from calling a positioning sensor, prohibiting the target application from outputting sound through a loudspeaker, and closing the drawing of the image processor GPU to the target application;
determining whether an average value of the current of the terminal equipment in a first preset time period required by the operation of the target application program is larger than a third preset current threshold value or whether the battery temperature of the current terminal equipment is larger than a preset third temperature threshold value, and if so, terminating the process of the target application program; otherwise, the process of the target application is suspended.
The battery temperature of the current terminal device refers to the current data of the battery temperature of the terminal device.
The terminal equipment and the battery temperature of the terminal equipment required by the operation of the target application program are all operation electric parameters of the terminal equipment.
In some possible cases, the threshold value of the operating electrical parameter of the target application program may be determined according to the number of users corresponding to the application program, or the like, that is, the sixth operating parameter threshold value, the seventh operating parameter threshold value, the preset third temperature threshold value, and the preset third current threshold value.
The average value of the current of the terminal equipment required by the running of the target application program can represent the power consumption of the terminal equipment required by the running of the target application program; the current battery temperature of the terminal device can characterize the current power consumption of the terminal.
In some possible cases, the threshold value of the operating electrical parameter of the target application program may be determined according to the number of users corresponding to the application program, for example, the sixth operating parameter threshold value, the seventh operating parameter threshold value, the preset third temperature threshold value, and the preset third current threshold value.
When the real-time interactive web application is in a real-time interactive scene, the user experience is typically reduced if the process of the target application is terminated, compared to the non-real-time interactive web application, or the real-time interactive web application is in a non-real-time interactive scene. For example, when the real-time interactive network application is in a real-time interactive scene, the process of the target application of the first terminal device is terminated, and the user experience of the first terminal device is reduced; in addition, for the second terminal device that interacts with the first terminal device in real time, the user experience of the second terminal device is also reduced.
Thus, the threshold value referred to in the above-described third processing operation may be larger than the threshold value referred to in the second processing operation, as well as the threshold value designed in the first processing operation.
That is, the sixth operating parameter threshold is greater than the fourth operating parameter threshold, the seventh operating parameter threshold is greater than the fifth operating parameter threshold, the preset third temperature threshold is greater than the preset second temperature threshold, the preset third current threshold is greater than the preset second current threshold, the sixth operating parameter threshold is greater than the second operating parameter threshold, the seventh operating parameter threshold is greater than the third operating parameter threshold, the preset third temperature threshold is greater than the preset first temperature threshold, and the preset third current threshold is greater than the preset first current threshold.
In a possible implementation manner, the processing unit 204 is further configured to perform the fourth processing operation when it is determined that, among the results of the third preset number of determining operations, the results of the determining operation without the fourth preset number of determining operations are all that UDP packets exist in the network transmission data.
The fourth preset times is smaller than or equal to the third preset times.
After the target application program is prohibited from carrying out network data transmission based on non-UDP, if the target application program still has stable network data transmission based on UDP, the target application program is a real-time interactive network application for carrying out network data transmission based on UDP and is in a real-time interactive state;
After prohibiting the non-UDP network data transmission, if the target application does not have the UDP-based network data transmission, or if the UDP-based network data transmission is unstable, various situations may exist.
Several implementations of performing the fourth processing operation are provided below for this embodiment.
First, the target application is terminated.
And determining whether the network transmission data of the target application program has UDP data packets or not and whether the target application program has contradiction based on the results of the two parts of network data transmission of UDP or not, so that the reliability of the results is lower, and the process of the target application program is directly terminated to reduce the power consumption.
And second, maintaining the network connection of the target application program.
The target application is a real-time interactive network application for network data transmission based on UDP and is in a real-time interactive state, in which case, if the network connection of the target application is disconnected, the user experience is reduced. Therefore, the network connection of the target application program is maintained, so that the user experience is improved.
Further, an operation similar to the third processing operation may also be performed.
In one possible implementation, the fourth processing operation may specifically include at least one of the following:
Canceling the target application registration sensor, prohibiting the target application from calling the output device, and turning off the processing function of the GPU of the image processor.
In one possible implementation, the fourth processing operation may further include:
and determining whether the average value of the running electrical parameters of the terminal equipment in the first preset time period is larger than an eighth preset parameter threshold value, and if so, terminating the target application program.
In one possible implementation, the fourth processing operation may further include: and determining whether the current operation electric parameter of the terminal equipment is larger than a ninth preset parameter threshold value, and if so, terminating the target application program.
For the description of the fourth processing operation, refer specifically to the description of the third processing operation, which is not repeated here.
Third, when it is determined that there is a state of network data transmission based on non-UDP or no network data transmission in the normal operation state of the target application, the target application is prohibited from performing network connection.
During the running of an application, there may be multiple running states. For real-time interactive network applications for network data transmission based on UDP, the normal operating state may include various states including, for example, a state with network data transmission, a state without network data transmission, a state with network data transmission based on UDP, and a state with network data transmission based on non-UDP.
For example, during the running process of the application program, the application program may be in different states at different running times, but are in normal running states. For example, the target application is in a state of network data transmission based on UDP after being started, and the target application is in a state of no network data transmission after the target application is running for a period of time.
At this time, the target application is a real-time interactive network application, but is in a state of no network data transmission, and has low dependency on network connection or does not require network connection, so the network connection of the target application is disconnected.
Further, since the dependence of the target application on the network connection is low at this time or the network connection is not required, an operation similar to the first processing operation can also be performed.
For the description of the fourth processing operation, refer specifically to the description of the first processing operation, which is not repeated here.
Further, it may be determined whether there is a state of network data transmission based on non-UDP or no network data transmission in the normal operation state of the target application according to the identification of the target application.
The data acquisition unit 201 is also used for acquiring the type of the currently running application program.
The currently running applications include foreground running and background running applications.
A foreground running application, typically referred to as a running application visible on a desktop taskbar of a terminal device, typically operated by a user;
background running applications generally refer to programs that are not visible to the user but are still running.
In one possible implementation manner, the method for acquiring the type of the currently running application program specifically includes:
and determining the type of the currently running application program according to the identification of the currently running application program.
For the description of the application program identifier, refer to the description in the above embodiment, and are not repeated here.
In one possible implementation, the type of the currently running application is determined according to the identification of the application and the correspondence between the identification of the application and the type of the application.
Further, the correspondence between the identifier of the application program and the type of the application program may be stored in the memory of the terminal device in advance in the form of a data table in the database, and called when needed.
The plurality of applications may include only applications currently owned by the terminal device; but may also include applications currently owned by the terminal device, as well as other applications, such as those commonly found on the market.
The database may be updated as the system of the terminal device is updated.
The corresponding relation is pre-stored in a memory of the terminal equipment, so that the time for managing the application program can be reduced.
In one possible implementation manner, the correspondence between the identifier of the application program and the type of the application program may also be obtained from the cloud server when the terminal device is networked.
For example, when the terminal device starts an application, a correspondence between an identification of the application and a type of the application is obtained from the cloud server.
In one possible implementation manner, the correspondence between the identifier of the application program and the type of the application program may also be obtained from the application program downloading platform when the terminal device downloads the application program from the application program downloading platform. In one possible implementation manner, after the identifier of the currently running application program is acquired, the type of the application program corresponding to the identifier of the currently running application program may also be acquired by the terminal device through the network.
When it is determined that the terminal device enters the off-screen state, the terminal device may not have an application running in the foreground, that is, the terminal device displays a desktop of the terminal device.
In a possible implementation, the application management system 200 may further include a third determining unit, configured to determine whether the target application exists according to a type of the currently running application.
The target application program is an application program with the type of the target type in the currently running application programs, so that the pertinence of application program management is improved. For example, the target type is a game class.
In the above description of the present embodiment, the real-time interactive network application refers to an application program that implements a real-time interactive function through a network, and may also be regarded as a type of application program, but the type of application program is determined by a network transmission characteristic of the application program;
for the purposes of the description herein, the target type is also used to determine the type of application, but the type of application is determined by the functionality provided by the application to the user, e.g., the target type may include a game class, a social class, a navigation class, a weather class, etc.
Because users typically have a greater need for use of foreground-running applications than background-running applications.
Thus, in one possible implementation, the threshold value corresponding to the application running in the foreground is greater than the threshold value of the application running in the background.
The threshold here includes the threshold of the electrical parameter of the terminal device in the above embodiment.
The threshold value of the electrical parameter of the application program running in the foreground is larger than the threshold value of the electrical parameter of the application program running in the background, see the description in the above embodiment, compared with the application program running in the background, the power consumption of the terminal device corresponding to the condition that the application program running in the foreground is terminated is higher, that is, the application program running in the foreground is less likely to be terminated.
Due to the user's usage needs for the application running in the foreground. Generally, the use requirement of the application program running in the background is higher, and a higher threshold value of the electrical parameter is set for the application program running in the foreground, so that the user experience is further improved.
It will be appreciated that the type of application being the target type may be one or more, in which case each application being the target type is treated separately as the target application.
In a possible implementation, the processing unit 204 is further configured to perform a fifth processing operation when it is determined that the target application is not present according to the type of the currently running application.
None of the currently running applications are of the target type, e.g., none of the currently running applications are of the non-game type.
When the currently running application program comprises a plurality of application programs, processing operation corresponding to each application program in the plurality of application programs is executed respectively.
The processing operations corresponding to each application program may be the same or different.
For example, currently running applications include social class applications (the type of application is social class) and navigation class applications (the type of application is navigation class).
The processing operations corresponding to the social application program comprise: disconnecting the network connection, closing Wi-Fi scanning of the wireless communication technology, and closing an alarm clock awakening function;
the processing operations corresponding to the navigation application program comprise: the bluetooth connection is disconnected.
In one possible case, the processing operations corresponding to the currently running application program are sequentially executed, which may be the processing operations corresponding to the application program running in the foreground are executed first, and then the processing operations corresponding to the application program running in the background are executed.
In a possible implementation manner, the data obtaining unit 201 is specifically configured to obtain an operation electrical parameter of the terminal device when it is determined that the target application program exists according to the type of the currently running application program.
And acquiring the operation electric parameters of the terminal equipment when the existence of the target application program is determined, and carrying out targeted application program management.
The description of the data acquisition unit 201 for acquiring the operation electrical parameters of the terminal device is referred to the above description, and will not be repeated here.
In a possible implementation manner, the data obtaining unit 201 is further configured to obtain, in real time, an operation electrical parameter of the terminal device when it is determined that the terminal device enters the off-screen state;
the processing unit 204 is further configured to terminate the target application program when it is determined that the operating electrical parameter acquired in real time by the data acquisition unit 201 is greater than the preset parameter threshold.
Terminating the target application refers to terminating the process of the target application.
The operation electrical parameters of the terminal device are described in the above embodiments, and are not described herein.
In this embodiment, when it is determined that the terminal device enters the off-screen state, the operation electrical parameter of the terminal device is obtained in real time, and when it is determined that the operation electrical parameter is too large, the target application program is terminated. According to the description in the above embodiment, when the operation electric parameter of the terminal device is large, it is indicated that the power consumption of the terminal device is large or that the power consumption of the target application is large. Because the excessive power consumption of the terminal equipment can reduce the user experience, when the excessive power consumption of the terminal equipment is determined according to the running electric parameters acquired in real time, the target application program is directly terminated, so that the user experience is improved.
By utilizing the scheme of the embodiment, after the terminal equipment enters the screen-off state, whether the target application program is a real-time interactive application is determined by determining whether a user data packet protocol (UDP) data packet exists in network transmission data of the target application program; determining whether the target application program is in a real-time interaction scene when running by determining whether the average network data transmission rate of the target application program is smaller than a preset network speed threshold value; and when the target application program is determined to be the real-time interactive application and the running time is in the real-time interactive scene, the network connection of the target application program is maintained. By using the scheme of the embodiment, after the terminal equipment enters the screen-off state, the real-time interactive application in the real-time interactive scene keeps a normal running state, and the problem that the target application program cannot provide a real-time interactive function for a user due to disconnection of network connection is avoided, so that user experience is improved.
In addition, the scheme of the embodiment can also identify the non-real-time interaction network application, that the real-time interaction network application is in a non-real-time interaction scene, and that other conditions occur in the identification process, and execute corresponding processing operations for different applications or different scenes so as to improve user experience; in the identification process, the accuracy of identification can be improved through multiple times of determining operation, and the user experience is further improved; determining a target application program according to the type of the currently running application program, and carrying out targeted application program management; when the excessive power consumption of the terminal equipment is determined according to the operation electric parameters acquired in real time, the target application program is directly terminated, so that the user experience is improved.
In some possible cases, the application program management system provided by the embodiment of the application program management system can be further applied to the terminal equipment for identifying the real-time interaction network application when the terminal equipment is in the bright screen state, so that the time delay of the real-time interaction network application is reduced, the network function of the real-time interaction network application is improved, and the like, and the user experience is improved when the terminal equipment is in the bright screen state. The implementation principle when the terminal device is in the bright screen state is similar to that in the above embodiment, and will not be described here again.
The application also provides terminal equipment.
With continued reference to fig. 1, fig. 1 is a schematic diagram of a framework of a terminal device according to an embodiment of the present application.
As shown in fig. 1, the terminal device includes a processor 110 and a display 194.
The processor 110 is configured to:
when the display screen is determined to enter a screen-off state, acquiring network transmission data of a target application program;
determining whether a user data packet protocol UDP data packet exists in the network transmission data;
when the UDP data packet exists in the network transmission data, determining whether the average network data transmission rate of the target application program in a first preset time period is smaller than a preset network speed threshold value or not;
and when the average network data transmission rate is determined to be smaller than the preset network speed threshold value, maintaining the network connection of the target application program.
By utilizing the scheme of the embodiment, after the terminal equipment enters the screen-off state, whether the target application program is a real-time interactive application is determined by determining whether a user data packet protocol (UDP) data packet exists in network transmission data of the target application program; determining whether the target application program is in a real-time interaction scene when running by determining whether the average network data transmission rate of the target application program is smaller than a preset network speed threshold value; and when the target application program is determined to be the real-time interactive application and the running time is in the real-time interactive scene, the network connection of the target application program is maintained. By using the scheme of the embodiment, after the terminal equipment enters the screen-off state, the real-time interactive application in the real-time interactive scene keeps a normal running state, and the problem that the target application program cannot provide a real-time interactive function for a user due to disconnection of network connection is avoided, so that user experience is improved.
The processor 110 is further configured to perform a first processing operation when it is determined that the UDP packet is not present in the network transmission data, the first processing operation including at least one of:
the target application program is prohibited from performing network connection, the target application program is prohibited from calling the sensor, the target application program is prohibited from calling the output device, or the processing function of the GPU is turned off.
As shown in fig. 1, sensors, such as one or more sensors in sensor module 180.
The terminal device may also comprise other sensors not shown in fig. 1.
For real-time interactive network applications, taking as an example a multiplayer real-time combat game application, sensors that may be involved in the running of the application may include: a gyro sensor 180B, an acceleration sensor 180E, and the like.
As shown in fig. 1, output devices such as a display 194, speaker 170A, and motor 191.
The terminal device may also include other output devices not shown in fig. 1.
Since the call of the application program to the display screen is usually prohibited after the terminal device enters the off-screen state, the output device for prohibiting the call of the target application program in the first processing operation may also not include a display.
It can be understood that whether the output device for prohibiting the target application from invoking includes a display in the first processing operation described above does not affect the implementation of the embodiments of the present application.
The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering.
Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
The processor 110 is further configured to perform a third processing operation when it is determined that the average network data transmission rate is less than the preset network speed threshold, the third processing operation including at least one of:
disabling the target application from invoking the sensor, disabling the target application from invoking the output device, or shutting down processing functions of the GPU.
The third processing operation performed by the processor 110 and the descriptions of the sensors and the output devices have been described in the above embodiments, and are not described herein.
The processor 110 is further configured to terminate the target application program when it is determined that the average value of the operating electrical parameter of the terminal device in the first preset time period is greater than a sixth preset parameter threshold;
or alternatively, the process may be performed,
and when the current operation electric parameter of the terminal equipment is determined to be larger than a seventh preset parameter threshold value, terminating the target application program.
In one possible implementation, the operating electrical parameter includes at least one of:
the temperature of the electrical components in the terminal device, the battery current of the terminal device, the power consumption when the target application is running, or the current of the terminal device required when the target application is running.
In some possible implementations, the temperature of the electrical components in the terminal device may include the temperature of the processor.
As shown in fig. 1, a temperature sensor 180J is used to acquire the temperature of the processor.
In some possible implementations, the terminal device may include a plurality of temperature sensors for acquiring temperatures of the plurality of electrical elements, respectively; and sends the acquired temperature to the processor 110. The processor 110 terminates all or part of the application to reduce power consumption of the terminal device when it is determined from the detection result that the temperature of the battery 142 exceeds the threshold.
In some possible implementations, the temperature of the electrical components in the terminal device may include the temperature of the battery.
As shown in fig. 1, the power management module 141 is configured to obtain the temperature of the battery and send the obtained temperature to the processor 110. The processor 110 terminates all or part of the application to reduce power consumption of the terminal device when it is determined from the detection result that the temperature of the battery 142 exceeds the threshold.
In this embodiment, the structure of the terminal device, the connection relationship between the structures, the functions that can be implemented, and the technical effects that can be achieved are all described in the above embodiment, and in order to avoid repetition, the description of this embodiment is omitted here.
The type of the terminal device is not particularly limited, and the terminal device may be a mobile phone, a notebook computer, a wearable electronic device (e.g., a smart watch), a tablet computer, an augmented reality (augmented reality, AR) device, a Virtual Reality (VR) device, or the like.
The terminal device also comprises a memory, for example an internal memory 121 as shown in fig. 1.
The memory stores code and the processor is used for calling the code stored in the memory and executing any application program management method.
The memory may include volatile memory, random Access Memory (RAM), and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM), among other forms in computer readable media, the memory including at least one memory chip.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. The apparatus embodiments described above are merely illustrative, wherein the units and modules illustrated as separate components may or may not be physically separate. In addition, some or all of the units and modules can be selected according to actual needs to achieve the purpose of the embodiment scheme. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
The foregoing is merely exemplary of the application and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the application and are intended to be comprehended within the scope of the application.

Claims (32)

1. An application management method, the method comprising:
when the terminal equipment is determined to enter a screen-off state, acquiring network transmission data of a target application program;
determining whether a user data packet protocol UDP data packet exists in the network transmission data;
when the UDP data packet exists in the network transmission data, determining whether the average network data transmission rate of the target application program in a first preset time period is smaller than a preset network speed threshold value or not;
and when the average network data transmission rate is determined to be smaller than the preset network speed threshold value, maintaining the network connection of the target application program.
2. The method of claim 1, wherein when the terminal device is determined to enter an off-screen state, the method further comprises:
acquiring the operation electric parameters of the terminal equipment in real time;
and terminating the target application program when the operation electric parameter is determined to be larger than a first preset parameter threshold value.
3. The method of claim 1, wherein when it is determined that the UDP packet is not present in the network transport data, the method further comprises:
performing a first processing operation, the first processing operation comprising at least one of:
the method comprises the steps of prohibiting the target application program from performing network connection, prohibiting the target application program from calling a sensor, prohibiting the target application program from calling an output device, or shutting down the processing function of the GPU.
4. The method according to claim 1, wherein said determining whether said UDP packet is present in said network transport data comprises:
performing a first preset number of determining operations, wherein the determining operations are to determine whether the UDP data packet exists in the network transmission data;
when the result of the determining operation with the second preset times in the determining operation with the first preset times is that the UDP data packet exists in the network transmission data, determining that the UDP data packet exists in the network transmission data;
wherein the second preset times is less than or equal to the first preset times.
5. The method of claim 4, wherein the performing the first predetermined number of determinations specifically includes:
And carrying out the determining operation of the first preset times according to the first preset time interval.
6. The method according to claim 1, wherein said determining whether said UDP packet is present in said network transport data comprises:
determining whether the UDP data packet exists in the network transmission data;
when the UDP data packet does not exist in the network transmission data, determining that the UDP data packet does not exist in the network transmission data;
when the UDP data packet exists in the network transmission data, carrying out a first preset times of determining operation, wherein the determining operation is to determine whether the UDP data packet exists in the network transmission data;
when the result of the determining operation with the second preset times in the determining operation with the first preset times is that the UDP data packet exists in the network transmission data, determining that the UDP data packet exists in the network transmission data;
wherein the second preset times is less than or equal to the first preset times.
7. The method according to any one of claims 4 to 6, further comprising:
when the result of the determination operation of the first preset times is that the UDP packet is not present in the network transmission data, a first processing operation is performed, where the first processing operation includes at least one of the following:
The method comprises the steps of prohibiting the target application program from performing network connection, prohibiting the target application program from calling a sensor, prohibiting the target application program from calling an output device, or shutting down the processing function of the GPU.
8. The method according to claim 4, wherein the method further comprises:
terminating the target application program when the average value of the running electric parameters of the terminal equipment in the first preset time period is determined to be larger than a second preset parameter threshold value;
or alternatively, the process may be performed,
and when the current operation electric parameter of the terminal equipment is determined to be larger than a third preset parameter threshold value, terminating the target application program.
9. The method of claim 1, wherein when it is determined that the average network data transmission rate is greater than or equal to the preset network speed threshold, the method further comprises:
performing a second processing operation, the second processing operation comprising at least one of:
the method comprises the steps of prohibiting the target application program from performing network connection, prohibiting the target application program from calling a sensor, prohibiting the target application program from calling an output device, or shutting down the processing function of the GPU.
10. The method according to claim 9, wherein the method further comprises:
Terminating the target application program when the average value of the running electric parameters of the terminal equipment in the first preset time period is determined to be larger than a fourth preset parameter threshold value;
or alternatively, the process may be performed,
and when the current operation electric parameter of the terminal equipment is determined to be larger than a fifth preset parameter threshold value, terminating the target application program.
11. The method of claim 1, wherein when it is determined that the average network data transmission rate is less than the preset network speed threshold, the method further comprises:
performing a third processing operation, the third processing operation comprising at least one of:
disabling the target application from invoking the sensor, disabling the target application from invoking the output device, or shutting down processing functions of the graphics processor GPU.
12. The method of claim 11, wherein the method further comprises:
terminating the target application program when the average value of the running electric parameters of the terminal equipment in the first preset time period is determined to be larger than a sixth preset parameter threshold value;
or alternatively, the process may be performed,
and when the current operation electric parameter of the terminal equipment is determined to be larger than a seventh preset parameter threshold value, terminating the target application program.
13. The method of claim 1, wherein prior to maintaining the network connection of the target application, the method further comprises:
prohibiting the target application program from transmitting network data based on non-UDP;
when it is determined that there is network transmission data of the target application program based on UDP, network connection of the target application program is maintained.
14. The method according to claim 13, wherein said determining that network transmission data of said target application exists, in particular, comprises:
performing a third preset number of determining operations, wherein the determining operations are to determine whether the UDP data packet exists in the network transmission data;
and when the result of the third preset times of determining operation is that the UDP data packet exists in the network transmission data, determining that the network transmission data of the target application program exists, wherein the fourth preset times are smaller than or equal to the third preset times.
15. The method according to claim 13 or 14, wherein when it is determined that there is no UDP based network transport data for the target application, the method further comprises:
Terminating the target application.
16. The method of claim 13, wherein when it is determined that there is no UDP-based network transport data for the target application, the method further comprises:
maintaining a network connection of the target application;
performing a fourth processing operation, the fourth processing operation comprising at least one of:
disabling the target application from invoking the sensor, disabling the target application from invoking the output device, or shutting down processing functions of the graphics processor GPU.
17. The method of claim 16, wherein the method further comprises:
terminating the target application program when the average value of the running electric parameters of the terminal equipment in the first preset time period is determined to be larger than an eighth preset parameter threshold value;
or alternatively, the process may be performed,
and when the current operation electric parameter of the terminal equipment is determined to be larger than a ninth preset parameter threshold value, terminating the target application program.
18. The method of any one of claims 2, 8, 10, 12, or 17, the operating electrical parameter comprising at least one of:
the temperature of the electrical components in the terminal device, the battery current of the terminal device, the power consumption when the target application is running, or the current of the terminal device required when the target application is running.
19. The method of claim 18, wherein when the operating electrical parameter comprises a temperature of an electrical component in the terminal device, the electrical component is a battery of the terminal device or a processor of the terminal device.
20. An application management system, the system comprising: the device comprises a data acquisition unit, a first determination unit, a second determination unit and a processing unit;
the data acquisition unit is used for acquiring network transmission data of a target application program when the terminal equipment is determined to enter an off-screen state;
the first determining unit is configured to determine whether a user data packet protocol UDP packet exists in the network transmission data;
the second determining unit is configured to determine, when it is determined that the UDP packet exists in the network transmission data, whether an average network data transmission rate of the target application program in the first preset period of time is less than a preset network speed threshold;
the processing unit is configured to maintain network connection of the target application program when it is determined that the average network data transmission rate is less than the preset network speed threshold.
21. The system of claim 20, wherein the processing unit is further configured to:
When it is determined that the UDP packet is not present in the network transmission data, performing a first processing operation, where the first processing operation includes at least one of:
the method comprises the steps of prohibiting the target application program from performing network connection, prohibiting the target application program from calling a sensor, prohibiting the target application program from calling an output device, or shutting down the processing function of the GPU.
22. The system of claim 20, wherein the first determining unit is further configured to:
determining whether the UDP data packet exists in the network transmission data;
when the UDP data packet does not exist in the network transmission data, determining that the UDP data packet does not exist in the network transmission data;
when the UDP data packet exists in the network transmission data, carrying out a first preset times of determining operation, wherein the determining operation is to determine whether the UDP data packet exists in the network transmission data;
when the result of the determining operation with the second preset times in the determining operation with the first preset times is that the UDP data packet exists in the network transmission data, determining that the UDP data packet exists in the network transmission data;
Wherein the second preset times is less than or equal to the first preset times.
23. The system of claim 20, wherein the processing unit is further configured to:
when the average network data transmission rate is determined to be less than the preset network speed threshold, performing a third processing operation, wherein the third processing operation comprises at least one of the following steps:
disabling the target application from invoking the sensor, disabling the target application from invoking the output device, or shutting down processing functions of the graphics processor GPU.
24. The system of claim 23, wherein the processing unit is further configured to: terminating the target application program when the average value of the running electric parameters of the terminal equipment in the first preset time period is determined to be larger than a sixth preset parameter threshold value;
or alternatively, the process may be performed,
and when the current operation electric parameter of the terminal equipment is determined to be larger than a seventh preset parameter threshold value, terminating the target application program.
25. A terminal device, the terminal device comprising a processor and a display screen, the processor configured to:
when the display screen is determined to enter a screen-off state, acquiring network transmission data of a target application program;
Determining whether a user data packet protocol UDP data packet exists in the network transmission data;
when the UDP data packet exists in the network transmission data, determining whether the average network data transmission rate of the target application program in a first preset time period is smaller than a preset network speed threshold value or not;
and when the average network data transmission rate is determined to be smaller than the preset network speed threshold value, maintaining the network connection of the target application program.
26. The terminal device of claim 25, wherein the terminal device further comprises a sensor, an output device, and an image processor GPU, wherein the processor is further configured to:
when it is determined that the UDP packet is not present in the network transmission data, performing a first processing operation, the first processing operation including at least one of:
the target application program is prohibited from performing network connection, the target application program is prohibited from calling the sensor, the target application program is prohibited from calling the output device, or the processing function of the GPU is turned off.
27. The terminal device of claim 25, wherein the terminal device further comprises a sensor, an output device, and an image processor GPU, wherein the processor is further configured to:
When the average network data transmission rate is determined to be less than the preset network speed threshold, performing a third processing operation, wherein the third processing operation comprises at least one of the following steps:
disabling the target application from invoking the sensor, disabling the target application from invoking the output device, or shutting down processing functions of the GPU.
28. The terminal device of claim 27, wherein the processor is further configured to:
terminating the target application program when the average value of the running electric parameters of the terminal equipment in the first preset time period is determined to be larger than a sixth preset parameter threshold value;
or alternatively, the process may be performed,
and when the current operation electric parameter of the terminal equipment is determined to be larger than a seventh preset parameter threshold value, terminating the target application program.
29. The terminal device of claim 28, wherein the operational electrical parameter comprises at least one of:
the temperature of the electrical components in the terminal device, the battery current of the terminal device, the power consumption when the target application is running, or the current of the terminal device required when the target application is running.
30. The terminal device of claim 29, wherein the temperature of the electrical component in the terminal device is a temperature of a battery, the terminal device further comprising a battery management module, wherein:
The battery management module is used for acquiring the temperature of the battery.
31. The terminal device of claim 29, wherein the temperature of the electrical component in the terminal device is the temperature of the processor, the terminal device further comprising a temperature sensor, wherein:
the temperature sensor is used for acquiring the temperature of the processor.
32. A terminal device, characterized in that the terminal device comprises a processor and a memory, wherein the memory stores code, and the processor is adapted to invoke the code stored in the memory for performing the method according to any of claims 1-19.
CN202210010740.8A 2022-01-05 2022-01-05 Application program management method, application program management system and terminal equipment Active CN115529260B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210010740.8A CN115529260B (en) 2022-01-05 2022-01-05 Application program management method, application program management system and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210010740.8A CN115529260B (en) 2022-01-05 2022-01-05 Application program management method, application program management system and terminal equipment

Publications (2)

Publication Number Publication Date
CN115529260A CN115529260A (en) 2022-12-27
CN115529260B true CN115529260B (en) 2023-07-14

Family

ID=84694295

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210010740.8A Active CN115529260B (en) 2022-01-05 2022-01-05 Application program management method, application program management system and terminal equipment

Country Status (1)

Country Link
CN (1) CN115529260B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109388222A (en) * 2017-08-04 2019-02-26 中兴通讯股份有限公司 Power-saving processing method, device and mobile terminal and computer readable storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114650589A (en) * 2019-03-09 2022-06-21 荣耀终端有限公司 Network connection processing method, related equipment and computer storage medium
CN110049525A (en) * 2019-04-08 2019-07-23 Oppo广东移动通信有限公司 Method for connecting network, device, electronic equipment and medium
US11087584B2 (en) * 2019-10-10 2021-08-10 Igt Gaming systems and methods for alternating the presentation of live events
CN112822742A (en) * 2021-02-01 2021-05-18 联想(北京)有限公司 Processing method and device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109388222A (en) * 2017-08-04 2019-02-26 中兴通讯股份有限公司 Power-saving processing method, device and mobile terminal and computer readable storage medium

Also Published As

Publication number Publication date
CN115529260A (en) 2022-12-27

Similar Documents

Publication Publication Date Title
CN111494965B (en) Information processing method, device, equipment and storage medium
WO2018077041A1 (en) Method and apparatus for running application
CN113313804B (en) Image rendering method and device, electronic equipment and storage medium
EP4345669A1 (en) User privacy protection method and apparatus
CN116010076A (en) Application running method and related equipment
CN114237646A (en) Game trial playing method and related device
US11729277B2 (en) Apparatus and method for controlling application relocation in edge computing environment
CN113144622A (en) Node switching method, device, equipment and computer readable storage medium
CN115529260B (en) Application program management method, application program management system and terminal equipment
CN111682983A (en) Interface display method and device, terminal and server
CN112188268B (en) Virtual scene display method, virtual scene introduction video generation method and device
CN113051015B (en) Page rendering method and device, electronic equipment and storage medium
CN114500732B (en) Interface display method, electronic equipment and storage medium
CN116661584B (en) Resource scheduling method and related equipment
CN116672707B (en) Method and electronic device for generating game prediction frame
WO2022188766A1 (en) Application display method and electronic device
CN116048544B (en) Processing method of popup advertisement, electronic equipment and readable storage medium
CN115767602B (en) Automatic error correction method for equipment protocol subsystem abnormality and electronic equipment
CN116382896B (en) Calling method of image processing algorithm, terminal equipment, medium and product
CN115175164B (en) Communication control method and related device
CN116048350B (en) Screen capturing method and electronic equipment
CN116074615B (en) Camera control method and device and terminal equipment
CN114596819B (en) Brightness adjusting method and related device
CN113536387B (en) Terminal and method for detecting integrity of kernel data
CN117149321A (en) Game interaction method and device based on multi-device cooperation 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
GR01 Patent grant