Process processing method and device, equipment and storage medium

By detecting that the camera application is switched to the foreground in an electronic device, the process group of the process to be regulated is updated, and user experience problems such as lag in camera application scenarios are solved, and the reasonable allocation of system resources and the improvement of application performance is achieved.

CN119883586APending Publication Date: 2025-04-25BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311387502.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-24
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

In electronic devices and in complex application scenarios such as cameras, non-front office applications seize system resources in order to improve backend performance and seize system resources, resulting in poor user experience such as lag in frontend applications that can be perceived.

Method used

By detecting the operation of switching to the foreground of the camera application, determine the process to be regulated corresponding to the camera application, and update its identification from the initial process group to the target process group based on its type. The system resources configured by the target process group are smaller than the initial process group.

Benefits of technology

It effectively solves user experience problems such as lag in camera application scenarios, and improves application performance and user experience by reasonably managing and suppressing the process of unreasonable occupation of system resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119883586A_ABST
    Figure CN119883586A_ABST
Patent Text Reader

Abstract

The invention relates to a process processing method and device, equipment and a storage medium. The method comprises the steps of determining a to-be-regulated process corresponding to a camera application under the condition that a first application operation of switching the camera application to a foreground is detected; based on the type of the to-be-regulated process, determining a target process group corresponding to each to-be-regulated process; updating the identifier of each to-be-regulated process from the initial process group to the corresponding target process group; wherein the system resources configured for the target process group are smaller than the system resources configured for the initial process group. According to the technical scheme of the invention, the problem of poor user experience such as use lagging in a camera scene can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of communication technology, and in particular to a process processing method, device, equipment and storage medium. Background Art

[0002] As the performance of the central processing unit (CPU) of electronic devices becomes more and more powerful, the various functions and applications of electronic devices are increasing. Various applications and processes have begun to use and occupy system resources, and even non-foreground applications have occupied a large number of system resources in order to improve performance in the background, resulting in user-perceivable foreground applications experiencing poor user experience such as lag, especially in more complex application scenarios such as cameras. Summary of the invention

[0003] In order to overcome the problems existing in the related art, the present disclosure provides a process processing method, device, equipment and storage medium to overcome the problem of poor user experience such as usage freeze in more complex application scenarios such as cameras.

[0004] According to a first aspect of an embodiment of the present disclosure, a process processing method is provided, including:

[0005] In a case where a first application operation of switching a camera application to the foreground is detected, determining a process to be regulated corresponding to the camera application;

[0006] Based on the type of the process to be regulated, determining the target process group corresponding to each process to be regulated;

[0007] Update the identifier of each process to be regulated from the initial process group to the corresponding target process group;

[0008] The system resources configured for the target process group are smaller than the system resources configured for the initial process group.

[0009] In some embodiments, determining the process to be regulated corresponding to the camera application includes:

[0010] Based on the application identifier of the camera application, determining the process to be regulated from the first process list; and / or

[0011] Based on the activity of the background application processes in the background running state, the process to be regulated is determined from the background application processes.

[0012] In some embodiments, the determining the process to be regulated from the background application process based on the activity of the background application process in the background running state includes:

[0013] The background application process whose activity is greater than a preset activity threshold is determined as the process to be regulated.

[0014] In some embodiments, the method further comprises:

[0015] When the process to be regulated is in a background running state, determining the priority of the process to be regulated;

[0016] The step of determining the target process group corresponding to each of the processes to be regulated based on the type of the processes to be regulated includes:

[0017] Based on the priority of each of the processes to be regulated, the target process group corresponding to the type of each of the processes to be regulated is determined; wherein the system resources configured for each of the target process groups are positively correlated with the priority of each of the processes to be regulated.

[0018] In some embodiments, when the process to be regulated is in a background running state, determining the priority of the process to be regulated includes:

[0019] When the process to be regulated is in a background running state and the identifier of the process to be regulated exists in the second process list, determining that the process to be regulated has a first priority;

[0020] When the process to be regulated is in the background running state and the time interval between starting the application corresponding to the process to be regulated and triggering the first application operation is less than the preset time interval, determining that the process to be regulated has the second priority;

[0021] The first priority is higher than the second priority.

[0022] In some embodiments, updating the identifier of each of the to-be-regulated processes from the initial process group to the corresponding target process group includes:

[0023] Taking the identifier of each process to be regulated from the initial process group and writing it into the cache mapping table;

[0024] The identifier of the process to be regulated in the cache mapping table is written into the target process group.

[0025] In some embodiments, the method further comprises:

[0026] When the operation of the second application to exit the camera application from the foreground is detected, the identifiers of the respective processes to be regulated are restored from the target process group to the initial process group.

[0027] According to a second aspect of an embodiment of the present disclosure, a process processing device is provided, the device comprising:

[0028] A first determining module is configured to determine a process to be regulated corresponding to the camera application when a first application operation of switching the camera application to the foreground is detected;

[0029] A second determination module is configured to determine a target process group corresponding to each process to be regulated based on the type of the process to be regulated;

[0030] An updating module, configured to update the identifier of each process to be regulated from an initial process group to a corresponding target process group;

[0031] The system resources configured for the target process group are smaller than the system resources configured for the initial process group.

[0032] In some embodiments, the first determining module is configured to:

[0033] Based on the application identifier of the camera application, determining the process to be regulated from the first process list; and / or

[0034] Based on the activity of the background application processes in the background running state, the process to be regulated is determined from the background application processes.

[0035] In some embodiments, the first determining module is configured to:

[0036] The background application process whose activity is greater than a preset activity threshold is determined as the process to be regulated.

[0037] In some embodiments, the apparatus further comprises:

[0038] A third determination module is configured to determine the priority of the process to be regulated when the process to be regulated is in a background running state;

[0039] The second determination module is configured as follows:

[0040] Based on the priority of each of the processes to be regulated, determining the target process group corresponding to the type of each of the processes to be regulated; wherein the system resources configured for each of the target process groups are positively correlated with the priority of each of the processes to be regulated;

[0041] The identifier of each process to be regulated is updated from the initial process group to the corresponding target process group.

[0042] In some embodiments, the third determination module is configured to:

[0043] When the process to be regulated is in a background running state and the identifier of the process to be regulated exists in the second process list, determining that the process to be regulated has a first priority;

[0044] When the process to be regulated is in the background running state and the time interval between starting the application corresponding to the process to be regulated and triggering the first application operation is less than the preset time interval, determining that the process to be regulated has the second priority;

[0045] The first priority is higher than the second priority.

[0046] In some embodiments, the update module is configured to:

[0047] Taking the identifier of each process to be regulated from the initial process group and writing it into the cache mapping table;

[0048] The identifier of the process to be regulated in the cache mapping table is written into the target process group.

[0049] In some embodiments, the apparatus further comprises:

[0050] The recovery module is configured to recover the identifiers of the processes to be regulated from the target process group to the initial process group when an operation of the second application to exit the camera application from the foreground is detected.

[0051] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, including:

[0052] processor;

[0053] a memory for storing processor-executable instructions;

[0054] The processor is configured to: implement the steps of any one of the process processing methods in the first aspect when executed.

[0055] According to a fourth aspect of an embodiment of the present disclosure, a non-temporary computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the steps of any one of the process processing methods in the first aspect above.

[0056] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:

[0057] In an embodiment of the present disclosure, when a first application operation of switching a camera application to the foreground is detected, the process to be regulated corresponding to the camera application can be determined, and based on the type of the process to be regulated, the target process group corresponding to each process to be regulated can be determined, and the identifier of each process to be regulated can be updated from the initial process group to the corresponding target process group; wherein, the system resources configured for the target process group are less than the system resources configured for the initial process group.

[0058] The technical solution disclosed in the present invention, in the application scenario of the camera, if it is detected that the camera application needs to be switched to the foreground, then the processes to be regulated that unreasonably occupy system resources in the camera scenario can be determined, and the identifiers of each process to be regulated can be updated from the initial process group to the target process group. Since the system resources configured for the target process group are less than the system resources configured for the initial process group, after the identifiers of the processes to be regulated are updated from the initial process group to the target process group, these processes to be regulated can be reasonably managed and suppressed, thereby solving the problem of poor user experience such as usage freezes in the camera scenario.

[0059] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0061] Figure 1 The process flow of the process processing method according to an exemplary embodiment of the present disclosure is shown as follows Figure 1 .

[0062] Figure 2 It is a schematic diagram of a system architecture according to an exemplary embodiment of the present disclosure.

[0063] Figure 3 The process flow of the process processing method according to an exemplary embodiment of the present disclosure is shown as follows Figure 2 .

[0064] Figure 4 The figure is a structural block diagram of a process processing device according to an exemplary embodiment of the present disclosure.

[0065] Figure 5 It is a hardware structure block diagram of an electronic device according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION

[0066] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0067] Figure 1 The process flow of the process processing method according to an exemplary embodiment of the present disclosure is shown as follows Figure 1 ,like Figure 1 As shown, it mainly includes the following steps:

[0068] In step 101, when a first application operation of switching a camera application to the foreground is detected, a process to be regulated corresponding to the camera application is determined;

[0069] In step 102, based on the type of the process to be regulated, a target process group corresponding to each process to be regulated is determined;

[0070] In step 103, the identifier of each process to be regulated is updated from the initial process group to the corresponding target process group;

[0071] The system resources configured for the target process group are smaller than the system resources configured for the initial process group.

[0072] It should be noted that the process processing method proposed in the present disclosure can be applied to electronic devices, where the electronic devices may include: terminal devices, such as mobile terminals or fixed terminals. Among them, mobile terminals may include: mobile phones, tablet computers, laptop computers and other devices. Fixed terminals may include: desktop computers or smart TVs, etc.

[0073] The present disclosure can determine the process to be regulated corresponding to the camera application when detecting the first application operation of switching the camera application to the foreground. Here, the process to be regulated includes: a process that unreasonably occupies system resources in the camera scene.

[0074] Since the camera application occupies more system resources than all other applications, when the camera application switches to the foreground to work, the impact of the background application's occupation of system resources on the camera application is more obvious, which may cause problems such as freezing, frame drops, and heating that seriously affect the user experience. The present disclosure can first determine the process to be regulated that unreasonably occupies system resources from all processes when it is detected that the camera switches to the foreground. The system resources may be the CPU resources of the electronic device.

[0075] In some embodiments, the first application operation may be the first trigger operation of the user on the camera application, for example, the first click operation of the user on the camera application, etc. In other embodiments, when the user clicks the camera application based on the first click operation, the electronic device will first enable the system boot service (Activity Manager Service, AMS) to prepare for the start of the application process. At this time, the AMS already knows whether the camera application is about to be switched to the foreground user for use. At this stage, the system resource control module starts to work.

[0076] After the system resource control module starts working, the process to be controlled corresponding to the camera application can be determined, and after the process to be controlled is determined, the target process group corresponding to each process to be controlled is determined based on the type of the process to be controlled. In some embodiments, the process to be controlled may include: application process, kernel process and user state process (Native process). The present disclosure performs Cgroup grouping control and transfer for Native and other types of processes that unreasonably seize resources, and further reasonably allocates the CPU resources of each process for reasonable use, thereby improving the camera scene performance and reducing power consumption.

[0077] In some embodiments, before determining the target process group corresponding to each process to be regulated, each process to be regulated may be classified to determine the type of each process to be regulated. For example, each process to be regulated may be classified according to the priority of each process to be regulated to determine the type of each process to be regulated, that is, the type of the process to be regulated may be used to identify the priority of each process to be regulated.

[0078] Taking the Android operating system as an example, each process can be grouped based on the Linux Cgroup technology on the Android system. Each process group is initialized based on different parameter controls to control the system resources that each process group can obtain. When the process switches between the foreground and the background, each process can switch between different process groups.

[0079] Here, the target process group can be pre-configured and used to group the processes to be regulated. It can be understood that the identifier of the process to be regulated is initially stored in the initial process group. After the system resource regulation module starts working, the identifier of the process to be regulated can be updated to the corresponding target process group to realize the switching of the process to be regulated between the initial process group and the target process group.

[0080] In the disclosed embodiment, the system resources configured for the target process group corresponding to the process to be regulated are less than the system resources configured for the initial process group corresponding to the process to be regulated, that is, each process to be regulated corresponds to an initial process group and a target process group, and the system resources configured for the initial process group are greater than the system resources configured for the target process group.

[0081] Taking the case where the process to be regulated is the first application process, the identifier of the first application process is initially stored in the initial process group. After the first application process is determined, the identifier of the first application process can be updated from the initial process group to the target process group corresponding to the first application process, and the system resources configured for the initial process group corresponding to the first application process are greater than the system resources configured for the target process group corresponding to the first application process.

[0082] In an embodiment of the present disclosure, when a first application operation of switching a camera application to the foreground is detected, the process to be regulated corresponding to the camera application can be determined, and based on the type of the process to be regulated, the target process group corresponding to each process to be regulated can be determined, and the identifier of each process to be regulated can be updated from the initial process group to the corresponding target process group; wherein, the system resources configured for the target process group are less than the system resources configured for the initial process group.

[0083] The technical solution disclosed in the present invention, in the application scenario of the camera, if it is detected that the camera application needs to be switched to the foreground, then the processes to be regulated that unreasonably occupy system resources in the camera scenario can be determined, and the identifiers of each process to be regulated can be updated from the initial process group to the target process group. Since the system resources configured for the target process group are less than the system resources configured for the initial process group, after the identifiers of the processes to be regulated are updated from the initial process group to the target process group, these processes to be regulated can be reasonably managed and suppressed, thereby solving the problem of poor user experience such as usage freezes in the camera scenario.

[0084] In some embodiments, determining the process to be regulated corresponding to the camera application includes:

[0085] Based on the application identifier of the camera application, determining the process to be regulated from the first process list; and / or

[0086] Based on the activity of the background application processes in the background running state, the process to be regulated is determined from the background application processes.

[0087] In some embodiments, the first process list may be a predefined list for pre-storing identifiers (e.g., process names) of processes that have no or low requirements for system resources in a camera scenario. The processes stored in the first process list may include: kernel processes, user-mode processes, and application processes, etc. That is, the first process list may be a blacklist process list predefined for camera applications.

[0088] In some embodiments, based on the historical usage data of the camera application, the process to be regulated corresponding to the camera application can be determined, an association relationship between the application identifier of the camera application and each process to be regulated can be established, and the application identifiers of each camera application and each process to be regulated can be stored in the first process list according to the association relationship. In this way, when it is necessary to determine the process to be regulated corresponding to a certain camera application, it can be determined from the first process list based on the application identifier of the camera application. The application identifier of the camera application is used to uniquely identify the camera application, for example, it can be the application name of the camera application.

[0089] By pre-defining the first process list of the camera application, when it is necessary to determine the process to be regulated corresponding to the camera application, it can be directly obtained from the first process list, and the user can adjust and update the process in the first process list as needed, which can improve the flexibility of system resource configuration.

[0090] In other embodiments, after the system resource control module starts working, it can determine the application processes running in the background, and obtain the activity of the background application processes running in the background, and then determine the process to be regulated from the background application processes based on the activity of each background application process.

[0091] For example, the activity of each background application process can be sorted, and the process to be regulated can be determined from the background application processes based on the sorting result. Taking the activity of each background application process as sorted from largest to smallest, a preset number of background application processes with the highest activity can be determined as the process to be regulated.

[0092] By identifying background application processes with high activity as processes to be regulated and reasonably managing and suppressing these processes to be regulated, the occupation of system resources by background application processes can be reduced, thereby solving problems such as poor user experience such as usage lag in camera scenarios.

[0093] In some embodiments, the determining the process to be regulated from the background application process based on the activity of the background application process in the background running state includes:

[0094] The background application process whose activity is greater than a preset activity threshold is determined as the process to be regulated.

[0095] Here, the background application process whose activity is greater than the preset activity threshold can be determined as the process to be regulated. Since the background application process with higher activity occupies the system resources more seriously, in the embodiment of the present disclosure, the background application process with activity greater than the preset activity threshold can be determined, and these background application processes can be reasonably controlled and suppressed, which can reduce the occupancy of system resources by the background application process with higher activity, thereby solving the problem of poor user experience such as usage freeze in the camera scene.

[0096] In some embodiments, the method further comprises:

[0097] When the process to be regulated is in a background running state, determining the priority of the process to be regulated;

[0098] The step of determining the target process group corresponding to each of the processes to be regulated based on the type of the processes to be regulated includes:

[0099] Based on the priority of each of the processes to be regulated, determining the target process group corresponding to the type of each of the processes to be regulated;

[0100] The system resources configured for each of the target process groups are positively correlated with the priority of each of the processes to be regulated.

[0101] In the embodiment of the present disclosure, after the system resource control module starts working, if it is determined that the process to be controlled is in the background running state, the priority of the process to be controlled can be determined. After the priority of each process to be controlled is determined, each process to be controlled can be classified according to the priority of each process to be controlled to determine the type of each process to be controlled, that is, the type of the process to be controlled can be used to identify the priority of each process to be controlled.

[0102] In other embodiments, when the process to be regulated is in the background running state, the priority of each process to be regulated can be determined based on the activity of each process to be regulated. For example, the activity of each process to be regulated and the priority of each process to be regulated can be positively correlated, that is, the higher the activity of the process to be regulated, the higher the priority. In other embodiments, the priority of each process to be regulated can also be determined based on the process parameters of the process to be regulated. For example, the priority of each process to be regulated can be determined based on the process setting parameters of each process to be regulated, wherein the process setting parameters can be used to determine the storage path of the process, etc.; for another example, the priority of the process to be regulated can be determined based on the process running parameters of the process to be regulated, wherein the process running parameters can be used to determine the running state of the process.

[0103] In the embodiment of the present disclosure, when the process to be regulated is in the background running state, the priority of the process to be regulated can be determined, and the process to be regulated can be classified based on the priority of the process to be regulated to determine the type of the process to be regulated, and then the target process group corresponding to each type of the process to be regulated can be determined.

[0104] Since the system resources configured for each target process group are positively correlated with the priority of each process to be regulated, that is, the higher the priority of the process to be regulated, the higher the system resources configured for the target process group corresponding to the process to be regulated. In this way, on the basis of achieving system resource regulation and suppression, the normal operation of each process to be regulated can be guaranteed, and the impact of system resource regulation on the processes to be regulated running in the background can be reduced. And different levels of target process groups are written according to different types to limit their different system resources, which can achieve flexibility in system resource control.

[0105] In some embodiments, when the process to be regulated is in a background running state, determining the priority of the process to be regulated includes:

[0106] When the process to be regulated is in a background running state and the identifier of the process to be regulated exists in the second process list, determining that the process to be regulated has a first priority;

[0107] When the process to be regulated is in the background running state and the time interval between starting the application corresponding to the process to be regulated and triggering the first application operation is less than the preset time interval, determining that the process to be regulated has the second priority;

[0108] The first priority is higher than the second priority.

[0109] In some embodiments, the priority of each process to be regulated may also be determined based on the process parameters of the process to be regulated. For example, the priority of each process to be regulated may be determined based on the process setting parameters of the process to be regulated, and / or the priority of the process to be regulated may be determined based on the process running parameters of the process to be regulated.

[0110] When the process setting parameter represents that the storage path of the process is the second process list, it is determined that the process to be regulated has the first priority.

[0111] In some embodiments, the second process list may be a predefined list for pre-storing identifiers (e.g., process names) of processes to be regulated that have high system resource requirements in camera scenarios. The processes to be regulated stored in the second process list may include kernel processes, user-mode processes, and application processes, etc. That is, the second process list may be a whitelist process list predefined for camera applications.

[0112] In the disclosed embodiment, by pre-defining the second process list of the camera application, the identifiers of the processes to be regulated that have greater system resource requirements are pre-stored in the second process list, and the priorities of the processes to be regulated pre-stored in the second process list are set to be higher. This can ensure the normal operation of each process to be regulated on the basis of achieving system resource regulation and suppression, and reduce the impact of system resource regulation on the processes to be regulated running in the background.

[0113] When the process to be regulated is in the background running state, and the time interval between starting the application corresponding to the process to be regulated and triggering the first application operation is less than the preset time interval, it is determined that the process to be regulated has the second priority. When the time interval between starting the application corresponding to the process to be regulated and triggering the first application operation is less than the preset time interval, it can be determined that the time of starting the application corresponding to the process to be regulated is relatively close to the time of switching the camera application to the foreground. For example, the application corresponding to the process to be regulated can be the previous application that uses the camera application. By setting the application to the second priority, the normal operation of the application can be guaranteed on the basis of realizing system resource regulation and suppression, and the impact of system resource regulation on applications running in the background can be reduced. That is, the purpose of regulating system resources for different processes and threads in the camera scenario is achieved.

[0114] In other embodiments, when the process to be regulated is a system application process, the process to be regulated may be determined as the second priority. In other embodiments, all processes to be regulated except the first priority and the second priority may be set to the third priority, wherein the third priority is lower than the second priority. Of course, during use, the classification strategy of each process to be regulated may be defined and the priority of each process to be regulated may be determined as needed, which is not specifically limited here.

[0115] In some embodiments, updating the identifier of each of the to-be-regulated processes from the initial process group to the corresponding target process group includes:

[0116] Taking the identifier of each process to be regulated from the initial process group and writing it into the cache mapping table;

[0117] The identifier of the process to be regulated in the cache mapping table is written into the target process group.

[0118] In an embodiment of the present disclosure, after determining each process to be regulated, the identifier of each process to be regulated can be taken out from the initial process group and written into the cache mapping table, and the identifier of the process to be regulated in the cache mapping table can be written into the target process group. Among them, the identifier of the process to be regulated can include the process name of the process to be regulated and / or the thread name corresponding to the process to be regulated. In some embodiments, each process name and thread name corresponds to a system-wide unique identifier. The present disclosure can find the corresponding identifier number, that is, the process number (PID) and the thread number (TID) by traversing the process name and thread name, and then determine the identifier of the process to be regulated.

[0119] Here, the cache mapping table may be a hash table. For example, after determining the identifiers of each process to be regulated, the initial process group (the current cgroup group) corresponding to the process to be regulated may be determined according to the identifier of the process to be regulated, and the identifier of the process to be regulated may be taken out from the initial process group and written into the cache mapping table (hash table). Then, the identifier of the process to be regulated in the cache mapping table may be written into the target process group (the newly created cgroup group).

[0120] In the disclosed embodiment, the process to be regulated is cached and read through a cache mapping table. For example, data caching and reading can be achieved through a hash table, which can speed up data search and thus improve the efficiency of system resource control.

[0121] In some embodiments, the method further comprises:

[0122] When the operation of the second application to exit the camera application from the foreground is detected, the identifiers of the respective processes to be regulated are restored from the target process group to the initial process group.

[0123] The present disclosure restores the identifiers of the processes to be regulated from the target process group to the initial process group when the second application operation of exiting the camera application from the foreground is detected. Here, the processes to be regulated include: processes that unreasonably occupy system resources in the camera scene.

[0124] In some embodiments, the second application operation may be a second trigger operation of the user on the camera application, for example, it may be a second click operation of the user on the camera application, etc. In other embodiments, when the user clicks the camera application based on the second click operation, the AMS already knows whether the camera application is about to be switched out of the foreground user's use, and at this stage, the system resource control module stops working.

[0125] In the disclosed embodiment, when the camera application exits the foreground, the system resource control module will restore the process to be regulated (including the process to be regulated and the corresponding thread) to the initial process group (the original cgroup group) to remove the restrictions on the process to be regulated. When process system resource control is not required, the process to be regulated is promptly restored to the corresponding initial process group to ensure the operation of the process to be regulated. Through the technical solution disclosed in the present invention, the startup performance fluctuation of the camera application is small and the startup time of each electronic device is optimized by about 20 milliseconds (ms) to 80ms; in scenarios where there are many background applications in operation, the startup time of each electronic device is optimized by about 20ms to 200ms; the camera freezes, black screens and other phenomena in user usage scenarios are reduced, and in scenarios where there are many background applications in operation, camera freezes, black screens and other phenomena occur less frequently.

[0126] Figure 2 is a schematic diagram of a system architecture according to an exemplary embodiment of the present disclosure. Figure 2 As shown, when the camera application is started, the application process, kernel process and user state process can be controlled based on the system resource control module 201.

[0127] Figure 3 The process flow of the process processing method according to an exemplary embodiment of the present disclosure is shown as follows Figure 2 ,like Figure 3 As shown, it mainly includes the following steps:

[0128] In step 301, the system boot service AMS is started;

[0129] In step 302, it is determined whether a first application operation of switching the camera application to the foreground is detected;

[0130] In step 303, a first process list is obtained;

[0131] In step 304, the identifier of the process to be regulated is determined;

[0132] For example, the process ID can be obtained according to the process name of the process to be regulated.

[0133] In step 305, an initial process group corresponding to the process to be regulated is determined;

[0134] In step 306, the identifier of the process to be regulated is updated from the initial process group to the corresponding target process group;

[0135] In step 307, the process group to which the process in the suppressed state currently belongs is obtained;

[0136] Here, in the case where the first application operation of switching the camera application to the foreground is not detected, the process group in which the process in the suppressed state is currently located can be obtained, wherein the process in the suppressed state can be a process to be regulated determined by the system resource control this time, or a process to be regulated determined by the historical process system resource control. For example, a process that is not in the corresponding initial process group can be determined as a process in the suppressed state.

[0137] In step 308, it is determined whether the process in the suppressed state is in the target process group;

[0138] In step 309, if the process in the suppressed state is in the target process group, the identifier of the process in the suppressed state is restored from the target process group to the initial process group.

[0139] In an embodiment of the present disclosure, when a first application operation of switching a camera application to the foreground is detected, the process to be regulated corresponding to the camera application can be determined, and based on the type of the process to be regulated, the target process group corresponding to each process to be regulated can be determined, and the identifier of each process to be regulated can be updated from the initial process group to the corresponding target process group; wherein, the system resources configured for the target process group are less than the system resources configured for the initial process group.

[0140] The technical solution disclosed in the present invention, in the application scenario of the camera, if it is detected that the camera application needs to be switched to the foreground, then the processes to be regulated that unreasonably occupy system resources in the camera scenario can be determined, and the identifiers of each process to be regulated can be updated from the initial process group to the target process group. Since the system resources configured for the target process group are less than the system resources configured for the initial process group, after the identifiers of the processes to be regulated are updated from the initial process group to the target process group, these processes to be regulated can be reasonably managed and suppressed, thereby solving the problem of poor user experience such as usage freezes in the camera scenario.

[0141] Figure 4 FIG. 1 is a structural block diagram of a process processing device according to an exemplary embodiment of the present disclosure. Figure 4 As shown, the process processing device 400 mainly includes:

[0142] A first determining module 401 is configured to determine a process to be regulated corresponding to the camera application when a first application operation of switching the camera application to the foreground is detected;

[0143] The second determination module 402 is configured to determine the target process group corresponding to each process to be regulated based on the type of the process to be regulated;

[0144] The updating module 403 is configured to update the identifier of each process to be regulated from the initial process group to the corresponding target process group;

[0145] The system resources configured for the target process group are smaller than the system resources configured for the initial process group.

[0146] In some embodiments, the first determining module 401 is configured to:

[0147] Based on the application identifier of the camera application, determining the process to be regulated from the first process list; and / or

[0148] Based on the activity of the background application processes in the background running state, the process to be regulated is determined from the background application processes.

[0149] In some embodiments, the first determining module 401 is configured to:

[0150] The background application process whose activity is greater than a preset activity threshold is determined as the process to be regulated.

[0151] In some embodiments, the apparatus 400 further includes:

[0152] A third determination module is configured to determine the priority of the process to be regulated when the process to be regulated is in a background running state;

[0153] The second determining module 402 is configured to:

[0154] Based on the priority of each of the processes to be regulated, the target process group corresponding to the type of each of the processes to be regulated is determined; wherein the system resources configured for each of the target process groups are positively correlated with the priority of each of the processes to be regulated.

[0155] In some embodiments, the third determination module is configured to:

[0156] When the process to be regulated is in a background running state and the identifier of the process to be regulated exists in the second process list, determining that the process to be regulated has a first priority;

[0157] When the process to be regulated is in the background running state and the time interval between starting the application corresponding to the process to be regulated and triggering the first application operation is less than the preset time interval, determining that the process to be regulated has the second priority;

[0158] The first priority is higher than the second priority.

[0159] In some embodiments, the updating module 403 is configured to:

[0160] Taking the identifier of each process to be regulated from the initial process group and writing it into the cache mapping table;

[0161] The identifier of the process to be regulated in the cache mapping table is written into the target process group.

[0162] In some embodiments, the apparatus further comprises:

[0163] The recovery module is configured to recover the identifiers of the processes to be regulated from the target process group to the initial process group when an operation of the second application to exit the camera application from the foreground is detected.

[0164] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0165] Figure 5 6 is a hardware structure block diagram of an electronic device according to an exemplary embodiment of the present disclosure. For example, the electronic device 600 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0166] Reference Figure 5 , the electronic device 600 may include one or more of the following components: a processing component 602 , a memory 604 , a power component 606 , a multimedia component 608 , an audio component 610 , an input / output (I / O) interface 612 , a sensor component 614 , and a communication component 616 .

[0167] The processing component 602 generally controls the overall operation of the electronic device 600, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 602 may include one or more processors 620 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 602 may include one or more modules to facilitate the interaction between the processing component 602 and other components. For example, the processing component 602 may include a multimedia module to facilitate the interaction between the multimedia component 608 and the processing component 602.

[0168] The memory 604 is configured to store various types of data to support operations on the electronic device 600. Examples of such data include instructions for any application or method operating on the electronic device 600, contact data, phone book data, messages, pictures, videos, etc. The memory 604 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0169] The power supply component 606 provides power to the various components of the electronic device 600. The power supply component 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 600.

[0170] The multimedia component 608 includes a screen that provides an output interface between the electronic device 600 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 608 includes a front camera and / or a rear camera. When the electronic device 600 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0171] The audio component 610 is configured to output and / or input audio signals. For example, the audio component 610 includes a microphone (MIC), and when the electronic device 600 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 604 or sent via the communication component 616. In some embodiments, the audio component 610 also includes a speaker for outputting audio signals.

[0172] I / O interface 612 provides an interface between processing component 602 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0173] The sensor assembly 614 includes one or more sensors for providing various aspects of status assessment for the electronic device 600. For example, the sensor assembly 614 can detect the open / closed state of the electronic device 600, the relative positioning of the components, such as the display and keypad of the electronic device 600, and the sensor assembly 614 can also detect the position change of the electronic device 600 or a component of the electronic device 600, the presence or absence of contact between the user and the electronic device 600, the orientation or acceleration / deceleration of the electronic device 600, and the temperature change of the electronic device 600. The sensor assembly 614 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 614 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 614 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0174] The communication component 616 is configured to facilitate wired or wireless communication between the electronic device 600 and other devices. The electronic device 600 can access a wireless network based on a communication standard, such as WI-FI, 4G or 5G, or a combination thereof. In an exemplary embodiment, the communication component 616 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 616 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0175] In an exemplary embodiment, the electronic device 600 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above methods.

[0176] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 604 including instructions, and the instructions can be executed by a processor 620 of an electronic device 600 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0177] A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to perform a process processing method, including:

[0178] In a case where a first application operation of switching a camera application to the foreground is detected, determining a process to be regulated corresponding to the camera application;

[0179] Based on the type of the process to be regulated, determining the target process group corresponding to each process to be regulated;

[0180] Update the identifier of each process to be regulated from the initial process group to the corresponding target process group;

[0181] The system resources configured for the target process group are smaller than the system resources configured for the initial process group.

[0182] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0183] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A process processing method, characterized in that: include: In a case where a first application operation of switching a camera application to the foreground is detected, determining a process to be regulated corresponding to the camera application; Based on the type of the process to be regulated, determining the target process group corresponding to each process to be regulated; Update the identifier of each process to be regulated from the initial process group to the corresponding target process group; The system resources configured for the target process group are smaller than the system resources configured for the initial process group.

2. The method according to claim 1, characterized in that: The determining the process to be regulated corresponding to the camera application includes: Based on the application identifier of the camera application, determining the process to be regulated from the first process list; and / or Based on the activity of the background application processes in the background running state, the process to be regulated is determined from the background application processes.

3. The method according to claim 2, characterized in that The determining the process to be regulated from the background application process based on the activity of the background application process in the background running state includes: The background application process whose activity is greater than a preset activity threshold is determined as the process to be regulated.

4. The method according to claim 1, characterized in that The method further comprises: When the process to be regulated is in a background running state, determining the priority of the process to be regulated; The step of determining the target process group corresponding to each of the processes to be regulated based on the type of the processes to be regulated includes: Based on the priority of each of the processes to be regulated, determining the target process group corresponding to the type of each of the processes to be regulated; The system resources configured for each of the target process groups are positively correlated with the priority of each of the processes to be regulated.

5. The method according to claim 4, characterized in that When the process to be regulated is in a background running state, determining the priority of the process to be regulated includes: When the process to be regulated is in a background running state and the identifier of the process to be regulated exists in the second process list, determining that the process to be regulated has a first priority; When the process to be regulated is in the background running state and the time interval between starting the application corresponding to the process to be regulated and triggering the first application operation is less than the preset time interval, determining that the process to be regulated has the second priority; The first priority is higher than the second priority.

6. The method according to claim 1, characterized in that The updating of the identifier of each process to be regulated from the initial process group to the corresponding target process group includes: Taking the identifier of each process to be regulated from the initial process group and writing it into the cache mapping table; The identifier of the process to be regulated in the cache mapping table is written into the target process group.

7. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: When the operation of the second application to exit the camera application from the foreground is detected, the identifiers of the respective processes to be regulated are restored from the target process group to the initial process group.

8. A process processing device, characterized in that: The device comprises: A first determining module is configured to determine a process to be regulated corresponding to the camera application when a first application operation of switching the camera application to the foreground is detected; A second determination module is configured to determine a target process group corresponding to each process to be regulated based on the type of the process to be regulated; An updating module, configured to update the identifier of each of the processes to be regulated from the initial process group to the corresponding target process group; The system resources configured for the target process group are smaller than the system resources configured for the initial process group.

9. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to implement the steps of any one of the process processing methods in claims 1 to 7 when executed.

10. A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to execute the steps in any one of the process processing methods in claims 1 to 7.