CN116055546A - Process management method, electronic device, storage medium, and program product - Google Patents
Process management method, electronic device, storage medium, and program product Download PDFInfo
- Publication number
- CN116055546A CN116055546A CN202210862434.7A CN202210862434A CN116055546A CN 116055546 A CN116055546 A CN 116055546A CN 202210862434 A CN202210862434 A CN 202210862434A CN 116055546 A CN116055546 A CN 116055546A
- Authority
- CN
- China
- Prior art keywords
- network
- electronic device
- socket
- type
- module
- 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.)
- Pending
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/143—Termination or inactivation of sessions, e.g. event-controlled end of session
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
- G06F9/5055—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering software capabilities, i.e. software resources associated or available to the machine
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0876—Network utilisation, e.g. volume of load or congestion level
- H04L43/0888—Throughput
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Environmental & Geological Engineering (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
The application relates to the technical field of terminals and discloses a process management method, electronic equipment, a storage medium and a program product. The method comprises the following steps: collecting first information of each process under the current application within a preset duration; judging whether the process is a first type process or not according to the first information; if the process is judged to be the first type of process, process management and control are carried out on the first type of process; wherein the first information comprises network access data of processes, and the first type of processes comprises processes which do not affect the running of the current application. Based on the process management scheme, whether the process is the first type process can be further determined by collecting information of the currently applied process, and after the process is determined to be the first type process, the process is controlled, so that the situation that the part of processes occupy hardware resources of the electronic equipment is avoided, the energy consumption and network resources of the electronic equipment are saved, and the performance of the electronic equipment is improved.
Description
Technical Field
The present invention relates to the field of terminal technologies, and in particular, to a process management method, an electronic device, a storage medium, and a program product.
Background
Application programs are typically run with multiple processes to implement the functions associated with the application program, e.g., for video playback applications, video may be played through a playback process, media stream data may be downloaded through a download process, etc. However, when the user does not use a part of the functions of the application program any more, the process corresponding to the part of the functions is not released immediately, so that the process corresponding to the part of the functions continues to occupy the resources of the terminal equipment, and the user experience is affected. For example, in a video playing application, media stream data corresponding to a video is generally transmitted in a centralized manner on a socket, different videos are transmitted through different sockets, when a user watches a next video, the video playing application creates a socket to transmit the next video, and the socket corresponding to the last video cannot be released immediately and continues to occupy network resources and processor resources of a terminal device, so that performance of the terminal device is affected.
Disclosure of Invention
In view of this, embodiments of the present application provide a process management method, an electronic device, a storage medium, and a program product. By managing and controlling the processes/sockets of the application program, which do not affect the current functions of the application program, the processes are prevented from occupying hardware resources of the electronic equipment, so that the energy consumption and network resources of the electronic equipment are saved, and the performance of the electronic equipment is improved.
In a first aspect, an embodiment of the present application provides a process management method, including: collecting first information of each process under the current application within a preset duration; judging whether the process is a first type process or not according to the first information; if the process is judged to be the first type process, process management and control are carried out on the first type process; wherein the first information comprises network access data of processes, and the first type of process comprises processes which do not affect the running of the current application.
Based on the above process management scheme, the first type of process (such as the network non-key process below) is determined according to the collected first information (such as the data transmission amount below) of the process, and the first type of process is controlled, so that the normal operation of the current application is ensured, and meanwhile, the situation that the process which has no influence on the operation of the current application occupies more network resources or hardware resources is avoided, thereby being beneficial to improving the performance of the electronic equipment, saving the network resources consumed by the electronic equipment and improving the user experience.
In one possible implementation, after the process management and control is performed on the first type of process, if an abnormal event is detected, the process management and control performed on the first type of process is canceled; wherein the exception event comprises at least one of the following events: the packet loss rate of the current application is increased, the retransmission rate of the current application is increased, the network of the current application is stuck, and the quantity of sockets or the data quantity corresponding to the current application is increased.
Although the process control aims at the process which does not influence the running of the current application, various abnormal events caused by control still can occur, the application is monitored, the abnormal events are discovered immediately, the process control strategy can be adjusted immediately, and more or more serious abnormal problems are avoided.
In one possible implementation, the collecting the first information of each process under the current application in the preset time period includes: monitoring each process of the current application within a preset time length; first information of a process is obtained.
By monitoring each process of the current application and setting the monitoring time length, the instant information of the processes can be acquired so as to determine whether each process is a first type process.
In one possible implementation, performing process control on the first type of process includes: network limiting the first class of processes, the network limiting including at least one of: inhibit access to the network, limit the speed of access to the network, limit the frequency of access to the network; or closing the first type of process.
If the process is determined to be the first type of process, which indicates that the process has no influence on the normal running of the current application, the process can be controlled in a network limiting mode or a process closing mode so as to save the unnecessarily occupied network resources.
In one possible implementation, the network access data further includes a data transmission amount of the process.
It is possible to determine whether the process is a first type of process by collecting the data transfer amount of the process.
In one possible implementation, determining whether the process is a first type of process according to the first information includes: comparing the size relation between the data transmission quantity of the process and the first threshold value; and if the data transmission quantity of the process is smaller than the first threshold value, judging that the process is a first type process.
Through the acquired data transmission quantity of the process and the magnitude relation of the first threshold value, whether the process is a first type process can be judged, if the data transmission quantity is smaller than the first threshold value, the process is the first type process, namely, a network non-key process, and the normal use of the current application is not influenced.
In one possible implementation, determining whether the process is a first type of process according to the first information further includes: if the process is judged not to be the first type of process, collecting the data transmission quantity of each socket in the process; comparing the size relation between the data transmission quantity of the socket and the second threshold value; and if the data transmission quantity of the first socket is smaller than the second threshold value, performing network management and control on the first socket.
If the data transmission amount of the process is greater than the first threshold, the process is not the first type of process, namely the process is a network key process, and the normal use of the current application is greatly influenced. And further acquiring the data transmission quantity of all the sockets in the process, and if the data transmission quantity of the first socket is smaller than a second threshold value, determining that the first socket is a network non-key socket and has no influence on the normal operation of the current process.
In one possible implementation, network management of the first socket includes: network restriction is performed on the first socket, wherein the network restriction comprises at least one of the following modes: inhibit access to the network, limit the speed of access to the network, limit the frequency of access to the network; or close the first socket.
If the socket is determined to be a network non-key socket, the socket is subjected to network limitation, and the network management and control form can comprise a mode of adopting network limitation or a mode of closing the socket. By performing network management and control on the socket, network resources can be further saved, and the performance of the terminal equipment is improved.
In a second aspect, an embodiment of the present application provides an electronic device, including: a memory for storing instructions for execution by one or more processors of the electronic device, and the processor being one of the processors of the electronic device, for executing the instructions to cause the electronic device to implement the above-described first aspect and the various possible implementations of the above-described first aspect to provide a process management method.
In a third aspect, embodiments of the present application provide a readable storage medium having stored thereon instructions that, when executed on an electronic device, cause the electronic device to implement the above first aspect and various possible implementations of the above first aspect to provide a process management method.
In a fourth aspect, embodiments of the present application provide a computer program product comprising instructions that, when executed on an electronic device, cause the electronic device to implement the above-described first aspect and the various possible implementations of the above-described first aspect to provide a process management method.
Drawings
FIG. 1 illustrates a usage scenario diagram of a foreground application, according to some embodiments of the present application;
fig. 2 illustrates a process and socket schematic diagram corresponding to an online video App in the scenario illustrated in fig. 1 according to some embodiments of the present application;
FIG. 3 illustrates a usage scenario diagram of another foreground application, according to some embodiments of the present application;
FIG. 4 illustrates a relationship diagram of a process of a foreground application, a network non-critical process, and a network critical process, according to some embodiments of the present application;
FIG. 5 illustrates a software architecture diagram of an electronic device 10, according to some embodiments of the present application;
FIG. 6 illustrates a schematic diagram of an electronic device 10 managing the progress of a foreground application based on the software architecture shown in FIG. 5, in accordance with some embodiments of the present application;
FIG. 7 illustrates an interaction diagram of a process management method, according to some embodiments of the present application;
FIG. 8A is a schematic diagram illustrating power usage of the electronic device 10 during 12 minutes without managing network non-critical processes of the online video APP, according to some embodiments of the present application;
fig. 8B is a schematic diagram illustrating an electrical power usage situation of the electronic device 10 within 12 minutes when a network non-critical process of the online video APP is managed according to the process management method provided in embodiments of the present application according to some embodiments of the present application;
fig. 9 illustrates a schematic structural diagram of an electronic device 10, according to some embodiments of the present application.
Detailed Description
Illustrative embodiments of the present application include, but are not limited to, process management methods, electronic devices, storage media, and program products.
In order to more clearly understand the schemes in the embodiments of the present application, some terms related to the embodiments of the present application will be explained first.
Media stream: and a streaming mode is adopted, so that the streaming media is played on the Internet. Audio, video or multimedia files transmitted over a network do not download the entire file before playing, but the data stream is transmitted at any time and played at any time, with some delay at the beginning. By adopting the streaming media technology, services such as video on demand, audio on demand, MTV playing, concert playing, music appreciation, multimedia advertisement release and the like can be provided.
Process (Process): an instance of a running program, i.e., a running activity of a program with a certain independent function with respect to a certain data set, is a basic unit that the operating system dynamically executes. As an entity, each process has its own address space, typically including a text region (text region) for storing code for execution by the processor, a data region (data region) for storing variables and dynamically allocated memory used during process execution, and a stack (stack region) for storing instructions for active procedure calls and local variables.
Foreground application: refers to an application program in the electronic device that is currently interacting with a user, for example, an application program in a display screen of the current electronic device, where a User Interface (UI) is displayed, such as an application program that plays a video when the user views the video, an application program that displays a text when the user reads a text, an application program that plays a song when the user listens to a song, and so on.
Process identification number (PID): i.e. a process identifier. A program is not opened in the operating system to create a process ID, namely PID, which refers to the code of the process, each process has a unique PID number, which is allocated by the process runtime system, the PID does not change the identifier during runtime, but the PID identifier is recovered by the system after the process is terminated and may be continued to be allocated to the newly running program.
Socket (socket): an abstraction of the endpoints that communicate bi-directionally between application processes on different hosts in a network. One socket is the end of the network where processes communicate, providing a mechanism for application layer processes to exchange data using network protocols. In terms of the position, the socket is connected with the application process in an upper mode, and the socket is connected with the network protocol stack in a lower mode, so that the socket is an interface for the application program to communicate through the network protocol, and is an interface for the application program to interact with the network protocol stack.
The following describes the technical solution of the present application in detail with reference to fig. 1 to 9.
In some embodiments, the methods provided by embodiments of the present application are applicable to any application program process, including, but not limited to, system application program processes of operating systems such as iOS, android, hong, WP, saint, and the like, and foreground application program processes of connectivity applications, business applications, lifestyle applications, entertainment applications, and the like.
Fig. 1 illustrates a scene graph of an application program for use on an electronic device 10, such as a cell phone, according to some embodiments of the present application.
As shown in fig. 1, when an online video App is started by the electronic device 10 to play a video, an operating system of the electronic device 10 will create a plurality of processes for the online video App, such as a UI main process tv. The UI main process is used to maintain a basic function of the online video APP (for example, display, adjust an interface displayed by the online video APP in the electronic device 10), the background download process is used to download relevant data of the online video APP, the buffer play process is used to buffer and play a video currently watched by a user, the push process is used to receive a message (for example, an advertisement message, a video resource message, etc.) pushed by a server of the online video APP, and the web page process is used to provide a function that the user accesses a web page through the online video APP.
In the above processes, not all processes are related to the functions of the online video App currently used by the user, for example, when the user views the video on the interface shown in fig. 1, the processes actually used are only the buffer play process, and the UI main process, the background download process, the push process and the web page process are not related to the video play functions currently used by the user. However, the operating system of the electronic device 10 does not manage the processes unrelated to the video playing function, so that the part of processes continue to occupy the resources of the electronic device 10, such as occupying the network resources of the electronic device 10, and the performance and the user experience of the electronic device 10 are affected.
Specifically, table 1 shows a comparison table of network data amounts used by the above processes before and after the user plays the video shown in fig. 1. As shown in table 1, the buffer play process is a process corresponding to the video play function currently used by the user, using 22,987,45 byte network data, while the background download process and the push process are not related to the video play function currently used by the user, and still use 152,463 byte data and 145,325byte data respectively, so as to occupy network resources of the electronic device 10 and affect user experience.
Table 1:
further, for each process of an application, different network data is typically accessed through different sockets or in response to different network usage requests by the user.
For example, fig. 2 shows a process and socket schematic diagram corresponding to an online video App in the scenario shown in fig. 1 according to some embodiments of the present application. The PIDs corresponding to the cache playing process, the background downloading process, the UI main process, the push process and the web page process are 10001, 10002, 10003, 10004 and 10005 respectively.
Referring to fig. 2, the buffer play process (i.e., the process with PID of 10001) includes 4 sockets (i.e., socket1-1, socket1-2, socket1-3, and socket 1-4), and corresponds to the access interfaces of the 4 videos recently played by the user, respectively, even if the data transmission is only performed in socket1-4 when the user plays the video shown in fig. 1, the other sockets 1-1, socket1-2, socket1-3 will not be released, and still occupy network resources and hardware resources, resulting in waste of network resources and hardware resources, and affecting the user experience.
In order to solve the above-mentioned problems, the present embodiment provides a process management method, where the electronic device 10 determines, in a case where a foreground application can access a network resource, a process and/or a socket (hereinafter referred to as a network non-critical process/socket) that are not related to a function currently used by a user in each process corresponding to the foreground application, and manages the partial process, for example, limits the partial process or socket from accessing the network resource or closes the partial process or socket. In this way, processes unrelated to the currently used functions of the user can be reduced or avoided from occupying network resources or hardware resources of the electronic device 10, which is beneficial to improving performance of the electronic device 10, saving network resources consumed by the electronic device 10 and improving user experience.
It will be appreciated that in some embodiments, the network critical process/socket may be a process/socket that transmits an amount of data within a predetermined time to reach a preset threshold, while the remaining processes/sockets may be network non-critical processes/sockets. The process and socket may be set with the same preset threshold or different preset thresholds, which is not limited herein.
It will be appreciated that the above-described management of non-critical processes/sockets of the network includes, but is not limited to, prohibiting access to the network, limiting the speed of accessing the network, shutting down processes, limiting the frequency of accessing the network, etc.
It may be appreciated that, in some embodiments, the electronic device 10 may determine a network non-critical process/socket in each process corresponding to the foreground application and manage and control the part of the processes when detecting that the user switches the foreground application on the electronic device 10, or that a function of the foreground application changes, or that a process of the foreground application changes.
For example, after the user clicks the full-screen playing control 101 in the online video App of fig. 1, the electronic device 10 may display the full-screen playing interface shown in fig. 3, at this time, with reference to fig. 1, compared with the process shown in fig. 1, a process corresponding to the online video App is added with a binder process, that is, the process and the function of the online video App are changed, and the electronic device 10 determines that only the buffer playing process is a network key process, and by limiting the other five processes to access network resources, it can be avoided that a process that has no influence on playing the video by the user occupies unnecessary network resources.
Specifically, referring to fig. 4, in some embodiments, assuming that the process set of the online video App is a, the electronic device 10 may determine the network critical process set B and the network non-critical process set C based on the condition that each process accesses the network resource, and limit the network usage of the network non-critical process set C. As shown in table 2, in the scenario shown in fig. 3, the online video App corresponds to six processes, where the main role of the buffer play process is to buffer video data and play online, and the main role of the background download process is to download video data. For example, it is assumed that the data transmission amount of the buffer play process in the preset time is 22900000byte and is greater than 5000000byte, so that the buffer play process is determined to be a network critical process, and the data transmission amount of the other processes is less than 5000000byte, so that the buffer play process is determined to be a network non-critical process. That is, the set a includes the above 6 processes, while the network key process set B includes the buffer play process, and the network non-key process set C includes the UI main process, the background download process, the web page process, the push process, and the binder process. The electronic device 10 may restrict network access to individual processes in the set of network non-critical processes C.
Table 2:
it will be appreciated that in some embodiments, limiting the network of processes in the network non-critical process set C may cause an application to be abnormal, such as an increase in packet loss rate, retransmission rate, a sudden increase in the number of sockets or data volume, a load state change, and other anomalies in the application. After detecting the abnormal event, the electronic device 10 may adjust the control of each process in the network non-critical process set C, for example, allow each process in the network non-critical process set C to access the network, improve the upper limit of network speed that each process in the network non-critical process set C may use, so as to avoid that the control affects the user experience. For example, the electronic device 10 may cancel the network restrictions on all the network non-critical processes, or may gradually cancel the network restrictions on the network non-critical processes until the anomaly disappears, which is not limited herein.
To facilitate understanding of the technical solutions of the embodiments of the present application, the following describes the software structure of the electronic device 10.
Fig. 5 is a software configuration block diagram of the electronic device 10 of the embodiment of the present invention.
The software architecture of the electronic device 10 may include several layers, each with distinct roles and branches. The layers communicate with each other through a software interface. For example, in Android TM The system is exemplified by the software architecture of the electronic device 10The system is divided into four layers, namely an application layer 01, an application framework layer 02, a system runtime 03 and a kernel layer 04 from top to bottom.
The application layer 01 may include one or more foreground applications 011, a listening module 012, an identification module 013, and a management module 014.
The foreground application 011 may be any application program in the electronic device 10, such as the online video APP described above; the monitoring module 012 performs network monitoring on the application program to determine whether the foreground application accesses the network resource; an identification module 022, configured to determine a network key process and a network non-key process corresponding to a foreground application when the foreground application accesses a network; a management module 014 is configured to manage non-critical processes of the network of the foreground application, such as limiting or restoring the network of non-critical processes.
The application framework layer 02 provides an application programming interface (Application programming interface, API) and programming framework for the application of the application layer 01. The application framework layer includes a number of predefined functions.
For example, in some embodiments, the application framework layer 02 exception identification module 021. The anomaly identification module 021 is configured to detect whether an anomaly event occurs due to network connection management of a network non-critical process after the network connection management of the network non-critical process, and send anomaly information to the management and control module 014 after the anomaly event occurs.
The system runtime layer 03 may include a communication module 031 that provides a transport service between the session layer and the network layer, transceives network data from the application framework layer 02, and segments the data as necessary. The communication module 031 then passes the data to the kernel layer 04 and ensures that the data can be transferred to the kernel layer correctly. The communication module 031 is responsible for providing reliable transfer of data between two nodes, and after the contact of the two nodes is determined, the communication module 031 is responsible for supervising the task.
The kernel layer 04 is a layer between hardware and software of the electronic device 10.
In some embodiments, the kernel layer 04 may include a network data acquisition module 041 and a network driver 042.
The network data acquisition module 043 responds to the instruction of the monitoring module 023 to start network data monitoring for the foreground application and records the network resource use condition of each process/socket; the network driver 042 is configured to perform process management and control on a non-critical process of the network based on an instruction of the management and control module 014;
it should be understood that the software architecture of the electronic device 10 shown in fig. 5 is only an example, and in other embodiments, the software architecture of the electronic device 10 may include more or fewer modules, and other software architectures may be used, which are not limited herein.
Further, fig. 6 illustrates a schematic diagram of the electronic device 10 managing the process of a foreground application based on the software architecture shown in fig. 5, in accordance with some embodiments of the present application.
As shown in fig. 6: the management of the process of the foreground application by the electronic device 10 may include the steps of:
s601: the listening module 012 detects whether the foreground application 011 uses network resources. If so, the process control can be performed on the foreground application, and the process goes to step S602, otherwise, the process control is not required on the foreground application, and the monitoring module 012 sends the information that the foreground application does not use the network resource to the control module 014, so that the control module 014 does not need to perform the process control on the process of the foreground application 011.
S602: the listening module 012 initiates network listening.
The monitor module 012 starts network monitor when detecting that the foreground application 011 is using network resources. For example, the listening module 012 may send an instruction to start a network to the network data collection module 041, so that the network data collection module 041 may listen to and record network usage of processes/sockets of the foreground application 011.
S603: the network data acquisition module 041 acquires the data transmission amount of each process/socket and transmits the data transmission amount to the identification module 013.
The network data acquisition module 041 acquires the data transmission amount of each process and transmits the data transmission amount to the identification module 013.
It may be appreciated that if there are multiple sockets in a certain process to perform network data transmission, the network data acquisition module 041 will acquire the data amounts transmitted by all the sockets respectively, and send the data amounts transmitted by each socket to the identification module 013.
S604: the identification module 013 determines whether the data transmission amount of the process/socket reaches a preset threshold.
Illustratively, the identification module 30 determines that there is a network key process if the data transmission amount of the process/socket reaches the preset threshold, and goes to step S605, otherwise goes to step S603 to continuously collect the network data transmission amount of each process/socket.
S605: the identification module 013 determines the network key process/socket and reports to the management and control module 014.
The identification module 013 determines the network key process/socket and reports to the management and control module 014.
It will be appreciated that, as previously described, a process or socket in which the amount of network data transferred within a preset time period reaches a preset threshold may be referred to as a network critical process or network critical socket. When the network data transmission amount of the process or socket reaches the preset threshold, the identification module 013 can determine the network key process/socket by the process/socket and report the network key process/socket to the management and control module 014.
S606: the policing module 014 determines policing policies and sends the policing policies to the network driver 042.
The policing module 014, upon receiving the network critical processes, may determine policing policies and send the policing policies to the network driver 042.
For example, the above-mentioned management and control policy may include the identifier of the network non-critical process/socket, and the management and control measures corresponding to the network non-critical process/socket corresponding to each identifier, including but not limited to prohibiting access to the network, ending the process, limiting the access speed, and so on.
For another example, the management and control module 014 may further include: process management and control of the network non-key process/socket which is already managed and controlled is canceled.
S607: the abnormality recognition module 021 detects an abnormality and sends abnormality information to the management and control module 014.
The abnormality identification module 021 may detect whether an abnormality occurs after the management and control module 014 manages the network non-critical process/socket, and send abnormality information to the management and control module if an abnormality is detected.
It will be appreciated that in some embodiments, the anomaly identification module 021 may determine that an anomaly is detected when an anomaly event is detected, such as an increase in the packet loss rate and retransmission rate, a sudden increase in the amount of socket or data, a load state change, and anomalies in other applications, and send anomaly information to the management and control module 014.
S608: the network driver 042 controls the process/socket process of the foreground application according to the control strategy.
The network driver 042 sends a management policy to manage and control the process/socket process of the foreground application according to the management and control module 014.
By the method, network resources or hardware resources of the electronic equipment 10 occupied by the network non-key process can be reduced under the condition that normal use of the foreground application is not affected, and the performance of the electronic equipment 10 is improved, the network resources consumed by the electronic equipment 10 are saved, and the user experience is improved.
The structure shown in fig. 5 further describes the technical solution of the present application in conjunction with the scenario shown in fig. 3.
Specifically, FIG. 7 illustrates an interaction diagram of a process management method, according to some embodiments of the present application. As shown in fig. 7, the interaction process may include the steps of:
s701: the listening module 012 detects whether the foreground application uses network resources.
If the monitoring module 012 detects that the foreground application uses the network resource, it indicates that the process control can be performed on the foreground application, and the process proceeds to step S702, otherwise, it indicates that the process control is not required on the foreground application, and the monitoring module 012 repeats step S701 to continue to perform detection.
It will be appreciated that in some embodiments, the listening module 012 may detect whether the foreground application uses network resources when a user switches the foreground application of the electronic device 10 or a process of the foreground application changes. For example, the electronic device 10 may detect whether the online video APP uses a network resource upon detecting that the user clicks on the full-screen play control 101 in fig. 1.
It will be appreciated that in some embodiments, in a case where there are a plurality of foreground applications, the listening module 012 may detect whether the plurality of foreground applications use network resources, and in a case where any foreground application uses network resources, go to step S702.
S702: the listening module 012 sends a listening instruction to the network data acquisition module 041.
The monitoring module 012 sends a monitoring command to the network data acquisition module 041 when detecting that a foreground application is using network resources, where the monitoring command may include an application identifier that needs to perform network monitoring.
S703: the network data acquisition module 041 acquires the data transmission amount of each process/socket and transmits the data transmission amount to the identification module 013.
After receiving the monitoring instruction, the network data acquisition module 041 acquires the data transmission quantity of each process/socket of the corresponding application program in the monitoring instruction and sends the data transmission quantity to the identification module 013. For example, the network data acquisition module 041 may acquire the data transmission amounts of 6 processes of the online video APP within a preset duration and send the data transmission amounts to the identification module 013; for another example, for a process including multiple sockets, the network data collection module 041 may also collect data transmission amounts of the respective sockets within a preset duration.
S704: the identification module 013 determines whether a network critical process is determined.
For example, the identification module 013 may start to perform process control if it determines that there is a network key process/socket, and go to step S705, otherwise go to step S703 to continue to collect the data transmission amount of each process/socket.
For example, if the data transmission amount of a process/socket network is greater than a preset threshold value within a preset duration, the process/socket is a network key process/socket. It will be appreciated that the preset threshold may be a plurality of preset thresholds, for example different for a process and socket device: and in the preset duration, if the network data transmission quantity of a certain process is greater than a first threshold value, the process is a network key process, and if the network data transmission quantity of a certain socket is greater than a second threshold value, the socket is a network key process socket. It can be understood that the preset duration, the first threshold and the second threshold can be adjusted in actual situations, for example, when the user watches the online video by using the mobile phone, the preset duration can be 20 seconds, the first threshold can be 40MB, the second threshold can be 10MB, and the specific ranges of the preset duration, the first threshold and the second threshold are not excessively limited.
S705: the identification module 013 sends the network key process/socket to the management and control module 013.
Illustratively, the identification module 013 may send the identification of the network critical processes/sockets determined in step S704 to the management and control module 014. For example, the identification module 013 may send the PID (10001) of the foregoing buffer playback process to the management module 013.
It will be appreciated that, in other embodiments, the identification module 013 may also send the identification of the non-critical process to the management module 014, for example, the identification module 013 may send the PIDs (10002, 10003, 10004, 10005) corresponding to the background download process, the UI main process, the push process, and the web page process described above to the management module 014, which is not limited herein.
S706: the policing module 014 determines policing policies and sends the policing policies to the network driver 042.
The policing module 014 will determine policing policies based on the received identification of network critical processes and/or identification of network non-critical processes and send the policing policies to the network driver 042. For example, the management and control module 014 sends management and control policies restricting access to the network by the background download process, UI master process, push process and web page process to the network driver 042 based on the received PIDs (10002, 10003, 10004 and 10005).
It may be appreciated that the above-mentioned management and control policy may include an identifier of a non-critical process/socket of the network, and management and control measures corresponding to the non-critical process/socket corresponding to the identifier, including, but not limited to, prohibiting access to the network, ending the process, limiting access speed, and the like.
S707: the network driver 042 manages the network non-critical processes/sockets according to the management and control policy.
The network driver 042 will manage non-critical processes/sockets according to the received management and control policy, including but not limited to prohibiting access to the network, ending processes, limiting access speed, etc. The means of management are not particularly limited here.
For example, the network driver 042 restricts the processes from accessing the network according to the received management policy that restricts the access of the background download process, the UI main process, the push process, and the web page process to the network.
S708: the abnormality recognition module 021 judges whether an abnormality is detected.
After the network driver 042 manages the use of the network resource, the abnormality recognition module 021 may further detect whether an abnormality occurs, and if an abnormality is detected, the control is indicated to affect the use of the foreground application, and the process goes to step S709, otherwise, the detection is continued by repeating S708.
For example, in some embodiments, the anomaly identification module 021 may further determine that an anomaly is detected when the aforementioned anomaly event (e.g., an increase in packet loss rate, retransmission rate, a sudden increase in the number of slots or data volume, a load state change, and an anomaly event of other applications) is detected, and go to step S709.
S709: the anomaly identification module 021 sends anomaly information to the management and control module 014.
The abnormality recognition module 021 sends abnormality information to the management and control module 014 when detecting an abnormality.
It will be appreciated that the anomaly information may be an indication of the occurrence of an anomaly, and may include the type, cause, etc. of the anomaly event.
S710: the policing module 014 adjusts the policing policies and sends the adjusted policing policies to the network driver 042.
The management and control module 014 adjusts the management and control policy and sends the adjusted management and control policy to the network driver 042 when it receives the anomaly information. For example, the policing module 014 may unmanage at least a portion of non-critical processes of the network until the exception information disappears.
It will be appreciated that in other embodiments, different treatment modes may be preset for different abnormal events, so that the management module 014 may take different treatment modes according to different abnormal event types. For example: when the abnormal event is the rapid increase of the quantity of the sockets or the data quantity, the management and control of the network non-key sockets can be canceled; when the abnormal event is a foreground application network pause, the control of the network non-key processes can be released one by one until the abnormal event disappears; when the abnormal event is that the packet loss rate is high, the upper limit of the network speed of the non-key process of the network can be increased.
It will be appreciated that the above event types and the manner of handling corresponding to each event type are only one example and not limiting.
It can be appreciated that after receiving the adjusted control policy, the network driver 042 can adjust control of the non-critical process of the network according to the adjusted control policy, so as to avoid influencing normal use of the foreground application due to control.
By the method, network resources or hardware resources of the electronic equipment 10 occupied by the network non-key process can be reduced under the condition that normal use of the foreground application is not affected, and the performance of the electronic equipment 10 is improved, the network resources consumed by the electronic equipment 10 are saved, and the user experience is improved.
Specifically, for example, fig. 8A shows the electricity consumption situation of the electronic device 10 within 12 minutes when the network non-critical process of the online video APP is not controlled, and fig. 8B shows the electricity consumption situation of the electronic device 10 within 12 minutes when the network non-critical process of the online video APP is controlled according to the process management method provided by the implementation of the present application, where other situations are the same. Referring to fig. 8A and 8B, after the process management method provided by the embodiment of the application is adopted, when the video is played by using the online video APP, the battery current is reduced from 350.50mA to 340.33mA, which is reduced by about 3%, and the cruising ability of the electronic device 10 is improved. In addition, referring to the foregoing table 1, by limiting the background downloading process and the push process, the traffic consumed by the background downloading process and the push process can be saved, which is about (14325+152468)/(145325+152468+22987455) =1.3% of the total consumed data amount.
Further, fig. 9 illustrates a schematic structural diagram of an electronic device 10, according to some embodiments of the present application. As shown in fig. 9, the electronic device 10 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, keys 190, a motor 191, an indicator 192, a camera 193, a display 194, a user identification module (subscriber identification module, SIM) card interface 195, and the like. The sensor module 180 may include a pressure sensor 180A, an acceleration sensor 180E, a fingerprint sensor 180H, a touch sensor 180K, an ambient light sensor 180L, and the like.
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 controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system. In some embodiments, the processor 110 may invoke and execute the execution instructions of the process management method provided in the embodiments of the present application stored in the memory to implement the process management method provided in the embodiments of the present application.
In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and/or a universal serial bus (universal serial bus, USB) interface, among others.
The I2C interface is a bi-directional synchronous serial bus comprising a serial data line (SDA) and a serial clock line (derail clock line, SCL). In some embodiments, the processor 110 may contain multiple sets of I2C buses. The processor 110 may be coupled to the touch sensor 180K, charger, flash, camera 193, etc., respectively, through different I2C bus interfaces. For example: the processor 110 may couple the touch sensor 180K through an I2C interface, causing the processor 110 to communicate with the touch sensor 180K through an I2C bus interface, implementing the touch functionality of the electronic device 10.
The I2S interface may be used for audio communication. In some embodiments, the processor 110 may contain multiple sets of I2S buses. The processor 110 may be coupled to the audio module 170 via an I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 may transmit an audio signal to the wireless communication module 160 through the I2S interface, to implement a function of answering a call through the bluetooth headset.
PCM interfaces may also be used for audio communication to sample, quantize and encode analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface. In some embodiments, the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface to implement a function of answering a call through the bluetooth headset. Both the I2S interface and the PCM interface may be used for audio communication.
The UART interface is a universal serial data bus for asynchronous communications. The bus may be a bi-directional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is typically used to connect the processor 110 with the wireless communication module 160. For example: the processor 110 communicates with a bluetooth module in the wireless communication module 160 through a UART interface to implement a bluetooth function. In some embodiments, the audio module 170 may transmit an audio signal to the wireless communication module 160 through a UART interface, to implement a function of playing music through a bluetooth headset.
The MIPI interface may be used to connect the processor 110 to peripheral devices such as a display 194, a camera 193, and the like. The MIPI interfaces include camera serial interfaces (camera serial interface, CSI), display serial interfaces (display serial interface, DSI), and the like. In some embodiments, processor 110 and camera 193 communicate through a CSI interface to implement the photographing functions of electronic device 10. The processor 110 and the display 194 communicate via the DSI interface to implement the display functionality of the electronic device 10.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal or as a data signal. In some embodiments, a GPIO interface may be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like. The GPIO interface may also be configured as an I2C interface, an I2S interface, a UART interface, an MIPI interface, etc.
The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the electronic device 10, or may be used to transfer data between the electronic device 10 and a peripheral device. And can also be used for connecting with a headset, and playing audio through the headset. The interface may also be used to connect other electronic devices, such as AR devices, etc.
The charge management module 140 is configured to receive a charge input from a charger. The charging management module 140 may also supply power to the electronic device through the power management module 141 while charging the battery 142.
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 camera 193, the wireless communication module 160, and the like.
The wireless communication function of the electronic device 10 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.
The mobile communication module 150 may provide a solution for wireless communication including 2G/3G/4G/5G, etc. applied to the electronic device 10. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc. The mobile communication module 150 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be provided in the same device as at least some of the modules of the processor 110.
The wireless communication module 160 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wireless fidelity (wireless fidelity, 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., as applied to the electronic device 10. The wireless communication module 160 may be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signals, filters the electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via the antenna 2.
The electronic device 10 implements display functions via 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.
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-LED, a Micro-OLED, a quantum dot light-emitting diode (quantum dot light emitting diodes, QLED), or the like. In some embodiments, the electronic device 10 may include 1 or N display screens 194, N being a positive integer greater than 1.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image onto the photosensitive element. The photosensitive element may be a charge coupled device (charge coupled device, CCD) or a Complementary Metal Oxide Semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, which is then transferred to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV, or the like format. In some embodiments, electronic device 10 may include 1 or N cameras 193, N being a positive integer greater than 1.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to enable expansion of the memory capabilities of the electronic device 10. The external memory card communicates with the processor 110 through an external memory interface 120 to implement data storage functions. For example, files such as music, video, etc. are stored in an external memory card.
The internal memory 121 may be used to store computer executable program code including instructions. The internal memory 121 may include a program memory area and a data memory area. The program storage area may store an application program (such as application program energy corresponding to the implementation of the above-described related functions of the Synergy service 12) required for at least one function of the operating system, and the like. The data storage area may store data created during use of the electronic device 10 (e.g., correspondence between message identifications and push identifications of the aforementioned notification messages), and so forth. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like. The processor 110 executes various functional applications of the electronic device 10 by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor 110.
The electronic device 10 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.
The audio module 170 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. The audio module 170 may also be used to encode and decode audio signals.
The speaker 170A, also referred to as a "horn," is used to convert audio electrical signals into sound signals.
A receiver 170B, also referred to as a "earpiece", is used to convert the audio electrical signal into a sound signal.
Microphone 170C, also referred to as a "microphone" or "microphone", is used to convert sound signals into electrical signals.
The earphone interface 170D is used to connect a wired earphone.
The pressure sensor 180A is used to sense a pressure signal, and may convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. The pressure sensor 180A is of various types, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may be a capacitive pressure sensor comprising at least two parallel plates with conductive material. The capacitance between the electrodes changes when a force is applied to the pressure sensor 180A. The electronic device 10 determines the strength of the pressure from the change in capacitance. When a touch operation is applied to the display screen 194, the electronic apparatus 10 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic device 10 may also calculate the location of the touch based on the detection signal of the pressure sensor 180A. In some embodiments, touch operations that act on the same touch location, but at different touch operation strengths, may correspond to different operation instructions.
The gyro sensor 180B may be used to determine a motion gesture of the electronic device 100.
The air pressure sensor 180C is used to measure air pressure. In some embodiments, electronic device 100 calculates altitude from barometric pressure values measured by barometric pressure sensor 180C, aiding in positioning and navigation.
The magnetic sensor 180D includes a hall sensor. The electronic device 100 may detect the opening and closing of the flip cover using the magnetic sensor 180D.
The acceleration sensor 180E may detect the magnitude of acceleration of the electronic device 10 in various directions (typically three axes). The magnitude and direction of gravity may be detected when the electronic device 10 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.
A distance sensor 180F for measuring a distance. The electronic device 100 may measure the distance by infrared or laser.
The proximity light sensor 180G may include, for example, a Light Emitting Diode (LED) and a light detector. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light outward through the light emitting diode. The electronic device 100 detects infrared reflected light from nearby objects using a photodiode. When sufficient reflected light is detected, it may be determined that there is an object in the vicinity of the electronic device 100.
The ambient light sensor 180L is used to sense ambient light level. The electronic device 10 may adaptively adjust the brightness of the display 194 based on the perceived ambient light level. The ambient light sensor 180L may also be used to automatically adjust white balance when taking a photograph. Ambient light sensor 180L may also cooperate with proximity light sensor 180G to detect whether electronic device 10 is in a pocket to prevent false touches.
The fingerprint sensor 180H is used to collect a fingerprint. The electronic device 10 may utilize the collected fingerprint characteristics to unlock the fingerprint, access the application lock, take a photograph of the fingerprint, answer an incoming call, etc.
The temperature sensor 180J is for detecting temperature.
The touch sensor 180K, also referred to as a "touch device". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is for detecting a touch operation acting thereon or thereabout. The touch sensor may communicate the detected touch operation to the application processor to determine the touch event type. Visual output related to touch operations may be provided through the display 194. In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device 10 at a different location than the display 194.
The bone conduction sensor 180M may acquire a vibration signal.
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 electronic device 10 may receive key inputs, generating key signal inputs related to user settings and function controls of the electronic device 10.
The motor 191 may generate a vibration cue.
The indicator 192 may be an indicator light, may be used to indicate a state of charge, a change in charge, a message indicating a missed call, a notification, etc.
The SIM card interface 195 is used to connect a SIM card.
It is to be understood that the structure of the electronic device 10 illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device 10. In other embodiments of the present application, the electronic device 10 may include more or fewer components than shown, 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.
It is understood that electronic device 10 may be any electronic device including, but not limited to, a laptop computer, a smart television, a smart speaker, a tablet computer, a server, a wearable device, a head mounted display, a mobile email device, a portable gaming device, a portable music player, a reader device, etc., and embodiments of the present application are not limited.
Embodiments of the mechanisms disclosed herein may be implemented in hardware, software, firmware, or a combination of these implementations. Embodiments of the present application may be implemented as a computer program or program code that is executed on a programmable system including at least one processor, a storage system (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device.
Program code may be applied to input instructions to perform the functions described herein and generate output information. The output information may be applied to one or more output devices in a known manner. For purposes of this application, a processing system includes any system having a processor such as, for example, a Digital Signal Processor (DSP), microcontroller, application Specific Integrated Circuit (ASIC), or microprocessor.
The program code may be implemented in a high level procedural or object oriented programming language to communicate with a processing system. Program code may also be implemented in assembly or machine language, if desired. Indeed, the mechanisms described in the present application are not limited in scope to any particular programming language. In either case, the language may be a compiled or interpreted language.
In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried by or stored on one or more transitory or non-transitory machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, the instructions may be distributed over a network or through other computer readable media. Thus, a machine-readable medium may include any mechanism for storing or transmitting information in a form readable by a machine (e.g., a computer), including but not limited to floppy diskettes, optical disks, read-only memories (CD-ROMs), magneto-optical disks, read-only memories (ROMs), random Access Memories (RAMs), erasable programmable read-only memories (EPROMs), electrically erasable programmable read-only memories (EEPROMs), magnetic or optical cards, flash memory, or tangible machine-readable memory for transmitting information (e.g., carrier waves, infrared signal digital signals, etc.) in an electrical, optical, acoustical or other form of propagated signal using the internet. Thus, a machine-readable medium includes any type of machine-readable medium suitable for storing or transmitting electronic instructions or information in a form readable by a machine (e.g., a computer).
In the drawings, some structural or methodological features may be shown in a particular arrangement and/or order. However, it should be understood that such a particular arrangement and/or ordering may not be required. Rather, in some embodiments, these features may be arranged in a different manner and/or order than shown in the illustrative figures. Additionally, the inclusion of structural or methodological features in a particular figure is not meant to imply that such features are required in all embodiments, and in some embodiments, may not be included or may be combined with other features.
It should be noted that, in the embodiments of the present application, each unit/module is a logic unit/module, and in physical aspect, one logic unit/module may be one physical unit/module, or may be a part of one physical unit/module, or may be implemented by a combination of multiple physical units/modules, where the physical implementation manner of the logic unit/module itself is not the most important, and the combination of functions implemented by the logic unit/module is the key to solve the technical problem posed by the present application. Furthermore, to highlight the innovative part of the present application, the above-described device embodiments of the present application do not introduce units/modules that are less closely related to solving the technical problems presented by the present application, which does not indicate that the above-described device embodiments do not have other units/modules.
It should be noted that in the examples and descriptions of this patent, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
While the present application has been shown and described with reference to certain preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the present application.
Claims (12)
1. A process management method, comprising:
collecting first information of each process under the current application within a preset duration;
judging whether the process is a first type process or not according to the first information;
if the process is judged to be a first type process, process management and control are carried out on the first type process;
wherein the first information includes network access data of the process, and the first type of process includes a process that does not affect the running of the current application.
2. The method as recited in claim 1, further comprising:
after the process management and control are carried out on the first type of process, if an abnormal event is detected, the process management and control on the first type of process are canceled;
wherein the abnormal event comprises at least one of the following events: the packet loss rate of the current application is increased, the retransmission rate of the current application is increased, the current application network is blocked, and the current application corresponds to the socket quantity or the rapid increase of the data quantity.
3. The method according to claim 1, wherein the collecting the first information of each process under the current application for the preset time period includes:
Monitoring each process of the current application within a preset time length;
and acquiring first information of the process.
4. The method of claim 1, wherein said process controlling said first type of process comprises:
performing network restriction on the first type of process, wherein the network restriction comprises at least one of the following modes: inhibit access to the network, limit the speed of access to the network, limit the frequency of access to the network;
or closing the first type of process.
5. The method according to any one of claims 1 to 4, wherein the network access data comprises a data transfer amount of the process.
6. The method of claim 5, wherein determining whether the process is a first type of process based on the first information comprises:
comparing the data transmission quantity of the process with a first threshold value;
and if the data transmission quantity of the process is smaller than the first threshold value, judging that the process is a first type process.
7. The method as recited in claim 6, further comprising:
if the process is judged not to be the first type of process, collecting the data transmission quantity of each socket in the process;
Comparing the data transmission quantity of each socket with a second threshold value;
and if the data transmission quantity of the first socket is smaller than a second threshold value, performing network management and control on the first socket.
8. The method of claim 7, wherein the network managing the first socket comprises:
performing network limitation on the first socket, wherein the network limitation comprises at least one of the following modes: inhibit access to the network, limit the speed of access to the network, limit the frequency of access to the network;
or closing the first socket.
9. The method according to claim 1, wherein before the collecting the first information of each process under the current application within the preset time period, the method further comprises:
it is determined that the current application is using the network.
10. An electronic device, comprising:
a memory for storing instructions for execution by one or more processors of the electronic device, an
A processor, being one of the processors of an electronic device, for executing the instructions to cause the electronic device to implement the process management method of any one of claims 1 to 9.
11. A readable storage medium having stored thereon instructions that, when executed on an electronic device, cause the electronic device to perform the process management method of any of claims 1 to 9.
12. A computer program product comprising instructions that when executed on an electronic device cause the electronic device to perform the process management method of any one of claims 1 to 9.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210862434.7A CN116055546A (en) | 2022-07-21 | 2022-07-21 | Process management method, electronic device, storage medium, and program product |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210862434.7A CN116055546A (en) | 2022-07-21 | 2022-07-21 | Process management method, electronic device, storage medium, and program product |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116055546A true CN116055546A (en) | 2023-05-02 |
Family
ID=86117169
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210862434.7A Pending CN116055546A (en) | 2022-07-21 | 2022-07-21 | Process management method, electronic device, storage medium, and program product |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116055546A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110535724A (en) * | 2019-08-28 | 2019-12-03 | 深圳市网心科技有限公司 | Application program net reading and writing method for limiting, device, electronic equipment and storage medium |
CN110806926A (en) * | 2019-09-05 | 2020-02-18 | 华为技术有限公司 | Resource control method and equipment |
CN110913424A (en) * | 2019-11-14 | 2020-03-24 | 华为技术有限公司 | Network connection control method and device, terminal and computer storage medium |
CN113434288A (en) * | 2021-06-16 | 2021-09-24 | 荣耀终端有限公司 | Memory management method and electronic equipment |
CN114625525A (en) * | 2020-12-14 | 2022-06-14 | 华为技术有限公司 | Resource control method and equipment |
-
2022
- 2022-07-21 CN CN202210862434.7A patent/CN116055546A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110535724A (en) * | 2019-08-28 | 2019-12-03 | 深圳市网心科技有限公司 | Application program net reading and writing method for limiting, device, electronic equipment and storage medium |
CN110806926A (en) * | 2019-09-05 | 2020-02-18 | 华为技术有限公司 | Resource control method and equipment |
CN110913424A (en) * | 2019-11-14 | 2020-03-24 | 华为技术有限公司 | Network connection control method and device, terminal and computer storage medium |
CN114625525A (en) * | 2020-12-14 | 2022-06-14 | 华为技术有限公司 | Resource control method and equipment |
CN113434288A (en) * | 2021-06-16 | 2021-09-24 | 荣耀终端有限公司 | Memory management method and electronic equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3926576A1 (en) | Frequency adjustment method and apparatus applied to terminal, and electronic device | |
CN112399390B (en) | Bluetooth connection method and related device | |
CN113498124B (en) | SIM card and eSIM card switching method and electronic equipment | |
KR20210042953A (en) | Security service deletion method and electronic device | |
CN110687998A (en) | Application management method and device | |
CN111555825B (en) | Radio frequency resource allocation method and device | |
WO2021190314A1 (en) | Sliding response control method and apparatus of touch screen, and electronic device | |
EP4020952A1 (en) | Call method and apparatus | |
CN112740728B (en) | Bluetooth communication method and electronic equipment | |
CN116048772B (en) | Method and device for adjusting frequency of central processing unit and terminal equipment | |
CN114915996A (en) | Communication exception handling method and related device | |
WO2022170854A1 (en) | Video call method and related device | |
CN116133165A (en) | Headset connection system, method, headset, electronic device, and readable storage medium | |
CN116055546A (en) | Process management method, electronic device, storage medium, and program product | |
CN114116610A (en) | Method, device, electronic equipment and medium for acquiring storage information | |
CN114258044B (en) | Standby method, standby system and terminal equipment | |
CN114125738B (en) | Data transmission control method and related device | |
CN113271577B (en) | Media data playing system, method and related device | |
CN117135683B (en) | Data communication method, electronic device, and computer-readable storage medium | |
CN116775345B (en) | Data transmission method and electronic equipment | |
CN116683957B (en) | Communication method, apparatus, readable medium, program product, and electronic device | |
CN116667875B (en) | Switching method and device of internet access and terminal equipment | |
CN114125144B (en) | Method, terminal and storage medium for preventing false touch | |
WO2024082977A1 (en) | Data processing method, readable storage medium, and electronic device | |
WO2024012443A1 (en) | Method and system for controlling power consumption of device, and electronic device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |