Process grouping methods, electronic devices, chip systems and storage media
By prioritizing the allocation of desktop component process resources after the electronic device is unlocked, the problem of slow desktop component loading is solved, thus improving the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HONOR DEVICE CO LTD
- Filing Date
- 2024-11-25
- Publication Date
- 2026-05-26
AI Technical Summary
When electronic devices are unlocked for the first time after powering on, the desktop components take a long time to load, resulting in a poor user experience. This is mainly due to unreasonable allocation of system resources, which leads to insufficient resources for important processes and resource contention by non-important processes, thus affecting the user experience.
After the unlock operation, the process priority of the desktop component is increased according to the configuration file, and other processes' group change requests are intercepted, ensuring that the desktop component process gets more system resources and displays content in a timely manner.
It improves system performance and smoothness, ensures timely display of desktop components, and enhances user experience.
Smart Images

Figure CN122086580A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computers, and in particular to process grouping methods, electronic devices, chip systems, and storage media. Background Technology
[0002] Desktop widgets on a device's home screen can provide users with a more convenient application experience, allowing them to access information provided by the application without having to open it. For example, a widget for a fitness and health app can display information such as the user's steps for the day. Users can know their steps directly from the information displayed on the widget without having to open the app.
[0003] When electronic devices are powered on and unlocked for the first time, the loading time of desktop components can be long. Visually, after unlocking the device, the desktop may show various application icons, but the desktop components may be blank, which greatly affects the user experience. Summary of the Invention
[0004] This application provides a process grouping method, an electronic device, a chip system, and a storage medium that can display the content of desktop components in a timely manner, thereby improving system performance and smoothness.
[0005] In a first aspect, some embodiments of this application provide a process grouping method. This process grouping method may include: after an electronic device is powered on, setting a first process to a first group based on the system's native grouping mechanism, wherein the first process is the process corresponding to an application of a desktop component; in response to an unlock operation, updating the grouping of the first process from the first group to a second group according to a first configuration file, wherein the system resource allocation priority of processes in the second group is higher than that of processes in the first group, and the first configuration file is used to indicate setting the first process to the second group.
[0006] In this way, the processes related to the desktop component are processes that users can perceive. When the process corresponding to the desktop component application is allocated more system resources, the process corresponding to the desktop component application can be launched more quickly, thereby obtaining the data related to the desktop component, drawing the interface of the desktop component, and displaying the content of the desktop component in a timely manner, thus improving the user's sensory experience.
[0007] In one possible approach, the first configuration file also includes a first time, and the method further includes: receiving a first request within the first time after the screen is unlocked, the first request being used to request that the grouping of the first process be changed from the second group to the third group; intercepting the first request, wherein the system resource allocation priority of the processes in the second group is higher than the system resource allocation priority of the processes in the third group.
[0008] By using the above method, the first process can be controlled by intercepting group change requests for a period of time after the screen is unlocked. This ensures that the first process can be allocated more system resources in the first time, so that the first process can complete the corresponding data acquisition, interface rendering, etc.
[0009] In one possible approach, immediately after the screen is unlocked, the first request is blocked; the grouping of the first process is updated from the second group to the third group.
[0010] By using the above method, after the control of the first process ends, the group of the first process is restored to the group assigned by the system, thus avoiding the introduction of conflicts and other problems.
[0011] In one possible approach, after receiving the first request, the method further includes: caching the first request in a group cache; and setting the first process from a second group to a third group, including: retrieving the first request from the group cache and setting the first process from the second group to the third group based on the first request.
[0012] By caching historical requests in the above manner, the first process can be restored to the last set group after the control is completed, thus avoiding conflicts and other problems.
[0013] In one possible approach, if the first request is not received within the first time after the screen is unlocked, the interception of the first request is canceled after the first time after the screen is unlocked, and the first process is changed from the second group to the first group.
[0014] By using the above method, if no relevant requests are received during the control period, the first process will be restored to the group arranged by the system's native grouping mechanism after the control ends, thus avoiding affecting the native grouping mechanism.
[0015] In one possible approach, the first configuration file also includes a first time period, and the method further includes: after the electronic device is powered on, before the screen is unlocked, if the first process is not set to the first group based on the system's native grouping mechanism, the first process is set to the second group according to the first configuration file within the first time period after the screen is unlocked.
[0016] Using the above method, if the first process has not finished starting before the screen is unlocked, it can still be set as the second group, ensuring that the first process can be allocated more system resources.
[0017] Secondly, this application provides a process grouping device, which can be an electronic device, a device within an electronic device, or a device compatible with an electronic device; wherein, the device can also be a chip system, and the process grouping device can execute the methods executed by the electronic device in the first aspect. The functions of the process grouping device can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more units corresponding to the above functions. The unit can be software and / or hardware. The operations performed by the process grouping device and its beneficial effects can be found in the methods and beneficial effects described in the first aspect above, and will not be repeated here.
[0018] Thirdly, this application provides an electronic device including one or more processors and one or more memories. The one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program code, including computer instructions, which, when executed by the one or more processors, cause the electronic device to perform the process grouping method in any possible implementation of the first aspect described above.
[0019] Fourthly, this application provides a chip system including a processor and an interface, the processor and the interface being coupled; the interface is used to receive or output signals, and the processor is used to execute code instructions to perform the process grouping method in any possible implementation of the first aspect above.
[0020] Fifthly, this application provides a computer-readable storage medium storing a computer program / instructions that, when the computer program product is run on a computer, cause the computer to execute the process grouping method in any possible implementation of the first aspect described above.
[0021] Sixthly, this application provides a computer program product that, when run on a computer, causes the computer to execute the process grouping method in any possible implementation of the first aspect described above. Attached Figure Description
[0022] Figure 1 A schematic diagram of the desktop interface of an electronic device provided in an embodiment of this application;
[0023] Figure 2 A flowchart illustrating a process grouping method provided in an embodiment of this application;
[0024] Figure 3 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application;
[0025] Figure 4A schematic diagram of the software structure of an electronic device provided in an embodiment of this application;
[0026] Figure 5 A flowchart illustrating a process grouping method based on software architecture provided in an embodiment of this application;
[0027] Figure 6 A schematic diagram of an interface that displays the desktop after unlocking, provided as an embodiment of this application;
[0028] Figure 7 A flowchart illustrating process control provided in an embodiment of this application;
[0029] Figure 8 This is a schematic diagram of the structure of a process grouping device provided in an embodiment of this application;
[0030] Figure 9 This is a schematic diagram of the structure of a chip provided in an embodiment of this application. Detailed Implementation
[0031] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B; "and / or" in the text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.
[0032] It should be understood that the terms "first," "second," etc., in the specification, claims, and drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.
[0033] In this application, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described in this application can be combined with other embodiments.
[0034] To better understand the process grouping method provided in this application, the following is an introduction to the technical terms used in this application:
[0035] Desktop widgets are components displayed on the desktop of electronic devices. These widgets can be service cards, which are interactive cards that directly present the services or content most relevant to the user. Users can access important information through these service cards without opening applications. Clicking a service card can take the user to the corresponding application or a specific service page within an application. For example... Figure 1 As shown, Figure 1 The desktop widget marked 101 is a service card corresponding to the fitness and health app. This widget can display important information from the fitness and health app, such as today's steps and calorie consumption. After unlocking the screen, users can see today's steps and calorie consumption without opening the fitness and health app.
[0036] After an electronic device is powered on, the content displayed on the desktop widgets needs to be loaded before it can be shown when the user unlocks the screen for the first time. However, due to the security mechanisms of the electronic device's system (such as Android), applications are not allowed to access the user's encrypted data storage space until the user's password verification result is received. For example... Figure 1 Data such as today's steps displayed in desktop component 101 are not allowed to be accessed before the user's password verification result is received.
[0037] Furthermore, due to the broadcast registration mechanism of electronic devices, many applications rely on the notification broadcast after unlocking to start their processes and services. In other words, after an electronic device unlocks, it broadcasts a notification to all applications within the device, and each application, upon receiving this notification, starts its own process and services. This broadcast registration process can lead to a large number of tasks vying for system resources in a short period after unlocking, resulting in high load.
[0038] Meanwhile, the grouping algorithm of electronic device systems can lead to unreasonable process grouping, resulting in abnormal allocation of system resources. This causes some unimportant application processes, which are not perceived by the user, to occupy a large amount of system resources, while processes that truly affect the user experience are allocated only a small amount of system resources. In some cases, due to misjudgment, additional restrictions may be imposed, resulting in problems such as long loading times for desktop components and lag after unlocking.
[0039] Due to the system mechanism of the aforementioned electronic devices, the following scenario may occur: When an electronic device is unlocked for the first time after being powered on, the loading time of desktop components is long. Visually, after unlocking the device, various application icons are loaded on the desktop, but the desktop components are blank, which greatly affects the user experience.
[0040] To avoid the aforementioned problems, this application provides a process grouping method to promptly display desktop component content and improve system performance and smoothness. The following section combines... Figure 2 This application describes the process grouping method provided. Please refer to [link / reference]. Figure 2 As shown, Figure 2 This is a flowchart illustrating a process grouping method provided in an embodiment of this application. The process grouping method includes the following steps 201 and 202. Figure 2 The method shown can be executed by an electronic device. Or Figure 2 The subject of the method shown can be a chip or chip system in an electronic device, but this application does not limit it. Figure 2 The method will be explained using an electronic device as the executing entity. Specifically:
[0041] 201. After the electronic device is powered on, the electronic device sets the first process as the first group based on the system's native grouping mechanism. The first process is the process corresponding to the application of the desktop component.
[0042] Optionally, the system's native grouping mechanism can be the Android grouping mechanism, which groups processes based on their scores.
[0043] Optionally, the first process is the process corresponding to the application of the desktop component (or service card). For example... Figure 1 As shown, the first process can be Figure 1 The process corresponding to the application (sports and health) of desktop component 101.
[0044] Optionally, process grouping is related to the system resources allocated to them. The lower the group number, the more system resources are allocated. For example, if the first process is set to group number 0, it will be allocated the most system resources; if the first process is set to group number 4, it will be allocated fewer system resources.
[0045] 202. In response to the unlocking operation, the electronic device updates the group of the first process from the first group to the second group according to the first configuration file. The system resource allocation priority of the processes in the second group is higher than that of the processes in the first group. The first configuration file is used to indicate that the first process is set to the second group.
[0046] Optionally, the unlocking operation can be fingerprint unlocking, facial recognition unlocking, or password unlocking. This application does not restrict the unlocking operation.
[0047] Optionally, in this application, the unlocking operation refers to the user unlocking the electronic device, and the electronic device successfully verifying its functionality. In other words, the electronic device is successfully unlocked.
[0048] Optionally, the first configuration file can be pre-configured. For example, a configuration file set by the developers before the electronic device leaves the factory. This first configuration file is used to indicate that the first process is set as the second group.
[0049] Optionally, the application processes configured in this first configuration file are the application processes that the developer can perceive, as statistically analyzed by the user. For example, the application processes of each service card.
[0050] Optionally, the first configuration file includes information about at least one application, and the processes of the applications in the first configuration file are all assigned to the second group. For example, the first configuration file includes: application A, application B, and application C, and the processes of application A, application B, and application C are all set to the second group for a period of time after the electronic device is powered on and successfully unlocked.
[0051] Optionally, the first configuration file may include a mapping relationship between at least one application's process and a group. For example, the first configuration file may be: Application A—Second Group, Application B—Second Group, Application C—First Group. The process of Application A is set to the Second Group for a period of time after the electronic device is powered on and successfully unlocked; the process of Application B is set to the Second Group for a period of time after the electronic device is powered on and successfully unlocked; the process of Application C is set to the First Group for a period of time after the electronic device is powered on and successfully unlocked.
[0052] Optionally, the application configured in the first configuration file can be an application that is already installed on the electronic device or an application that is not installed on the electronic device; this application does not impose any restrictions on this.
[0053] In one possible embodiment, the electronic device updates the group of the first process from the first group to the second group according to the first configuration file, including: the electronic device loading the first configuration file when powered on; in response to an unlocking operation, determining whether the first configuration file includes the relevant configuration of the first process; if the first configuration file includes the relevant configuration of the first process, then updating the first group from the first group to the second group based on the first configuration file.
[0054] For example, after an electronic device is powered on, it launches the following three processes: process A (process of application A), process B (process of application B), and process C (process of application C). After receiving the user's unlock operation, the electronic device iterates through the three launched processes and finds that the first configuration file includes the relevant configuration of process B. The electronic device then regroups process B based on the first configuration file.
[0055] In one possible embodiment, the first profile is user-defined. Since desktop components are typically easily noticeable when a user unlocks their electronic device, and users can customize which applications are displayed on the desktop components, the first profile can be determined based on the user's selection of which desktop components to display.
[0056] In one possible embodiment, before each power-off, the electronic device determines a second application, which is an application that provides desktop component services on the desktop; based on the second configuration file and the second application, the electronic device determines a first configuration file, which is a configuration file pre-set by the developers of the electronic device before it leaves the factory and contains the relevant configurations of the processes of all applications that provide desktop component services. The first configuration file is included in the second configuration file, and the first configuration file includes the relevant configurations of the processes of the second application.
[0057] For example, the developers pre-configure a second profile: News App - Group 1, Health & Fitness App - Group 2, Gallery App - Group 1, Weather App - Group 1, and Courier App - Group 1. The user displays the desktop components of the News App and Health & Fitness App on the desktop (the second app is the News App and the Health & Fitness App). Before shutting down the electronic device, the first profile is determined to be: News App - Group 1 and Health & Fitness App - Group 2.
[0058] In other words, the second configuration file contains the process grouping configuration set by the developers for all applications that might be displayed as desktop widgets by the user, while the first configuration file contains the process grouping configuration determined from the second configuration file based on the applications that are actually displayed as desktop widgets for each user. This reduces the traversal time required to update the groupings according to the first configuration file after the phone is booted up and unlocked, thus saving energy.
[0059] Optionally, if a user removes the desktop widget of an application, the process configuration of that removed application will also be removed from the first configuration file before shutdown. For example, if the first configuration file is: News application - Group 1, Health application - Group 2, and the user removes the desktop widget of the News application from the desktop at some point, then before shutdown, the first configuration file determined by the electronic device will only include the group configuration of the Health application process.
[0060] Optionally, the determination of the first configuration file may occur before the shutdown operation or after the user operates on the desktop component process, and this application does not impose any restrictions on this.
[0061] The purpose of modifying the grouping of the first process after powering on and unlocking the electronic device is to ensure that processes perceptible to the user are allocated more system resources for faster content loading. Content loading takes time. To ensure successful loading of all content, during a certain control period after the electronic device's initial power-on and unlocking, any requests to modify the grouping of the first process (the controlled process) are blocked, keeping it within the group required by the first configuration file throughout the control period. Further details on controlling the first process are provided below:
[0062] In one possible embodiment, the first configuration file further includes a first time, and the method further includes: within a first time after the electronic device unlocks the screen, receiving a first request, the first request being used to request that the grouping of the first process be changed from the second group to the third group; the electronic device intercepts the first request, wherein the system resource allocation priority of the processes in the second group is higher than the system resource allocation priority of the processes in the third group.
[0063] The third group and the first group can be the same group or two different groups.
[0064] Optionally, the first time is set by the developers before the electronic device leaves the factory. The first time can be a fixed value or a value that varies flexibly based on the number of first processes. When there are more first processes, the first time can be longer, and vice versa. When there are fewer first processes, the first time can be shorter.
[0065] In one possible embodiment, the first configuration file also includes a ratio of time to the number of processes, and the method further includes: the electronic device determining the number of first processes; the electronic device determining a first time based on the number of first processes and the ratio of time to the number of processes.
[0066] Optionally, the first configuration file also includes a default time and a step size, and the method further includes: the electronic device determining the number of first processes; the electronic device determining a first time based on the number of first processes, the default time, and the step size.
[0067] For example, the default time configured in the first configuration file is 10 seconds, with a step size of 1 second. If the electronic device determines that the number of the first process is 3, then the first time determined by the electronic device is: 10 seconds + 1 second * 3 = 13 seconds; if the electronic device determines that the number of the first process is 1, then the first time determined by the electronic device is: 10 seconds + 1 second = 11 seconds.
[0068] In one possible embodiment, the electronic device intercepts the first request by inserting a stub in the OomAdjuster module.
[0069] The OomAdjuster module is a module used in the electronic device system to set process groups. The OomAdjuster module includes the following interface: the setProcessGroup interface. The electronic device can set process groups by calling the setProcessGroup interface.
[0070] In one possible embodiment, if the electronic device receives a first request through the setProcessGroup interface within the first moment after unlocking the screen, the electronic device intercepts the first request.
[0071] Optionally, this initial period after the screen is unlocked can also be referred to as the control period. During this period, the electronic device will block all requests to modify the grouping of the first process. This ensures that the first process is in the grouping indicated by the first profile during the control period.
[0072] In one possible embodiment, immediately after the screen is unlocked, the electronic device cancels the interception of the first request; the electronic device updates the grouping of the first process from the second grouping to the third grouping.
[0073] Optionally, control can be terminated immediately after the screen is unlocked, and the first request can be ignored. That is, if a request to change the group of the first process is received immediately after the screen is unlocked, the group of the first process can be changed based on that request.
[0074] In one possible embodiment, the method further includes: within a first time after unlocking the screen, and after receiving the first request, receiving a second request, the second request being used to request that the grouping of the first process be changed from the second group to the fourth group; intercepting the second request, wherein the system resource allocation priority of the processes in the second group is higher than the system resource allocation priority of the processes in the fourth group; and after the first time after unlocking the screen, canceling the interception of the second request and updating the grouping of the first process from the second group to the fourth group.
[0075] Optionally, if the electronic device receives multiple requests to change the grouping within the first time period after the screen is unlocked, the grouping of the first process is changed based on the latest request. That is, upon recovery, the grouping of the first process is restored to the grouping indicated by the latest request to change the grouping.
[0076] In one possible embodiment, after the electronic device receives the first request, the method further includes: the electronic device caching the first request in a group cache; the electronic device setting the first process from a second group to a third group, including: the electronic device retrieving the first request from the group cache, and setting the first process from the second group to the third group based on the first request.
[0077] Optionally, group caching is used to cache all group change requests received in the first short time after the screen is unlocked regarding the first process.
[0078] Optionally, the electronic device will cache all group change requests for the first process received within the first time after the screen is unlocked into the group cache; the electronic device will change the first process from the second group to the third group, including: the electronic device retrieves the last group change request from the group cache, and changes the first process from the second group to the third group based on the last group change request.
[0079] Optionally, the electronic device will update the group change request for the first process received within the first time after the screen is unlocked into the group cache. There is only one group request for the first process in the group cache, and this group request is the last request to change the group. The electronic device sets the first process from the second group to the third group, including: the electronic device retrieves the group request for the first process from the group cache, and sets the first process from the second group to the third group based on the group request.
[0080] In other words, the group cache can include historically received change group requests, or it can only cache the latest change group requests.
[0081] In one possible embodiment, if no first request is received within a first time after the screen is unlocked, the first request is unblocked after the first time after the screen is unlocked, and the first process is changed from the second group to the first group.
[0082] In other words, if the electronic device does not receive the first request within a certain period after the screen is unlocked, the grouping of the first process will be restored to the first group after a certain period of time. This avoids affecting the native grouping mechanism's judgment and setting process for the first process.
[0083] The first process mentioned above refers to the process that starts after the electronic device is powered on but before the screen is unlocked. In other words, this first process has already been grouped by the system before the grouping is set based on the first configuration file. However, some processes are launched only after the screen is unlocked; these processes have not been grouped before the grouping is set based on the first configuration file. Optionally, this process could also be one of these processes that has not been grouped.
[0084] In one possible embodiment, the first configuration file also includes a first time, and the method further includes: after the electronic device is powered on, before the screen is unlocked, if the first process is not set to the first group based on the system's native grouping mechanism, in the first time after the screen is unlocked, setting the first process to the second group according to the first configuration file.
[0085] Optionally, the first process is the process that occurs within the first time after the screen is unlocked, and whose configuration information is included in the first configuration file, and which has not triggered a change group request.
[0086] The hardware structure of electronic devices is described below:
[0087] Please see Figure 3 , Figure 3 This is a schematic diagram of the hardware structure of the electronic device 100 provided in this application embodiment. The electronic device 100 can be an electronic device corresponding to the training phase or an electronic device corresponding to the application phase.
[0088] Electronic device 100 may include processor 110, external memory interface 120, internal memory 121, universal serial bus (USB) interface 130, charging management module 140, power management module 141, battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0089] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0090] Processor 110 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0091] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of fetching and executing instructions.
[0092] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can directly retrieve it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system. The processor 110 retrieves the instructions or data stored in the memory, causing the electronic device 100 to execute the imaging method performed by the electronic device in the following method embodiments.
[0093] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0094] The charging management module 140 is used to receive charging input from the charger. The charger can be a wireless charger or a wired charger.
[0095] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to power the processor 110, internal memory 121, external memory, display 194, camera 193, and wireless communication module 160, etc. In some other embodiments, the power management module 141 may also be located in the processor 110.
[0096] The wireless communication function of electronic device 100 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.
[0097] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with tuning switches.
[0098] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.
[0099] A modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor.
[0100] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLAN) (such as Wi-Fi networks), Bluetooth (BT), BLE broadcasting, global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.
[0101] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, so that electronic device 100 can communicate with networks and other devices through wireless communication technology.
[0102] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0103] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. In some embodiments, electronic device 100 may include one or N displays screens 194, where N is a positive integer greater than 1. Display screen 194 may include OLED screens.
[0104] Optionally, the display 194 may further include: an OLED glass layer, an OLED light-emitting unit, a fingerprint recognition sensor, a microlens array, etc. The display 194 supports optical in-display fingerprint recognition.
[0105] Electronic device 100 can perform shooting functions through an ISP, camera 193, video codec, GPU, display screen 194, and application processor. The ISP processes data fed back by the camera 193. The camera 193 captures still images or videos. The camera 193 may include a front-facing camera and a rear-facing camera; the front-facing camera is located on the display area of the screen, and the rear-facing camera is located on the back area of the screen. The digital signal processor processes digital signals, including digital image signals and other digital signals. The video codec is used to compress or decompress digital video. Electronic device 100 may support one or more video codecs.
[0106] NPU stands for Neural-Network (NN) Computing Processor. By drawing inspiration from the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it can quickly process input information and continuously learn on its own.
[0107] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to perform data storage functions.
[0108] Internal memory 121 can be used to store computer executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of electronic device 100 by running the instructions stored in internal memory 121. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as a sound playback function), etc. The data storage area may store data created during the use of electronic device 100 (such as audio data), etc. Furthermore, internal memory 121 may include high-speed random access memory and may also include non-volatile memory, such as flash memory devices.
[0109] Electronic device 100 can implement audio functions, such as music playback and recording, through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.
[0110] The audio module 170 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 may be located in the processor 110, or some functional modules of the audio module 170 may be located in the processor 110.
[0111] A speaker 170A, also called a "loudspeaker," is used to convert audio electrical signals into sound signals. A receiver 170B, also called a "handpiece," is used to convert audio electrical signals into sound signals. A microphone 170C, also called a "microphone" or "voice transducer," is used to convert sound signals into electrical signals. A headphone jack 170D is used to connect wired headphones. A pressure sensor 180A is used to sense pressure signals and can convert the pressure signals into electrical signals. In some embodiments, the pressure sensor 180A may be located on the display screen 194. A gyroscope sensor 180B can be used to determine the motion posture of the electronic device 100. A barometric pressure sensor 180C is used to measure barometric pressure. A magnetic sensor 180D includes a Hall effect sensor. An accelerometer 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes). A distance sensor 180F is used to measure distance. A proximity sensor 180G may include, for example, a light-emitting diode (LED) and a photosensor. An ambient light sensor 180L is used to sense ambient light intensity. A fingerprint sensor 180H is used to collect fingerprints. Temperature sensor 180J is used to detect temperature. Touch sensor 180K, also known as a "touch panel," can be located on display screen 194. The touch sensor 180K and display screen 194 together form a touchscreen, also known as a "touch screen." Touch sensor 180K detects touch operations applied to or near it. Bone conduction sensor 180M can acquire vibration signals. Buttons 190 include power button, volume buttons, etc. Motor 191 can generate vibration prompts. Indicator 192 can be an indicator light, used to indicate charging status, battery level changes, messages, missed calls, notifications, etc. SIM card interface 195 is used to connect a SIM card.
[0112] Furthermore, an operating system runs on top of the aforementioned components. Examples include iOS and Android. The operating system of electronic device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application embodiment uses the layered architecture Android system as an example to exemplify the software structure of electronic device 100. It should be noted that although this application embodiment uses the Android system as an example for illustration, its basic principles are equally applicable to electronic devices with other operating systems.
[0113] The software architecture of electronic devices is described below:
[0114] Figure 4This is a software structure block diagram of the electronic device 100 according to an embodiment of this application. The software structure adopts a layered architecture, which divides the software into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces. In this embodiment, the operating system (taking Android as an example) can be divided into four layers, from top to bottom: application layer (APP), application framework layer (FWK), hardware abstraction layer (HAL), and kernel layer.
[0115] The application layer can include a series of application packages, which may include system-provided applications and third-party applications. For example... Figure 4 As shown, this application layer includes features such as gallery, news, fitness and health, and Bluetooth. Some applications may provide desktop widget services, such as gallery, news, and fitness and health.
[0116] The application framework layer provides application developers with an application programming interface (API) framework for accessing core functionalities, as well as various services and management tools, including window management, activity management, and feature extensions. The application framework layer also includes some predefined functions, such as functions related to screen lock / unlock. Figure 4 As shown, the application framework layer can include: window management, activity management, and Vendor module.
[0117] Window Manager (WM) is responsible for managing the layout, display, and interaction of application windows with other windows. Window Manager ensures the correct display and interaction of application windows, allowing multiple applications to run simultaneously on the screen without interfering with each other.
[0118] The window management may include screen unlock related functions and a proxy module, which can be used to implement all or part of the steps of the process grouping method provided in the embodiments of this application.
[0119] Activity Manager (AM) is a core service responsible for managing the application lifecycle and system runtime status. It provides a set of APIs that allow developers to query system status, retrieve information about running tasks, and manage background processes. Activity Manager ensures the correct startup and shutdown of applications while monitoring system resource usage to optimize device performance and extend battery life.
[0120] This activity management also includes OomAdjusterSetProcessGroup, a class in the Android system used to set OOM (Out Of Memory) tuning policies for process groups. The OomAdjusterSetProcessGroup class plays a crucial role in the Android system, primarily managing application memory usage. Through this class, the system can apply specific OOM tuning policies to specific process groups to optimize memory management and improve device performance. The main functions of the OomAdjusterSetProcessGroup class include: setting process grouping: the setProcessGroup method allows you to set the group for a specified process; getting the current process group: the getProcessGroup method allows you to query the grouping of currently used processes.
[0121] The window management may include a proxy module, which can be used to implement all or part of the steps of the process grouping method provided in the embodiments of this application.
[0122] Vendors are primarily used to store hardware-related code and resources. Vendors also allow manufacturers to add extra features or services that may not be available in the standard Android version, thus providing users with more choices and a better experience.
[0123] The Vendor includes a proactive group setting module, a persistent group management module, and a group recovery module. The proactive group setting module is used for: obtaining process information, setting groups according to the first configuration file, and group caching. The persistent group management module is used for: enabling the management module, sending timer messages, intercepting group changes, and group caching. The group recovery module is used for process verification, group recovery, and disabling the management module.
[0124] The Hardware Abstraction Layer (HAL) provides an abstraction layer between the physical hardware and the software application layer, enabling application developers to access the underlying hardware through a unified interface without needing to concern themselves with the specific implementation details. For example... Figure 2 As shown, this hardware abstraction layer may include fingerprint HAL and SurfaceFlinger.
[0125] Among them, Fingerprint HAL provides a secure, efficient, and scalable solution that enables Android devices to leverage fingerprint recognition technology to offer richer and more secure user services.
[0126] SurfaceFlinger is primarily responsible for compositing layers from different sources into the final display output. These layers may come from different applications or system services. When an image layer changes, such as being resized, repositioned, or having its content updated, SurfaceFlinger recalculates the compositing parameters for that layer.
[0127] The kernel layer is responsible for managing system hardware resources and providing necessary services to applications. This kernel layer includes drivers for various hardware devices, which are responsible for controlling and operating these devices. Figure 3 As shown, this kernel layer includes: touchscreen driver, fingerprint driver, display driver, etc.
[0128] The touchscreen driver is responsible for recognizing and processing user touch input, converting it into commands that the electronic device can understand and respond to. This driver accurately captures user actions on the touchscreen, including taps, swipes, zooms, and presses. Furthermore, the driver can transmit the captured events to the operating system for processing.
[0129] The fingerprint driver is responsible for managing and verifying the user's fingerprint data. It captures the user's fingerprint image using the fingerprint sensor integrated into the phone. When the user attempts to unlock the phone or perform other security verifications using their fingerprint, the fingerprint driver is responsible for matching and verifying the newly captured fingerprint data against the stored fingerprint data.
[0130] The display driver is a core component responsible for managing the mobile phone screen display. It receives image data from the processor and converts this image data into a display format that the screen can recognize.
[0131] The process grouping method provided in this application will be further described below in conjunction with the software architecture of the electronic device described above. Please refer to [link / reference]. Figure 5 As shown, Figure 5 This is a flowchart illustrating another process grouping method provided in an embodiment of this application. Figure 5 The ActivityTaskManager in the code can also be called ATMS. ATMS includes functions related to unlocking animations. ATMS can interact with self-developed modules through the proxy module. For ease of description, it will be referred to as ATMS below.
[0132] The self-developed modules include the above. Figure 4The system includes an active intervention grouping setting module, a group continuous management module, and a group recovery module. The process grouping method provided in this application embodiment can be executed by this self-developed module. This self-developed module can achieve product isolation, and the parameters in this self-developed module (e.g., parameters in the first configuration file) can be customized based on the chip capabilities of the electronic device before it leaves the factory. For example, the first time interval can be set longer as the chip capability increases.
[0133] OomAdjuster is primarily used to group processes, and it can also calculate process scores. OomAdjuster can interact with self-developed modules through a proxy module.
[0134] 501. The self-developed module loads the first configuration file when it starts up.
[0135] The first configuration file can be found in the above-mentioned configuration file. Figure 2 The description of the first configuration file is not repeated here.
[0136] 502. Upon first unlocking after power-on, the self-developed module sets up grouping for the first process based on the first configuration file.
[0137] Since the loading of the electronic device perceived by the user starts after the ATMS unlock animation, and the encrypted storage space of the Android system also ends according to the security control of the unlock verification, when the screen is unlocked for the first time after booting up, the first process is grouped according to the first configuration file, which can more quickly ensure the system smoothness perceived by the user.
[0138] Optionally, the screen unlocking method can be facial recognition, fingerprint unlocking, or password unlocking, etc. This application does not limit the screen unlocking method. Figure 6 As shown, you can unlock the desktop using your fingerprint.
[0139] 503. OomAdjuster manages the first process based on the first configuration file using SetProcessGroup.
[0140] Optionally, the first configuration file includes a first time period, and the duration for which the first time period is controlled is the first time period.
[0141] Optionally, during the control period, OomAdjuster can also query group configuration information from the self-developed module. The self-developed module, in response to the query, returns the group configuration information to OomAdjuster. OomAdjuster, having obtained this group configuration information, can dynamically update the primary configuration file, etc. Alternatively, it can adjust the control time appropriately when the electronic device's system resources are insufficient.
[0142] In one possible embodiment, OomAdjuster obtains group configuration information and manages the first process based on the group configuration information and the first configuration file.
[0143] Optionally, the group configuration information includes the grouping status of each process. When the number of processes assigned to a high-priority group exceeds a threshold, OomAdjuster shortens the control time.
[0144] 504. If the unlock time exceeds the first time, the self-developed module will end its control over the first process; the self-developed module will restore the first process to the group last set by OomAdjuster.
[0145] Optionally, the process for controlling and responding to the first process can be found above. Figure 2 The relevant descriptions in the original text are not repeated here.
[0146] The following is combined Figure 7 The process management process will be further described below. The entity responsible for implementing this process management can be one of the aforementioned entities. Figure 4 The group continuous management module in the system.
[0147] After OomAdjuster sets up groups, the group continuous management module determines whether the process is within the management period.
[0148] Optionally, the continuous group control module determines whether the process is within the control period based on the timer msg and the first time in the first configuration file. This continuous group control module includes a timer that starts counting after the first unlock. The module obtains the timer msg through the timer and determines whether the process is within the control period by comparing the timer msg with the first time.
[0149] If the process is under control, the group continuous control module will determine whether the process belongs to the list of controlled processes; otherwise, the callback notification will not be intercepted.
[0150] Optionally, the process control list is configured in the first configuration file, and the group persistent management module obtains the process control list when the configuration file is loaded. Since the configuration file is loaded at boot time, the group persistent management module obtains the process control list at boot time.
[0151] If the process is on the process management list and is currently under management, the group continuous management module will obtain the process information.
[0152] Optionally, the process information includes the process ID, group information, and whether control measures have been triggered.
[0153] Optionally, the continuous group management module determines whether management has been triggered. Specifically, the continuous group management module determines whether management has been triggered based on historically received group change requests. Alternatively, the continuous group management module determines whether management has been triggered based on the group cache.
[0154] Since group change requests are cached in the group cache, if there is a group change request for a certain process in the group cache, then that process has triggered control.
[0155] If a control measure has been triggered, the group continuous control module will update the group cache; otherwise, the group continuous control module will actively set the target group.
[0156] Optionally, the target group is the group set for the process in the first configuration file.
[0157] The callback notification that was intercepted after updating the group cache is used to indicate that the interception was successful.
[0158] Please see Figure 8 , Figure 8 This is a schematic diagram of the structure of a process grouping device 800 provided in an embodiment of this application. Figure 8 The process grouping device shown can be an electronic device, a device within an electronic device, or a device that can be used in conjunction with an electronic device. Figure 8 The process grouping device shown may include a processing unit 801 and a receiving unit 802. Wherein:
[0159] The processing unit 801 is used to set a first process to a first group based on the system's native grouping mechanism after the electronic device is powered on. The first process is the process corresponding to the application of the desktop component. In response to the unlocking operation, the group of the first process is updated from the first group to the second group according to the first configuration file. The system resource allocation priority of the processes in the second group is higher than that of the processes in the first group. The first configuration file is used to indicate that the first process is set to the second group.
[0160] In one possible embodiment, the receiving unit 802 is configured to receive a first request within a first time after the screen is unlocked, the first request being used to request that the grouping of the first process be changed from the second grouping to the third grouping;
[0161] The processing unit 801 is also used to intercept the first request, and the system resource allocation priority of the processes in the second group is higher than that of the processes in the third group.
[0162] In one possible embodiment, the processing unit 801 is further configured to cancel the interception of the first request immediately after the screen is unlocked; and update the group of the first process from the second group to the third group.
[0163] In one possible embodiment, the processing unit 801 is further configured to cache the first request in a group cache; retrieve the first request from the group cache; and, based on the first request, set the first process from the second group to the third group.
[0164] In one possible embodiment, the processing unit 801 is further configured to, if no first request is received within a first time after the screen is unlocked, cancel the interception of the first request and set the first process from the second group to the first group.
[0165] In one possible embodiment, the processing unit 801 is further configured to, in the first time after unlocking the screen, set the first process to the second group according to the first configuration file if the first process is not set to the first group based on the system's native grouping mechanism.
[0166] For cases where the process grouping device can be a chip or a chip system, please refer to [link / reference]. Figure 9 The diagram shows the structure of the chip. Figure 9 The chip 900 shown includes a processor 901 and an interface 902. Optionally, it may also include a memory 903. The number of processors 901 can be one or more, and the number of interfaces 902 can be multiple.
[0167] For cases where the chip is used to implement the electronic device in the embodiments of this application:
[0168] The interface 902 is used to receive or output signals;
[0169] The processor 901 is used to perform data processing operations of the electronic device.
[0170] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
[0171] It is understood that some optional features in the embodiments of this application can be implemented independently in certain scenarios without relying on other features, such as the current solution on which they are based, to solve the corresponding technical problems and achieve the corresponding effects. Alternatively, they can be combined with other features as needed in certain scenarios. Accordingly, the process grouping device given in the embodiments of this application can also implement these features or functions, which will not be elaborated here.
[0172] It should be understood that the processor in the embodiments of this application can be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the above method embodiments can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor described above can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0173] It is understood that the memory in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM). It should be noted that the memory used in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0174] This application also provides a computer-readable storage medium storing a computer program, the computer program including program instructions that, when executed on an electronic device, implement the functions of any of the above method embodiments.
[0175] This application also provides a computer program product that, when run on a computer, enables the computer to perform the functions of any of the above method embodiments.
[0176] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., high-density digital video discs (DVDs)), or semiconductor media (e.g., solid-state disks (SSDs)).
[0177] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A process grouping method, characterized in that, The method includes: After the electronic device is powered on, the first process is set as the first group based on the system's native grouping mechanism. The first process is the process corresponding to the application of the desktop component. In response to the unlock operation, the group of the first process is updated from the first group to the second group according to the first configuration file. The system resource allocation priority of the processes in the second group is higher than that of the processes in the first group. The first configuration file is used to indicate that the first process is set to the second group.
2. The method according to claim 1, characterized in that, The first configuration file also includes a first time, and the method further includes: Within the first time period after the screen is unlocked, a first request is received, the first request being used to request that the group of the first process be changed from the second group to the third group; The first request is intercepted, and the system resource allocation priority of the processes in the second group is higher than that of the processes in the third group.
3. The method according to claim 2, characterized in that, The method further includes: After the screen is unlocked, the first request is blocked immediately. Update the grouping of the first process from the second group to the third group.
4. The method according to claim 3, characterized in that, After receiving the first request, the method further includes: Cache the first request in the group cache; The step of setting the first process from the second group to the third group includes: The first request is retrieved from the group cache, and based on the first request, the first process is changed from the second group to the third group.
5. The method according to claim 2, characterized in that, The method further includes: If the first request is not received within the first time period after the screen is unlocked, the first request is unblocked after the first time period after the screen is unlocked, and the first process is changed from the second group to the first group.
6. The method according to any one of claims 1-5, characterized in that, The first configuration file also includes a first time, and the method further includes: If the first process is not set to the first group based on the system's native grouping mechanism after the electronic device is powered on but before the screen is unlocked, the first process is set to the second group according to the first configuration file within the first time period after the screen is unlocked.
7. An electronic device comprising one or more memories and one or more processors, characterized in that, The memory is used to store a computer program; the processor is used to invoke the computer program, causing the electronic device to perform the method of any one of claims 1-6.
8. A chip system for use in electronic devices, characterized in that, The chip system includes at least one processor and an interface for receiving instructions and transmitting them to the at least one processor; the at least one processor executes the instructions to cause the electronic device to perform the method as described in any one of claims 1-6.
9. A computer-readable storage medium having a computer program / instructions stored thereon, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method as described in any one of claims 1-6.
10. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method as described in any one of claims 1-6.