Process recovery method of operating system, in-vehicle infotainment system and vehicle

By configuring load monitoring and process recovery modules in dual operating systems, cross-system process recovery is realized, which solves the problem of insufficient CPU computing power recovery and performance optimization in dual operating systems, and improves system performance and user experience.

CN120508378APending Publication Date: 2025-08-19BYD CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510363250.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-25
Publication Date
2025-08-19

AI Technical Summary

Technical Problem

The existing technology cannot effectively realize process recycling across operating systems, resulting in insufficient CPU computing power recovery and performance optimization in dual operating systems, and the inability to timely optimize and recycle processes of another operating system, affecting the user experience.

Method used

By configuring the load monitoring module and the process recovery module in the first operating system and the second operating system, the CPU load value is monitored, and when the preset load threshold is reached, a process recovery event across the system is triggered, a process recovery operation is performed, and an update of the running task list is displayed in the user interface.

Benefits of technology

It realizes cross-system process recycling, effectively reduces CPU load, improves the performance and user experience of multiple operating systems, and ensures the consistency and accuracy of system status.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120508378A_ABST
    Figure CN120508378A_ABST
Patent Text Reader

Abstract

The invention discloses a process recycling method of an operating system, a vehicle-mounted infotainment system and a vehicle, and the process recycling method of the operating system comprises the steps: triggering a process recycling event when a first operating system or a second operating system detects that a CPU load value is greater than or equal to a preset load threshold value; the process recycling event is used for instructing the first operating system and the second operating system to execute process recycling operation. According to the method and the device, cross-system process recovery can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of operating system technology, and specifically relates to an operating system process recovery method, a vehicle system and a vehicle, as well as an electronic device, a computer-readable storage medium, and a computer program product. Background Art

[0002] As vehicles become more intelligent, the in-vehicle operating system has become an indispensable part of the vehicle. Furthermore, as users' demands for intelligent cockpit performance increase, vehicles are no longer limited to a single operating system, but are gradually being equipped with dual operating systems. Recycling processes between these operating systems to improve performance is a technical issue that needs to be addressed. Summary of the Invention

[0003] The present application aims to solve at least one of the technical problems existing in the prior art. To this end, the present application proposes an operating system process recycling method, a vehicle system and a vehicle, as well as an electronic device, a computer-readable storage medium, and a computer program product, which can realize cross-system process recycling.

[0004] In a first aspect, an embodiment of the present application provides a process recycling method for an operating system, comprising:

[0005] In response to the first operating system or the second operating system detecting that the CPU load value is greater than or equal to a preset load threshold, triggering a process recycling event;

[0006] The process recycling event is used to instruct the first operating system and the second operating system to perform a process recycling operation.

[0007] In some embodiments, after the first operating system and the second operating system execute the process recycling operation, the method further includes:

[0008] In the running task list, the running task interface after the process recycling operation is performed is displayed.

[0009] In some embodiments, the preset load threshold is stored in a configuration file, and the method further includes:

[0010] Get the preset load threshold from the configuration file.

[0011] In some embodiments, the first operating system is configured with a first load monitoring module, and the second operating system is configured with a second load monitoring module. The first operating system or the second operating system detects that the CPU load value is greater than or equal to a preset load threshold, including:

[0012] Either the first load monitoring module or the second load monitoring module detects that the CPU load value is greater than or equal to a preset load threshold.

[0013] In some embodiments, if the first load monitoring module detects that the CPU load value reaches a preset load threshold, the first operating system and the second operating system execute a process recycling operation, including:

[0014] A process recycling operation is performed in the first operating system, and a first process recycling event is generated and sent to the second operating system, so that the process recycling operation is performed in the second operating system.

[0015] In some embodiments, if the second load monitoring module detects that the CPU load value is greater than or equal to a preset load threshold, the first operating system and the second operating system execute a process recycling operation, including:

[0016] A process recycling operation is performed in the second operating system, and a second process recycling event is generated and sent to the first operating system, so that the process recycling operation is performed in the first operating system.

[0017] In some embodiments, before responding to the first operating system or the second operating system detecting that the CPU load value is greater than or equal to a preset load threshold, the method further includes:

[0018] Based on the first operating system marking the reclaimable process file, the first operating system synchronizes the marking information of the reclaimable process file to the second operating system.

[0019] In some embodiments, the above-mentioned execution process recycling operation includes:

[0020] Obtaining at least one first process capable of executing a recycling operation from a current process list;

[0021] A recycling operation is performed on the at least one first process.

[0022] In some embodiments, obtaining at least one first process capable of executing a recycling operation from the current process list includes:

[0023] Read the recyclable flag of each process in the current process list from the configuration file;

[0024] A first process capable of executing a recycling operation is determined based on the recyclable identifier.

[0025] In some embodiments, before reading the recyclable flag of each process in the current process list from the configuration file, the process further includes:

[0026] Monitor process status changes;

[0027] When it is determined that the process whose state has changed meets the process recycling condition, a recyclable flag is written for the process in the configuration file.

[0028] In some embodiments, the process recycling conditions include the process state changing to a background process, and / or the process type allowing recycling.

[0029] In some embodiments, performing a recycling operation on at least one first process includes:

[0030] A kill operation or a suspend operation is performed on at least one first process.

[0031] In some embodiments, after the above-mentioned process recycling event is triggered, the following further steps are included:

[0032] In response to the first operating system or the second operating system still detecting that the CPU load value is greater than or equal to the preset load threshold, triggering an application frame drop event;

[0033] The application frame rate reduction event is used to control the first operating system and / or the second operating system to perform an application frame rate reduction operation.

[0034] In some embodiments, controlling the first operating system and / or the second operating system to perform an application frame rate reduction operation includes:

[0035] Based on the application frame rate reduction event, a frame rate reduction notification is sent to the application program in the first operating system and / or the second operating system, so that the application program reduces the frame rate.

[0036] In some embodiments, the sending of a frame rate reduction notification to an application in the first operating system and / or the second operating system based on the application frame rate reduction event includes:

[0037] When detecting an application frame rate drop event, the first operating system sends a frame rate reduction notification to the application in the first operating system, and forwards the application frame rate drop event to the second operating system to send a frame rate reduction notification to the application in the second operating system.

[0038] In some embodiments, the sending of a frame rate reduction notification to an application in the first operating system and / or the second operating system based on the application frame rate reduction event includes:

[0039] When the second operating system detects the application frame rate drop event, it sends a frame rate reduction notification to the application in the second operating system and forwards the application frame rate drop event to the first operating system to send a frame rate reduction notification to the application in the first operating system.

[0040] In some embodiments, the event of triggering application frame drop includes:

[0041] Write the application frame reduction identifier to the application frame reduction file node in the configuration file.

[0042] In some embodiments, the first operating system and the second operating system communicate with each other via an RPC communication module.

[0043] In some embodiments, the first operating system includes at least one of an Android operating system and a Linux operating system, and the second operating system includes at least one of an Android operating system and a Linux operating system.

[0044] In a second aspect, an embodiment of the present application provides an electronic device comprising: a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps of the process recycling method of the operating system as described in the first aspect are implemented.

[0045] In a third aspect, an embodiment of the present application provides a vehicle system, comprising the electronic device described in the second aspect, wherein the memory of the electronic device stores programs or instructions that can be run on a processor, and when the program or instructions are executed by the processor, the steps of the process recovery method of the operating system described in the first aspect are implemented.

[0046] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the process recycling method of the operating system as described in the first aspect are implemented.

[0047] In a fifth aspect, an embodiment of the present application provides a computer program product, which, when executed by a processor of a vehicle, implements the steps of the process recovery method of the operating system as described in the first aspect.

[0048] The technical solution provided in the present application triggers a process recycling event in response to the first operating system or the second operating system detecting that the CPU load value is greater than or equal to a preset load threshold, and uses the process recycling event to instruct both the first operating system and the second operating system to perform a process recycling operation, thereby realizing a cross-system process recycling operation, and fully recycling the CPU computing power when the CPU load threshold is reached, so as to effectively reduce the CPU load and thereby improve the performance of multiple operating systems.

[0049] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become obvious from the description below, or will be learned through practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:

[0051] Figure 1This is a system architecture diagram of the process recycling solution for the operating system in an embodiment of the present application;

[0052] Figure 2 A flowchart of a process recycling method for an operating system according to an embodiment of the present application;

[0053] Figure 3 A flowchart of an execution process recycling operation process in an embodiment of the present application;

[0054] Figure 4 This is a flow chart of a process recycling process in an embodiment of the present application;

[0055] Figure 5 This is a flow chart of another process recycling process in an embodiment of the present application;

[0056] Figure 6 This is a flowchart of a process for writing an identifier in an embodiment of the present application;

[0057] Figure 7 This is a flow chart of another identification writing process in an embodiment of the present application.

[0058] Figure 8 This is a schematic diagram of a process of applying frame reduction in an embodiment of the present application;

[0059] Figure 9 This is a flow chart of performing an application frame reduction operation in an embodiment of the present application;

[0060] Figure 10 This is a schematic structural diagram of an electronic device according to an embodiment of the present application;

[0061] Figure 11 This is a structural diagram of a vehicle system according to an embodiment of the present application;

[0062] Figure 12 This is a structural diagram of a vehicle in an embodiment of the present application. DETAILED DESCRIPTION

[0063] The following describes embodiments of the present application in more detail with reference to the accompanying drawings. Although certain embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be construed as limited to the embodiments described herein. Instead, these embodiments are provided to provide a more thorough and complete understanding of the present application. It should be understood that the drawings and embodiments of the present application are for illustrative purposes only and are not intended to limit the scope of protection of the present application.

[0064] It should be understood that the various steps described in the method embodiments of the present application can be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present application is not limited in this respect.

[0065] As recorded in the background technology, in some application scenarios, such as the in-vehicle operating system on a vehicle, dual operating systems have gradually been used to meet the increasing user demand for vehicle functions. However, the dual operating system has brought challenges to the CPU's computing power recovery and performance optimization. How to ensure the computing power and performance of the dual operating system to fully enhance the user experience of using the dual operating system and ensure the performance smoothness of complex usage scenarios such as the dual operating system application ecosystem is a technical problem that needs to be solved.

[0066] In traditional operating systems, the CPU power recovery and performance optimization mechanisms are only targeted at processes running within a single operating system, making it impossible to implement cross-operating system process recovery management, and therefore cross-operating system performance load state interaction and control. This makes it impossible for a single operating system to perceive and control the CPU and process behavior of other operating systems. For example, when the dual operating systems are Android and Linux, when the CPU power in the Android system is insufficient, some unimportant processes in the Linux system occupy the CPU. The Android system cannot optimize and recover the Linux operating system's processes across operating systems, and vice versa. In addition, due to the complexity of the dual operating systems, when a single operating system perceives that its own performance load is high and the CPU power is low, but the performance problem may be caused by the processes of the other operating system, it cannot perform timely optimization and recovery. It can only wait until the other operating system has insufficient CPU power before performing process recovery operations to improve its performance.

[0067] In view of the above technical problems reflected in the existing technical solutions, the embodiment of the present application provides a technical solution for a process recycling method of an operating system. Figure 1 This is a system architecture diagram of the process recycling solution of the operating system in the embodiment of the present application, such as Figure 1 As shown, in this technical solution, a first load monitoring module 11 can be configured in the first operating system, and a second load monitoring module 21 can be configured in the second operating system. The above-mentioned first load monitoring module 11 and second load monitoring module 21 are respectively responsible for monitoring the CPU load values in their respective operating systems.

[0068] In the embodiments of the present application, there is no limitation on the specific type of each operating system. For example, the first operating system mentioned above can be one of the Android operating system and the Linux operating system, and the second operating system mentioned above can also be one of the Android operating system and the Linux operating system. In the embodiments of the present application, the dual operating systems can be both in-vehicle operating systems, for example, one can be the Android operating system and the other can be the Linux operating system.

[0069] In the embodiments of this application, Figure 2 A flowchart of a process recycling method for an operating system provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, the following steps are included:

[0070] Step 201: In response to the first operating system or the second operating system detecting that the CPU load value is greater than or equal to a preset load threshold, a process recycling event is triggered;

[0071] In an embodiment of the present application, the first operating system or the second operating system can respectively detect the CPU load of the system to obtain a CPU load value corresponding to the above operating system, and respectively obtain a preset load threshold from a configuration file. Based on this, it can be determined whether the respective CPU load value is greater than or equal to the preset load threshold. If it is greater than or equal to the preset load threshold, a process recycling event is triggered. Otherwise, the CPU load of the system continues to be detected on each operating system side. The above-mentioned CPU load value refers to the proportion or absolute amount of CPU resources occupied by all running processes in the current operating system; the preset load threshold can be a load upper limit value pre-set based on factors such as system performance requirements, hardware configuration, and operating experience, used to determine whether the system is in a high load state, such as 60%, 70%, etc.; the process recycling event refers to a process management mechanism triggered when the system detects that the CPU load is greater than or equal to the preset threshold, which is used to instruct the operating system to perform a process recycling operation, for example, terminating some non-critical or resource-intensive processes to free up CPU resources, reduce system load, and ensure normal operation and responsiveness of the system.

[0072] Step 202: The process recycling event is used to instruct the first operating system and the second operating system to perform a process recycling operation.

[0073] Based on step 201, the first operating system and the second operating system are instructed to perform process recycling operations based on the triggered process recycling event, thereby ensuring that each operating system can self-regulate and recover under high load conditions. The process recycling operation refers to operations such as terminating, suspending, or pausing processes running in the operating system.

[0074] As described above, by executing process recycling operations in various operating systems through this method, a cross-system process recycling operation can be implemented, thereby fully recycling the CPU computing power to effectively reduce the CPU load and thereby improve the performance of multiple operating systems.

[0075] In an embodiment of the present application, the detected CPU load values of the first and second operating systems, as well as specific information about process recycling operations executed in the first and second operating systems, such as the time of the process recycling operation, the triggering conditions, the recycled process ID, and the results of the recycling operation, can all be recorded in the log files of each operating system. This recording mechanism allows system administrators or developers to easily track and analyze the operating status of the system, promptly identify and address potential performance issues, and provide powerful data support for system optimization and debugging.

[0076] In an embodiment of the present application, after executing the process recycling operation in the first operating system and the second operating system, corresponding operations can be further performed on the running task list in the operating system to ensure the accuracy and consistency of the system status. Specifically, after executing the above-mentioned process recycling operation, each operating system will carefully search and match the recycled processes in its respective running task lists, and then delete the task entries corresponding to the recycled processes. At the same time, the system will also close the interface elements related to the recycled tasks in the user interface, such as windows, tabs or notifications, and finally display the running task interface after completing the above-mentioned operations to the user. In this way, the user will not see the recycled tasks displayed on the interface, thereby reducing unnecessary troubles and misoperations. Finally, the system will perform synchronization operations, for example, synchronizing the running task list update information in the first operating system to the second operating system, so that the running task list of the second operating system can also be updated accordingly. In this way, no matter which operating system the user views the running task list, he can see consistent and accurate information, thereby improving the overall usability and user experience of the system.

[0077] In some embodiments, the preset load threshold can be stored in a configuration file, that is, the preset load threshold is written in the above configuration file. Therefore, before triggering the process recycling event, the stored preset load threshold can also be obtained in the configuration file. For example, the above preset load threshold values of 60%, 70%, etc. can be written in the file node / proc / util-threshold of the configuration file first, and then these values can be read in the above configuration file to obtain the preset load threshold. The above configuration file is a structured text file used to store various configuration parameters required for the system or application to run.

[0078] In an embodiment of the present application, a first load monitoring module 11 is configured in the above-mentioned first operating system, and a second load monitoring module 12 is configured in the second operating system. Therefore, when the first operating system or the second operating system detects that the CPU load value is greater than or equal to the preset load threshold, specifically, any one of the first load monitoring module and the second load monitoring module may detect that the CPU load data is greater than or equal to the preset load threshold, that is, the first load monitoring module 11 may monitor the CPU load value of the first operating system, and the second load monitoring module 12 may monitor the CPU load value of the second operating system, respectively obtain the corresponding CPU load value, and respectively obtain the preset load threshold from the configuration file, and on this basis, respectively determine whether their respective CPU load values are greater than or equal to the preset load threshold.

[0079] In an embodiment of the present application, in addition to the above-mentioned first load monitoring module 11 and second load monitoring module 21, a functional module for performing process recycling can also be set in the above-mentioned two operating systems, and the functional module responsible for process recycling controls the execution of process recycling operations in the first operating system and the second operating system.

[0080] In some embodiments, the above Figure 1 As shown, a first process recycling module 12 is configured in the first operating system domain, and a second process recycling module 22 is configured in the second operating system domain. The two modules cooperate to complete the process recycling operation in the two operating systems.

[0081] In an embodiment of the present application, a first load monitoring module 11 and a first process recycling module 12 are respectively provided in a first operating system, and a second load monitoring module 21 and a second process recycling module 22 are provided in a second operating system. Then, either the first load monitoring module 11 or the second load monitoring module 21 may monitor that the CPU load value is greater than or equal to a load threshold, and then trigger both operating systems to simultaneously execute a process recycling operation. For example, the aforementioned execution of the process recycling operation in the first operating system and the second operating system may include two situations:

[0082] In the first case, when the first load monitoring module detects that the CPU load value is greater than or equal to the preset load threshold, a process recycling operation is performed in the first operating system, a first recycling event is generated and the first process recycling event is sent to the second operating system, so that the process recycling operation is performed in the second operating system; or

[0083] In the second case, when the second load monitoring module detects that the CPU load value is greater than or equal to the preset load threshold, a process recycling operation is performed in the second operating system, a second process recycling event is generated and the second process recycling event is sent to the first operating system to perform a process recycling operation in the first operating system.

[0084] In some embodiments, before the first operating system or the second operating system detects that the CPU load value is greater than or equal to a preset load threshold, a process marking operation can also be performed on the first operating system side. Specifically, a recyclable process file is marked on the first operating system side, and then the marking information of the recyclable process file is synchronized to the second operation information so that the second operating system can subsequently perform a process recycling operation based on the marking information. The recyclable process file can be a whitelist, which usually includes processes associated with important system applications such as desktop applications, maps, status bars, navigation bars, AVMs, and taskbars in the first and second operating systems. These processes are generally processes that are not allowed to be recycled. However, when other processes that are allowed to be recycled are recycled, the CPU load is still large, and the recyclable processes are screened in the above processes. Therefore, when marking the recyclable process file on the first operating system side, each application process in the whitelist can be checked one by one and judged to determine whether it is recyclable. The processes that are determined to be recyclable will be marked as 1, while the processes that are not recyclable will be marked as 0, and the corresponding marking information will be generated and synchronized to the second operating system. Similarly, the above-mentioned recyclable process file marking operation can also be completed on the second operating system side, and the marking information can be synchronized to the first operating system.

[0085] In the embodiment of the present application, after the process recycling event is triggered, the process recycling operation can be performed in the first operating system and the second operating system. The process is as follows: Figure 3 As shown, the following steps are included:

[0086] Step 301: Obtain at least one first process capable of executing a recycling operation from a current process list;

[0087] In this step, a search can be performed in the current process list of the system, and it can be determined whether at least one process found is the first process. Specifically, the recyclable flag of each process in the current process list can be read from the configuration file, and then the first process that can perform the recycling operation can be determined based on the above-mentioned recyclable flag. For example, the recyclable flag is 1, and the non-recyclable flag is 0. By reading the recyclable flag, it is possible to determine which processes can be recycled, thereby determining the first process that can perform the recycling operation and constructing a recycling process list. The above-mentioned current process list refers to the set of all processes currently running in the system; the recycling process list is a subset of processes that can be safely recycled and filtered out from the current process list based on the recyclable flag.

[0088] In some embodiments, the process reclaim mark may be written into a system configuration file, for example, by writing the mark into the file node / proc / pid / util-reclaim of the configuration file.

[0089] Step 302: Perform a recycling operation on at least one first process.

[0090] On the basis of step 301, a recycling action is first determined, and then a recycling operation is performed on at least one first process obtained according to the recycling action. The recycling action can be either a kill operation or a suspend operation. When a kill operation is performed on a process, the process is directly cleared and no longer occupies the CPU load, while when a suspend operation is performed on a process, the process is suspended without being terminated. The suspend operation can set a certain suspension time threshold, that is, the process is suspended for a certain time, such as suspending for 1S, 2S, and other values. In the specific implementation process, the same recycling action can be performed on all first processes, or after distinguishing different first processes, the recycling action performed on each first process can be different.

[0091] In some embodiments, the above-mentioned recycling action can be written in the file node / proc / util-action of the configuration file. Specifically, the recycling action written in the above-mentioned file node can be for all first processes, or it can distinguish different first processes and match corresponding recycling actions for different processes.

[0092] In some embodiments, as described above Figure 1 As shown, a first event monitoring module 13 can be configured in the first operating system, and a second event monitoring module 23 can be configured in the second operating system. When the first event monitoring module 13 monitors the first process recycling event generated by the first load monitoring module 11, the first process recycling event is sent to the second event monitoring module 23.

[0093] The second event monitoring module 23 is configured to send the second process recycling event to the first event monitoring module 13 when monitoring that the second load monitoring module 21 generates the second process recycling event.

[0094] An inter-system communication module can be set between the above-mentioned first event monitoring module 13 and the second event monitoring module 23. For example, they can communicate through a remote procedure call (RPC) communication module, that is, a first cross-domain communication module 14 is set in the first operating system, and a second cross-domain communication module 24 is set in the second operating system, and the two communicate through RPC.

[0095] Specifically, the above process recycling process can be as follows Figure 4 and Figure 5 As shown, Figure 4 The following is an example of an Android operating system as the first operating system and a Linux operating system as the second operating system. Figure 5 The following description is given by taking the Linux operating system as the first operating system and the Android operating system as the second operating system as an example.

[0096] refer to Figure 4 As shown, the process recycling process initiated by the first operating system may include the following steps:

[0097] Step 401: Monitor the CPU load value to obtain the CPU load value;

[0098] Step 302: Read the preset load threshold and determine whether the CPU load value is greater than or equal to the preset load threshold. If it is greater than or equal to the preset load threshold, on the one hand, perform a local process recycling operation, i.e., step 303; on the other hand, generate a first process recycling event, and execute step 405;

[0099] Among them, the above-mentioned preset load threshold can be stored in the configuration file. For example, the above-mentioned preset load threshold can be written in the file node / proc / util-threshold of the configuration file, so that the corresponding preset load threshold can be read from the above-mentioned file node in this step, which can be a set value, such as 60%, 70% and other values.

[0100] Step 403: Execute process recycling. In this step, at least one first process that can execute recycling operation in the current process list can be obtained, thereby constructing a recycling process list. For details, please refer to step 301 in the above embodiment, which will not be repeated here.

[0101] Step 404: Read the recycling action to determine and execute the specific recycling action for the first process obtained in step 403. The recycling action can be either a kill operation or a suspend operation. For example, if a kill operation is executed on a first process, the process is directly cleared and no longer occupies CPU load. A suspend action can be set to a certain suspension time threshold, such as a suspend time of 1 second or 2 seconds.

[0102] Step 405: Monitor the recycling event. Specifically, after monitoring the recycling event of the first process, the first event monitoring module set in the first operating system may forward the event to the second event monitoring module set in the second operating system.

[0103] Step 406: The second event monitoring module in the second operating system receives the first process recycling event and may perform a corresponding process recycling operation according to the first process recycling event.

[0104] Step 407: Execute process recycling. In this step, at least one first process in the current process list that can execute recycling operations can be obtained, thereby constructing a recycling process list. For details, please refer to the above step 403.

[0105] Step 408: Read and execute the recycling action. For details, please refer to the above step 404.

[0106] refer to Figure 5 The figure shows the process recycling process initiated by the second operating system, namely the Linux operating system, which includes steps 501 to 508. The specific execution process can refer to the above Figure 4 The introduction in the illustrated embodiment differs from the execution process type of steps 401 to 408 only in that a second process recycling event is generated in step 502, and the second process recycling event is sent to the first operating system so that the process recycling operation can be performed in the first operating system based on the above-mentioned second process recycling event.

[0107] In the above Figure 4 and Figure 5 In the embodiment shown, in steps 403 and 503, whether each process is recyclable is determined by reading the recyclable flag of each process in the current process list in the configuration file. Therefore, in the embodiment of the present application, before reading the recyclable flag of each process in the current process list from the configuration file, the above processes can also be processed for subsequent operations, specifically, Figure 6 As shown, the following steps are included:

[0108] Step 601: Monitor process status changes.

[0109] Specifically, the processes whose states change in the first operating system and the second operating system may be monitored in advance, such as Figure 1 As shown, a first process status monitoring module 15 can be configured in the first operating system, and a second process status monitoring module 25 can be configured in the second operating system to respectively complete process status monitoring in the two operating systems. The above-mentioned process status includes foreground and background states. For example, when a process switches from the foreground to the background, it means that the state of the process has changed, and it is monitored.

[0110] Step 602: When it is determined that the process whose state has changed meets the process recycling condition, a recyclable flag is written for the process in the configuration file.

[0111] Based on step 601, a further operation is performed on the detected state change, namely, determining whether the process meets the process recycling conditions. If the process meets the process recycling conditions, a recycling flag is written for the process in the configuration file, for example, recycling flag 1. Otherwise, the process status monitoring module continues to monitor whether the process status in each operating system has changed. The process recycling conditions include at least one of the following: the process status changes to a background process and the process type is allowed to be recycled.

[0112] like Figure 6 Step 601 and step 602 shown in the figure can be executed in the first operating system and the second operating system respectively, for example, they can be executed in the Linux operating system and the Android operating system respectively, and can be Figure 1 Each process recycling management module shown is executed separately, that is, the first process recycling management module 16 in the first operating system is responsible for executing the above steps to complete the writing of the recyclable mark to the process that meets the process recycling conditions in the first operating system; the second process recycling management module 26 in the second operating system is responsible for executing the above steps to complete the writing of the recyclable mark to the process that meets the process recycling conditions in the second operating system. At this time, Figure 7 As shown, the following steps are included:

[0113] Step 701: Execute process status monitoring, i.e., monitor whether the status of each process changes, i.e., whether the foreground and background of the process change. If so, the change is monitored;

[0114] For example, in the Android operating system, the process status information is mainly obtained by monitoring the AMS service of the framework, while in the Linux operating system, the process status information is mainly read by monitoring the window display.

[0115] Step 702, execute the process recycling management step, that is, determine whether the above-mentioned process status has changed and whether the process has entered the background, that is, whether the above-mentioned process is a background process. Generally speaking, only background processes can be recycled, and the foreground process is the currently active process, such as the process associated with the running application, which cannot be recycled; therefore, when determining whether the process with a status change meets the recycling conditions, you can first determine whether the above-mentioned process is a background process. If so, further determine whether the process is a type that allows recycling.

[0116] Specifically, in this embodiment, processes can be divided into types that allow recycling and types that do not allow recycling, and processes of the type that do not allow recycling are recorded in a whitelist. Then, after obtaining that the process is a background process, whether it is allowed to be recycled is determined based on whether the process is in the whitelist. As mentioned above, the whitelist is generally processes that are not allowed to be recycled. For example, service processes or UI application processes can be distinguished. Specifically, desktop applications, maps, status bars, navigation bars, taskbars, AVMs, etc. can be distinguished. Processes associated with these important system applications will be configured in the whitelist, and processes in the whitelist are not allowed to be recycled. For processes of the type that allow recycling, they can generally be some less important applications that consume CPU load, such as some games, entertainment, social and shopping applications. The recycling of such applications will not affect the basic function implementation of the operating system. Therefore, if it is not a background process, or it is in the whitelist, it will return to the above-mentioned step 701 and continue to execute process status monitoring. If it is a background process and it is not in the whitelist, step 703 will be executed;

[0117] Step 703: For the process determined to be capable of executing the process recycling operation, mark it, for example, write a recyclable mark into a configuration file, the recyclable mark is used to indicate that the corresponding process is recyclable, that is, to indicate the first process mentioned above.

[0118] In the above embodiments of the present application, the above Figure 4 and Figure 5 The embodiment can realize that when the load monitoring module in any operating system detects that the CPU load value is greater than or equal to the preset load threshold, the processes in the first operating system and the second operating system can be recycled, thereby releasing the CPU computing power occupied by the above processes. After the CPU computing power is released, the CPU load can also be effectively reduced. Therefore, the technical effect of reducing the CPU load can be effectively achieved through the above implementation. The above technical solution can be a technical solution for the performance recovery and fusion of dual operating systems, that is, it can ensure that the CPU computing power of the dual operating systems is always maintained at a relatively high level as much as possible, while reducing the mutual influence of the performance between the two operating systems and the uneven distribution of CPU resources.

[0119] However, in some cases, despite the execution of the above process recycling operation, there is a situation where the CPU load value is still greater than or equal to the preset load threshold. In this case, after the process recycling event is triggered, that is, after the above process recycling operation is executed, the CPU load value is still greater than or equal to the preset load threshold. Figure 4 or Figure 5 After the embodiment shown, further corresponding operations may be performed to alleviate the CPU load, specifically, Figure 8 As shown, the following steps are included:

[0120] Step 801: In response to the first operating system or the second operating system still detecting that the CPU load value is greater than or equal to the preset load threshold, triggering an application frame rate drop event;

[0121] Specifically, when any one of the first load monitoring module and the second load monitoring module detects that the CPU load value is still greater than or equal to the preset load threshold, an application frame drop event is further triggered.

[0122] Step 802: The application frame rate reduction event is used to control the first operating system and / or the second operating system to perform an application frame rate reduction operation.

[0123] Based on step 801, the first operating system and the second operating system are controlled to perform corresponding application frame reduction operations according to the triggered application frame reduction event. The application reduction operation refers to reducing the frame rate of the application program to achieve the purpose of reducing the CPU load.

[0124] Specifically, after triggering the application frame rate reduction event, a frame rate reduction notification is sent to the application in the first operating system and / or the second operating system according to the event, so that the application reduces the frame rate. The above application can be an application in the application center of each operating system, for example Figure 1 As shown, for the first operating system being the Android operating system, the applications in the application center may include Android APP1 and Android APP2; for the second operating system being the Linux operating system, the applications in the application center may include Linux APP1 and Linux APP2. For example, when the frame rate of the above-mentioned application can be values such as 60fps, 90fps, and 120fps, the frame rate of the application can be reduced to 60fps. As the frame rate decreases, the application can effectively reduce the CPU computing power required, thereby reducing the CPU load. In this way, when the CPU load is still too high, frame reduction operations can be performed on the applications in each operating system, which can further reduce the CPU burden and improve the system response speed and stability.

[0125] In an embodiment of the present application, when a frame rate reduction notification is sent to an application in the first operating system and / or the second operating system based on an application frame drop event, specifically, on the first operating system side, when the system detects the application frame drop event, it sends a frame rate reduction notification to the application in the first operating system, and at the same time, forwards the above-mentioned application frame drop event to the second operating system to achieve the purpose of sending a frame rate reduction notification to the application in the second operating system; on the second operating system side, a frame rate reduction notification can also be sent to the application in the first operating system and / or the second operating system in the above-mentioned manner.

[0126] In some embodiments, the above-mentioned triggering of the application frame drop event may be writing an application frame drop identifier in the application frame drop node in the configuration file, for example, writing an application frame drop identifier 1 in the / proc / util-dropframe node in the configuration file.

[0127] Figure 9 This is a flow chart of executing the application frame reduction operation in an embodiment of the present application, as shown in FIG. Figure 9 As shown, it may include the following steps:

[0128] Step 901: Monitor the CPU load. This step can be performed after the above steps are completed. Figure 4 and Figure 5 After the process recycling process shown, the CPU load is still monitored by the load monitoring modules of each operating system. For example, the first load monitoring module 11 obtains the CPU load value of the first operating system, and the second load monitoring module 21 obtains the CPU load value of the second operating system.

[0129] Step 902: Determine whether the CPU load condition has improved based on the CPU load value obtained through monitoring, that is, whether the CPU load condition has reached an acceptable range and whether it is still greater than or equal to a preset load threshold. The preset load threshold can be Figure 4 and Figure 5 The preset loads in the illustrated embodiment may be the same or different. If the load reaches an acceptable range, step 901 may be repeated for continuous monitoring. Otherwise, an application drop frame event may be triggered. Triggering the application drop frame event in this step may include writing an application drop frame identifier to an application drop frame file node in a configuration file. The application drop frame file node may be, for example, the / proc / util-dropframe node.

[0130] Step 903 : monitoring an application frame drop event, which may be specifically performed by the first event monitoring module 13 and the second event monitoring module 23 in the above embodiment.

[0131] For example, when the first event monitoring module 13 detects the application frame rate reduction event triggered by the first load monitoring module 11, it sends a frame rate reduction notification to the application in the first operating system, and forwards the application frame rate reduction event to the second event monitoring module 23, so that the second event monitoring module 23 sends a frame rate reduction notification to the application in the second operating system; and / or,

[0132] When the second event monitoring module 23 detects the application frame reduction event triggered by the second load monitoring module 21, it sends a frame rate reduction notification to the application in the second operating system, and forwards the application frame reduction event to the first event monitoring module 13, so that the first event monitoring module 13 sends a frame rate reduction notification to the application in the first operating system. The above-mentioned frame rate reduction notification can be sent by broadcasting.

[0133] Step 904: The application reduces the frame rate. The application may be an application of each application center, and the above-mentioned applications may be differentiated according to actual conditions. For example, some applications can run at a reduced frame rate, while some applications cannot run at a reduced frame rate. Therefore, each application may initiate a registration with the above-mentioned event monitoring module, and indicate through the registration information that it can reduce the frame rate when necessary, so that the above-mentioned event monitoring modules can send a frame rate reduction notification only to the application that can reduce the frame rate.

[0134] The frame rates of the above applications may include values such as 60fps, 90fps, and 120fps. The frame rate can be reduced to 60fps by lowering the frame rate through the application. As the frame rate decreases, the application can effectively reduce the CPU computing power required, thereby reducing the CPU load.

[0135] The present application also provides an electronic device, such as Figure 10 As shown, the electronic device includes: a processor 41 and a memory 42, the memory 42 stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the following are achieved: Figure 1-9 The steps of the process recycling method of the operating system.

[0136] This application also provides a vehicle system, such as Figure 11 As shown, the vehicle system can run the first operating system 51 and the second operating system 52 at the same time, and the vehicle system also includes Figure 10The electronic device 53 shown has a first operating system that includes at least one of Android and Linux, and a second operating system that includes at least one of Android and Linux. For example, the first operating system is Android and the second operating system is Linux. The above-mentioned vehicle-mounted system enables operating system process recycling, effectively reducing CPU load, thereby improving the performance of the dual operating systems and enhancing the overall user experience.

[0137] The present application also provides a vehicle, such as Figure 12 As shown, the vehicle includes Figure 11 The vehicle-machine system 61 shown, through the above-mentioned vehicle-machine system, enables the vehicle to achieve more comprehensive computing power recovery during operation, effectively reduce the CPU load, improve the overall performance and response speed of the vehicle, and bring users a smoother and more comfortable driving experience.

[0138] The present application also provides a computer-readable storage medium, wherein a program or instruction is stored on the computer-readable storage medium, and when the program or instruction is executed by a processor, the following is realized: Figures 1-9 The steps of the process recycling method of the operating system.

[0139] The present application also provides a computer program product, which, when executed by a vehicle processor, implements the following Figures 1-9 The steps of the process recycling method of the operating system.

[0140] It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in the opposite order according to the functions involved. For example, the described method may be performed in an order different from that described, and various steps may also be added, omitted or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0141] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of a computer software product plus a necessary general-purpose hardware platform, or of course, by hardware. The computer software product is stored in a storage medium (such as ROM, RAM, magnetic disk, optical disk, etc.) and includes a number of instructions for enabling a terminal or network-side device to execute the methods described in each embodiment of the present application.

[0142] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of this application, ordinary technicians in this field can also make many forms of implementation methods without departing from the purpose of this application and the scope of protection of the claims. These implementation methods are all within the protection of this application.

Claims

1. A process recycling method for an operating system, characterized in that: include: In response to the first operating system or the second operating system detecting that the CPU load value is greater than or equal to a preset load threshold, triggering a process recycling event; The process recycling event is used to instruct the first operating system and the second operating system to perform a process recycling operation.

2. The method according to claim 1, characterized in that After the first operating system and the second operating system execute the process recycling operation, the method further includes: In the running task list, the running task interface after the process recycling operation is performed is displayed.

3. The method according to claim 1, characterized in that The preset load threshold is stored in a configuration file, and the method further includes: The preset load threshold is obtained from the configuration file.

4. The method according to any one of claims 1 to 3, characterized in that: The first operating system is configured with a first load monitoring module, and the second operating system is configured with a second load monitoring module; The first operating system or the second operating system detects that the CPU load value is greater than or equal to a preset load threshold, including: Any one of the first load monitoring module and the second load monitoring module detects that the CPU load value is greater than or equal to a preset load threshold.

5. The method according to claim 4, characterized in that If the first load monitoring module detects that the CPU load value reaches a preset load threshold, the first operating system and the second operating system perform a process recycling operation, including: A process recycling operation is performed in the first operating system, and a first process recycling event is generated and sent to the second operating system, so that the process recycling operation is performed in the second operating system.

6. The method according to claim 4, characterized in that If the second load monitoring module detects that the CPU load value is greater than or equal to a preset load threshold, the first operating system and the second operating system perform a process recycling operation, including: A process recycling operation is performed in the second operating system, and a second process recycling event is generated and sent to the first operating system, so that the process recycling operation is performed in the first operating system.

7. The method according to claim 1, characterized in that Before responding to the first operating system or the second operating system detecting that the CPU load value is greater than or equal to a preset load threshold, the method further includes: Based on the first operating system marking the reclaimable process file, the first operating system synchronizes the marking information of the reclaimable process file to the second operating system.

8. The method according to claim 7, characterized in that The execution process recycling operation includes: Obtaining at least one first process capable of executing a recycling operation from a current process list; A recycling operation is performed on the at least one first process.

9. The method according to claim 8, characterized in that The acquiring, from the current process list, at least one first process capable of executing the recycling operation comprises: Read the recyclable flag of each process in the current process list from the configuration file; A first process capable of executing a recycling operation is determined based on the recyclable identifier.

10. The method according to claim 9, characterized in that Before reading the recyclable identifier of each process in the current process list from the configuration file, the method further includes: Monitor process status changes; When it is determined that the process whose state has changed meets the process recycling condition, the recyclable flag is written for the process in the configuration file.

11. The method according to claim 10, characterized in that The process recycling condition includes that the process state changes to a background process, and / or the process type is allowed to be recycled.

12. The method according to claim 8, characterized in that Performing a recycling operation on the at least one first process includes: A kill operation or a suspend operation is performed on the at least one first process.

13. The method according to any one of claims 1 to 12, characterized in that: After the triggering process recycling event, the following is also included: In response to the first operating system or the second operating system still detecting that the CPU load value is greater than or equal to the preset load threshold, triggering an application frame drop event; The application frame rate reduction event is used to control the first operating system and / or the second operating system to perform an application frame rate reduction operation.

14. The method according to claim 13, characterized in that The controlling the first operating system and / or the second operating system to perform the application frame rate reduction operation includes: Based on the application frame rate reduction event, a frame rate reduction notification is sent to an application program in the first operating system and / or the second operating system, so that the application program reduces the frame rate.

15. The method according to claim 14, characterized in that The sending a frame rate reduction notification to an application in the first operating system and / or the second operating system based on the application frame rate reduction event includes: When the first operating system detects an application frame rate drop event, it sends a frame rate reduction notification to the application in the first operating system and forwards the application frame rate drop event to the second operating system to send a frame rate reduction notification to the application in the second operating system.

16. The method according to claim 14, characterized in that The sending a frame rate reduction notification to an application in the first operating system and / or the second operating system based on the application frame rate reduction event includes: When the second operating system detects an application frame rate drop event, it sends a frame rate reduction notification to the application in the second operating system and forwards the application frame rate drop event to the first operating system to send a frame rate reduction notification to the application in the first operating system.

17. The method according to claim 13, wherein The event of triggering application frame drop includes: Write the application frame reduction identifier to the application frame reduction file node in the configuration file.

18. The method according to claim 1, wherein The first operating system and the second operating system communicate with each other through an RPC communication module.

19. The method according to claim 1, wherein The first operating system includes at least one of an Android operating system and a Linux operating system, and the second operating system includes at least one of an Android operating system and a Linux operating system.

20. An electronic device, characterized in that: include: A processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the process recycling method of the operating system as described in any one of claims 1 to 19 are implemented.

21. A vehicle computer system, characterized in that: The first operating system and the second operating system run on the vehicle system, and the vehicle system includes the electronic device according to claim 20.

22. A vehicle, characterized in that: Including the vehicle system as described in claim 21.

23. A computer-readable storage medium, characterized in that The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the process recycling method of the operating system according to any one of claims 1 to 19 are implemented.

24. A computer program product, characterized in that The program product implements the steps of the process recycling method of the operating system as described in any one of claims 1 to 19 when executed by a processor of an electronic device.