Processor resource management method and system, vehicle terminal and storage medium

CN119597482BActive Publication Date: 2026-11-03CHENGDU CELIS TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411760350.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-03
Publication Date
2026-11-03
Estimated Expiration
2044-12-03

AI Technical Summary

Technical Problem

The lack of an effective control mechanism for abnormal CPU usage in existing technologies leads to a decline in system performance and abnormal phenomena such as lag, black screen, or even restart.

Method used

By obtaining multiple instantaneous usage rates of each application process, it is determined whether its processor usage is normal, and dynamic management is carried out according to a multi-level management list, including moving processes into or out of the multi-level management list step by step, and setting a whitelist of application processes to ensure that important processes are not affected.

Benefits of technology

It improves the reliability of processor utilization assessment and the smoothness of system operation, avoids system performance degradation, ensures that the processor utilization of each application process is within a reasonable range, and improves system performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119597482B_ABST
    Figure CN119597482B_ABST
Patent Text Reader

Abstract

The application provides a processor resource management and control method and system, a vehicle terminal and a storage medium. The method comprises the following steps: acquiring multiple instantaneous usage rates of each application process with respect to a processor; for any application process, determining whether the processor usage rate of the any application process is normal according to the multiple instantaneous usage rates; if the processor usage rate is normal, moving the any application process out of a multi-level management and control list step by step, wherein the multi-level management and control list is used for hierarchical management and control of application processes with abnormal processor usage rates; and if the processor usage rate is abnormal, moving the any application process into the multi-level management and control list step by step, and dynamically managing and controlling the any application process. Through the multi-level management and control list and based on the multiple instantaneous usage rates, the application process with an abnormal processor usage rate is subjected to multi-level management and control processing, thereby improving the system running fluency and ensuring the system running performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of processor resource management technology, and in particular to a processor resource management method, system, vehicle terminal and storage medium. Background Technology

[0002] In modern intelligent devices, the efficient utilization of CPU (Central Processing Unit) resources is one of the key factors ensuring smooth system operation. This is especially true in devices with high demands for high-performance computing and multitasking capabilities, where the rational allocation and management of CPU resources is paramount. To achieve efficient resource sharing, advanced resource management techniques are typically employed to optimize system performance; therefore, the effective management and optimization of processor resources has become an important research direction.

[0003] In a multitasking operating system environment, various applications and services run, each consuming CPU resources. Without an effective CPU resource management mechanism, the increasing number and complexity of applications can lead to excessive CPU load, impacting system responsiveness and stability. When certain applications exhibit extremely high CPU usage, the lack of proper monitoring and handling can cause overall system performance degradation, resulting in stuttering, black screens, or even restarts. Currently, the industry lacks a robust control mechanism for abnormal CPU usage by various applications, severely hindering system performance. Summary of the Invention

[0004] In view of the shortcomings of the prior art described above, this application discloses a processor resource management method, system, vehicle terminal and storage medium to solve the technical problem of poor management effect of abnormal processor utilization of various applications in the system in the prior art.

[0005] In a first aspect, this application provides a processor resource management method, the method comprising: acquiring multiple instantaneous processor utilization rates for each application process; for any application process, determining whether the processor utilization rate of any application process is normal based on the multiple instantaneous utilization rates; if normal, removing any application process from a multi-level management list step by step, the multi-level management list being used for hierarchical management of application processes with abnormal processor utilization rates; if abnormal, moving any application process into the multi-level management list step by step, thereby performing dynamic management of any application process.

[0006] In one embodiment of this application, the configuration method of the multi-level control list includes: dividing multiple control levels according to the number of consecutive abnormal usage rates from low to high; configuring multiple control sub-tables according to the multiple control levels from low to high, and generating the multi-level control list.

[0007] In one embodiment of this application, the step of moving any application process into the multi-level control list includes: if any application process is not in the multi-level control list, then moving any application process into the lowest-level control sub-list; if any application process is in the multi-level control list and is not in the highest-level control sub-list, then moving any application process from the current control sub-list to a higher-level control sub-list, until terminating any application process from the highest-level control sub-list.

[0008] In one embodiment of this application, the step of removing any application process from the multi-level control list includes: if any application process is not in the lowest-level control sub-list, then moving any application process from the current control sub-list to a lower-level control sub-list; if any application process is in the lowest-level control sub-list, then removing any application process from the multi-level control list.

[0009] In one embodiment of this application, determining whether the processor utilization of any application process is normal based on a plurality of instantaneous utilization rates includes: counting the number of a plurality of instantaneous utilization rates and calculating the average value of a plurality of instantaneous utilization rates; calculating an average score based on the average value and a preset average score standard, and calculating an instantaneous score based on the number and a preset instantaneous score standard; and determining whether the processor utilization of any application process is normal based on the average score and the instantaneous score.

[0010] In one embodiment of this application, determining whether the processor utilization rate of any application process is normal based on the average score and the instantaneous score includes: performing a weighted calculation on the average score and the instantaneous score to obtain a target score; comparing the target score with a preset score threshold; if the target score is less than or equal to the score threshold, determining that the processor utilization rate of any application process is normal; if the target score is greater than the score threshold, determining that the processor utilization rate of any application process is abnormal.

[0011] In one embodiment of this application, before determining whether the processor utilization of any application process is normal based on the multiple instantaneous utilization rates, the method further includes: setting an application process whitelist, wherein application processes in the application process whitelist are not subject to hierarchical control of processor resources; if any application process is in the application process whitelist, then no hierarchical control is performed on any application process; if any application process is not in the application process whitelist, then the determination operation of whether the processor utilization is normal is performed.

[0012] Secondly, this application provides a processor resource management system, the system comprising: an acquisition module for acquiring multiple instantaneous processor utilization rates of each application process; a judgment module for determining, based on the multiple instantaneous utilization rates, whether the processor utilization rate of any application process is normal; a management module for, if normal, removing any application process from a multi-level management list, the multi-level management list being used for storing and managing application processes with abnormal processor utilization rates in a hierarchical manner; the management module is further configured to, if abnormal, move any application process into the multi-level management list, thereby dynamically managing any application process.

[0013] Thirdly, this application provides an in-vehicle terminal, including: one or more processors; and a storage device for storing one or more programs, wherein when the one or more programs are executed by one or more processors, the in-vehicle terminal implements the processor resource management method described in the first aspect.

[0014] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a computer's processor, causes the computer to perform the processor resource management method as described in the first aspect.

[0015] As described above, the processor resource management method, system, vehicle terminal, and storage medium provided in this application have the following beneficial effects:

[0016] First, multiple instantaneous processor usage values ​​for each application process are obtained. Then, for any application process, the processor usage is assessed based on these instantaneous usage values ​​to determine if it is normal. If the processor usage is normal, the application process is removed from the multi-level control list. This multi-level control list is used to manage application processes with abnormal processor usage in a tiered manner. If the processor usage is abnormal, the application process is moved into the multi-level control list. This dynamic management of application processes, using multiple instantaneous usage values ​​to determine whether the processor usage of any application process is normal or abnormal, improves the reliability of the judgment results. By setting up a multi-level control list and combining the precise results of normal or abnormal processor usage values ​​for each application process, multi-level control is applied to application processes with abnormal processor usage. This mechanism ensures that the processor resource usage of each application process within the system is within a reasonable range, thereby improving system smoothness and performance.

[0017] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description

[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. In the drawings:

[0019] Figure 1 This is a schematic diagram illustrating an implementation environment of a processor resource management system, as shown in an exemplary embodiment of this application.

[0020] Figure 2 This is a flowchart illustrating a processor resource management method in an exemplary embodiment of this application;

[0021] Figure 3 This is a schematic diagram illustrating an in-vehicle infotainment system as shown in an exemplary embodiment of this application;

[0022] Figure 4 This is a flowchart illustrating a pre-configured whitelist process configuration file for an in-vehicle infotainment system, as shown in an exemplary embodiment of this application.

[0023] Figure 5 This is a flowchart illustrating a three-level processor resource management method in an exemplary embodiment of this application;

[0024] Figure 6This is a flowchart illustrating a specific processor resource management method in an exemplary embodiment of this application;

[0025] Figure 7 This is a block diagram illustrating a processor resource management system as shown in an exemplary embodiment of this application;

[0026] Figure 8 This is a schematic diagram of the structure of an in-vehicle terminal provided in an exemplary embodiment of this application. Detailed Implementation

[0027] The embodiments of this application will be described below with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. This application can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this application. It should be understood that the preferred embodiments are only for illustrating this application and are not intended to limit the scope of protection of this application.

[0028] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of this application. Therefore, the illustrations only show the components related to this application and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the shape, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.

[0029] In the following description, numerous details are explored to provide a more thorough explanation of embodiments of the present application. However, it will be apparent to those skilled in the art that embodiments of the present application may be practiced without these specific details. In other embodiments, well-known structures and devices are shown in block diagram form rather than in detail to avoid obscuring embodiments of the present application.

[0030] First, it's important to note that efficient CPU resource utilization is a key factor in ensuring smooth system operation, especially in devices with high-performance computing and multitasking requirements. The proper allocation and management of CPU resources are crucial in these situations. Without an effective CPU resource management mechanism, the increasing number and complexity of applications can lead to excessive CPU load, impacting system responsiveness and stability. When certain applications have very high CPU usage, the lack of a proper mechanism to monitor and handle this can cause a decline in overall system performance, resulting in stuttering, black screens, or even restarts. However, the inventors of this application have found that the industry currently lacks a control mechanism for abnormal CPU usage by various applications within a system, which severely affects system performance.

[0031] Therefore, please see Figure 1 , Figure 1 This is a schematic diagram illustrating an implementation environment of a processor resource management system, as shown in an exemplary embodiment of this application. Figure 1 As shown, the implementation environment includes a vehicle 110 and a processor resource management system 120. The processor resource management system 120 is embedded in the vehicle 110 and is used to manage the processor resources of the system in the vehicle 110. The processor resource management system 120 includes, but is not limited to, the vehicle infotainment system and the vehicle computer. By judging the processor utilization of any application process as normal or abnormal through multiple instantaneous utilization rates, the reliability of the judgment results is improved. By setting up a multi-level management list and combining the accurate results of the normal or abnormal processor utilization of each application process, multi-level management processing is performed on application processes with abnormal processor utilization. Under this mechanism, the processor resource usage of each application process can be kept within a reasonable range, thereby improving the smoothness of system operation and enhancing system performance.

[0032] Please see Figure 2 , Figure 2 This is a flowchart illustrating a processor resource management method in an exemplary embodiment of this application. This method can be applied to... Figure 1 The implementation environment shown is intended to illustrate a method that can also be applied to other exemplary implementation environments. This embodiment does not limit the implementation environment to which the method is applicable.

[0033] In addition, in this embodiment of the application, the processor resource management method can be applied to the Android system, that is, it can be applied to Android mobile devices, such as mobile phones and in-vehicle systems. For example, it can be applied to processor resource management in in-vehicle systems, and perform multi-level management of processor usage of various Android applications.

[0034] Please see Figure 3 , Figure 3 This is a schematic diagram illustrating an in-vehicle infotainment system as an exemplary embodiment of this application. The in-vehicle infotainment system may be a Qualcomm 8155 in-vehicle infotainment system. It should be understood that, in this embodiment, the processor resource management method is applicable to various in-vehicle infotainment systems. Figure 3As shown, this vehicle infotainment system employs a virtualized dual-system architecture, comprising the QNX operating system and the Android operating system. It utilizes HyperVision (virtualization architecture) to achieve processor and memory virtualization, thereby sharing hardware resources (memory and processor resources, etc.). The CPU resources of the vehicle infotainment system are a crucial hardware resource, and CPU load often determines the system's smoothness. These CPU resources are shared by both the QNX and Android operating systems. For example, the 8155 vehicle infotainment system has a total computing power of 105 KDMIPS, with 8 cores. Cores 0 and 1 are allocated to the QNX operating system, while cores 2-7 are allocated to the Android operating system using a VCPU (Virtual Central Processing Unit) approach, representing 600% of the total computing power. The QNX operating system, as the master system, primarily handles instrument cluster applications, while the Android operating system, as the slave system, primarily handles central infotainment applications. The Android operating system contains various in-vehicle applications, such as vehicle settings, Bluetooth phone, multimedia, dashcam, 360-degree surround view, air conditioning settings, voice control, and virtual avatars. Each application consumes CPU resources, and these applications compete for CPU resources. If the CPU load is too high, it can cause the entire vehicle system to lag, experience black screens, or even restart. The processor resource management method provided in this application improves the reliability of the judgment by using multiple instantaneous usage rates to determine whether the processor usage of any application process is normal or abnormal. By setting up a multi-level control list and combining the precise results of normal or abnormal processor usage for each application process, multi-level control is applied to application processes with abnormal processor usage. This mechanism ensures that the processor resource usage of each application process within the system is within a reasonable range, preventing lag, black screens, and even restarts in the vehicle system, thereby improving system smoothness and performance.

[0035] like Figure 2 As shown, in an exemplary embodiment, the processor resource management method includes at least steps S210 to S240, which are described in detail below:

[0036] Step S210: Obtain multiple instantaneous processor usage rates for each application process.

[0037] It should be noted that this application embodiment does not limit the number of instantaneous usage rates. Furthermore, the collection interval between different instantaneous usage rates can be set according to specific requirements.

[0038] Step S220: For any application process, determine whether the processor utilization of any application process is normal based on multiple instantaneous utilization rates.

[0039] In this embodiment, the reliability of the judgment result is improved by using multiple instantaneous usage rates to determine whether the processor usage of any application process is normal or abnormal.

[0040] Specifically, the method for determining whether the processor utilization of any application process is normal based on multiple instantaneous utilization rates includes: counting the number of multiple instantaneous utilization rates and calculating the average of the multiple instantaneous utilization rates; calculating the average score based on the average score and a preset average score standard, and calculating the instantaneous score based on the number of instantaneous values ​​and a preset instantaneous score standard; and determining whether the processor utilization of any application process is normal based on the average score and the instantaneous score.

[0041] In this embodiment, the CPU utilization of an application process is judged to be normal by averaging multiple instantaneous utilization rates and combining data from both instantaneous and average utilization rates. By using multi-dimensional utilization rates to determine whether the CPU utilization of an application process is normal, the reliability of the judgment results is further improved.

[0042] In this embodiment, the average value scoring standard can be set into several intervals based on the usage rate, with different scoring standards set for each interval; the instantaneous value scoring standard can be set into different scoring standards based on the number of instantaneous values ​​exceeding a certain threshold. It should be understood that this embodiment does not impose any limitations on the average value scoring standard and the instantaneous value scoring standard.

[0043] For example, if 120 instantaneous utilization rates are continuously acquired, denoted as CPU1, CPU2, CPU3...CPU120, and CPU_AVG is used as the average of the 120 instantaneous utilization rates, then CPU_AVG = (CPU1 + CPU2 + CPU3 + ... + CPU120) / 120.

[0044] As one possible implementation, the average score criterion is:

[0045]

[0046] Among them, 80% and 280% can be set to other values ​​according to needs.

[0047] As one possible implementation, the instantaneous value scoring criterion is:

[0048]

[0049] Where X represents the number of instantaneous values ​​exceeding a certain threshold, and 100 can be set according to specific needs, such as 120 instantaneous usage rates, and the turning point of the scoring standard is set to 100.

[0050] Based on the above average score and instantaneous score criteria, the average score and instantaneous score are obtained respectively. Finally, the processor utilization of any application process is judged based on the average score and instantaneous score. In this way, the reliability of the judgment result is ensured by judging whether the CPU utilization of the application process is normal through multi-dimensional utilization.

[0051] Furthermore, based on the average score and the instantaneous score, it is determined whether the processor utilization of any application process is normal, including: performing a weighted calculation on the average score and the instantaneous score to obtain a target score; comparing the target score with a preset score threshold; if the target score is less than or equal to the score threshold, it is determined that the processor utilization of any application process is normal; if the target score is greater than the score threshold, it is determined that the processor utilization of any application process is abnormal.

[0052] In this embodiment, a target score for the utilization rate is obtained by weighting the average score and the instantaneous score. The target score is then compared with a preset score threshold to efficiently determine whether the processor utilization rate of any application process is normal. This makes it easier to perform multi-level management and control on application processes with abnormal processor utilization rates, thus ensuring the running performance.

[0053] The formula for calculating the target score is:

[0054] Score=Score_avg*α+Score_inst*β

[0055] Where Score represents the target score; Score_avg represents the average score; α represents the weight of the average score; Score_inst represents the instantaneous score; and β represents the weight of the instantaneous score.

[0056] It should be noted that the weights α and β for the average score and the instantaneous score can be set according to specific requirements. Preferably, both α and β are set to 0.5.

[0057] Finally, the target score is compared with a preset score threshold. If the target score is less than or equal to the score threshold, the processor utilization of any application process is considered normal; if the target score is greater than the score threshold, the processor utilization of any application process is considered abnormal. For example, if the score threshold is set to 40 points, if the target score of any application process is less than or equal to 40 points, the processor utilization of that application process is normal; if the target score of any application process is greater than 40 points, the processor utilization of that application process is abnormal.

[0058] It should also be noted that each application process in the system has a set score threshold, which is used to determine whether the processor utilization of the application process is normal. The score threshold for each application process can be set according to its own business logic, ensuring that the application process completes its business logic within a certain utilization range. The setting of the score threshold needs to consider factors such as its own business logic and the total system processor resources, to determine a relatively accurate value within a certain range.

[0059] In one possible embodiment, for any application process, comparing the target score with a preset score threshold includes: obtaining the running mode of any application process, the running mode including foreground running mode and background running mode; if any application process is in foreground running mode, then comparing the target score with a preset foreground process score threshold; if any application process is in background running mode, then comparing the target score with a preset background process score threshold.

[0060] As one possible implementation, the application processes in the system may be running in the foreground or in the background. Considering that the processor resources occupied by the same application process are different in the foreground and background running states, in this embodiment, the score thresholds for each application process include foreground process score thresholds and background process score thresholds, so as to realize the utilization rate control of each application process in different running states. In this way, allocating different processor resources according to the actual running state of the application process can further ensure the control effect of system processor resources.

[0061] As one possible implementation, when an application process is running in the foreground, it typically has a higher priority because the user is interacting with it. Therefore, a higher score threshold is set to ensure that the application receives sufficient processor resources to maintain a good user experience. Conversely, when an application process is running in the background, since it is not the user's current focus, a lower score threshold can be set to limit the CPU usage of these processes, thereby freeing up more processor resources for other more important tasks. This ensures that foreground applications receive sufficient resource support while preventing background applications from excessively consuming processor resources, thus avoiding the risk of overall system performance degradation.

[0062] In one embodiment, before determining whether the processor utilization of any application process is normal based on multiple instantaneous utilization rates, the method further includes: setting an application process whitelist, wherein application processes in the application process whitelist are not subject to hierarchical control of processor resources; if any application process is in the application process whitelist, then no hierarchical control is performed on any application process; if any application process is not in the application process whitelist, then the determination of whether the processor utilization is normal is performed.

[0063] It should be noted that, considering the various needs of system operation, such as the special safety requirements of the vehicle system, certain application processes cannot be terminated even if the CPU usage score exceeds the threshold, such as 360-degree surround view and navigation applications.

[0064] Therefore, in this embodiment, considering the lifecycle of important application processes in the system, it is not advisable to forcibly terminate them due to abnormal processor usage. Thus, an application process whitelist is set up. Application processes on this list are not subject to processor resource control. In this way, the lifecycle of important application processes is protected through the whitelist mechanism. Processor resource control is not applied to whitelisted processes, thus avoiding the forced termination of these important application processes due to abnormal processor usage and ensuring customer experience.

[0065] It should also be noted that whether each application process is a whitelisted process can be set according to specific needs.

[0066] Please see Figure 4 , Figure 4 This is a flowchart illustrating a pre-configured whitelist process configuration file for an in-vehicle infotainment system, as shown in an exemplary embodiment of this application. Figure 4 As shown, the compilation and packaging steps for the whitelist process configuration file for processor resource management of an in-vehicle infotainment system based on continuous integration tools (such as Jenkins) are detailed below: First, a compilation and packaging task is initiated through the continuous integration tool; then, the system source code stage is entered, including the source code of the whitelist process configuration file and the product configuration file. The whitelist process configuration file defines whether the in-vehicle application is subject to processor resource management, while the product configuration file is used to customize compilation options and build parameters; then, the continuous integration tool executes the compilation task, packaging the system source code and its configuration files together into an installable system flashing package; finally, the generated system flashing package is written to the in-vehicle infotainment system. After successful writing, the in-vehicle infotainment system contains the whitelist process configuration file. After the in-vehicle infotainment system starts running, it reads and parses this file to filter out whitelisted processes, thus exempting them from processor resource management.

[0067] Step S230: If normal, remove any application process from the multi-level control list step by step. The multi-level control list is used to manage application processes with abnormal processor usage in a hierarchical manner.

[0068] It should be noted that the multi-level control list includes multiple control sub-tables, each with a different control level, used to control application processes with different consecutive abnormal processor usage. Therefore, any application process is removed from the multi-level control list in a step-by-step manner.

[0069] In one embodiment, the configuration method of the multi-level control list includes: dividing multiple control levels according to the number of consecutive abnormal usage rates from low to high; configuring multiple control sub-tables according to the multiple control levels from low to high to generate a multi-level control list.

[0070] In this embodiment, the more consecutive instances of abnormal usage, the more persistent the application process is in an abnormal usage state, and the higher the level of control required. Therefore, the multi-level control list is divided into multiple control levels based on the number of consecutive instances of abnormal usage, from low to high. Then, multiple control sub-tables are configured according to these control levels, from low to high. These sub-tables are used to perform tiered control on application processes with different numbers of consecutive instances of abnormal usage. If any application process experiences abnormal usage, different levels of control are applied based on the number of consecutive instances of abnormal usage. This achieves multi-level control of processor resources, which helps ensure smooth system operation and improve system performance.

[0071] Furthermore, this embodiment does not limit the number of control sub-tables divided according to the number of consecutive abnormal usages from low to high. For example, it can be divided into three control sub-tables to form three-level control of processor resources, or into four control sub-tables to form four-level control of internal processor resources, etc.

[0072] In one embodiment, removing any application process from the multi-level control list step by step includes: if any application process is not in the lowest-level control sub-list, then moving any application process from the current control sub-list to a lower-level control sub-list; if any application process is in the lowest-level control sub-list, then removing any application process from the multi-level control list.

[0073] In this embodiment, for application processes that are in the multi-level control column but have normal current usage, the application processes with normal usage are also controlled by gradually removing them from the multi-level control column based on the number of consecutive times the usage is normal. In this way, the application process's lifecycle is further guaranteed under reasonable CPU usage conditions through the step-by-step rollback mechanism where the application's CPU usage score drops below the score threshold.

[0074] In step S240, if an abnormality is found, any application process will be moved to a multi-level control list step by step to perform dynamic control over any application process.

[0075] It should be noted that the multi-level control list includes multiple control sub-tables, each with a different control level, used to control application processes with different consecutive abnormal processor usage. Therefore, the method for moving any application process into the multi-level control list is to move it level by level.

[0076] Furthermore, in the multi-level control list, because the controlled application processes may be located in different control sub-tables, the application processes may be moved out or moved in based on whether the usage rate is normal or abnormal. According to the specific position information of the application process in the multi-level control list, each controlled application process moves dynamically level by level in different control sub-tables of the multi-level control list, realizing dynamic control of each application process and hierarchical control of processor resources. This includes multi-level control and rollback mechanisms for abnormal CPU usage of each application process, so that the CPU usage of each application process is controlled under this mechanism, thus ensuring the smooth operation of the system.

[0077] In one embodiment, moving any application process into a multi-level control list step by step includes: if any application process is not in the multi-level control list, then moving any application process into the lowest-level control sub-list; if any application process is in the multi-level control list and is not in the highest-level control sub-list, then moving any application process from the current control sub-list to a higher-level control sub-list, until terminating any application process from the highest-level control sub-list.

[0078] In this embodiment, when an abnormal usage rate of any application process is determined, processor resource management is applied to that application process based on its position in the multi-level management list. If the application process is not in the multi-level management list, it is moved to the lowest-level management sub-list. If it is not in the highest-level management sub-list, it is moved to a higher-level management sub-list. If the application process is in the highest-level management sub-list, it is terminated. An abnormal usage rate in the highest-level management sub-list indicates that the application process has reached a preset threshold for consecutive abnormal usages, indicating the highest level of management and a severe abnormal usage situation. Therefore, the application process is terminated. This multi-level management mechanism for abnormal usage limits the lifespan of application processes with abnormal usage rates, thereby improving system smoothness.

[0079] In this way, by moving the application process to the highest-level control sub-table step by step according to the number of consecutive abnormal usage rates, the degree of control over the processor resources of the application process is gradually increased until any application process is terminated, thus realizing multi-level control over processor resources.

[0080] In one possible embodiment, when terminating an application process from the highest-level control sub-table of the multi-level control list, all application processes with abnormal usage in the highest-level control sub-table will be terminated. Alternatively, based on system processor usage (e.g., total resource consumption does not exceed a certain threshold), at least one of these application processes will be terminated according to a preset termination strategy. The termination strategy may be based on the importance level of the application process (higher-level application processes will be terminated later), running status (background application processes will be terminated first), or CPU usage of the application process (application processes with high CPU usage will be terminated first).

[0081] This ensures the lifecycle of each application process while maintaining system performance.

[0082] Please see Figure 5 , Figure 5 This is a flowchart illustrating a three-level processor resource management method as shown in an exemplary embodiment of this application. Figure 5 As shown, the multi-level control list includes three control sub-tables, which are listed in ascending order of usage rate and number of consecutive abnormal occurrences: process flag list, abnormal process list, and process to be terminated list. This three-level processor resource control method is applicable to vehicle infotainment systems.

[0083] First, a whitelist of application processes is pre-configured for the vehicle's infotainment system. After the system boots up, it begins running and starts monitoring the processor usage of each application process. This monitoring is performed periodically, and each monitoring cycle follows the same process: Whitelisted processes are filtered first, and then, based on the processor usage of each application process, a judgment is made regarding whether the processor usage is normal or abnormal. Application processes with abnormal usage are moved to the corresponding control list until they are killed. Application processes with normal usage are moved to a lower-level control list, and so on, until they are completely removed from the control list. The three-level control for abnormal CPU usage of application processes includes: If abnormal CPU usage is detected, the application process will be added to a process flagging list. If the CPU usage is still abnormal in the next detection, the application process will be moved to an abnormal process list, and so on, until it is moved to a pending termination process list. If an application process with abnormal CPU usage is still in the pending termination process list in the next detection, it will be forcibly terminated. The rollback mechanism for normal CPU usage of application processes includes: When the CPU usage of an application process is normal, the rollback mechanism will roll the application process back one level from the corresponding process list. Application processes in the pending termination process list will be rolled back to the abnormal process list, application processes in the abnormal process list will be rolled back to the flagged process list, and application processes in the flagged process list will be removed from monitoring. The judgment of normal or abnormal processor usage for each application process will continue.

[0084] Please see Figure 6 , Figure 6 This is a flowchart illustrating a specific processor resource management method as shown in an exemplary embodiment of this application. Figure 6 As shown, Figure 6 As shown, this specific processor resource management method is applicable to in-vehicle infotainment systems, and the steps are detailed below:

[0085] 1. After the vehicle system starts, the ActivityManagerService service (a system service responsible for system application lifecycle management, process management, and user interaction functions) is started.

[0086] 2. Start PerfMonitor (i.e., performance monitor) to enable the processor usage monitoring and processing function of application processes. PerfMonitor is a newly added core module for monitoring and handling abnormal CPU usage of vehicle applications. This module is divided into two parts: a multi-dimensional CPU usage scoring module and a multi-level management and processing module.

[0087] 3. PerfMonitor reads the whitelist process configuration file, parses out the application package name, and determines the whitelist processes;

[0088] 4. PerfMonitor obtains multiple instantaneous processor usage rates for each application process at preset time intervals (e.g., 1 second).

[0089] 5. Filter whitelisted processes based on application package name;

[0090] 6. Determine whether the processor utilization of each application process is normal based on multiple instantaneous utilization rates;

[0091] 7. If an application process is identified as having abnormal usage during this usage rate detection, first check if the application process is included in the list of processes to be terminated. If it is, terminate the application process. If the application process is not included in the list of processes to be terminated, continue to the list of abnormal processes. If the application process is included in the list of abnormal processes, move the application process to the list of processes to be terminated. If the application process is not included in the list of abnormal processes, continue to check the list of marked processes. If the application process is included in the list of marked processes, move the application process to the list of abnormal processes. If the application process is not included in the list of marked processes, move the application process to the list of marked processes.

[0092] 8. If the application process has a normal usage rate in this usage rate test, first check if the application process is included in the list of processes to be terminated. If it is included, then the application process is moved back to the list of abnormal processes. If the application process is not included in the list of processes to be terminated, then the abnormal process list is checked again. If the application process is included in the list of abnormal processes, then the application process is moved back to the list of marked processes. If the application process is not included in the list of abnormal processes, then the marked process list is checked again. If the application process is included in the list of marked processes, then the application process is removed from the list of marked processes.

[0093] The aforementioned processor resource management method first obtains multiple instantaneous processor utilization rates for each application process. Then, for any application process, it determines whether the processor utilization rate is normal based on these instantaneous utilization rates. If the processor utilization rate is normal, the application process is gradually removed from the multi-level management list. This multi-level management list is used to hierarchically manage application processes with abnormal processor utilization rates. If the processor utilization rate is abnormal, the application process is gradually moved into the multi-level management list. This dynamic management of application processes, using multiple instantaneous utilization rates to determine whether the processor utilization rate of any application process is normal or abnormal, improves the reliability of the judgment results. By setting up a multi-level management list and combining the accurate results of normal or abnormal processor utilization rates for each application process, multi-level management is applied to application processes with abnormal processor utilization rates. This mechanism ensures that the processor resource usage of each application process within the system is within a reasonable range, thereby improving system smoothness and performance.

[0094] Please see Figure 7 , Figure 7 This is a block diagram illustrating a processor resource management system as an exemplary embodiment of this application. The system can be applied to... Figure 1 The implementation environment shown is intended to illustrate the system, but it should be understood that the system can also be applied to other exemplary implementation environments. This embodiment does not limit the implementation environment to which the system is applicable.

[0095] like Figure 7 As shown, in an exemplary embodiment, the processor resource management system 700 includes at least an acquisition module 710, a judgment module 720, and a management module 730, which are described in detail below:

[0096] The acquisition module 710 is used to acquire multiple instantaneous processor usage rates for each application process;

[0097] The judgment module 720 is used to determine whether the processor utilization of any application process is normal based on multiple instantaneous utilization rates.

[0098] The control module 730 is used to remove any application process from the multi-level control list step by step if it is normal. The multi-level control list is used for storage management to hierarchically control application processes with abnormal processor utilization.

[0099] The management module 730 is also used to dynamically manage any application process by moving it step by step into a multi-level management list in case of an anomaly.

[0100] It should be noted that the processor resource management system provided in the above embodiments and the processor resource management method provided in the above embodiments belong to the same concept. The content of the operation performed by each module has been described in detail in the method embodiments, and will not be repeated here.

[0101] Please see Figure 8 , Figure 8 This is a schematic diagram of the structure of an in-vehicle terminal provided in an exemplary embodiment of this application. Figure 8 A schematic diagram of a computer system suitable for implementing the vehicle-mounted terminal of this application is shown. It should be noted that... Figure 8 The computer system 800 of the vehicle terminal shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0102] like Figure 8 As shown, the computer system 800 includes a Central Processing Unit (CPU) 801, which can perform various appropriate actions and processes, such as executing the methods described in the above embodiments, based on programs stored in Read-Only Memory (ROM) 802 or programs loaded from storage portion 808 into Random Access Memory (RAM) 803. The RAM 803 also stores various programs and data required for system operation. The CPU 801, ROM 802, and RAM 803 are interconnected via a bus 804. An Input / Output (I / O) interface 805 is also connected to the bus 804.

[0103] The following components are connected to I / O interface 805: an input section 806 including a keyboard, mouse, etc.; an output section 807 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to I / O interface 805 as needed. A removable medium 811, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 810 as needed so that computer programs read from it can be installed into storage section 808 as needed.

[0104] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program including a computer program for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 809, and / or installed from removable medium 811. When the computer program is executed by central processing unit (CPU) 801, it performs various functions defined in the system of this application.

[0105] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a computer's processor, causes the computer to perform the processor resource management method described above. This computer-readable storage medium may be included in the vehicle-mounted terminal described in the above embodiments, or it may exist independently and not be installed in the vehicle-mounted terminal.

[0106] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying a computer-readable computer program. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.

[0107] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. Each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0108] The units described in the embodiments of this application can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself.

[0109] The above embodiments are merely illustrative of the principles and effects of this application and are not intended to limit this application. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of this application. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in this application should still be covered by the claims of this application.

Claims

1. A processor resource management method, characterized in that, The method includes: Obtain multiple instantaneous processor usage values ​​for each application process; For any application process, determine whether the processor utilization of any application process is normal based on multiple instantaneous utilization rates; If normal, any of the application processes will be removed from the multi-level control list step by step. The multi-level control list is used to manage application processes with abnormal processor usage in a hierarchical manner. If an anomaly is detected, any of the application processes will be moved step by step into the multi-level control list for dynamic control of any of the application processes. The step of determining whether the processor utilization of any application process is normal based on multiple instantaneous utilization rates includes: counting the number of multiple instantaneous utilization rates and calculating the average value of multiple instantaneous utilization rates; calculating an average score based on the average value and a preset average score standard, and calculating an instantaneous value score based on the number and a preset instantaneous value score standard; and determining whether the processor utilization of any application process is normal based on the average score and the instantaneous value score. The step of determining whether the processor utilization rate of any application process is normal based on the average score and the instantaneous score includes: performing a weighted calculation on the average score and the instantaneous score to obtain a target score; comparing the target score with a preset score threshold; if the target score is less than or equal to the score threshold, then determining that the processor utilization rate of any application process is normal; if the target score is greater than the score threshold, then determining that the processor utilization rate of any application process is abnormal.

2. The processor resource management method according to claim 1, characterized in that, The configuration methods for the multi-level control list include: Based on the number of consecutive abnormal usage rates, multiple control levels are divided from low to high; Multiple control sub-tables are configured from low to high according to the multiple control levels to generate the multi-level control list.

3. The processor resource management method according to claim 2, characterized in that, The step of moving any of the application processes into the multi-level control list includes: If any of the application processes is not in the multi-level control list, then any of the application processes will be moved to the lowest level control sub-table. If any of the application processes is in the multi-level control list and is not in the highest-level control sub-list, then the application process is moved from the current control sub-list to a higher-level control sub-list until it is terminated from the highest-level control sub-list.

4. The processor resource management method according to claim 2, characterized in that, The step-by-step removal of any of the application processes from the multi-level control list includes: If any of the application processes is not in the lowest-level control sub-table, then any of the application processes will be moved from the current control sub-table to a lower-level control sub-table. If any of the application processes is in the lowest-level control sub-table, then that application process will be removed from the multi-level control list.

5. The processor resource management method according to claim 1, characterized in that, Before determining whether the processor utilization of any application process is normal based on multiple instantaneous utilization rates, the method further includes: Set an application process whitelist, where the application processes in the whitelist are not subject to hierarchical control of processor resources; If any of the application processes is in the application process whitelist, then no hierarchical control will be applied to any of the application processes. If any of the application processes is not in the application process whitelist, a judgment operation is performed to determine whether the processor utilization is normal.

6. A processor resource management system, characterized in that, The system includes: The acquisition module is used to obtain multiple instantaneous processor usage rates for each application process; A judgment module is used to determine whether the processor utilization of any application process is normal based on multiple instantaneous utilization rates for any given application process. This includes: counting the number of instantaneous utilization rates and calculating the average of the multiple instantaneous utilization rates; calculating an average score based on the average score and a preset average score standard, and calculating an instantaneous value score based on the number of instantaneous utilization rates and a preset instantaneous value score standard; and determining whether the processor utilization of any application process is normal based on the average score and the instantaneous value score. Specifically, determining whether the processor utilization of any application process is normal based on the average score and the instantaneous value score includes: performing a weighted calculation on the average score and the instantaneous value score to obtain a target score; comparing the target score with a preset score threshold; if the target score is less than or equal to the score threshold, determining that the processor utilization of any application process is normal; and if the target score is greater than the score threshold, determining that the processor utilization of any application process is abnormal. The control module is used to remove any application process from the multi-level control list step by step if the process is normal. The multi-level control list is used to store and manage application processes with abnormal processor utilization. The control module is also used to, in case of an anomaly, move any of the application processes into the multi-level control list step by step to perform dynamic control over any of the application processes.

7. A vehicle-mounted terminal, characterized in that, include: One or more processors; A storage device for storing one or more programs, which, when executed by one or more processors, enable the vehicle terminal to implement the processor resource management method as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, It stores computer-readable instructions, which, when executed by the computer's processor, cause the computer to perform the processor resource management method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Electronic equipment power consumption reduction method and device and electronic equipment with display screen

    CN105528052A

  • Information processing method and terminal

    CN106685752A