A vehicle hibernation control method and device, electronic equipment and storage medium
By monitoring the vehicle's power status and managing resource list configuration files in the system application, the high development and iteration difficulty of traditional Android vehicle systems in sleep state management is solved, achieving unified resource management and improved code reusability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-26
- Publication Date
- 2026-04-07
AI Technical Summary
Traditional Android in-vehicle infotainment systems require multiple applications to release or load resources separately when managing sleep mode, which increases the difficulty of development and subsequent application porting and upgrade iterations.
By monitoring the power status of the target vehicle through a system application, determining the resource list configuration file corresponding to the power status, and managing the resources in the resource list configuration file based on the power status, unified sleep control of the vehicle is achieved.
It reduces the workload and difficulty of application development, increases code reusability, reduces the difficulty of subsequent application porting, and facilitates upgrades and iterations.
Smart Images

Figure CN116552423B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of vehicle technology, and in particular to a vehicle sleep control method, device, electronic device, and storage medium. Background Technology
[0002] Currently, most in-vehicle infotainment systems are based on Android. Due to the large size of the Android system, the system boots up slowly, affecting the user experience. Android has added a new power management mechanism to enable faster boot times; this mechanism is called Suspend-to-RAM (STR). However, traditional Android native STR uses a framework interface and service implementation to manage upper-layer applications. When entering STR, multiple upper-layer applications (apps) need to adapt to these interfaces. If the application is in a dormant state, multiple applications need to release or load relevant resources separately before entering dormant mode, increasing the workload and development difficulty of applications, as well as the difficulty of subsequent application porting and upgrade iterations. Summary of the Invention
[0003] In view of this, the present invention provides a vehicle hibernation control method, device, electronic device and storage medium, which can realize the unified management of all resources in one system application to control vehicle hibernation, reduce application development workload and difficulty, increase code reusability, reduce the difficulty of subsequent application porting and facilitate subsequent upgrades and iterations.
[0004] According to one aspect of the present invention, an embodiment of the present invention provides a vehicle sleep control method, which is applied to a system application, the method comprising:
[0005] Monitor the power status of the target vehicle;
[0006] Determine the resource list configuration file corresponding to the power state; wherein each resource list configuration file includes parameter information corresponding to at least two types of resources;
[0007] At least two resources in the resource list configuration file are managed according to the power status to enable sleep control of the target vehicle.
[0008] According to another aspect of the present invention, embodiments of the present invention also provide a vehicle sleep control processing device, the device being applied to a system application, the device comprising:
[0009] A status monitoring module is used to monitor the power status of the target vehicle;
[0010] The determination module is used to determine the resource list configuration file corresponding to the power state; wherein each of the resource list configuration files includes parameter information corresponding to at least two types of resources;
[0011] The management module is used to manage at least two resources in the resource list configuration file according to the power status, so as to realize the hibernation control of the target vehicle.
[0012] According to another aspect of the present invention, embodiments of the present invention also provide an electronic device, the electronic device comprising:
[0013] At least one processor; and
[0014] A memory communicatively connected to the at least one processor; wherein,
[0015] The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the vehicle sleep control method according to any embodiment of the present invention.
[0016] According to another aspect of the present invention, embodiments of the present invention also provide a computer-readable storage medium storing computer instructions for causing a processor to execute and implement the vehicle sleep control method described in any embodiment of the present invention.
[0017] The technical solution of this invention involves a system application monitoring the power status of a target vehicle and determining a resource list configuration file corresponding to the power status. Based on the power status, at least two resources in the resource list configuration file are managed to achieve sleep control of the vehicle. This allows all resources to be managed in a single system application for sleep control of the vehicle, reducing application development workload and difficulty, increasing code reusability, reducing the difficulty of later porting, and facilitating subsequent upgrades and iterations.
[0018] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 A flowchart of a vehicle sleep control method provided in an embodiment of the present invention;
[0021] Figure 2 A flowchart of another vehicle sleep control method provided in an embodiment of the present invention;
[0022] Figure 3 This is a specific framework diagram of a vehicle sleep control according to an embodiment of the present invention;
[0023] Figure 4 This is a flowchart illustrating another vehicle sleep control method provided in an embodiment of the present invention;
[0024] Figure 5 This is a structural block diagram of a vehicle sleep control device provided in an embodiment of the present invention;
[0025] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0026] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0027] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0028] In one embodiment, Figure 1The flowchart below shows a vehicle sleep control method according to an embodiment of the present invention. This embodiment is applicable to situations where a vehicle is under sleep control in a system application. The method can be executed by a vehicle sleep control processing device, which can be implemented in hardware and / or software and can be configured in an electronic device.
[0029] like Figure 1 As shown, this method is applied to a system application, which can be a system application created artificially, or a system application modified by adding a sub-function to an existing system application; the specific steps of the vehicle sleep control method in this embodiment include:
[0030] S110, Monitor the power status of the target vehicle.
[0031] In this context, power status can be understood as the power status corresponding to the user command received by the vehicle power management service. In this embodiment, power status may include, but is not limited to, the vehicle power being in a power-off preparation state, the vehicle power being in a hibernation state, the vehicle power being in a power-off cancelled state, and the vehicle power being in a paused exit state.
[0032] In this embodiment, the vehicle's power state is related to the trigger command issued by the user. It can be understood that when the user triggers the vehicle to go into sleep mode, the corresponding power state is that the vehicle power is in the power-off preparation state; when the user triggers the vehicle to start the engine, the corresponding power state is that the vehicle power is in the paused exit state; when the user triggers the vehicle to interrupt sleep mode, the power state changes during the transition from the power-off preparation state to the paused exit state. At this time, the power state corresponding to the user canceling sleep mode is the power-off canceled state. Of course, the power state can also be changed by other commands, which is not limited in this embodiment.
[0033] In this embodiment, the system application can register the power status identifier corresponding to the target vehicle in the vehicle power management system. After the power status at the underlying level changes, the system application will notify the vehicle power management system. Thus, the system application determines the power status of the target vehicle based on the registered power status identifier and the preset system interface. In some embodiments, a listener can also be bound to the vehicle power management system. An anonymous inner class can be defined in the listener method, and the methods in the inner class can be overridden to implement the logic to be implemented by the listening event. Of course, other methods of listening to the power status are also possible, and this embodiment does not limit them.
[0034] S120. Determine the resource list configuration file corresponding to the power state; wherein each resource list configuration file includes parameter information corresponding to at least two resources.
[0035] The resource list configuration file refers to the resource file written for different power states. The resource list configuration file can implement the power state processing logic corresponding to different power states. It can be understood that different power states correspond to different resource list configuration files. Each resource list configuration file includes parameter information corresponding to at least two types of resources.
[0036] In this embodiment, the target resource list configuration file corresponding to the power state can be determined by calling at least two pre-configured resource list configuration files and sequentially searching for the target resource list configuration file that matches the power state. In some embodiments, the resource list configuration files can also be classified according to the power state, and resource list configuration files exceeding a preset threshold proportion can be identified from the classification results and used as the target resource list configuration file. It should be noted that the resource list configuration file can include resources of different types and different functions. For example, the resource list configuration file can include, but is not limited to, application list information within a preset time period, audio resources, wireless network driver resources, external data service platform, and page display resource information, etc.
[0037] S130. Manage at least two resources in the resource list configuration file according to the power status to achieve sleep control of the target vehicle.
[0038] The hibernation control may include, but is not limited to, the target vehicle entering hibernation state, the hibernation interruption state of the target vehicle, and the wake-up hibernation state of the target vehicle.
[0039] In this embodiment, managing at least two resources in the resource list configuration file can include releasing and loading at least two resources. Different power states correspond to different resource list configuration files; the appropriate resource list configuration file can be selected based on the power state to load or release at least two resources, thereby achieving sleep control of the target vehicle. In some embodiments, a sleep signal sent by the control unit can also be received to release relevant resources according to the running state of the application, and after the information release is complete, the microcontroller unit and the application can be controlled to switch from working mode to sleep mode.
[0040] The technical solution of this invention involves a system application monitoring the power status of a target vehicle and determining a resource list configuration file corresponding to the power status. Based on the power status, at least two resources in the resource list configuration file are managed to achieve sleep control of the vehicle. This allows all resources to be managed in a single system application for sleep control of the vehicle, reducing application development workload and difficulty, increasing code reusability, reducing the difficulty of later porting, and facilitating subsequent upgrades and iterations.
[0041] In one embodiment, the method further includes:
[0042] Send at least two resource release completion messages or loading completion messages to the vehicle power management service system to enable the vehicle power management service system to put the target vehicle into hibernation control.
[0043] The hibernation control includes at least one of the following: entering hibernation state, hibernation interruption state, and waking up from hibernation state.
[0044] In this embodiment, the vehicle power management service system receives a power status identifier transmitted by the system application; in response to a user's vehicle trigger command, it transmits the power status corresponding to the vehicle trigger command to the system application through the power status identifier; wherein, the vehicle trigger command includes at least: a vehicle sleep command, a vehicle ignition command, and a vehicle sleep interruption command; upon receiving a sleep control signal for the target vehicle sent by the system application, it performs sleep control on the target vehicle according to the sleep control signal. In this embodiment, after the system application has finished loading or releasing at least two resources, the system application sends a release completion message or loading completion message for at least two resources to the vehicle power management service system, so that the vehicle power management service system performs sleep control on the target vehicle. Specifically, if the sleep control signal is a vehicle sleep signal, then performing sleep control on the target vehicle means entering a sleep state; if the sleep control signal is a vehicle ignition signal, then performing sleep control on the target vehicle means entering a sleep interruption state; if the sleep control signal is a wake-up sleep signal, then performing sleep control on the target vehicle means entering a wake-up sleep state.
[0045] In one embodiment, Figure 2 This is a flowchart of another vehicle hibernation control method provided in an embodiment of the present invention. Based on the above embodiments, this embodiment further refines the process of monitoring the power status of the target vehicle; determining the resource list configuration file corresponding to the power status; and managing at least two resources in the resource list configuration file according to the power status to achieve hibernation control of the target vehicle.
[0046] like Figure 2 As shown, the vehicle sleep control method in this embodiment may specifically include the following steps:
[0047] S210. Register the power status identifier corresponding to the target vehicle in the vehicle power management system and save the power status identifier.
[0048] The power status identifier can be understood as a listening interface identifier provided by the vehicle power management service. Of course, the power status identifier is unique. System applications can be realized through the power status identifier. For example, it can be the Car Power State Listener With Completion, which is a fully functional car power status listener.
[0049] In this embodiment, after the vehicle's infotainment system starts up, the system_server process launches the system application and initializes it. The system application needs to register the power status identifier corresponding to the target vehicle in the vehicle power management service system. After registration, if the underlying power status changes, the system will notify the vehicle power management service system. The vehicle power management service system can call back the interface, and the system application can communicate through the power status identifier.
[0050] S220. Determine the power status of the target vehicle based on the power status identifier and the preset system interface. The power status includes: power-off preparation state, hibernation state, power-off cancelled state, and paused exit state.
[0051] The preset system interface can be understood as the relevant resource interface corresponding to the Android system in the vehicle, which may include audio resource interface, wireless Internet driver interface, external data service platform interface, etc.
[0052] In this embodiment, after the system registers the power status identifier in the vehicle power management service system, it can listen to different power states in the file corresponding to "on State Changed". This can be understood as determining the current power state by the transmitted power status identifier. The power state may include: SHUTDOWN_PREPARE (power off ready state), SUSPEND_ENTER (entering hibernation state), SHUTDOWN_CANCELLED (power off canceled state), SUSPEND_EXIT (paused exit state), etc.
[0053] S230, Invoke the pre-configured resource list configuration file.
[0054] In this embodiment, the resource list configuration file is a pre-configured resource file containing power state processing logic for at least two resources under different power states. In this embodiment, a target resource list configuration file matching the current power state can be found by calling at least two pre-configured resource list configuration files.
[0055] S240. Locate the target resource list configuration file that matches the power state in the resource list configuration file; wherein the resource list configuration file includes at least one of the following: power-off preparation state configuration file, hibernation state configuration file, power-off cancelled state configuration file, and paused exit state configuration file.
[0056] The target resource list configuration file refers to the resource list configuration file that corresponds to the current power state. Specifically, the target resource list configuration file can be one of the following: a shutdown preparation state configuration file, a hibernation state configuration file, a shutdown cancelled state configuration file, or a paused / exit state configuration file.
[0057] In this embodiment, each resource list configuration file is compared sequentially with the power state. The resource list configuration file that matches the power state is selected as the target resource list configuration file. Specifically, when the power state is in the shutdown preparation state, the target resource list configuration file is determined to be the shutdown preparation state configuration file; when the power state is in the hibernation state, the target resource list configuration file is determined to be the hibernation state configuration file; when the power state is in the shutdown cancelled state, the target resource list configuration file is determined to be the shutdown cancelled state configuration file; and when the power state is in the paused exit state, the target resource list configuration file is determined to be the paused exit state configuration file.
[0058] In one embodiment, searching for a target resource list configuration file that matches the power state in the resource list configuration file includes: determining the target resource list configuration file as a shutdown preparation state configuration file when the power state is in a shutdown preparation state; determining the target resource list configuration file as a hibernation state configuration file when the power state is in a hibernation state; determining the target resource list configuration file as a shutdown cancellation state configuration file when the power state is in a pause / exit state configuration file; and determining the target resource list configuration file as a pause / exit state configuration file when the power state is in a pause / exit state.
[0059] S250: Call Activity Manager to obtain the list of applications within a preset time period.
[0060] S260. Call the removal task in the Activity Manager Service to clean up the application list information within the preset time period.
[0061] S270: Clean up audio resources through the customized audio management interface.
[0062] S280: The shell script uninstalls the wireless network driver by controlling the first custom attribute value.
[0063] S290, Use the second custom attribute value to control the shell script to remove the external data service platform.
[0064] The application list information can include all applications opened within a certain period of time.
[0065] In this embodiment, releasing at least two types of resources and managing at least two types of resources in the resource list configuration file according to power status can include: when releasing at least two types of resources, calling ActivityManager to obtain application list information within a preset time period, calling the removal task in ActivityManagerService to clean up the application list information within the preset time period, cleaning up audio resources through the audio management custom interface, controlling the shell script to uninstall the wireless network driver through a first custom attribute value, and controlling the shell script to remove the external data service platform through a second custom attribute value.
[0066] S2100: Call the audio management custom interface to load and restore audio resources.
[0067] S2110: Control the shell script to load the wireless network driver through a third custom attribute value.
[0068] S2120, The external data service platform is launched by controlling the shell script through the fourth custom attribute value.
[0069] S2130, Set CATEGORY_HOME, ACTION_MAIN, FLAG_ACTIVITY_NEW_TASK through the Intent component, and use the launch page method in the context to bring up the desktop display.
[0070] In this embodiment, loading at least two resources and managing at least two resources in the resource list configuration file according to the power status may include: when loading at least two resources, calling the audio management custom interface to load audio resources, controlling the shell script to load the wireless network driver through a third custom attribute value, controlling the shell script to launch the external data service platform through a fourth custom attribute value, setting CATEGORY_HOME, ACTION_MAIN, and FLAG_ACTIVITY_NEW_TASK through the Intent component, and using the launch page method in the context to launch the desktop display.
[0071] It should be noted that there are three types of vehicle sleep control: entering sleep mode, sleep interruption mode, and waking up from sleep mode. The following is a detailed explanation of the vehicle sleep control in each of these three modes.
[0072] In this embodiment, when the user turns off the engine and enters sleep mode, the vehicle power management system notifies the system application of the power status SHUTDOWN_PREPARE (power-off preparation state). The system application receives the notification in the Java file and begins to release relevant resources in the power-off preparation state configuration file. Since different resources vary depending on the vehicle manufacturer's in-vehicle system functions, the resource release during sleep mode in this embodiment includes the following:
[0073] a1. The released resources include calling Activity Manager to get the recent list.
[0074] a2. Call the removeTask function in Activity ManagerService to clear recent tasks.
[0075] a3. Clean up audio-related resources through the Audio Manager custom interface.
[0076] a4. Uninstall the Wi-Fi driver via a shell script by setting attribute values.
[0077] a5. Kill the AIS service by setting attribute values and using a shell script.
[0078] Once the resource cleanup is complete, the vehicle power management system is notified that the upper-layer resources have been cleaned up and the system can enter hibernation mode. The vehicle power management system then notifies the kernel layer to officially begin the hibernation process.
[0079] In this embodiment, when the user ignites the engine and exits sleep mode, the vehicle power management system notifies the system application of the power status SUSPEND_EXIT (suspended / exited state). The system application receives the notification in the Java file and begins loading relevant resources in the suspended / exited state configuration file. The resource loading upon exiting sleep mode in this patent includes the following:
[0080] b1. Call the Audio Manager custom interface to load and restore relevant resources.
[0081] b2. Load the Wi-Fi driver via a shell script by setting attribute values.
[0082] b3. Start the AIS service via shell script by setting attribute values.
[0083] b4. Use the `start Activity` method in the `Context` to launch the desktop display by setting `CATEGORY_HOME`, `ACTION_MAIN`, and `FLAG_ACTIVITY_NEW_TASK` via an `Intent`. Once resources are loaded, notify the vehicle power management system that the upper-layer resources are loaded. After the lower-layer resources are ready, the desktop will be displayed, and the user can operate the vehicle's infotainment system normally.
[0084] In this embodiment, the system application also implements a scenario where the user turns off the engine and immediately restarts it. This is a hibernation interruption. The power state changes from SHUTDOWN_PREPARE (power off preparation state) to SUSPEND_ENTER (pause to enter hibernation state). At this time, the power state corresponding to the user canceling hibernation is SHUTDOWN_CANCELLED (power off canceled state). This power state requires the system to be restored to normal working state, which requires loading relevant resources and restoring the system.
[0085] c1. Call the Audio Manager custom interface to load and restore relevant resources.
[0086] c2. Load the Wi-Fi driver via a shell script by setting attribute values.
[0087] c3. Start the AIS service via shell script by setting attribute values.
[0088] c4. Use the `start Activity` method in the Context to launch the desktop by setting `CATEGORY_HOME`, `ACTION_MAIN`, and `FLAG_ACTIVITY_NEW_TASK` via Intent.
[0089] Once the resources are loaded, the vehicle power management system will be notified that the upper-level resources are loaded. After the lower-level resources are ready, the desktop will be displayed, and the user can then operate the vehicle's infotainment system normally.
[0090] The above-described technical solution of this invention, by registering and saving the power status identifier corresponding to the target vehicle in the vehicle power management system, determining the power status of the target vehicle based on the power status identifier and a preset system interface, calling a pre-configured resource list configuration file, searching for a target resource list configuration file that matches the power status, and releasing or loading at least two resources in the resource list configuration file according to the power status, further realizes the unified management of all resources in one system application for vehicle hibernation control, which can reduce the workload and difficulty of application development, increase code reusability, reduce the difficulty of subsequent application porting, and facilitate subsequent upgrades and iterations.
[0091] In one embodiment, to facilitate a better understanding of the specific framework diagram of vehicle sleep control, Figure 3 This embodiment provides a specific framework diagram for vehicle sleep control according to an embodiment of the present invention, further illustrating the specific framework of vehicle sleep control. In this embodiment, the specific framework diagram for vehicle sleep control includes an application layer, an application framework layer, a HAL layer (Hardware Abstraction Layer), a Microcontroller Unit (MCU), and a kernel layer. The application layer contains multiple applications and a custom system application. This system application can implement vehicle sleep control; it can be understood that a system application can be used to load or release at least two occupied system resources to execute any of the vehicle sleep control methods in this embodiment. In this embodiment, the application framework layer includes Car Power Manager and CarPower Manager Service. Car Power Manager is the vehicle power management system in the above embodiment, and CarPower Manager Service is the vehicle power management service system in the above embodiment, implementing the vehicle power state machine and connecting to the VHAL (Vehicle Hardware Abstraction Layer). In this embodiment, the HAL layer includes VHAL, which connects to the Car PowerManager Service and the MCU.
[0092] In one embodiment, to facilitate a better understanding of the vehicle sleep control method, Figure 4This is a flowchart illustrating another vehicle sleep control method according to an embodiment of the present invention. This embodiment can be used as a preferred embodiment to further illustrate the vehicle sleep control method. In this embodiment, the vehicle sleep control method satisfies the following prerequisites: the vehicle system is based on the Android platform, Android version > 9.0; the vehicle system hardware supports STR suspension and sleep mode. A scheme for clearing related resource usage is implemented within a single system APP application, replacing the previous scheme where each APP application needed to monitor the power status and clear occupied resources. By unifying the processing of all resources through a single system APP, the workload and difficulty of APP development can be reduced, code reusability can be increased, and the difficulty of later porting and upgrades can be facilitated.
[0093] This embodiment further illustrates the vehicle hibernation control method through the interaction between the VHAL in the HAL layer, the Car Power Manager and Car PowerManager Service in the application framework layer, and a custom system application in the application layer. In this embodiment, the system APP identifies the system application mentioned in the previous embodiment. In this embodiment, the user triggers a hibernation control command, which is then notified to the VHAL. The VHAL then notifies the Car Power Manager Service. The Car Power Manager Service determines the power status based on the user's hibernation control command and notifies the upper-layer system APP of the power status through the power status identifier registered by the system APP. When the system APP receives the power status, it searches for the resource list configuration file corresponding to the power status and loads or releases at least two resources in the resource list configuration file based on the power status to achieve hibernation control of the vehicle. After loading or releasing the resources, the system APP notifies the Car Power Manager Service that it can enter the corresponding hibernation state. At this time, the Car Power Manager Service notifies the memory to suspend.
[0094] like Figure 4 As shown, the specific steps are as follows:
[0095] d1. The system APP determines the power status of the target vehicle by registering the corresponding power status identifier.
[0096] In this embodiment, after the vehicle's infotainment system starts up, the system_server process launches and initializes the system app. In a newly created Java file within the system app, the Car Power StateListener With Completion interface provided by Car Power Manager is used to register and monitor the power status.
[0097] d2. When the vehicle is turned off, the CAN bus sends a sleep signal to notify the MCU.
[0098] d3. The MCU sends a message to VHAL to notify Android to hibernate.
[0099] d4. In Android, the Car Power Manager Service receives user-triggered commands to the vehicle and notifies the Car Power Manager of the power status corresponding to the vehicle trigger command through a power status identifier. The Car Power Manager then notifies the upper-layer APP application to release or load relevant resources through the registered power status identifier. Among these, the vehicle trigger commands include at least: vehicle sleep command, vehicle ignition command, and vehicle sleep interruption command.
[0100] d5. The custom system APP switches power states based on the registered power state identifier and determines the resource list configuration file corresponding to the power state. It releases or loads at least two resources in the resource list configuration file according to the power state.
[0101] In this embodiment, after registration, the `onStateChanged` method needs to be implemented in the Java file. Using the passed `state`, code is written to implement the logic for handling different power state changes. This power state change handling logic includes `SHUTDOWN_PREPARE`, `SUSPEND_ENTER`, `SHUTDOWN_CANCELLED`, and `SUSPEND_EXIT`. It should be noted that the power state change handling logic is represented by the resource list configuration file in the above embodiment; `SHUTDOWN_PREPARE` represents the shutdown preparation state configuration file in the above embodiment; `SUSPEND_ENTER` represents the hibernation state configuration file in the above embodiment; `SHUTDOWN_CANCELLED` represents the shutdown cancelled state configuration file in the above embodiment; and `SUSPEND_EXIT` represents the shutdown cancelled state configuration file in the above embodiment.
[0102] In this embodiment, when the user turns off the engine and enters sleep mode, Car Power Manager notifies the system app of the power status SHUTDOWN_PREPARE. The system app receives the notification in its Java file and begins releasing relevant resources in the SHUTDOWN_PREPARE logic implementation. When the user turns on the engine and exits sleep mode, Car Power Manager notifies the system app of the power status SUSPEND_EXIT. The system app receives the notification in its Java file and begins loading relevant resources in the SUSPEND_EXIT logic implementation. When the user turns off the engine and immediately turns it on again, this is considered a sleep interruption. The power status changes during the transition from SHUTDOWN_PREPARE to SUSPEND_ENTER. At this time, the power status corresponding to the user canceling sleep mode is SHUTDOWN_CANCELLED.
[0103] d6. Once resources are loaded, notify the Car Power Manager Service that the upper-layer resources are loaded. After the lower-layer resources are ready, the desktop will be displayed, and the user can operate the vehicle system normally. Alternatively, once resources are cleared, notify the Car Power Manager Service that the upper-layer resources are cleared and the system can enter hibernation. The Car Power Manager Service will then notify the kernel layer to officially begin hibernation.
[0104] d7. When the MCU detects a voltage below 0.5V, it powers off peripherals and enters sleep mode.
[0105] d8. STR memory suspension successful, process ended.
[0106] In one embodiment, Figure 5 This is a structural block diagram of a vehicle sleep control device according to an embodiment of the present invention. This device is suitable for controlling vehicle sleep in a system application and can be implemented in hardware or software. It can be configured in an electronic device to implement a vehicle sleep control processing method according to an embodiment of the present invention.
[0107] like Figure 5 As shown, the device includes: a status monitoring module 510, a determination module 520, and a management module 530.
[0108] The status monitoring module 510 is used to monitor the power status of the target vehicle.
[0109] The determining module 520 is used to determine the resource list configuration file corresponding to the power state; wherein each of the resource list configuration files includes parameter information corresponding to at least two types of resources;
[0110] The management module 530 is used to manage at least two resources in the resource list configuration file according to the power status, so as to realize the hibernation control of the target vehicle.
[0111] In this embodiment of the invention, a status monitoring module monitors the power status of a target vehicle through a system application; a determination module determines a resource list configuration file corresponding to the power status; and a management module manages at least two resources in the resource list configuration file based on the power status to achieve sleep control of the vehicle. This allows all resources to be managed in a unified system application for vehicle sleep control, reducing application development workload and difficulty, increasing code reusability, reducing the difficulty of subsequent application porting, and facilitating subsequent upgrades and iterations.
[0112] In one embodiment, the status monitoring module 510 includes:
[0113] The registration unit is used to register the power status identifier corresponding to the target vehicle in the vehicle power management system and save the power status identifier.
[0114] The status determination unit is used to determine the power status of the target vehicle based on the power status identifier and the preset system interface, wherein the power status includes: power-off preparation status, hibernation status, power-off cancelled status, and pause exit status.
[0115] In one embodiment, the determining module 520 includes:
[0116] The file invocation unit is used to invoke the pre-configured resource list configuration file;
[0117] The search unit is used to search for a target resource list configuration file that matches the power state in the resource list configuration file; wherein the resource list configuration file includes at least one of the following: a power-off preparation state configuration file, a hibernation state configuration file, a power-off cancelled state configuration file, and a paused exit state configuration file.
[0118] In one embodiment, the search unit further includes:
[0119] The first determining subunit is configured to determine that the target resource list configuration file is a shutdown preparation state configuration file when the power state is a shutdown preparation state.
[0120] The second determining subunit is used to determine that the target resource list configuration file is a configuration file in a hibernation state when the power state is in a hibernation state.
[0121] The third determining subunit is used to determine that the target resource list configuration file is a configuration file in the power-off cancelled state when the power state is in the power-off cancelled state.
[0122] The fourth determining subunit is used to determine that the target resource list configuration file is a paused / exited configuration file when the power state is paused / exited.
[0123] In one embodiment, the management includes releasing at least two resources, and the management module 530 includes:
[0124] The retrieval unit is used to call Activity Manager to retrieve a list of applications within a preset time period.
[0125] The information cleanup unit is used to call the removal task in the Activity Manager Service to clean up the application list information within the preset time period.
[0126] The audio cleanup unit is used to clean up audio resources through a customized audio management interface;
[0127] The uninstallation unit is used to control the shell script to uninstall the wireless network driver through a first custom attribute value.
[0128] The removal unit is used to control the shell script to remove the external data service platform through a second custom attribute value.
[0129] In one embodiment, the management includes loading at least two types of resources, and the management module 530 includes:
[0130] The resource recovery unit is used to call the customized audio management interface to load audio resources.
[0131] The loading unit is used to control the shell script to load the wireless network driver via a third custom attribute value;
[0132] The launch unit is used to launch the external data service platform via a shell script controlled by the fourth custom attribute value.
[0133] The display unit is used to set CATEGORY_HOME, ACTION_MAIN, and FLAG_ACTIVITY_NEW_TASK via the Intent component and use the launch page method in the context to bring up the desktop display.
[0134] In one embodiment, the device further includes:
[0135] The hibernation control module is used to send at least two types of resource release completion messages or loading completion messages to the vehicle power management service system, so that the vehicle power management service system can perform hibernation control on the target vehicle; wherein, the hibernation control includes at least one of the following: entering hibernation state, hibernation interruption state, and waking up from hibernation state.
[0136] The vehicle sleep control processing device provided in the embodiments of the present invention can execute the vehicle sleep control processing method for application systems provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the method.
[0137] In one embodiment, Figure 6 This is a schematic diagram of an electronic device provided for an embodiment of the present invention. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0138] like Figure 6 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0139] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0140] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as vehicle sleep control methods.
[0141] In some embodiments, the vehicle sleep control processing method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the vehicle sleep control method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the vehicle sleep control method by any other suitable means (e.g., by means of firmware).
[0142] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0143] Computer programs used to implement the methods of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to the processor of a general-purpose computer, a special-purpose computer, or other programmable vehicle sleep control device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The computer programs can be executed entirely on the machine, partially on the machine, as a standalone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0144] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0145] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0146] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0147] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0148] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0149] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A vehicle sleep control method, characterized in that, Applications in in-vehicle infotainment systems include: Monitor the power status of the target vehicle; Determine the resource list configuration file corresponding to the power state; wherein each resource list configuration file includes parameter information corresponding to at least two types of resources; According to the power status, at least two resources in the resource list configuration file are managed to achieve sleep control of the target vehicle; The management includes releasing or loading resources; The released resources include at least two of the following: Call Activity Manager to retrieve a list of applications within a preset time period; The removal task in the Activity Manager Service is invoked to clean up the application list information within the preset time period. Clean up audio resources by using a customized audio management interface; The shell script can be used to uninstall the wireless network driver by controlling the first custom attribute value. The shell script can be used to remove the external data service platform by controlling the second custom attribute value; The loaded resources include at least two of the following: Call the customized audio management interface to load audio resources; The shell script loads the wireless network driver by controlling a third custom attribute value. The external data service platform is launched via a shell script controlled by a fourth custom attribute value. Set CATEGORY_HOME, ACTION_MAIN, and FLAG_ACTIVITY_NEW_TASK using the Intent component, and use the launch page method in the context to bring up the desktop display.
2. The method according to claim 1, characterized in that, The monitoring of the power status of the target vehicle includes: Register and save the power status identifier corresponding to the target vehicle in the vehicle power management system. The power status of the target vehicle is determined based on the power status identifier and the preset system interface, wherein the power status includes: power-off preparation state, hibernation state, power-off cancelled state, and paused exit state.
3. The method according to claim 1, characterized in that, The process of determining the resource list configuration file corresponding to the power state includes: Invoke the pre-configured resource list configuration file; The resource list configuration file is searched for a target resource list configuration file that matches the power state; wherein the resource list configuration file includes at least one of the following: power-off preparation state configuration file, hibernation state configuration file, power-off cancelled state configuration file, and paused exit state configuration file.
4. The method according to claim 3, characterized in that, The step of searching for a target resource list configuration file that matches the power state in the resource list configuration file includes: When the power state is in the shutdown preparation state, the target resource list configuration file is determined to be the shutdown preparation state configuration file; When the power state is in hibernation mode, the target resource list configuration file is determined to be a hibernation configuration file; If the power status is "Power off cancelled", then the target resource list configuration file is determined to be a configuration file in the "Power off cancelled" state. If the power status is in a paused / exited state, the target resource list configuration file is determined to be a paused / exited configuration file.
5. The method according to claim 1, characterized in that, The method further includes: Send at least two types of resource release completion messages or loading completion messages to the vehicle power management service system so that the vehicle power management service system can perform hibernation control on the target vehicle; wherein, the hibernation control includes at least one of the following: entering hibernation state, hibernation interruption state, and waking up from hibernation state.
6. A vehicle sleep control device, characterized in that, The device, used in in-vehicle infotainment systems, includes: The status monitoring module is used to monitor the power status of the target vehicle. The determination module is used to determine the resource list configuration file corresponding to the power state; wherein each of the resource list configuration files includes parameter information corresponding to at least two types of resources; The management module is used to manage at least two resources in the resource list configuration file according to the power status, so as to realize the sleep control of the target vehicle; The management includes releasing or loading resources; The released resources include at least two of the following: Call Activity Manager to retrieve a list of applications within a preset time period; The removal task in the Activity Manager Service is invoked to clean up the application list information within the preset time period. Clean up audio resources by using a customized audio management interface; The shell script can be used to uninstall the wireless network driver by controlling the first custom attribute value. The shell script can be used to remove the external data service platform by controlling the second custom attribute value; The loaded resources include at least two of the following: Call the customized audio management interface to load audio resources; The shell script loads the wireless network driver by controlling a third custom attribute value. The external data service platform is launched via a shell script controlled by a fourth custom attribute value. Set CATEGORY_HOME, ACTION_MAIN, and FLAG_ACTIVITY_NEW_TASK using the Intent component, and use the launch page method in the context to bring up the desktop display.
7. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the vehicle sleep control method according to any one of claims 1-5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the vehicle sleep control method according to any one of claims 1-5.
Citation Information
Patent Citations
APP sleep management method and apparatus
CN105897869A
Power-saving sleep control method and system for on-board equipment
CN106564450A